LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is there a way to change user without logging out? (https://www.linuxquestions.org/questions/linux-newbie-8/is-there-a-way-to-change-user-without-logging-out-155885/)

Hevonen 03-10-2004 11:17 AM

Is there a way to change user without logging out?
 
Hi, I just would like to get an answer and some instructions if there is a way to change users in Mandrake Linux 9.2 without logging out the previous user. Like leaving the first user on the background like in Windows.

Thanks for your time ;)

druuna 03-10-2004 11:22 AM

You could use su or sudo.

$ su - <username> or
$ su <username>

If you are a normal user, the password of the user will be asked. Only root can do this without having to give a password.

The difference between su and su -: The first inherits the settings of the original shell, the second makes it a login shell (just like logging in the first time).

I don't use sudo (never have), so someone else needs to explain this.

Hope this helps.

Hevonen 03-10-2004 11:24 AM

Okay thanks for helping, ill try that one :)

Hevonen 03-10-2004 11:27 AM

hmm well, I think I should have added that im using KDE and when i type that it only changes the user in Konsole, not in the whole graphical interface... :/ So basicly I would need a new answer. :) I think.. Or some adjustment to that one :)

druuna 03-10-2004 11:41 AM

If you have a window manager(wm) running (KDE in your case) you have a few options:

- Start another wm session after becomming the other user in a terminal (not my choice)
- Logout from current wm to commandline prompt. I do think that your box starts with KDE (no commandline first and manually start the wm), so you will be presented some window for login in, and not go to the comman line.

This leaves the following:

You can go to a different 'terminal' while running a wm.

With the following key-combo you can goto a different terminal:

ctrl-alt-F<1-6>

The F stands for the function key, 1 to 6 are the 6 terminals that are present (depends a little on your settings).

So ctrl-alt-F2 would give you a new terminal, your current user running the kde session is still active and you can return to it by alt-F7

You can do anything you want in the new terminal. Running commands, starting a wm, killing a frozen wm etc, etc.

If your box has the power you could run 6 kde sessions, belonging to different users. All at the same time.

If things are still not clear: Keep asking :)

Hevonen 03-10-2004 05:34 PM

I tried what you said and it worked out fine but... when i tried to run commands that normally work like loading mozilla, firefox, gaim, amsn...they just didnt work, it said "cannot display something.." or "command not found"
or "Server is already active for display 0"
:/ dunno whats wrong.

druuna 03-11-2004 03:42 PM

This error is telling you that display 0 is used, which is correct. The KDE session you first started claimed that one.

You don't mention which option you tried, I assume it's the last one.

Are you able to start a new windowmanager (KDE in your case)?? If not try soemthing like:

startx -- :1.0
This will try to start a new X session on display 1 (1.0 to be precise).

I don't use KDE myself, but I've heard of the possibility to 'reserve' extra KDE sessions. I thought it was the Xservers file somewhere in the KDE tree. I know that's not too precise, but I'll bet there are enough sites on the net that can help you with that :)

Hope this gets you going again.

Hevonen 03-11-2004 05:12 PM

Im trying Fedora atm, Ill install mandrake on my other comp in a few days and check out your suggestion, thanks again :)


All times are GMT -5. The time now is 04:30 AM.