Setting Up Surround Sound in Linux

It’s been a while since I bothered, the reason being it’s always seemed like an un-worthwhile struggle to get it working but either things changed or I was doing something to overcomplicate the process but it’s actually pretty simple to get surround sound up and running on your Linux machine. Now, I’m not going to go in to how to install the drivers for your specific sound card, because there are so many and I don’t have them all and most times on most popular distributions (Debian, Ubuntu, Mint, Fedora, OpenSuse etc) you’re going to notice that the sound card is actually already supported. What I will be doing is showing you how easy it was to get my 5.1′s set up (and the same will be said for 7.1′s).

Step 1:

First off you’re going to want to edit the pulseaudio configuration file to add the number of speakers you’re using, it’s default is set to 2.

sudo gedit /etc/pulse/daemon.conf

Near the bottom of the file, there will be a line which looks like this:

;default-sample-channels = 2

The semi-colon is a comment, so this line isn’t actually doing anything unless you remove that. I would suggest leaving that line alone and adding a new line at the bottom:

default-sample-channels = 6

If you’re using 5.1′s the number of channels will be 6, 7.1′s will be 8 and I think you get where I’m going with this? So in this example, I’m using 5.1′s.

Now save and close that file. You’ll need to reboot your system now too, so that these changes will take effect.

Step 2:

So you’re back? Good..

Now you’re going to want to open up the Sound Preferences, usually you can do this by clicking on the little sound icon in your panel, or System > Preference > Sounds from the menu.

From here, you’ll want to click on the Hardware tab. Near the bottom it’ll say Profile: with a drop down box next to it. Here you can select the type of set up you have, as you can see in the screenshot I have an “Analogue Surround 5.1 Output”, yours might be different and that’s cool and if you don’t know feel free to try a few out. Next to that drop down box is a button which says “Test Speakers”, this didn’t work for me so I have to use an online test but give it a try as it might work!

That’s it, you should be done!

Android 4.0 (Ice Cream Sandwich) First Look / Impressions

It’s only been a couple of weeks since the first batch of Ice Cream Sandwich (ICS) loaded phones were released, the Samsung Galaxy Nexus, but already custom ROMs are being updated to allow users of other phones to use ICS.

Luckily for me, a Samsung Galaxy S (I9000) owner, development for this widely popular phone has been going strong for a while. Custom ROMs from Darkys ROM to CyanogenMod allow for quicker Android updates with much better features and a lack of Samsung’s bloat-ware.

So it seems the next version of CyanogenMod (CM9) will be ICS based and keeping up with the SGS development “Teamhacksung” have started porting over the new version which will soon become the latest version CM9. It’s still in its early stages and there are a few known bugs which need to be sorted but they’ve released a ROM for public testing.

After a day or so of testing, everything feels smooth and finished, it seems to be much more user friendly in comparison to previous iterations of Android. It’s kind of like they’ve realised it’s not just linux geeks using Android any more and it actually has a pretty large market share and they had to re-design it to be for everyone.

New Features:
Home Screen:

The home screen hasn’t changed dramatically and still follows the 4×5 grid of icons and widgets.

The biggest and in my opinion most needed change here though is the relocation of the search bar, no longer is the search bar a widget but it now sits directly under the notification bar and remains constant on all home screens. This clears up an extra row for other icons and widgets but doesn’t over crowd the place.

When editing the home screen icons and widgets (long pressing on one of them), the Remove section replaces the static search bar at the top of the screen. Additionally while editing some widgets, such as the Calendar, allow for resizing, by framing the widget with a blue border with dots in the centre of each which can be dragged to change the length or width of the object. It’d be good to see this as a standard across all widgets even if setting limits was also done.

Folders are still here and they are a bit more awesome, to make a folder you simply drag one icon on to another and they bunch up. Clicking on the bunch opens up a pop up with all the icons in.

App Drawer:

The app drawer is now 4×5 screens which can be switched left and right between, still organised alpabetically. Now however going past the last page of apps brings you to a list of widgets which can be held down on to drag to a home screen. The app drawer also has a quick link in the top left to the market place.

It’d be great to see more customisation here, allow for constant flow of apps from left to right rather than in pages or alternatively up and down scrolling.

Multi-tasking:

Multi-tasking is made much simpler in this iteration of Android, holding down the home button brings up a vertical list of running applications. Clicking on one will take you back to the app at its last used screen and also gives you a preview of the screen you’ll be heading back to. Sliding the appliaction left or right however will close it. This is a much simpler way for non-power users to understand what’s going on and might help them control over the occasional lag which can come about when you have too many applications open. It also really makes switching between two applications a breeze.

Settings:

The settings menu have been cleaned up dramatically and now provide a lot of the useful settings at a much easier level. Things are grouped rather than a huge list of things and are generally much easier to understand.

Face Unlock:

One of the biggest new features to this version is the addition of Face-recognition to unlock your phone. unfortunately because the current ROM used to review this doesn’t have a very stable front facing camera driver it wasn’t really working in my tests.

Essentially you hold the camera in front of your face for a few seconds while it calibrates to your data and then when you unlock your screen the camera will start up and it should only take a second to detect your face and unlock, if it fails it has a fail safe which allows you to also enter a pin or pattern to unlock.

Two main issues arise, firstly as pointed out by the setup, the fact that people with similar faces will be able to unlock your screen, so don’t expect that your siblings can’t frape you. Also a picture of your face would also work, since it’s not 3D detection a photograph will also work for unlocking your phone.

Screenshots:

Screenshots are built in to this verison of android (it really made this review easier ;)) Just hold down the Volume Down button and Power button at the same time, a second or so and the screen will flash and it’ll save a screenshot in a folder on your phone.

Browser:

The browser has had a few tweaks including the way tabs are handled.

Overall it’s a nice clean update, I can’t say the difference between honeycomb since I don’t own a tablet but I’m sure this will be a welcome change to both phone and tablet users.

Gallery after the jump..
Continue reading Android 4.0 (Ice Cream Sandwich) First Look / Impressions

It’s only been a couple of weeks since the first batch of Ice Cream Sandwich (ICS) loaded phones were released, the Samsung Galaxy Nexus, but already custom ROMs are being updated to allow users of other phones to use ICS.

Luckily for me, a Samsung Galaxy S (I9000) owner, development for this widely popular phone has been going strong for a while. Custom ROMs from Darkys ROM to CyanogenMod allow for quicker Android updates with much better features and a lack of Samsung’s bloat-ware.

So it seems the next version of CyanogenMod (CM9) will be ICS based and keeping up with the SGS development “Teamhacksung” have started porting over the new version which will soon become the latest version CM9. It’s still in its early stages and there are a few known bugs which need to be sorted but they’ve released a ROM for public testing.

After a day or so of testing, everything feels smooth and finished, it seems to be much more user friendly in comparison to previous iterations of Android. It’s kind of like they’ve realised it’s not just linux geeks using Android any more and it actually has a pretty large market share and they had to re-design it to be for everyone.

New Features:
Home Screen:

The home screen hasn’t changed dramatically and still follows the 4×5 grid of icons and widgets.

The biggest and in my opinion most needed change here though is the relocation of the search bar, no longer is the search bar a widget but it now sits directly under the notification bar and remains constant on all home screens. This clears up an extra row for other icons and widgets but doesn’t over crowd the place.

When editing the home screen icons and widgets (long pressing on one of them), the Remove section replaces the static search bar at the top of the screen. Additionally while editing some widgets, such as the Calendar, allow for resizing, by framing the widget with a blue border with dots in the centre of each which can be dragged to change the length or width of the object. It’d be good to see this as a standard across all widgets even if setting limits was also done.

Folders are still here and they are a bit more awesome, to make a folder you simply drag one icon on to another and they bunch up. Clicking on the bunch opens up a pop up with all the icons in.

App Drawer:

The app drawer is now 4×5 screens which can be switched left and right between, still organised alpabetically. Now however going past the last page of apps brings you to a list of widgets which can be held down on to drag to a home screen. The app drawer also has a quick link in the top left to the market place.

It’d be great to see more customisation here, allow for constant flow of apps from left to right rather than in pages or alternatively up and down scrolling.

Multi-tasking:

Multi-tasking is made much simpler in this iteration of Android, holding down the home button brings up a vertical list of running applications. Clicking on one will take you back to the app at its last used screen and also gives you a preview of the screen you’ll be heading back to. Sliding the appliaction left or right however will close it. This is a much simpler way for non-power users to understand what’s going on and might help them control over the occasional lag which can come about when you have too many applications open. It also really makes switching between two applications a breeze.

Settings:

The settings menu have been cleaned up dramatically and now provide a lot of the useful settings at a much easier level. Things are grouped rather than a huge list of things and are generally much easier to understand.

Face Unlock:

One of the biggest new features to this version is the addition of Face-recognition to unlock your phone. unfortunately because the current ROM used to review this doesn’t have a very stable front facing camera driver it wasn’t really working in my tests.

Essentially you hold the camera in front of your face for a few seconds while it calibrates to your data and then when you unlock your screen the camera will start up and it should only take a second to detect your face and unlock, if it fails it has a fail safe which allows you to also enter a pin or pattern to unlock.

Two main issues arise, firstly as pointed out by the setup, the fact that people with similar faces will be able to unlock your screen, so don’t expect that your siblings can’t frape you. Also a picture of your face would also work, since it’s not 3D detection a photograph will also work for unlocking your phone.

Screenshots:

Screenshots are built in to this verison of android (it really made this review easier ;)) Just hold down the Volume Down button and Power button at the same time, a second or so and the screen will flash and it’ll save a screenshot in a folder on your phone.

Browser:

The browser has had a few tweaks including the way tabs are handled.

Overall it’s a nice clean update, I can’t say the difference between honeycomb since I don’t own a tablet but I’m sure this will be a welcome change to both phone and tablet users.

Gallery after the jump..
(more…)

How To Take Screenshots in Ice Cream Sandwich (Android 4.0.x)

Android 4.0 or Ice Cream Sandwich (ICS) finally brings screenshots natively to the mobile platform, to a lot of users of custom ROMs such as CyanogenMod or Darkys ROM it may seem like this has been a feature for a while but that isn’t the case.

To take a screenshot:
  • Simply hold down the Volume Down button and Power button for about a second.

 

You’ll see a flash and the screen will be framed which shows the screenshot was taken (I’ve tried grabbing a screenshot of this screen, but it’s pretty tricky and no luck yet!). The screenshot will be saved in a folder /Pictures/Screenshots on your phones internal SD card.

You’ll also get a new notification in the notification bar saying “Saving Screenshot…” and once it’s done there’ll be a “Screenshot captured.” notification in the pull down menu which will take you directly the screenshot in the Gallery.

For more screenshots, check out my first look and impressions post about ICS!
 HERE

Linux USB Errors with usb-creator-gtk “stdin: I/O error stdin: error 0 /init: line 1: can’t open /dev/sr0: No medium found”

After installing Ubuntu on a USB stick with the Ubuntu USB Startup Disk Creator (usb-creator-gtk) you might encounter an error such as the following:

stdin: I/O error
stdin: error 0
/init: line 1: can't open /dev/sr0: No medium found

This is actually a bug with the software and isn’t anything you’ve done wrong. It seems to be a bug that’s effecting users running Karmic, Lucid, Maverick and Natty so it’s a pretty wide spread issue.

The best way I have found to get around this issue is to install and run unetbootin to create live USBs. If you’re using linux it should be found in the usual place you can install things.

Installation:

Ubuntu/LinuxMint/Debian:

sudo apt-get install unetbootin

Fedora/OpenSuse:

sudo yum install unetbootin
Create a live USB:

To install a distro it’s pretty simple, either select it from the “Distribution” option and pick a distribution and version, UNetbootin will then actually download it and install it for you. Alternatively you can pick an Diskimage and browse for the ISO file you download (and would usually burn to a CD/DVD) and install from that. Select the USB Drive at the bottom and hit ok and it’ll install a bootloader, the system and you’ll be up and running in no time.

Persistence File:

If you wanted a persistence install which allows you to save files, settings and installed programs you’ll have to do a little manual work as it currently doesn’t support that option.

Go to http://unetbootin.sourceforge.net/diskimg/ and download one of the files (128mb.zip, 256mb.zip, or 512mb.zip) corresponding to the amount of persistent space you want (make sure the size of the persistent disk image is smaller than the free space you have on your USB drive).

You’ll then need to edit the syslinux.cfg file that was created by UNetbootin in the root of the directory (just open it with a text editor) you should see something similar to the following:

label unetbootindefault
menu label Default
kernel /ubnkern
append initrd=/ubninit file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash –

So on the line that starts “appen initrd=” you’ll want to add the option of “persistent”, it should then look like the following:

NOTE: Wordpress changes my double dash at the end of the last line to a single long dash, this won’t work. It’s easiest just to add the final word before the double dash in the file, do not copy and paste this in to your file. If you do, you will get more errors.

label unetbootindefault
menu label Default
kernel /ubnkern
append initrd=/ubninit file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash persistent –

I added this line to all that used the “file=/cdrom/preseed/ubuntu.seed” option, since that’s the image that’s being opened and it should then change all options on the bootloader that will load the ubuntu install.

How to Install the ‘gnome-shell-extensions-mediaplayer’ Extension

The mediaplayer widget found on github, created by eonpatapon – (https://github.com/eonpatapon/gnome-shell-extensions-mediaplayer).

I’ve been searching for a while for a good, solid widget style thing that’ll sit in the top of the gnome-shell panel which can control the music that’s playing in banshee, rhythmbox or whatever else you want to use to play your tunes.

 

Installation:

1. First you’ll need to grab some dependencies:
sudo apt-get install git gnome-common gnome-tweak-tool
2. Next download the files from the git repository as below (this will download the folder to whatever directory you’re currently in, in terminal):
git clone https://github.com/eonpatapon/gnome-shell-extensions-mediaplayer.git
3. Once it’s finished download (it shouldn’t take too long it’s only about 2.30MB as of writing this guide), you’ll want to install using the following commands:
cd gnome-shell-extensions-mediaplayer
./autogen.sh --prefix=/usr
make
sudo make install
4. That’s it, it’s installed. Next you’re going to want to enable it, run gnome-tweak-tool and under extensions slide the newly installed extension to ON and it should appear next to the “Universal Access Settings” in the top right.

ROS: Publishing and Subscribing to Arrays

In ROS (Robot Operating System) it’s really easy to publish variables to be used between nodes running on the same roscore however I was having some difficulty doing the same for arrays. The problem came when there was no real examples of how to use them, so here is a working example of std_msgs/*MultiArray in ROS.

Publishing:

[gist][/gist]

Subscribing:

[gist][/gist]

Fedora 15 Post Installation Guide

Install RPM Fusion

su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'

http://rpmfusion.org/Configuration

Enable unsupported video and audio codecs

Get enhanced audio and video support in applications that rely on GStreamer:

sudo yum install gstreamer-plugins-ugly gstreamer-plugins-bad gstreamer-ffmpeg

Get enhanced audio and video support in applications that rely on xine backend:

sudo yum install xine-lib-extras-freeworld

http://rpmfusion.org/FAQ

Install Chromium Browser

Make a file called “fedora-chromium-stable.repo” in /etc/yum.repos.d/ and open:

sudo gedit /etc/yum.repos.d/fedora-chromium-stable.repo

Paste in the following, save and exit:

# Place this file in your /etc/yum.repos.d/ directory

[fedora-chromium-stable]
name=Builds of the "stable" tag of the Chromium Web Browser
baseurl=http://repos.fedorapeople.org/repos/spot/chromium-stable/fedora-$releasever/$basearch/
enabled=1
skip_if_unavailable=1
gpgcheck=0

[fedora-chromium-stable-source]
name=Builds of the "stable" tag of the Chromium Web Browser - Source
baseurl=http://repos.fedorapeople.org/repos/spot/chromium-stable/fedora-$releasever/SRPMS
enabled=0
skip_if_unavailable=1
gpgcheck=0

http://fedoraproject.org/wiki/Chromium

Install Flash

Download the YUM for Linux version from the adobe site – http://get.adobe.com/flashplayer/

Run the following in the folder you downloaded the file to:

su -c 'rpm -ivh adobe-release-i386-1.0-1.noarch.rpm'

Import the GPG key:

su -c 'rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux'

In 32bit run:

su -c 'yum install nspluginwrapper alsa-plugins-pulseaudio flash-plugin'

on 64bit run:

su -c 'yum install nspluginwrapper.{x86_64,i686} alsa-plugins-pulseaudio.i686 --disablerepo=adobe-linux-i386'
su -c 'yum install flash-plugin'

If you’re using Firefox, that should be all done but if you’re using Chromium you’ll need to open Firefox and play a video then close it and run the following:

32bit:

sudo ln -s /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/chromium-browser/plugins/libflashplayer.so

64bit:

sudo ln -s /usr/lib64/mozilla/plugins-wrapped/nswrapper_32_64.libflashplayer.so /usr/lib64/chromium-browser/plugins/nswrapper_32_64.libflashplayer.so

Close and re-open Chromium and head to YouTube to check that it’s working.

http://fedoraproject.org/wiki/Flash

Install Dropbox

Download and install the correct rpm for 32 or 64 bit from the Dropbox website – http://www.dropbox.com/downloading.

Follow this guide to remove the YUM errors you may encounter once the package is installed – http://alexsleat.co.uk/2011/05/24/how-to-fix-error-cannot-retrieve-repository-metadata-repomd-xml-for-repository-dropbox-please-verify-its-path-and-try-again/ .

Install VLC

sudo yum install vlc

How To: Disable SELinux in Fedora

WARNING: by continuing following this guide you are putting your machine at risk by disabling the secuity features within SELinux, I strongly advise if you do not know what you are doing, stop and read up on the implications this action will have before continuing. Some information is avaible in the Fedora Wiki here .

Open up this file:

sudo gedit /etc/selinux/config

Change the line that looks like this:

SELINUX=enforcing

To this:

SELINUX=permissive

Save and reboot and it should be working, although again be warned this has disabled the security mechanism on your system. To re-enable this, simply do the same however change from permissive to enforcing and again reboot your machine.

How To Fix: Error: Cannot retrieve repository metadata (repomd.xml) for repository: Dropbox. Please verify its path and try again

After installing dropbox from the RPM package availble on the site on a new Fedora 15 install, I was unable to use yum without coming across this error:

$ update
Loaded plugins: langpacks, presto, refresh-packagekit
http://linux.dropbox.com/fedora/15/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found : http://linux.dropbox.com/fedora/15/repodata/repomd.xml
Trying other mirror.
http://linux.dropbox.com/fedora/15/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found : http://linux.dropbox.com/fedora/15/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: Dropbox. Please verify its path and try again

For some unknown reason dropbox repos dont seem to work past 13 so you’ll need to change the dropbox.repo file from detecting the current release to 13 like so:

Open the dropbox.repo file:

sudo gedit /etc/yum.repos.d/dropbox.repo 

Change the baseurl from $relesever to 13 like so:

Original:

[Dropbox]
name=Dropbox Repository
baseurl=http://linux.dropbox.com/fedora/$releasever/
gpgkey=http://linux.dropbox.com/fedora/rpm-public-key.asc

New:

[Dropbox]
name=Dropbox Repository
baseurl=http://linux.dropbox.com/fedora/13/
gpgkey=http://linux.dropbox.com/fedora/rpm-public-key.asc

Save and close and everything should be working, try using sudo yum update to check and the error should have gone away. If not give a reboot a try.

HowTo: Disable Mouse Scroll to Switch Desktop – OpenBox

Open up the openbox config file, it should be located in /home/username/.config/openbox/ but if it’s not you might have to do a little digging.

nano /~.config/openbox/rc.xml

Find the following lines and remove or comment them out, you can use Ctrl+W in nano to find:

      
        
      
      
        
      

Note: XML comments are as follow:<-- Comment -->

Save with Ctrl+X, Y, Enter (if you’re using nano) and restart OpenBox (Preferences -> OpenBox Config -> Restart) and all should be done.