<?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=PedroAlgarvio</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=PedroAlgarvio"/>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/Special:Contributions/PedroAlgarvio"/>
		<updated>2026-04-05T22:26:36Z</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>2005-06-23T09:49:14Z</updated>
		
		<summary type="html">&lt;p&gt;PedroAlgarvio: &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/husband removes the power plug cleaning the room... ;-)&lt;br /&gt;
&lt;br /&gt;
''#!/bin/sh''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
''# Startup/Stop script for vncserver.''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''#Here, the choosen user to run amule''&amp;lt;br&amp;gt;&lt;br /&gt;
''theUser=choosenuser''&amp;lt;br&amp;gt;&lt;br /&gt;
''#And here, the choosen screen to run the vncserver''&amp;lt;br&amp;gt;&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''&amp;lt;br&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
'' 'stop')''&amp;lt;br&amp;gt;&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''*)''&amp;lt;br&amp;gt;&lt;br /&gt;
''echo &amp;quot;Usage: /etc/rc.d/rc.vnc { start | stop }&amp;quot;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''esac''&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;
Modify the following files:&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.local'' add:&lt;br /&gt;
&lt;br /&gt;
''# Start VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''. /etc/rc.d/rc.vnc start''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.6'' add:&lt;br /&gt;
&lt;br /&gt;
''# Shut down the VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''/etc/rc.d/rc.vnc stop''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
''/usr/bin/amule &amp;amp;''&amp;lt;br&amp;gt;&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;;''&amp;lt;br&amp;gt;&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;
== To start [[aMuleWeb]] also at startup: ==&lt;br /&gt;
&lt;br /&gt;
This is probably the most unelegant way to do this, but it seems to work.&lt;br /&gt;
&lt;br /&gt;
The problem is that you have to supply user input when starting [[aMuleWeb]] (the password).&lt;br /&gt;
&lt;br /&gt;
You can circumvent this with supplying a password with the ''-pw'' option: ''amuleweb -pw &amp;quot;&amp;quot;'' (this is for no password, you have to remove the [http://www.ietf.org/rfc/rfc1321.txt MD5 sum] from the ''ECPassword'' entry in your ''~/.eMule'' file for this to work).&lt;br /&gt;
&lt;br /&gt;
Now [[aMuleWeb]] starts without any user input, but unfortunately it wouldn't work when we would just add it to the xstartup-file, because [[aMule]] needs a few seconds more to start up.&lt;br /&gt;
&lt;br /&gt;
Therefor we have to start [[aMuleWeb]] a few seconds after [[aMule]].&lt;br /&gt;
&lt;br /&gt;
To achieve this, we add a line similar to this one:&lt;br /&gt;
&lt;br /&gt;
''/bin/sh /home/aMule/amuleweb-start.sh &amp;amp;''&lt;br /&gt;
&lt;br /&gt;
to the xstartup-file.&lt;br /&gt;
&lt;br /&gt;
And in the home-directory, we create a file called ''amuleweb-start.sh'', with the following content:&lt;br /&gt;
&lt;br /&gt;
  #! /bin/sh&lt;br /&gt;
  sleep 30;&lt;br /&gt;
  /usr/bin/amuleweb -pw &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
That's all.&lt;br /&gt;
&lt;br /&gt;
Like I said, probably extremely amateurish, but it should work...&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''&amp;lt;br&amp;gt;&lt;br /&gt;
''starticewm&amp;amp;''&amp;lt;br&amp;gt;&lt;br /&gt;
''amule''&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [http://www.gentoo.org Gentoo] ==&lt;br /&gt;
&lt;br /&gt;
For [http://www.gentoo.org Gentoo]'ers follow these steps:&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;ATENTION: THE BOOT PROCESS NOW WORKS&amp;lt;/font&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
=== Install [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
This is a how to for a server with no [http://www.x.org X] window manager at all. I only run web and mail services, and of course, [[aMule]]. Adapt to your situation.&lt;br /&gt;
I use [http://www.tightvnc.com TightVNC], but should also work with other [http://www.realvnc.com VNC]'s.&lt;br /&gt;
&lt;br /&gt;
 # emerge tightvnc&lt;br /&gt;
&lt;br /&gt;
=== Configuring [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
==== Server Config ====&lt;br /&gt;
&lt;br /&gt;
To configure the [http://www.realvnc.com VNC] server, execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # vncserver :0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I'm using '' ''':0''' ''because there is no window manager running, so no need to use'' ''':1''' '', plus, it will be simpler to connect to it like this, simply:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # vncviewer &amp;lt;host&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You'll be asked to answer some questions, such as password, answer accordingly. After you can kill it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # vncserver -kill :0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Programs to Start ====&lt;br /&gt;
&lt;br /&gt;
Now let's config what should be started with this [http://www.realvnc.com VNC] session. Edit ''~/.vnc/xstartup'':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # vi ~/.vnc/xstartup&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
PATH=&amp;quot;$PATH:/usr/bin&amp;quot;&lt;br /&gt;
xrdb $HOME/.Xresources&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
exec wmaker&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.x.org xterm] is a console, and [http://www.x.org twm] is the window manager. I now use [http://www.windowmaker.org/ WindowMaker], and don't want no terminal, just [[aMule]] so, it's like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
PATH=&amp;quot;$PATH:/usr/bin&amp;quot;&lt;br /&gt;
xrdb $HOME/.Xresources&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
#xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
amule &amp;amp;&lt;br /&gt;
exec wmaker&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Starting [http://www.realvnc.com VNC] at boot ===&lt;br /&gt;
&lt;br /&gt;
Since I won't be starting no Window Manager at boot, but still want [[aMule]] started with the user interface(you could just run [[aMuled]]), I'll need an init script:&lt;br /&gt;
&lt;br /&gt;
 # vi /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
Make it look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/sbin/runscript&lt;br /&gt;
# Copyright 1999-2005 Gentoo Foundation&lt;br /&gt;
# Distributed under the terms of the GNU General Public License v2&lt;br /&gt;
# $Header: $&lt;br /&gt;
&lt;br /&gt;
depend() {&lt;br /&gt;
	need net&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
checkconfig() {&lt;br /&gt;
        ebegin &amp;quot;Load config&amp;quot;&lt;br /&gt;
	PATH=&amp;quot;$PATH:/usr/X11R6/bin/&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	# The Username:Group that will run VNC&lt;br /&gt;
	export USER=&amp;quot;vampas&amp;quot;&lt;br /&gt;
	#${RUNAS}&lt;br /&gt;
&lt;br /&gt;
	# The display that VNC will use&lt;br /&gt;
	DISPLAY=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	# Color depth (between 8 and 32)&lt;br /&gt;
	DEPTH=&amp;quot;16&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	# The Desktop geometry to use.&lt;br /&gt;
	#GEOMETRY=&amp;quot;&amp;lt;WIDTH&amp;gt;x&amp;lt;HEIGHT&amp;gt;&amp;quot;&lt;br /&gt;
	#GEOMETRY=&amp;quot;800x600&amp;quot;&lt;br /&gt;
	GEOMETRY=&amp;quot;1024x780&amp;quot;&lt;br /&gt;
	#GEOMETRY=&amp;quot;1280x1024&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	# The name that the VNC Desktop will have.&lt;br /&gt;
	NAME=&amp;quot;aMule&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	OPTIONS=&amp;quot;-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}&amp;quot;&lt;br /&gt;
	eend $? &amp;quot;Config not Loaded&amp;quot;&lt;br /&gt;
} &lt;br /&gt;
	&lt;br /&gt;
start() {&lt;br /&gt;
        checkconfig&lt;br /&gt;
	ebegin &amp;quot;Starting vncserver for user '${USER}' on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
	su ${USER} -c &amp;quot;/usr/bin/vncserver ${OPTIONS}&amp;quot;&lt;br /&gt;
	eend $?&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stop() {&lt;br /&gt;
	checkconfig&lt;br /&gt;
	ebegin &amp;quot;Stoping vncserver for user '${USER}' on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
	su ${USER} -c &amp;quot;/usr/bin/vncserver -kill :${DISPLAY}&amp;quot;&lt;br /&gt;
	eend $?&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
restart() {&lt;br /&gt;
	svc_stop&lt;br /&gt;
	sleep 3&lt;br /&gt;
	svc_start&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make it executable:&lt;br /&gt;
&lt;br /&gt;
 # chmod +x /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now add it to boot:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # rc-update add vncserver default&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And you should be ready to go, if not ''&amp;lt;ufs AT sapo DOT pt&amp;gt;'' &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>PedroAlgarvio</name></author>	</entry>

	<entry>
		<id>http://test.amule.szerverem.hu/wiki/AMule_problems</id>
		<title>AMule problems</title>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/AMule_problems"/>
				<updated>2005-06-14T22:25:09Z</updated>
		
		<summary type="html">&lt;p&gt;PedroAlgarvio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;&amp;lt;h4&amp;gt;[[aMule_Project_FAQ:About|aMule]] common problems&amp;lt;/h4&amp;gt;&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;by ''[[User:Jacobo221|Jacobo221]]''&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''English''' | [[AMule_problems-es|Español]] | [[AMule_problems-nl|Nederlands]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I get an &amp;quot;aMule already running: exiting&amp;quot; message on the terminal when starting aMule. Will I be able to start it anyways? ==&lt;br /&gt;
The message is very clear: [[aMule]] is already running. But this doesn't refer to the entire system, rather that '''you''' (your user account) is already running [[aMule]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
It might seem that there is no instance of [[aMule]] running if it crashed on you. However, what sometimes happens is that some processes aren't completly closed keeping them in a state known as ''zombie'' or ''defunct''. To find out if this is your problem, run ''ps u | grep amule'' and if it shows any output (except the grep output itself), then there's some other aMule process running with your account. To kill it, either close it normally (if you can) or kill it with ''kill -9 &amp;lt;aMule-PID&amp;gt;'' or ''killall -9 amule'' or logoff and log in again (which, in most cases, will kill all [[aMule]] processes, unless you executed [[aMule]] with ''nohup'' or something similar).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If non of the above suits you, then you can run another instance of [[aMule]] as another user (if you can log in with another account, of course). Read [[FAQ_aMule#Can_I_run_two_aMule_instances_at_the_same_time?|Can I run two aMule instances at the same time?]].&lt;br /&gt;
&lt;br /&gt;
== aMule starts but is never shown but works fine. What's going on? ==&lt;br /&gt;
This commonly happens when you set the type of systray integration, in Preferences -&amp;gt; General -&amp;gt; Misc Options, to ''Minimize to trayicon'' which starts [[aMule]] minimized.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
To be able to recover aMule's GUI, edit ''~/.eMule'' and search for ''StartupMinimized=1'' and once you find it, change that line to ''StartupMinimized=0''. The following script will do that for you:&amp;lt;br&amp;gt;&lt;br /&gt;
''sed s/StartupMinimized=1/StartupMinimized=0/ ~/.eMule &amp;gt; ~/.eMule.temp &amp;amp;&amp;amp; mv -f ~/.eMule.temp ~/.eMule''&amp;lt;br&amp;gt;&lt;br /&gt;
When you next start [[aMule]] set the correct systray integration in Preferences so that you can enable &amp;quot;Start minimized&amp;quot; without having [[aMule]] hidden.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If, for some reason, the above didn't work, try changing the Systray integration manually to the default by unchecking the &amp;quot;Enable tray icon'' option. To do so, set the ''DesktopMode='' value in ''~/.eMule'' to ''4''. The following script will do that for you:&amp;lt;br&amp;gt;&lt;br /&gt;
''sed s/DesktopMode=[0-9]/DesktopMode=4/ ~/.eMule &amp;gt; ~/.eMule.temp &amp;amp;&amp;amp; mv -f ~/.eMule.temp ~/.eMule''&amp;lt;br&amp;gt;&lt;br /&gt;
'''NOTE:''' On [[aMule]] versions previous to 2.0.0rc4, you should set it to ''1'' instead of ''4'' since the Preferences storage changed a little.&lt;br /&gt;
&lt;br /&gt;
== aMule starts but is never connecting/behaving very weird/crashing almost every few seconds/etc...? ==&lt;br /&gt;
aMule versions up to 2.0.0-rc3 shouldn't be linked against wxWidgets 2.5.x neither GTK2 although some Linux distributions tend to do so. Please make sure your aMule isn't the case. If unsure, paste you backtrace at [http://www.amule.org/amule/board.php?boardid=33 aMule's Backtraces forum] or join aMule's IRC channel #amule at irc.freenode.net&lt;br /&gt;
&lt;br /&gt;
== Where are my downloaded files? ==&lt;br /&gt;
By default, aMule stores completed files in ''~/.aMule/Incoming'' but, since ''~/.aMule'' directory is a hidden directory, your file manager might not show it. Make sure you have enabled your file manager to show hidden files.&amp;lt;br&amp;gt;&lt;br /&gt;
By default, files being downloaded are placed in ''~/.aMule/Temp'', so again, this is a hidden directory and the file managed must be configured to show hidden files.&lt;br /&gt;
&lt;br /&gt;
== Why is aMule taking so much CPU resources at start-up? ==&lt;br /&gt;
This happens because aMule is hashing new files found on the Shared Directories.&amp;lt;br&amp;gt; If aMule is always taking a lot of CPU at startup and no new files have been added or modified in any way in the Shared Directories, then something is wrong.&amp;lt;br&amp;gt;&lt;br /&gt;
In aMule versions earlier than 2.0.0-rc3 this used to happen when having the Temp, Incoming or any Shared Directory in a FAT32 partition. Since aMule 2.0.0-rc3 this is not happening any more.&amp;lt;br&amp;gt;&lt;br /&gt;
Also, in aMule versions earlier than 2.0.0-rc4 filesystems with UTF-8 encoding (known to happen with SuSE 9.1) could present problems when some file or directory in the Shared Directories path contanied a special character. If this is your problem, there's a walkaround (thanks '''nachbarnebenan'''): after aMule has hashed all shared files (that is, when it stops taking a lot of your CPU's resources), close aMule and enconde ~/.aMule/known.met into UTF-8 encoding (you can do this with the application ''[http://www.gnu.org/directory/recode.html recode]'' by running the following command: ''recode u8 ~/.aMule/known.met''). This should be done whenever a files is added or modified in any Shared Directory. So, best option is to upgrade to latest aMule version.&amp;lt;br&amp;gt;&lt;br /&gt;
If non of the above helps you, then something went really wrong on ''known.met'' file, probably some external program or user broke it. Best option is to delete it, start aMule and let aMule rehash all files again.&lt;br /&gt;
&lt;br /&gt;
== So now aMule starts, but why is it displaying this message: &amp;quot;No valid servers to connect in serverlist found&amp;quot;? ==&lt;br /&gt;
That's because you enabled the option &amp;quot;Auto connect to servers the static list only&amp;quot;. So, disable it or add some server to the static list.&amp;lt;br&amp;gt;&lt;br /&gt;
To disable that option, go to Preferences -&amp;gt; Servers -&amp;gt; &amp;quot;Auto connect to servers the static list only&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
To add a server to the static list, go to the Servers window and right-click on the server you want to add to the static list. Then select &amp;quot;Add to static&amp;quot; and do this exact process wit all the servers you want to add to the static list.&lt;br /&gt;
&lt;br /&gt;
== aMule connects to server, but it is always given Low-ID. Why? and, can I do something about it? ==&lt;br /&gt;
This can bue due to three reasons:&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Some necessary port is not opened in your firewall. Read [[FAQ_eD2k-Kademlia#What_is_LowID_and_HighID?|this]] to get to know what to do and check [http://www.amule.org/testport.php here] if the ports are open.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The server is very busy or maybe badly configured, so it's giving you a [[Low-ID]]. There's nothing that can be done in this case other than reconnect or connect to some other server.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Some ISP forbid the use of p2p applications, such as aMule, by not allowing traffic through popular p2p ports. In these cases, configure aMule to use some other port. It would be even better if it was some popular port used for some other issue. It's been known that on some ISPs it worked with port TCP 25600.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[aMule]] was interrupted while completing a file and it is now never completing it (allthough it's 100% downloaded). How can I complete it? ==&lt;br /&gt;
This one is easy: Close [[aMule]]. Now go into the Temp directory (by default, ''~/.aMule/Temp'') and run the following command:&lt;br /&gt;
&lt;br /&gt;
''touch ./*''&lt;br /&gt;
&lt;br /&gt;
Finally, run [[aMule]] and let it complete the files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== I just lost a download. Is there anyway I can recover it? ==&lt;br /&gt;
This is strange to happen, but it might, although in most cases it is the result of some non-aMule-related stuff going weird (or user's fault).&amp;lt;br&amp;gt;&lt;br /&gt;
Two things may have happened. Either *.part.met files were deleted, or *.part files were deleted.&amp;lt;br&amp;gt;&lt;br /&gt;
If *.part files have dissapeared, the only solution is to reastart the downloads from the beggining (if *.part.met files are still there, aMule will restart the downloads on next start). However this should '''never''' happen unless the user directly deleted them.&amp;lt;br&amp;gt;&lt;br /&gt;
If *.part.met files have dissapeared but *.part files are still in the Temp directory, then search if *.part.met.bak are also in the Temp directory. If they are, then just rename ''*.part.met.bak'' files to ''*.part.met'' just by running:&amp;lt;br&amp;gt;&lt;br /&gt;
''for file in *.part.met.bak; do mv -f &amp;quot;$file&amp;quot; &amp;quot;${file%.bak}; done''&amp;lt;br&amp;gt;&lt;br /&gt;
Still, it could happen that, although you have the *.part files, neither *.part.met nor *.part.met.bak files exist any longer. In this case, you would have two ways ways to work out of this:&amp;lt;br&amp;gt;&lt;br /&gt;
Either, use [http://www.bigwillystyle42.com/index.php?dest=mfr MetFileRegenerator] (Java needed) to reconstruct the *.part.met files.&amp;lt;br&amp;gt;&lt;br /&gt;
Or, search again on aMule for the files you were downloading and rename their part number in the *.part.met files to the ones it used to have. For example, if you ware down loading ''aMule_1.2.6.tar.gz'' and that was being downloaded in Temp directory as ''008.part'', then that file used to have it's corresponding ''008.part.met'' file and, probably, it's ''008.part.met.bak'' file. But this two latter files have misteriously dissapeared. Then search again on aMule for ''aMule_1.2.6.tar.gz'' and start downloading it. Close aMule and you'll have this new download as, for example, ''011.part'' file in the Temp directory. Of course, this download will have it's ''011.part.met'' file. Well, rename ''011.part.met'' to ''008.part.met'' and then delete ''011.part'' (and ''011.part.met.bak'' if it existed). Now start aMule and you will have recovered the download from the point it was before the *.part.met files disapeared.&lt;br /&gt;
&lt;br /&gt;
== Why does aMule suddendly become unresponsive to the mouse although it's not hanged? ==&lt;br /&gt;
It sometimes happens that you left a dialog window somewhere hidden in the desktop. aMule is waiting for that window to be closed, so it becomes unresponsive untill you click OK, Cancel, or whatever you have to click.&amp;lt;br&amp;gt;&lt;br /&gt;
So, make sure there's no aMule dialog left around in '''any workspace'''.&lt;br /&gt;
&lt;br /&gt;
== Why are some files in my shared folders not shown in the Shared Folders window? ==&lt;br /&gt;
This could happen if you added this files after aMule has been started. Press the &amp;quot;Reload&amp;quot; button on Shared Folders window and it should find the new files and hash them (this may take some CPU time).&amp;lt;br&amp;gt;&lt;br /&gt;
However, on some releases it has happened that after restarting aMule, some files dissapear from the Shared Folders window alllthough they are in the shared folders. In such cases, the only way to have them back is to delete ''~/.aMule/known.met'' but, of course, on next aMule start, all shared files will have to be rehashed, and that'll take some time most probably.&lt;br /&gt;
&lt;br /&gt;
== I always get a message about addresses.met when I start aMule. What's wrong? ==&lt;br /&gt;
This happens when you enable the option Preferences -&amp;gt; Servers -&amp;gt; &amp;quot;Auto-update serverlist at startup&amp;quot; and you have no serverlists' urls in ''addresses.dat''. You can either add some to ''addresses.dat'' by adding them at Preferences -&amp;gt; Servers -&amp;gt; List or just disable Preferences -&amp;gt; Servers -&amp;gt; &amp;quot;Auto-update serverlist at startup&amp;quot; if you don't really need it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I sometimes get a message on the log about credits being lost. Should I be worried? ==&lt;br /&gt;
No, you don't need to be worried. Credits for a client are deleted after 150 days (more or less 5 months) without &amp;quot;seeing&amp;quot; that client. Also, bad clients might lose their credits too. So those messages are just for debug information, you souldn't worry about them.&lt;br /&gt;
&lt;br /&gt;
== What should I do if I lose my ''cryptkey.dat'' file? ==&lt;br /&gt;
Losing that file will automatically make you loose all your credits with it, sorry. IF you will to start collecting credits again from this very moment, delete ''~/.aMule/preferences.dat'' too. If you don't, you'll be unable to collect credits on those [[client]]s which had sometime (before loosing the ''cryptkey.dat file) identified you.&lt;br /&gt;
&lt;br /&gt;
== Why is Upload/Download limit always back to 0 after every restart? ==&lt;br /&gt;
This happened on aMule versions previous to 2.0.0-rc4 when you trying to set a Upload or Download limit value higher than the Upload or Download Capacity value. However, since version 2.0.0-rc4 this is fixed (read [[FAQ_aMule#What_is_the_real_point_on_setting_up_Line_Capacities_in_Preferences?_Shouldn't_aMule_only_care_for_the_Bandwidth_Limits?|What is the real point on setting up Line Capacities&lt;br /&gt;
in Preferences? Shouldn't aMule only care for the Bandwidth Limits?]] to understand why) and shouldn't happen anymore.&lt;br /&gt;
&lt;br /&gt;
== Why is aMule ignoring the bandwith I set per slot? ==&lt;br /&gt;
The bandwidth set to each slot can be set in Preferences, but it will be ignored if the bandwidth set per slot doesn't allow at least three connections at the same time.&amp;lt;br&amp;gt;&lt;br /&gt;
So, the maximum speed allowed per slot is '''BandwidthLimit/3'''.&amp;lt;br&amp;gt;&lt;br /&gt;
Please do '''NOT''' confuse '''Bandwidth limit''' with '''Bandwith Capacity'''. Read [[FAQ_aMule#What is the real point on setting up Line Capacities in Preferences? Shouldn't aMule only care for the Bandwidth Limits?|What is the real point on setting up Line Capacities in Preferences? Shouldn't aMule only care for the Bandwidth Limits?]] since the meaning of the Bandwidth Capacity setting is not intuitive.&amp;lt;br&amp;gt;&lt;br /&gt;
Also, if [[aMule]] detects that, after having set all the slots for uploading, still some bandwidth is left before getting to the Bandwidth Limit, it will allow another slot and divide all the slot bandwidths to so use the same amount of bandwidth.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
Bandwidth Limit: 7 KBps&lt;br /&gt;
Slot allocation: 2 KBps&lt;br /&gt;
When [[aMule]] sets the slots to some clients to upload to them, after giving out three slots, it will notice that tehre are no more 2KBps left, since the limit is 7 KBps, but there is still 1 KBps left in the bandwicth before reaching the Bandwidth Limit. So, It will allow another slot to upload to a client and, isntead of giving that last slot a 1 KBps bandwidth connection (and leave the rest with a 2 KBps bandwidth connetcion), it will give all four slots a 1.8 KBps bandwidth connection.&lt;br /&gt;
&lt;br /&gt;
== Why can't I set aMule's download limit to more than X? ==&lt;br /&gt;
To keep the ED2K network alive, all ED2K clients have an upload/download limits ratio hardcoded which, depending on the upload limit set, is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;From 0KBps to 3KBps:&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
DownloadLimit can't be more than UploadLimit*3&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;From 4KBps to 9KBps:&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
DownloadLimit can't be more than UploadLimit*4&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;UploadLimit values over 9KBps:&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
There's &amp;lt;b&amp;gt;no&amp;lt;/b&amp;gt; DownloadLimit limitation.&lt;br /&gt;
&lt;br /&gt;
Be carefull when setting 0KBps as Upload Limit . It might not mean what you think it is. Read [[AMule_problems#I_set_Upload_Limit_to_0KBps,_but_aMule_is_still_transfering._What_did_I_do_wrong?|I set Upload Limit to 0KBps, but aMule is still transfering. What did I do wrong?]] to make sure you understand it's meaning.&lt;br /&gt;
&lt;br /&gt;
== I set Upload Limit to 0KBps, but aMule is still transfering. What did I do wrong? ==&lt;br /&gt;
Setting Upload limit to 0KBps will not stop transfers, instead, ''0'' value means '''unlimited''', so, it's right the opossite of you're trying to do. There's no way to stop aMule from uploading files, and that's the same on all ED2K clients (eMule, eDonkey, etc). Allowing people not to upload would bring the ED2K network to it's end.&amp;lt;br&amp;gt;&lt;br /&gt;
Even if you don't share any directory, the Temp directory will '''always''' be shared, so that files that you are downloading are shared with other clients.&lt;br /&gt;
&lt;br /&gt;
== Why am I getting &amp;quot;Too many connections&amp;quot; messages on the terminal? ==&lt;br /&gt;
This happens when you set a very high value at Preferences -&amp;gt; Connections -&amp;gt; &amp;quot;Connection limits&amp;quot; -&amp;gt; &amp;quot;Max connections&amp;quot;. If this value is as almost as big as the the amount of connections your system allows you to have, then aMule will fail to establish connections and display those messages (have in mind that other applications may also have some connections established).&amp;lt;br&amp;gt;&lt;br /&gt;
On Windows 9x/ME platforms there is a limit of 100 TCP connections so, although you might set aMule to establish more than 100 connections, it will be unable to do so. You can change Windows's TCP connections limit by editting the Windows Register ('''Start -&amp;gt; Run -&amp;gt; regedit.exe''') and setting (you'll most surely have to add the value since in most cases it doesn't exist):&amp;lt;br&amp;gt;&lt;br /&gt;
''HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP\MaxConnections'' (which is a String type and it's value must be a 32-bit number).&lt;br /&gt;
&lt;br /&gt;
== My progress bars have lost most of their 3D effect and look more ugly now. Can I turn its look back? ==&lt;br /&gt;
In most aMule versions setting the progress bar style to the most right on Preferences -&amp;gt; &amp;quot;GUI tweaks&amp;quot; is the way to have the progress bar have the best 3D effect. But in versions 2.0.0-rc4 to 2.0.0-rc6 the best 3D effect is given when the style bar is set to the middle. Setting it to the most right would give the progress bar a flat look while setting it to the most left will give it a dark look.&lt;br /&gt;
&lt;br /&gt;
== All my downloads suddenly paused and I can't resume them. What's going on? ==&lt;br /&gt;
&lt;br /&gt;
Check if there's any free space in the filesystem where the Temp directory is placed. If there is any at all, check if there's more free space than the minimum free space set at Preferences -&amp;gt; Files -&amp;gt; &amp;quot;Min disk space&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The minimum free space required for [[aMule]] is 9.28MB, since that's what [[aMule]] needs to be able to download a [[FAQ_ed2k#What_is_a_chunk?|part]] of a file.&lt;br /&gt;
&lt;br /&gt;
== Why isn't [[aMule]]'s Preview working at all with MPlayer? ==&lt;br /&gt;
Since aMule 2.0.0-rc4 Preview command isn't being run in the same terminal as aMule. As a result, your Preview program may fail to start. This is the case of MPlayer. If you need a terminal to run your Preview player, use some command like ''xterm -e &amp;lt;preview-app&amp;gt;'' i.e.:&amp;lt;br&amp;gt;&lt;br /&gt;
''xterm -T &amp;quot;aMule preview&amp;quot; -iconic -e mplayer -idx''&lt;br /&gt;
&lt;br /&gt;
== After exitting MPlayer on Preview, my aMule keeps locked? ==&lt;br /&gt;
Preview used to lock aMule on purpose until aMule reached version 2.0.0-rc4. As a result of this, people using MPlayer suffered from a bug on MPlayer which remains the main process in background when closing the main MPlayer window. The way to walk around this MPlayer bug on aMule versions previous to 2.0.0-rc4 is to exit MPlayer by pressing the '''Q''' key. Any way, it'd be better if you could possibly upgrade aMule to the latest versions.&lt;br /&gt;
&lt;br /&gt;
== Why is ''Transfered'' a smaller number than ''Completed''? ==&lt;br /&gt;
It's a common mistake to think it should be bigger or, at least, equal.&amp;lt;br&amp;gt;&lt;br /&gt;
Please read [[FAQ_aMule#What_is_the_difference_between_Transfered_and_Completed_in_the_Tranfers_window?|What is the difference between Transfered and Completed in the Tranfers window?]] to know more about this.&lt;br /&gt;
&lt;br /&gt;
== aMule always slows down my computer when it completes a download. Is this a normal behaviour? ==&lt;br /&gt;
Yes it is. When aMule completes a download it checks it has not been corrupted. Allthough this is already checked while downloading (by checking the chunk's hash values), once the file is completly downloaded aMule hashes all the chunks to check that the chunks which were previously downloaded weren't somehow corrupted by the user or an external application while the rest of the file was being downloaded.&lt;br /&gt;
&lt;br /&gt;
== Is there any way to recursively select a whole directory and its contents? ==&lt;br /&gt;
Yes, there is. And it's simple:&lt;br /&gt;
*On [[aMule]] 2.0.0-rc4 or later, right-click on the icon of the directory you want to recusively select. &lt;br /&gt;
*On [[aMule]] 1.x and up to 2.0.0-rc3 (included), while clicking on the directory, hold the CTRL key.&amp;lt;br&amp;gt;&lt;br /&gt;
And that's it.&lt;br /&gt;
&lt;br /&gt;
== I downloaded a file and it got corrupted somehow by my hard disk or some external application once completed. Can I avoid redownloading the whole of it? ==&lt;br /&gt;
If you still have the [[ed2k_link|ed2k:// link]], start the download again and when a whole chunk (9.28MB) has been downloaded (any chunk), close [[aMule]], rename the corrupted file to the filename the current download has (something like ''002.part''), touch the corrupted file (i.e.: ''touch ~/.aMule/Temp/002.part*'') and restart [[aMule]].&amp;lt;br&amp;gt;&lt;br /&gt;
[[aMule]] will detect the completed chunks and the corrupted ones, and will only download the chunks which got corrupted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Things you should be aware when using NFS mounts with [[aMule]] ==&lt;br /&gt;
When using NFS mounts with [[aMule]], make sure you unmount those NFS mounts(the ones from the computer being shut down) from the computer running [[aMule]], because, otherwise, [[aMule]] will simply hang untill those mounts are back up again. How to notice this? If you leave [[aMule]] running at night, and on the other day you go to the stats and see straight lines for Download/Upload/Connections stats(NON ZERO), and after mounting those NFS mounts, those straight lines drop to zero resuming normal behaviour, that is a sign. Plus, after unmouting the NFS mounts from any computer beying shut down, '''reload''' [[aMule]]'s shared files.&amp;lt;br&amp;gt;''I noticed all this from my frustrating experience of countless days with no downloads at nigh ;) ... --[[User:PedroAlgarvio|PedroAlgarvio]] 00:25, 15 Jun 2005 (CEST)''&lt;/div&gt;</summary>
		<author><name>PedroAlgarvio</name></author>	</entry>

	<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>2005-06-12T16:23:23Z</updated>
		
		<summary type="html">&lt;p&gt;PedroAlgarvio: =Server Config=&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/husband removes the power plug cleaning the room... ;-)&lt;br /&gt;
&lt;br /&gt;
''#!/bin/sh''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
''# Startup/Stop script for vncserver.''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''#Here, the choosen user to run amule''&amp;lt;br&amp;gt;&lt;br /&gt;
''theUser=choosenuser''&amp;lt;br&amp;gt;&lt;br /&gt;
''#And here, the choosen screen to run the vncserver''&amp;lt;br&amp;gt;&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''&amp;lt;br&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
'' 'stop')''&amp;lt;br&amp;gt;&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''*)''&amp;lt;br&amp;gt;&lt;br /&gt;
''echo &amp;quot;Usage: /etc/rc.d/rc.vnc { start | stop }&amp;quot;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''esac''&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;
Modify the following files:&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.local'' add:&lt;br /&gt;
&lt;br /&gt;
''# Start VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''. /etc/rc.d/rc.vnc start''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.6'' add:&lt;br /&gt;
&lt;br /&gt;
''# Shut down the VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''/etc/rc.d/rc.vnc stop''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
''/usr/bin/amule &amp;amp;''&amp;lt;br&amp;gt;&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;;''&amp;lt;br&amp;gt;&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;
== To start [[aMuleWeb]] also at startup: ==&lt;br /&gt;
&lt;br /&gt;
This is probably the most unelegant way to do this, but it seems to work.&lt;br /&gt;
&lt;br /&gt;
The problem is that you have to supply user input when starting [[aMuleWeb]] (the password).&lt;br /&gt;
&lt;br /&gt;
You can circumvent this with supplying a password with the ''-pw'' option: ''amuleweb -pw &amp;quot;&amp;quot;'' (this is for no password, you have to remove the [http://www.ietf.org/rfc/rfc1321.txt MD5 sum] from the ''ECPassword'' entry in your ''~/.eMule'' file for this to work).&lt;br /&gt;
&lt;br /&gt;
Now [[aMuleWeb]] starts without any user input, but unfortunately it wouldn't work when we would just add it to the xstartup-file, because [[aMule]] needs a few seconds more to start up.&lt;br /&gt;
&lt;br /&gt;
Therefor we have to start [[aMuleWeb]] a few seconds after [[aMule]].&lt;br /&gt;
&lt;br /&gt;
To achieve this, we add a line similar to this one:&lt;br /&gt;
&lt;br /&gt;
''/bin/sh /home/aMule/amuleweb-start.sh &amp;amp;''&lt;br /&gt;
&lt;br /&gt;
to the xstartup-file.&lt;br /&gt;
&lt;br /&gt;
And in the home-directory, we create a file called ''amuleweb-start.sh'', with the following content:&lt;br /&gt;
&lt;br /&gt;
  #! /bin/sh&lt;br /&gt;
  sleep 30;&lt;br /&gt;
  /usr/bin/amuleweb -pw &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
That's all.&lt;br /&gt;
&lt;br /&gt;
Like I said, probably extremely amateurish, but it should work...&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''&amp;lt;br&amp;gt;&lt;br /&gt;
''starticewm&amp;amp;''&amp;lt;br&amp;gt;&lt;br /&gt;
''amule''&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [http://www.gentoo.org Gentoo] ==&lt;br /&gt;
&lt;br /&gt;
For [http://www.gentoo.org Gentoo]'ers follow these steps:&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;ATENTION: THE BOOT PROCESS NOW WORKS&amp;lt;/font&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
=== Install [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
This is a how to for a server with no X window manager at all. I only run web and mail services, and of course, aMule. Adapt to you're sictuation.&lt;br /&gt;
I use [http://www.tightvnc.com TightVNC], but should also work with other [http://www.realvnc.com VNC]'s.&lt;br /&gt;
&lt;br /&gt;
 # emerge tightvnc&lt;br /&gt;
&lt;br /&gt;
=== Configuring [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
==== Server Config ====&lt;br /&gt;
&lt;br /&gt;
To configure the [http://www.realvnc.com VNC] server, execute:&lt;br /&gt;
&lt;br /&gt;
 # vncserver :0&lt;br /&gt;
&lt;br /&gt;
I'm using '' ''':0''' ''because there isn't no window manager running, so no need to use'' ''':1''' '', plus, it will be simpler to connect to it like this, simply &lt;br /&gt;
 # vncviewer &amp;lt;host&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You'll be asked to answer some questions, such as password, answer accordingly. After you can kill it:&lt;br /&gt;
&lt;br /&gt;
 # vncserver -kill :0&lt;br /&gt;
&lt;br /&gt;
==== Programs to Start ====&lt;br /&gt;
&lt;br /&gt;
Now let's config what should be started with this [http://www.realvnc.com VNC] session:&lt;br /&gt;
edit ~/.vnc/xstartup&lt;br /&gt;
&lt;br /&gt;
 # vi ~/.vnc/xstartup&lt;br /&gt;
&lt;br /&gt;
You should see something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
PATH=&amp;quot;$PATH:/usr/bin&amp;quot;&lt;br /&gt;
xrdb $HOME/.Xresources&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
exec wmaker&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.x.org xterm] is a console, and [http://www.x.org twm] is the window manager. I now use [http://www.windowmaker.org/ WindowMaker], and don't want no terminal, just [[aMule]] so, it's like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
PATH=&amp;quot;$PATH:/usr/bin&amp;quot;&lt;br /&gt;
xrdb $HOME/.Xresources&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
#xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
amule &amp;amp;&lt;br /&gt;
exec wmaker&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Starting [http://www.realvnc.com VNC] at boot ===&lt;br /&gt;
&lt;br /&gt;
Since I won't be starting no Window Manager at boot, but still want [[aMule]] started with the user interface(you could just run [[aMuled]]), I'll need an init script:&lt;br /&gt;
&lt;br /&gt;
 # vi /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
Make it look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/sbin/runscript&lt;br /&gt;
# Copyright 1999-2005 Gentoo Foundation&lt;br /&gt;
# Distributed under the terms of the GNU General Public License v2&lt;br /&gt;
# $Header: $&lt;br /&gt;
&lt;br /&gt;
depend() {&lt;br /&gt;
	need net&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
checkconfig() {&lt;br /&gt;
        ebegin &amp;quot;Load config&amp;quot;&lt;br /&gt;
	PATH=&amp;quot;$PATH:/usr/X11R6/bin/&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	# The Username:Group that will run VNC&lt;br /&gt;
	export USER=&amp;quot;vampas&amp;quot;&lt;br /&gt;
	#${RUNAS}&lt;br /&gt;
&lt;br /&gt;
	# The display that VNC will use&lt;br /&gt;
	DISPLAY=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	# Color depth (between 8 and 32)&lt;br /&gt;
	DEPTH=&amp;quot;16&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	# The Desktop geometry to use.&lt;br /&gt;
	#GEOMETRY=&amp;quot;&amp;lt;WIDTH&amp;gt;x&amp;lt;HEIGHT&amp;gt;&amp;quot;&lt;br /&gt;
	#GEOMETRY=&amp;quot;800x600&amp;quot;&lt;br /&gt;
	GEOMETRY=&amp;quot;1024x780&amp;quot;&lt;br /&gt;
	#GEOMETRY=&amp;quot;1280x1024&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	# The name that the VNC Desktop will have.&lt;br /&gt;
	NAME=&amp;quot;aMule&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	OPTIONS=&amp;quot;-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}&amp;quot;&lt;br /&gt;
	eend $? &amp;quot;Config not Loaded&amp;quot;&lt;br /&gt;
} &lt;br /&gt;
	&lt;br /&gt;
start() {&lt;br /&gt;
        checkconfig&lt;br /&gt;
	ebegin &amp;quot;Starting vncserver for user '${USER}' on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
	su ${USER} -c &amp;quot;/usr/bin/vncserver ${OPTIONS}&amp;quot;&lt;br /&gt;
	eend $?&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stop() {&lt;br /&gt;
	checkconfig&lt;br /&gt;
	ebegin &amp;quot;Stoping vncserver for user '${USER}' on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
	su ${USER} -c &amp;quot;/usr/bin/vncserver -kill :${DISPLAY}&amp;quot;&lt;br /&gt;
	eend $?&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
restart() {&lt;br /&gt;
	svc_stop&lt;br /&gt;
	svc_start&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make it executable:&lt;br /&gt;
&lt;br /&gt;
 # chmod +x /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now add it to boot:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # rc-update add vncserver default&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And you should be ready to go, if not ''&amp;lt;ufs AT sapo DOT pt&amp;gt;'' &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>PedroAlgarvio</name></author>	</entry>

	<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>2005-06-12T16:22:59Z</updated>
		
		<summary type="html">&lt;p&gt;PedroAlgarvio: =Install [http://www.realvnc.com VNC]=&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/husband removes the power plug cleaning the room... ;-)&lt;br /&gt;
&lt;br /&gt;
''#!/bin/sh''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
''# Startup/Stop script for vncserver.''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''#Here, the choosen user to run amule''&amp;lt;br&amp;gt;&lt;br /&gt;
''theUser=choosenuser''&amp;lt;br&amp;gt;&lt;br /&gt;
''#And here, the choosen screen to run the vncserver''&amp;lt;br&amp;gt;&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''&amp;lt;br&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
'' 'stop')''&amp;lt;br&amp;gt;&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''*)''&amp;lt;br&amp;gt;&lt;br /&gt;
''echo &amp;quot;Usage: /etc/rc.d/rc.vnc { start | stop }&amp;quot;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''esac''&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;
Modify the following files:&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.local'' add:&lt;br /&gt;
&lt;br /&gt;
''# Start VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''. /etc/rc.d/rc.vnc start''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.6'' add:&lt;br /&gt;
&lt;br /&gt;
''# Shut down the VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''/etc/rc.d/rc.vnc stop''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
''/usr/bin/amule &amp;amp;''&amp;lt;br&amp;gt;&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;;''&amp;lt;br&amp;gt;&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;
== To start [[aMuleWeb]] also at startup: ==&lt;br /&gt;
&lt;br /&gt;
This is probably the most unelegant way to do this, but it seems to work.&lt;br /&gt;
&lt;br /&gt;
The problem is that you have to supply user input when starting [[aMuleWeb]] (the password).&lt;br /&gt;
&lt;br /&gt;
You can circumvent this with supplying a password with the ''-pw'' option: ''amuleweb -pw &amp;quot;&amp;quot;'' (this is for no password, you have to remove the [http://www.ietf.org/rfc/rfc1321.txt MD5 sum] from the ''ECPassword'' entry in your ''~/.eMule'' file for this to work).&lt;br /&gt;
&lt;br /&gt;
Now [[aMuleWeb]] starts without any user input, but unfortunately it wouldn't work when we would just add it to the xstartup-file, because [[aMule]] needs a few seconds more to start up.&lt;br /&gt;
&lt;br /&gt;
Therefor we have to start [[aMuleWeb]] a few seconds after [[aMule]].&lt;br /&gt;
&lt;br /&gt;
To achieve this, we add a line similar to this one:&lt;br /&gt;
&lt;br /&gt;
''/bin/sh /home/aMule/amuleweb-start.sh &amp;amp;''&lt;br /&gt;
&lt;br /&gt;
to the xstartup-file.&lt;br /&gt;
&lt;br /&gt;
And in the home-directory, we create a file called ''amuleweb-start.sh'', with the following content:&lt;br /&gt;
&lt;br /&gt;
  #! /bin/sh&lt;br /&gt;
  sleep 30;&lt;br /&gt;
  /usr/bin/amuleweb -pw &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
That's all.&lt;br /&gt;
&lt;br /&gt;
Like I said, probably extremely amateurish, but it should work...&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''&amp;lt;br&amp;gt;&lt;br /&gt;
''starticewm&amp;amp;''&amp;lt;br&amp;gt;&lt;br /&gt;
''amule''&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [http://www.gentoo.org Gentoo] ==&lt;br /&gt;
&lt;br /&gt;
For [http://www.gentoo.org Gentoo]'ers follow these steps:&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;ATENTION: THE BOOT PROCESS NOW WORKS&amp;lt;/font&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
=== Install [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
This is a how to for a server with no X window manager at all. I only run web and mail services, and of course, aMule. Adapt to you're sictuation.&lt;br /&gt;
I use [http://www.tightvnc.com TightVNC], but should also work with other [http://www.realvnc.com VNC]'s.&lt;br /&gt;
&lt;br /&gt;
 # emerge tightvnc&lt;br /&gt;
&lt;br /&gt;
=== Configuring [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
==== Server Config ====&lt;br /&gt;
&lt;br /&gt;
To configure the [http://www.realvnc.com VNC] server, execute:&lt;br /&gt;
&lt;br /&gt;
 vncserver :0&lt;br /&gt;
I'm using '' ''':0''' ''because there isn't no window manager running, so no need to use'' ''':1''' '', plus, it will be simpler to connect to it like this, simply &lt;br /&gt;
 # vncviewer &amp;lt;host&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You'll be asked to answer some questions, such as password, answer accordingly. After you can kill it:&lt;br /&gt;
&lt;br /&gt;
 # vncserver -kill :0&lt;br /&gt;
&lt;br /&gt;
==== Programs to Start ====&lt;br /&gt;
&lt;br /&gt;
Now let's config what should be started with this [http://www.realvnc.com VNC] session:&lt;br /&gt;
edit ~/.vnc/xstartup&lt;br /&gt;
&lt;br /&gt;
 # vi ~/.vnc/xstartup&lt;br /&gt;
&lt;br /&gt;
You should see something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
PATH=&amp;quot;$PATH:/usr/bin&amp;quot;&lt;br /&gt;
xrdb $HOME/.Xresources&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
exec wmaker&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.x.org xterm] is a console, and [http://www.x.org twm] is the window manager. I now use [http://www.windowmaker.org/ WindowMaker], and don't want no terminal, just [[aMule]] so, it's like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
PATH=&amp;quot;$PATH:/usr/bin&amp;quot;&lt;br /&gt;
xrdb $HOME/.Xresources&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
#xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
amule &amp;amp;&lt;br /&gt;
exec wmaker&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Starting [http://www.realvnc.com VNC] at boot ===&lt;br /&gt;
&lt;br /&gt;
Since I won't be starting no Window Manager at boot, but still want [[aMule]] started with the user interface(you could just run [[aMuled]]), I'll need an init script:&lt;br /&gt;
&lt;br /&gt;
 # vi /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
Make it look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/sbin/runscript&lt;br /&gt;
# Copyright 1999-2005 Gentoo Foundation&lt;br /&gt;
# Distributed under the terms of the GNU General Public License v2&lt;br /&gt;
# $Header: $&lt;br /&gt;
&lt;br /&gt;
depend() {&lt;br /&gt;
	need net&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
checkconfig() {&lt;br /&gt;
        ebegin &amp;quot;Load config&amp;quot;&lt;br /&gt;
	PATH=&amp;quot;$PATH:/usr/X11R6/bin/&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	# The Username:Group that will run VNC&lt;br /&gt;
	export USER=&amp;quot;vampas&amp;quot;&lt;br /&gt;
	#${RUNAS}&lt;br /&gt;
&lt;br /&gt;
	# The display that VNC will use&lt;br /&gt;
	DISPLAY=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	# Color depth (between 8 and 32)&lt;br /&gt;
	DEPTH=&amp;quot;16&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	# The Desktop geometry to use.&lt;br /&gt;
	#GEOMETRY=&amp;quot;&amp;lt;WIDTH&amp;gt;x&amp;lt;HEIGHT&amp;gt;&amp;quot;&lt;br /&gt;
	#GEOMETRY=&amp;quot;800x600&amp;quot;&lt;br /&gt;
	GEOMETRY=&amp;quot;1024x780&amp;quot;&lt;br /&gt;
	#GEOMETRY=&amp;quot;1280x1024&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	# The name that the VNC Desktop will have.&lt;br /&gt;
	NAME=&amp;quot;aMule&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	OPTIONS=&amp;quot;-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}&amp;quot;&lt;br /&gt;
	eend $? &amp;quot;Config not Loaded&amp;quot;&lt;br /&gt;
} &lt;br /&gt;
	&lt;br /&gt;
start() {&lt;br /&gt;
        checkconfig&lt;br /&gt;
	ebegin &amp;quot;Starting vncserver for user '${USER}' on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
	su ${USER} -c &amp;quot;/usr/bin/vncserver ${OPTIONS}&amp;quot;&lt;br /&gt;
	eend $?&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stop() {&lt;br /&gt;
	checkconfig&lt;br /&gt;
	ebegin &amp;quot;Stoping vncserver for user '${USER}' on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
	su ${USER} -c &amp;quot;/usr/bin/vncserver -kill :${DISPLAY}&amp;quot;&lt;br /&gt;
	eend $?&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
restart() {&lt;br /&gt;
	svc_stop&lt;br /&gt;
	svc_start&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make it executable:&lt;br /&gt;
&lt;br /&gt;
 # chmod +x /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now add it to boot:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # rc-update add vncserver default&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And you should be ready to go, if not ''&amp;lt;ufs AT sapo DOT pt&amp;gt;'' &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>PedroAlgarvio</name></author>	</entry>

	<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>2005-06-12T16:22:33Z</updated>
		
		<summary type="html">&lt;p&gt;PedroAlgarvio: &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/husband removes the power plug cleaning the room... ;-)&lt;br /&gt;
&lt;br /&gt;
''#!/bin/sh''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
''# Startup/Stop script for vncserver.''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''#Here, the choosen user to run amule''&amp;lt;br&amp;gt;&lt;br /&gt;
''theUser=choosenuser''&amp;lt;br&amp;gt;&lt;br /&gt;
''#And here, the choosen screen to run the vncserver''&amp;lt;br&amp;gt;&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''&amp;lt;br&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
'' 'stop')''&amp;lt;br&amp;gt;&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''*)''&amp;lt;br&amp;gt;&lt;br /&gt;
''echo &amp;quot;Usage: /etc/rc.d/rc.vnc { start | stop }&amp;quot;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''esac''&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;
Modify the following files:&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.local'' add:&lt;br /&gt;
&lt;br /&gt;
''# Start VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''. /etc/rc.d/rc.vnc start''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.6'' add:&lt;br /&gt;
&lt;br /&gt;
''# Shut down the VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''/etc/rc.d/rc.vnc stop''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
''/usr/bin/amule &amp;amp;''&amp;lt;br&amp;gt;&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;;''&amp;lt;br&amp;gt;&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;
== To start [[aMuleWeb]] also at startup: ==&lt;br /&gt;
&lt;br /&gt;
This is probably the most unelegant way to do this, but it seems to work.&lt;br /&gt;
&lt;br /&gt;
The problem is that you have to supply user input when starting [[aMuleWeb]] (the password).&lt;br /&gt;
&lt;br /&gt;
You can circumvent this with supplying a password with the ''-pw'' option: ''amuleweb -pw &amp;quot;&amp;quot;'' (this is for no password, you have to remove the [http://www.ietf.org/rfc/rfc1321.txt MD5 sum] from the ''ECPassword'' entry in your ''~/.eMule'' file for this to work).&lt;br /&gt;
&lt;br /&gt;
Now [[aMuleWeb]] starts without any user input, but unfortunately it wouldn't work when we would just add it to the xstartup-file, because [[aMule]] needs a few seconds more to start up.&lt;br /&gt;
&lt;br /&gt;
Therefor we have to start [[aMuleWeb]] a few seconds after [[aMule]].&lt;br /&gt;
&lt;br /&gt;
To achieve this, we add a line similar to this one:&lt;br /&gt;
&lt;br /&gt;
''/bin/sh /home/aMule/amuleweb-start.sh &amp;amp;''&lt;br /&gt;
&lt;br /&gt;
to the xstartup-file.&lt;br /&gt;
&lt;br /&gt;
And in the home-directory, we create a file called ''amuleweb-start.sh'', with the following content:&lt;br /&gt;
&lt;br /&gt;
  #! /bin/sh&lt;br /&gt;
  sleep 30;&lt;br /&gt;
  /usr/bin/amuleweb -pw &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
That's all.&lt;br /&gt;
&lt;br /&gt;
Like I said, probably extremely amateurish, but it should work...&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''&amp;lt;br&amp;gt;&lt;br /&gt;
''starticewm&amp;amp;''&amp;lt;br&amp;gt;&lt;br /&gt;
''amule''&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [http://www.gentoo.org Gentoo] ==&lt;br /&gt;
&lt;br /&gt;
For [http://www.gentoo.org Gentoo]'ers follow these steps:&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;ATENTION: THE BOOT PROCESS NOW WORKS&amp;lt;/font&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
=== Install [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
This is a how to for a server with no X window manager at all. I only run web and mail services, and of course, aMule. Adapt to you're sictuation.&lt;br /&gt;
I use [http://www.tightvnc.com TightVNC], but should also work with other [http://www.realvnc.com VNC]'s.&lt;br /&gt;
&lt;br /&gt;
 emerge tightvnc&lt;br /&gt;
&lt;br /&gt;
=== Configuring [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
==== Server Config ====&lt;br /&gt;
&lt;br /&gt;
To configure the [http://www.realvnc.com VNC] server, execute:&lt;br /&gt;
&lt;br /&gt;
 vncserver :0&lt;br /&gt;
I'm using '' ''':0''' ''because there isn't no window manager running, so no need to use'' ''':1''' '', plus, it will be simpler to connect to it like this, simply &lt;br /&gt;
 # vncviewer &amp;lt;host&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You'll be asked to answer some questions, such as password, answer accordingly. After you can kill it:&lt;br /&gt;
&lt;br /&gt;
 # vncserver -kill :0&lt;br /&gt;
&lt;br /&gt;
==== Programs to Start ====&lt;br /&gt;
&lt;br /&gt;
Now let's config what should be started with this [http://www.realvnc.com VNC] session:&lt;br /&gt;
edit ~/.vnc/xstartup&lt;br /&gt;
&lt;br /&gt;
 # vi ~/.vnc/xstartup&lt;br /&gt;
&lt;br /&gt;
You should see something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
PATH=&amp;quot;$PATH:/usr/bin&amp;quot;&lt;br /&gt;
xrdb $HOME/.Xresources&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
exec wmaker&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.x.org xterm] is a console, and [http://www.x.org twm] is the window manager. I now use [http://www.windowmaker.org/ WindowMaker], and don't want no terminal, just [[aMule]] so, it's like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
PATH=&amp;quot;$PATH:/usr/bin&amp;quot;&lt;br /&gt;
xrdb $HOME/.Xresources&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
#xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
amule &amp;amp;&lt;br /&gt;
exec wmaker&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Starting [http://www.realvnc.com VNC] at boot ===&lt;br /&gt;
&lt;br /&gt;
Since I won't be starting no Window Manager at boot, but still want [[aMule]] started with the user interface(you could just run [[aMuled]]), I'll need an init script:&lt;br /&gt;
&lt;br /&gt;
 # vi /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
Make it look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/sbin/runscript&lt;br /&gt;
# Copyright 1999-2005 Gentoo Foundation&lt;br /&gt;
# Distributed under the terms of the GNU General Public License v2&lt;br /&gt;
# $Header: $&lt;br /&gt;
&lt;br /&gt;
depend() {&lt;br /&gt;
	need net&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
checkconfig() {&lt;br /&gt;
        ebegin &amp;quot;Load config&amp;quot;&lt;br /&gt;
	PATH=&amp;quot;$PATH:/usr/X11R6/bin/&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	# The Username:Group that will run VNC&lt;br /&gt;
	export USER=&amp;quot;vampas&amp;quot;&lt;br /&gt;
	#${RUNAS}&lt;br /&gt;
&lt;br /&gt;
	# The display that VNC will use&lt;br /&gt;
	DISPLAY=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	# Color depth (between 8 and 32)&lt;br /&gt;
	DEPTH=&amp;quot;16&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	# The Desktop geometry to use.&lt;br /&gt;
	#GEOMETRY=&amp;quot;&amp;lt;WIDTH&amp;gt;x&amp;lt;HEIGHT&amp;gt;&amp;quot;&lt;br /&gt;
	#GEOMETRY=&amp;quot;800x600&amp;quot;&lt;br /&gt;
	GEOMETRY=&amp;quot;1024x780&amp;quot;&lt;br /&gt;
	#GEOMETRY=&amp;quot;1280x1024&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	# The name that the VNC Desktop will have.&lt;br /&gt;
	NAME=&amp;quot;aMule&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	OPTIONS=&amp;quot;-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}&amp;quot;&lt;br /&gt;
	eend $? &amp;quot;Config not Loaded&amp;quot;&lt;br /&gt;
} &lt;br /&gt;
	&lt;br /&gt;
start() {&lt;br /&gt;
        checkconfig&lt;br /&gt;
	ebegin &amp;quot;Starting vncserver for user '${USER}' on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
	su ${USER} -c &amp;quot;/usr/bin/vncserver ${OPTIONS}&amp;quot;&lt;br /&gt;
	eend $?&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stop() {&lt;br /&gt;
	checkconfig&lt;br /&gt;
	ebegin &amp;quot;Stoping vncserver for user '${USER}' on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
	su ${USER} -c &amp;quot;/usr/bin/vncserver -kill :${DISPLAY}&amp;quot;&lt;br /&gt;
	eend $?&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
restart() {&lt;br /&gt;
	svc_stop&lt;br /&gt;
	svc_start&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make it executable:&lt;br /&gt;
&lt;br /&gt;
 # chmod +x /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now add it to boot:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # rc-update add vncserver default&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And you should be ready to go, if not ''&amp;lt;ufs AT sapo DOT pt&amp;gt;'' &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>PedroAlgarvio</name></author>	</entry>

	<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>2005-06-12T16:21:50Z</updated>
		
		<summary type="html">&lt;p&gt;PedroAlgarvio: =Programs to Start=&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/husband removes the power plug cleaning the room... ;-)&lt;br /&gt;
&lt;br /&gt;
''#!/bin/sh''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
''# Startup/Stop script for vncserver.''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''#Here, the choosen user to run amule''&amp;lt;br&amp;gt;&lt;br /&gt;
''theUser=choosenuser''&amp;lt;br&amp;gt;&lt;br /&gt;
''#And here, the choosen screen to run the vncserver''&amp;lt;br&amp;gt;&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''&amp;lt;br&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
'' 'stop')''&amp;lt;br&amp;gt;&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''*)''&amp;lt;br&amp;gt;&lt;br /&gt;
''echo &amp;quot;Usage: /etc/rc.d/rc.vnc { start | stop }&amp;quot;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''esac''&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;
Modify the following files:&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.local'' add:&lt;br /&gt;
&lt;br /&gt;
''# Start VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''. /etc/rc.d/rc.vnc start''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.6'' add:&lt;br /&gt;
&lt;br /&gt;
''# Shut down the VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''/etc/rc.d/rc.vnc stop''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
''/usr/bin/amule &amp;amp;''&amp;lt;br&amp;gt;&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;;''&amp;lt;br&amp;gt;&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;
== To start [[aMuleWeb]] also at startup: ==&lt;br /&gt;
&lt;br /&gt;
This is probably the most unelegant way to do this, but it seems to work.&lt;br /&gt;
&lt;br /&gt;
The problem is that you have to supply user input when starting [[aMuleWeb]] (the password).&lt;br /&gt;
&lt;br /&gt;
You can circumvent this with supplying a password with the ''-pw'' option: ''amuleweb -pw &amp;quot;&amp;quot;'' (this is for no password, you have to remove the [http://www.ietf.org/rfc/rfc1321.txt MD5 sum] from the ''ECPassword'' entry in your ''~/.eMule'' file for this to work).&lt;br /&gt;
&lt;br /&gt;
Now [[aMuleWeb]] starts without any user input, but unfortunately it wouldn't work when we would just add it to the xstartup-file, because [[aMule]] needs a few seconds more to start up.&lt;br /&gt;
&lt;br /&gt;
Therefor we have to start [[aMuleWeb]] a few seconds after [[aMule]].&lt;br /&gt;
&lt;br /&gt;
To achieve this, we add a line similar to this one:&lt;br /&gt;
&lt;br /&gt;
''/bin/sh /home/aMule/amuleweb-start.sh &amp;amp;''&lt;br /&gt;
&lt;br /&gt;
to the xstartup-file.&lt;br /&gt;
&lt;br /&gt;
And in the home-directory, we create a file called ''amuleweb-start.sh'', with the following content:&lt;br /&gt;
&lt;br /&gt;
  #! /bin/sh&lt;br /&gt;
  sleep 30;&lt;br /&gt;
  /usr/bin/amuleweb -pw &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
That's all.&lt;br /&gt;
&lt;br /&gt;
Like I said, probably extremely amateurish, but it should work...&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''&amp;lt;br&amp;gt;&lt;br /&gt;
''starticewm&amp;amp;''&amp;lt;br&amp;gt;&lt;br /&gt;
''amule''&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [http://www.gentoo.org Gentoo] ==&lt;br /&gt;
&lt;br /&gt;
For [http://www.gentoo.org Gentoo]'ers follow these steps:&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;ATENTION: THE BOOT PROCESS NOW WORKS&amp;lt;/font&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
=== Install [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
This is a how to for a server with no X window manager at all. I only run web and mail services, and of course, aMule. Adapt to you're sictuation.&lt;br /&gt;
I use [http://www.tightvnc.com TightVNC], but should also work with other [http://www.realvnc.com VNC]'s.&lt;br /&gt;
&lt;br /&gt;
 emerge tightvnc&lt;br /&gt;
&lt;br /&gt;
=== Configuring [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
==== Server Config ====&lt;br /&gt;
&lt;br /&gt;
To configure the [http://www.realvnc.com VNC] server, execute:&lt;br /&gt;
&lt;br /&gt;
 vncserver :0&lt;br /&gt;
I'm using '' ''':0''' ''because there isn't no window manager running, so no need to use'' ''':1''' '', plus, it will be simpler to connect to it like this, simply &lt;br /&gt;
 # vncviewer &amp;lt;host&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You'll be asked to answer some questions, such as password, answer accordingly. After you can kill it:&lt;br /&gt;
&lt;br /&gt;
 # vncserver -kill :0&lt;br /&gt;
&lt;br /&gt;
==== Programs to Start ====&lt;br /&gt;
&lt;br /&gt;
Now let's config what should be started with this [http://www.realvnc.com VNC] session:&lt;br /&gt;
edit ~/.vnc/xstartup&lt;br /&gt;
&lt;br /&gt;
 # vi ~/.vnc/xstartup&lt;br /&gt;
&lt;br /&gt;
You should see something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
PATH=&amp;quot;$PATH:/usr/bin&amp;quot;&lt;br /&gt;
xrdb $HOME/.Xresources&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
exec wmaker&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.x.org xterm] is a console, and [http://www.x.org twm] is the window manager. I now use [http://www.windowmaker.org/ WindowMaker], and don't want no terminal, just [[aMule]] so, it's like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
PATH=&amp;quot;$PATH:/usr/bin&amp;quot;&lt;br /&gt;
xrdb $HOME/.Xresources&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
#xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
amule &amp;amp;&lt;br /&gt;
exec wmaker&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Starting [http://www.realvnc.com VNC] at boot ===&lt;br /&gt;
&lt;br /&gt;
Since I won't be starting no Window Manager at boot, but still want [[aMule]] started with the user interface(you could just run [[aMuled]]), I'll need an init script:&lt;br /&gt;
&lt;br /&gt;
 vi /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
Make it look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/sbin/runscript&lt;br /&gt;
# Copyright 1999-2005 Gentoo Foundation&lt;br /&gt;
# Distributed under the terms of the GNU General Public License v2&lt;br /&gt;
# $Header: $&lt;br /&gt;
&lt;br /&gt;
depend() {&lt;br /&gt;
	need net&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
checkconfig() {&lt;br /&gt;
        ebegin &amp;quot;Load config&amp;quot;&lt;br /&gt;
	PATH=&amp;quot;$PATH:/usr/X11R6/bin/&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	# The Username:Group that will run VNC&lt;br /&gt;
	export USER=&amp;quot;vampas&amp;quot;&lt;br /&gt;
	#${RUNAS}&lt;br /&gt;
&lt;br /&gt;
	# The display that VNC will use&lt;br /&gt;
	DISPLAY=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	# Color depth (between 8 and 32)&lt;br /&gt;
	DEPTH=&amp;quot;16&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	# The Desktop geometry to use.&lt;br /&gt;
	#GEOMETRY=&amp;quot;&amp;lt;WIDTH&amp;gt;x&amp;lt;HEIGHT&amp;gt;&amp;quot;&lt;br /&gt;
	#GEOMETRY=&amp;quot;800x600&amp;quot;&lt;br /&gt;
	GEOMETRY=&amp;quot;1024x780&amp;quot;&lt;br /&gt;
	#GEOMETRY=&amp;quot;1280x1024&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	# The name that the VNC Desktop will have.&lt;br /&gt;
	NAME=&amp;quot;aMule&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	OPTIONS=&amp;quot;-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}&amp;quot;&lt;br /&gt;
	eend $? &amp;quot;Config not Loaded&amp;quot;&lt;br /&gt;
} &lt;br /&gt;
	&lt;br /&gt;
start() {&lt;br /&gt;
        checkconfig&lt;br /&gt;
	ebegin &amp;quot;Starting vncserver for user '${USER}' on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
	su ${USER} -c &amp;quot;/usr/bin/vncserver ${OPTIONS}&amp;quot;&lt;br /&gt;
	eend $?&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stop() {&lt;br /&gt;
	checkconfig&lt;br /&gt;
	ebegin &amp;quot;Stoping vncserver for user '${USER}' on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
	su ${USER} -c &amp;quot;/usr/bin/vncserver -kill :${DISPLAY}&amp;quot;&lt;br /&gt;
	eend $?&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
restart() {&lt;br /&gt;
	svc_stop&lt;br /&gt;
	svc_start&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make it executable:&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now add it to boot:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 rc-update add vncserver default&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And you should be ready to go, if not ''&amp;lt;ufs AT sapo DOT pt&amp;gt;'' &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>PedroAlgarvio</name></author>	</entry>

	<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>2005-06-12T16:21:04Z</updated>
		
		<summary type="html">&lt;p&gt;PedroAlgarvio: &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/husband removes the power plug cleaning the room... ;-)&lt;br /&gt;
&lt;br /&gt;
''#!/bin/sh''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
''# Startup/Stop script for vncserver.''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''#Here, the choosen user to run amule''&amp;lt;br&amp;gt;&lt;br /&gt;
''theUser=choosenuser''&amp;lt;br&amp;gt;&lt;br /&gt;
''#And here, the choosen screen to run the vncserver''&amp;lt;br&amp;gt;&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''&amp;lt;br&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
'' 'stop')''&amp;lt;br&amp;gt;&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''*)''&amp;lt;br&amp;gt;&lt;br /&gt;
''echo &amp;quot;Usage: /etc/rc.d/rc.vnc { start | stop }&amp;quot;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''esac''&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;
Modify the following files:&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.local'' add:&lt;br /&gt;
&lt;br /&gt;
''# Start VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''. /etc/rc.d/rc.vnc start''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.6'' add:&lt;br /&gt;
&lt;br /&gt;
''# Shut down the VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''/etc/rc.d/rc.vnc stop''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
''/usr/bin/amule &amp;amp;''&amp;lt;br&amp;gt;&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;;''&amp;lt;br&amp;gt;&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;
== To start [[aMuleWeb]] also at startup: ==&lt;br /&gt;
&lt;br /&gt;
This is probably the most unelegant way to do this, but it seems to work.&lt;br /&gt;
&lt;br /&gt;
The problem is that you have to supply user input when starting [[aMuleWeb]] (the password).&lt;br /&gt;
&lt;br /&gt;
You can circumvent this with supplying a password with the ''-pw'' option: ''amuleweb -pw &amp;quot;&amp;quot;'' (this is for no password, you have to remove the [http://www.ietf.org/rfc/rfc1321.txt MD5 sum] from the ''ECPassword'' entry in your ''~/.eMule'' file for this to work).&lt;br /&gt;
&lt;br /&gt;
Now [[aMuleWeb]] starts without any user input, but unfortunately it wouldn't work when we would just add it to the xstartup-file, because [[aMule]] needs a few seconds more to start up.&lt;br /&gt;
&lt;br /&gt;
Therefor we have to start [[aMuleWeb]] a few seconds after [[aMule]].&lt;br /&gt;
&lt;br /&gt;
To achieve this, we add a line similar to this one:&lt;br /&gt;
&lt;br /&gt;
''/bin/sh /home/aMule/amuleweb-start.sh &amp;amp;''&lt;br /&gt;
&lt;br /&gt;
to the xstartup-file.&lt;br /&gt;
&lt;br /&gt;
And in the home-directory, we create a file called ''amuleweb-start.sh'', with the following content:&lt;br /&gt;
&lt;br /&gt;
  #! /bin/sh&lt;br /&gt;
  sleep 30;&lt;br /&gt;
  /usr/bin/amuleweb -pw &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
That's all.&lt;br /&gt;
&lt;br /&gt;
Like I said, probably extremely amateurish, but it should work...&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''&amp;lt;br&amp;gt;&lt;br /&gt;
''starticewm&amp;amp;''&amp;lt;br&amp;gt;&lt;br /&gt;
''amule''&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [http://www.gentoo.org Gentoo] ==&lt;br /&gt;
&lt;br /&gt;
For [http://www.gentoo.org Gentoo]'ers follow these steps:&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;ATENTION: THE BOOT PROCESS NOW WORKS&amp;lt;/font&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
=== Install [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
This is a how to for a server with no X window manager at all. I only run web and mail services, and of course, aMule. Adapt to you're sictuation.&lt;br /&gt;
I use [http://www.tightvnc.com TightVNC], but should also work with other [http://www.realvnc.com VNC]'s.&lt;br /&gt;
&lt;br /&gt;
 emerge tightvnc&lt;br /&gt;
&lt;br /&gt;
=== Configuring [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
==== Server Config ====&lt;br /&gt;
&lt;br /&gt;
To configure the [http://www.realvnc.com VNC] server, execute:&lt;br /&gt;
&lt;br /&gt;
 vncserver :0&lt;br /&gt;
I'm using '' ''':0''' ''because there isn't no window manager running, so no need to use'' ''':1''' '', plus, it will be simpler to connect to it like this, simply &lt;br /&gt;
 # vncviewer &amp;lt;host&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You'll be asked to answer some questions, such as password, answer accordingly. After you can kill it:&lt;br /&gt;
&lt;br /&gt;
 # vncserver -kill :0&lt;br /&gt;
&lt;br /&gt;
==== Programs to Start ====&lt;br /&gt;
&lt;br /&gt;
Now let's config what should be started with this [http://www.realvnc.com VNC] session:&lt;br /&gt;
edit ~/.vnc/xstartup&lt;br /&gt;
&lt;br /&gt;
 vi ~/.vnc/xstartup&lt;br /&gt;
&lt;br /&gt;
You should see something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
PATH=&amp;quot;$PATH:/usr/bin&amp;quot;&lt;br /&gt;
xrdb $HOME/.Xresources&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
exec wmaker&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.x.org xterm] is a console, and [http://www.x.org twm] is the window manager. I now use [http://www.windowmaker.org/ WindowMaker], and don't want no terminal, just [[aMule]] so, it's like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
PATH=&amp;quot;$PATH:/usr/bin&amp;quot;&lt;br /&gt;
xrdb $HOME/.Xresources&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
#xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
amule &amp;amp;&lt;br /&gt;
exec wmaker&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Starting [http://www.realvnc.com VNC] at boot ===&lt;br /&gt;
&lt;br /&gt;
Since I won't be starting no Window Manager at boot, but still want [[aMule]] started with the user interface(you could just run [[aMuled]]), I'll need an init script:&lt;br /&gt;
&lt;br /&gt;
 vi /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
Make it look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/sbin/runscript&lt;br /&gt;
# Copyright 1999-2005 Gentoo Foundation&lt;br /&gt;
# Distributed under the terms of the GNU General Public License v2&lt;br /&gt;
# $Header: $&lt;br /&gt;
&lt;br /&gt;
depend() {&lt;br /&gt;
	need net&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
checkconfig() {&lt;br /&gt;
        ebegin &amp;quot;Load config&amp;quot;&lt;br /&gt;
	PATH=&amp;quot;$PATH:/usr/X11R6/bin/&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	# The Username:Group that will run VNC&lt;br /&gt;
	export USER=&amp;quot;vampas&amp;quot;&lt;br /&gt;
	#${RUNAS}&lt;br /&gt;
&lt;br /&gt;
	# The display that VNC will use&lt;br /&gt;
	DISPLAY=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	# Color depth (between 8 and 32)&lt;br /&gt;
	DEPTH=&amp;quot;16&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	# The Desktop geometry to use.&lt;br /&gt;
	#GEOMETRY=&amp;quot;&amp;lt;WIDTH&amp;gt;x&amp;lt;HEIGHT&amp;gt;&amp;quot;&lt;br /&gt;
	#GEOMETRY=&amp;quot;800x600&amp;quot;&lt;br /&gt;
	GEOMETRY=&amp;quot;1024x780&amp;quot;&lt;br /&gt;
	#GEOMETRY=&amp;quot;1280x1024&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	# The name that the VNC Desktop will have.&lt;br /&gt;
	NAME=&amp;quot;aMule&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	OPTIONS=&amp;quot;-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}&amp;quot;&lt;br /&gt;
	eend $? &amp;quot;Config not Loaded&amp;quot;&lt;br /&gt;
} &lt;br /&gt;
	&lt;br /&gt;
start() {&lt;br /&gt;
        checkconfig&lt;br /&gt;
	ebegin &amp;quot;Starting vncserver for user '${USER}' on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
	su ${USER} -c &amp;quot;/usr/bin/vncserver ${OPTIONS}&amp;quot;&lt;br /&gt;
	eend $?&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stop() {&lt;br /&gt;
	checkconfig&lt;br /&gt;
	ebegin &amp;quot;Stoping vncserver for user '${USER}' on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
	su ${USER} -c &amp;quot;/usr/bin/vncserver -kill :${DISPLAY}&amp;quot;&lt;br /&gt;
	eend $?&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
restart() {&lt;br /&gt;
	svc_stop&lt;br /&gt;
	svc_start&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make it executable:&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now add it to boot:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 rc-update add vncserver default&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And you should be ready to go, if not ''&amp;lt;ufs AT sapo DOT pt&amp;gt;'' &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>PedroAlgarvio</name></author>	</entry>

	<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>2005-05-02T19:39:08Z</updated>
		
		<summary type="html">&lt;p&gt;PedroAlgarvio: &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/husband removes the power plug cleaning the room... ;-)&lt;br /&gt;
&lt;br /&gt;
''#!/bin/sh''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
''# Startup/Stop script for vncserver.''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''#Here, the choosen user to run amule''&amp;lt;br&amp;gt;&lt;br /&gt;
''theUser=choosenuser''&amp;lt;br&amp;gt;&lt;br /&gt;
''#And here, the choosen screen to run the vncserver''&amp;lt;br&amp;gt;&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''&amp;lt;br&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
'' 'stop')''&amp;lt;br&amp;gt;&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''*)''&amp;lt;br&amp;gt;&lt;br /&gt;
''echo &amp;quot;Usage: /etc/rc.d/rc.vnc { start | stop }&amp;quot;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''esac''&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;
Modify the following files:&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.local'' add:&lt;br /&gt;
&lt;br /&gt;
''# Start VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''. /etc/rc.d/rc.vnc start''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.6'' add:&lt;br /&gt;
&lt;br /&gt;
''# Shut down the VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''/etc/rc.d/rc.vnc stop''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
''/usr/bin/amule &amp;amp;''&amp;lt;br&amp;gt;&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;;''&amp;lt;br&amp;gt;&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;
== To start [[aMuleWeb]] also at startup: ==&lt;br /&gt;
&lt;br /&gt;
This is probably the most unelegant way to do this, but it seems to work.&lt;br /&gt;
&lt;br /&gt;
The problem is that you have to supply user input when starting [[aMuleWeb]] (the password).&lt;br /&gt;
&lt;br /&gt;
You can circumvent this with supplying a password with the ''-pw'' option: ''amuleweb -pw &amp;quot;&amp;quot;'' (this is for no password, you have to remove the [http://www.ietf.org/rfc/rfc1321.txt MD5 sum] from the ''ECPassword'' entry in your ''~/.eMule'' file for this to work).&lt;br /&gt;
&lt;br /&gt;
Now [[aMuleWeb]] starts without any user input, but unfortunately it wouldn't work when we would just add it to the xstartup-file, because [[aMule]] needs a few seconds more to start up.&lt;br /&gt;
&lt;br /&gt;
Therefor we have to start [[aMuleWeb]] a few seconds after [[aMule]].&lt;br /&gt;
&lt;br /&gt;
To achieve this, we add a line similar to this one:&lt;br /&gt;
&lt;br /&gt;
''/bin/sh /home/aMule/amuleweb-start.sh &amp;amp;''&lt;br /&gt;
&lt;br /&gt;
to the xstartup-file.&lt;br /&gt;
&lt;br /&gt;
And in the home-directory, we create a file called ''amuleweb-start.sh'', with the following content:&lt;br /&gt;
&lt;br /&gt;
  #! /bin/sh&lt;br /&gt;
  sleep 30;&lt;br /&gt;
  /usr/bin/amuleweb -pw &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
That's all.&lt;br /&gt;
&lt;br /&gt;
Like I said, probably extremely amateurish, but it should work...&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''&amp;lt;br&amp;gt;&lt;br /&gt;
''starticewm&amp;amp;''&amp;lt;br&amp;gt;&lt;br /&gt;
''amule''&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [http://www.gentoo.org Gentoo] ==&lt;br /&gt;
&lt;br /&gt;
For [http://www.gentoo.org Gentoo]'ers follow these steps:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; ATENTION: THE BOOT PROCESS DOENS'T WORK, I'LL TRY TO FIX IT AS SOON AS POSSIBLE &amp;lt;/h1&amp;gt;&lt;br /&gt;
Why, while my HD Died a couple of days, I had to re-instal gentoo and I'm having some problems with X and fluxbox, as soon as this is fixed, I'll be needing this to works, so change WILL be made to correct what's wrong. Sorry, --[[User:PedroAlgarvio|PedroAlgarvio]] 21:37, 2 May 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
=== Install [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
This is a how to for a server with no X window manager at all. I only run web and mail services, and o course, aMule. Adapt to you're sictuation.&lt;br /&gt;
I use [http://www.tightvnc.com TightVNC], but should also work with other [http://www.realvnc.com VNC]'s.&lt;br /&gt;
&lt;br /&gt;
 emerge tightvnc&lt;br /&gt;
&lt;br /&gt;
=== Configuring [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
==== Server Config ====&lt;br /&gt;
&lt;br /&gt;
To configure the [http://www.realvnc.com VNC] server, execute:&lt;br /&gt;
&lt;br /&gt;
 vncserver :1&lt;br /&gt;
&lt;br /&gt;
You'll be asked to answer some questions, such as password, answer accordingly. After you can kill it:&lt;br /&gt;
&lt;br /&gt;
 vncserver -kill :1&lt;br /&gt;
&lt;br /&gt;
==== Programs to Start ====&lt;br /&gt;
&lt;br /&gt;
Now let's config what should be started with this [http://www.realvnc.com VNC] session:&lt;br /&gt;
edit ~/.vnc/xstartup&lt;br /&gt;
&lt;br /&gt;
 vi ~/.vnc/xstartup&lt;br /&gt;
&lt;br /&gt;
You should see something like:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
&lt;br /&gt;
 xrdb $HOME/.Xresources&lt;br /&gt;
 xsetroot -solid grey&lt;br /&gt;
 xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
 twm &amp;amp;&lt;br /&gt;
&lt;br /&gt;
[http://www.x.org xterm] is a console, and [http://www.x.org twm] is the window manager. I use [http://fluxbox.sourceforge.net fluxbox], and don't want no terminal, just [[aMule]] so, it's like this:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
&lt;br /&gt;
 xrdb $HOME/.Xresources&lt;br /&gt;
 xsetroot -solid grey&lt;br /&gt;
 amule &amp;amp;&lt;br /&gt;
 fluxbox &amp;amp;&lt;br /&gt;
&lt;br /&gt;
=== Starting [http://www.realvnc.com VNC] at boot ===&lt;br /&gt;
&lt;br /&gt;
Since I won't be starting no Window Manager at boot, but still want [[aMule]] started with the user interface(you could just run [[aMuled]]), I'll need an init script:&lt;br /&gt;
&lt;br /&gt;
 vi /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
Make it look like:&lt;br /&gt;
&lt;br /&gt;
 #!/sbin/runscript&lt;br /&gt;
 # Copyright 1999-2005 Gentoo Foundation&lt;br /&gt;
 # Distributed under the terms of the GNU General Public License v2&lt;br /&gt;
 # $Header: $&lt;br /&gt;
&lt;br /&gt;
 depend() {&lt;br /&gt;
        need net&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 checkconfig() {&lt;br /&gt;
        ebegin &amp;quot;Check config&amp;quot;&lt;br /&gt;
        #PATH=&amp;quot;$PATH:/usr/X11R6/bin/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # The Username that will run VNC&lt;br /&gt;
        USER=&amp;quot;vampas&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # The display that VNC will use&lt;br /&gt;
        DISPLAY=&amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # The Desktop geometry to use.&lt;br /&gt;
        #GEOMETRY=&amp;quot;&amp;lt;WIDTH&amp;gt;x&amp;lt;HEIGHT&amp;gt;&amp;quot;&lt;br /&gt;
        #GEOMETRY=&amp;quot;1280x1024&amp;quot;&lt;br /&gt;
        GEOMETRY=&amp;quot;1024x780&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # The name that the VNC Desktop will have.&lt;br /&gt;
        NAME=&amp;quot;aMule&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 start() {&lt;br /&gt;
        checkconfig&lt;br /&gt;
        ebegin &amp;quot;Starting vncserver for user ${USER} on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
        su ${USER} -c &amp;quot;/usr/bin/vncserver -name ${NAME} -geometry ${GEOMETRY} :${DISPLAY}&amp;quot;&lt;br /&gt;
        eend $?&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 stop() {&lt;br /&gt;
        checkconfig&lt;br /&gt;
        ebegin &amp;quot;Stoping vncserver for user ${USER} on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
        su ${USER} -c &amp;quot;/usr/bin/vncserver -kill :${DISPLAY}&amp;quot;&lt;br /&gt;
        eend $?&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 restart() {&lt;br /&gt;
        svc_stop&lt;br /&gt;
        svc_start&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Make it executable:&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now add it to boot:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 rc-update add vncserver default&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And you should be ready to go, if not ''&amp;lt;ufs AT sapo DOT pt&amp;gt;'' &lt;br /&gt;
&lt;br /&gt;
--[[User:PedroAlgarvio|PedroAlgarvio]] 06:10, 2 May 2005 (CEST)&lt;/div&gt;</summary>
		<author><name>PedroAlgarvio</name></author>	</entry>

	<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>2005-05-02T19:37:46Z</updated>
		
		<summary type="html">&lt;p&gt;PedroAlgarvio: =[http://www.gentoo.org Gentoo]=&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/husband removes the power plug cleaning the room... ;-)&lt;br /&gt;
&lt;br /&gt;
''#!/bin/sh''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
''# Startup/Stop script for vncserver.''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''#Here, the choosen user to run amule''&amp;lt;br&amp;gt;&lt;br /&gt;
''theUser=choosenuser''&amp;lt;br&amp;gt;&lt;br /&gt;
''#And here, the choosen screen to run the vncserver''&amp;lt;br&amp;gt;&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''&amp;lt;br&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
'' 'stop')''&amp;lt;br&amp;gt;&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''*)''&amp;lt;br&amp;gt;&lt;br /&gt;
''echo &amp;quot;Usage: /etc/rc.d/rc.vnc { start | stop }&amp;quot;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''esac''&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;
Modify the following files:&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.local'' add:&lt;br /&gt;
&lt;br /&gt;
''# Start VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''. /etc/rc.d/rc.vnc start''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.6'' add:&lt;br /&gt;
&lt;br /&gt;
''# Shut down the VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''/etc/rc.d/rc.vnc stop''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
''/usr/bin/amule &amp;amp;''&amp;lt;br&amp;gt;&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;;''&amp;lt;br&amp;gt;&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;
== To start [[aMuleWeb]] also at startup: ==&lt;br /&gt;
&lt;br /&gt;
This is probably the most unelegant way to do this, but it seems to work.&lt;br /&gt;
&lt;br /&gt;
The problem is that you have to supply user input when starting [[aMuleWeb]] (the password).&lt;br /&gt;
&lt;br /&gt;
You can circumvent this with supplying a password with the ''-pw'' option: ''amuleweb -pw &amp;quot;&amp;quot;'' (this is for no password, you have to remove the [http://www.ietf.org/rfc/rfc1321.txt MD5 sum] from the ''ECPassword'' entry in your ''~/.eMule'' file for this to work).&lt;br /&gt;
&lt;br /&gt;
Now [[aMuleWeb]] starts without any user input, but unfortunately it wouldn't work when we would just add it to the xstartup-file, because [[aMule]] needs a few seconds more to start up.&lt;br /&gt;
&lt;br /&gt;
Therefor we have to start [[aMuleWeb]] a few seconds after [[aMule]].&lt;br /&gt;
&lt;br /&gt;
To achieve this, we add a line similar to this one:&lt;br /&gt;
&lt;br /&gt;
''/bin/sh /home/aMule/amuleweb-start.sh &amp;amp;''&lt;br /&gt;
&lt;br /&gt;
to the xstartup-file.&lt;br /&gt;
&lt;br /&gt;
And in the home-directory, we create a file called ''amuleweb-start.sh'', with the following content:&lt;br /&gt;
&lt;br /&gt;
  #! /bin/sh&lt;br /&gt;
  sleep 30;&lt;br /&gt;
  /usr/bin/amuleweb -pw &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
That's all.&lt;br /&gt;
&lt;br /&gt;
Like I said, probably extremely amateurish, but it should work...&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''&amp;lt;br&amp;gt;&lt;br /&gt;
''starticewm&amp;amp;''&amp;lt;br&amp;gt;&lt;br /&gt;
''amule''&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [http://www.gentoo.org Gentoo] ==&lt;br /&gt;
&lt;br /&gt;
For [http://www.gentoo.org Gentoo]'ers follow these steps:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt; ATENTION: THE BOOT PROCESS DOENS'T WORK, I'LL TRY TO FIX IT AS SOON AS POSSIBLE &amp;lt;/h1&amp;gt;&lt;br /&gt;
Why, while my HD Died a couple of days, I had to re-instal gentoo and I'm having some problems with X and fluxbox, as soon as this is fixed, I'll be needing this to works, so change WILL be made to correct what's wrong. Sorry, --[[User:PedroAlgarvio|PedroAlgarvio]] 21:37, 2 May 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
=== Install [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
This is a how to for a server with no X window manager at all. I only run web and mail services, and o course, aMule. Adapt to you're sictuation.&lt;br /&gt;
I use [http://www.tightvnc.com TightVNC], but should also work with other [http://www.realvnc.com VNC]'s.&lt;br /&gt;
&lt;br /&gt;
 emerge tightvnc&lt;br /&gt;
&lt;br /&gt;
=== Configuring [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
==== Server Config ====&lt;br /&gt;
&lt;br /&gt;
To configure the [http://www.realvnc.com VNC] server, execute:&lt;br /&gt;
&lt;br /&gt;
 vncserver :1&lt;br /&gt;
&lt;br /&gt;
You'll be asked to answer some questions, such as password, answer accordingly. After you can kill it:&lt;br /&gt;
&lt;br /&gt;
 vncserver -kill :1&lt;br /&gt;
&lt;br /&gt;
==== Programs to Start ====&lt;br /&gt;
&lt;br /&gt;
Now let's config what should be started with this [http://www.realvnc.com VNC] session:&lt;br /&gt;
edit ~/.vnc/xstartup&lt;br /&gt;
&lt;br /&gt;
 vi ~/.vnc/xstartup&lt;br /&gt;
&lt;br /&gt;
You should see something like:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
&lt;br /&gt;
 xrdb $HOME/.Xresources&lt;br /&gt;
 xsetroot -solid grey&lt;br /&gt;
 xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
 twm &amp;amp;&lt;br /&gt;
&lt;br /&gt;
[http://www.x.org xterm] is a console, and [http://www.x.org twm] is the window manager. I use [http://fluxbox.sourceforge.net fluxbox], and don't want no terminal, just [[aMule]] so, it's like this:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
&lt;br /&gt;
 xrdb $HOME/.Xresources&lt;br /&gt;
 xsetroot -solid grey&lt;br /&gt;
 amule &amp;amp;&lt;br /&gt;
 fluxbox &amp;amp;&lt;br /&gt;
&lt;br /&gt;
=== Starting [http://www.realvnc.com VNC] at boot ===&lt;br /&gt;
&lt;br /&gt;
Since I won't be starting no Window Manager at boot, but still want [[aMule]] started with the user interface(you could just run [[aMuled]]), I'll need an init script:&lt;br /&gt;
&lt;br /&gt;
 vi /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
Make it look like:&lt;br /&gt;
&lt;br /&gt;
 #!/sbin/runscript&lt;br /&gt;
 # Copyright 1999-2005 Gentoo Foundation&lt;br /&gt;
 # Distributed under the terms of the GNU General Public License v2&lt;br /&gt;
 # $Header: $&lt;br /&gt;
&lt;br /&gt;
 depend() {&lt;br /&gt;
        need net&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 checkconfig() {&lt;br /&gt;
        ebegin &amp;quot;Check config&amp;quot;&lt;br /&gt;
        #PATH=&amp;quot;$PATH:/usr/X11R6/bin/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # The Username that will run VNC&lt;br /&gt;
        USER=&amp;quot;vampas&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # The display that VNC will use&lt;br /&gt;
        DISPLAY=&amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # The Desktop geometry to use.&lt;br /&gt;
        #GEOMETRY=&amp;quot;&amp;lt;WIDTH&amp;gt;x&amp;lt;HEIGHT&amp;gt;&amp;quot;&lt;br /&gt;
        #GEOMETRY=&amp;quot;1280x1024&amp;quot;&lt;br /&gt;
        GEOMETRY=&amp;quot;1024x780&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # The name that the VNC Desktop will have.&lt;br /&gt;
        NAME=&amp;quot;aMule&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 start() {&lt;br /&gt;
        checkconfig&lt;br /&gt;
        ebegin &amp;quot;Starting vncserver for user ${USER} on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
        su ${USER} -c &amp;quot;/usr/bin/vncserver -name ${NAME} -geometry ${GEOMETRY} :${DISPLAY}&amp;quot;&lt;br /&gt;
        eend $?&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 stop() {&lt;br /&gt;
        checkconfig&lt;br /&gt;
        ebegin &amp;quot;Stoping vncserver for user ${USER} on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
        su ${USER} -c &amp;quot;/usr/bin/vncserver -kill :${DISPLAY}&amp;quot;&lt;br /&gt;
        eend $?&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 restart() {&lt;br /&gt;
        stop&lt;br /&gt;
        start&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Make it executable:&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now add it to boot:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 rc-update add vncserver default&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And you should be ready to go, if not ''&amp;lt;ufs AT sapo DOT pt&amp;gt;'' &lt;br /&gt;
&lt;br /&gt;
--[[User:PedroAlgarvio|PedroAlgarvio]] 06:10, 2 May 2005 (CEST)&lt;/div&gt;</summary>
		<author><name>PedroAlgarvio</name></author>	</entry>

	<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>2005-05-02T19:33:44Z</updated>
		
		<summary type="html">&lt;p&gt;PedroAlgarvio: =Programs to Start=&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/husband removes the power plug cleaning the room... ;-)&lt;br /&gt;
&lt;br /&gt;
''#!/bin/sh''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
''# Startup/Stop script for vncserver.''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''#Here, the choosen user to run amule''&amp;lt;br&amp;gt;&lt;br /&gt;
''theUser=choosenuser''&amp;lt;br&amp;gt;&lt;br /&gt;
''#And here, the choosen screen to run the vncserver''&amp;lt;br&amp;gt;&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''&amp;lt;br&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
'' 'stop')''&amp;lt;br&amp;gt;&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''*)''&amp;lt;br&amp;gt;&lt;br /&gt;
''echo &amp;quot;Usage: /etc/rc.d/rc.vnc { start | stop }&amp;quot;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''esac''&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;
Modify the following files:&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.local'' add:&lt;br /&gt;
&lt;br /&gt;
''# Start VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''. /etc/rc.d/rc.vnc start''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.6'' add:&lt;br /&gt;
&lt;br /&gt;
''# Shut down the VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''/etc/rc.d/rc.vnc stop''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
''/usr/bin/amule &amp;amp;''&amp;lt;br&amp;gt;&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;;''&amp;lt;br&amp;gt;&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;
== To start [[aMuleWeb]] also at startup: ==&lt;br /&gt;
&lt;br /&gt;
This is probably the most unelegant way to do this, but it seems to work.&lt;br /&gt;
&lt;br /&gt;
The problem is that you have to supply user input when starting [[aMuleWeb]] (the password).&lt;br /&gt;
&lt;br /&gt;
You can circumvent this with supplying a password with the ''-pw'' option: ''amuleweb -pw &amp;quot;&amp;quot;'' (this is for no password, you have to remove the [http://www.ietf.org/rfc/rfc1321.txt MD5 sum] from the ''ECPassword'' entry in your ''~/.eMule'' file for this to work).&lt;br /&gt;
&lt;br /&gt;
Now [[aMuleWeb]] starts without any user input, but unfortunately it wouldn't work when we would just add it to the xstartup-file, because [[aMule]] needs a few seconds more to start up.&lt;br /&gt;
&lt;br /&gt;
Therefor we have to start [[aMuleWeb]] a few seconds after [[aMule]].&lt;br /&gt;
&lt;br /&gt;
To achieve this, we add a line similar to this one:&lt;br /&gt;
&lt;br /&gt;
''/bin/sh /home/aMule/amuleweb-start.sh &amp;amp;''&lt;br /&gt;
&lt;br /&gt;
to the xstartup-file.&lt;br /&gt;
&lt;br /&gt;
And in the home-directory, we create a file called ''amuleweb-start.sh'', with the following content:&lt;br /&gt;
&lt;br /&gt;
  #! /bin/sh&lt;br /&gt;
  sleep 30;&lt;br /&gt;
  /usr/bin/amuleweb -pw &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
That's all.&lt;br /&gt;
&lt;br /&gt;
Like I said, probably extremely amateurish, but it should work...&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''&amp;lt;br&amp;gt;&lt;br /&gt;
''starticewm&amp;amp;''&amp;lt;br&amp;gt;&lt;br /&gt;
''amule''&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [http://www.gentoo.org Gentoo] ==&lt;br /&gt;
&lt;br /&gt;
For [http://www.gentoo.org Gentoo]'ers follow these steps:&lt;br /&gt;
&lt;br /&gt;
=== Install [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
This is a how to for a server with no X window manager at all. I only run web and mail services, and o course, aMule. Adapt to you're sictuation.&lt;br /&gt;
I use [http://www.tightvnc.com TightVNC], but should also work with other [http://www.realvnc.com VNC]'s.&lt;br /&gt;
&lt;br /&gt;
 emerge tightvnc&lt;br /&gt;
&lt;br /&gt;
=== Configuring [http://www.realvnc.com VNC] ===&lt;br /&gt;
&lt;br /&gt;
==== Server Config ====&lt;br /&gt;
&lt;br /&gt;
To configure the [http://www.realvnc.com VNC] server, execute:&lt;br /&gt;
&lt;br /&gt;
 vncserver :1&lt;br /&gt;
&lt;br /&gt;
You'll be asked to answer some questions, such as password, answer accordingly. After you can kill it:&lt;br /&gt;
&lt;br /&gt;
 vncserver -kill :1&lt;br /&gt;
&lt;br /&gt;
==== Programs to Start ====&lt;br /&gt;
&lt;br /&gt;
Now let's config what should be started with this [http://www.realvnc.com VNC] session:&lt;br /&gt;
edit ~/.vnc/xstartup&lt;br /&gt;
&lt;br /&gt;
 vi ~/.vnc/xstartup&lt;br /&gt;
&lt;br /&gt;
You should see something like:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
&lt;br /&gt;
 xrdb $HOME/.Xresources&lt;br /&gt;
 xsetroot -solid grey&lt;br /&gt;
 xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
 twm &amp;amp;&lt;br /&gt;
&lt;br /&gt;
[http://www.x.org xterm] is a console, and [http://www.x.org twm] is the window manager. I use [http://fluxbox.sourceforge.net fluxbox], and don't want no terminal, just [[aMule]] so, it's like this:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
&lt;br /&gt;
 xrdb $HOME/.Xresources&lt;br /&gt;
 xsetroot -solid grey&lt;br /&gt;
 amule &amp;amp;&lt;br /&gt;
 fluxbox &amp;amp;&lt;br /&gt;
&lt;br /&gt;
=== Starting [http://www.realvnc.com VNC] at boot ===&lt;br /&gt;
&lt;br /&gt;
Since I won't be starting no Window Manager at boot, but still want [[aMule]] started with the user interface(you could just run [[aMuled]]), I'll need an init script:&lt;br /&gt;
&lt;br /&gt;
 vi /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
Make it look like:&lt;br /&gt;
&lt;br /&gt;
 #!/sbin/runscript&lt;br /&gt;
 # Copyright 1999-2005 Gentoo Foundation&lt;br /&gt;
 # Distributed under the terms of the GNU General Public License v2&lt;br /&gt;
 # $Header: $&lt;br /&gt;
&lt;br /&gt;
 depend() {&lt;br /&gt;
        need net&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 checkconfig() {&lt;br /&gt;
        ebegin &amp;quot;Check config&amp;quot;&lt;br /&gt;
        #PATH=&amp;quot;$PATH:/usr/X11R6/bin/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # The Username that will run VNC&lt;br /&gt;
        USER=&amp;quot;vampas&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # The display that VNC will use&lt;br /&gt;
        DISPLAY=&amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # The Desktop geometry to use.&lt;br /&gt;
        #GEOMETRY=&amp;quot;&amp;lt;WIDTH&amp;gt;x&amp;lt;HEIGHT&amp;gt;&amp;quot;&lt;br /&gt;
        #GEOMETRY=&amp;quot;1280x1024&amp;quot;&lt;br /&gt;
        GEOMETRY=&amp;quot;1024x780&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # The name that the VNC Desktop will have.&lt;br /&gt;
        NAME=&amp;quot;aMule&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 start() {&lt;br /&gt;
        checkconfig&lt;br /&gt;
        ebegin &amp;quot;Starting vncserver for user ${USER} on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
        su ${USER} -c &amp;quot;/usr/bin/vncserver -name ${NAME} -geometry ${GEOMETRY} :${DISPLAY}&amp;quot;&lt;br /&gt;
        eend $?&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 stop() {&lt;br /&gt;
        checkconfig&lt;br /&gt;
        ebegin &amp;quot;Stoping vncserver for user ${USER} on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
        su ${USER} -c &amp;quot;/usr/bin/vncserver -kill :${DISPLAY}&amp;quot;&lt;br /&gt;
        eend $?&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 restart() {&lt;br /&gt;
        stop&lt;br /&gt;
        start&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Make it executable:&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/init.d/vncserver&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now add it to boot:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 rc-update add vncserver default&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And you should be ready to go, if not ''&amp;lt;ufs AT sapo DOT pt&amp;gt;'' &lt;br /&gt;
&lt;br /&gt;
--[[User:PedroAlgarvio|PedroAlgarvio]] 06:10, 2 May 2005 (CEST)&lt;/div&gt;</summary>
		<author><name>PedroAlgarvio</name></author>	</entry>

	<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>2005-05-02T04:10:10Z</updated>
		
		<summary type="html">&lt;p&gt;PedroAlgarvio: &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/husband removes the power plug cleaning the room... ;-)&lt;br /&gt;
&lt;br /&gt;
''#!/bin/sh''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
''# Startup/Stop script for vncserver.''&amp;lt;br&amp;gt;&lt;br /&gt;
''#''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''#Here, the choosen user to run amule''&amp;lt;br&amp;gt;&lt;br /&gt;
''theUser=choosenuser''&amp;lt;br&amp;gt;&lt;br /&gt;
''#And here, the choosen screen to run the vncserver''&amp;lt;br&amp;gt;&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''&amp;lt;br&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
'' 'stop')''&amp;lt;br&amp;gt;&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''*)''&amp;lt;br&amp;gt;&lt;br /&gt;
''echo &amp;quot;Usage: /etc/rc.d/rc.vnc { start | stop }&amp;quot;''&amp;lt;br&amp;gt;&lt;br /&gt;
'';;''&lt;br /&gt;
&lt;br /&gt;
''esac''&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;
Modify the following files:&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.local'' add:&lt;br /&gt;
&lt;br /&gt;
''# Start VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''. /etc/rc.d/rc.vnc start''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&lt;br /&gt;
&lt;br /&gt;
In ''/etc/rc.d/rc.6'' add:&lt;br /&gt;
&lt;br /&gt;
''# Shut down the VNC server''&amp;lt;br&amp;gt;&lt;br /&gt;
''if [ -x /etc/rc.d/rc.vnc ]; then''&amp;lt;br&amp;gt;&lt;br /&gt;
''/etc/rc.d/rc.vnc stop''&amp;lt;br&amp;gt;&lt;br /&gt;
''fi''&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;''&amp;lt;br&amp;gt;&lt;br /&gt;
''/usr/bin/amule &amp;amp;''&amp;lt;br&amp;gt;&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;;''&amp;lt;br&amp;gt;&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;
== To start [[aMuleWeb]] also at startup: ==&lt;br /&gt;
&lt;br /&gt;
This is probably the most unelegant way to do this, but it seems to work.&lt;br /&gt;
&lt;br /&gt;
The problem is that you have to supply user input when starting [[aMuleWeb]] (the password).&lt;br /&gt;
&lt;br /&gt;
You can circumvent this with supplying a password with the ''-pw'' option: ''amuleweb -pw &amp;quot;&amp;quot;'' (this is for no password, you have to remove the [http://www.ietf.org/rfc/rfc1321.txt MD5 sum] from the ''ECPassword'' entry in your ''~/.eMule'' file for this to work).&lt;br /&gt;
&lt;br /&gt;
Now [[aMuleWeb]] starts without any user input, but unfortunately it wouldn't work when we would just add it to the xstartup-file, because [[aMule]] needs a few seconds more to start up.&lt;br /&gt;
&lt;br /&gt;
Therefor we have to start [[aMuleWeb]] a few seconds after [[aMule]].&lt;br /&gt;
&lt;br /&gt;
To achieve this, we add a line similar to this one:&lt;br /&gt;
&lt;br /&gt;
''/bin/sh /home/aMule/amuleweb-start.sh &amp;amp;''&lt;br /&gt;
&lt;br /&gt;
to the xstartup-file.&lt;br /&gt;
&lt;br /&gt;
And in the home-directory, we create a file called ''amuleweb-start.sh'', with the following content:&lt;br /&gt;
&lt;br /&gt;
  #! /bin/sh&lt;br /&gt;
  sleep 30;&lt;br /&gt;
  /usr/bin/amuleweb -pw &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
That's all.&lt;br /&gt;
&lt;br /&gt;
Like I said, probably extremely amateurish, but it should work...&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''&amp;lt;br&amp;gt;&lt;br /&gt;
''starticewm&amp;amp;''&amp;lt;br&amp;gt;&lt;br /&gt;
''amule''&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[http://www.gentoo.org Gentoo]==&lt;br /&gt;
For Gentoo'ers follow these steps:&lt;br /&gt;
=== Install VNC ===&lt;br /&gt;
This is a how to for a server with no X window manager at all. I only run web and mail services, and o course, aMule. Adapt to you're sictuation.&lt;br /&gt;
I use TightVNC, but should also work with other VNC's.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
emerge tightvnc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Configuring VNC ===&lt;br /&gt;
==== Server Config ====&lt;br /&gt;
To configure the vnc server, execute:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vncserver :1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;br&amp;gt;You'll be asked to answer some questions, such as password, answer accordingly. After you can kill it:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vncserver -kill :1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Programs to Start ====&lt;br /&gt;
Now let's config what should be started with this VNC session:&lt;br /&gt;
edit ~/.vnc/xstartup&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi ~/.vnc/xstartup&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;br&amp;gt;You should see something like:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
xrdb $HOME/.Xresources&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&lt;br /&gt;
twm &amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;br&amp;gt;xterm is a console, and twm is the window manager. I use fluxbox, and don't want no terminal, just amule so, it's like this:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
xrdb $HOME/.Xresources&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
amule &amp;amp;&lt;br /&gt;
fluxbox &amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===Starting VNC at boot===&lt;br /&gt;
Since I won't be starting no Window Manager at boot, but still want aMule started with the user interface(you could just run the *amuled*), I'll need an init script:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi /etc/init.d/vncserver&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;br&amp;gt;Make it look like:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/sbin/runscript&lt;br /&gt;
# Copyright 1999-2005 Gentoo Foundation&lt;br /&gt;
# Distributed under the terms of the GNU General Public License v2&lt;br /&gt;
# $Header: $&lt;br /&gt;
&lt;br /&gt;
depend() {&lt;br /&gt;
        need net&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
checkconfig() {&lt;br /&gt;
        ebegin &amp;quot;Check config&amp;quot;&lt;br /&gt;
        #PATH=&amp;quot;$PATH:/usr/X11R6/bin/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # The Username that will run VNC&lt;br /&gt;
        USER=&amp;quot;vampas&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # The display that VNC will use&lt;br /&gt;
        DISPLAY=&amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # The Desktop geometry to use.&lt;br /&gt;
        #GEOMETRY=&amp;quot;&amp;lt;WIDTH&amp;gt;x&amp;lt;HEIGHT&amp;gt;&amp;quot;&lt;br /&gt;
        #GEOMETRY=&amp;quot;1280x1024&amp;quot;&lt;br /&gt;
        GEOMETRY=&amp;quot;1024x780&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # The name that the VNC Desktop will have.&lt;br /&gt;
        NAME=&amp;quot;aMule&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
start() {&lt;br /&gt;
        checkconfig&lt;br /&gt;
        ebegin &amp;quot;Starting vncserver for user ${USER} on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
        su ${USER} -c &amp;quot;/usr/bin/vncserver -name ${NAME} -geometry ${GEOMETRY} :${DISPLAY}&amp;quot;&lt;br /&gt;
        eend $?&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stop() {&lt;br /&gt;
        checkconfig&lt;br /&gt;
        ebegin &amp;quot;Stoping vncserver for user ${USER} on localhost:${DISPLAY}&amp;quot;&lt;br /&gt;
        su ${USER} -c &amp;quot;/usr/bin/vncserver -kill :${DISPLAY}&amp;quot;&lt;br /&gt;
        eend $?&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
restart() {&lt;br /&gt;
        stop&lt;br /&gt;
        start&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Make it executable:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod +x /etc/init.d/vncserver&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Now add it to boot:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rc-update add vncserver default&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
&amp;lt;br&amp;gt;And you should be ready to go, if not &amp;lt;ufs AT sapo DOT pt&amp;gt;. --[[User:PedroAlgarvio|PedroAlgarvio]] 06:10, 2 May 2005 (CEST) &lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>PedroAlgarvio</name></author>	</entry>

	</feed>