[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: netscape and guest account
On Fri, 23 Feb 2001, Francis A. Holop wrote:
> i would like to limit the launching of netscape to one process/user.
> quite normal i believe. let them learn alt-n
>
> well some script magic could help here.
Yeah, you could do a little wrapper for this. I've got one that
checks hostname, and if you're try to run netscape on one of the
listed servers, tells you not to, recommends a specific host that
was set up for remote X apps, and exits.
You could check for $HOME/.netscape/lock, which should be a
(broken) symlink to IP:PID. You could also do some fiddling
with `ps | grep`. Be aware of the dns helper process.
ronin:~$ ps aww | grep [n]etscape
3910 C0 I 0:00.02 (dns helper) (netscape)
27422 C0 S 0:09.14 /usr/local/netscape/netscape
If you want to get fancy, you could check both, and try to do some
automatic reaping of netscape processes without controlling terminals
(maybe with the x flag to ps).
> now a special case (a * task in math ;-)
>
> i have a user `guest', which can login twice because
> of the server and an X terminal to the server
> (the user guest defined at the server).
>
> so netscape can be run twice, BUT once for each.
For this, I'd say go with the ps method. You could generalize it
to however many X displays you've got. If $NS_COUNT >= N, then
say "too many netscapes". `grep -c` could be handy for this.
Although, in general, multiple netscapes run by the same user tend
to cause problems. I know they cause problems with mailchecking,
and I think they cause problems with things like saving bookmarks.
+------------------------------------------------------------------------+
| Dave Taira <bodhi@hagakure.org> 2001.02.23/10:09:57 PST |
| Morlock for Hire |
+------------------------------------------------------------------------+
| "someday I hope to be photographed to be the big eye on a box of |
| photoshop" --Andr00 |
+------------------------------------------------------------------------+