Install Fedora 16 VirtualBox Guest Additions and Get Working Gnome Shell Inside Virtual Machine

After faced few issues and seen similar stories on web regarding Gnome shell in Fedora 16 with Oracle VirtualBox, I decided to publish this guide. This step by step guide shows how to install Fedora 16 in local virtual hard disk, install guest additions and get gnome shell inside VM. If you are interested in checking latest Operating Systems without messing up with physical OS, then the desktop virtualization software is the best solution. VirtualBox could be a better choice since its a free product.

Gnome 3.2 is the latest shell version of improved desktop experience in F16 release. Unfortunately the current VirtualBox 4.1.6 is not supporting it automatically as how it did for Fedora 15 Gnome shell. Sysprobs earlier published a guide on install Fedora 15 guest additions and how to get Gnome shell. This article is very similar to previous articles but slightly changed to get permanent working Gnome 3.2 shell in VirtualBox.

Read more about what’s new in Fedora 16 here at official site.

How to Install VirtualBox Guest Additions on Fedora 16

1)  First download the latest Fedora 16 ISO from here ( for 32 bit hardware)

More distributions available here including for 64 bit.

2) Create a new virtual machine . Select the proper OS type and version. Make sure to enable 3D acceleration and increase the display memory size.

display settings

3) Mount the downloaded ISO and start virtual machine. Since this is a ‘Live CD’, the OS will start automatically (without installing into hard drive) from CD. The ‘GNOME 3 Failed’ message will appear at first time. Do not worry, just close it.

gnome 3 failed error

4) Install the OS permanently to local hard disk. To do it, select ‘Applications –> System Tools –> Install to Hard Drive’.

install to harddisk

Other steps are very simple and straightforward as installing most of the Linux Operating Systems. Complete the installation and remove ISO from DVD drive before restart.

5) Once Fedora 16 Virtual machine is loaded from installed local hard disk, again ‘GNOME 3 Failed’ error may appear. No issues, just close it and proceed to next steps to install guest addictions.

 

How to Install VirtualBox Guest Additions on Fedora 16

6) Make sure the guest machine is having internet with download access, so, obviously the host machine should be connected to internet. Configure the virtual machine’s network type to NAT or bridged mode. The default NAT mode worked without any settings or modifications for me. Better open a web browser from virtual machine and double check the internet connection.

7) Go to Terminal ( Applications –> System Tools –> Terminal) and log in as root ( Type su and password). Issue the following command,

yum -y update kernel

If everything is fine (the typed command and internet download), here is the successful message.

installed kernel version after 1st yum update

8.) Again type,

yum -y install kernel-devel kernel-headers dkms gcc gcc-c++

It will return the successful installation message as below,

2nd yum update

Restart the virtual machine now.

9) Its time to install built-in guest additions. Go to Devices in Virtualbox console menu and select ‘Install Guest Additions’, it will mount the built-in ISO file. Open the terminal and login as root. Browse the mounted drive ( cd /Media/VBOXADD……) and run the following command.

sh ./VBoxLinuxAdditions.run

sucessfull installation

Above screen shows the involved steps and successful installation of VB guest additions.

Before restart, run this command as root ( to get GNOME 3 Shell)

restorecon -R -v /opt 

 

Restart the virtual machine.

10) We successfully installed the guest additions. Check the additional features like full screen, Auto resize, seamless mode, mouse integration and shared folders.

more display options

To setup virtualbox shared folder features between Fedora 16 and Windows host machine follow the previous guide mentioned here.

 

How to Get working GNOME 3 Shell in Fedora 16 with VirtualBox

Until this point things will work fine on any host computers, but to get Gnome shell inside Fedora, your host computer must have good dedicated display card. I think because of Gnome requires some kind of direct 3D access in physical display card, this could be an issue with non-dedicated display card host computers. I faced this same issue with Fedora 15 which did not work on my office Dell Optiplex 755 machine whereas same VM worked at home PC which is having dedicated display.

I’m demonstrating these steps on my home PC with dedicated display card and display memory.

So, even though VirtualBox guest additions installed successfully on good host computer (with dedicated display card), the Gnome 3 shell in Fedora 16 did not work properly or automatically in other words. This will be fixed in forthcoming virtualbox versions (hopefully)

To get Gnome shell, type below command in terminal,

gnome-shell --replace &

Can you see the difference in desktop? are you getting the Gnome shell?

Unfortunately, this is not permanent. Also, if you close the terminal where you typed the above command, the desktop will return to previous ordinary desktop. SELINUX error will appear on top right message area. Restarting VM also will fall back to ordinary desktop.

Here is the way to fix this and get Gnome permanently (UPDATED…)

To avoid SELinux error after the reboot, I suggested to disable the SELinux from startup. But, few users suggested that disabling SELinux is not recommended at all since it will put the Linux machine under less security. SELinux (Security Enhanced Linux) allows users and administrators more control over which users and applications can access which resources, such as file. More information available here.

 

So, here are the workarounds,

1) Check the SELiunx error at top right corner and use troubleshooter to fix the issue.

2) After installing virtualbox guest additions, issue the following in terminal as root,

restorecon -R -v /opt 

(Credits to)

3) If above two methods did not work for you, and security is not very important because you are running this in virtual machine environment(basically, this is just a experiment), then try the disabling method.

Edit the /etc/selinux/config file and set SELINUX=disabled

selinux default value

I’m not a Linux expert, so I do not know how to edit system (or protected) files in normal GUI editor. I logged in as root and used VI editor to change this value.

This article will give some basic ideas on VI editor.

Restart now.

Now the login screen should start with Gnome shell desktop.

gnome shell login screen

Here is the working Fedora 16 Gnome 3.2 shell in VirtualBox 4.1.6.

working gnome shell applications

Share your comments, issues and successful attempts in comments area.

Have fun!

Recommended Posts

Comments

  1. David says:

    Generally speaking, I would not disable SELinux.
    Instead : Start the SELinux Troubleshooter, and you’ll see related alerts. Click troubleshoot and follow instructions. Reboot. That’s it.

    • Rob G says:

      I Totally agree with David. For me it worked to make a policy for the gnome shell checker to have access to the VBOX files. (3rd option SE troubleshoot)

      Please update this in your tutorial. Disabling SELINUX is to fire your security officer because he is just warned you just can allow.

  2. Rob G says:

    correction: Disabling SELINUX is to fire your security officer because he just warned you about something you could have allowed.

  3. I agree that disabling SELinux is a terrible work-around, but how are you guys thinking people will use SELinux Troubleshooter to diagnose a SIGABRT in gnome-shell that occurs during the login process?

  4. Here is a better solution. After installing the Virtualbox Guest Additions, do this as root:

    restorecon -R -v /opt

    I found this advice here:

    http://technologytales.com/2011/12/05/getting-gnome-shell-going-for-fedora-16-running-in-virtualbox/

  5. Excellent, thanks for updating the article.

    Not sure it’s worth another update, but perhaps frustrated users will read this far in the comments.

    I have multiple Fedora 16 x86_64 guests running on VirtualBox 4.1.6 on Windows 7 hosts, and they all occasionally hang during login. The mouse cursor twirls, you see the desktop wallpaper, and that is all.

    I suspect it’ll take an xorg or virtualbox udpate to fix this.

    In the meantime, my work-around is:

    * Press Ctrl-Alt-F2
    * Log in as root
    * systemctl start runlevel3.target
    * Wait a few seconds
    * systemctl start runlevel5.target

    I have had to repeat this process as many as 6 times in a row to get a working login prompt on one box.

  6. It’s just fine to disable SELinux ! I also use rsh instead of ssh inside my DMZ. Security can be
    overated ! Just look at Big Brother and his grand idea that you must be protected from yourself !

    Learning can itself be bound by security.

  7. Valerie says:

    Hello,
    there’s a problem in downloading fedora 16, it keeps showing me a box to enter username and password to enter into ftp
    is there anything that i can do?

  8. Udochi says:

    Thanks a lot, it worked like magic!!

Speak Your Mind

*