Archive for the ·


· Category...

Fedora 20 released

Comments Off

Fedora 20 was released a few days ago. J.A. Watson at ZDNet has a brief overview of the different desktops available, and concludes that for the most they run just fine on any hardware, including “sub-notebooks”. Furthermore, even though the “spin” of each desktop have specialised in their own applications, there are always plenty more to chose from in the main Fedora repositories.

The Anaconda installer was written back in release 18, and FedUp (FEDora UPgrader) is now the main system upgrade tool. It is not quite clear whether it is preferred to perform that on a running system though, as opposed to booting from an installer image.

Thus, the following links still apply, even for existing installations:

Comments Off

Fonts for Gnuplot

Comments Off

After struggling with fonts in Gnuplot 4.6 (on Fedora 17) (getting the not so useful error “gdImageStringFT: Could not find/open font while printing string”), I found tonicas post on debugging the issue. Although helpful, it did not give the full solution to my problem. It turns out, many of the old fonts are not available in Fedora 17 at all.

I wanted a sans-serif font, and in the end I went for the DejaVuSans. After installing the font packages, I specifically exported that path for use with Gnuplot:

sudo yum install dejavu-sans-fonts dejavu-fonts-common
export GDFONTPATH=/usr/share/fonts/dejavu

Then I can use that font in Gnuplot by addressing it specifically:

set title 'Test' font 'DejaVuSans,21'

Comments Off

Fedora 17 Released

Comments Off

Fedora 17 has been released, and H-Online has a good overview of the changes and new features. Of personal interest I’d highlight these changes:

  • The consolidation of the /lib/, /lib64/, /bin/ and /sbin/ directories.
  • Removable media now mounted at /run/media/$USER.
  • Drop of support for Radeon 2000, 3000 and 4000 series graphics cards in the proprietary AMD driver (only the open source driver will support these cards; but performance is not optimal).
  • And finally, OpenJDK7 will be the main Java version.

Download your copy now, a special “spin“, or share over Bittorrent.

Comments Off

Fedora 17 Features

Comments Off

Fedora 17 is slated for release in a few months, and there are some interesting features to watch:

  • Typing booster (which I thought would be launched for English a year ago) will now be available.
  • Proving that Fedora is cutting edge, they’re ripping out the iptables, and putting in firewalld instead.
  • GIMP 2.8 will be included, and, wait for it, it will include Single-Window Mode! To many, this was the last excuse not to use GIMP. It’s still cumbersome to draw line and boxes, but well, one thing at a time.
  • Finally, Java 7 will now become the default installation, almost a year after its release.
Comments Off

Git server on Fedora

Comments Off

This covers setting up a SSH access controlled Git server from scratch. It’s assuming there is no other repository to import from. It is loosely based on the instructions from Chapter 4 of the Pro Git book.

Installing Git is simple. You might also want to grab gitk for visualizing your commits and branches, and kdiff3 for merging changes.

yum install git gitk kdiff3

Initial setup might include configuring your name, and editor. “—-global” means that the configuration will be stored under ~/.gitconfig.

git config --global "John Doe"
git config --global

git config --global core.editor emacs

git config --global merge.tool kdiff3

Create an empty repository, and clone it into a “bare” repository. Actually, I’m not sure if the first step is strictly necessary, since the “clone” is “init” + “fetch”.

You might also want to create a root level directory, or alternatively a symbolic link from root, e.g. /git. This will make it easy to reference when cloning and working from remote computers.

mkdir /tmp/git_empty
git init /tmp/git_empty

mkdir /git
cd /git
git clone --bare /tmp/git_empty test.git

Now you can clone (the still empty) repository by the following. Notice the optional port number, if you have SSH running on a different port than the default 22. Notice also, since the port argument is specified, ssh protocol has to be prefixed explicitly.

git clone ssh://

Finally, after adding, changing and committing to the new local clone, these changes can be “pushed” back to the server. Conversely, the updates on the server can be “pulled”.

git push origin master

git pull

Comments Off

Building Android on Fedora


Here’s a brief command-by-command guide to building Android 4 (ICS -Ice Cream Sandwich (with extra sugar on top)) from scratch, and deploying the new images on the Samsung Galaxy Nexus, all from Fedora 16. This is heavily based on the Free your Android article, and of course the instructions at

First, install the supporting packages. (Instead of the OpenJDK version, you might have to download the Oracle one, if you get version conflict errors at the make step below.)

yum groupinstall "Development Tools"
yum install java-1.6.0-openjdk kernel-devel git gnupg flex bison gperf zip curl zlib-devel glibc-devel glibc-devel.i686 ncurses-devel.i686 glib-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel.i686 libX11-devel.i686 libXrender.i686 libXrandr.i686 mesa-libGL-devel.i686 readline-devel.i686 arm-gp2x-linux-gcc-c++ python-markdown xmlto libxslt

Download the source. The final sync command will take about an hour.

curl > ~/bin/repo
chmod a+x ~/bin/repo

mkdir android
cd android

repo init -u
repo sync

Download proprietary binaries and drivers. They are available here:

Assuming the Galaxy Nexus – GSM/HSPA+ (“maguro”), there’s two drivers. (Please check the link above for new versions).

tar zvxf imgtec-maguro-iml74k-a796ffae.tgz
tar zvxf samsung-maguro-iml74k-de1cc439.tgz

Build, still assuming the same phone as above. On my somewhat dated dual core 2.6 GHz CPU, it took almost four hours to compile.

source build/
lunch full_maguro-eng
make -j4

Then, transfer the image files to the phone. Make sure the phone is connected over USB, is unlocked, and has USB debugging enabled. After the images are transferred, and the userdata and cache partitions are erased, the phone will reboot. It will show the Android logo, reboot one ore two times more, and then wait maybe a minute or two before the UI is available. And there it is, your home-built Android OS.

out/host/linux-x86/bin/adb reboot bootloader
sudo out/host/linux-x86/bin/fastboot -w -p maguro flashall

If something, or everything, failed and you are left with a useless phone, here are the factory images from Google. Download and unpack the archive corresponding to your phone, and run the script

For more details on “unbricking” your phone, see Derek Ross’ comment.

Skype on Fedora 16, 64 bits


Skype on Linux was always a bit of a drag to install, and for some reason a 64 bits version is not available for Fedora. It is unlikely to change now that Microsoft bought the whole shop. Luckily, the old 32 bits version still works, with a few tricks.

After downloading the RPM, install with

yum install skype-

Get the 32 bits versions of these libraries:

yum install libv4l.i686 pulseaudio-libs.i686 alsa-plugins-pulseaudio.i686

And finally, make sure you have these binaries:

yum install

Thanks to drjolo and tuxor for these fixes.

Cool Linux games on Fedora

1 comment

Linux might not be famous for its games, however there are still plenty around. You will not find the latest Call of Duty, though. Rather, there is a long list of classics and small and fun games. From the Scumm based offerings from Revolution, to remakes of classics like Freeciv, LinCity, and Ultimates Stunts.

Fedora offers a dedicated “spin” installation for games, which offers more than hundred small and big games. Below is a random pick of a few favourites, along with their RPM package names.

As far as I understand, many of them are OpenGL based, or require a properly configured graphics card to run.

  • Beneath a Steel Sky – beneath-a-steel-sky-cd
  • Lure of the Temptress – lure
  • Flight of the Amazon Queen – flight-of-the-amazon-queen-cd
  • Freeciv – freeciv
  • Glaxium – glaxium
  • Mania Drive – maniadrive
  • Ultimates Stunts – ultimatestunts
  • Tremulous – tremulous
  • Abuse – abuse
  • LinCity – lincity-ng

And to install them all!

yum install beneath-a-steel-sky-cd lure flight-of-the-amazon-queen-cd freeciv glaxium maniadrive ultimatestunts tremulous abuse lincity-ng

Fedora 16 Released

Comments Off

Fedora 16 was released today. There are a number of changes, including “GRUB 2 replaces legacy GRUB, HAL is gone and replaced by udisks, upower, and libudev, migration from SysV init to native Systemd continues”. Furthermore, Java 7 is finally being previewed, while Java 6 is still the default.

Download your copy now, a special “spin“, or share over Bittorrent.

Comments Off

Arduino, Fedora 15, and the gpsd incompatibility

1 comment

Even though the Arduino is very popular amongst makers and other electronics hobbyist, it is still a fringe platform in most settings. And even though the arduino package is available through many repositories, more testing would be welcome.

In the latest packages in Fedora 15, things have broken down in several ways. Tom Trebisky does a good job of guiding you through the pitfalls here. He has further useful notes on Arduino here.

What had me going mad was this message: “avrdude: stk500_recv(): programmer is not responding”. Everything seemed to be fine, the lights were blinking when connecting, the logs looked normal, and what’s more, all my boards worked when programmed on another system, but not on my Fedora 15 at home! Furthermore, the error seemed to be half sporadic. Sometimes it would fail at once, while other times it got a bit further before it stopped.

Tom writes: “On a hunch (having watched the messages via dmesg when I plug in my arduino) I get rid of gpsd“. And that was my problem as well. The gpsd daemon was some how conflicting with the ttyUSB device. One option to remove it would be

service gpsd stop
killall gpsd
yum erase gpsd

However, in my case I could not remove the gpsd package because it was a dependency of another application I wanted. In the end, I simply renamed the binary (/usr/sbin/gpsd), so it would not be automatically activated when I plug in the Arduino. Maybe not so elegant, but I could finally get to work with more fun stuff.

Fedora on Raspberry Pi

Comments Off

Chris Tyler has published a video demonstrating Fedora running on the ARM based Raspberry Pi. This looks very promising, and the Fedora project is working actively to support several ARM based systems.

Here’s general instructions on how to install Fedora from a USB stick, and here’s minimal Xfce based spins. (I am not sure if these instructions apply to Raspberry Pi).

Comments Off

Personal Fedora 15 Installation Guide


Here my notes for my Fedora 15 install, again based on Mauriat Miranda’s guide. After you’ve gotten the DVD, this assumes you’re installing on a new 64 bits system, rather than upgrading.

A pleasant addition to the installation process is the ability to add the standard repositories (and any other repositories if you like). This means after a finished install, all basic packages will be up to date.

Third Party Repositories
You’ll need them for various patent encumbered libraries and apps, for playing MP3, DVD, etc.

sudo rpm -ivh
sudo rpm -ivh

Main Packages
For normal use

yum -y install audacity autossh digikam feh geeqie gimp gnupg gnucash gthumb gtkpod htop hugin ImageMagick k3b-extras-freeworld kdebase kdegraphics kino ktorrent lame-mp3x libcddb liberation-fonts-common liberation-mono-fonts liberation-narrow-fonts liberation-sans-fonts liberation-serif-fonts mplayer mencoder mjpegtools mozplugger mp3gain obexfs libreoffice-calc libreoffice-writer parcellite pidgin-otr thunderbird ufraw ufraw-gimp xine xine-lib-extras xine-lib-extras-freeworld xmms xmms-faad2 xmms-mp3 xmms-pulse

For development

yum -y install ant arj bash-completion dosbox dvdauthor dvgrab easymock easytag emacs enblend git gitk gnome-terminal gnome-system-monitor gnuplot htop iftop java-1.6.0-openjdk java-1.6.0-openjdk-javadoc java-1.6.0-openjdk-plugin java-1.6.0-openjdk-src joda-time joda-time-javadoc kdiff3 kover ncftp OpenEXR OpenEXR_Viewers python-dateutil python-mox qemu-launcher qtpfsgui quicksynergy rdesktop rssh subversion transcode unrar vcdimager vdr-mp3 vlc w3m wine wireshark-gnome

MPlayer Codecs

wget -O /tmp/all-20110131.tar.bz2
mkdir -p /usr/lib/codecs
tar -jxvf /tmp/all-20110131.tar.bz2 --strip-components 1 -C /usr/lib/codecs/

DVD Playback

wget -O /tmp/libdvdcss-1.2.10-5.fc15.x86_64.rpm
wget -O /tmp/libdvdcss2-1.2.10-5.fc15.x86_64.rpm
yum --nogpgcheck localinstall /tmp/libdvdcss2-1.2.10-5.fc15.x86_64.rpm /tmp/libdvdcss-1.2.10-5.fc15.x86_64.rpm

Change the SSHD port

You might want to run SSHD on a different port than 22 to avoid the worst influx of random attacks. For this example, let’s go for port 222.

In /etc/ssh/sshd_config, uncomment the Port setting, and change the number to 222.

Port 222

In /etc/sysconfig/iptables, add a line to accept incoming connections on this port. If you like, you can always keep the old as well.

-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 222 -j ACCEPT

Then, tell SELinux to accept this port by executing as root

semanage port -m -t ssh_port_t -p tcp 222
semanage port -l | grep ssh

Finally, restart the SSHD and iptables daemons. You can now test the new port by logging in locally:
/etc/init.d/sshd restart
/etc/init.d/iptables restart

ssh -p 222 localhost

Adding users

In the last versions of Fedora, the default user and group IDs moved from starting at 500 to start at 1000. However, you might want to keep the old IDs for compatibility with old external drives, NFS mounts, etc. You can and new users with custom user/group IDs simply by

adduser -u 500 myuser

Transferring from an old system

Finally, if you have and old system you need to transfer stuff from, you might want to remember:

  • Crontabs: /var/spool/cron
  • SSH keys: /home/*/.ssh

You might also want to reinstall or retune a few other settings:

Backup over ssh/rsync with rssh restricted user

1 comment

For a backup system to work and be of value when something goes wrong, it needs to have these properties:

  • Fully automated: If you have to think about, you will forget or skip it.
  • Off site storage: RAID will not prevent fire or theft; nor accidentally deleting the wrong file.
  • Secured transfer and access: The backup drive can also be stolen or corrupt.

For the transfer, this already restricts the number of tools to pick from: scp, sftp, rsync. And assuming the files to transfer are large, while bandwidth is limited and/or uptime of source/destination systems are limited is only one left: rsync. It is the only tool which is able to resume a previous transfer.

Rsync can use the ssh protocol to transfer files, thus securing the connection. Furthermore, it can utilize the automated authentication through public key. It does require an ssh server on either source or destination though, which will have to be available on the Internet. Thus it’s necessary to take a few security precautions. Not running sshd on the standard port 22 will already filter out a lot of attacks, so let’s pick another port, e.g. 222.

** First try

For this example, let’s assume a pull-backup, that is the destination machine requests files from the source (user foo at where the original backup file is located. Typically, this will happen on a regular interval, through a cron job. For example, we could imagine running this command every hour (assuming some lock file so we don’t disturb an ongoing sync):

rsync --bwlimit=25 --checksum --partial -e "ssh -p 222" -r /backup

  • bwlimit will limit the transfer to 25 kilo bytes / second, to avoid saturating the line.
  • checksum verifies the file checksum, rather than assuming they are the same only based on size and date.
  • partial enables resuming the download.
  • -e “ssh -p 222″ sets the SSH port used by the source.
  • -r syncs recursivly into directories.

The problem with the last option, though, is that it will overwrite existing files on the destination. Imagine a backup file getting corrupt on the source; it will now propagate the same error to the destination and render both files useless. Thus, instead of syncing a whole directory, we’ll have to find a way to select files to transfer. I wont go into that here, so maybe it will be a later post.

** Automated login

For the above line to work as part of a cron job, the destination has to be automatically authenticated. Public key authentication with SSH is fairly simple to set up. On the destination machine (which is the client in the ssh connection), run this command to generate a key. Do not set a password. Then copy the key over to the source machine (still assuming it runs SSH on port 222).

ssh-keygen -t dsa

scp -P 222 ~/.ssh/

On the source machine, copy the keyfile to its correct location. Assuming .ssh and authorized_keys do not already exist.

mkdir ~/.ssh
chmod 700 ~/.ssh
cp /tmp/ ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

You should now be able to log in from destination to source without having to enter a password:

ssh -p 222

** Restricted shell

The basic feature of ssh is to give you a shell on the remote host. However, in our situation, we’ve just granted the destination machine, and anybody there full access to our machine. We might want to restrict this a bit; only allowing the rsync command to run, without other access. rssh handles this. On the source machine, install rssh, and make sure whatever user is using this shell is in the rsshusers group.

yum install rssh

usermod -a -G rsshusers -s /usr/bin/rssh foo

Modify /etc/rssh.conf and enable rsync access by uncommenting allowrsync.

** Ready to backup

Now everything should be ready to run. I’ll still skip some of the details of the backup script, but assume there is a file on the source machine which lists which file to copy. (Alternatively, lists all file so we can compare what we have and don’t have on the destination). Furthermore, it is assumed that each backup file comes with a corresponding checksum file, e.g. .MD5. The beginning of a script might look like this:

alias backup="rsync --bwlimit=25 --checksum --partial -e 'ssh -p 222' --protocol=29"

backup /tmp
[Determine which file to transfer next, e.g. filename.tar.gz]

backup /backup
backup /backup

There’s a few things to note here:

  • An alias, backup, is used to avoid repeating all the options every time.
  • Since we run sshd on port 222, we have to use the -e option. However rssh will not accept this. The option –protocol 29 is used to work around this incomparability in rsync / rssh. (Unfortunately, it seems rssh is not maintained any more).
  • The list file is assumed to contain the list of available backup files, so we can compare to the files already on the destination machine.
  • The main file and its .md5 file is transferred separately, with the .md5 last. This is so we can use that as a flag to mark a finished transfer. If the transfer of the main file is interrupted, we can resume it when the .md5 is not yet there.

Fedora 15: Upgrade

Comments Off

The latest upgrade of Fedora, to version 15, was anything but smooth this time. The release included so many radical changes, so I’m guessing the focus has been to get the basics working, while skipping corners on minor issues. Apart from the switch to Xfce, and some smaller adjustments to Firefox, here’s the problems I ran into, and some workarounds:

  • I had several packages stuck from older version, some from F12. The CD upgrade did not stall on this, but subsequent yum upgrade did. Removing the packages resolve the issue:yum remove openbios-common joda-time-javadoc flash-plugin
  • gThumb had one of its dependencies broken due to a name change, removing and reinstalling fix that.
    yum remove gthumb libclutter-gtk
    yum install gthumb
  • xine-lib needed manual updating, for some reason
    yum update xine-lib

Finally, there were some hiccups with the video driver and Xinerama in Xfce. The problem was that the ATI Catalyst settings tool kept mis-configuring the xorg.conf file. It was juggling three screens and two video card sections, while I only have two screens attached to the same card. In the end, I had to manually edit the file.

While resolving that, I also bumped into the change to systemd. It no longer reads /etc/inittab, but instead has its configuration under /etc/systemd/system. The concept of runlevels is still transferable, though. And to set another runlevel by default, link in the corresponding target file:
ln -sf /lib/systemd/system/ /etc/systemd/system/
ln -sf /lib/systemd/system/ /etc/systemd/system/

For more on systemd, see the FAQ.

Comments Off

Switching from Gnome to Xfce

1 comment

I’m not the only one stalling on the new Gnome 3 / Shell UI, and looking for alternatives. Also, it seems I’m not the only one settling on Xfce as a replacement for Gnome 2. It’s a lightweight desktop, and strikingly similar to that of old Gnome and KDE. Basic panels, work spaces, window handling and customization is all in place.

To install after a plain Fedora install:

yum groupinstall XFCE

In Fedora 14, version 4.4 was available, while Fedora 15 includes the significant upgrade to Xfce 4.8. This caused a few problems, since I had already started switching in F14, and after upgrading, all my panels and launchers failed.

It was not to hard to transfer from the old Gnome 2 panels, though. Basic plug-in in the notification area was actually brought along fine, including parcellite, networking, and even Dropbox. For the “drawers” in Gnome, Xfce uses “launchers”. It’s the same idea. And what’s more, the 4.8 version also uses the .desktop short-cut files. To copy from a Gnome 2 “panel / drawer” to a Xfce launcher, provided one already exists (It might not work 100%, but you get the idea):

grep -r -l panel_3 $HOME/.gconf/apps/panel | xargs grep stringvalue | grep desktop | tr '<' '>' | cut -f 3 -d '>' | while read f; do d=`locate -n 1 $f`; cp $d $HOME/.config/xfce4/panel/launcher-11.; done

You might also want to style and theme the look a bit, including the buttons on the windows. I set the Window Manager Theme to “Stoneage”, and increased the title font to 11. Under Settings -> Appearance, I’ve gone for “ClearlooksClassic”, “Fedora” icons, and 14 as default font (since I sit far away from the screen).

Under Window Manager Tweaks I was first confused by the “wrap workspaces” options. However, they seem to have been cancelled out by Xinerama or something else.

The default taskbar clock does not have a calendar, so go for the “Orange Clock” instead. I replaced the visible line with “%H:%M”, and the tooltip with “%a %d %b %Y/%V”.

And that’s all there is to it, really. Xfce does not have many “native” application, but all GTK+ based ones run fine, include what I’ve tried from Gnome and KDE: gThumb, K3b, and Gnome Terminal.