...making Linux just a little more fun!

<-- 2c Tips | TAG Index | 1 | 2 | 3 | 4 | Knowledge Base | News Bytes -->

The Answer Gang

By Jim Dennis, Karl-Heinz Herrmann, Breen, Chris, and... (meet the Gang) ... the Editors of Linux Gazette... and You!



(?) Re: Question re; Fvwm xintric

From Jay Hamilton

Answered By: Thomas Adam

The following was an e-mail sent to me, having read my article in the linuxgazette from a few months ago. -- Thomas Adam

My new.xintric file says

xterm -geometry 80x24+2211+1792 -title FvwmConsole -name FvwmConsole -e
/usr/X11R6/lib/X11/fvwm2/FvwmConsoleC &
/usr/X11R6/bin/xconsole -notify -nostdin -verbose -exitOnFail -ic
-geometry 384x110+0-0 &
qinternet -geometry 0x0+532+781 &
fvwm
DeskTopSize 5x5
(!) [Thomas] I see you're using FvwmSaveDesk or FvwmDesk modules to save the layout of your windows? No?

(?) That last bit I added hoping that it would make it a default however it seems to have no effect at all.

(!) [Thomas] Not quite. What you're wanting to do is have all those applications start, and then load fvwm. However, there are two things which you must be aware of:
*) new.xinitrc is only specific if you have certain Fvwm modules loaded. If you don't the file is not read [1]. *) The last two commands you have there -- "fvwm" and "DesktopSize 5x5" are out of context here.

(?) So- I must misunderstand something. I believed that I could add instructions to this file and they would become the default that didn't happen so I got it wrong.

(!) [Thomas] What you want, then (and you were close) is to move all your commands to ~/.xsession [2], so that it looks something like this:

See attached sample-xinitrc.txt

Having saved that file as "~/.xsession", you should ensure that you run the command "chmod 700 ~/.xsession". What this will do is when you login (via startx, or some DM) this file is read and will execute all of the above, including the launching of fvwm.
All that this leaves is the last command you had "DesktopSize 5x5". The reason it was out of context both in your modification of 'new-xinitrc' and indeed any ~/.x{session,init} file is because it is specific to Fvwm. That is, only Fvwm itself will understand what you're meaning. It is not a command. You should therefore add "DesktopSize 5x5" somewhere within your ~/.fvwm/fvwm2rc file.

(?) Also when in xconsole I type FvwmBacker Black [or black] the screen background turns blue- yet I can get a black background via gnome settings.

(!) [Thomas] I am not planning to cover the use of Modules for a while yet. However, there are a number of ways you can do what you want. If you want all of your pages for all of your desks to have the same colour, then you need to do two things:
1. In your ~/.fvwm/fvwm2rc file, you'll see a function called 'StartFunction' and it looks like something like this:
AddToFunc StartFunction
+ I Exec exec xsetroot -solid gray66
+ I Test (Init) Module FvwmForm Login
+ I Test (Init) Exec exec unclutter
When fvwm loads, apart from locating its configuration file, one of the first things it does is to look for this function and execute whatever is within it. So here, you can see that I have told it to load "xsetroot" (which does more or less what FvwmBacker does), and a few other things. What you want is to add to this definition and add:
+ I Module FvwmBacker
for your own StartFunction definition. If you're wondering what the syntax means, then:
"+". I think of as meaning "belonging to" a function or definition.
"I". This stands for 'Immediate' and means that it will execute
immediately once the function is invoked. There are other types of
attributes which I won't cover here.
"<command>". Whatever follows after that is a command to be run.
But this is not enough -- all you have done by adding the above line to "StartFunction" is tell Fvwm to load the module. You haven't told it what to do with the module. For that, we have to configure the module. The way that is done is like this:
DestroyModuleConfig FvwmBacker: *
*FvwmBacker Command (Desk *, Page * *) -solid grey66
You can add that directly into the file as-is if you like. What it does is sets every page on every desk to a solid colour of darkgrey (grey66). You can replace 'grey66' with whatever colour you want.
When you have done all that, restart fvwm, and all (hopefully) should be well.
Hope That Helps,
[1] This is only if new.xinitrc is not a symlink to ~/.xinitrc or ~/.xsession, of course.
[2] The reason why I'm advocating ~/.xsession over ~/.xinitrc is that startx will default to ~/.xsession if no ~/.xinitrc file exists. This has advantages when using XDM as a display manager, etc.

This page edited and maintained by the Editors of Linux Gazette
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/


Each TAG thread Copyright © its authors, 2004

Published in issue 108 of Linux Gazette November 2004

<-- 2c Tips | TAG Index | 1 | 2 | 3 | 4 | Knowledge Base | News Bytes -->
Tux