Run your virtual OS directly from GDM in Ubuntu
If you regularly run a couple of OS from your VirtualBox and want to login to those OS directly from GDM session, here is a quick way to do it. For this to work you should have already set up your VirtualBox. Here we won’t be talking about how to setup VirtualBox but only how to login to a virtual OS from GDM session.
Windows XP GDM
- Create a bash script with the following contents
[ad]
#!/bin/bash
VirtualBox -startvm **_NameOfYourVirtualOS_**
Replace yourSUPassword with your password, and NameOfYourVirtualOS with the name that you have given to your virtual OS in VirtualBox.
- Name it something like windowsXPGDM (if you want to run Windows XP), make it executable, and then copy it to /usr/bin.
$ chmod 755 windowsXP
GDM
$ sudo cp windowsXPGDM /usr/bin
- Go to /usr/share/xsessions and create a new file with the following contents:
[Desktop Entry]
Encoding=UTF-8
Name=WindowsXP
Comment=My Virtual WindowsXP
Exec=/usr/bin/windowsXPGDM
Icon=
Type=Application
Save it with a name something like windowsXP.desktop.
Log out and you will see a new entry WindowsXP in your GDM session. You can now directly open VirtualBox session without even logging in to your Ubuntu machine.
[ad]