Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Ubuntu 11.04, is it possible to revert to the classic desktop and disable Unity using a script instead of logging out and setting it via the GUI?

share|improve this question
    
Do you want to permanently disable Unity? Or remove it altogether? When do you reckon that script should be called? You can choose to use Unity or the classic environment when you log in, and this choice will be remembered. –  slhck Jul 13 '11 at 12:11
    
I'm creating a script that needs to be run after installing Ubuntu. I would like to have this as an option. It doesn't have to be removed I think, just having the classic desktop run is okay. But I don't know if it's possible to do this while Unity is running. (The script will probably be executed when the user is logged in.) –  SPRBRN Jul 13 '11 at 15:19

1 Answer 1

is it possible to revert to the classic desktop and disable Unity using a script instead of logging out and setting it via the GUI?

Answer

Yes, it is possible.

.... I'm gonna go out on a limb and assume you want to know a solution too.. ;)


Actual Answer

If you're using gdm as your display manager (it's the default display manager) then...

  1. Edit your /etc/gdm/custom.conf

  2. Add the line "DefaultSession=gnome" to the end (probably won't have a 'DefaultSession' key when you enter there.

You could just dump this in the terminal and call it a win:

sudo echo "DefaultSession=gnome" >> /etc/gdm/custom.conf"

If you're not using gdm, then you'll need to look up that display manager's equivalent. Google is your friend.


Easy Graphical Solution

For others reading this, who can stand a graphical solution, look at this guide.


For a Gnome-Only Setup

Here's a guide on removing anything that isn't gnome related, from 11.04.

share|improve this answer
    
@rxt - if you're making a script for this, you should use something like sed/gawk to replace the DefaultSession value, if it already exists. You'll probably also want to detect if GDM even is the Display Manager in use, look at this: linuxandfriends.com/2008/09/06/… –  Doc Jul 13 '11 at 23:26
    
Thanks for the reply. I checked and the used display manager is GDM. I added the line to custom.conf, and restarted, and it didn't work. Then I thought this might be because the account already exists. So I created a new user, switched to that user, and still Unity. –  SPRBRN Jul 14 '11 at 8:22
    
@rxt: Perhaps that means the default is getting overridden for you. Do you really need a command line solution? –  Doc Jul 14 '11 at 16:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.