Starting X program from Bash script

From: maddman (maddman_75_at_yahoo.com)
Date: 08/28/03


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
again.

My problem is in restarting mozilla. In the script I just have

mozilla http://www.mysite.com/changewarning.html

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
appreciated.



Relevant Pages

  • Re: Re - previous post from MVP secure email addr in external js
    ... I've tried it in both IE and Mozilla. ... Try changing the method used to call the script by removing the language=javascript and just using ... Steve Easton ... window in Mozilla. ...
    (microsoft.public.frontpage.client)
  • Re: something weird
    ... Mozilla just blocks the popup window. ... MSIE 6 pops up script ... When I deny them, MSIE 6 shows the ... Just somebody's sad practical joke. ...
    (microsoft.public.security)
  • script to open a URL in mozilla...
    ... Mozilla fails to load URL's submitted to it from Gnome if a profile is already ... "Select Profile" dialog box because your profile is currently in use. ... argument if there is already a mozilla process running. ... URL string doesn't expand when placed within a sub-argument so a script is ...
    (RedHat)
  • Re: Frame =?ISO-8859-1?Q?=FCberwachen?=
    ... Ausweg bietet eventuell, unter Windows, statt IE zum Darstellen einer lokalen HTML-Datei zu benutzen, eine HTA zu schreiben, da unterliegt Script nicht den Sicherheitseinschraenkungen und kann dann in Frames Dokumente von HTTP Servern laden und darauf zugreifen ... Ansonsten erlaubt Mozilla das Schreiben von Erweiterungen bzw. auch das Benutzen von Erweiterungen wie Greasemonkey ...
    (de.comp.lang.javascript)
  • Re: Mozilla Profile Lock Reappears After Being Deleted
    ... Unfortunately, if I remove the link while Mozilla is open, ... and I am again incessantly prompted to use a new profile ... >> with each new hyperlink. ... > What I finally did was to write a shell script for invoking Mozilla ...
    (comp.os.linux.misc)