How to run multiple user X sessions on the same computer, at the same time?

27,867

Solution 1

If you are using Gnome:

Try running gdmflexiserver, it will launch a new GDM session. You can switch between them using Ctrl+Alt+F{8..12}.

Take note though that logging in with the same user twice is a bad idea.

Also, (in Lucid, at least) you can switch users by clicking the Power button in top-right corner and then selecting a user name. alt text

Solution 2

With first X session running login as user you want to use and run in an xterm or at a console prompt:

xinit -- :1

or

startx -- :1

Solution 3

If you want multiple users to use Keyboards/Mouse then that is multiseatX.See this documentation

Share:
27,867

Related videos on Youtube

Peter.O
Author by

Peter.O

Free! Free at last! ... my Windows box died in September 2010 ... and I'm free at last!

Updated on September 17, 2022

Comments

  • Peter.O
    Peter.O almost 2 years

    I want to have more than one user logged on at the same time, on the same computer.

    Each user should have a full X session.

    It is easy enough to log in to multiple concurrent non-X Linux terminals, but I want the X factor.

    Maybe I've missed something, but I only see a Main Menu option to Log out of the current user, and nothing for Switch User.

    Is there a simple way to do this?

    • evgeny
      evgeny over 13 years
      Do you mean having multiple users use the same keyboard/mouse, or different keyboards/mice? The solutions to those problems are different.
    • Peter.O
      Peter.O over 13 years
      Just a single keyboard/mouse/monitor.
  • Peter.O
    Peter.O over 13 years
    Evgeny.. for some reason I don't have that Switch option (but it is present in my VM installation of Ubuntu.. I checked just now)... and checking further... Aha! I see now!.. A couple of months ago, I got rid of the bottom panel entirely, and heavily trimmed the top panel... and (until today) I did not need the "Indicator Applet Session", so I removed it ... I had replaced the "Menu Bar" with "Main Menu" which showed only "Log off".. So, problem solved! (it's all part of the learning curve :( .. gdmflexiserve looks interesting.. and thanks about the warning of double log-on.. Thanks
  • Peter.O
    Peter.O over 13 years
    Okay, thanks... Today I only have a single keyboard to consider, but your info is good to know... Ubuntu! It's got the lot! :)
  • Paul Stelian
    Paul Stelian over 8 years
    I've seen what happens when two X sessions run with the same user (or with sudo): the X authority for the older session gets overwritten. One could use "sudo xhost +local:" as a partial workaround but it still is an issue, gksu in particular doesn't like it.
  • Anwar
    Anwar almost 8 years
    Doesn't work in 16.04
  • miguelmorales85
    miguelmorales85 almost 8 years
    @karthick87 I would like to set a PC with Ubuntu, then start a full graphical session from a laptop while another user is logged in into a different graphical session. It is possible? What tool do I need to set up?
  • Atralb
    Atralb over 3 years
    Evgeny: Hi I'm trying to find resources enabling me to understand why this: "Take note though that logging in with the same user twice is a bad idea." ? However, your answer is the closest thing I could find on the web regarding this. And I'm unable to understand the consequence of what @Paul Stelian explains in his comment.
  • Paul Stelian
    Paul Stelian over 3 years
    @Atralb Simply put X isn't made to run multiple sessions (multiple logins) at the same time from the same user, because one file is shared but also is normally only owned by one session. The xhost command can be used to allow a display (an X server) to accept the current user. BUT for the question in the title, modern Linux distributions support multiple users just fine.