mikshaw
Group: Members
Posts: 4856
Joined: July 2004 |
|
Posted: June 13 2006,19:34 |
|
kerry: Please be careful about typos =o) The line gqview -s -f /home/dsl/pics && will likely cause trouble (or at least it serves no purpose) because "&&" means "If the prior command is successful, then run the following command". There is nothing following "&&", so no command will run. I can't say if it will cause an error or if it will just do nothing, waiting for input.
arkroan: Case is a fairly commonly used command that performs different actions depending on the content of whatever immediately follows the word "case". It's the equivalent of "if something; do this; elif something else; do that; else do the other thing; fi", but it's just easier and cleaner than a pile of elifs.
In the default .xinitrc case, the $DESKTOP variable is checked to see what is listed in $HOME/.desktop, and is compared to each section of the case block, starting from the top and continuing until it finds a match. Each section of a case block starts with an expression followed by ")", then the commands to run if the expression matches $DESKTOP, and ends with ";;". Case often contains a "*" as the last expression, which is a wildcard that matches anything, including a nil value. This is useful if you need to run a command if there is no match. The "jwm" string is one of those expressions. If "jwm" is listed after "wm: " in /home/dsl/.desktop, those commands following it will be run and jwm will be started as the window manager.
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|