Hey guys,
I have slightly figured out this so-called "fast user switching" and
have written a document in a couple of minutes about it. I really need a
good solution to this because my wife either always logs me out or
closes my windows or something funny to mess up my state ;-)
I am not an expert so I was hoping to get some feedback. I just write
these documents for myself and my friends mostly. Specifically, if
someone does know of a better way to do the first way and/or a different
way altogether, I would really appreciate a holler.
Thanks,
Sohail
Note, I really did do this in a couple of minutes! Here is the document:
2003-11-15
New feature! XP has fast-user-switching! Never done before!
Wrong...
There are atleast two ways to do this under XFree. The first
way is the way I would prefer but have no time to figure out.
The second way is a graphical way which is pretty but not
general enough.
The first way
=============
Setup a login script for each user for whom you want to enable this
as follows:
#!/bin/bash
# If the display env variable is not set
if [ -n $DISPLAY ]
then
# Assume user is logged into a console
<psuedocode>
Figure out the next available XDisplay. Let that be X
</psuedocode>
startx -- :$X # Start the new display on your machine at display
$X
fi
What remains for you to do is fill in the inner text of the
<psuedocode>.
Then when a new user wants to login s/he should press CTRL-ALT-F1 (to
F6)
and they will get a console. Then login as usual and your startup script
should take over.
I am pretty sure if you have a logout command after the startx command
in
your startup script, that will work but I havent tried that as of yet.
Well,
I haven't really tried the script either :)
(Hopefully) its that simple... really!
The second way
==============
This was the quick fix that I found. This is useful if you know
how many users you will have logged in at a time. For my
system, it will be at most 2 so I do the following:
Open your visual login manager's configuration file. For
example, I use gdm so my file (under RH9) is in
/etc/X11/gdm/gdm.conf.
Look for the [servers] section. You should have something as
follows:
...
[servers]
# These are the standard servers. You can add as many you want here
# and they will always be started. Each line must start with a unique
# number and that will be the display number of that server. Usually
just
# the 0 server is used.
0=Standard
#1=Standard
...
What you need to do is uncomment the line under 0=Standard.
Now, when you want to switch users, i.e., Xservers, you really just need
to press CTRL-ALT-F7 and CTRL-ALT-F8 to switch between screens.
The problem with this is that you always have two X servers running at
the same time. This is not good if you do not have memory to spare so
use this solution as a last resort.
I hope I find a solution for the first one!
_______________________________________________
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86