Wednesday, 21 March 2007

amule & amuled

Well, work's not too hectic at the moment, so I thought I'd get a few posts knocked off while I had a chance.

The trusty P-III upstairs has recently taken on ed2k duties at the Steele household. I'll get round to writing about this at some point, but it used to be Win2k server running emule, and now it's FC5 and it's running...aMule. Emule itself is open source, and probably the most-used successor of the original eDonkey 2000 client. I've been running it for years on low-end hardware with Win2k and it's hardly ever done me wrong. Actually I've been using Emule Plus, but there's very little difference, AFAIK...

This software seems pretty neat. You have to install WxWidgets (whatever they may be), to get it to work, but this didn't present a challenge to me on FC5.

Now, I used to run Emule 24x7 on the Win2k box in a Terminal Services session, and this worked pretty well. I used to need to log in to add ed2k links and, after my failed attempts at getting bandwidth shaping to work, throttle back the bandwidth when my wife wanted to web browse (chuckle). After a couple of weeks of using Amule in FreeNX, I just wasn't geting the same experience. Suspending the session more often than not seemed to cause amule to just stop downloading (though this could have been my imagination), and it was pretty unresponsive (probably more to do with the old hardware it's running on than anything else).

Enter amuled. This is, as the name suggests, a lovely little bit of software from the developer of amule which is simply amule without a GUI. There's a few tricks to getting it working though, hence this JE...

Assuming you've got amuled running, and have tried amulecmd (the CLI tool for amuled), and amuleGUI and/or amuleweb without success

Make sure the following is present in your ~/.aMule/amule.conf and your ~/.aMule/remote.conf for good measure:

ECUseTCPPort=1

You may have to create this line, or set 0 to 1, as apparently Unix sockets are not working in this release (2.1.3). So use good ol' TCP/IP...

Next, enter the md5sum of the password, there's a way to determine this on the command line, but I don't have it to hand at the moment. Enter this as:

Password=b43555325d34534340534e435

That's not my actual password hash, BTW :)

With these two bits in place, it should be possible to connect to amuled via amulecmd, amulegui and amuleweb. I found this info tucked away on a forum somewehere, so hopefully, this will help it reach a wider audience.

Goodnight and Good luck :)

FreeNX

I've been playing around with getting FreeNX working on my new old Fedora Box. (My "trusty" P-III 550, more about this later if anyone's interested). There's plenty of info out there on the subject, but to anyone who's a bit of an X newbie (like me), It can get a bit confusing when it comes to talk of servers and clients.

Now, most people who've been using Linux a while probably know all this already, but I was a command line Linux guy until last June or so, so I'm going to write it down in case anyone like me is stuck. You never know, someone might find it useful.

When using the X Window System, you have an X server running. X applications are termed as X "clients". X servers can (with some encouragement) accept connections from X clients on remote machines. In theory all one has to do is set the correct $DISPLAY variable, run the app from the cmd line where that DISPLAY variable is set, and up it pops up on the desktop of the remote machine. There's probably some extra black magic you have to do to get this working through NAT etc, but my work network is all VPN'd up, so doing this from a machine in, say, Norway is as easy as doing it from a machine across the room. So far so useful.

The next technology to introduce, and one which some may be familiar with is VNC. On Linux, you run a vncserver as a given user and it starts up a virtual session, which can be made to look exactly like the desktop you would see whilst sitting in front of the machine. On the machine itself, you see nothing, it's all going on behind the scenes. This is useful, but the way it does it is by transmitting bitmaps (compressed or otherwise) across the network, which can slow things down fairly considerably.

FreeNX takes this a step further by doing some funky things (which I still haven't really looked into too much), to compress and generally speed things up. From an end user point of view, it's been said to make X usable over a 56k link. I've yet to see this, but other people have confirmed this sort of thing.

There's plenty of info on how to get it all installed and running. I found lots of useful stuff here, and there's stuff dotted all round the internet (though this guide seems the most definitive). So, in short:

-Install The server bits:
# yum install freenx
-Or, if you don't have the luxury of a package manager
# rpm -Uvh nx-blah.blah.rpm
# rpm -Uvh freenx-blah.blah.rpm

Here's the science bit: concentrate. Ricks Stout makes this fairly clear, but I missed it the first time. Look in /var/lib/nxserver, this is the nx user's home directory as defined in /etc/passwd. In here, you'll see home/.ssh (full path: /var/lib/nxserver/home.ssh). There's a file in here called client.id_dsa.key. Grab this, or its contents at least - you'll need it

Get hold of the client from NoMachine.com. Get it running as directed by Mr Stout, when you get to the "Show the Advanced configuration dialog"-stage, get the file shown above and import this into the "General - Key Management" dialog. This is what I missed, and got very confused about SSH key pairs, whether I had the server/client terminolgy mixed up etc. I kept getting Authentication errors, and 'twas most frustrating. Check you've got the right one by looking at the client.id_dsa.key on the server and what's in the dialog box (or at least the first and last few characters.

Click OK to everything, and you should have your very own FreeNX session running. Congrats!

A few gotchas:

Make sure you run your SSH server on port 22. Obviously this is the default, but I'd been running mine on port 443 because that's the only way I could access my home network from work. NX seemed to get most of the way through its init and then crap out because it couldn't find an SSH server on port 22 at the remote end. I solved this by forwarding the SSH server from port 22 on the machine to port 443 on the router.

Although the Nomachine client claims to have suspend/resume functionality, take this with a pinch of salt. k3b wasn't too happy when a session time out and I logged onto it again. Ah well, I needed some new coasters anyway...

If I think of any more, I'll add to this post. Until then, happy remote access!

Is this thing on..?

Hi all: a new blog. I doubt it will be widely read, but then I doubt I'll maintain it as much as I should, If anyone does happen on it I hope they find it useful and/or enlightening, and entertaining, of course.