<?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=69.196.131.248</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=69.196.131.248"/>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/Special:Contributions/69.196.131.248"/>
		<updated>2026-04-05T19:47:15Z</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>2008-06-29T01:30:55Z</updated>
		
		<summary type="html">&lt;p&gt;69.196.131.248: typo&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')''&amp;lt;br&amp;gt;&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;/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;
By Aleksy: Note for Slackware:&lt;br /&gt;
if you use kde as X with vncserver, please add one more env variable to PATH=.....:/opt/kde/bin. in other case you will get gray screen after launching vncviewer. OR you can add to xstartup (before startkde) PATH=&amp;quot;/opt/kde/bin:&amp;quot;$PATH.&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 problems (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>69.196.131.248</name></author>	</entry>

	</feed>