ps ax|grep -q "[ ]`which X`" || startx
For those who just have to know ([grin] I certainly would, if I were you):
the above expression pipes the list of running processes, which is the
output of the "ps" command, to 'grep', which searches it for the presence of
a running X. To make the search more precise, the command substitution
(`which X`) returns the full pathname to X as the search string. The
character class preceding the search string ([ ]) is there to make 'grep'
ignore its own entry in process table (an old 'grep' trick), and the "-q"
option of 'grep' makes it return only a success/failure exit code instead of
the actual matched string. The OR operator, '||', ties it all together into
an expression that says "either X is running OR (execute) startx".
____________________________________________________
whois.sc
Jared Belkus ([95]jared.belkus from gmail.com)
hi,
i was told to email this address about a useful website:
[96]http://www.whois.sc
I use this whois website a lot because of the information it gives. If you
sign up you can see all the domains that a server has.
thanks,
Jared Belkus
Just in case you're a sysadmin thinking, geez, just how many sites am I
running on this machine again... did I miss any during that upgrade... --
Heather
_________________________________________________________________
This page edited and maintained by the Editors of Linux Gazette
HTML script maintained by [97]Heather Stern of Starshine Technical Services,
[98]http://www.starshine.org/
_________________________________________________________________
Published in Issue 110 of Linux Gazette, January 2005
The Answer Gang
[99]LINUX GAZETTE
...making Linux just a little more fun!
(?) The Answer Gang (!)
By Jim Dennis, Karl-Heinz Herrmann, Breen, Chris, and... ([100]meet the
Gang) ... the Editors of Linux Gazette... and [101]You!
We have guidelines for [102]asking and [103]answering questions. Linux
questions only, please.
We make no guarantees about answers, but you can be anonymous on request.
See also: The Answer Gang's [104]Knowledge Base and the LG [105]Search
Engine
_________________________________________________________________
Contents:
[106]¶: Greetings From Heather Stern
[107](?) HTML page selector
[108](?) AMD64 Shuttle
[109](!) /dev/ub
[110](?) LG in developing countries
[111](?) Linux-friendly hardware
[112](?) installing a pcmcia-network card in Suse 9.0
[113](?) hi howtoopen .tgz or all zip
[114](!) Perl, WWW::Mechanize, and Mailman administration
____________________________________________________
(¶) Greetings from Heather Stern
____________________________________________________
(?) HTML page selector
From Sluggo
Here's a nifty HTML device for previous/next/goto page links similar to MS
Access's record selector.
I had to use the "display:inline" style on the form to keep it from jumping
to the next line. I also used that for the to keep the gray background
from spreading the entire screen width.
Attachments: snapshot3.png, pageLinks.html, pageLinks.css
BTW, the 'iv' program is a great fast-starting image viewer.
See attached [115]pageLinks.html
See attached [116]pageLinks.css
(!) [Ben] _Nice!_ I'll be playing with that gadget. Thanks, Mike! As to
"iv", well...
_______
ben@Fenrir:~$ su -c 'apt-get install iv'
=10= |