Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to open a second X session with unity on display :1.

For this to achieve I open another terminal (e.g. tty 6) with Ctrl + Alt +6 and login as the user whose desktop session I want to start. When I start the X session with unity as a client on display :1, unity loads but does not adhere to my desktop settings.

This is how I start the session:

$ startx /usr/bin/unity -- :1

This does not work properly:

  • Startup applications don't start.
  • dconf settings are not read (e.g. org.gnome.desktop.interface.text-scaling-factor)
  • The language of the desktop is not correct (This user's desktop should be English while my main user has a German desktop).
  • ... maybe other stuff I did not notice.

I also tried to start X with

$ startx -- :1

This shows the correct desktop wallpaper but does not show anything else (no xterm, no panels, no dash, ...). But Ctrl + Alt +T opens a decorated terminal and I can start unity. That loads unity with almost everything I need. But the language still is German.

I also tried appending unity to ~/.xinitrc but that did not change anything.

Can someone point out my mistakes? An optimal solution for me would be to being able to start a second unity session with startx -- :1.

share|improve this question
    
Oh. By accident I just stumbled upon the solution for my problem: Obviously I just need to use the user switcher in the panel and lightdm opens the session of the second user on display :1. This does not answer my questions but solves my problem. –  justfortherec Jul 14 '13 at 19:50

1 Answer 1

If you want to manually start an xsession like that, you should rather do something like gnome-session --session=ubuntu. gnome-session will load required components such as gnome-settings-daemon which in turn will configure your stuff.

Sessions are stored in /usr/share/gnome-session/sessions/. You'll see things like "gnome.session" and "ubuntu.session". You use the file name without the ".session" extension in the --session parameter.

Likewise, if you want to properly shut down your desktop session, you can kill that instance of gnome-session.

share|improve this answer
    
Thanks. Where would I do that? In the tty? Can I pass an argument which display should be used? I can't find how to do that. If I run startx -- :1 first, open a terminal and start gnome-session --session=ubuntu I get an error message: "Failed to aquire org.gnome.SessionManager". –  justfortherec Jul 15 '13 at 6:52

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.