Showing posts with label wireless. Show all posts
Showing posts with label wireless. Show all posts

Sunday, February 7, 2010

XRDP, the best remote access software under Linux

My desktop PC is in my basement office, which is a nice place but somewhat inconvenient.  I really wanted a way to access it remotely from my laptop but had trouble finding a remote-access application that was fast enough.

Both my laptop and desktop are wireless, so there are 2 wireless "hops" between my machines and when logged into my desktop from my laptop each command (i.e. a click or keystroke) has 4 wireless hops to go through before my screen displays the result.  So speed is key. 

Remote access servers that didn't work out

I tried pretty much every remote access server I could find.  I was already familiar with VNC, and that was a perfectly viable option but my desktop has dual monitors, so there was a pretty big difference in screen resolutions and one of VNC's real weaknesses IMHO is that the client is forced to use the screen resolution of the server.  I didn't want to be scrolling around a lot so I axed that idea. 

Next I tried SSH with X forwarding enabled (using the -Y option).  That was nice and simple since all of the software and keys were already in place, but it was too slow, even with the -C option (which enables compression, effectively speeding up the rate of transfer).  FreeNX is a similar solution, and although it was somewhat faster some of the time, it didn't provide a consistently high level of performance so I had to reject both solutions.


Gnome also offers the option of logging into another machine via XDMCP.  When booting my laptop, I would stop at the login screen, hit Options, then "Remote Login via XDMCP".  In addition to stopping me from running any applications or doing anything else on my laptop while logged into my desktop remotely, this proved to be too slow also, so I canned the idea.


I was about to give up when I discovered xrdp.


XRDP

XRDP is a service that I installed on my desktop to enable it to accept RDP connections from my laptop.  Ubuntu already comes with an RDP client, tsclient, installed by default, and I've used Windows XP's Remote Desktop a lot at work so I know how well it works.  XRDP is in the Ubuntu repositories so I installed it on my desktop and now I can log into it from my laptop using the same program I use to log into my computer at work, and the speed more than adequate.  It is really great to be able to program, run virtual machines, and do many other resource-intensive operations from my laptop.

XRDP has a few quirks that I decided I could live with, but it is worth mentioning them here:
  1. It depends upon the package "tightvncserver" being installed on the server (the machine you are logging into), although it isn't configured as a dependency in the package (this was the case as of the last time I set up XRDP, which was a while ago so hopefully they have fixed this).  Install tightvncserver before you attempt to install XRDP.
  2. You may install the XRDP package and have it work just fine until you reboot the server.  This is because XRDP sometimes has difficulty figuring out whether it is running or not, so when the server is rebooting and it tries to start XRDP, XRDP thinks it is already running even though it isn't and refuses to start.  You can fix that by running this:
         sudo sesman --kill
         sudo xrdp --kill
         sudo rm /var/run/xrdp/xrdp.pid
         sudo sesman
         sudo xrdp
  3. There is no way to log into the console session.  So if I was working at my desktop and had to get up for something, I can't resume what I was doing on my laptop.  Windows XP provides the "/console" command-line switch which allows you to take over the session that is currently displayed on the machine's screen, but there is no way to do that with XRDP.  There might be a way to do it within Gnome; I'm not sure at the moment.
  4. If you do anything in the remote session that makes a sound, the sound will be played on the server's speakers, not your client's speakers.  So the first thing I hear when logging into my desktop is the sound of the Ubuntu login music being played on my desktop speakers, down the stairs and two rooms away.  This is a very minor annoyance to me but it is worth mentioning.
So now I have exactly what I set out to get: an easy-to-use remote access method that is fast and reliable.  It is really great to be able to open tsclient (you will find it on the Internet menu, it is called "Terminal Server Client") and see my desktop.  I highly recommend it!

Saturday, November 14, 2009

Hulu quest, Part 3: Crunchbang

In my quest for Flash that could handle Hulu videos, I started distro hopping and settled on Crunchbang 9.04. I've used Crunchbang before; it is basically a slimmed-down customization of Ubuntu, with all the bloat removed. Gnome and all of its various supporting applications such as Nautilus and Evolution have been stripped out and replaced with Openbox, a lightweight window manager and such applications as PCManFM, the lightening-fast file manager, Claws mail, Terminator, the terminal emulator, and a lot of the usual suspects like Firefox, Rhythmbox, VLC, AbiWord and Gnumeric, and Pidgin. It even comes with a few things that Ubuntu doesn't come with by default, such as Skype, MP3 and DVD playback capabilities, and our friend, the Adobe Flash plugin.

Crunchbang, like Ubuntu, automatically installed the drivers for my wireless card and I was back on the internet within minutes of completing the installation. I can't tell you what a relief it was to have wireless back after a few days of sitting in the corner of Mrs. Jizldrangs' office, tethered to the router with a LAN cable!

To make a long story short, I never did get Flash to where I could use Hulu. I tried a bunch of stuff after getting Crunchbang set up, such as installing libgl-mesa-dev, and after that didn't work I installed Hulu Desktop and that was pretty terrible.

The closest thing I had to success was when I went directly to Adobe's website and downloaded their Flash plugin for Linux. The version up there at the time of this posting is 10.0.32.18, and it didn't exactly give me smooth Hulu shows but the shows were the smoothest yet. You can get it by going to the Adobe's Flash Player Download Center, dropping down the menu at the bottom and selecting ".deb for Ubuntu 8.04+", then hitting "Agree and Install Now". That will download the package to your desktop. When it is finished you will have to install it using:

$ sudo dpkg -i /path-to-deb-package/install_flash_player_10_linux.deb

When I did that I received an error that there were 2 dependencies, libnspr4-dev and libnss3-dev that were not installed, so I did:

$ sudo apt-get install libnspr4-dev libnss3-dev

It took about 15 seconds to install those libraries, after which I reran the dpkg command above and I was in business (or, at least, as "in business" as I was going to get, considering that Hulu still wasn't watchable). If you do this, watch out for the update manager as it will try to "update" your flash player to the worse one in the repos.

So I spent several days distro hopping to get this working and came up empty-handed. I really don't understand why this is so difficult; I realize that this is an older laptop but it has been playing full-screen DVDs since Mrs. Jizldrangs bought it for grad school way back in 2003. It has a lot more memory now than it did back then, so it seems like it should definitely be able to handle these lower-quality videos on the web. On the other hand, my desktop, which is a quad-core machine with more RAM and a much newer graphics card, handles Flash just fine, so I guess that either my laptop doesn't have the resources or the hardware is not adequately supported under Linux (it has an ATI Radeon Mobility 7500, and I've seen several forum posts saying that ATI, now AMD, is dropping support for it after a certain version of Xorg; that angle may be worth chasing down).

Hopefully some of my future posts will be about how I was actually sucessfull in getting stuff to work...