Monday, April 28, 2008

Getting Shrinkable Tabs with Epiphany

One of my grudge against Epiphany is that its tabs goes off-screen when I open lots of tabs and I need to scroll through the tabs to find the tab I wish to switch to. This gets really annoying when I have like a dozen or more of opened tabs.

Googling around, and I was pointed to this epiphany extension from Epiphany 3rd Party Extensions page : Only One Close Button.

From the description:

Only One Close Button

Author: Stefan Stuhr

This extension has several purposes. The first is to get rid of the close buttons on all tabs. The second is to make the tab width more flexible; instead of a fixed width they will scale, so that there will first be overflow with many tabs open. The third is to make a close button available as a toolbar button.

The name might not tell me that is what I want, but the description do. So, I grabbed it, and here goes:

The close button had to be added manually using "Customize Toolbar", and because the Extension purpose is to make theres Only One Close Button, I couldn't get the close button to appear on each tabs like how Firefox handle it. Anyway, having all tabs appear on the same page have much more value than the close button.

Some side stuff,

I have been using Firefox3 for quite a while now. It is promised that FF3 will have better memory management. During the alpha, memory consumption does looks reduced, but lately, it got back like how it was during FF2. With constant 200-300MB of consumed swap and physical RAM maxed out, it gets annoying sometimes (I keep monitoring the RAM/Swap utilization using the gnome-system-monitor panel applet). Closing firefox frees my RAM from 150% to 80% utilization. So, I'm back to my old habit of cycling between epiphany and ff depending on my needs. But firefox still maintain as my primary browser because of the flexibility of the tabs. Now that Epiphany tabs are "better", I guess I can switch Epiphany as my primary browser, and FF and secondary. Midori browser is good too as another backup browser, but lately its been crashing when I start it (and the tabs follow the default Epiphany tabs).

Saturday, April 26, 2008

Shakugan No Shana Season 1 : @ NTV7!?

Looks like NTV7 just started showing one of my all time favourite anime! .. Shakugan No Shana!!!!. I noticed it just now, when they air the first episode. And guess what, it remains in Japanese, which ROCKS!!

So, Saturdays: 12:30pm, Malaysian anime lovers get the chance to see Shana in action, on Malaysian TV!. I have the whole 2 seasons (season 2 just ended a few weeks ago) in my anime collection, but I guess I'll still watch the TV version (although, undoubtedly, it might have some parts cut).

First Trinity Blood, then Jigoku Shoujo, and now , SHANA!!!!!!. And all of them broadcasted in the original Japanese language, which preserve the beauty of the original seiyuu, the sound effects, and most important, the moe-ness!!.

Go NTV7!!!!

Thursday, April 24, 2008

A little hack to get a working Skype RPM with less painful PulseAudio support

This is almost a very old news I presume, nonetheless, I just noticed it today while wasting my time jumping to random Open Source project sites.

It is well known that skype and pulseaudio doesn't play well together. Skype's ALSA implementation doesn't really implement all of the standard ALSA API which caused alsa-plugins-pulse to not work with skype. Fortunately, as stated in PulseAudio Perfect Setup page, the skype static OSS (Open Sound System - another sound standard, different than ALSA) package can be used to work around this issue through padsp.

However, the skype_static-oss package come in a tarball, of which, is ugly/inconvenient to certain people (like me). So, I've hacked together a spec to repackage that binary blob and make Skype almost JustWorks for Fedora. I don't know what Skype's regulation for redistribution of their binaries, so, to be safe, I can only provide you the RPM spec file.

Here is the spec file : skype_static-oss.spec.

Just put the skype_static-oss tarball in your rpmbuild SOURCES directory, and invoke rpmbuild -bb with the spec file. Install the generated rpm and use it as you would normally.

For those who are not familiar with rpmbuild, heres a little script to get you going

# as root
yum install rpmdevtools

# as user
cd ~/rpmbuild/SPEC
spectool -R -g -A skype_static-oss.spec
rpmbuild -bb skype_static-oss.spec

# ... wait ... wait ... wait
# grab the generated RPM
# rpm -ivh (the generated rpm)
# enjoy~

Oh btw, the spec is under WTFPL. Just do wtf you want with it.

Wednesday, April 23, 2008

Separate taskbar / window list on dualhead GNOME

I noticed this just now when playing around with the panel on my dualscreen setup.

If both screens have a panel with window list on it, the window list will only show the windows of the screen where it resides.

Cool feature.

Monday, April 21, 2008

Workspace Upgraded!

First up in this post. Workspace v0.1.

This was my workspace since I started my internship with Inigo. Small, compact, with only my 1024x768 resolution of my loyal companion Thinkpad R51.

After 4 months with Inigo, 1024x768 started to feel too small to work with. So, on the last PIKOM PC Fair, I decided to grab one external monitor to plug to this laptop for extra screen real-estate. Kaeru recommended me to grab one very big screen - 22inch - and I went for it.

Lucky for me, Dell was having a promotion for their E228WFP Entry Level monitor. For only 849 MYR (approx 265 USD), I'll get a 22inch TFT monitor with 5 years warranty. Tempted, I bought it. Its not cash-n-carry, so I had to wait a week for the monitor.

A week after

The monitor arrived!!!

Setting up for dual display is a little bit tricky with my laptop's i855gm. First, Xrandr couldnt detect all of the resolutions of my 22inch screen. After some tweaking with Xorg.conf and guessing config entries, I got it working at last.

Second tricky part was setting the dual screen layout for left-right position. Sadly I discovered that for i855gm, maximum virtual space is only 2048x2048. So, I had to instead use top-bottom layout to get dualhead working.

Once I understood and accepted the two limitation above, the new gnome-display-properties rocks!!!. It make it easier to configure dual display screen locations and enabling/disabling displays using Xrandr.

And .... Workspace v0.2 is released!!!!

Now, If only I can put that 22inch monitor higher so that i don't need to strain my neck typing on the left, with the display on the right.


Thursday, April 10, 2008

Me! Me!!!

A Meme happening at Planet Fedora. I'm hopping in too~!.

[izhar@hikari ~]$ history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
179 vi
112 python
96 cd
82 ls
37 rpmbuild
27 su
27 locate
23 ssh
23 rpmlint
22 diff

I use vim and python more than cd and ls ?? Thats unexpected.

Tuesday, April 01, 2008

12 YUM Tips and Tricks

YUM Update Manager is the default package manager used in Fedora and Fedora derivatives. It is written in Python and have tonnes of features which average Joe might not know about. These additional features helps a lot on maintaining your system, improving your experience using the package manager and become more productive. Granted, yum depsolving and querying is quite slow compared with APT, but the flexibility and power yum grant to its users, its worth it.

To my comrade, Surface, here, as you requested.

Tips 1: Fastest Mirror

This is usually the very first yum plugin I install in a new Fedora deployment. What does it do?, well, the name tell it all. The plugin will time all the servers in the replied mirrorlist from, and pick the one which is the fastest for you. Everything is done automagically, and considering its a YumCore class of plugin, it works with whatever GUI you use for yum.

To install this plugin, use

yum install yum-fastestmirror

Unlike APT which you had to pick the fastest mirror yourself, yum handles this more elegantly

The plugin, after it has checked which server is the fastest, it will store a metadata in /var/cache/yum/timedhosts.txt . That metadata will expire after some time. However, if somehow, the cached timedhosts are no longer fast, you can easily force yum to recheck for fastestmirror by deleting that file.

Tips 2. Security Only Update

This tips helps a lot for users who can't keep up with Fedora updates. Fedora is well known for its very fast updating "updates" repository. Things get old quite fast in Fedora. Some people however, are afraid of updating their system to the latest updates packages, mainly because sometimes, these updates, suddenly break stuff as Fedora updates are not backport of fixes but rather moving forward to a newer version. One way to get around this overly sized and numbered updates is by only updating the system with security updates. Theres a plugin for yum for this purpose, and you can install it through

yum install yum-security

To use this plugin to update your computer to the latest security fixes, just use

yum --security update

I have a detailed post about this plugin here

Tips 3: Presto

If you are on a budget internet connection with very limited bandwidth, yum-presto is for you. The presto plugin will download deltarpms, which are the changes of the current version installed in your computer and the one on the internet. This will drastically reduce your download size and you can get your updates faster.

Work is being done to integrate Presto to Fedora's base repositories, however, the developers are still facing problem trying to integrate Presto with Koji and Bodhi, the buildsystem and the updates pushing system of Fedora. Therefore you will need to configure Presto after installation by following the details at

To install this plugin, use:

yum install yum-presto

Tips 4: Do NOT Mix Repositories!

Mixing repositories .. is BAD. There are a lot of repositories out there for you to choose from if you google enough. However, these repositories doesn't necessarily compatible with Fedora base repositories or between each other. I would only recommend users to install only Livna and small repositories which provide a small number of packages like Adobe Linux flash repository or Google's Apps repositories. Livna is the best because of their packages follow closely with Fedora's Packaging Guideline, so, you can expect that their quality of packages are as good as the real thing.

Good news that Livna, Freshrpms and Dribble are merging to form RPMFusion. Until RPMFusion is launched, just stick with Livna.

Tips 5: Broken dependencies? Skip them

Once you start installing 3rd party repositories, broken dependencies is a risk you will need to take on. This usually happens when the base repository and the 3rd party repository's packages are not in sync with each other. There is a yum plugin to help you automatically skip these broken dependencies together with packages which are affected by it. Its called yum-skipbroken. In rawhide F9, skip-broken have been merged with the core yum. I am not sure about F8.

To use it, just use the --skip-broken option parameter on the command line.

yum --skip-broken update

If the option is not available for your Fedora installation, try installing the plugin through

yum install yum-skipbroken

Tips 6: Using proprietary drivers? lock your Xorg and Kernel version!

This plugin is very useful for users who are using proprietary drivers or kernel modules and would like certain packages to remain as it is to avoid breaking the drivers. I found this useful when I installed Fedora in a friend's computer and he/she needed to use a proprietary driver. I would lock his/her kernel and xorg from upgrading (yes, somehow this approach feels ugly, but it helps preventing them away from updating things which might break the driver)

To install, use:

yum install yum-versionlock

Documentation on how to use it is available in /usr/share/doc/yum-versionlock-%{version}/README

Tips 7: Keep the cache for future use

Yum by default does not keep it cached downloads. You can change this behaviour through editing the yum config and change keepcache=1.

The yum cache directory, /var/cache/yum can be useful if you are going to play around a lot to the point that you might need to reinstall you Fedora installation frequently. It helps saving some time to redownload all those packages all over again. Just copy the rpm packages in that directory out, and you can reuse it later. You can also create a repository out of it using createrepo.

Tips 8: For organizations, create local mirrors!

It easy to create local mirrors for YUM repositories. There are several way of doing it - Rsync, or reposync (provided by yum-utils package). In normal situation I would recommend using rsync, but for poor me who in a college that blocks rsync, I uses reposync. Reposync downloads through http, but a bit harder to use to setup a usable repository.

A documentation on how to start contributing as a mirror is available here:

After you've get your mirror synced, get yourself a Fedora Account, and register yourself with Fedora's MirrorManager. The beauty here is, from the MirrorManager, you can set, for example, any requests for mirrorlist from your organization's public IP, will be replied with the URL to the mirror in your LAN IP. Your users won't know that they are using a LAN mirror! It JustWorks!. This is something APT won't give you :P. You can also set your mirrors to be available to certain range of IP/countries or not.

Tips 9: Detect problems early. Use package-cleanup

Sometimes, you might get your installation interrupted or some crazy happening which your installed package database goes crazy with duplicate packages or broken dependencies. There is one tool which helps a lot in tracing the problem and its called package-cleanup. This tool is provided by the yum-utils package, so to acquire it,

yum install yum-utils

Several common commands I usually use:

package-cleanup --dupes # list out duplicates
package-cleanup --cleandupes # clean up duplicates
package-cleanup --problems # list out packages with broken dependencies

More options? .. invoke the --help parameter

Tips 10: Download packages for usage later, together with dependencies

Sometime, you might want to download packages with its dependencies but without installing it and you want to have it easily copyable to another computer with exactly the same installed package list with your computer. yumdownloader (provided by yum-utils package) tool is great for this. You can use it to, for example, build reusable packs for a bunch of identical computers, and distribute them. You can also use it for grabbing the source rpm of a package, just in case you want to hack some stuff from the package.

My usual use of yumdownloader:

# download source package
yumdownloader --source packagename

# download a package, together with
# dependencies needed on my computer
yumdownloader --resolve packagename

# download a package, together with
# dependencies needed on a different
# chroot/mounted Fedora install
yumdownloader --resolve packagename --root /path/to/chroot

Theres another trick of using the yumdownloader with chroot, by copying /var/lib/rpm folder, you can make use of the rpm profile to download packages for a friend's computer and pass it in a CD. This concept is what being used in opyum (a similar tool like APTonCD) to build what debarashi call as YumPacks. Opyum is cool, but somehow I feel creating the set manually is more comfortable for me. Telling a user to pass me the /var/lib/rpm folder is much easier and quicker rather than telling them to install opyum and guide them through how to create a profile. Though, that is my personal preference, opyum is still a great tool to use for "users" who don't know how to mess with the CLI tricks.

Tips 11: Clean caches first if somehow yum behave weirdly

Sometimes the files cached in your computer might be broken because of some reason or another (I usually getting this problem in my university, with my hackish Fedora repository mirror - so, the metadata tend to be a crazy broken metadata once in a while). Try cleaning the cache first and retry. Chances are the problem is from there. To clean whatever cached files in your yum cache, use:

yum clean all

Tips 12: When yum fails miserably for everything, fear not, APT and Smart are there to save the day

Fedora have APT too!!!. Those from debian roots who can't seem to get away from APT, just install apt-rpm. You'll get your familiar package manager again~ :D. Another available package manager for Fedora is smart.

One beauty about apt-rpm and smart on Fedora, they all uses the generic repository metadata similar to yum. That means, all yum repositories will work with apt-rpm and smart effortlessly!. Nice eh?. hehe


Thats all the tips that I can recall during the writing of this post. I might have other tricks behind my head somewhere, but could not recall it at this moment. The only next time I might remember it is when I faced a problem which made me recalled it.

Enjoy with yum. Its a fun, yummy package manager once you get the hang of it. A final tips, not useful for "users", but useful for python hackers, Yum plugins are easy to write, and it can make use any python libraries. If you need a particular special-case feature for your own use, you can get more information how to write your own custom plugin here: I myself wrote one hackish plugin for people in my university to get to my repository. My university network layout and restrictions sucks bigtime, so, I had to write something to automatically create a tunnel to my repository and let users yum through the tunnel - seamlessly. The users doesn't even need to learn how to tunnel, it JustWorks.

Have Fun~ :D
Locations of visitors to this page