Tuesday 14 December 2010

Revenge of the Titans won't install properly in Ubuntu


If during the installation of this game you get an error complaining that it couldn't create a directory in /opt, run the following command:

 sudo mkdir  -p /opt/revengeofthetitans/full_length_music
Then run the installer again. All this does is create the directory manually, which seems to be all that's needed!

Edit: Looks like the devs are aware of the problem and planning on releasing a fixed installer imminently. A commendably expeditious response!

Wednesday 1 December 2010

Mythtv Frontend won't connect to Master Backend over network (can't login)


A quick post with a quick fix for an irritating issue.

When attempting to connect to the master backend for the resident mythtv setup in the house over the network via mythfrontend on my laptop I ran into this error. The IP was correct, the login and mysql database password was also correct, even all the firewall rules were properly configured, all to no avail. I'd just keep getting "can't login" over and over again.

Simple fix (On the computer running the master backend):

gedit /etc/mysql/my.cnf
Then comment out the following line with a hash so that it looks like this:
#bind-address = 127.0.0.1
Exit and save, then reboot. Try and connect again with your frontend, hopefully all is now well!

Sunday 28 November 2010

Using a Hauppauge Wintv Nova HD S2 DVBS card: Updated


Having recently rebuilt the media pc I was gratified to find the situation with the above DVBS card much improved since the last set up.

Turns out that nowdays all that's needed to get this card running in Ubuntu/Mythbuntu 10.10 is to quickly run the following:

sudo apt-get install linux-firmware-nonfree
Then restart and enjoy!

Wednesday 10 November 2010

The blog lives! Also, get-iplayer...


So it does, I've not been posting much recently for a rather cheery reason, and that is that i've not encountered any bugfixes that seemed useful to put up. I've been happily linuxing along day to day with no troubles worth shouting about!


Change! Bugfixes! Bugs without fixes! No hope! All is Dark! Aaaaaargh!

Or at least that describes the first few hours of it fairly well. The reality is that a few weeks in, most of these things have been righted, either by the team at Canonical, or with the use of Google and the much appreciated help of the community at larges. Still, it means there's finally some stuff to post up on the blog. So live it does.

As does get-iplayer. This program is a fantastic little terminal tool for downloading or streaming the content from BBC's iplayer site. Previously i've used the Iplayer-desktop tool that runs on Adobe Air, but after becoming disillusioned with the stability of the program on my current system, I was gratified to find get-iplayer still working and being maintained. Old news, but worth a shout. If you're going to use it I highly suggest checking out the documentation page quickly, as it will make little sense otherwise.

Wednesday 7 July 2010

Firestarter Tray Icon Fix / Horrific Botch - Gnome 2.30


A quick warning before I begin. This is the most horrific and longwinded way of fixing the transparency issue with Firestarter in Gnome 2.3 (and Lucid Lynx) that it cannot be considered much more than a dirty and very basic hack.

Firestarter hasn't been maintained for a very long time, however for home usage I find it a preferable application to others, as the active connection and live event updates are simply not available in any other firewall configurator for Linux. So, that said - here is the plan:

1. Download the Firestarter source
2. Modify the images the source uses to conform to the taskbar background
3. Build and install Firestarter with these new images

This destroys the ability of Firestarter to adapt to differing themes you may decide to use other than the one you have compiled it for (as the images it uses no longer have any transparencies), meaning that a theme change also requires the recompilation of Firestarter to look pretty. For those of you that change theme infrequently/never, this will work just fine.

Tuesday 6 July 2010

Can't click buttons in Flash/Youtube using Firefox


This happened to me after reverting from the now discontinued Flash 64 bit alpha to running 32 bit Flash via nspluginwrapper. Flash videos would load and play normally, however none of the controls were responsive, and all clicking on them actually did was the focus the window. This meant that if you clicked on a window and held down, you'd then be able to use any keyboard hotkeys to control the video. Incredibly irritating!

A triage solution appears to go along the lines of:

sudo gedit /usr/lib/nspluginwrapper/i386/linux/npviewer
Add the following just before the last line of the file:
export GDK_NATIVE_WINDOWS=1 
Restart the application. In my case this only affected Firefox, whereas Chromium and Opera both still functioned normally without this fix.

In any case, hope that helps - when Flash plays up it can be a bit of a show-stopper.

Sunday 4 July 2010

F-spot won't start, throws errors from Terminal


I don't tend to use F-spot for an awful lot, but upon attempting to launch it recently I found that the computer would have a think, an ultimately take no action. Running the launch command from the terminal yielded the following error: 

Unhandled Exception: Mono.Data.SqliteClient.SqliteSyntaxException: no such table: tags

As it turns out, the solution is simply to remove the config directory for F-spot. This can be achieved by running the following command in the terminal:

rm -rf .config/f-spot
Then start the program over again, hopefully that has solved it!

Friday 25 June 2010

Blender won't start windowed when Legacy Fullscreen is enabled in Compiz


Ran into this the other day, with a solution presenting itself on launchpad as usual. This is more of a workaround than a bugfix, but it works perfectly satisfactorily.

Essentially you want to change your Blender launch parameters to something along the lines of:

 blender -w -p 0 0 800 600 
What this does is tell Blender to launch in windowed mode, as well as starting at the bottom left of your screen and at a resolution of 800 by 600. You can then move the window around and resize/fullscreen it as per the norm. For some reason Blender throws a hissy fit and refuses to start windowed when only the "-w" parameter is specified, the additional options seem to force it to work properly.

Assuming you're using Gnome, you can customise your menu entries by going to System > Preferences > Main Menu.

Sunday 23 May 2010

GDM2Setup / Ubuntu Tweak - Unable to change Xsplash Wallpaper


On a couple of fresh Lucid installs so far I've run into this same problem, whereby GDM2setup and/or Ubuntu Tweak are unable to change the wallpaper for Xsplash. This apparently stems from the fact that a directory both programs need to modify does not exist by default in 10.04.

A fix presented itself in the form of the reply from WobblyBob on launchpad here.

Essentially all you need to do is run this command in the terminal:

sudo mkdir /usr/share/images/xsplash
Then attempt to change the wallpaper once again. Hopefully that has fixed it!

Sunday 9 May 2010

Ensure Compiz starts with --loose-binding upon login with a handy script


Previously talked about was the massive perfomance enhancement systems using Nvidia cards and Compiz enjoy when Compiz is started with the '--loose-binding' option. To ensure that this happens properly upon every login i've found that deploying a quick little bash script is easiest.

To create the script:

gedit compiz-start.sh
Copy and pase the following into it
#!/bin/bash

compiz --replace --loose-binding
gtk-window-decorator --replace
Save and close gedit.

Make the script executable: 
 chmod 700 compiz-start.sh
At this point you can test the script using './compiz-start.sh' from your home directory.

To add this script to your list of startup applications: 

In Ubuntu, go to 'System > Preferences > Startup Applications' and add the line:
/home/yourusername/compiz-start.sh
So that it is one of the entries. At this stage, you're done, however, i've found the script works best when combined with the delay script mentioned previously.

So with that, the line to run the compiz script after five seconds would be:
 /home/yourusername/delay.sh 5 "/home/yourusername/compiz-start.sh"
Done!

Friday 7 May 2010

Make Lucid less irritating - Change buttons from left to right and remove mail icon


Raar! Certain changes in Ubuntu 10.04 Lucid Lynx have brought on the rage, specifically the buttons being on the left, and that damned mail icon I never use (due to using a webmail client) in the new notification area that cannot be conventionally removed without also removing the volume icon.

So, some quick fixes to copy/paste into the terminal!

Remove the mail icon:

sudo apt-get remove indicator-messages 
Move the window controls to the right-hand side: 
gconftool-2 --set "/apps/metacity/general/button_layout" --type string "menu:minimize,maximize,close"
 That should hopefully soothe the irritation somewhat.

Wednesday 5 May 2010

Conky problematic in Lucid? Battery bar appears empty.


After upgrading to 10.04 on my laptop I found that the battery monitor bar was returning an empty bar with no data. Inspection of errors returned by running it in the terminal showed that conky was trying to identify the battery by the wrong portion of the script, specifically:

${battery_bar 7,65 BAT0}
Where it should have been attempting to lookup 'BAT0', it was actually looking up '7,65'. After double checking that the script had been written correctly, I attempted a reinstall from the repositories, to no avail! The solution ended up being just to download the source, compile and install.

Conky source can be found here, download the tarball of the latest version.

To install:

Ensure dependencies have been met:
sudo apt-get install lua5.1 liblua5.1-0-dev libxml2-dev build-essential libcurl4-gnutls-dev libx11-dev libxt-dev libxext6-dbg libxext-dev libxdamage-dev libxft-dev libimlib2-dev libglib2.0-dev
Find the Conky tarball you have downloaded and extract the contents to a convenient location, then navigate to this folder in the terminal.

Then, while in this directory, in the terminal:
 ./configure
make
sudo make install
And you're done! For convenience you could use a program called checkinstall to autobuild a deb, so that it is easier to remove or upgrade conky at a later date.

To do this simply replace 'sudo make install' with 'sudo checkinstall'. Follow the steps and enjoy Conky!

Monday 8 March 2010

A Guide to Clonezilla - Create a backup image of your computer using a LiveCD or USB Drive


Previously mentioned as being used to completely restore a broken system using partition images was Clonezilla, so it seems like a good idea to post up a short guide for using it!

The First Step: Download the iso from here, you're looking to download the one marked as 'stable iso/zip'. You can then use a program like Infrarecorder (Windows) or K3B (Linux) to burn the iso image to a blank CD. Alternatively, use USB Startup Disk Creator (Ubuntu - System > Administration) or UnetBootin (Windows) to create a bootable USB drive.

The Second Step: Check your bios settings to ensure that your USB or Disk Drive is listed above your HDD in the boot order, else Clonezilla will not initialise upon bootup.

The Third Step: Have your backup medium ready, be it USB Stick or External Drive, but do not plug them in yet. Boot the computer, you should be presented with a menu looking just like the one below:


Rest of the guide after the break:

Sunday 7 March 2010

Link List - Applications



I've added a bunch of links to various applications that I always add to every fresh installation of Ubuntu, mainly so that I actually remember some of the less regularly used ones, but also for anyone that might be interested in having a look at some apps they've perhaps not seen before.

Monday 15 February 2010

Load nvida-settings Configuration upon Login


Lets say you've tweaked your nvidia-settings configuration slightly to make things look better, possibly changed the contrast and saturation values in order to get more even looking colours and better definition. Maybe you've also noticed that these settings are not persistent between each boot, and require you to load nvidia-settings in order for them to have effect. This is quite irritating. A solution, however, is at hand.

It turns out that this is deliberate behavior on the part of the nvidia-settings program. In an instance where a computer has multiple users, you may want to have different configurations for each person. This is where your .nvidia-settings-rc comes in handy.

So open nvidia-settings and set it up the way you want it, once you've done that you want to navigate down to nvidia-settings configuration and click "save current configuration". This will then prompt you to save to your home folder, which is exactly what you want to do.

Nvidia settings can then be made to load the configuration upon login by adding

nvida-settings -l
to Startup Applications under System > Preferences.

If this doesn't work, try running that command in a terminal. When I did this I was given output along the lines of the following:

ERROR: Unable to assign attribute RedContrast specified on line 40 of configuration file
'/home/sam/.nvidia-settings-rc' (no Display connection). 


Luckily the solution is also fairly simple. You need to go back into nvidia-settings and untick "Include X Display Names in the Config File" on the nvidia-settings configuration tab, then resave the settings to your .nvidia-settings-rc.

Let me know if you have any issues!

Saturday 13 February 2010

Increase Compiz Performance with Nvidia Cards


A nice quick note here.

Always remember to add "--loose-binding" to Compiz-Fusion launch options when running a computer containing an Nvidia card. The performance boost is more than a little tangible.

For those of you who have Compiz constantly running, it is possible to enable this through Compiz Icon (Found in synaptic) under the options menu visible when right clicking on the taskbar icon.

Monday 8 February 2010

Why Clonezilla is amazing, and how Linux rocks


Recently a laptop running Ubuntu 9.10 broke down, with the screen and a few other components utterly refusing to work, it was still usable with an external screen and so some measure of recovery was possible. Now this laptop is used for work and had important documents along with specifically configured programs on it, making it a pain to set up a spare laptop with not just a backup of the documents, but also all the running programs on the computer.

Enter Clonezilla.

Clonezilla is a fantastic tool for creating images of hard-drives, partitions and backing them up for future restorations. It only copies used blocks on the drive, meaning that the image itself is never bigger than it needs to be.

So roughly 4 hours later, and a 220 gig image of the entire laptop was cloned to an external drive, ready to be moved into the spare laptop.

This is the bit where using Linux comes in handy. Once the image was restored on the spare laptop, the system booted perfectly on the new computer, and everything instantly worked exactly as before. This is the beauty of using a system that detects and loads drivers every single time it boots, keeping the information for these drivers entirely within its kernel. It didn't matter that completely different hardware was present, the install didn't complain once and it couldn't have been easier.

Saturday 6 February 2010

Gnome system monitor memory column dissapeared


Recently upon loading the system monitor in Ubuntu the memory column has been conspicuously absent. Some research revealed this to be a fairly old bug with the program that thankfully has a nice and simple fix.

This launchpad bug report deals with the issue, and it's the reply by Doc along with those that follow that reveal a solution, as well as suggestions upon how to deal with the various ways the problem manifests itself.

First load Gnome configuration editor:

gconf-editor 
Then navigate using the following steps as detailed by Doc:

apps -> procman -> proctree -> columns_order --> Add n.15 if missing, and if present, reset its position to follow the numerical order properly.

apps -> procman -> proctree -> col_15_visible --> Set to true

Hopefully that has fixed the issue!

Thursday 4 February 2010

Using a Hauppauge Wintv Nova HD S2 DVBS card with Mythbuntu 9.10


Unfortunately the 2.6.31 kernel that shipped with Ubuntu 9.10 has corrupted firmware for this card, and this will unfortunately result in you banging your head repeatedly against whatever hard surface is handy in an attempt to get it working. Thankfully, a solution is at hand.

As detailed by Douglas Mackay in this first reply here, a quick firmware download and install will solve the issue nicely, and result in you being able to utilise your card properly!

My Conky scripts, and how to run multiple instances thereof


As promised in an earlier post here are the scripts I use for conky, and a quick guide for running multiple conkys.

Initially you want to set up a script to run all instances of conky at once, so that they do not need to be initialised separately.

So, to create the script:

gedit multiple_conky.sh
Copy paste in the following code block:

#!/bin/bash

sleep 6 &&
conky -d -c /home/sam/.conkyrc &
sleep 6 &&
conky -d -c /home/sam/Scripts/conky_sys &
sleep 6 &&
conky -d -c /home/sam/Scripts/conky_sys2 &
exit 


Replace "user" with your username, then save and exit.

Make the file executable:
chmod 700 multiple_conky.sh
More after the jump.

Tuesday 2 February 2010

A handy delay script for startup applications


Typically applications that have been told to start on login by the user such as Firestarter or Conky may need to be delayed slightly in order to ensure they load properly, and without interference from other processes. A simple script comes to the rescue.

Howto after the jump:

Monday 1 February 2010

Force Nvidia Powermizer to stay at highest performance setting


If you're running drivers above version 185, then this guide is likely obsolete, as Powermizer has had a preferences option in nvidia-settings since then.

This is a nice quick one. To force Powermizer to stay at the default (and highest) clock of your graphics card always upon boot:

sudo gedit /etc/modprobe.d/options
Add the following line to the file:

options nvidia NVreg_RegistryDwords="PerfLevelSrc=0x2222"

Save and exit, then reboot.

Other performance levels may be specified, replace 0x2222 with 0x2233 for adaptive clocking.

UPDATE: This method does not appear to work for me in the latest versions of Ubuntu, please try the method in this post.

A cronjob script to e-mail you upon external IP address change


A while ago I was researching the implementation of a cronjob to e-mail me upon external ip change of a media server running MythTv in the house so as to be able to access MythWeb externally without issue. In any case, a solution presented itself in the form of a useful little bash script put together with the help of various sources (Which I can no longer for the life of me find) and a command line e-mail program called Mutt.

The implementation of this requires the creation of a small script, the installation and configuration of Mutt, and a Gmail account for sending the actual e-mail (though a native e-mail server, or anything handling imap will also do).

Howto after the break.

Nvidia driver installation gives dpkg divert errors when attempting to upgrade


While attempting to upgrade to 195 from 190.22 from the nvidia repositories I was cut short during installation by dpkg-divert errors. Much hair ripping and table bashing ensued during my vain attempts to find a solution, the answer however did eventually surface here.

Essentially older drivers had pointed some packages to different ones as part of its installation routine, installing newer packages with different diverts did not also upgrade where these packages pointed. Running the following commands in the terminal fixed this:

sudo dpkg-divert --remove --rename --package nvidia-glx-185 --divert /usr/lib/nvidia/libGL.so.1.xlibmesa /usr/lib/libGL.so.1
sudo dpkg-divert --remove --rename --package nvidia-glx-185 --divert /usr/lib/nvidia/libGL.so.1.2.xlibmesa /usr/lib/libGL.so.1.2
sudo dpkg-divert --remove --rename --package nvidia-glx-185 --divert /usr/lib/nvidia/libglx.so.xserver-xorg-core /usr/lib/xorg/modules/extensions/libglx.so
sudo dpkg-divert --remove --rename --package nvidia-glx-185 --divert /usr/lib/nvidia/libGLcore.so.xlibmesa /usr/lib/xorg/modules/extensions/libGLcore.so
A guide to actually adding the Nvidia repo and installing these drivers can be found at Ubuntu Geek.

There appears to have been some confusion between – and - as symbols used in the code block here, if one doesn't work, please attempt to replace all instances of one with the other, and try again.

Ensure sound is routed through the Pulseaudio server with padsp


Padsp is a Pulseaudio OSS sound wrapper that can be used in front of a command in the terminal to ensure that OSS output is routed through the Pulse Audio sound server. A typical use would be to make sure that wine outputs through Pulse, which it is not able to do by default.

I happened upon the use of padsp while attempting to research a fix for Wine games, which would play sound if no other program was outputting at the same time, and simply not work if there were. The issue was that Karmic is heavily reliant upon the Pulseaudio server, and Wine was attempting to output straight through Alsa, bypassing the server. This would work as long as nothing else was playing, however if there was, Pulse would take precedent and sound output from Wine would cease.

The solution? Simply add padsp in front of a start command, and tell wine to output as OSS in itss configuration menu.

For example:


The start command for World of Warcraft in Wine is:

wine "/home/sam/.wine/dosdevices/c:/Program Files/World Of Warcraft/Wow.exe" -opengl

Changing this to:

padsp wine "/home/sam/.wine/dosdevices/c:/Program Files/World Of Warcraft/Wow.exe" -opengl

Routes the OSS audio output through the appropriate sound server, and ensures smooth sound playback while listening to music at the same time.

This will work with any application capable of outputting sound via oss that is not already detected by Pulse. I have found this command necessary to use for Emesene also.

My Desktop


May as well have an instance of it up here, It'll be interesting to update this occasionally and see how it changes over time.

I'll publish the conky scripts used in the image at some point, if only to have an online backup!

Virtualbox module needs recompiling after every reboot


Karmic would give me the message:

Kernel driver not installed (rc=-1908 )

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Re-setup the kernel module by executing

'/etc/init.d/vboxdrv setup'
Every time a virtualbox was initialised after rebooting. This would require the command given to be run with sudo privileges every single time, a lengthy and irritating wait.

This can be simply solved by adding the line "vboxdrv" to /etc/modules

So, in the terminal:

sudo gedit /etc/modules

Copy paste "vboxdrv" (without quotes) onto a line at the bottom of the file
Save and exit

Voila, hopefully problem solved!

Sunday 31 January 2010

Wicd asks for password on login


After installing Ubuntu 9.10 on my laptop shortly after its release, I moved from the default network manager to Wicd. This was primarily due to the fact that nm is unable to select between two cards installed at the same time, and throws a horrific hissy fit. Wicd has this capability.

In any case, upon login Wicd would ask for the root password in order to access network cards, which is incredibly irritating for a program that is meant to intialise as a daemon during bootup and typically be connected to the network by the time a user has actually logged in. A fix was needed!

After much googling a solution to the issue presented itself here. The problem occurs when the daemon is not properly started during bootup. When the Wicd tray icon subsequently starts it then fails to connect to an existing daemon and attempts to initialise the daemon itself, requiring the password input.

The fix involves adding the line exec wicd to the bottom of /etc/init/networking.conf.

So, in the terminal:

sudo gedit /etc/init/networking.conf

Copy paste "exec wicd" (without quotes) to a new line at the bottom of the file
Save and quit
Reboot the computer

Hopefully that will have sorted it!

Welcome to #!/bin/bash blog


As anyone who uses a 'nix based system will tell you, it doesn't matter how much research you do, there'll always be a fair few tasks along the way that require a fresh look at ye good olde Google to solve. This is the absolute one thing you need to not be afraid of if you intend to be a daily user on the desktop. Typically when I find a solution I'll apply it and then somehow manage to completely forget all about it in fairly short order. This necessitates a rehash of the entire solution finding session when I next come to set up a system.

Pain!

So I suppose this blog is really more for me than for anyone else, it'll be a handy place to store info any fixes/tips/cool programs that I find along the way. Who knows, maybe it'll also help a fellow user at some point...