The time now is Thu 20 Jun 2013, 01:42
All times are UTC - 4 |
| Author |
Message |
DMcCunney
Joined: 02 Feb 2009 Posts: 894
|
Posted: Thu 26 Feb 2009, 19:20 Post subject:
Using multiple window managers in Puppy |
|
Puppy currently ships with JWM, a lightweight window manager with a small footprint, but many others are available.
When you startX from the command line, you can specify which one to use, like
and X will start using the window manager you specified, defaulting to jwm if there wasn't a specification on the command line and no stored value from a previous session.
All very well, but there are an assortment of add-ons popular in Puppy that don't work in all environments. For instance, Icewm is a popular window manager because of theming capability, but Icewm doesn't do icons on the desktop. To provide those, Icewm users use a program called idesk. But JWM does do desktop icons, so if you run it, you don't want idesk invoked.
Another popular addon is pwidgets, which provides desktop widgets, but may not behave correctly in all environments. (There are problems with the analog clock widget in XFCE if you let XFCE manage the desktop.)
So it's desirable to run some third party programs on startup only if a compatible window manager is in use. Fortunately, that's not hard to do.
When you run xwin and specify a window manager on the command line, xwin stores the value you specified in a file called /etc/windowmanager. When X is run, it executes the script /root/.xinitrc to set up the environment. .xinitrc looks for /etc/windowmanager, and sets a variable called $CURRENTWM to whatever is in it. We can use this value to do custom setups for different window managers.
In the stock .xinitrc file there's a block starting at line 53:
| Code: |
CURRENTWM="`cat /etc/windowmanager`"
if [ "$CURRENTWM" = "startkde" ]; then
exec startkde
fi
|
which was apparently added to support KDE on Puppy.
I took out the if/then logic, and substituted a case statement:
| Code: |
CURRENTWM="`cat /etc/windowmanager`"
case $CURRENTWM in
afterstep)
# nothing yet
;;
enlightenment)
# run pwidgets
exec fixwidgets &
;;
fluxbox)
# run idesk, wbar, and pwidgets
exec idesk &
exec wbar -jumpf 0.0 -pos top -nanim 3 -zoomf 1.1 -idist 4 -isize 28 -bpress -balfa 0 -falfa 15 &
exec fixwidgets &
;;
fwwm)
# nothing yet
;;
icewm)
# run idesk and pwidgets
exec idesk &
exec wbar -jumpf 0.0 -pos bottom -nanim 3 -zoomf 1.1 -idist 4 -isize 28 -bpress -balfa 0 -falfa 15 &
exec fixwidgets &
;;
jwm)
# run idesk and pwidgets
exec wbar -jumpf 0.0 -pos top -nanim 3 -zoomf 1.1 -idist 4 -isize 28 -bpress -balfa 0 -falfa 15 &
exec fixwidgets &
;;
openbox)
# run pwidgets
exec fixwidgets &
;;
windowmaker)
# nothing yet
;;
xcfe4)
# nothing yet
;;
esac
|
The case statement checks what window manager is being run, and runs the startup programs appropriate for that environment. The framework is easily extensible. The above represents what I have installed, but other things could be substituted. It can also be expanded to perform other tasks. For instance, I'm working on a scheme to have multiple JWM configurations, which might be specified as jwm1, jwm2, jwm3, etc., and the entries for them above would include the code needed to change the setup depending upon which was chosen.
If you use pwidgets, you'll need to remove the entry that installing it places in /root/Startup. If that is present, it is executed globally in all window managers, which is not what we want. We handle that above with "exec fixwidgets &", which is what the Startup entry does.
Needless to say, make a backup copy of your .xinitrc file before hacking. A syntax error may leave X unable to start, and you'll want to copy the backup over your hacked version to restore things to sanity. I created two files - .xinit-ORIG, which was the original unmodified versions, and .xinit-NEW, which I used for development. I simply copied each over as .xinitrc, depending on whether things worked as intended.
The code above is stable on my 4.12 installation, and works as desired, giving me more flexibility in playing with window managers. It may help you as well.
______
Dennis
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6201 Location: Auckland, New Zealand
|
Posted: Fri 27 Feb 2009, 04:16 Post subject:
|
|
Good Howto.
But JWM doesn't do desktop icons - rox filer does. In fact I think this is normally a function of the filer rather than the window manager. Background images however seem to be set by filers and window managers (and other things ). We should also put the code for starting rox into some sort of system like this, as it is kind of pointless when you use xfce or something to have rox setting a background image and icons, and then xfce doing the same thing.
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
DMcCunney
Joined: 02 Feb 2009 Posts: 894
|
Posted: Fri 27 Feb 2009, 10:58 Post subject:
|
|
| disciple wrote: | Good Howto.
But JWM doesn't do desktop icons - rox filer does. In fact I think this is normally a function of the filer rather than the window manager. Background images however seem to be set by filers and window managers (and other things ). We should also put the code for starting rox into some sort of system like this, as it is kind of pointless when you use xfce or something to have rox setting a background image and icons, and then xfce doing the same thing. |
Good point, and thank you.
As it happens, one of the things I'm looking at now is what sets the background image, and where the information is stored. I'd like to have different background images for different WMs.
Where does Rox get started? It sounds like it should be possible to specify which filer is used, as well as which background image.
______
Dennis
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6201 Location: Auckland, New Zealand
|
Posted: Fri 27 Feb 2009, 18:39 Post subject:
|
|
In /root/.xinitrc
| Code: | | rox -p /root/Choices/ROX-Filer/PuppyPin |
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
DMcCunney
Joined: 02 Feb 2009 Posts: 894
|
Posted: Fri 27 Feb 2009, 18:53 Post subject:
|
|
| disciple wrote: | In /root/.xinitrc
| Code: | | rox -p /root/Choices/ROX-Filer/PuppyPin |
|
Ah. Thank you.
"You are trapped in a maze of twisty little shell scripts, all different."
______
Dennis
|
|
Back to top
|
|
 |
`f00

Joined: 06 Nov 2008 Posts: 801 Location: the Western Reserve
|
Posted: Sun 15 Mar 2009, 01:57 Post subject:
Subject description: demi-illustr8ted |
|
Here's how I set backgrounds in:
1) AfterStep (I use Puppyluvr's 'full-boat' AfterStep-2.2.8-i486.pet, although it seems to have some minor menu issues with the most recent pups) uses a gui process to select and store user backgrounds
a) mainmenu->Desktop->Picture Manager is the tool to use initially for making/selecting a bg
b) after this is done mainmenu->Desktop->Pictures->User Backgrounds is the menu selector
c) /root/.afterstep/backgrounds is the dir for user-bg files (AS offers some interesting options like creating a .xml file for the bg, this is actually how the 'default' firstrun bg is done)
fullsize 452kb screenie
2) Blackbox (depending on version paths may differ slightly) seems best served by console
| Code: | | bsetbg /usr/local/share/blackbox/Backgrounds/<yourfile> |
3) Fluxbox (at least how I use Steve S' pupflux412-new puplet) seems to work best by selecting from the mainmenu->Desktop->Wallpaper setter-><select directly from the menu>, the dir is the 'usual' /usr/share/backgrounds but if selected by the mainmenu in Flux, the selection is only for Flux
fullsize 485kb screenie
4) Jwm .. sometimes the mainmenu->Desktop->Wallpaper setter doesn't work so well (or the driveicon deal for that matter in P4.12-PFlux, which is what I was using recently .. most pups may have some minor anomalies depending on what the user has done in the way of modifications&etc), the old rightclick-on-a-Rox-desktop-'icon'->set backdrop is pretty reliable - plus sometimes I copy the selected bg out of /usr/share/backgrounds to /root/Choices and rename it as ROX-background.jpg if it's not already there as such. Generally I don't switch bgs all that much once I find one that fits the 'personality' of the pup/wm.
How I usually dispose of the /root/Choices/ROX-background.jpg is a simple console
after Exit to Prompt (from Jwm) and or fluxbox or afterstep, the Rox pinboard/bg may be retained if desired for these other wms (but it may get odd trying to switch to a unique 'wm bg' - I find it simplest to let each wm have their own bg and go with a fairly clean desk in all). Blackbox is usually my first step out of Jwm, after getting the BB bg I usually trim a few processes with pprocess and use the BB menu to choose another wm (uncomment and modify /usr/local/share/blackbox/menu.base then BB refresh-menu - very simple and effective, but take the usual care when editing) my 'basic' as follows (labels in menus may be different in screenshots)
| Code: | [begin] (Blackbox)
[exec] (BB menu-refresh) {blackbox_menu_refresh}
[submenu] (BB Styles) {...}
[stylesdir] (/usr/local/share/blackbox/styles)
[end]
[workspaces] (BB workspaces)
[config] (BB config)
# [reconfig] (Reconfigure)
[restart] (restart BB)
[submenu] (change..) {...}
[restart] (to AfterStep) {afterstep}
# [restart] (Start Enlightenment) {enlightenment}
[restart] (to Fluxbox) {fluxbox}
# [restart] (Start FVWM) {fvwm}
[restart] (to Jwm-nopin*) {jwm}
# [restart] (Start KWM) {kwm}
# [restart] (Start TWM) {twm}
# [restart] (Start WindowMaker) {wmaker}
[end]
[exit] (Exit to Prompt)
[end] | .. Fluxbox menu may be similarly modified (but do make backup(s) when dealing with Fluxbox, strange events may catch the unwary unawares, it's a bit different than BB).
menu restart in .. (BB) 35kb
menu change.. (Fluxbox) 147kb,Flux' minimenuicons need a lil' fixin' possibly
Switching - Jwm seems best served by Exit to Prompt to switch to other wms or to get back to a full-service Rox pinboard in Jwm - the 'boxes can be freely switched via their menus - AS may be entered freely from a 'box menu but the AS mainmenu Close session is basically an Exit to Prompt.
Conveniences - two things I always like to have (therefore in my /root/Startup dir as a script to start'em) when doing multiple wms .. Wbar and Conky (or now a kind of limited use of pwidgets)
a) Wbar can be a godsend if the menu of the wm you're using goes funky or is missing an app or two and you're not a master of the console .. it's tidy, good-looking, fairly easy to 'fig and works in most wms. Only a launcher, but it's very good at what it does.
b) Conky/pwidgets as I use it is only for basic info I like to have at-a-glance. Not sure if fixwidgets still tries to do anything with PuppyPin (kind of an issue if there is no PuppyPin or Rox-background, so I start it with /root/.pwidgets/pwidgets-exec in that script in Startup and so far it seems to work oki in all the four wms mentioned above)
what happens when Jwm is 'restart'ed from BB &etc 77kb
a 'proper' return to Jwm 159kb
Final note - Keep It Simple until you gain familiarity with the character of various wms - Flux in particular can be overwhelming visually, AS has many features and setups that may not be familiar, BB is .. well, it's BB
ps - the pupplet used here in these examples was P4.12,PupFlux with only Xvesa display (Xorg would not perform for me so little point in trying jwm-beta on it)
|
|
Back to top
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|