Saturday, May 28, 2011

Elementary Chrome Theme

For those of us that love and use Elementary, a theme for Gnome and also for Nautilus by way of the highly-recommendable Nautilus-Elementary, it can be a bit irksome to have just one part of your system not matching. If you use Chrome, you may enjoy this Elementary-style theme for the speedy browser.
Installation is pretty straightforward, so I'll spare ya the details unless otherwise requested.

Change Unity launcher size

As mentioned in the previous post, you can tweak some of the unity settings through compizconfig-settings-manager. Install and run this application.
Next, click on Ubuntu Unity Plugin, and you can use a slider to adjust the size of your launcher.
This is particularly useful for those of us using Unity on a netbook.
You may want to take some time to play with some other settings while in the application as some of them are useful.

Remove Unity icon background color

Unity has a default behavior which colors icon backgrounds to match with the main color of the icon. At first, I assumed that the color must've been coordinated with some unseen function of the application. Then I thought maybe it was random. When I noticed that it was just matching, I decided to seek out a way around it. For those of us that find the Unity icon color behavior to be strange and a bit distracting, you can disable this behavior quite easily.
1) Install compizconfig-settings-manager (through software center or:
sudo apt-get install compizconfig-settings-manager
2)Open the application and click on the Ubuntu Unity Plugin button
3)Turn off "backlighting"

This achieves, in my opinion, a much cleaner look.

Thursday, January 13, 2011

Alternative to Ubuntu Netbook Edition using Ubuntu Desktop tweaks

Prior to the release of 10.10, I was really very excited about the new Unity Launcher feature in this iteration of Ubuntu Netbook Edition. I did have my concerns, however; it was such a huge new change and it seemed like it would inevitably need time to mature out of its 'bleeding-edge" bugs and usability issues. When it released, reviews told me that sadly I was correct. So when my netbook, I had some decisions to make.
Ultimately, I decided to wait on Netbook Edition to smooth some of the rough edges (though I was a fan of its last incarnation) and do things my own way.
I installed the desktop edition of 10.10 (Maverick Meerkat) because I know I can expect quality and some degree of consistency. But I also wanted to optimize things for use on my Netbook. I finally came up with what I feel is the perfect setup for me.
First of all, I hate the bottom and top bars. I got rid of both of them and replaced them with Awn.
Awn and many other of the tools I install only really look good with visual effects enabled. I went to enable the effects and realized that the options to enable them are inexplicably "grayed out".

Let's start small with a big improvement: install Nautilus Elementary. It's basically a modification to Gnome's Nautilus file browser to make it more clean and minimalist. There is a ton of information available on the web highlighting its features and explaining why it's great so I won't go into it, except to say that you should install it. Here are the commands:

sudo add-apt-repository ppa:am-monkeyd/nautilus-elementary-ppa
sudo apt-get update && sudo apt-get dist-upgrade




Install compiz, which is not installed by default, so that you can have a slick-looking desktop with compositing (drastically improves appearance of the apps below). This is not installed by default in Netbook Edition and I don't remember if it was installed in the desktop version either. Trying to remedy this caused some confusion for me. It comes as a part of desktop Ubuntu and when you go to "Appearance" to turn it on under Netbook Edition, the options are there but grayed-out. It took some searching and wasted time to figure it out so here you go.

sudo apt-get install compiz-gnome

Next, install Awn (Avant Window Navigator) dock application from their official repositories (I like to use their repositories instead of the Ubuntu repo's because quite frankly, I like the shine of the "Lucido" style offered in the newer version):

sudo add-apt-repository ppa:awn-testing/ppa && sudo apt-get update
sudo apt-get install avant-window-navigator-trunk python-awn-extras-trunk awn-applets-c-extras-trunk dockmanager-daemon dockmanager


Within Awn's settings, you will more than likely want to add a lot of applets. My setup goes like this (in order from left to right): Cairo Main Menu, Separator, Launcher/Task Manager, another Separator, Indicator Applet, Garbage, Preferences Applet, Show Desktop, Cairo Clock, Quit-Log Out Applet. You can figure out which of these are optional, but most of them are pretty important if Awn will be replacing other menus. Don't bother changing the settings under the Preferences tab until you have the theme you want selected/installed (so if you're going to use the Elementary-inspired Awn theme from below, hold off until you do that) because those settings will change when you change the theme.

Now install Synapse application launcher for easy access to just about anything on your computer (similar to Gnome-Do).

sudo add-apt-repository ppa:synapse-core/ppa
sudo apt-get update && sudo apt-get install synapse


Install elementary-icon-theme from repository.

sudo apt-get install elementary-icon-theme

Install elementary theme from ppa

sudo add-apt-repository ppa:elementaryart/ppa
sudo apt-get update && sudo apt-get install elementary-theme


install elementary awn theme available here

With all this done, if you're fairly confident with the new setup you can right-click the top panel and delete it.
Now, to remove the bottom panel (only do this if you're sure you like the setup and/or are fairly capable of troubleshooting, just in case (though it should be pretty straightforward)), you will want to use the command line and type:

sudo mv /usr/bin/gnome-panel /usr/bin/gnome-panel-old
Make sure Awn and Synapse are set to start at login (via their prospective settings) and log out, and then back in. You should just have the Awn dock on the screen.
If you want to get that bottom panel back, typing the following in the command line and then logging out/back in should do the trick:
sudo mv /usr/bin/gnome-panel-old /usr/bin/gnome-panel


Notes: Check out the preferences for Synapse and AWN to adjust the settings to your liking. For example, I prefer "super(windows key)+space bar" to access Synapse. I also like AWN to be set to autohide and to be on the left side of the screen.


For a cool dark overall look, try this combination of themes:
Wingpanel-like Awn theme:
http://igotnonick.deviantart.com/art/Yet-Awnother-WingPanel-192551989

Atolm GTK theme (dark-gray, brushed look):
http://skiesofazel.deviantart.com/art/Atolm-191381339

AwOken icon theme:
http://gnome-look.org/content/show.php/AwOken+-+Awesome+Token+icon+set?content=126344

Wednesday, January 12, 2011

Fix slowness during writing to/reading from hard drive

I have been plagued by my choppy mouse movement (most noticeable) and generally poor performance while running Deluge for a while. I had a really hard time ruling out possible reasons for this issue. First I noticed it wasn't just Deluge, but all BT downloads. Then I tried using a console BT client (also Deluge, which I highly recommend) and realized that the problem still persisted. Finally, I realized that as I limited my download/seed speeds I experienced less and less issues. This wasn't a networking issue, and so I finally narrowed it down to an IO issue; that is, the faster things were being written and read from the disk, the worse the problems became. I hardly ever noticed it before because generally when I'm moving files around it doesn't take more than a minute or so.
I did a bit of research and thanks to the good folks at techtidbits.com, I found what seems to be a solution. I changed my default IO scheduler from the default in Ubuntu, which is called CFQ, to a scheduler called Deadline. So if you're experiencing similar problems, I suggest giving it a shot. It's made a world of difference in my entire experience while I use my computer because I'm almost always downloading.
First, give Deadline a try (you can change it on-the-fly without any real effort).
From the console, use this command:
echo "deadline" | sudo tee /sys/block/sda/queue/scheduler
Now, keep in mind you'll possibly need to change "sda" to something else (whatever drive your root partition is on, which you can find out by typing file /dev/root in the console.
For me, this yielded symbolic link to `sda5'. So, I left "sda" as is.
Now, you want to test the results to make sure there are no problems and, hopefully, observe improved performance. Do this by copying a large file to/from your hard drive.
If all went well, you'll want to make your changes permanent. To do so (if you're using GRUB2, which most Ubuntu users are (it's been default since 9.10 on)),

gksudo gedit /etc/default/grub

put in your password and when gedit launches, look for

GRUB_CMDLINE_LINUX_DEFAULT=""

and change it to say:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=deadline"

Next, run the following:

sudo update-grub

You should get output similar to:

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.31-20-generic
Found initrd image: /boot/initrd.img-2.6.31-20-generic
Found memtest86+ image: /boot/memtest86+.bin
done

If so, you're good to go! Enjoy your improved IO performance.

Sunday, September 12, 2010

Radeon 5830 watermark issue

Since first install, as soon as I used the Hardware Drivers manager (used to install proprietary drivers after you install Ubuntu) to enable the "ATI/AMD proprietary FGLRX graphics driver" for full functionality of my Radeon 5830, I had an annoying watermark in the bottom right corner of my monitor.  It was always on top of everything, even when my power settings made my screen blank after x minutes of inactivity.  Not a serious problem, just gave me that dirty feeling of something being not quite the way it should.  I followed these instructions that I got from the official Ubuntu forums  (thanks to user Temujin) to fix the problem.  Some of these instructions I have paraphrased and some are taken verbatim.  I can not take credit for ANY of it and have simply reposted it in hopes to help someone else.


  1. Download this file to your home directory (~/) or move it there.  This is the control file from Catalyst 10.05.  Others might work, and I don't really know too much about control files.  I just know this one fixed my problem.
  2. Plug these commands into your console blindly.  I know this is generally ill-advised, but I'm telling you it worked for me under Lucid x86 with this particular video card so if you have the same setup and situation, it should probably work for you.
    • cd ~ This changes your working directory to be your home directory, where you have presumably placed the file you just downloaded.
    • tar xzf control.tar.gz This extracts the control file from the tar archive.
    • sudo cp /etc/ati/control ~/control.bak This is just you creating a backup of your original control file.
    • sudo cp control /etc/ati This overwrites the old control file (which you just made a backup of) with the one you've just downloaded.
  3. Log out and log back in to restart the X server.  No watermark?  Hooray!  Watermark still there or all hell broke loose?  Sorry!  Move on to the otherwise unnecessary next step.
  4. If you broke something in following these instructions, then be glad you made a backup because it's a simple fix.  From the command line, type sudo cp ~/control.bak /etc/ati and you're back to the drawing board, watermark and all unless god has intervened.
    The original post can be found here.

    Tuesday, September 7, 2010

    Cleaning, Sorting, and Tagging Your Music Library

    I think people with big collections would agree with me that if you're not fastidious about keeping everything perfect, you end up with albums missing one track, with an incomplete download or two, with no tags at all or with fields left blank, with goofy and confusing filenames, etc.  You may start a download and then just cancel it, or it may never finish.  Then, you forget it ever started and a week goes by and it's joined the ranks of your meticulously tagged and named mp3s.

    If you're like me, you also may like to have all of your albums and tracks to have a uniform scheme.  This is where a cross-platform called MusicBrainz Picard comes in.

    In case you haven't heard, Picard works alongside a database of full albums on their website which have ID3 tags corresponding with individual tracks, which live on the database as a part of an album.  Taken from the official website, "When tagging files, Picard uses an album oriented approach. This approach allows it to utilize the MusicBrainz data as effectively as possible and correctly tag your music. For more information, see the illustrated quick start guide to tagging.". 


    I like to change the settings in Picard before I start sorting and renaming my files.  In my particular situation, I have all of my music downloads automatically moved to a directory that I have named 'unorganized' (Deluge does this for me.  Here's how.).  So, once Picard does its magic, I want them moved into a parallel directory which I've named 'Full Albums'.  To achieve this, from Picard choose the Options menu and then the submenu also called Options.  Here you may as well enter your account info if you haven't, which is under General, and then move on to the Moving Files tab on the left.  I believe the only reason you need an account is if you want to change their database (for example, if some of their tags are wrong or you want to add an album that's not currently submitted.  This is the kind of stuff that you can do if you want to help make it even more useful, and it's actually kind of fun).  From here, just select where you want the files to go after they're all pretty.

    Next, under File Naming, I ticked the "Rename files when saving" box.  What this will do is change the actual file name based on the format you provide and the ID3 tags that it fetches from the MusicBrainz database.  Herein lies the convenience and awesome power of MusicBrainz Picard.  In the text box labeled "Name files like this", I came up with the following:

    %artist% - %album%/%artist% - %album% - $num(%tracknumber%,2) - %title%




















    which will get you a file that looks like this:









    .../Full Albums/The Beatles - Help!/The Beatles - Help! -  07 - Ticket to Ride.mp3


    and under "Name multiple artist albums differently" I came up with:

    $if2(%albumartist%,%artist%) - %album%/%artist% - $num(%tracknumber%,2) - %title%

    for a file that looks like:
    .../Full Albums/Various Artists - Explosive Doowops, Volume 4/ The Fantasys - 05 - Why Oh Why.mp3

    If you're up for the challenge, create your own file naming scheme using Picard scripting.  It's not that difficult, really, and official documentation can be found here. And is quite rewarding if you're the type of person that likes uniformity in filenames like myself [read: ocd]

    Edit: Note that if you have any non-audio files in the original (pre-Picard beautified) directories that hold your albums, Picard will not delete the directories after renaming/tagging/relocating the mp3s because they still hold files to which you may, but probably will not, want to hang on.  So, if you're moving albums from a directory of stuff you haven't fixed yet to a directory of pristinely-tagged and renamed files, you might want to just ditch the left over stuff such as album art and .nfo files.  If you're like me and prefer to ditch most of the remaining garbage, this can be done with a few commands.
    Things I opted to delete included album art (Picard will attach album art to the mp3's tags anyway and the most popular music library managers/music players fetch album art, so it becomes redundant), .txt files, .nfo files, thumbs.db's, etc.
    Here's how I did it from the command line.
    First, make sure you are in the proper directory, which for me was ~/Music/unorganized/.  Next, type any or all of the following (but be warned, it indiscriminately and recursively deletes all files that fit the description you give it.  If you have accidentally forgotten that you have a directory with all of your family photos in it hidden in a subdirectory of your music directory, you will irreversibly lose all of them.  Use with caution, and be sure none of the file extensions in the following commands are files you may want to keep such as playlist files!  These things you will have to relocate manually.).

    find . -iname *.jpg -exec rm {} ';'
    find . -iname *.m3u -exec rm {} ';'
    find . -iname *.nfo -exec rm {} ';'
    find . -iname *.sfv -exec rm {} ';'
    find . -iname *.txt -exec rm {} ';'
    find . -iname *.log -exec rm {} ';'
    find . -iname *.db -exec rm {} ';'

    find . -iname *.url -exec rm {} ';'
    find . -iname *.ini -exec rm {} ';'
    find . -iname *.dat -exec rm {} ';'
    find . -iname *.gif -exec rm {} ';'
    find . -iname *.jpeg -exec rm {} ';'
    find . -iname *.pls -exec rm {} ';'

    If you want to save yourself some time, you can just do this all in one line by chaining the commands together using && (again, this is very powerful so use your brain and be sure you're in the right directory meaning one that should only contain music, and that you actually want to ditch all files with the listed formats).






    find . -iname *.jpg -exec rm {} ';' && find . -iname *.m3u -exec rm {} ';' && find . -iname *.nfo -exec rm {} ';' && find . -iname *.sfv -exec rm {} ';' && find . -iname *.txt -exec rm {} ';' && find . -iname *.log -exec rm {} ';' && find . -iname *.db -exec rm {} ';' && find . -iname *.url -exec rm {} ';' && find . -iname *.ini -exec rm {} ';' && find . -iname *.dat -exec rm {} ';' && find . -iname *.gif -exec rm {} ';' && find . -iname *.jpeg -exec rm {} ';' && find . -iname *.pls -exec rm {} ';'



    Replacing -exec with -ok as in the command below will provide you with control over each file to be deleted.  It will prompt you to respond with a Y/N for every individual file.  It's more time-consuming, but it's more safe.  Below's an example of what that command would look like for jpegs.
    find . -iname *.jpg -ok rm {} ';'


    Once you're done with all of this you may wish to delete empty directories that may be left over from before you ran the command(s) if you have already used Picard.  For example, when I ran the above commands, I forgot the one for *.jpeg, which caused Picard to move all of the tracks and leave the folder containing just the album art.  So once I ran that command, rather than hunt for all of the now-empty directories that used to contain only .jpeg files, I did a little Googling and found the following command to delete empty directories.

    find -type d -empty -delete

    Don't say I never did nothin' for ya!