[wplug] The Ultimate Desktop II

Kevin Squire gentgeen at linuxmail.org
Mon Mar 21 09:25:28 EST 2005


On Fri, 18 Mar 2005 18:33:50 -0500 (EST)
Brandon Kuczenski <brandon at 301south.net> wrote:

> I was wondering if there are any provisions on Debian to implement a 
> Windows XP-style "switch user" option, where multiple users are logged
> in concurrently (each with his/her own X session) but only one user is
> active at any time.  I don't really understand where that behavior 
> would fit into the Xserver model, so please forgive the vagueness of 
> the question.  I presume that anyone who has used an XP machine in a
> multi-user environment will know what I'm talking about.  I just don't
> know what that feature would be *called* or what program would handle
> it (though I presume it would be X, or something like GDM, but I don't
> know what to look for).
> 
> -Brandon
> 
> (This concludes the Ultimate Desktop series)
> 
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug


I'm not sure exactly what you are looking for, but I think what I do
might also help.  I have a single Linux box, but at any time I could
find any one of the 4 computer users in the house logged on.  I do use
GDM for log-in, but something different for "switch user".

Instead of logging them out to do my work, I first switch to a virtual
terminal (CTRL-ALT-F# -- usually 2,or 3) Then I log-in
(username/password stuff) then run a script I found on the net
somewhere, that I saved as /usr/local/bin/multiX.  The beauty of this
script is that I never have to remember the odd startx arguments (startx
-- :2 what is up with the double dash then another space, I do not know
of any other arguments being added that way)  or try to find which
screens are open.  I have never tried the GDM feature, so not sure how
they compare, but this way has become very automatic for me.  :-)


[BEGIN SCRIPT]
#!/bin/sh
# Script to start X on another X session on the next available display,
# up to 5 displays.

if [ $# -eq 0 ]   # check to see if arguements are given (color depth)
       then a=24  # default color depth
        else a=$1 # use given arguement
fi

if [ $a -ne 8 -a $a -ne 16 -a $a -ne 24 ]
        then
                echo "Invalid color depth. Use 8, 16, or 24."
        exit 1
fi

for display in 0 1 2 3 4 5    # checks for open display, starts X on
next available
        {
        if [ ! -f "/tmp/.X$display-lock" ]
                then
                        exec startx -- :$display -bpp $a
                exit0
        fi
        }
echo "No displays available."
exit 1

[END SCRIPT]
-- 


More information about the wplug mailing list