You are not logged in.
Pages: 1
Hello all,
I'm new to linux and to archlinux and have been spending the past days playing around with it.
I saw somewhere on the net a sh script to start vncserver on init, so I put it in rc.d/vnc.
Then I added to rc.conf
su fileserver -c "/etc/rc.d/vnc"
forgetting to add the "start" parameter to the line.
Next I reboot and the init script freezes for a long time, filesystem failes and i get this line:
/etc/rc.conf: line 97: 902 (or other number) killed /etc/rc.d/vnc
and the line
usage: /etc/rc.d/vnc {start|stop|restart}
many many times..
what to do???
I can't log in to archlinux to nano the rc.conf file.. I tried mounting the harddrive from the liveCD but i the /etc/ directory didn't have my OWN files (only the origiinals..)
I'm clueless. Please help.
Rotem Tamir
Offline
Are you sure that when mounting your root partition for example with
sudo mount /dev/<your partition> /mnt
cd /mnt/etc
you're not finding your own files?
Let us know..
Offline
custom srcipt:
use rc.local
daemon:
just add the daemon name in your daemons array in /etc/rc.conf to start it at boot.
I can't log in to archlinux to nano the rc.conf file.. I tried mounting the harddrive from the liveCD but i the /etc/ directory didn't have my OWN files (only the origiinals..)
there's an option to boot into your _existing_ system.
Offline
You can chroot into your system following the instructions here: http://wiki.archlinux.org/index.php/Kernel_Panics
Last edited by tigrmesh (2008-06-25 15:16:15)
Offline
okay thanks to you all for the very quick replies.
I managed to mount the proper partition and edit rc.conf to delete that line..
But now my question is.. where do I run my command?
I would like my system to run my script located in /etc/rc.d/vnc as "fileserver" user on boottime..
thanks in advance
Offline
"I saw somewhere on the net a sh script to start vncserver on init, so I put it in rc.d/vnc. "
Can you post the script. If its just a random script from the internet then there's a good chance that it won't work without some modification.
Offline
#!/bin/bash
# general config
. /etc/rc.conf
. /etc/rc.d/functions
case "$1" in
start)
stat_busy "Starting vncserver"
su fileserver -c "/usr/bin/vncserver"
if [ $? -gt 0 ]; then
stat_fail
else
add_daemon vnc
stat_done
fi
;;
stop)
stat_busy "Stopping vncserver"
killall Xvnc
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon vnc
stat_done
fi
;;
restart)
$0 stop
sleep 3
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
Offline
Are you running vnc or Xvnc?
I have vnc running in display :5 with this daemon
#!/bin/bash
# general config
. /etc/rc.conf
. /etc/rc.d/functions
case "$1" in
start)
stat_busy "Starting vncserver for vncuser"
/bin/su -l vncuser -c "source /etc/profile && source /home/vncuser/.bashrc && /usr/bin/vncserver :5 > /dev/null 2>&1"
if [ $? -gt 0 ]; then
stat_fail
else
add_daemon vncserver_script
stat_done
fi
;;
stop)
stat_busy "Stopping vncserver for vncuser"
/bin/su -l vncuser -c "/usr/bin/vncserver -kill :5 > /dev/null 2>&1"
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon vncserver_script
stat_done
fi
;;
restart)
$0 stop
sleep 3
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
Last edited by Purch (2008-06-26 07:31:40)
Offline
I an running vnc.
My question - is from where do i need to call this sh script?
Offline
Just add the name of the script to the DAEMONS array in /etc/rc.conf.
The script will start vnc as user filesystem
Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!
Offline
thanks, worked like a charm.
Offline
Pages: 1