Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 27 Nov 2014, 09:12
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
window managers - the hotswap option
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message

Joined: 06 Nov 2008
Posts: 809
Location: the Western Reserve

PostPosted: Wed 28 Sep 2011, 08:22    Post_subject:  window managers - the hotswap option
Sub_title: a simple guide

With some window managers there is an option to 'hotswap' or restart to another wm directly, without closing the X 'desktop' environment or loaded applications. While this may seem quite convenient, it's important to be aware of various factors that can make for complications if you do so. Almost always is it preferable to make a 'clean break' by exiting X and starting a wm fresh, but this howto is for those who may wish to try the convenience of the hotswap option (and also find the limitations by experience).

Among the wms that I'ved tried that support a full hotswap interchange (you can freely swap back and forth between them) are blackbox, cwm, fluxbox, startfluxbox (option), fvwm, fvwm-themes-start, icewm, pekwm, twm and wmakerº. It's fairly simple for most of these to make a submenu in the base part of the rootmenu (or alternate menu) for the commands. Follow each wm's menu rules for doing this (syntax and so on).

Example snippets (your setup may vary!)

in blackbox:
[submenu] (hotswap) {to..}
[restart] (cwm) {cwm}
[restart] (fluxbox) {fluxbox}
[restart] (startfluxbox) {startfluxbox}
[restart] (fvwm) {fvwm}
[restart] (fvwm-themes) {fvwm-themes-start}
[restart] (icewm) {icewm}
[restart] (pekwm) {pekwm}
[restart] (twm) {twm}
[restart] (wmaker) {wmaker}

in cwm (kybd-only so far):
CM(Ctrl+Alt)-w .. gives the 'dialogue', next key input gives list ('b', for example)
.. select from the list ('blackbox', for example) .. enter<key> to hotswap
(other variations may be doable, see the docs on cwm&cwmrc)

in fluxbox with icon(symlink) support:
[submenu] (hotswap) {to..} </root/.fluxbox/ico/mini-run.png>
[restart] (blackbox) {blackbox} </root/.fluxbox/ico/mini-start.xpm>
[restart] (fvwm) {fvwm} </root/.fluxbox/ico/mini-start.xpm>
[restart] (fvwm-themes) {fvwm-themes-start} </root/.fluxbox/ico/mini-start.xpm>
[restart] (icewm) {icewm} </root/.fluxbox/ico/mini-start.xpm>
[restart] (pekwm) {pekwm} </root/.fluxbox/ico/mini-start.xpm>
[restart] (twm) {twm} </root/.fluxbox/ico/mini-start.xpm>
[restart] (wmaker) {wmaker} </root/.fluxbox/ico/mini-start.xpm>

in fvwm (section of .fvwm2rc):
DestroyMenu MenuFvwmQuitVerify
AddToMenu MenuFvwmQuitVerify "$[gt.quit fvwm?]" Title
+ "&Q. $[gt.def quit]" Quit
+ "" Nop
+ "&r. $[gt.reload]" Restart
+ "" Nop
+ "&b. $[gt.hotswap to] blackbox" Restart blackbox
+ "&f. $[gt.hotswap to] fluxbox" Restart fluxbox
+ "&s. $[gt.hotswap to] startfluxbox" Restart startfluxbox
+ "&v. $[gt.hotswap to] fvwm-themes" Restart fvwm-themes-start
+ "&i. $[gt.hotswap to] icewm" Restart icewm
+ "&k. $[gt.hotswap to] pekwm" Restart pekwm
+ "&t. $[gt.hotswap to] twm" Restart twm
+ "&w. $[gt.hotswap to] wmaker" Restart wmaker
+ "" Nop
+ "&P. $[gt.plogout]" Exec exec "plogout"

in fvwm-themes (it gives some in the menu, change as needed)

in icewm (template):
menu "hotswap to.." mini-run.png {
restart "blackbox" mini-start blackbox
restart "fluxbox" mini-start fluxbox
restart "startfluxbox" mini-start startfluxbox
restart "fvwm" mini-start fvwm
restart "fvwm-themes" mini-start fvwm-themes-start
restart "pekwm" mini-start pekwm
restart "twm" mini-start twm
restart "wmaker" mini-start wmaker

in pekwm:
Submenu = "hotswap" {
Entry = "blackbox" { Actions = "RestartOther blackbox" }
Entry = "fluxbox" { Actions = "RestartOther fluxbox" }
Entry = "startfluxbox" { Actions = "RestartOther startfluxbox" }
Entry = "fvwm" { Actions = "RestartOther fvwm" }
Entry = "fvwm-themes" { Actions = "RestartOther fvwm-themes-start" }
Entry = "icewm" { Actions = "RestartOther icewm" }
Entry = "twm" { Actions = "RestartOther twm" }
Entry = "wmaker" { Actions = "RestartOther wmaker" }

in twm (section of system.twmrc):
menu "change"
"change" f.title
"showiconmgr" f.showiconmgr
"reload twm" f.restart
"hotswap to blackbox" f.startwm "blackbox"
"hotswap to fluxbox" f.startwm "fluxbox"
"hotswap to startfluxbox" f.startwm "startfluxbox"
"hotswap to fvwm" f.startwm "fvwm"
"hotswap to fvwm-themes" f.startwm "fvwm-themes-start"
"hotswap to icewm" f.startwm "icewm"
"hotswap to pekwm" f.startwm "pekwm"
"hotswap to wmaker" f.startwm "wmaker"
"plogout" f.exec "plogout &"

in wmaker (excerpt-edit of Dima's wm-xdgmenu):
("save session", SAVE_SESSION),
("clear session", CLEAR_SESSION),
("reload wmaker", RESTART),
("hotswap to blackbox", RESTART, blackbox),
("hotswap to fluxbox", RESTART, fluxbox),
("hotswap to startfluxbox", RESTART, startfluxbox),
("hotswap to fvwm", RESTART, fvwm),
("hotswap to icewm", RESTART, icewm),
("hotswap to pekwm", RESTART, pekwm),
("hotswap to twm", RESTART, twm),
("plogout", EXEC, "plogout")
ºnote! fvwm-themes-start will NOT work in wm-xdgmenu,
it will corrupt and reset to Dima's OEM menu Shocked

In general, any user-selected background will carry over (unless specified in the hotswapped-to wm theme or style). Most of these wms will gracefully yield to the swapped wm - however some functions may or may not terminate (be aware and learn by experience). If you use Restart X server, you will return to the wm of record in /etc/windowmanager (where you were before you started hotswapping Wink ).

Back to top
View user's profile Send_private_message 

Joined: 11 Aug 2009
Posts: 1924
Location: Israel, somewhere in the beautiful desert

PostPosted: Wed 28 Sep 2011, 17:25    Post_subject:  

Nice stuff! I was able to switch from Window Maker to E16 without killing all my applications.

This thread is extremely useful for puplet developers.

My homepage
Back to top
View user's profile Send_private_message Visit_website MSNM 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0540s ][ Queries: 11 (0.0032s) ][ GZIP on ]