Difference between revisions of "How to launch VNC with aMule at Linux boot"

From AMule Project FAQ
Jump to: navigation, search
m (cursive cursive cursive....)
Line 9: Line 9:
 
The ''rm /tmp/.X11-unix/X11'' is there in case the server crashes or your mother/wife removes the power plug cleaning the room... ;-)
 
The ''rm /tmp/.X11-unix/X11'' is there in case the server crashes or your mother/wife removes the power plug cleaning the room... ;-)
  
<pre>
+
''<pre>
 
--------Start of rc.vnc--------
 
--------Start of rc.vnc--------
 
#!/bin/sh
 
#!/bin/sh
Line 33: Line 33:
 
esac
 
esac
 
--------End of rc.vnc--------
 
--------End of rc.vnc--------
</pre>
+
</pre>''
  
 
Modify the following files:
 
Modify the following files:
Line 39: Line 39:
 
In ''/etc/rc.d/rc.local'' add:
 
In ''/etc/rc.d/rc.local'' add:
  
<pre>
+
''<pre>
 
# Start VNC server
 
# Start VNC server
 
if [ -x /etc/rc.d/rc.vnc ]; then
 
if [ -x /etc/rc.d/rc.vnc ]; then
 
. /etc/rc.d/rc.vnc start
 
. /etc/rc.d/rc.vnc start
 
fi
 
fi
</pre>
+
</pre>''
  
 
In ''/etc/rc.d/rc.6'' add:
 
In ''/etc/rc.d/rc.6'' add:
  
<pre>
+
''<pre>
 
# Shut down the VNC server
 
# Shut down the VNC server
 
if [ -x /etc/rc.d/rc.vnc ]; then
 
if [ -x /etc/rc.d/rc.vnc ]; then
 
/etc/rc.d/rc.vnc stop
 
/etc/rc.d/rc.vnc stop
 
fi
 
fi
</pre>
+
</pre>''
  
 
In ''~/.vnc/xstartup'' (in home dir of the user specified above) add (change with your preferred aMule startup script):
 
In ''~/.vnc/xstartup'' (in home dir of the user specified above) add (change with your preferred aMule startup script):
  
 
''amule &''
 
''amule &''

Revision as of 10:40, 14 July 2004

By Frankk

This describes a very simple configuration to launch VNC at linux startup (as a specified user). aMule will be launched automatically with VNC. This will work in Slackware and distro based on the same init method. If someone knows how to modify it to make it work under other distros you are welcome to add it to this page. Thanks.

Add the rc.vnc script to /etc/rc.d

Modify user according to the user running aMule.
The rm /tmp/.X11-unix/X11 is there in case the server crashes or your mother/wife removes the power plug cleaning the room... ;-)

--------Start of rc.vnc--------
#!/bin/sh
#
# Startup/Stop script for vncserver.
#

case "$1" in

'start')
rm /tmp/.X11-unix/X1
/bin/su - user -c "PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin /usr/bin/vncserver :1"
;;

'stop')
/bin/su - user -c "PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin /usr/bin/vncserver -kill :1"
;;

*)
echo "Usage: /etc/init.d/rc.vnc { start | stop }"
;;

esac
--------End of rc.vnc--------

Modify the following files:

In /etc/rc.d/rc.local add:

# Start VNC server
if [ -x /etc/rc.d/rc.vnc ]; then
. /etc/rc.d/rc.vnc start
fi

In /etc/rc.d/rc.6 add:

# Shut down the VNC server
if [ -x /etc/rc.d/rc.vnc ]; then
/etc/rc.d/rc.vnc stop
fi

In ~/.vnc/xstartup (in home dir of the user specified above) add (change with your preferred aMule startup script):

amule &