first of all, the easiest way is by using xwmconfig, or if you prefer the full path /usr/X11R6/bin/xwmconfig. pkgtool is a configuration tool for the system. xwmconfig only changes the default gui of a user and is allowed to be executed by a user, not only root.
If this is used by a user and not root it will not change the default of the system. It will create ( or alter if it exists) the file .xinitrc in the home directory of a user. Read the man page for more info:
Anyway if this does not satisfy your needs either you may have a default GUI (lets say KDE) for a user and start an alternative gui by giving the full path to startx of the executable of the gui:
Code:
startx /usr/X11R6/bin/blackbox
will start blackbox no matter what the default GUI is for this user.
If you want an even simplier approach you can create a startx script in /usr/local/bin/startx that will take some options and then execute the real startx (/usr/X11R6/bin/startx). For example you may create a script /usr/local/bin that by giving
will execute
Code:
/usr/X11R6/bin/startx /opt/kde/bin/startkde
.
If a /usr/local/bin/startx script exists, by giving the command startx this will be executed and not the
/usr/X11R6/bin/startx. The system checks /usr/local/bin before it checks /usr/X11R6/bin/. The order the systems checks for paths is:
/usr/local/bin
/usr/bin
/bin
/usr/X11R6/bin
/usr/games
/opt/www/htdig/bin
/usr/lib/java/bin
/usr/lib/java/jre/bin
/opt/kde/bin
/usr/lib/qt/bin
/usr/share/texmf/bin
.