how to made unity 2D as default Desktop Environment

Asked by Sean

Is there anyway to make Unity 2d launch by default as opposed to having to log out, adjust the setting, and then log in? Most searches I've seen tell me how to play with settings once it's enabled, but knowing how to make it launch by default would be awesome.

Thanks in advance!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu lightdm Edit question
Assignee:
No assignee Edit question
Solved by:
Eliah Kagan
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Do you use autologin?
What is the output of:

lsb_release -a; ps -ef | grep dm

Thanks

Revision history for this message
Sean (s-wuensch) said :
#2

This is what it gives me.

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric
root 1070 1 0 19:34 ? 00:00:00 lightdm
root 1824 1070 2 19:37 tty7 00:03:20 /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
sean 6810 6696 0 22:17 pts/0 00:00:00 grep --color=auto dm

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Do you use autologin?

Revision history for this message
Sean (s-wuensch) said :
#4

Sorry, I forgot to answer that in your first question.

Yes, I use auto login. If I turn the computer on it goes right to the desktop. All I have to do is provide my password. If I want to get into the screen from where I select a user to log in I have to actually log out after I start my computer and then log back in under the appropriate unity.

Revision history for this message
marcus aurelius (adbiz) said :
#5

when you log in, click the gear like thing at the top corner of the panel that you use to type your password. select unity 2d. now every time you log in, you'll be in 2d mode.

Revision history for this message
Best Eliah Kagan (degeneracypressure) said :
#6

"Yes, I use auto login. If I turn the computer on it goes right to the desktop. All I have to do is provide my password."

If you use auto login, you should not have to provide your password to log in...

If for some reason you don't want to change the session type at the login screen itself, as suggested by marcus aurelius, you can manually edit the relevant configuration file, which is called .dmrc and is located in your home folder. In Nautilus (the file browser), you'll have to press Ctrl+H (or View > Show Hidden Files) to see it and other files that start with a '.' character. If you have this file--which you probably do--then its contents will be like:

[Desktop]
Session=ubuntu

You can change it to say:

[Desktop]
Session=ubuntu-2d

If you don't have the file at all, then you can create it with the appropriate contents.

Or if for some reason you want to make Ubuntu 2D (unity-2d) the default session type for *all* users (including users you create in the future), then you can edit /etc/lightdm/lightdm.conf, changing the line that says "user-session=ubuntu" to instead say "user-session=ubuntu-2d". A few things to keep in mind when considering doing this:

(1) It is preferable to edit the per-user configuration files in users' home folders, unless you have a reason to prefer changing the global configuration. This whole section about editing /etc/lightdm/lightdm.conf is included for completeness, not with the anticipation that you will need it to solve your present problem.

(2) Since this is a global configuration file and it contains considerably more than the simple configuration option that you are intending to edit, it is advisable to back it up before editing it, in case you make a mistake. You can do that in the Terminal by running the command "sudo cp /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.old" (without the quotes).

(3) This file is owned by root, hence the sudo command above. You must also edit it as root. To open it in gedit as root, you can run "gksu gedit /etc/lightdm/lightdm.conf" (either in a Terminal window, or in the graphical Run Application text box, when you can get by pressing Alt+F2).

Revision history for this message
Sean (s-wuensch) said :
#7

After selecting Unity 2d on the log in screen it now defaults into unity 2d. I don't know why it didn't do this the first time, but it works now. I appreciate the quick responses from everyone. I should have tried it one more time as opposed to wasting all of your times on a seemingly easy solution. Regardless, thanks all for the help!

Revision history for this message
Sean (s-wuensch) said :
#8

Thanks Eliah Kagan, that solved my question.