RE: Launching/Switching to another colour depth from gdm screen



It turned out to be simple.

The user logs in once with gdm.

After they are in, when they need 8 bit they click on an icon that launches a script:

######################################
#!/bin/bash
#
# usage: switchx
#
# requires: switchto - with owner root and setuid root
#       otherwise cannot open the console
#
XCOMMAND="xinit ~/.xinitrc.8bit -- :1 vt8 -depth 8"
XLOCKFILE="/tmp/.X1-lock"

if [ -a $XLOCKFILE ]; then
        switchto 8
else
        $XCOMMAND
fi
#
######################################

On linux this requires the "open" package.
The permissions need to be changed for "switchto" from that package if a non-root user is going to be able to get to the console. See the linux quake HOWTO for more details.

Regards,
	David Boston



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]