
Unity sucks: Install Gnome 3 on Ubuntu 11.04
Posted: 27th May 2011 by kire in linux administration - tips, notes and projects
As you’re probably aware, the latest Ubuntu version looks very different. This isn’t a coincidence, they’ve changed from Gnome to Unity. Since Ubuntu started to build their own shell Unity, they have ditched Gnome shell entirely. You won’t even find Gnome 3 on the official repos! Many people within my industry and within the Linux community have felt like the latest Ubuntu was a downgrade. This is largely in part to Unity. There are a lot of people who don’t like Unity. Many don’t like it because of how it works, the look and feel, or that stupid vertical launcher bar that always seems to get in the way.
Well, rest assured. I’m one of the many who attempted to embrace Unity, and gave it a fighting chance. I’m here to declare today, it sucks. Great concept, and certainly a huge amount of potential — but for me, it’s just not a viable solution.
Here’s how to install Gnome 3 on Ubuntu 11.04
CAUTION : The actions listed here may very well break your Unity system and make it unstable or unusable. Only proceed if you have at least a basic knowledge of how to fix things if/when they break. This worked flawlessly for me, but your configuration and hardware is different. As always, I take no responsibility for what you type into your command line and you do so at your own risk.
First, go to a Terminal (In the main menu, go to Applications > Accessories > Terminal) and enter the following command to add the Gnome 3 PPA repository to your system:
sudo add-apt-repository ppa:gnome3-team/gnome3
Now, you’ll need execute the following commands (in order) to update the sources and upgrade the system. Please be sure you’ve got the latest version of Ubuntu:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
Next, enter the following command to install Gnome 3 :
sudo apt-get install gnome-shell
Finally, restart your machine and select “GNOME” from the login screen. After logged in, if you want to keep it (which if switching from Unity, I’d put money on the fact that you do) goto Activities -> Search “Login screen” and make GNOME the default.
Then, remove the junk:
sudo apt-get remove unity
Want a brand new pre-configured Linux Laptop running the latest version of Ubuntu and Gnome3 right out of the box?

You’re welcome.
TweetPandora on Linux: pianobar and pianobarfly
Posted: 1st May 2011 by kire in linux administration - tips, notes and projects, ubuntu linux“pianobar” is a free/open-source, console-based replacement for pandora’s flash player. “pianobarfly” is a patched version of it, which adds some pretty awesome features including capturing music from your stream into a local .mp3 file format.
Features
- play and manage (create, add more music, delete, rename, …) your stations
- rate played songs and let pandora explain why they have been selected
- show upcoming songs/song history
- configure keybindings
- last.fm scrobbling support (external application)
- proxy support for listeners outside the USA
- auto-rips streams to audio files
Where to get it
Normally you would have to download pianobar first, obtain the barfly patch and apply it. I’ve simplified all of that here: [Download]
How to install
This gets to be slightly complicated depending on what flavour of Linux you are using. For ubuntu/debian users, I’ve made it extremely easy:
# sudo apt-get install libao-dev libao-common libfaad-dev libmad0-dev libtagc0-dev
Then, you’ll need to retrieve the latest version from github:
This should leave you with a binary if all goes well. Copy it to somewhere in your $PATH (echo $PATH) and you can run it by simply typing pianobarfly. If not, you will need to get the appropriate libraries and packages for your particular system.
I do not offer support on this. Good luck!
Pianobar development page: http://6xq.net/html/00/17.html
TweetUnity: Move vertical launcher to another monitor
Posted: 30th April 2011 by kire in linux administration - tips, notes and projectsThose of you making the conversion from gnome to unity in this latest Ubuntu release will notice quite a few changes. When I installed 11.04 on my office workstation (with dual monitors), Unity’s vertical launcher appeared in the middle of the two screens (on the very left of the right hand monitor).
This is probably the worst place I could imagine wanting this handy tool, especially since I like to reserve the entire right monitor for my terminals.
If you’re experiencing a similar problem, here’s how you fix:
By default, the Unity launcher appears on whichever is the “primary” monitor. This varies depending on your configuration, but to put it simply: You want it on your other monitor, regardless of what Ubuntu thinks is your “primary”.
First, type xrandr to get a list of your monitors:
[eriks@jaded: ~]$ xrandr
Screen 0: minimum 320 x 200, current 2880 x 900, maximum 2880 x 2880
DFP1 connected 1440×900+1440+0 (normal left inverted right x axis y axis) 474mm x 296mm
1440×900 59.9*+
1680×1050 59.9 +
1400×1050 60.0 +
1280×800 60.0 + 75.0
1152×648 60.0 +
1280×1024 75.0 60.0
1280×960 75.0 60.0
1152×864 75.0 60.0
1280×768 74.9 59.9
1280×720 60.0
1024×768 75.0 60.0
800×600 75.0 60.3
720×480 60.0
640×480 75.0 60.0
DFP2 disconnected (normal left inverted right x axis y axis)
CRT1 disconnected (normal left inverted right x axis y axis)
CRT2 connected 1440×900+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
1440×900 59.9*+
1680×1050 60.0 +
1400×1050 60.0
1280×1024 75.0 60.0
1280×960 75.0 60.0
1280×800 75.0 60.0
1152×864 75.0 60.0
1280×768 74.9 59.9
1280×720 60.0
1024×768 75.0 60.0
800×600 75.0 60.3
720×480 60.0
640×480 75.0 60.0
As you can see, “DFP1″ is considered my primary monitor here. Here’s how you tell X11 who’s boss:
[eriks@jaded: ~]$ sudo xrandr –output CRT2 –primary
^ I used CRT2 here because that’s what I consider my primary monitor (on the left), regardless of how they’re connected to the computer. Be sure to substitute CRT2 with whatever xrandr detects your particular hardware as.
And bang, look up. Your launcher should have just relocated to the other screen.
The more you know ™
TweetUbuntu 11.04 released – Natty Narwhal
Posted: 29th April 2011 by kire in linux administration - tips, notes and projectsCanonical has announced the official release of Ubuntu 11.04, codenamed Natty Narwhal. This major update introduces the new Unity desktop shell, which is designed to improve ease of use and deliver a more modern user experience.
Ubuntu founder Mark Shuttleworth unveiled the Unity project a year ago during an Ubuntu Developer Summit keynote in Brussels. The new shell was originally created for the Ubuntu Netbook Edition and first shipped as the default netbook environment in Ubuntu 10.10. The Ubuntu developers have worked intensively over the last six months to adapt Unity for the desktop. The effort entailed a significant overhaul of the Unity frontend that boosts its performance, reliability, and suitability for use on larger screens.
The new Unity-based desktop shows a task dock on the left-hand side of the screen and a panel at the top with an embedded global menu. A screen overlay that emerges from the top panel provides access to additional features through modular content panels called “lenses.” The default environment comes with an application launcher lens and a file management lens.
Although many of the changes introduced in Unity represent tangible usability improvements, there are some parts of the environment—particularly the application lens—that still have some rough edges. Some users might also be put off by Unity’s lack of configurability. The position of the dock is one of several key aspects that can’t be customized. Users who prefer a more traditional environment or want to wait for Unity to mature further before making the switch can simply choose the “Classic” Ubuntu desktop in the system login interface.
Unity requires support for hardware-accelerated rendering, which might not work consistently across all hardware. The classic environment is also used as a fallback for users with unsupported hardware. A “2D” version of Unity, built with Qt, that doesn’t require compositing is under active development and could serve as the fallback in future versions of Ubuntu. The 2D version is shipping today in the Ubuntu ARM netbook port, but not on the regular Ubuntu CD.
In addition to delivering the new Unity shell, the new version of Ubuntu also brings some improvements to desktop theming and bundled software. The Gtk+ theme has a new slim scrollbar style and a number of other enhancements.
Ubuntu’s Software Center, which allows users to install and manage applications, got several noteworthy new features, including support for posting ratings and reviews. Canonical’s Ubuntu One synchronization service got some nice user interface improvements and performance optimizations. The default music player in Ubuntu changed from Rhythmbox to Banshee in this new release, improving the out-of-the-box music experience for end users.
There is a lot to like in Ubuntu 11.04, but also a lot of room for improvement. We will give you an in-depth view of Unity next week in our upcoming feature-length review of Ubuntu 11.04. You can also download it for yourself today from the Ubuntu website.
TweetRepair and optimize all mysql tables from CLI
Posted: 22nd March 2011 by kire in linux administration - tips, notes and projectsHere’s how to check, repair and optimize all your mysql tables in all databases on a server…
mysqlcheck -u root -p – -auto-repair –check –optimize –all-databases
Note: you do not have to have root to do this, simply replace -u root with -u yourusername
That’s it..
(Remember if you are using a tool like phpmyadmin (http://www.phpmyadmin.com) you can always log in, browse to the table, select operations and choose “repair”, “check”, “analyse” or “optimize table”)
TweetMass updating zone file serial numbers with sed
Posted: 19th March 2011 by kire in linux administration - tips, notes and projectsTags: bind, named
If you’ve ever administered a DNS (name server), than you know that serial numbers mean a lot. But what happens when you have several [hundreds|thousands] of zone that you need to make a mass-change to. That’s easy enough, there’s tons of ways to do that with sed, awk, or simple tools like “replace”. However, once you’ve done the easy work, you still need to update all the serial numbers as well. Here’s how I saved myself hours of manual labor:
If you’re even reading this article, it’s expected that you at least know that a serial number is in the form YYYYMMDDNN where NN is the update number for that day. So the serial number from my post today would be 2011031900.
Now here’s how you tell sed what you want done (note, this formula assumes that your previous serial numbers were post-2000):
# sed -i ‘s/20[0-9][0-9]\{7\}/2011031900/g’ *.db
This says to replace any text starting with 20+[any two numbers 0-9] and followed by another 7 digits with the string: 2011031900
Problem solved, check out your zones now (provided they end in the standard format of domain.tld.db).
TweetUndefined subroutine &Cpanel::Update::automatic_updates_enabled called at /scripts/upcp line 273
Posted: 17th March 2011 by kire in linux administration - tips, notes and projectsRecently, I’ve seen cPanel upgrade throwing errors during upcp such as:
# /scripts/upcp
/scripts/upcp syntax OK
Running Futex Check/Fix……Done
Undefined subroutine &Cpanel::Update::automatic_updates_enabled called at /scripts/upcp line 273.
Fix:
wget -O /root/updatenow.static http://httpupdate.cpanel.net/cpanelsync/RELEASE/scripts/updatenow.static && perl /root/updatenow.static –manual
Then force the upgrade:
Tweet/scripts/upcp –force
The second maintenance update of Ubuntu 10.04 LTS has been released.
Ubuntu 10.04 LTS will be supported with routine maintenance updates until April 2013 on desktops and April 2015 on servers,
The release integrates ‘numerous post-release updates’ including security updates and ‘corrections for high-impact bugs, with a focus on maintaining stability and compatibility with Ubuntu 10.04 LTS.’
Changes
A full Change log for Ubuntu 10.04.2 can be viewed on @ http://wiki.ubuntu.com/LucidLynx/ReleaseNotes/ChangeSummary/10.04.2
Download
Ubuntu 10.04.02 can be downloaded @ http://ubuntu.com/desktop/get-ubuntu/download
Howto: Delete files by inode number
Posted: 10th February 2011 by kire in linux administration - tips, notes and projectsEver mistakenly pipe output to a file with special characters that you couldn’t remove?
-rw-r–r– 1 eriks eriks 4 2011-02-10 22:37 –fooface
Good luck. Anytime you pass any sort of command to this file, it’s going to interpret it as a flag. You can’t fool rm, echo, sed, or anything else into actually deeming this a file at this point. You do, however, have a inode for every file.
Traditional methods fail:
[eriks@jaded: ~]$ rm -f –fooface
rm: unrecognized option ‘–fooface’
Try `rm ./–fooface’ to remove the file `–fooface’.
Try `rm –help’ for more information.
[eriks@jaded: ~]$ rm -f ‘–fooface’
rm: unrecognized option ‘–fooface’
Try `rm ./–fooface’ to remove the file `–fooface’.
Try `rm –help’ for more information.
So now what, do you live forever with this annoyance of a file sitting inside your filesystem, never to be removed or touched again? Nah.
We can remove a file, simply by an inode number, but first we must find out the file inode number:
$ ls -il | grep foo
Output:
[eriks@jaded: ~]$ ls -il | grep foo
508160 drwxr-xr-x 3 eriks eriks 4096 2010-10-27 18:13 foo3
500724 -rw-r–r– 1 eriks eriks 4 2011-02-10 22:37 –fooface
589907 drwxr-xr-x 2 eriks eriks 4096 2010-11-22 18:52 tempfoo
589905 drwxr-xr-x 2 eriks eriks 4096 2010-11-22 18:48 tmpfoo
The number you see prior to the file permission set is actually the inode # of the file itself.
Hint: 500724 is inode number we want removed.
Now use find command to delete file by inode:
# find . -inum 500724 -exec rm -i {} \;
There she is.
[eriks@jaded: ~]$ find . -inum 500724 -exec rm -i {} \;
rm: remove regular file `./–fooface’? y
And done.
Tweet