Session Manager? - Slackware

This is a discussion on Session Manager? - Slackware ; Recent posts here made me think of session managers. (Is xdm a session manager?) So, I thought I would *generously* volunteer how I get by without one. I'm talking here about how I invoke my choice of gui. I wrote ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Session Manager?

  1. Session Manager?

    Recent posts here made me think of session managers. (Is xdm a session
    manager?)

    So, I thought I would *generously* volunteer how I get by without one.
    I'm talking here about how I invoke my choice of gui.

    I wrote script ~/choogui:

    # When $2 is blank, this script makes link
    # .xinitrc -> xinitrc.$1
    # When $2 is non-blank
    # .xinitrc -> $2/xinitrc.$1

    dir=`dirname $0`
    rm $dir/.xinitrc

    if [ "$2" = "" ]; then

    ln -s $dir/xinitrc.$1 $dir/.xinitrc

    else

    ln -s $2/xinitrc.$1 $dir/.xinitrc
    fi

    startx

    To invoke Fvwm2 I do this:

    ~/choogui fvwm2 /var/X11R6/lib/xinit

    To invoke KDE I do this:

    ~/choogui kde /var/X11R6/lib/xinit

    And similarly for the other interfaces. (I'm using Slackware 10.2, by
    the way. For other versions you may possibly have to use a different
    dir name for $2 above.)

    Or to simplify the invocation make a copy of files
    /var/X11R6/lib/xinit/xinitrc.fvwm2, etc. at ~. This has the added
    advantage that you can customize the copies. I, for example like to
    set my mouse rate and sound levels before starting a gui

    xset m 2/3
    rexima ...

    Then with the copies in ~ you can do

    ~/choogui fvwm2

    or

    ~/choogui kde

    to start the gui of your choice.

    Or you can always use "startx" to invoke whatever was last invoked by
    "~/choogui".

    Does anyone do it like this? Or am I blazing a trail in the
    wilderness?

    -Joe Rosevear

  2. Re: Session Manager?

    On 22 Dec 2007 19:05:33 GMT
    "Joseph H. Rosevear" wrote:

    > Recent posts here made me think of session managers. (Is xdm a session
    > manager?)
    >
    > So, I thought I would *generously* volunteer how I get by without one.
    > I'm talking here about how I invoke my choice of gui.
    >
    > I wrote script ~/choogui:
    >

    ....
    >
    > ~/choogui fvwm2
    >
    > or
    >
    > ~/choogui kde

    ....
    >
    > Does anyone do it like this? Or am I blazing a trail in the
    > wilderness?


    Many years ago somebody here suggested another way to do this.
    It looks approximately this way:

    1. Create ~/.xinitrc
    The file may look, e.g., this way:

    #!/bin/sh
    case $1 in
    blackbox)
    ~/.bbtools/xinitrc.blackbox
    ;;
    kde)
    /etc/X11/xinit/xinitrc.kde
    ;;
    fvwm)
    /etc/X11/xinit/xinitrc.fvwm2
    ;;
    esac
    # EOF

    2. Create aliases in ~/.bashrc
    For example,

    alias bb='xinit blackbox -- -nolisten tcp'
    alias kde='xinit kde -- -nolisten tcp'
    ....

    Thus, starting KDE is just a matter of typing

    $ kde

    and starting blackbox with all the stuff put in
    ~/.bbtools/xinitrc.blackbox is as simple as

    $ bb

    Regards,
    Mikhail

  3. Re: Session Manager?

    On Sat, 22 Dec 2007 19:05:33 +0000, Joseph H. Rosevear wrote:

    > Recent posts here made me think of session managers. (Is xdm a session
    > manager?)


    No, xdm is a display manager.

    >
    > So, I thought I would *generously* volunteer how I get by without one.
    > I'm talking here about how I invoke my choice of gui.
    >
    > I wrote script ~/choogui:
    >
    > # When $2 is blank, this script makes link
    > # .xinitrc -> xinitrc.$1
    > # When $2 is non-blank
    > # .xinitrc -> $2/xinitrc.$1
    >
    > dir=`dirname $0`
    > rm $dir/.xinitrc
    >
    > if [ "$2" = "" ]; then
    >
    > ln -s $dir/xinitrc.$1 $dir/.xinitrc
    >
    > else
    >
    > ln -s $2/xinitrc.$1 $dir/.xinitrc
    > fi
    >
    > startx
    >
    > To invoke Fvwm2 I do this:
    >
    > ~/choogui fvwm2 /var/X11R6/lib/xinit
    >
    > To invoke KDE I do this:
    >
    > ~/choogui kde /var/X11R6/lib/xinit
    >
    > And similarly for the other interfaces. (I'm using Slackware 10.2, by
    > the way. For other versions you may possibly have to use a different
    > dir name for $2 above.)
    >
    > Or to simplify the invocation make a copy of files
    > /var/X11R6/lib/xinit/xinitrc.fvwm2, etc. at ~. This has the added
    > advantage that you can customize the copies. I, for example like to
    > set my mouse rate and sound levels before starting a gui
    >
    > xset m 2/3
    > rexima ...
    >
    > Then with the copies in ~ you can do
    >
    > ~/choogui fvwm2
    >
    > or
    >
    > ~/choogui kde
    >
    > to start the gui of your choice.
    >
    > Or you can always use "startx" to invoke whatever was last invoked by
    > "~/choogui".
    >
    > Does anyone do it like this? Or am I blazing a trail in the
    > wilderness?
    >
    > -Joe Rosevear



  4. Re: Session Manager?

    "Joseph H. Rosevear" wrote:
    > Does anyone do it like this? Or am I blazing a trail in the
    > wilderness?


    There are many ways to do this. The way I have done it since Slackware 8
    is to start kdm as the last thing to do from /etc/rc.d/rc.local.

    Kdm has a menu to choose window manager, the choice is later done by the
    script /etc/X11/xdm/Xsession. Some people prefer to use runlevel 4 to run
    kdm. I still prefer to start kdm from rc.local as that still gives me all
    the virtual consoles that I want with key strokes like ctrl-alt-f1.

    regards Henrik
    --
    The address in the header is only to prevent spam. My real address is:
    hc1(at)poolhem.se Examples of addresses which go to spammers:
    root@localhost postmaster@localhost


  5. Re: Session Manager?

    Joseph H. Rosevear wrote:
    > Recent posts here made me think of session managers. (Is xdm a session
    > manager?)
    >
    > So, I thought I would *generously* volunteer how I get by without one.
    > I'm talking here about how I invoke my choice of gui.
    >
    > I wrote script ~/choogui:
    >
    > # When $2 is blank, this script makes link
    > # .xinitrc -> xinitrc.$1
    > # When $2 is non-blank
    > # .xinitrc -> $2/xinitrc.$1
    >
    > dir=`dirname $0`
    > rm $dir/.xinitrc
    >
    > if [ "$2" = "" ]; then
    >
    > ln -s $dir/xinitrc.$1 $dir/.xinitrc
    >
    > else
    >
    > ln -s $2/xinitrc.$1 $dir/.xinitrc
    > fi
    >
    > startx


    There is already a script included in slackware to select one of the
    installed window managers as the default one: /usr/bin/xwmconfig

    The manpage:

    XWMCONFIG(1) XWMCONFIG(1)

    NAME
    xwmconfig - choose a default window manager for X.

    SYNOPSIS
    xwmconfig

    DESCRIPTION
    xwmconfig provides a menu of the window managers available on the
    machine so that you may choose one of them to use when X is started
    with "startx".

    When run by root, it sets the symbolic link /etc/X11/xinit/xinitrc,
    which selected the default system-wide window manager to use for X,
    and also creates a /root/.xinitrc file with the same window manager
    selected (perhaps suitable to move into /etc/skel/).

    When run by a non-root user, xwmconfig writes out a $HOME/.xinitrc
    file, allowing the user to choose their own default window manager
    (possibly overriding the one chosen as a system default).

    AUTHOR
    Patrick J. Volkerding

    Slackware Version 8.1.0 31 May 2002 XWMCONFIG(1)



    Regards,

    Kees.

    --
    Kees Theunissen.

+ Reply to Thread