Starting X program from Bash script
From: maddman (maddman_75_at_yahoo.com)
Date: 28 Aug 2003 07:03:25 -0700
Hello all. I have a (hopefully) simple question. I'm fairly new to
Bash scripting, but am impressed with what I've seen so far. Seems
very flexible and powerful, which is why I believe what I need won't
be too hard.
Here's my application. I'm setting up some diskless kiosk type
workstations. We do our internet access control by which proxy script
the client is pointed at. For these stations, they need access to a
few limited web sites. The problem is that if one of the users knows
the location of the full-access script, it's simple to put that in
instead. And several of them have figured it out in the past.
So here's where Bash comes in. Have a script that looks at the file
size of the "prefs.js" file in the profile. If it isn't the right
size, a clean copy is put in its place and mozilla is shut down. Then
mozilla is restarted, opening to a page that warns them not to do it
My problem is in restarting mozilla. In the script I just have
This works if I execute it from a konsole window or with the 'run'
command. Setting it up as a cron job however, the detection and kill
on mozilla works, but the new copy of mozilla isn't opened. I'm
thinking I need to redirect the output of hte mozilla line to the
desktop, but have no idea what that command would be.
Also, IIRC cron runs things as root, does it not? I certainly don't
want mozilla opening with root priveleges. Any help greatly