Saturday 19 November 2011

Create persistent Bash aliases


Having recently updated to Xubuntu I found that the command "l" no longer showed a colourised 'ls' output, which was rather irritating. The solution is, of course, to re-create the bash alias so that the command 'l' executes what I expect it to. I'm unsure whether or not I managed to remove this functionality myself at some point, or whether it's simply not a default alias in Xubuntu.

In any case, I didn't have a .bashrc file in my home directory, so the first thing I did was to copy the default one to it:

cp /etc/skel/.bashrc ~/
It turns out this is enough to get the 'l' command back, as it already exists in that bashrc. Having had a look through this default .bashrc though, I couldn't resist the temptation to add another alias for convenience!

Simply append the following to the end of your ~/.bashrc to have the terminal update and upgrade when you type 'update'
alias update='sudo apt-get update && sudo apt-get dist-upgrade'
It's tempting to go nuts and start adding aliases left right and centre for mundane tasks, this is something that should probably be resisted for anything that isn't both genuinely useful, and frequently executed however.

Friday 11 November 2011

Force Nvidia Powermizer to always set performance mode - Ubuntu 11.10 (Update)


This is an update from an older post, as that particular method no longer seems to work in the latest version of Ubuntu. This one, however, does.

Open xorg.conf with your favourite editor:

sudo nano /etc/X11/xorg.conf
Add the following line under the section "Device"
Option "RegistryDwords" "PerfLevelSrc=0x2222"
So that your device section looks something like this:
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
Option "NoLogo" "True"
Option "RegistryDwords" "PerfLevelSrc=0x2222"
EndSection
Save and reboot, hopefully your performance level is now always at maximum.

Monday 24 October 2011

Moving windows laggy in Compiz


A most irritating bug whereby windows will jerk and lag when attempting to move them, either after compiz has been running for a bit, or just after a viewport/workspace change.

The problem appears to be something to do with mouse polling in compiz, and the fix is to limit the rate at which your mouse can be polled.

Following the solution posted here:

sudo gedit /etc/modules
Add the following to the end of the file:
-r usbhid
usbhid mousepoll=10
Save and reboot. Hopefully moving windows is now back to being smooth!

Friday 21 October 2011

Manually change GTK3 theme in Xubuntu, Xfce 4.8


Due to a rather intense dislike of both Unity and Gnome-Shell in their current iterations, I've recently switched to using Xubuntu. One quibble i've had is that changing the theme in xfce4-settings-manager often causes the theme used with gtk3 applications to revert to the ugly default, presumably as many themes do not have gtk3 counterparts to display.

The only solution i've been able to find with regards to manually changing the gtk3 theme is to hunt down the theme folder in /user/share/themes and copy the gtk-3.0 folder from that theme into ~/.config.

So if you've changed the theme and just want the default greybird gtk-3.0 theme back for your gtk3 apps, while keeping a different theme for your gtk2 applications you might run something along the lines of:

cp -r /usr/share/themes/greybird/gtk-3.0 ~/.config

For applications run as root to adapt to this theme too you'll need to copy to /root/.config also.
sudo cp -r /usr/share/themes/greybird/gtk-3.0 /root/.config

Hope that helps someone, as it was beginning to annoy me rather a lot. If anyone has a cleaner way to do this please let me know.

Thursday 26 May 2011

Ubuntu - Skype won't start, crashes with aborted.


Completely out of the blue a previously working install of Skype started crashing out every time it was started. The window would flash up briefly, and then dissapear, leaving an "aborted" message in the terminal. I'm unsure as to what caused this, as I hadn't recently applied any updates, however I eventually found a fix.

For 64 bit the problem appears to be to do some combination of ia32-libs and the Skype temporary directory. So (skip to the second command if you're using 32 bit):

sudo apt-get install --reinstall ia32-libs
and remove the skype temporary directory (This will remove stored passwords and conversations):
rm -rf ~/.Skype
Start Skype again and hopefully it'll work! While searching for information on this problem I saw a fair few different fixes, with differing success rates, so while this may or may not work for you, it's worth a try.

Otherwise, this thread on launchpad may help.

Edit: The problem seems to be fairly widespread, and across distributions - So I suspect Skype have managed to do something that has broken current installations of their program on Linux.

Edit2: A less intrusive and more specific alternative of the second command appears to go along the lines of (thanks to whoever commented this):
 rm ~/.Skype/shared.xml
This will preserve things like your chat history. As this is the file causing the problem.

Monday 11 April 2011

Install Steam version of Darwinia natively in Ubuntu 64 bit


Idle hands end up fiddling with stuff when you have a Linux distro at your fingertips!

So having this game in my steam list led me to wonder if it was possible to install Darwinia on my Linux box without repurchasing the game. Happily, it turns out that it is, though it requires a little bit of fiddling to get running.

Tuesday 11 January 2011

Ubuntu 10.10 can't connect to Win 7 share, password keeps popping up


A most irritating problem, no matter how many times you enter the correct password the box will pop up again.

Evidently this is a problem with Windows 7 Live Sign-in Assistant. The solution being to simply remove it from the windows machine providing the share.