Linux

Configure PulseAudio for Skype to work with your USB handset

After installing the latest version of Skype (2.1.0.47) on Karmic I tried to configure it to work with my USB handset but the options didn’t give me a device selection any more. The only option available was PulseAudio with the sound going through my speakers, and my handset mic was not recognised at all.

To rectify this so you can use Skype without the other sounds on your system getting mixed in we need to do the following:

Install PulseAudio Device Chooser – this will install a number of extra packages, including PulseAudio Volume Control

sudo apt-get install padevchooser

Restart your system.

Launch Applications > Sound & Video > PulseAudio Device Chooser – you’ll see its new icon in the notification area. Click it, open Preferences… and select Start applet on session login.

PulseAudio Device Chooser Preferences

Close the window.

Plug in your handset and start Skype if you haven’t done so already.

Right-click the volume control in the notification area and open Sound Preferences (or open it through System > Preferences).

Sound Preferences

Click on Input and your handset will be listed there – select it. You probably will have to crank up the Input volume, mine was very low to start with. Close the window.

Click on the PulseAudio Device Chooser icon (the jack) in the notification area and select Volume Control.

PulseAudio Volume Control 1

You can see that I only have Amarok showing up in the control at the moment as Skype is not in a call.

Start a test call and set your USB handset as the output device.

PulseAudio Volume Control 2

One problem I have with this is that whenever I unplug my handset the settings are lost and I need to reconfigure each time I reconnect it.


Display Amarok album art in Conky

The latest versions of Conky can be used to not just display text but also images, amongst other cool stuff like drawing gauges and use Lua scripts.  I’d been using it for quite some time to display track information from Amarok. Now I finally have a way to display cover art as well.

Conky displaying Amarok album art - work in progress

If you’re already running Karmic then you can install the latest version from the repositories. Install the conky-all package which has most compile options enabled to get the latest features. You’ll also need imagemagick installed.

First we need a script to fetch the cover and convert it into an album stack. The angle of the covers changes slightly with each track. It also resizes each stack to 150×150. Click here and save it as ~/bin/getcover. As you can see I had some help with it – thanks to eightmillion from the Ubuntu forums for completely rewriting it to something useable ;)

Next get the script to pull the rest of the track info from Amarok – click here and save as ~/bin/askamarok. Try it from the command line whilst Amarok is playing, e.g. to get the artist name enter

askamarok artist

Other available info is title, album, year, genre, bitrate, track playing time, total track playing time… You can also get collection info and stats. For the stats Amarok needs to store the collection in a MySQL database.

Finally get my Conky script and save as ~/conkycover. To run it:

conky -c conkycover

If it’s the only Conky script you’re running then save it as ~/.conkyrc and start Conky without any options.

Last thing missing is the cover when Amarok is not actually running. Save the following image as ~/conky/cover/noplay.png:

noplay

The whole thing is a bit rough. For example, not all the info updates at the same time on track changes. And although I set the update interval for the playing times to 1 second it leaves 3 seconds in between. It also does not look the best when no track is playing, or Amarok is not running. Feel free to post any improvements/ideas in the comments as my Conky layout skills leave a lot to be desired ;)


My Karmic desktop

Using the Hanso theme (from the community-themes package), Breathe icons, and a simple conky script which needs some more work. The wallpaper came as part of the Karmic install.

Karmic Koala

The next one shows the nice transparency in Terminal with Metacity compositing enabled. VLC is playing in window-less mode to easily clone the video to s-video.

Karmic Koala

You can download the new wallpapers if you’re not using Karmic.


Set up a VPN in Ubuntu with an itshidden.com account

Using a VPN gives you some extra protection/privacy when browsing the net from your laptop on a public or work network. If you haven’t done so yet, then head over to itshidden.com and sign up for a free account. Keep in mind that this is really only meant to be used for browsing, the free account is not an option for P2P or similar heavy usage. A paid account will give you a static IP with port fowarding and better speeds.

The following instructions should work on any Linux distro with GNOME.

First add PPTP support to the Network Manager:

sudo apt-get install network-manager-pptp

Click the Network Manager icon and open VPN Connections > Configure VPN… Click Add… Select the Point-to-Point Tunneling Protocol and click Create…

Choose a VPN Connection Type

Enter a connection name, add vpn.itshidden.com as the Gateway, and enter your login credentials.

Editing VPN settings

Click Advanced… and select Use Point-to-Point encryption (MPPE). Set security to 128-bit.

Advanced settings

Click OK, then Apply. Close the Network Connections window.

You can now connect to the VPN by clicking on the Network Manager icon and selecting the connection under VPN Connections. You will have to restart your PC if the connection fails. Once the connection is established you should see a padlock on the network manager icon. You can also head over to WhatIsMyIPAddress.com to check if it worked.


Free cross-platform remote assistance service from WizHelp

If you, like myself, get frequent phone calls from not so computer literate friends and family to sort out their PC problems then you’ll love WizHelp. It’s a remote screen sharing tool, and best of all, it’s cross-platform as it runs on Java. Well, at least for some platforms ;) The supported/tested OS list is as follows: Windows 2000/NT/XP/Vista, MacOS X, and Ubuntu/Mythbuntu (i386). And more Linux distros are to be supported soon.

Using the site is easy. First sign up for a free account. Then send the link of your personal Help Center to your friends, or just give them your username so they can search for you from the WizHelp front page. Once they access your page you’ll see them pop up in a list:

WizHelp Help Center

As you can see in the screenshot you have several options now – initiate a chat session, take control of the remote computer, give control to the remote computer, view the remote screen or share your own. Either yourself, or the person you are helping can initiate a session:

WizHelp session request

Once the session has been accepted by the other party a Java applet is loaded, the remote desktop is displayed in its own window and you can get to work:

WizHelp remote session

The above screen shot was taken whilst on remote assistance on another Ubuntu box. I also tried it with Windows XP as a client, and it worked just as well.

Considering that most computer problems are often easily solved with just a few clicks (for my friends and family anyway), this will save you a lot of time. No more traveling to people’s homes or waiting for them to drop off their machine for you to fix it. Go on, take WizHelp for a spin.


Create panoramas from your digital photos with Hugin

I found a great program to stitch digital photos together into panoramas – Hugin. It’s really easy to use, pretty much self explanatory. Just load some pictures into Hugin, create control points where the pictures are overlapping to match them up, optimise and stitch them together. Well, that’s the basics. Hugin has got a lot of settings to play around with to adjust the final result. Check out the Hugin home page for tutorials. If you’re a Ubuntu user then you can just install from the repos.

Here’s some I made earlier after walking around Derry’s walls. I pretty much only used the defaults settings and then loaded the panoramas into the GIMP to crop. Click the pictures to view the full sizes on Flickr.

Overlooking Bogside
Overlooking the Bogside

St Columb's Cathedral
St Columb’s Cathedral

Overlooking Fahan Street
Overlooking Fahan Street

Up/Down Magazine Street
Up/Down Magazine Street

Guildhall
Guildhall

Verbal Arts Centre
Verbal Arts Centre

Overlooking Bogside
Overlooking the Bogside. Again.

Oh yeah, Hugin is also available for Mac and Windows.


Enable S-video on ATI cards

Here’s how I got the tv-out (S-video) on my Radeon card to work. I’ve been using this for the past 6 or so months and it works great – no more need for Windows ;) It works with the open-source ATI drivers, and with a slight modification it should also work with the Intel drivers (I haven’t tried that one yet). I found the original instructions here.

I am using xrandr and xvattr to enable the tv display, and vlc to play the video. First install xvattr:

sudo apt-get install xvattr

My Radeon 9200 only supports an S-video resolution of 800×600 and my desktop is set to 1400×1050. To get around this I specify an 800×600 area on the desktop that will then be shown (cloned) on the tv. The command line input is quite long and not the easiest to remember, so I used 2 small scripts which I placed in my ~/bin folder.

First create a new text file and copy the following into it:

#!/bin/bash
# Enable S-Video at 800x600
xrandr --addmode S-video 800x600 && xrandr --output S-video --mode 800x600 --pos 200x200 && xvattr -a XV_CRTC -v 1

Save it as ~/bin/tvon

The tvon script displays an 800×600 area whose top left corner is positioned at 200 px from the top and 200 px from the left of the screen.

Create another text file with the following contents:

#!/bin/bash
# Disable S-Video
xvattr -a XV_CRTC -v 0 && xrandr --output S-video --off

Save the file as ~/bin/tvoff

The tvoff script turns S-video off again.

Make the scripts executable:

chmod a+x ~/bin/tvon
chmod a+x ~/bin/tvoff

Instead of using the scripts from the command line I added 2 launchers to my top panel.

Now we need to set up vlc. I have version 0.9.4 installed and the preferences window has changed. If you are using an earlier version then check the original instructions on the Ubuntu forums for the correct options.

Launch vlc and open Tools > Preferences. In the Interface section deselect the Integrate video in Interface option. This will ensure that we get a window-less video output.

In the bottom left of the Preferences window select to show all settings and click on the video section. Scroll down and change the Window properties as follows:

Video width: 800
Video height: 600
Video X coordinate: 200
Video Y coordinate: 200

Save and close the preferences window.

All that you need now is to connect your tv to your graphics card and you’re ready to go.

Note: I did have problems getting this to work with Compiz, so you might wanna disable it first. It also doesn’t fill the full width of the tv screen, I get a 1/2 inch margin on either side. I hardly notice it though.


Ubuntu Tweak 0.4.0 released

One of the first applications I get right after a fresh Ubuntu install is Ubuntu Tweak. It’s got a great selection of tweaks for your desktop environment, you can install official and 3rd party software, add document templates and scripts to Nautilus, etc…

Today version 0.4.0 has been released. One of the first things you’ll notice is that TualatriX has removed the large banner at the top. This was done so it actually fits on the screen of Netbooks which have a lower resolution. It also looks much cleaner and fits in better with Gnome.

A new feature that stands out right away is the Package Cleaner in the application section.

Package Cleaner lets you remove any redundant packages that are left over after installing/uninstalling software. You also can remove packages from the cache to free up additional space. Sure, you could quickly remove them with sudo apt-get autoremove and sudo apt-get clean from the command line, but it will be a welcome addition for people not so comfortable with the terminal.

Other not so obvious additions are that the Third Party Software dialogue also now gives you information about the package source and with one click lets you access the developer’s website. You can organise templates and Nautilus scripts now in folders, change the Gnome menu icon, and the User Folders settings can now be reset to defaults.

Check out TualatriX’s release post for more screenshots and details. At the end of the post there are also repos to add to your Hardy or Intrepid sources list. Or just download the deb or source from the download page.


Still no Nokia software for Linux on the horizon

Until not too long ago I still had a Windows XP partition on my laptop. The only reason I still had it was to use Nokia’s PC Suite so i could back up/update my phone, I never booted into Windows for anything else. Then a bad Windows update in combination with the ext2 driver trashed my home partition and I could not log back into my Ubuntu user account. I was pissed. I just happened to have a GParted disk lying on my desk, popped it into the drive and removed Windows and made more room for my main Ubuntu install.

Since then I managed to find ways of syncing my N95 with Ubuntu – multisync works great to sync contacts with Evolution via Bluetooth, ScheduleWorld lets you sync your phone’s calendar with gCal through their Firefox extension via Bluetooth (only seems to work half the time), I can transfer files using Bluetooth and USB, and I can manage my music through Amarok.

Unfortunately all the above are far from ideal as you need different applications for each task. Not to mention that it is impossible for me to upgrade my phone’s firmware without Windows!

Yesterday I sent an email to Nokia to see what their plans were to support other operating systems, considering the amount of people who switch to Linux and Mac OS. Here’s the reply:

Dear Laurent,

Thank you for contacting Nokia Care.

I hope all is well with you. We do understand your current predicament on using the Linux operating system. However at this present time we are unable to confirm if there will be future changes to include Linux as Nokia’s supported operating system. However, I will definitely forward this as a feedback to the relevant department for further review.

We do thank you for highlighting this to us because we appreciate such as constructive feedback from our customers, Laurent.

Out of luck for the time being then.

I tried to get the PC Suite working by running Windows XP in Virtualbox (yeah, I know, but at least it’s not taking up a full partition now or mess with my Ubuntu install ;) ), but USB refuses flat out to connect my phone and Bluetooth connected only once and now keeps giving me an error message each time I try to activate it.

What do you use to sync your phone with Ubuntu/Linux? Do you know of any Symbian applications that help with syncing gCal reliably?

1 Comment more...

Easy NFS share with auto-mount

I have a large hard drive in my desktop machine where I store all my media, i.e. audio, video, photographs, etc… I wanted an easy way to access it from my laptop when connected to my network and decided to give NFS a try. It’s easy to set up, and it auto-mounts easily through fstab. Here’s how I did it in Ubuntu (make sure you use your own machine’s IP/computer name):

Let’s start with the server install and configuration:

sudo apt-get install nfs-kernel-server nfs-common portmap

Restart your machine.

Next we have to specify the drives or folders we want to export in the file /etc/exports:

sudo gedit /etc/exports

On a new line first enter the absolute path of the exported folder followed by a list of authorised clients separated by a space. In my case I share the complete drive sda1 with the IP range 192.168.1.1 – 192.168.1.6:

/media/sda1 192.168.1.1/6(rw)

You can use a netmask like me, or you can use the machine name(s) instead. The option rw (default) gives read/write access, ro would make it read-only. Check out the exports(5) man page for all available options. If you add more options then separate them by commas, e.g. (rw,no_root_squash).

Save changes and close the exports file. Restart the server machine. To just apply the changes on an already running server enter:

sudo exportfs -a

Now we’re ready to set up the client machine.

Install the following:

sudo apt-get install nfs-common portmap

Restart the machine.

We need a mount point for the remote volume. I created a new one in /media called d-media:

sudo mkdir /media/d-media

Let’s try and mount the NFS volume from the command line. Enter the following:

sudo mount 192.168.1.2:/media/sda1 /media/d-media

You should now be able to browse your new network drive from the command line and find it in the Places menu and in Nautilus listed with the rest of your drives.

If you successfully mounted the network drive from the command line, then you can now add it to /etc/fstab to automatically mount at start-up:

sudo gedit /etc/fstab

Copy the following line (make sure to use your own server’s IP and folder names):

192.168.1.2:/media/sda1 /media/d-media nfs rsize=8192,wsize=8192

rsize specifies the maximum number of bytes in each network READ request that the NFS client can receive when reading data from a file on an NFS server, wsize is the maximum number of bytes per network WRITE request that the NFS client can send when writing data to a file on an NFS server. The values used for both are multiples of 1024, up to 1,048,576 bytes (1MB). If you have performance issues with the above options, then try changing rsize and wsize. Check the nfs(5) man page for more details and options.

Save and close fstab. Restart the client machine.

Your remote volume should now be available as a local drive.

Note: The above steps should apply to pretty much any Linux install. I successfully tried it with Opensuse 11 as a client and it already had all the client parts installed by default.

If you use NFS and have any tips, then feel free to leave a comment.

1 Comment more...

  • Categories

  • Archives

  • Random snaps

    www.flickr.com
  • Visitor Map

  • Miscellaneous

  • iDream theme by Templates Next | Powered by WordPress