[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] Bash Script won't work in fvwm menu.



On Sat, Jan 13, 2001 at 08:44:59AM -0500, Ayman Haidar wrote:
> I think the problem is with the $HOME , since the script is run as
> root, $HOME is for /root not the user home directory.

hmmm, why is it run as root?
I don't know too much about fvwm2 -- it's quite a long time since I
last used it -- but my current window manager (wmx) runs programs
under my regular UID.
Anyhow, because of Netscape's legendary 'stability', I'd rather not
have it run as root... :)

Cheers,
Erdmut


> try to give it the absolute directory and see. or try to make the
> script owned by the user.
> 
> good luck
> 
> Ayman
> 
> Once upon a time ktb (x.y.f@home.com) wrote:
> 
>    > 
>    > I've written the following script which works just fine at the
>    > command line (xterm) but doesn't work when I use it in .fvwm2rc
>    > in a menu -
>    > + "myNetscape"   exec mynet
>    > 
>    > Netscape starts just fine but the lock file and pid aren't killed.
>    > The permissions of /usr/local/bin/mynet -
>    > -rwxr-xr-x    1 root     root
>    > 
>    > What do I need to do to make this work from my menu?
>    > Thanks,
>    > kent
>    > 
>    > 
>    > #######################################################
>    > #!/bin/sh
>    > 
>    > net_pid=$(pidof -s netscape)
>    > lock_file=$HOME/.netscape/lock
>    > 
>    > if [ $net_pid ]
>    >     then
>    > 	kill -9 $net_pid
>    > 	echo -e "\nKilled pid #$net_pid."
>    > fi
>    > 
>    > if [ -L $lock_file ]
>    >     then
>    >     rm $lock_file
>    >     echo -e "\nLockfile  was removed.\n"
>    > fi
>    > 
>    > netscape -no-about-splash &
>    > 
>    > #######################################################
>    > 
>    > -- 
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 

-- 
Erdmut Pfeifer
science+computing gmbh
Hagellocher Weg 71		phone: +49 (0)7071-9457-255
D-72070 Tuebingen		email: e.pfeifer@science-computing.de

-- Bugs come in through open windows. Keep Windows shut! --



Reply to: