<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://test.amule.szerverem.hu/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://test.amule.szerverem.hu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=62.62.238.87</id>
		<title>AMule Project FAQ - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://test.amule.szerverem.hu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=62.62.238.87"/>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/Special:Contributions/62.62.238.87"/>
		<updated>2026-04-05T16:56:06Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.3</generator>

	<entry>
		<id>http://test.amule.szerverem.hu/wiki/How_to_launch_VNC_with_aMule_at_Linux_boot</id>
		<title>How to launch VNC with aMule at Linux boot</title>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/How_to_launch_VNC_with_aMule_at_Linux_boot"/>
				<updated>2004-09-06T20:58:52Z</updated>
		
		<summary type="html">&lt;p&gt;62.62.238.87: Launching VNC at boot with Mandrake&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;''By [[User:Frankk|Frankk]]''&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This describes a very simple configuration to launch [http://www.redstonesoftware.com/vnc.html VNC] at [http://www.kernel.org Linux] startup (as a specified user). [[aMule]] will be launched automatically with [http://www.redstonesoftware.com/vnc.html VNC].&lt;br /&gt;
This will work in [http://www.slackware.com 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.&lt;br /&gt;
&lt;br /&gt;
Add the ''rc.vnc'' script to ''/etc/rc.d''&lt;br /&gt;
&lt;br /&gt;
Modify user according to the user running [[aMule]].&amp;lt;br&amp;gt;&lt;br /&gt;
The ''rm /tmp/.X11-unix/X$theScreen'' is there in case the server crashes or your mother/wife removes the power plug cleaning the room... ;-)&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# Startup/Stop script for vncserver.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
#Here, the choosen user to run amule&lt;br /&gt;
theUser=choosenuser&lt;br /&gt;
#And here, the choosen screen to run the vncserver&lt;br /&gt;
theScreen=1&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
&lt;br /&gt;
'start')&lt;br /&gt;
if [ -f /tmp/.X11-unix/X$theScreen ]; then rm /tmp/.X11-unix/X$theScreen; fi&lt;br /&gt;
/bin/su - $theUser -c &amp;quot;PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin /usr/bin/vncserver :$theScreen&amp;quot;&lt;br /&gt;
;;&lt;br /&gt;
&lt;br /&gt;
'stop')&lt;br /&gt;
/bin/su - $theUser -c &amp;quot;PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin /usr/bin/vncserver -kill :$theScreen&amp;quot;&lt;br /&gt;
;;&lt;br /&gt;
&lt;br /&gt;
*)&lt;br /&gt;
echo &amp;quot;Usage: /etc/init.d/rc.vnc { start | stop }&amp;quot;&lt;br /&gt;
;;&lt;br /&gt;
&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/pre&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make it executable with:&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;pre&amp;gt;chmod 755 /etc/rc.d/rc.vnc&amp;lt;/pre&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modify the following files:&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.local'' add:&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start VNC server&lt;br /&gt;
if [ -x /etc/rc.d/rc.vnc ]; then&lt;br /&gt;
. /etc/rc.d/rc.vnc start&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.6'' add:&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;pre&amp;gt;&lt;br /&gt;
# Shut down the VNC server&lt;br /&gt;
if [ -x /etc/rc.d/rc.vnc ]; then&lt;br /&gt;
/etc/rc.d/rc.vnc stop&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
In ''~/.vnc/xstartup'' (in home directory of the user specified above) add (change with your preferred [[aMule]] startup script):&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;pre&amp;gt;amule &amp;amp;&amp;lt;/pre&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== On [http://www.debian.org Debian] Woody ==&lt;br /&gt;
&lt;br /&gt;
Run (as root):&lt;br /&gt;
&lt;br /&gt;
''apt-get install vncserver xvncviewer''&lt;br /&gt;
''apt-get install vncserver flwm''&lt;br /&gt;
&lt;br /&gt;
There is no support for ''~/.vnc/xstartup'' so, instead, use ''$vncStartup'' in ''.vncrc'' to determine a xstartup-script (this replaces your ''~/.xsession'' file).&lt;br /&gt;
&lt;br /&gt;
For more information, read ''man vnc.conf''&lt;br /&gt;
&lt;br /&gt;
For example, in a Woody/Sarge/Sid:&amp;lt;br&amp;gt;&lt;br /&gt;
Login as the user who is going to run [[aMule]]&amp;lt;br&amp;gt;&lt;br /&gt;
''mkdir ~/.vnc/''&amp;lt;br&amp;gt;&lt;br /&gt;
Create the ''~/.vnc/xstartup'' file, with the next content&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/bin/flwm &amp;amp;&lt;br /&gt;
/usr/bin/amule &amp;amp;&lt;br /&gt;
/usr/bin/amule &amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With sone versions of [http://www.redstonesoftware.com/vnc.html vncserver], it's necessary to launch at least twice the [[aMule]]. The [http://flwm.sourceforge.net flwm] is an optional window manager.&lt;br /&gt;
&lt;br /&gt;
Create the file ''~/.vncrc'' with the next content:&amp;lt;br&amp;gt;&lt;br /&gt;
Login as the user and run ''xvncviewer :1'' to create the password file and debug possible probelms (the logs are under the ''~/.vnc/'' dir&lt;br /&gt;
''&amp;lt;pre&amp;gt;&lt;br /&gt;
$vncStartup = &amp;quot;/home/amule/.vnc/xstartup&amp;quot;;&lt;br /&gt;
$geometry =&amp;quot;800x600&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;''&lt;br /&gt;
(replace ''/home/amule'' for the home of the user running [http://www.redstonesoftware.com/vnc.html VNC])&lt;br /&gt;
&lt;br /&gt;
To show the [[aMule]] window, run:&lt;br /&gt;
''&amp;lt;pre&amp;gt;&lt;br /&gt;
xvncviewer localhost:1&lt;br /&gt;
&amp;lt;/pre&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mandrake 10.0 ==&lt;br /&gt;
&lt;br /&gt;
The script from Frank is the one I use, but you can customize the size of the VNC server :&lt;br /&gt;
''&amp;lt;pre&amp;gt;&lt;br /&gt;
/bin/su - $theUser -c &amp;quot;PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin /usr/bin/vncserver :$theScreen&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;''&lt;br /&gt;
add&lt;br /&gt;
''&amp;lt;pre&amp;gt;&lt;br /&gt;
/bin/su - $theUser -c &amp;quot;PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin /usr/bin/vncserver :$theScreen -geometry 1240x980&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;''&lt;br /&gt;
or wahtever value.&lt;br /&gt;
&lt;br /&gt;
Personnaly, I use as xstartup script (iceWM is really nice and so CPU-cheap) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
starticewm&amp;amp;&lt;br /&gt;
amule&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To start VNC at startup, I called the previous script /etc/init.d/amulevnc and chmod to 744.&lt;br /&gt;
&amp;lt;pre&amp;gt;Instead of modifying etc/rc.d/rc.vnc, I added links in the corresponding /etc/rc$RUNLEVEL.d directories.&lt;br /&gt;
It's quite simple to understand how it works :&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;each directory represents a runlevel, and contains links to the scripts from /etc/init.d wich need to be run/stop.&lt;br /&gt;
for instance, the link ''/etc/rc5.d/S55sshd'' to ''/etc/init.d/sshd'' will start sshd on runlevel 5,&lt;br /&gt;
whereas ''/etc/rc6.d/K25sshd'' linked to ''/etc/init.d/sshd'' will stop it in runlevel 6.&lt;br /&gt;
You get it? Links starting with 'KXX' will stop a service, and those starting with 'SXX' will start them. The number will define the order.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So to run VNC on startup, just do (as root :-) &lt;br /&gt;
''&amp;lt;pre&amp;gt;ln -s /etc/init.d/amulevnc /etc/rc5.d/S99amule&lt;br /&gt;
ln -s /etc/init.d/amulevnc /etc/rc6.d/K02amule&amp;lt;/pre&amp;gt;''&lt;br /&gt;
and your all set!&lt;br /&gt;
&lt;br /&gt;
PS : This method should work on other systems than Mandrake, give it a test.&lt;/div&gt;</summary>
		<author><name>62.62.238.87</name></author>	</entry>

	</feed>