Find the answer to your Linux question:
Results 1 to 6 of 6
I have been using the following code in Slackware for quite awhile to supply a window manager of choice after I bring up my vertual terminal. I want to clean ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Mar 2008
    Posts
    287

    [SOLVED] Window managers


    I have been using the following code in Slackware for quite awhile to supply a window manager of choice after I bring up my vertual terminal. I want to clean it up and make it more encompassing. I am sure I borrowed the code from somewhere but don't recall who/where (let me know if you know). The commands all invoke code found at /etc/X11/xinit by copying it to .xinitrc. But some exit weirdly (see selection output) or not at all. I would also like to add olvwm and gnome. For some reason gnome can not be invoked this way (or any other I can find).
    Code:
    # Select and Append Window Manager
    clear
    echo -e ""
    echo -e "\n\n\t\t\t                             " \
            "\n\t\t\t SELECT WINDOW MANAGER:      " \
            "\n\t\t\t ============================" \
            "\n\t\t\t 2) Fvwm                     " \
            "\n\t\t\t B) Blackbox                 " \
            "\n\t\t\t F) Fluxbox                  " \
            "\n\t\t\t G) Gnome   *Unavailable*    " \
            "\n\t\t\t K) KDE                      " \
            "\n\t\t\t M) Mwm     *Uninvokeable*   " \
            "\n\t\t\t S) Sawfish *Unavailable*    " \
            "\n\t\t\t T) Twm     *Exit Hangs-?*   " \
            "\n\t\t\t W) wmaker                   " \
            "\n\t\t\t X) xfce    [Default]        " \
            "\n\t\t\t Q) QUIT                     " \
            "\n\t\t\t                             " \
            "\n\t\t\t Select  Window  Manager     " \
            "\n\t\t\t (2 b f k m t w x q):         \c "
    read wno
    
    echo -e ""
    mw=""
    
    case $wno in
          2) mw="/usr/X11R6/bin/fvwm2"
             cp /etc/X11/xinit/xinitrc.fvwm2    .xinitrc
             ;;
        b|B) mw="/usr/X11R6/bin/blackbox"
             cp /etc/X11/xinit/xinitrc.blackbox .xinitrc
             ;;
        f|F) mw="/usr/X11R6/bin/fluxbox"
             cp /etc/X11/xinit/xinitrc.fluxbox  .xinitrc
             ;;
    #    g|G) mw="" #/usr/X11R6/bin/gnome-session"
    #         cp .xinitrc.gnome                  .xinitrc
    #         ;;
        k|K) mw="/etc/kde"
             cp /etc/X11/xinit/xinitrc.kde      .xinitrc
             ;;
    #    m|M) mw="/usr/X11R6/bin/mwm" 
    #         cp /etc/X11/mwm/system.mwmrc       .xinitrc
    #         ;;
        t|T) mw="/usr/X11R6/bin/twm" 
             cp /etc/X11/xinit/xinitrc.twm      .xinitrc
             ;;
        w|W) mw="/usr/X11R6/bin/wmaker" 
             cp /etc/X11/xinit/xinitrc.wmaker   .xinitrc
             ;;
        q|Q) echo -e "QUITing ..."
             exit
             ;;
     ""|x|X) mw="/usr/X11R6/bin/xfce"
             cp /etc/X11/xinit/xinitrc.xfce     .xinitrc
             ;;
          *) echo -e "ERR (wm): Invalid Request [$wno] ... Exiting"
          exit 1
          ;;
    esac
    
    if [ "$mw" = "" ]
    then echo -e "\n\tService Not Available"
         exit 1
    fi
    
    sleep 3
    exec /usr/X11R6/bin/startx
    If U have any comments/suggestions how to correct/improve I would appreciate them.

  2. #2
    Just Joined!
    Join Date
    Nov 2010
    Posts
    3

    Cool

    Quote Originally Posted by clickit View Post
    I have been using the following code in Slackware for quite awhile to supply a window manager of choice after I bring up my...

    Whoa Maverick... Whoa horsey!

    That's really nice, but those days are gone. Gosh that takes me back to the days of when Ygdrassil was still being published!

    Okay, I gotta hand it to you, that's pretty good improvisation on your part, but completely unnecessary.

    When you boot up your box, simply login, and at the shell prompt enter:

    Code:
    $ xwmconfig
    That's it

    You'll get a nice ncurses based chooser, and whatever window managers you happen to have installed on your system will among the choices, if you installed ratpoison, it will be there, if you have Xfce, and KDE, they will be there too

    I hope that helps

    Enjoy!

  3. #3
    Just Joined!
    Join Date
    Nov 2010
    Posts
    3

    Thumbs down visit this link and see what it looks like :)

    I went ahead and pulled this link from the slackbook: - you should really give it a quick read. There's a lot of goodies in there that will make your life simple

    Well, it's pretty stupid, but the system is saying I can't post the link to you because I don't have 15 posts yet.

    I'm not going to bother spamming the boards just to post one link to help you. So here it is in obfuscated form:

    slackbook-dot-org/html/x-window-system-xwmconfig.html

  4. #4
    Linux User
    Join Date
    Mar 2008
    Posts
    287

    Window managers

    Thanks 4 kind words. I had forgotten about xwmconfig since I don't use it, so I dropped out of my window manager to the login console and tried it. I got the display of content in /etc/X11/xinit like you said but had to type in startx which I'd rather not do after all it is xwindows. The wm I listed allows for other window managers to be incorporated that are not in /etc/X11/xinit.
    Tnx again.
    Last edited by clickit; 05-20-2011 at 08:07 PM.

  5. #5
    Just Joined!
    Join Date
    Nov 2010
    Posts
    3

    Lightbulb

    Quote Originally Posted by clickit View Post
    Thanks 4 kind words. I had forgotten about xwmconfig since I don't use it, so I dropped out of my window manager to the login console and tried it. I got the display of content in /etc/X11/xinit like you said but had to type in startx which I'd rather not do after all it is xwindows. The wm I listed allows for other window managers to be incorporated that are not in /etc/X11/xinit.
    Tnx again.
    No problem

    I like being able to help out.

    Anyway, xwmconfig will automatically be populated with whichever window managers you have installed on your system (GNOME excluded, perhaps - I'm not sure, so you could ask in chan #gsb on Freenode since that is the support chan for gnomeslackbuilds-dot-org).

    If you don't want to run "startx" (meaning that upon boot, your system enters runvelel 3 by default), then you need to boot into runlevel 4 instead.

    This can be set by changing the following line in /etc/inittab from

    Code:
    id:3:initdefault:

    to...

    Code:
    id:4:initdefault:

    One you do that, your machine will boot into the graphical environment instead you having to login, and then run "startx".

    To change your window manager if you're booting to runlevel 4, simply open up an Xterm window and run xwmconfig, the next time you login, the window manager will be the new one you have chosen

    I hope that helps

    Enjoy!

    .

  6. #6
    Linux User
    Join Date
    Mar 2008
    Posts
    287
    Good thought!
    For now will continue to use my method of copying the appropriate files to ~.xinitrc

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •