Archive for the ‘Fedora Tips & Tricks’ Category

Eclipse problems on Fedora 22

Update: Since Eclipse Mars update in Fedora 22, and with latest updates installed, the memory/CPU usage problem is fixed. Also, the problem with mylyn icons is fixed. While there are still some rendering bugs, along with some bad colors here and there; the GTK3 version is now usable for me. 🙂

Since upgrade to Fedora 22, I had several problems with Eclipse. The most annoying one, in my pretty old laptop, was nearly locking up the system after using it for awhile as reported here. I found that my 4GB RAM is almost full and kswapd is taking almost 100% CPU.

First, I suspected that it is a kernel bug since kswapd was using 100% CPU. And, it seems that it really is, but it is an old kernel problem happens when the available RAM is low. Therefore, it should not be the main reason of my problems.

Investigating more, I found the the amount of ‘shared’ memory in ‘free -m’ output keeps increasing when I use Eclipse until I’m forced to close Eclipse due to lock up. Then it is returned back to normal. I guess this is a graphics driver bug, as the Eclipse memory usage reported by ‘top’ is not changed much since its start. (and the kernel out of memory messages always happen in the driver code).

Anyway, besides, Eclipse was very ‘heavy’ on my laptop: it constantly used very high CPU usage even if I just scrolled the editor window. It was also very slow (with lag). Also Eclipse uses a new coloring for various part of the UI in F22, which are sometimes very annoying (e.g. unreadable text, unnoticeable selected region, etc). I was forced to change some colors to have a usable editor.

I was living by all these problems until yesterday, in which I found that mylyn task list is also buggy. It didn’t show unread/new issue marks beside issue icons, so I was missing new/updated issues assigned to me. I was seriously considering switching back to Fedora 21, when I suddenly found out that Eclipse is using GTK3 backend in Fedora 22 and I should be able to make it use GTK2 instead.

The first way to do this I found in Internet was setting SWT_GTK3 environment variable to 0. But it didn’t work in Fedora 22. It turns out that Eclipse has a command line argument for it, which is used by Fedora (in /etc/eclipse.ini) to force usage of GTK3 backend. So, to run Eclipse with GTK2 backend, you are forced to either modify eclipse.ini, or run eclipse with the following command line option:

eclipse --launcher.GTK_version 2

And yes, finally, it fixed all my problems with Eclipse in Fedora 22!

Parsidora 18

Finally, the fifth version of our Fedora remix, Parsidora 18, is released. Parsidora is our Fedora remix specially targeted for users which don’t have fast and/or cheap internet connections, and for Persian users. It also tries to provide a painless out of the box experience for users.

Parsidora differs with most other Fedora remixes in two points: 1. Its images are big, as we try to use all the space available in a DVD. 2. It is (mainly) provided as installation media, rather than live media.
It is actually what an offline user would/should prefer. Such users usually don’t download Fedora, and try to grab its media physically. Therefore, when more packages are available on media, they will be happier since they don’t need to download them. Even downloading the metadata of Fedora repositories is a pain for some users.

It should not be a live distro, because users rarely need to install all the packages and should be able to install only what they need. And it’ll probably need more space in live form. There is an additional bonus: Parsidora DVDs can be used as add-on repository for existing (and not very uptodate) Fedora installations.

Previously, I wrote about problems building updated Fedora 18 installation disks, like what happened for Fedora 17. Unfortunately, I was unable to work around the problem and Fedora doesn’t care much about building updated installation media after the release. Unlike Parsidora 17, this time we decided to release Parsidora 18, without any updates (except some updates from rpmfusion). It is not what we liked, but it is better than not having any release for a long time. I hope that Fedora 19 updates won’t break installation media creation unlike Fedora 17 & 18.

I’m happy that we have a new release. However, I’m waiting for Fedora 19 release to release Parsidora 19 soon afterwards, specially considering the negative effect of Gnome 3.6 on me :P. 3.8 looks a little better at least.

Have fun!

Grub 2

As I noted in the previous post, Fedora 16 now uses Grub 2 on some architectures. Thanks to this, one of my long standing bug reports against grub2 in Fedora is finally fixed (all it needed was to add os-prober dependency to grub2 which, unfortunately, was unnoticed for a long time). The other bug, which is also very easy to fix, is unfortunately not solved yet… (sorry, but I’m really disappointed to see this bug is still open).
Grub 2 comes with a number of interesting features. One of them is auto-detecting other installed OSes using os-prober (as I have written here, you can do the same for Legacy Grub using my script). This means that now Fedora will detect other installed OSes when installed… well, not completely. Currently, Fedora doesn’t recognize OSes installed on LVM partitions during the installation (apparently because LVM volumes are not active when it is run). Therefore, you should run grub2-mkconfig again after Fedora 16 installation if you have any OSes installed on LVM partitions. Also, there is another problem with os-prober itself: it doesn’t recognize OSes installed on MD RAID partitions. The bug, with the possible fix, is reported upstream and I hope to see it fixed soon too.

Unfortunately, Grub 2 in Fedora doesn’t come with any artwork. You’ll see an ugly black and white grub menu (I never liked the look of Grub2 in Ubuntu and I hoped that it won’t happen in Fedora too). Hopefully, it’ll be fixed soon; but for the time being you can do it yourself. With the pointers given here (Hey! Ask Fedora is also officially launched!), I came up with the following:
First, you should create a font file for Grub 2 using any TTF fonts. I did the following:

grub2-mkfont --output=/boot/grub2/unicode.pf2 \

Then, you need appropriate settings in /etc/default/grub:



Yes, it sets the default Fedora 16 background for Grub and it automatically scales the image to the Grub’s resolution! Finally, don’t forget to regenerate your grub’s config file (remember that the following command completely overwrites the existing config. Therefore, if you have manually edited /boot/grub2/grub.cfg all of your changes will be overwritten by it):

grub2-mkconfig -o /boot/grub2/grub.cfg


A part of the result is given below (for whatever reason (see Update 2 for the reason and the fix!), grub 2 selects a very high resolution in qemu, so I was forced to crop the image):

A sample image of Grub 2 with Fedora 16 background and BiDi (Persian) Text

Grub 2 with Fedora 16 background and BiDi (Persian) Text

And yes, Grub 2 supports UTF-8 BiDi (right-to-left) text automatically (It’d be great if it was also possible to right align the menu entries, but apparently it is not supported). And notice that you should use qxl or vmware vga driver for qemu if you are using Grub 2’s graphical menu.

This is just the begining, and I’m at the beginning too! Grub 2 supports themes, and I hope to see great themes for Fedora. A Fedora theme for grub 2, along with a new Plymouth theme (which has not been changed for a long time) could be very interesting for Fedora 17…

Update: I forgot to say that since Grub 2 can be installed on an LVM partition, you no longer need to have a separate /boot partition in LVM setups. While anaconda still suggests that, you are not forced to do so.

Update 2: Use lower case ‘x’ in GFXMODE variable. Initially I used upper case X so it was actually ignored!

Fedora 16

Finally, I finished my M.Sc a few days ago and therefore I’m going to be more active after finishing some postponed tasks. But, all that didn’t prevent me from jumping to Fedora 16 early around Beta release and afterwards. And this is my mini-review now:

Fedora Robotics Spin
First of all, we at Fedora Robotics SIG are proud to announce the first official release of Fedora Robotics Spin. This is a LiveDVD spin providing many usable tools, libraries and frameworks usable in robotics such as Eclipse development environment, MRPT libraries, Player/Stage/Gazebo and RoboCup soccer simulator 2D and 3D. Fawkes was supposed to be included too but IIRC it is not included in this version due to some problems. There are still a lot to be done and we will provide more interesting stuff in future.

Gnome 3.2.1
Fedora 16 comes with Gnome 3.2.1. To summarize, it is better than Gnome 3.0 (surprisingly!;)). It felt a bit faster (if I’m not mistaken!), and more polished. It also comes with a number of bug fixes that annoyed me in Fedora 15: the renaming problem in nautilus in non-English locales is solved, and while the problem with tray icons of Java applications is not solved (and it fact it is a bit worse since you cannot get the icon back even by restarting gnome-shell), it doesn’t cause gnome shell to use 100% CPU anymore. So, you still cannot see Java icons but at least it won’t heat up your system. Good news is that a fix for Java is already applied to JDK 8 (thanks to Danesh Dadachanji) and hopefully it will be backported to JDK 6 & 7 soon. Apparently, it fixes another problem too: Java windows will be grouped in Gnome Shell as a single application (currently each window appears as a separate application).

Gnome 3.2.1 comes with some enhancements and new features too: Sushi, a quick previewer for Nautilus. Highlight a file (e.g. image or video) and press Space bar button. You should see a preview of the file.
Another enhancement is in NetworkManager, whch provides a “HotSpot” feature. In Gnome 3.0, there were no straight forward way to do wireless sharing in the new NetworkManager interface and you were forced to create it manually using Netowrk Connections dialog. But in Gnome 3.2 there is a HotSpot button in the Wireless section which creates an ad-hoc wireless connection and shares internet over it easier than ever (just press the button and a few seconds later others can connect you with the provided password). But NetworkManager still lacks some basic functionality, for example while you can enter network proxy information, there is no (clear) way to add authentication information (probably you can add your username and password in the URL box, but it is not a good solution specially as the password is visible to everyone). I hope that NetworkManager can have a kind of “Location” (or Connection) concept which makes it possible to assiosiate some network settings with network Locations (e.g. separate proxy information for different Locations/Connections).

Unfortunately, on my ThinkPad X61 the suspend button (Fn+F4) no longer works. I have not looked into this problem yet. Also, some of the gnome shell extensions in Fedora 16 repository are not compatible with Gnome Shell 3.2.x but they are installable (they should require gnome shell 3.0.x so that you cannot install them in Fedora 16).

Personal File Sharing
In Fedora 15 and 16, you might have noticed that there is no longer any “Personal File Sharing” in Gnome 3. I mostly wanted it to enable receiving files using bluetooth since my mobile didn’t see my laptop to send any files to it. Fortunately, it is not gone forever and you can easily get it back: just install gnome-user-share package and you’ll get it back. 🙂

Gnome Fallback + Compiz Session
And a final note about Gnome in Fedora 15/16: if you would like to use gnome fallback mode rather than Gnome Shell, you can install Compiz 0.9.5 and specially compiz-gnome package. It’ll add a new session (“Classic Gnome with Compiz”) in the login window which you can select to run Gnome Fallback mode with compiz. So, you can select the desired environment in the login window.

Grub 2
Another notable feature of Fedora 16 is replacing lagacy Grub with Grub 2 (not for all architectures currently). But I’ll talk more about it in a separate post since this one is long enough already. 😛
Fedora 16 comes with more interesting features like USB support in KVM. See other features in Fedora 16 feature page.

Parsidora 16

Since Fedora 16 is out, we are going to release our Parsidora 16 soon, specially that it seems that have less problems than Fedora 15. Fedora 16 is better than Fedora 15, so Parsidora 16 will be better too! 😉

Have fun!

AntiAliasing and Java

Whenever I ran a Swing Java application on my Fedora, I really hated its ugly appearance of fonts and I was always wondering why Java doesn’t support font anti aliasing in Linux. But I’ve never searched for it in the web, since I thought that if such support exists, it should be enabled already! Today, I’ve decided to look for it, and I found the answer very quickly!! Java already supports font anti-aliasing in Linux, it is simply disabled by default (at least in OpenJDK, in Fedora!). And the solution is simple, just set the desired option in the _JAVA_OPTIONS environment variable. e.g.:

export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on"

and then run your Java application. The GUI will be much more desirable then! I’d suggest adding this option globally. You can simply put the above line in your ~/.bashrc (if you are using bash!), or put it in a file in the /etc/profile.d/ directory. For example, this is the contents of my /etc/profile.d/

export HISTCONTROL=ignoredups
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on"

(The first option is not related to the current discussion, but I think it is desirable for most users. With this option, bash will merge same sequential history contents into one history item)

I also like to talk about an interesting application but I keep it for a separate post! 😛

Have fun!

Update: I think it is fair to mention the original link which helped me: Java Swing anti-aliasing. Also, fortunately there is already an update for openjdk package in fedora updates-testing repository which has anti-aliasing enabled by default (at least for Swing apps. You might still need to use the above option for Awt applications).

Conexant HSF modem driver on Fedora 12

Previously, I wrote a document on the installation of a full speed driver for Conexant HSF modems on Fedora 11. That guide is valid for Fedora 12 too. However, some people have told me that their Fedora 12 is unable to boot after installing the driver using that guide. I’ve tried it and I successfully installed and used the driver under Fedora 12. However, as I’ve stated in that guide, I used the latest version of the Linuxant driver (which is rather than which was available on that time). As those guys who have booting problems both used version, that might be a problem with that version. So I highly suggest everybody to always use the latest version of Linuxant driver with my script.

Also, I’ve updated my script to detect the version of the Linuxant driver beside it rather than hardcoding the version number in the script, so you don’t need to modify the script to use the latest version. Just download the latest version and put it beside the script, and run the script. For complete instructions, refer to the original guide.

Have fun

Installing Conexant full speed modem driver on Fedora 11 and later

I found that some people have problem installing this driver on Fedora 11 (using available guidelines in Internet for Ubuntu), so I decided to try installing it on my system (which has a Conexant HSF modem chipset). I could install and use the driver successfully, but I think its license doesn’t allow me to distribute the final modified RPM package. So, I decided to create a simple shell script to create the package and put it here. (I wonder if we should put such documents inside Fedora wiki or not. Maybe I should communicate with Fedora Documentation people about it or read about contributing there?! Or maybe it is as easy as creating a new Wiki page there…)

Anyway, These are the steps to build a free full speed Conexant modem driver:

1. Download .tar.gz file of the free full speed driver release by dell from (Download this file for 64 bit Fedora systems(x86_64) and this one for 32 bit(Fedora-i386,i586 or i686) systems)

2. Download the latest modem driver from Linuxant (.tar.gz version). However notice that the following script is written for version, for later versions this script should be modified. So, to use this script without modification, you should download this file for 64bit Fedora and this one for 32 bit ones. Edit: download the latest version from here.

3. Download this script, put it beside those downloaded files and run the script  (If you run it as a regular user – which is recommended – you might need to run rpmdev-setuptree command first).

4. Now, you should be able to find the final RPM in ~/rpmbuild/RPMS/x86_64 (or ~/rpmbuild/RPMS/i586).

5. If you have an HDA modem, you must install Linuxant alsa driver from *Update: If you did not install this package and encountered sound problems after installing the hsf modem driver, you should probably install this package.

6. Now, you can install the generated rpm package. You might need to restart the system before using your modem. You can check your modem by running minicom to see if it can communicate with your modem.

Update: This script works fine on Fedora 11 and later. It has been successfully tested on Fedora 12 and Fedora 13. I’ll try to make sure that it works on future version of Fedora too.

Good luck!