Posts Tagged ‘Ubuntu’

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.

Task Switching in Compiz-Fusion

Friday, July 27th, 2007

Being a sucker for all kinds of eye-candy, I’ve been running the latest builds of Compiz-Fusion. I’ve got to say that it is fantastic and makes the desktop experience a much more pleasurable one.

One of the things that has caused an issue is that the Application Switcher plugin (ALT+TAB) keeps on switching to every second window. Very annoying if you have only an even number of windows on the desktop.

Today, after breaking Compiz with an update, I managed to get it behaving itself by essentially reinstalling it - but the fix for the application switcher is even easier!

To fix the switcher

  • Open up the CompizConfig Settings Manager
  • Under Window Management, click on Application Switcher
  • Click on the Actions tab
  • If you have multiple entries for the application switcher (like in this screenshot), you need to make sure that YOU ONLY HAVE SHORTCUTS SET FOR 1 GROUP.
    CompizConfig Application Switcher
  • Once you have cleared the settings so that only one ‘Next Window’ and ‘Prev Window’ shortcut is used, test it out.

And that is it! I think that the only reason that it became an issue was that some settings were inherited from Beryl.

Open docx files in OpenOffice on Ubuntu

Wednesday, July 18th, 2007

I’ve been using Office 2007 quite happily for some time now. But the niggles are starting to hit me.

One of the main issues is the new .docx format not being supported across the board yet. And with me being a sucker for all things new, I have to make a point of saving an alternate version to open in OpenOffice.

Until now.

I found this little nugget on the Ubuntu forums to install the Novell converter in Ubuntu:

1) Download the file odf-converter-1.0.0-5.i586.rpm from http://download.novell.com/SummaryFree.jsp?buildid=ESrjfdE4U58~

2) Use alien to convert it to a Slackware tgz file
alien -ct odf-converter-1.0.0-5.i586.rpm

3) Unpack the slackware tgz file
tar xzf odf-converter-1.0.0.tgz

4) Copy three files into your OpenOffice.org directories — note that the usr that you’re copying from is a directory that was inside the tgz file (3 lines here)
sudo cp usr/lib/ooo-2.0/program/OdfConverter /usr/lib/openoffice/program/

sudo cp usr/lib/ooo-2.0/share/registry/modules/org/openoffice/TypeDetection/Filter/MOOXFilter_cpp.xcu /usr/lib/openoffice/share/registry/modules/org/openoffice/TypeDetection/Filter/

sudo cp usr/lib/ooo-2.0/share/registry/modules/org/openoffice/TypeDetection/Types/MOOXTypeDetection.xcu /usr/lib/openoffice/share/registry/modules/org/openoffice/TypeDetection/Types/

Once I restarted OpenOffice, I found that it could import basic docx files quite happily.

This worked nicely for me in Feisty Fawn - although it’s a good idea to make sure that OpenOffice is up-to-date.

Extract Audio from DVDs in Ubuntu

Sunday, June 24th, 2007

I wanted to extract Marillion’s cover of Toxic today, which lives on the DVD release of Thankyou Whoever You Are / Most Toys.

I found a useful page over at Ubuntu Geek which covered the topic nicely using a tool called transcode, which I’ve used a little of in the past.

I was having some difficulties with this one though, as transcode only worked on a few titles on the DVD. After a bit of testing, I discovered that this wasn’t woking on titles that had no video.

Eventually I settled on this command line to extract the song:

transcode -i /dev/dvd -x null,dvd -T 4,1,1 -a 0 -y null,ogg -o MarillionToxic.ogg

Here’s the breakdown:
transcode - run transcode
-i /dev/dvd - set the input to the DVD drive
-x null,dvd - set the input modules. As I don’t want video, I’ve used null and then dvd for the audio channel
-T 4,1,1 - set the Title 4, Chapter 1, Angle 1, which is the Toxic track on the DVD
-a 0 - set the audio track (the first is 0 on DVDs)
-y null,ogg - sets the output to ogg. Once again, I’ve forced null for the video
-o MarillionToxic.ogg - finally, I’ve set the filename for extracting the audio.

The whole track was extracted from DVD in a matter of seconds. Brilliant.

Ubuntu 7.04 fails to mount USB drive after kernal upgrade

Monday, June 4th, 2007

After the recent Feisty kernal update, I found that I couldn’t access a USB drive without using root priveledges in the command prompt.

When plugging a USB flash drive in, I’d get the following error:
Cannot Mount Volume

Cannot mount volume.

You are not privileged to mount the volume ‘drivename’.

The problem is the new way that Ubuntu identifies disk drives on your system, and also some changes in the mounting system. What I had to do was edit the /etc/fstab file to correct the error. So here goes:

  • Insert the USB pen drive into the USB port
  • Click Applications > Accessories > Terminal
  • type dmesg
  • Read the last entry that appears on screen (you should see some errors or warnings), and then type sudo gedit /etc/fstab
  • Here you need to find the connection between your error:
    [ 1025.759465] NTFS-fs warning (device hde1): parse_options(): Option utf8 is no longer supported, using option nls=utf8. Please use option nls=utf8 in the future and make sure utf8 is compiled either as a module or into the kernel. [ 1026.098973] NTFS vomµçVÖRfW'6–öâ2ãàУÂö6öFS
    and the fstab:
    proc /proc proc defaults 0 0 # Entry for /dev/sdb1 : UUID=2966f4fe-7f28-4017-b986-1ca801944b4f / ext3 defaults,errors=remount-ro 0 1 # Entry for /dev/sdb5 : UUID=68989c2d-87a1-4a4f-b5d7-210790b336c4 none swap sw 0 0 /dev/hdd /media/cdrom0 udf,iso9660 user,noauto 0 0 /dev/ /media/floppy0 auto rw,user,noauto 0 0 none /proc/bus/usb usbfs devgid=100,devmode=666 0 0 /dev/sda1 /media/VistaHDD ntfs umask=222,utf8 0 0
  • For me, the connection is the ntfs-fs error and the list listed drive. The error says that I can’t use UTF8, so it’s stopping before it mounts the USB drive.
  • If you think that you’ve found the connection, comment out the line with a hash:
    #/dev/sda1 /media/VistaHDD ntfs umask=222,utf8 0 0
  • Save the file, then try and put the USB drive back in the computer again
  • If it works, great. If not, run dmesg again, and check the error is the same - then comment out the appropriate entry again.

This is mainly to do with recent kernal upgrades, which are changing a number of features. I’m sure it’s good in the long run!

Dual booting causes clocks to go mental!

Monday, April 30th, 2007

Yes.

Although only half a year for a user such as myself.

As I’m happily dual-booting between Ubuntu and Windows at the moment, it becomes clear that in British Summer Time (BST), Windows and Linux disagree on how the computer clock should be interpreted.

What’s really a nuisance is that I keep staying up an hour later than I intended!

Basically, the problem boils down to how Windows and Unix-based systems interpret the computer’s internal clock. There’s more about this here, including some pros and cons of either system.

Windows takes the local computer clock time, and treats it as a ‘local’ time. That is, the clock matches the time that it should be in the region. Mac and Linux systems treat the computer’s clock as GMT, and then makes any adjustemnts inside the Operating System.

The bottom line is, unless you’re living in a GMT timezone - you’re going to get the time constantly changing as you switch between operting systems on the same computer.

The simplest way to get around this is to ask Windows to use UTC time instead of local time:

Copy and paste the following into a new file called time.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001

Save the file, and double-click on it. Accept the various warnings that appear.

Once Windows has been rebooted, make sure that the clock is set to the correct time. The time should now settle down as you dual-boot between systems.

Now I’ll be able to go to bed at the right time!