Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

.xinitrc mod to select window manager/desktop environment

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
triad
Apprentice
Apprentice
User avatar
Posts: 234
Joined: Thu Jul 10, 2003 2:49 pm
Location: Dark Side of the Moon

.xinitrc mod to select window manager/desktop environment

  • Quote

Post by triad » Mon Sep 08, 2003 7:36 pm

After many hours of digging around on this forum and googling to death finally found a pretty easy way to select what type of window manager/desktop environment at startx without using a login manager. Basicaly created .xinitrc with this code in it.:

Code: Select all

#!/bin/bash
#
# .xsession/.xinitrc
#
# choose a window manager
#

defaultwm=kde
#set the window manager to $1 if it was supplied
windowmgr=${1:-$defaultwm}
#start the respective window managers
case ${windowmgr} in
kde|kwm|kdestart)
WINDOWMANAGER=startkde
;;
fluxbox)
WINDOWMANAGER=fluxbox
;;
fluxbox_main)
WINDOWMANAGER=fluxbox_main
;;
startxfce4)
WINDOWMANAGER=startxfce4
;;

*) WINDOWMANAGER=windowmgr # default for unknown wm's
esac

exec $WINDOWMANAGER
so at command prompt can type:

Code: Select all

startx windowmanager

where windowmanager is your window manager/desktop environment as specified in script..

I found this useful because I use another x-display to watch videos on my TV via Nvidia TV-out and I wanted to start another instance of Fluxbox without having all my normal startup items specified in .xinitrc appearing on second display. so in my case what I did was create a script called fluxbox_main that has this:

Code: Select all

xscreensaver &
gkrellm2 -w &
bbrun &
amsn &
fluxbox
I put this in my /usr/bin directory

so then at command prompt i would just type

Code: Select all

startx fluxbox_main
This gets me into X with fluxbox and all my startup items going.

Once in this session I have a menu item:

Code: Select all

startx fluxbox -- :1 -layout TV vt8
This opens Session for TV viewing without all the startup stuff.

Hope this makes sense.

Triad
It's not the size of your processor that matters... But how you use it!
Top
OneOfOne
Guru
Guru
User avatar
Posts: 368
Joined: Wed May 28, 2003 11:55 pm
Contact:
Contact OneOfOne
Website

  • Quote

Post by OneOfOne » Thu Sep 11, 2003 5:16 am

i love it :) 8)
peace
Top
Post Reply

2 posts • Page 1 of 1

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic