aMule Forum

English => aMule Help => Topic started by: masqy on February 28, 2006, 06:02:47 PM

Title: runnig remote
Post by: masqy on February 28, 2006, 06:02:47 PM
when I ssh home, (via putty), I try something like:
 
$ amule &
 
and get a msg:
 Error: Unable to initialize gtk, is DISPLAY set properly?
 
then I tried typing something like: (this is supposed to be the local screen back there)

$ DISPLAY=10.0.0.30:0.0
and
$export DISPLAY
 
and tried again , and got the same error... I don't want to see the graphics on the win machine I use now, I just want to start the amule client there, as if someone was sitting there and run it locally there. (then I can use its server to  control it via http)

any help?
Title: Re: runnig remote
Post by: stefanero on February 28, 2006, 06:12:22 PM
heyho

2ways run teh daemon, and then use amuleweb like you said:

http://www.amule.org/wihttp://forum.amule.org/thread.php?threadid=9278&boardid=9&sid=ki/index.php/HowTo_Compile_aMuled

or

start a x-server with vnc for example and start amule in the vnc session, then you can use amuleweb and/or vnc-client

http://www.amule.org/wiki/index.php/How_to_launch_VNC_with_aMule_at_Linux_boot


the export display would only work

IF
a x-server is already running, means someone is already logged in, and he would alow connections from your host (localhost).
but usually this is not the case, thats why the otehr 2 methods are more easy and commen for setup

stefanero
Title: webserver doesn't start
Post by: masqy on February 28, 2006, 06:48:16 PM
well.. the first link you gave is broken..

secondly, I left the user there logged on, and, managed now to run there amule....

however, the WebServer doesn't start, althoguh I did change the

~/.amule/amule.conf

[WebSerber]
enabled=1


and entered a passwd there (when I was working on the local comp. there)
Title: Re: runnig remote
Post by: stefanero on February 28, 2006, 07:08:11 PM
post your amule.conf

check this link http://wiki.amule.org/

there is the daemon howto and the webserver howto

have fun reading :)
Title: Re: runnig remote
Post by: darksidex on March 01, 2006, 11:23:48 AM
umm, not sure, but "[WebServer]...." should be in ~/.amule/remote.conf if you are using amuled.
Title: RE: webserver doesn't start
Post by: ken on March 02, 2006, 08:29:51 AM
Quote
Originally posted by masqy
however, the WebServer doesn't start, althoguh I did change the

~/.amule/amule.conf

[WebSerber]
enabled=1


and entered a passwd there (when I was working on the local comp. there)

You also need to enable External Connections (EC) and provide an EC password.  Yes, that's in addition to the webserver password.  The EC password authenticates amuleweb to amule, the webserver password authenticates the web visitor to amuleweb.
Title: starting amule via cron
Post by: Ezeltje on May 03, 2006, 07:55:09 PM
Quote
Originally posted by masqy
when I ssh home, (via putty), I try something like:
 
$ amule &
 
and get a msg:
 Error: Unable to initialize gtk, is DISPLAY set properly?
 

I am seeing the same error message trying to start aMule CVS from a cron job.

This works fine on the command line:
Code: [Select]
/usr/local/bin/amule --only-chuck-norris-would-stop-me &But if I try to execute it via cron I get that gtk display error message. Scanning the replies I don't see a clear answer. Is there one?
Title: Re: runnig remote
Post by: lfroen on May 04, 2006, 08:59:51 AM
Quote
I am seeing the same error message trying to start aMule CVS from a cron job.

From cron ?! Are you (re-)starting every hour ?

"amule" is gui application - it intended to be started on local desktop machine. In case you running it remotely witn X forwarding you should ensure following:
1. There's X server running locally. This is not the case where you connecting from windows machine. Windows is not X server, you know. You should start X emulator before connecting with putty. cygwin X is good one.
2. X connection forwarding is enabled. There's -X option for ssh, or checkbox in putty options.

For using webserver for remote control:
http://www.amule.org/wiki/index.php/AMuleWeb (http://www.amule.org/wiki/index.php/AMuleWeb)

May be you want to use daemon part of amule ? Command is amuled, it can be controlled with webserver.
Title: Re: runnig remote
Post by: Ezeltje on May 04, 2006, 12:34:07 PM
Quote
Originally posted by lfroen
From cron ?! Are you (re-)starting every hour ?

"amule" is gui application - it intended to be started on local desktop machine. In case you running it remotely witn X forwarding
[...]

No, no, I am not trying to do any fancy X forwarding stuff.

Since v2.1 was released, I have been having problems with a catastrophic memory leak, which I first posted about here back in January, which I have discussed at length with others, and which, as far as I can tell, is still unresolved.

As a workaround, I want to kill amule every 24 hours and restart it. To do this, I have the simplest possible shell script which I call once a day from cron:

Code: [Select]
killall amule
sleep 15
/usr/local/bin/amule --only-chuck-norris-would-stop-me &

Alas, this script generates the DISPLAY error message mentioned above.

No remote control/port forwarding/daemons/ etc etc etc. I just want to automatically restart amule GUI on my desktop box. c'est tout.
Title: Re: runnig remote
Post by: stefanero on May 04, 2006, 02:56:46 PM
1st.
you need to "know" the display where your x-server is running on most setups this is :0

2nd.

allow connections from clients to this x-server, as a start you can simple type (in a terminal from that x-server)

xhost +

3.rd

add a line to your cron script

export display="localhost:0"


hope this helps
Title: Re: runnig remote
Post by: phoenix on May 04, 2006, 08:11:59 PM
Quote
Originally posted by Ezeltje
Since v2.1 was released, I have been having problems with a catastrophic memory leak, which I first posted about here back in January, which I have discussed at length with others, and which, as far as I can tell, is still unresolved.
How about we try to figure out what is going on? I am using the CVS code and it's been a long time I can't sense a memory leak. Could you try to compile a CVS snapshot?

Also, to show your memory leak, try to gather some periodic result of
$ ps u -C amule

Cheers!
Title: Re: runnig remote
Post by: Ezeltje on May 04, 2006, 09:36:57 PM
Quote
Originally posted by phoenix
How about we try to figure out what is going on? I am using the CVS code and it's been a long time I can't sense a memory leak.!
Ok, great.

At the moment, I am running the 01-April CVS. While I download and compile the latest snapshot, please take a look at this earlier thread I posted, aMule 2.1.1 memory usage (http://forum.amule.org/thread.php?threadid=9505&sid=) if you haven't already seen it. I report some of the memory usage figures I obtained with top.
Title: Re: runnig remote
Post by: lfroen on May 04, 2006, 09:45:05 PM
Quote
No, no, I am not trying to do any fancy X forwarding stuff.
Quote
when I ssh home, (via putty), I try something like $amule:

Either you have no idea what are you doing or you experiencing memory blackouts.
Running something via putty is that "fancy X forwarding" in case you did not know.

You want run remotely - use amuled. Wanna restart periodically - run with cron, but set $DISPLAY correctly and do "xhost +localhost". That must be all.
Title: Re: runnig remote
Post by: Kry on May 04, 2006, 09:59:38 PM
no, lfroen. He can ssh home and run amule IN HIS HOME BOX.

I use screen for that purpose.
Title: Re: runnig remote
Post by: Ezeltje on May 04, 2006, 10:02:13 PM
Quote
Originally posted by lfroen
Quote
No, no, I am not trying to do any fancy X forwarding stuff.
Quote
when I ssh home, (via putty), I try something like $amule:

Either you have no idea what are you doing or you experiencing memory blackouts.
Running something via putty is that "fancy X forwarding" in case you did not know.

You want run remotely - use amuled. Wanna restart periodically - run with cron, but set $DISPLAY correctly and do "xhost +localhost". That must be all.

Ifroen: I think you are mixing up the problems of two different users. User masqy was using putty to do whatever he was trying to do. I was doing something different but was seeing the same error message. The first quote above is mine; the second his.  Your confusion is probably my fault for "hijacking" masqy's thread. ;)

phoenix: maybe we should continue our discussion about the leak on the thread I mentioned above?...
Title: Re: runnig remote
Post by: lfroen on May 05, 2006, 08:47:41 AM
Quote
no, lfroen. He can ssh home and run amule IN HIS HOME BOX.
Yes, he can, but I've got an impression that guy expected to _see_ gui window coming up; in which case he would need X forwarding.

Quote
   lfroen: I think you are mixing up the problems of two different users
Both of you messing up the $DISPLAY by starting gui program in weird ways. Gui program is expected to run from clicking on icon in gnome/kde/whatever. When doing something different - please take your time to understand where gui window is supposed to appear. This is what $DISPLAY is about (roughly).
Your first monitor on local machine is ":0.0"
And remember to allow local connections with "xhost +localhost"
Title: Re: runnig remote
Post by: netgas on June 26, 2006, 04:49:00 AM
run amuled on the server and connect remotely with webinterface or much better with amulegui under windows or linux. For windows there is also a precompiled version. very comfortable. The problem is, if you run amuled on linux on startup, then in executes as root. Though i access to downloaded stuff via samba, i alway have to change the permissions with ssh, because the downloaded files belong to root and choose another Incoming directory, because samba doesn't work with directories starting with dot i.e.  .aMule/

hope, this could help
Title: Re: runnig remote
Post by: lfroen on June 26, 2006, 05:20:41 AM
Quote
if you run amuled on linux on startup, then in executes as root.
Not nessesery. That depends on your setup.