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

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



I think the problem is with the $HOME , since the script is run as
root, $HOME is for /root not the user home directory.
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 &
   > 
   > #######################################################
   > 
   > -- 



Reply to: