<?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=217.215.47.187</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=217.215.47.187"/>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/Special:Contributions/217.215.47.187"/>
		<updated>2026-04-05T18:29:16Z</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-11-20T20:11:49Z</updated>
		
		<summary type="html">&lt;p&gt;217.215.47.187: Fixed formatting of rc.foo additions&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;
== General ==&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;# Start VNC server&lt;br /&gt;
if [ -x /etc/rc.d/rc.vnc ]; then&lt;br /&gt;
. /etc/rc.d/rc.vnc start&amp;quot;&lt;br /&gt;
fi&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;# 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&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;
''amule &amp;amp;''&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 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;
''/usr/bin/flwm &amp;amp;''&lt;br /&gt;
''/usr/bin/amule &amp;amp;''&lt;br /&gt;
''/usr/bin/amule &amp;amp;''&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;
&lt;br /&gt;
''$vncStartup = &amp;quot;/home/amule/.vnc/xstartup&amp;quot;;''&lt;br /&gt;
''$geometry =&amp;quot;800x600&amp;quot;;''&lt;br /&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;
''xvncviewer localhost:1''&lt;br /&gt;
&lt;br /&gt;
If you want to autostart a [http://www.redstonesoftware.com/vnc.html VNC] session on system startup, you can put a line in ''/etc/init.d/bootmisc.sh'' like this:&lt;br /&gt;
&lt;br /&gt;
''su '''username''' -c vncserver''&lt;br /&gt;
&lt;br /&gt;
Replace '''username'''  with the name of the user that you want to launch vnc. (Added by '''ghent''')&lt;br /&gt;
&lt;br /&gt;
== [http://www.mandrake.com Mandrake] 10.0 ==&lt;br /&gt;
&lt;br /&gt;
The script from [[User:Frankk|Frankk]] is the one I use, but you can customize the size of the [http://www.redstonesoftware.com/vnc.html VNC] server :&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;
add&lt;br /&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;
&lt;br /&gt;
or whatever value.&lt;br /&gt;
&lt;br /&gt;
Personaly, I use as xstartup script ([http://www.icewm.org iceWM] is really nice and so CPU-cheap) :&lt;br /&gt;
&lt;br /&gt;
''#!/bin/sh''&lt;br /&gt;
''starticewm&amp;amp;''&lt;br /&gt;
''amule''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To start [http://www.redstonesoftware.com/vnc.html VNC] at startup, I called the previous script ''/etc/init.d/amulevnc'' and chmod to 744 (''chmod 744 /etc/init.d/amulevnc'' as root).&amp;lt;br&amp;gt;&lt;br /&gt;
Instead of modifying ''/etc/rc.d/rc.vnc'', I added links in the corresponding ''/etc/rc$RUNLEVEL.d'' directories.&amp;lt;br&amp;gt;&lt;br /&gt;
It's quite simple to understand how it works:&amp;lt;br&amp;gt;&lt;br /&gt;
Each directory represents a runlevel, and contains links to the scripts from ''/etc/init.d'' which need to be run/stop.&amp;lt;br&amp;gt;&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.&amp;lt;br&amp;gt;&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.&lt;br /&gt;
&lt;br /&gt;
So to run [http://www.redstonesoftware.com/vnc.html VNC] on startup, just do (as root :-) )&lt;br /&gt;
''re&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''&lt;br /&gt;
and you're all set!&lt;br /&gt;
&lt;br /&gt;
PS: This method should work on systems other than [http://www.mandrake.com Mandrake], give it a test.&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; comments: ''air_1 '''at''' libertysurtf.fr''&lt;/div&gt;</summary>
		<author><name>217.215.47.187</name></author>	</entry>

	</feed>