It's one heckuva trek to cooler tech

Desktop Software

Showing 1 - 2 of 2 Results | Page 1 of 1 | 1

Virtualbox as a Remote Desktop Server

14-Feb-10 22:14

You can turn an old computer into a graphic terminal for the latest operating systems.

VirtualBox has gained a following as an alternative to VMware. Although the binaries are proprietary, they're free for non-commercial use. VirtualBox has some compelling features for desktop users:

  • Automated installer that runs under Windows, Linux, and OSX. For Linux users, there are official versions for Ubuntu, Debian, openSUSE, Fedora, Red Hat Enterprise. A 64-bit CPU with hardware virtualization support helps, but isn't required.
  • User interface that's easy to grasp. The documentation is well-organized. If you get stuck, there's a large community forum.
  • Desktop integration with video and mouse. VirtualBox runs your virtual machine in a seamless window, just like normal applications. By installing Guest Additions, you can run your VM in high resolution with video acceleration.
  • File exchange. VirtualBox's Shared Folders let your VM read and write files on your local drive. Of course, you can also use networking to access file shares outside the VM's virtual drive.

Remote Connections

There's one VirtualBox feature, however, that makes it stand out for me: you can access a VM from another computer -- not just the host machine -- using any client software compatible with Micosoft's Remote Desktop Protocol (RDP). When you run the Remote Desktop Connection software in Windows (from the Start | Accessories menu), you're using RDP.

What's so great about an RDP connection to a virtual machine? Say you have an older computer without enough raw speed or RAM to run the latest operating systems and applications. Using RDP, you can turn that machine into a graphic terminal, with access to any operating system you can install in VirtualBox on your more powerful computer. Or maybe you just want to have instant access to a VM running a different operating system, from anywhere on your network.

Server Configuration in Ubuntu

Authentication is the main hurdle to sharing a VirtualBox VM with RDP. VirtualBox's RDP server needs to know what port to listen on, and what authentication method to use. Even if you don't care about security, you may need to configure it anyway: In Ubuntu, I could not get RDP to work with the default "Null" setting. So the first step is to open your VM's Display settings, click on the Remote Display tab, checkmark the "Enable Server" box, and change the Authentication Method to "External".

Change your VM's authentication method to External

You can leave the Port set to the standard (3389) unless you need to run multiple RDP sessions simultaneously. In that case, each VM must use a different port number.

Next, you'll need to to create an external authentication service. This is just a matter of changing some settings. Go to the /etc/pam.d directory and create a file called vrdpauth with these lines:

auth required pam_unix.so
account required pam_unix.so broken_shadow

Execute the export command to set the VRDP_AUTH_PAM_SERVICE environment variable. Add it to ~/.bashrc so that it's automatically set the next time you log in:

export VRDP_AUTH_PAM_SERVICE=vrdpauth

Last, start the VM -- either normally, or from the command line. The latter method runs the VM "headless" (no display), and waits for a connection. This makes it perfect for automated startup and especially if you're running VirtualBox on a pure server that doesn't run X-Windows or a GUI desktop. The command to start a headless VM is:

VBoxHeadless --startvm <uuid|name>

Client Configuration: Rdesktop

If your client PC runs Linux, rdesktop is probably your best option. Most GUI apps in Linux like "Terminal Services Client" are just wrappers around rdesktop. It's worth getting familiar with the rdesktop parameters, particularly if you need to troubleshoot your connection. Test it first on the same machine hosting the VM, with a command like the following:

rdesktop -a 16 -u john -p - localhost:3389

In this example, "16" is the bits per pixel, "john" is the username, "localhost" is the machine serving the VM, and "3389" is the port number. The username must exist on the host. Also, note the hyphen after "-p", which will prompt for the password.

If your test works, run the same command from your client PC, replacing "localhost" with the hostname or IP of the server. Now, you can enjoy the latest applications, even on underpowered computers. I've used RDP to connect from my aging Thinkpad A20 laptop (Pentium III, 700 mhz CPU). Aside from streaming video, it runs with suitable speed.

The main limitation is the screen resolution on the client. If 1024x768 is the most it can do, then set your VM's resolution to the same. Use Ctrl-Alt-Enter to toggle fullscreen mode and get rid of the scroll bars.

For more about RDP in Virtualbox, download the VirtualBox PDF user manual  or read it online.

Paul Saletan has a background in product management, survey research, reporting and database development. He lives in Austin, Texas.

View comments for this article


Pandora and LastFM From a Terminal Window

16-Jan-10 01:20

A good music player should be heard and seldom seen.

We're used to accessing multimedia content on the net through our web browsers. The browser makes sense when you're viewing video like YouTube. However, it can be overkill for listening to a music station. There are a couple of excellent Linux applications that you can run from a terminal window. They also consume fewer resources, making them perfect for lower end hardware. Plus, they can even filter out the periodic ads, giving you a commercial-free listening experience.

Pianobar is a client for the Pandora music service. Shell-FM does the same for Last.FM. Both are straightforward to install for those who are comfortable with the command line.

Pianobar running from a terminal window

Pianobar Installation

The README file says you'll need some development packages before you can build Pianobar. In Ubuntu 9.04, I installed the following with Synaptic or apt-get:

git-core
cmake
libao-dev
libfaad-dev
libmad0-dev

Create a home directory for the source code, and download it:

cd ~/src
git clone git://github.com/PromyLOPh/pianobar.git

Then build and install it, watching for errors:

cd pianobar
cmake . (note: don't forget the period)
make
sudo make install

Running Pianobar

Just type pianobar <Enter>. You'll be prompted for your Pandora.com username and password, then shown a menu with your stations. Press the "?" key at any time to show the available commands.

Avoid having to type your login information by storing them in the configuration file. Edit ~/.config/pianobar/config:

user = your-account-email-address
password = your-password

Pianobar may time out after a few hours if you don't touch it. This is fair. While Pandora may not know that your client isn't using a web browser and viewing its ads, the service pays royalties to the record industry and needs some way to control use. Moreover, they may be doing you a favor by preventing you from using up your free hours if you walk away from the computer and forget it's still running.

Upgrades to the Pandora service or to the library dependencies may break Pianobar. This problem is easily fixed. A symptom is a message like this when you start up:

(i) Login... Error: Protocol incompatible. Please upgrade libpiano.

The fix may as easy as recompiling the old source code using newer libraries already on your computer. Try re-doing the installation steps above starting with "cmake". If that fails, you may need to grab the latest source code, and repeat the install (move your old source code directory first).

Shell-FM Installation

You know the drill by now. Get the latest source code with git, similar to the steps above for Pianobar:
cd ~/src
git clone git://github.com/jkramer/shell-fm.git
Build and install:
cd shell-fm
make
sudo make install

Running Shell-FM

Type shell-fm <Enter>. After your first use, look for or create the file ~/.shell-fm/shell-fm.rc. The Tux Wears Fedora site shows you an example configuration. The key lines are:

username = your-user-name
password = your-password
default-radio = lastfm://user/your-user-name/your-station-name
The shell-fm terminal window

See the manual (man shell-fm) for more parameters and settings. Advanced users may want to look at the scripts subdirectory of the source code for examples of remote controlling the app.

Wrapping Up

They're very plain looking, but that's the point. If you think a good music player should be heard and not necessarily seen, Pianobar and LastFM may be for you.

Paul Saletan has a background in product management, survey research, reporting and database development. He lives in Austin, Texas.

View comments for this article


Showing 1 - 2 of 2 Results | Page 1 of 1 | 1

Recent Posts