Subject: FVWM: multiple sessions

From: Tim Hanson <[email-masked]>
Date: Sun, 20 Mar 2005 20:41:39 -0800

I'm trying to figure out something for my laptop.  It has two
environments: One is hooked to the home network, where it has a ready
source of power, access to nfs directories on two desktops, and can
serve vnc to those machines.  The other is as a standalone, sometimes
with a wireless hook to the internet, on battery, and only the internal
hard drive.

The application would go a lot more smoothly with two completely
separate fvwm sessions, since many of the menu choices for one won't
work with the other.

My config file is ~/.fvwm/.fvwm2rc (I know, I'm going to change it RSN).
It is nothing but a series of a half-dozen Read statements, accessing a
set of subdirectories, each with files consisting of one menu's worth of
statements.  This very distributed structure is great for keeping track
of things.  I copied the entire ~/.fvwm directory from one of my
desktops, and it will serve as a basis of the two sessions I'm creating.
The "docked" session will require few changes, since nearly everything
available to the desktops is available to the laptop in this mode.

I copied the directory again to ~/.fvwmundocked, which I intend to
modify for standalone use.  My startx wrapper looks something like this:

#!/bin/sh

# NETlock is the file my startup script creates when I'm hooked to my 
# home network
 
if [ -e /etc/NETlock ] ;then
        FVWM_USERDIR=/home/timh/.fvwm
        export FVWM_USERDIR
        startx fvwm2
else
        FVWM_USERDIR=/home/timh/.fvwmundocked
        export FVWM_USERDIR
        startx fvwm2 -c ~/.fvwmundocked/.fvwm2rc
fi

It seems like that should take care of it, but all 
my Read statements fail because they are in ~/.fvwmundocked.
Do I need to set something else?

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Michelle Konzack <[email-masked]>
Date: Mon, 21 Mar 2005 10:28:35 +0100

Hello Tim,

> Do I need to set something else?

I have in my

  __( '/home/michelle.konzack/.xsession' )______________________________
 /
| HOSTNAME=`cat /etc/hostname`
| 
| if [ $HOSTNAME = "multimedia" ] ; then
|     fvwm -f $HOME/.fvwm-multimedia/config
| else
|     fvwm -f $HOME/.fvwm/config
| fi
 \______________________________________________________________________

and in my rcfiles

  __( '/home/michelle.konzack/.fvwm/config' )___________________________
 /
| read global
| 
| read styles-decorations
| read styles-icons
| read styles-apps
| 
| read /etc/X11/fvwm/menudefs.hook
| read menus/TaskBarStartMenu
| read menus/TaskBarWindowOps
| read menus/IconWindowOps
| read menus/Programs
| read menus/Shells
| read menus/RootMenu
| read menus/Fvwm2help
| read menus/Fvwm2module
| read menus/Fvwm2form
| read menus/Fvwm2script
| read menus/Settings
| read menus/Mount
| read menus/AudioVol
| read menus/CDVol
| read menus/FTPSites
| read menus/WebSites
| read menus/Documents
| read menus/StrasbourgRencontres
| read menus/MailCheck
| 
| read mouse
| read keys

<snip>

 \______________________________________________________________________

and it read from the directory where the "config" is stored.

  __( '/home/michelle.konzack/.fvwm-multimedia/config' )________________
 /
| read $HOME/.fvwm-multimedia/global
| 
| read $HOME/.fvwm-multimedia/styles-decorations
| read $HOME/.fvwm-multimedia/styles-apps
| read $HOME/.fvwm-multimedia/styles-icons
| 
| read /etc/X11/fvwm/menudefs.hook
| read $HOME/.fvwm-multimedia/menus/TaskBarStartMenu
| read $HOME/.fvwm-multimedia/menus/TaskBarWindowOps
| read $HOME/.fvwm-multimedia/menus/IconWindowOps
| read $HOME/.fvwm-multimedia/menus/Programs
| read $HOME/.fvwm-multimedia/menus/Shells
| read $HOME/.fvwm-multimedia/menus/RootMenu
| read $HOME/.fvwm-multimedia/menus/Fvwm2help
| read $HOME/.fvwm-multimedia/menus/Fvwm2module
| read $HOME/.fvwm-multimedia/menus/Fvwm2form
| read $HOME/.fvwm-multimedia/menus/Fvwm2script
| read $HOME/.fvwm-multimedia/menus/Settings
| read $HOME/.fvwm-multimedia/menus/Mount
| read $HOME/.fvwm-multimedia/menus/AudioVol
| read $HOME/.fvwm-multimedia/menus/CDVol
| read $HOME/.fvwm-multimedia/menus/FTPSites
| read $HOME/.fvwm-multimedia/menus/WebSites
| read $HOME/.fvwm-multimedia/menus/Documents
| 
| read $HOME/.fvwm-multimedia/mouse
| read $HOME/.fvwm-multimedia/keys

<snip>

 \______________________________________________________________________

which works finte too. But you can do:

  __( '~/.xsession' )___________________________________________________
 /
| HOSTNAME=`cat /etc/hostname`
| 
| if [ $HOSTNAME = "multimedia" ] ; then
|     fvwm -f $HOME/.fvwm/config.multimedia
| else
|     fvwm -f $HOME/.fvwm/config.default
| fi
 \______________________________________________________________________

and then put the specific configs in Subdirectories 

like:
  _____________________________________________________________________
 /
| ~/.fvwm/config.default
| ~/.fvwm/config.multimedia
| ~/.fvwm/config.default
| ~/.fvwm/key.default
| ~/.fvwm/icons
| 
| ~/.fvwm/default/keys
| ~/.fvwm/default/global
| ~/.fvwm/default/FvwmButton
| ~/.fvwm/default/FvwmTaskbar
| 
| ~/.fvwm/multimedia/keys
| ~/.fvwm/multimedia/global
| ~/.fvwm/multimedia/FvwmButton
| ~/.fvwm/multimedia/FvwmTaskbar
 \______________________________________________________________________

Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/ 
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)