22

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?

BeastOfCaerbannog
  • 12,964
  • 10
  • 49
  • 77
Peter.O
  • 24,311
  • 37
  • 113
  • 162

3 Answers3

8

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
Anwar
  • 75,875
  • 31
  • 191
  • 309
max
  • 81
  • 1
  • 1
7

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

karthick87
  • 80,647
  • 59
  • 193
  • 232
  • 1
    Okay, thanks... Today I only have a single keyboard to consider, but your info is good to know... Ubuntu! It's got the lot! :) – Peter.O Nov 25 '10 at 11:50
  • @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? – miguelmorales85 Aug 11 '16 at 07:52
5

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

evgeny
  • 9,475
  • 3
  • 27
  • 28
  • 1
    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 Nov 25 '10 at 11:34
  • 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. – Paul Stelian Feb 05 '16 at 20:18
  • 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. – Atralb Oct 06 '20 at 02:18
  • @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. – Paul Stelian Oct 07 '20 at 19:44