[note... this is a draft version, subject to change and corrections] Making Ubuntu work like a normal GUI ==================================== By Terry Newton (wtn90125@yahoo.com) Created November 21, 2011, Last Modified February 9, 2012 This information is presented as-is and without warranty, not responsible for any damages caused by following these instructions (but please let me know about any issues). Everyone has different needs, this is how I configured test versions of Ubuntu with Gnome 3 (11.10 and 12.04) running under VirtualBox so that it works for me. My needs are simple, just a functional desktop to which I can add files, directories, symlinks and launchers, a functional right-click on the desktop and within directories, and a panel or panels that provide a application menu, a window list, a volume control and a clock. Basic stuff but these features are very important to me so that I can do my work without having to slow down to access files, switch windows/apps, etc. Unity and Gnome Shell are fine for many users, but the new environments don't let me work the way I am used to working. Under the hood not that much has changed so it's fairly easy to get back to a system that uses a traditional GUI. Note - at the time of this writing 12.04 isn't even to alpha yet, DO NOT install it on a production machine! It likely will break a few times before ready for release. Some procedures may need changing. The basic procedure also works for other Gnome 3 distributions (Fedora, OpenSUSE etc) although some specifics vary. If you know what you're doing modify the procedure as you see fit, but if new to all this stuff maybe stick to the plan as much as possible until you learn what affects what. Read through this whole file first so you'll know what to expect, and remember this is just how I set it up, feel free to follow other setup guides if they look like they'll result in something better for what you do. If you just want classic Gnome back just install gnome-session-fallback and probably gnome-tweak-tool, log into it and tweak it to get your world back. The other stuff can be done later, differently, or not at all. OK here we go... Install Ubuntu 11.10 or 12.04 and apply updates. Use Ubuntu Software Center to install the following packages... synaptic (can switch to synaptic to install the rest) gconf-editor (for editing the old configuration database) dconf-tools (for editing the new configuration database) build-essential (optional but required to build many things) alacarte (for editing the app menu) assogiate (for making new file types) gnome-tweak-tool (also installs gnome-shell) gnome-session-fallback (also installs a tool for making launchers) lxde (a minimal LXDE session) xfce4 (a minimal XFCE session) This provides a choice of Ubuntu (normal or 2D), Gnome, Gnome Classic (with or without effects), LXDE or XFCE when logging into the system. Note... if you don't want the LXDE and XFCE sessions, everything here can be done by installing just lxpanel instead, and optionally pcmanfm or thunar if you need to associate files to arbitrary files (as opposed to only associating to installed apps). Having the LXDE and XFCE sessions is handy because they provide alternate traditional-style GUI's to try out, and to fix other sessions after breaking them. If running under VirtualBox, install the guest additions, set up a shared folder etc. To run Gnome Shell 3D graphics must be enabled. Setting up to run well under VirtualBox is a bit tricky, starting with getting the guest additions installed - build-essential must be installed, installed "usually" mounting the guest addition virtual CD pops up an auto-run prompt but if not need to open a terminal in the CD folder and run manually (i.e. cd /media/cdrom then sudo ./VBoxLinuxAdditions.run). Setting up a shared folder requires adding with the VirtualBox GUI, make sure it's permanent and automounts, reboot, then add yourself to the vboxsf group. This can be done using the command: sudo adduser username vboxsf (replace username with your user name). The shared folder appears under /media, to make a shortcut to it (assuming desktop icons are enabled) drag it to the desktop while holding control and shift. VirtualBox is not useful for bug-testing (it has its own bugs) but it is very useful for experimenting with new operating systems with practically no risk, and makes it trivial to back up the system before trying something drastic - simply open the VirtualBox VMs directory and drag a copy of the virtual machine folder while holding control. Optional... to remove the global menu stuff uninstall the following... indicator-appmenu appmenu-gtk appmenu-gtk3 appmenu-qt firefox-globalmenu thunderbird-globalmenu To remove the overlay scroll bar stuff open a terminal and enter... gksudo gedit /etc/X11/Xsession.d/80overlayscrollbars ...add the text... export LIBOVERLAY_SCROLLBAR=0 ...and save. LightDM (presently) doesn't permit auto-login after a timeout so to fix that, install gdm and select it as the default, then from a terminal... gksudo gedit /etc/gdm/custom.conf ...and add the text... (replace username with your user name) [daemon] TimedLoginEnable=true AutomaticLoginEnable=false TimedLogin=username AutomaticLogin=username TimedLoginDelay=10 DefaultSession= ...and save. DefaultSession doesn't really matter if you've already logged into a GUI, whatever was last run becomes the default. With this config file you get 10 seconds to pick your environment or it automatically logs into the last session that was used. If desktop isn't enabled then use gnome-tweak-tool ("Advanced Settings") to enable it, also show icons in menus and buttons, show home folder, and show all buttons. Or do what you want to do... myself I'm mostly lost without a functioning desktop I can plop my work on - to me a desktop that doesn't have icon functionality is like a real desk I'm not allowed to set anything on - great for keeping it clean but not so great when lots of stuff has to accessed quickly without hunting it all down. In the file manager (Nautilus) go to preferences and check show hidden files, you need to be able to access those .hidden directories. If Gnome "Classic", LXDE and/or XFCE provide enough functionality you can stop now, the rest of this shows how to add a custom script for selectively starting programs to add LxPanel (part of LXDE) to other sessions, how to create a custom session that starts Gnome/metacity with just LxPanel, and documents a few tweaks I made to my test setup running under VirtualBox. This is but one way to customize sessions, other panels or docks can be used. There will be some scripting, editing and command line stuff which I've tried to explain with a new user in mind, advanced users can do these steps however they want. Scripting can be intimidating at first but can be very useful, often how-to's will simply say "create bla.ext containing...", I'll spell out (one way) to do it (there are many other ways that achieve the same thing). Consider these just examples to get ideas for customizing existing sessions and creating new sessions - different users have different needs. I don't need fancy panel applets etc.. there are plenty of other tricks on the net. Also I won't cover much about how to configure LxPanel but it's easy to figure out, just right-click the panel or a panel item and set it up the way you want - if running with Unity or Gnome Shell I don't need the systray, clock, etc since those things are on the top bar, I just remove them. If using with Gnome "Classic" (after removing the bottom panel) I set it up so it's just a window list and a minimize-all item. LxPanel has fairly simple features but unlike most panel apps it has a feature that's very handy when working with multiple sessions - the command line can specify a directory for the setup files. LxPanel makes Unity 2D and Gnome Shell much more usable in my opinion, but different environments should enable different setups so they can be tweaked separately and without affecting the existing LXDE installation. This is an optional script that can be used for LxPanel's logout function to show a simple GUI for shutting down, rebooting or logging out. Open the user home directory, create a new text file, name it shutdown.sh, open the file and add the following text... #!/bin/bash # a menu for shutting down the system 5/15/11 # shutdowncommand is a copy of shutdown with chmod a+s shutdowncommand # so that it'll run as root without having to run the script as root. # using kdialog... (split to 2 lines) #retstr=$(kdialog --title "Shutdown Menu " --radiolist "Select..." \ # Shutdown Shutdown on Reboot Reboot off Logout Logout off) # using zenity... (split to 3 lines) retstr=$(zenity --title "Shutdown Menu" --list --text "Select..." \ --radiolist --column "" --column "" --hide-header \ true Shutdown false Reboot false Logout) if [ "$retstr" == "Shutdown" ];then shutdowncommand -P now fi if [ "$retstr" == "Reboot" ];then shutdowncommand -r now fi if [ "$retstr" == "Logout" ];then gnome-session-quit --logout --no-prompt fi ...save, right-click shutdown.sh, properties, permissions, set to executable. Open a terminal and enter the following commands... sudo cp /sbin/shutdown /usr/local/bin/shutdowncommand sudo chmod a+s /usr/local/bin/shutdowncommand These commands permit running the shutdown command without having to be root, normally not a good idea for most system commands but the shutdown command is fairly benign. If worried about it use the alternate logout command (to follow) and don't use shutdown.sh (but it's really handy for alternate sessions that don't provide built-in funtions for shutting down etc). Keep the terminal open and enter lxpanel to run LxPanel and create a default config directory under ~/.config/lxpanel, but need to do something to the panel to actually make config files, so add shutdown.sh to the Logout command. Right-click the panel, choose Panel Settings, click Advanced, in the Logout command box enter: /home/xxxxxx/shutdown.sh Replace xxxxxx with your user name to be a valid path - or if the script is saved somewhere else, specify the full /path/to/shutdown.sh. Close the setup dialog to save the setup to ~/.config/lxpanel/default. Press control-C in the terminal (lxpanel goes away) and close the terminal. If you don't want to use the shutdown.sh script, instead you can add just a plain logout command... open a terminal, enter lxpanel, right-click the panel and choose Panel Settings, Advanced, make the logout command: gnome-session-quit --logout Close the terminal and LxPanel will exit. Add a custom startup script, mine is mystartapps.sh in my home dir. Open the user home directory, create a new file and name it mystartapps.sh (or anything you want), open it and add the text... #!/bin/bash # This script is added to startup apps to permit # selectively starting programs depending on the session. # Mainly for running lxpanel with different setups using the -p option # followed with a dir name under ~/.config/lxpanel. To set up first # launch lxpanel with no options then change something (anything) to # create ~/.config/lxpanel/default, then copy default to other dirs. # # enable/edit the next line if extra startup apps need to be delayed # sleep 5 #if [ "$DESKTOP_SESSION" == "ubuntu" ];then # lxpanel -p ubuntu & #fi if [ "$DESKTOP_SESSION" == "ubuntu-2d" ];then lxpanel -p ubuntu-2d & fi if [ "$DESKTOP_SESSION" == "gnome-shell" ];then lxpanel -p gnome-shell & fi if [ "$DESKTOP_SESSION" == "lxgnome" ];then lxpanel -p lxgnome & # enable the next line to use Gnome's volume control # gnome-sound-applet & fi # the following lines can be enabled to replace gnome-panel's # bottom panel with lxpanel #if [ "$DESKTOP_SESSION" == "gnome-fallback" ];then # lxpanel -p gnome-fallback & #fi #if [ "$DESKTOP_SESSION" == "gnome-classic" ];then # lxpanel -p gnome-classic & #fi ...save, right-click mystartapps.sh, properties, permissions, set to executable. Once a script has been marked executable, by default double-clicking will present a box asking what to do, for further editing select "display". You'll probably have to edit this one a few times at first while getting your sessions right. Hint.. if you get something wrong and the panel doesn't start (incorrect $DESKTOP_SESSION string, etc) edit it to correct, then run it. If the panel still doesn't come up, open a terminal and enter ./mystartapps.sh to see what the error is. Sometimes if lxpanel is hung and not showing (can happen if the -p dir isn't right), or to kill it to enable a new config, enter: killall lxpanel Each section of the script corresponds to a different value of the DESKTOP_SESSION variable, which can vary. To see what it is for a given session open a terminal and enter: echo $DESKTOP_SESSION and make sure the string in quotes after == matches it for the relevant session. Add the commands for that session in between the then and fi, with commands followed by & to launch in the background. Unless of course you need sequential commands. Comment or remove unused sections - in this example the normal ubuntu Unity section is commented out because the 3D Unity launcher doesn't resize for the panel (it works but need to resize the panel to not overlap), and using LxPanel with the fallback/classic sessions is optional and requires removing the normal gnome-panel bottom panel first. Remember to double-check $DESKTOP_SESSION for each session. The "lxgnome" section is for a custom session, will get to that. Now use the file manager to go to .settings/lxpanel and copy the default directory to directories matching the string after the -p options, so drag default and rename to ubuntu-2d, drag default and rename to gnome-shell, drag default and rename to lxgnome, etc. Now run Startup Applications (gnome-session-properties) and add mystartapps.sh to the startup applications (browse or specify /home/xxxxxx/mystartapps.sh or whereever it was saved to). Log out and from GDM select Gnome Shell or Unity-2D, LxPanel should start up. Go ahead and set up LxPanel as needed for each environment. Here are some handy scripts for the .gnome2/nautilus-scripts directory... (they must be made executable to work, after saving right-click, properties) BrowseAsRoot... #!/bin/bash gnome-terminal & CreateLauncher... (requires gnome-panel package) #!/bin/bash gnome-desktop-item-edit --create-new $(pwd) & Terminal... #!/bin/bash gnome-terminal & These will come in handy, especially BrowseAsRoot and Terminal, but CreateLauncher too if you like app launchers on your desktop. Now let's create a custom "lxgnome" session. Open a terminal and enter... gksudo gedit /usr/share/gnome-session/sessions/lxgnome.session ...and add the text... [GNOME Session] Name=GNOME (lxpanel) RequiredComponents=gnome-settings-daemon; RequiredProviders=windowmanager; DefaultProvider-windowmanager=metacity DefaultProvider-notifications=notify-osd DesktopName=GNOME ...and save. Now make GDM etc display as an option, enter... gksudo gedit /usr/share/xsessions.lxgnome.desktop ...and add the text... [Desktop Entry] Name=GNOME (lxpanel) Comment=Gnome with lxpanel Exec=gnome-session --session=lxgnome TryExec=gnome-session Icon= Type=Application X-Ubuntu-Gettext-Domain=gnome-session-3.0 ...and save. You should now be able to log out and select "GNOME (lxpanel)" and load up a Gnome session with LxPanel. That is assuming you copied .config/lxpanel/default to lxpanel and left mystartapps.sh as presented. Fix up the panel as needed. Hint... to make LxPanel's clock display 12hr AM/PM, use the string: %l:%M%p Hint... if using the Adwaita theme, drop-down menus look lots better if metacity compositing is enabled, run Configuration Editor (gconf-editor), go to apps/metacity and check the compositing option. [but this can cause side effects when moving icons under VirtualBox... ended up using no compositing and a modified Ambiance theme.] Hint... if using the Ambiance theme FireFox doesn't show selected options in forms correctly (can barely see), to fix make a directory in your home dir named ".themes" (if not already there) and open it up, in another file manager window navigate to /usr/share/themes and copy the Ambiance directory to .themes (hold the control key while dragging) - in terse-talk that would be copy /usr/share/themes/Ambiance to ~/.themes/Ambiance - now you have a copy to edit that will override the stock settings. Navigate to the ~/.themes/Ambiance/gtk-2.0/gtkrc file, open it up, and find the line... base[ACTIVE] = shade (0.94, @bg_color) ...and change the 0.94 to something more shaded like 0.7 or 0.6. Making new themes is tricky.. at first I did this to a renamed copy in my local .themes directory (with entries in index.theme altered, nautilus hides the true filename), which worked if gnome-tweak-tool was used to select it but would not show up in the Appearance app and caused anything launched as root to revert to ugly defaults. Copying the modified renamed theme to /usr/share/themes didn't work, didn't want to make the changes to the installed copy of Ambiance since an update might wipe it out, so instead just made a local copy of Ambiance and modified that. Need. More. Docs. I found a nice modified theme for Nautilus called "Ambiance Dark Sidebar" on the www.webupd8.org site, [http://www.webupd8.org/2011/11/download-ambiance-with-dark-nautilus-3.html] direct url is http://ubuntuone.com/5e7YIXUGjGeCXSReAmfrtI - copying the gtk-3.0/apps/nautilus.css file over the corresponding file in the local copy of Ambiance enables the mod while still permitting the theme to be set to Ambiance, so root file manager etc picks up the original theme. Hint... if you want the window buttons on the right, use gconf-editor ("Configuration Editor") navigate to apps/metacity and change the button layout key to ":minimize,maximize,close" (without the quotes). Hint... if you need to make file associations to arbitrary binaries or scripts, use pcmanfm or thunar as nautilus no longer has the "other" option. If a new type is needed, first use assogiate to create the new mime type, for me usually based on extension so I can separate different kinds of text (yea I know extensions aren't supposed to matter.. which is true if you don't mind if every tool for every kind of text file shows up all at once, myself, I prefer to separate .bas .red .sim .asm and other extensions I use and make them children of type text so I can have only the appropriate tools show up when I right-click them). Hint... if using Gnome Classic with effects, if Unity loads with it install ccsm (CompizConfig Settings Manager) and with Classic running go to preferences, select Default or make a new Classic configuration, and go to Desktop and uncheck the Unity plugin. Caution: some CCSM settings can can crash the system so be careful. Hint... if it looks broken when minimizing windows, disable animations. Old location was in gconf-editor, desktop, gnome, interface. New location for 12.04 is in dconf-editor, org, gnome, desktop, interface. Other web links for getting back a classic GUI... http://pleasanthacking.com/2012/01/02/making-ubuntu-11-10-and-12-04-behave-like-10-04/ http://www.omgubuntu.co.uk/2011/12/how-to-make-ubuntu-11-10-look-and-feel-like-gnome-2/ http://mandriver.users.sourceforge.net/classic-gnome-guide.html http://ubuntuforums.org/showthread.php?t=1873765 (Gnome Classic Megathread) At least for 12.04 some of the settings are a moving target, so some of the procedures might need some adjustment. --------------------------------------------------------------------------