You are not logged in.

1

Friday, September 5th 2003, 5:06pm

Switching Users

To start off I must tell you I am brand new to linux...
Have been a windows person for years now, but MS is pissing me off with all they are doing...

So with that said if this is posible, I'm sorry I have not found out how to do it yet.

I would like to be able to switch users from active user a to user b. But still have users a's apps and what not still open. So that when user b is active, user a's stuff is still open and running.

I am thinking of how Windows XP does this, how it can have multiple users active at once.

2

Sunday, September 7th 2003, 10:58pm

It possible. You just switch to the next virtual terminal using ALT+Fx (F1-F12) and login. It will most likely not have X already started, so use the startx command after you log in and voila.
"Chopsticks require a person to use 64 muscles and 30 articulate movements simultaneously, which also acts in developing brain potential."

3

Monday, September 8th 2003, 6:31am

Quoted

Original von Kenneth

It possible. You just switch to the next virtual terminal using ALT+Fx (F1-F12) and login. It will most likely not have X already started, so use the startx command after you log in and voila.

There might be an easier way. KDE 3.1 has a new feature:
In the "K" menu there is an option "Start new session"
(if properly configured).
Right now I just don't know how to configure it properly (TM)
so I don't see that option in my menu :-).
But I have already seen this feature in action. Maybe I'm missing kdm.

Ok, here's what it does: When you click "Start new session"
a new X session will be started. The screen switches to
a kdm window where the second user can log in.

You can now switch back and forth between the X sessions / users using
the Ctrl-Alt-Fx keys. Typically F7 and F8 are used for the first
two sessions. Any one of the two users can secure his session by
activating the screen lock.

4

Monday, September 8th 2003, 12:38pm

wow cool, thanks alot... I will have to try that out...

On a side note:
I'm really starting to like Linux and KDE, vary happy with it.

5

Monday, September 8th 2003, 5:08pm

Ah, and I forgot: If this feature is enabled the screensaver
gets an additional button to start another session, too.
That way someone who comes to your locked PC can
start a new session without interfering with your programs
(well, unless he shuts down the machine or pulls the plug ;-))

6

Tuesday, September 9th 2003, 7:47pm

I have tryed this yet... been busy trying to install V4L... (having some problems there) any ways...

I dont' have a button "Start new session". Do I have to enable that some where?? (I do have MDK9.1 with KDE 3.1)
And I see other places, ppl say that I can only have one GUI session open... the other 7 or so are all terminal based...

7

Tuesday, September 9th 2003, 9:47pm

This is the way I do it:

ctrl+alt+f1 to switch to a console
login with the user you want
at the console type startx -- :1

This will start up an X session in the user's default window manager. Just lock the screen when you don't want someone else to access your session. If you need a third X session, you'd do the same thing, except ctrl+alt+f2 to switch to a console and startx -- :2 to start the X session. Increment the numbers for each additional session you need. The initial session will be assigned to crtl+alt+f7 and each new session will use the next f key. I assume it goes all the way up to f12, but I'm not sure. Good luck!

8

Tuesday, September 9th 2003, 10:30pm

Quoted

Original von natrius

This is the way I do it:

ctrl+alt+f1 to switch to a console
login with the user you want
at the console type startx -- :1

This will start up an X session in the user's default window manager. Just lock the screen when you don't want someone else to access your session. If you need a third X session, you'd do the same thing, except ctrl+alt+f2 to switch to a console and startx -- :2 to start the X session. Increment the numbers for each additional session you need. The initial session will be assigned to crtl+alt+f7 and each new session will use the next f key. I assume it goes all the way up to f12, but I'm not sure. Good luck!

If you really do it that way then start the new X server in the background
and log out! Otherwise you'd leave a shell open for anyone (an attacker
would only need to press Ctrl-C or Ctrl-Z to take over your console session).

Try this:

(startx -- :1 &); exit

It'll log you out automatically after having started the new X server
in the background.

9

Tuesday, September 9th 2003, 10:44pm

Quoted

Original von MadCow

I dont' have a button "Start new session". Do I have to enable that some where?? (I do have MDK9.1 with KDE 3.1)
And I see other places, ppl say that I can only have one GUI session open... the other 7 or so are all terminal based...

It's definitely possible. At work, under SuSE 8.2, I have that button,
and it works. Typically terminals 1-6 have a login prompt,
7 is the first X server, 8 is the second, ...
As far as configuration is concerned, here's what I found in google:
http://www.mail-archive.com/gentoo-user@gentoo.org/msg11927.html
It's about Gentoo, but maybe it'll work for you, too.

Note: I had some problems starting two KDE sessions with the *same* user.
That was under KDE 3.0, IIRC (haven't tried after that...)
But logging in with a different user should work.

10

Thursday, September 11th 2003, 2:11pm

Well I tryed it...

Still don't have that "Start new session" :cry:

Any ways... so I tryed F8... nothing happend, just ent to a black screen with a blinking cursor :( Is this beacuse my second x server is not configured correctly?? Any way to fix this??

Then I tryed F6 and started the x server... that worked... I started GAIM with a diffrent user... i could see my MSN user in the other session... so I switched back... my original session was still working... so I went back to F6 and nothing worked.... the session was all messed up :(

11

Thursday, September 11th 2003, 9:46pm

Quoted

Original von MadCow


Any ways... so I tryed F8... nothing happend, just ent to a black screen with a blinking cursor :( Is this beacuse my second x server is not configured correctly?? Any way to fix this??

No, that's normal. I guess we didn't make that clear.
You have to change to a virtual terminal that has the
login prompt. So going to vt6 (for example) was exactly
the right thing to do.
What we meant was that the second X server will "occupy" vt8,
which means you can switch to it using F8.

Quoted

Original von MadCow


Then I tryed F6 and started the x server... that worked... I started GAIM with a diffrent user... i could see my MSN user in the other session... so I switched back... my original session was still working... so I went back to F6 and nothing worked.... the session was all messed up :(

Hmm. It seems you did it just like you were supposed to,
so I don't know what happened...
- Did you start the second X server as a different user?
- What exactly do you mean by "nothing worked.... the session was all messed up"?

Ah no, wait, did you say you went back to F6? That's
the terminal that now gets all the debug output, etc.,
from the second X server.
Maybe that's what you meant?
Try F8 instead!

Edit:
So, although you started the second X server from somewhere else
the two will be on Ctrl-Alt-F7 and Ctrl-Alt-F8, respectively.
This is also true should you get the "start new session" feature to work.

12

Friday, September 12th 2003, 12:17am

Hi,

to activate tis feature you need to have a running graphical login (I guess you probably have already kdm running) and to add the following lines in /etc/X11/xdm/Xservers

[code:1]
:1 local reserve /usr/X11R6/bin/X :1 vt8
:2 local reserve /usr/X11R6/bin/X :2 vt9
:3 local reserve /usr/X11R6/bin/X :3 vt10
[/code:1]

This starts, if needed, the addional X servers on the virtual terminals.
KDE detects that at the next login and automatically adds the "Start new session" menu to the K-Menu.

I found that tip (thread in german) in the gentoo forum. This is a nice feature, but AFAIK, SuSE is the only distribution which enables it by default.

While at editing this file: If you want to make your system a bit more secure you can also add the "-nolisten tcp" flag to the X server startup, like in
[code:1]
:0 local@tty1 /usr/X11R6/bin/X :0 -nolisten tcp vt7
:1 local reserve /usr/X11R6/bin/X :1 -nolisten tcp vt8
:2 local reserve /usr/X11R6/bin/X :2 -nolisten tcp vt9
:3 local reserve /usr/X11R6/bin/X :3 -nolisten tcp vt10
[/code:1]

Your X server then won't accept any TCP connections anymore.
But, caution :!:, if you then switch users via "su" in a terminal, no X program will start anymore, even if you allowed it via "xhost +localhost". Use "kdesu" instead!

Frank

Edit: Ooops, that tip is also mentioned in the link above, should read more carefull, sorry

13

Friday, September 12th 2003, 3:40pm

cmbofh, ya that?s probably why then... I was trying to go back to vt6 not vt8...

furanku, so will that automatically start 3 x servers then when I boot up???

Is there any way to have vt8 automatically start an x server when you boot up??

14

Friday, September 12th 2003, 4:28pm

With that configuration the additional X Servers will be started by user request, i.e. If you click on "New Session", not at boot time.

From http://kde.cict.fr/kdebase/kdm/:

Quoted


The Xservers file
-----------------

This file tells kdm which/when/how X-Servers ("desktop sessions",
"login screens") should be started. The file is backwards compatible with
XDM's Xservers file, but it contains some extensions:
[...]
* reserve. A server marked as reserve is not started at KDM's startup time,
but when the user explicitly requests it. See "Command FiFos" below.

Example:

:0 local@tty1 /usr/bin/X11/X vt7
:1 local reserve /usr/bin/X11/X :1 vt8


I guess the server would be started at boot time (at kdm startup, to be more precise) if you remove the keyword "reserve", but I've never tried it, since it would be a waste of resources for my purposes, to have two X servers running all the time. But if you want it, remove the "reserve" keyword in the line concerning vt8 and you should get two kdm login screens, one on vt7 and one on vt8, and you'll be able to switch between your sessions via Alt-Ctrl-F7 and Alt-Ctrl-F8.

Like mentioned above, some problems should occur if you log in as the same user on both (like always, whan you want to have simultanous write access to the same files).

Hope that helps,
Frank

15

Thursday, September 18th 2003, 4:01pm

Hey guys... sorry could not reply sooner... been busy...

Thanks for all your help...
I got it working :D

3 things to note:
-Hard to switch to other desktop some times... some times I have to press f8 some times f5... :|
-And when wanting to turn off computer you have to close both servers... so you have to kill on server then login to the other and kill it.
-When rebooting, it just goes to a blank screen and a blinking cursor. Have to then hot the reboot buton.

I am thinking that these can be fixed with some tewaking... ;)