Posts Tagged ‘Ubuntu’

Using Rhythmbox as a Media Renderer

Monday, April 28th, 2008

I upgraded to Ubuntu 8.04 Hardy Heron over the weekend. The process was relatively painless, and some of the upgrades made little, but nice, improvements.

Finally, the UPNP media rendering functionality in Rhythmbox is working!

To set this up, you need to access the command line, and install the pyhton-coherence package:

sudo apt-get install python-coherence

Once installed, fire up Rhythmbox, and click on Edit > Plugins.

Once there, tick the box for DLNA/UPnP to enable UPnP.

Rhythmbox Plugins Menu

Click Close and you should see a new shared tab on the left, which will list your network UPnP servers.

It’s somewhat limited in that it doesn’t present you with the various folder views that other media renderers will - but at least you can pick out music from network devices.

Rhythmbox Shared Tab

Cool.

Vista, Why You Eat my Computer?

Friday, April 4th, 2008

So, Vista’s been out for a while now - some people think it’s great (usually they are selling it), some think that it’s pants.

Now, I’m not far from the front of the queue when it comes to raving about Linux. Ubuntu was the second Linux distro that I have tried, and I’ve stuck with it quite happily. In fact, things have remained pretty good from my initial post about my first experiences with Ubuntu.

On the other hand, Windows has it’s own place in the world. If you’re a person who can afford Microsoft’s astronomical licensing costs - then Microsoft can offer you some great things too.

Unfortunately, I don’t feel that Windows Vista is one of those great things.

Slug on Mogadon

The thing that strikes me whenever I use Vista is that it is so slow. Not just slow, but slooooooow. I have to use a variety of systems, and when I need to fix somebody’s laptop that is running Vista I should be putting an afternoon aside.

This isn’t entirely Microsoft’s fault. Consumer greed, business greed and the general desire to get more for less has also led to this rocky road to Hell. Computers and notebooks are generally sold cheap. Cheap means under-spec. Even up to the end of Windows XP’s golden lifespan (I’m not saying it’s past it, by the way), computer manufacturers were selling new systems with 256MB RAM. I’m sorry, but I’ve used Windows XP enough to know that as soon as you put on Service Pack 2, some anti-virus software, maybe some anti-malware package and then decide to run a few applications - time begins to speed up around you. Either that or the computer is running slowly. You decide.

Now Vista has mammoth requirements for what is essentially a core program. The minimum amount of RAM to run Vista is 512MB. That’s what I say is minimum for XP nowadays. I recommend having more than 1GB RAM installed for a pleasant Vista experience.

The problem is, noteboook manufacturers might even stump up the extra £5 to put 1GB of RAM in - but when 256MB of RAM is then being stolen by the onboard graphics so that you can see the Aero effects, things are clearly still not right.

Vista will run well on a decent, modern computer system. The problem is that Joe Public will be sold some tat from PC World by a part-time A-level student who will bestow Vista’s Flip-3D as a major selling point. Oh, it can burn DVDs as well.

Real Life

When real-life steps in, this is unsuitable for a lot of computers. Microsoft wants business to be using its latest baby, but on any existing hardware - Vista just doesn’t make the crunch.

My computer is almost 4 years old and runs Ubuntu beautifully. I have 1GB which more than meets any application requirements. In fact, this only becomes a problem when I run Windows XP in a virtual machine. Ironically, XP demands more memory running a few apps than the operating system that it is running on! And Ubuntu has a barrel more services, a 3D desktop, and (when I’m using it), about 10-15 application windows open!

Dual-boot

So I’m dual-booting into Vista at the moment. I do this when I fancy a game of Command and Conquer Generals with my brother over the internet. I often say, “I’ll just boot into Windows - give me 15 minutes.” Usually by the end of that time Windows may have finished messing around with updates, defragging, loading unneccesary services and generally being slow (on a 2.4GHz P4 with 1GB RAM), before I feel that I can get the thing to behave and run reasonably well.

I’ve been stung enough times when Vista decides that the ideal time to start defragging my hard disk drive and running an anti-spyware scan is during the middle of a game.

False Hope

When I was using the Beta versions of Vista, it was slow - but I figured that it was due to being a Beta. There was a clear effort from Redmond to meet Vista’s release date and there was a buzz. Vista naysayers were told to wait for the RTM (release to manufacturing) version. But overall, the performance wasn’t a great deal better in the RTM version.

More False Hope

Service Pack 1 was a glimmer of hope. Some performance increases and a rollup of some updates that fix what I can only describe as stupid problems that should never have been in the RTM version (such as having to Activate Windows after it has already been activated).

I thought I’d give this a try on my system. Guess what? It didn’t install. I wasn’t surprised. The update need prerequisites installed, and othr bits and bobs. I’d already had difficulty getting these installed on other computers, so I have a grave thought that it would mess up my system.

It didn’t install - but at least it didn’t wreck my system. Microsoft’s answer is to just keep trying until it works. Umm, I don’t have hours to piss away waiting for my work computer to continuously fail to install an update that takes around an hour to work out if it wants to install or now.

So, I gave up after attempt 3 or 4. I tried installing manually from the downloads. It’s not right. Vista feels inherently broken.

Time to Upgrade

So it’s time to upgrade to XP. It’s a joke I’ve seen floating around the internet for a while now, but it’s exactly how I’m feeling. I’m going to dual-boot into XP for playing games. It can run fast, and doesn’t have some of the hardware quirks that I’m still experiencing with Vista.

Over time, my disappointment with Vista has settled. It’s OK - but it’s extremely lacking in key areas. And these key areas tip the boat for me.

I’m just thankful that I run a Linux O/S as my main home operating system. I know it’s stable. I know it will behave itself most of the time. It’s still frustrating to use occasionally, but these times of frustration occur much less than when I use Vista.

Extract Windows resources with icotool

Sunday, November 11th, 2007

I was playing around with Wine the other day. It’s pretty cool that I can run Dreamweaver and Fireworks on Ubuntu with very few issues now.

One of the problems I did encounter was that the setup program for Dreamweaver wouldn’t run under wine, and the program files had to be copied across to my Linux system from an existing Windows installation.

Once done, it ran with no problems - but I now had to create the icon in the Applications menu.

Creating the menu entry was straightforward enough - I just copied the Fireworks link and edited it to work with Dreamweaver. The problem was that I really wanted the icon to sit nicely.

After scouring a few forums, it turned out that Ubuntu already had a set of programs available in the repositories called icoutils.

After working out what binaries were installed:
dpkg -L icoutils

I played around with some of the tools. I can’t remember exactly what I did, so I’ll just say play with the tools. You can extract ICOs easily from DLLs and executables, and save them as ICO files or other formats.

Once done, I had a pretty Dreamweaver icon that looked better than the Fireworks one that Wine extracted!

What’s even funnier is that to get a tool in Windows to do this kind of thing inevitably lead to using shareware.

Secure Remote Access with Ubuntu

Thursday, November 8th, 2007

I needed to set up some remote access today, and although it was straightforward, it was difficult finding the information I needed.

Set up the server (that’s your computer)

  1. Click System > Preferences > Remote Desktop
  2. Tick the boxes as shown, and set up a password. If you don’t want to force a popup window when a connection is made, don’t tick the Ask for your confirmation box
    Remote Desktop Preferences
  3. Click close
  4. Install the ssh server:
    sudo apt-get install ssh
    This will allow access to your computer to be encrypted and secure (vnc is relatively insecure otherwise)

If you’re going to connect over the internet, you need to set up port 22 to forward to your computer. It’s a little convoluted, so I wont go into that here. If you’re just doing it on a home network, then it is not a problem.

Right, now you’re ready to connect. On another Linux PC (guest):

  1. In the terminal, run
    ssh -L 5900:localhost:5900 user@yourpc
  2. Now run (not in the terminal) vncviewer localhost:0

user@youpc is a valid computer user and hostname or IP address (ie. john@homepc.com).

What this does is create an ssh tunnel from one computer to another, and tells the guest computer to use this connection when using VNC (which is why we use localhost, rather than the computer’s IP address or name).

It works a charm, and is much more secure than opening the ports to the outside world.

Searching for the contents of many files in Linux

Tuesday, October 16th, 2007

One thing that I find remarkable in Linux is the vast array of clever tools that allow you to do ‘clever stuff’.

The problem exists where these obscure tools are difficult to work out how to use effectively, and moreover, use right.

One task I aim to do occasionally is search a disk for files containing particular text. This is always difficult. Even in Windows XP - the search indexing service actually prevents Windows from searching for specific text within a file. I’ve searched for files that I know have certain strings in them, only for Windows to tell me that it cannot find them.

As my love of Linux and Ubuntu grows, I found myself needing to perform this task again. Recently, I’ve scraped by using the rather useful find tool:

find . -type f -name foobar

What this little snippet does is seach the current directory and all subdirectories for any files containing the word foobar in the name. So it could return names such as ./foobar.doc, ./test/foobar.doc, or ./this is a foobar file name.txt. Pretty useful.

Tonight I needed to search for a specific phrase in a Word document on a disk. This is where the Linux command line really becomes powerful:

find . -type f -name *.doc -print0 | xargs -0 grep -i 'foo bar'

This will join the power of two commands: grep and find to create a groovy search.

First of all, the find command is searching for all files (-type f) that end in .doc (-name *.doc) in all folders starting from the folder I am in.

Once find finds a match, we use the pipe (the |) to pass that file name over to grep, which will search the file for the string foo bar.

We have to use the -print0 and -0 options to make sure that find and grep share the file names correctly between them in case we find any unusual ones (files with spaces would be counted as unusual).

Finally, the -i tells grep that the search is case-insensitive. This means that any .doc file with foo bar, Foo Bar, fOO bAR or any other case variation will be caught. Without it, only the exact string will be matched.

Now go forth and search!

Selecting a sound device in Ubuntu

Sunday, July 29th, 2007

I’ve found that using the ALSA sound system in Ubuntu is pretty slick, but becomes a pain when the sound tool in Ubuntu doesn’t correctly switch devices using the graphical user interface.

In a nutshell, here are a few useful commands to list and select the sound devices that are on your computer:

asoundconf list - list available sound cards
asoundconf set-default-card # - set the default sound card. Replace # with the device name from the previous command
alsamixer # - adjust volume settings for your specific sound card. Once again, replace # with the device.

Running through these 3 commands will probably save any user a great deal of grief in the long run.