Sunday, February 16, 2014

Linux Mint or Ubuntu Black Screen of Death on Login VirtualBox Client

Hi,

I recently experienced Black Screen of Death (tm) on my Linux Mint guest after smashing my keyboard (lol). My host is also Linux Mint. I will talk about two potential causes -- incorrect terminal and incorrect login script. There are many more causes such as fsck and video card drivers but these are simple to rule out.

Incorrect Terminal

What happened was I hit Ctrl-Alt-F2. This switches to the second text console, both on the host and the guest. When I rebooted on the guest, everything appeared normal yet when I logged in it was just a Black Screen.

To fix this, change the host key in VirtualBox under File - Preferences - Virtual Machine. Make it another key than Right-Ctrl. This way the host machine won't capture the key combination.



Next login to the guest machine. Press Host-Ctrl-F7 , Host being the key you mapped above. (Hint if you are not in full screen mode the host key is displayed on the bottom right). If you see your desktop then your problem is solved.

https://www.virtualbox.org/manual/images/vm-hostkey.png

Incorrect Login Script

The symptoms are the same -- black screen after logging in. Reboot, and on the login prompt click the gear then select MATE.




When you login, it will say that your default login is some "script". Change this to MATE. Login and you will see your desktop.

Give me Linux BSOD over Windows BSOD anyday.

Sharing files between Ubuntu or Linux Mint and Mac OSX (Samba)

Hi,

Connecting to Ubuntu with a Mac is relatively easy. The following uses SMB (Windows File Sharing) to share files between Linux Mint/Ubuntu and OSX. This is the easiest way I have found to share files and create a permanent share.

First, create the share on Ubuntu



cd ~
mkdir Shared
sudo chown nobody.nogroup ./Shared
sudo chmod 777 ./Shared


Then, install smb. sudo apt-get install smb

Configure smb.


1. vim /etc/samba/smb.conf
2. Modify the following:
   workgroup = EXAMPLE
   security = user
workgroup = EXAMPLE is located in the [global] section. Further down in the [global] section is the security. You can name the workgroup whatever you wish.
Create the share at the bottom of the file.
[share]
    comment = Ubuntu File Server Share
    path = /path/to/Shared/folder
    browsable = yes
    guest ok = yes
    read only = no
    create mask = 0755
Replace /path/to/Shared/folder with the full path to the Shared folder you created at the beginning.

You can name [share] whatever you want, like [sharedfolder].

Add your user.

sudo smbpasswd -a username Where username is your Linux Mint login name. It will prompt you to enter a share password. Use a different password than your Linux Mint password.

Restart smb.

sudo restart smbd
sudo restart nmbd

Access from OSX

Open Finder then type in Cmd-K.
Type in smb://x.x.x.x where x.x.x.x is the IP of your Ubuntu machine (use ifconfig on Ubuntu to find this).
Use your Linux Mint username and the password set above with smbpasswd (not your login password) to connect.
The folder should appear on the left on finder.

Now you can share files between your Mac Mini OSX and Linux Mint machines. Happy coding.

Friday, February 14, 2014

Virtualbox X Error of Failed Request BadWindow OpenGL

Hi,

If you get an error on a VirtualBox guest similar to mine X Error of Failed Request Bad Window when running glxgears or glxinfo or any OpenGL game , there's many possible causes. You could have not properly installed VirtualBox guest additions. Uninstall the default guest additions (default to most distros) with sudo apt-get remove --purge virtualbox* from both guest and host.

Then reinstall virtualbox on the host and reinstall guest additions on the guest, making sure you download the latest version from Oracle (as of this writing 4.3.6).

If you still have problems with OpenGL on the guest, it's possible that the fglrx drivers were improperly installed. See this excellent post on how to remove and reinstall them.

http://askubuntu.com/a/294396

I successfully installed the amd-catalyst-14.1-betav1.3-linux-x86._64.zip drivers with those instructions. Make sure to checkout the link to the wiki and use your distribution instead of Ubuntu precise (for example use Ubuntu/saucy for Linux Mint Petra).

You should be able to uninstall and purge any amd driver and reinstall with those instructions.

Saturday, February 8, 2014

Oracle Select * and other fields



Hi,

Couldn't find a quick Google answer to this so hopefully this helps some one.

If you want to SELECT * in an Oracle database, but at the same time SELECT multiple custom fields, do the following:

SELECT *, NAME.Column FROM DUAL NAME;


Where NAME is a table alias you invent yourself for any table (not just DUAL).

Using a table alias is also the solution for problems with subqueries and column name issues.