Posts tagged ·



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

Arduino on Fedora 17


Working with the Arduino on a changing Fedora environment is a bit of a challenge. For every release or update, there’s something new and exciting which breaks the Arudino IDE, programmer, or serial connection. Here’s what I’ve collected for Fedora 17 and previous versions.

The basic setup for the programmer is to let the rxtx module have access to the lock file system. This is one way of achieving that: (note the new location of the lock files)
sudo usermod -a -G uucp,dialout,lock $USER
sudo chgrp uucp /run/lock
sudo chmod 775 /run/lock

Next, the gpsd daemon might still be in the way. One or more of the commands below should take care of it:
sudo systemctl stop gpsd
sudo systemctl disable gpsd
sudo killall gpsd
sudo yum erase gpsd

More recently, the ModemManager (for 3G and other modems) might interfere with the serial connection. However, NetworkManager depends on the the former, so it cannot just be removed. The hack below should take care of it though (lest you want to hack around with udev exception rules).
sudo chmod 0000 /usr/sbin/modem-manager
sudo killall modem-manager

Finally, an incompatibility been a system / GCC library and some older versions of the Arduino IDE seems to have been introduced. It manifests itself at compile-time, with the errors “error: expected identifier or ‘(‘ before ‘double’” and “error: expected ‘)’ before ‘>=’ token”. Although most likely just a temporary issue until next upgrade, it can be fixed by commenting out the following line in hardware/arduino/cores/arduino/wiring.h

file: .../hardware/arduino/cores/arduino/wiring.h

// #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))

And that’s it. Now you’re all set to program the Arduino on Fedora 17.

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

UNetbootin – Create bootable Live USB sticks

Comments Off

UNetbootin is one of those small, not well known, yet extremely useful tools which can save you a lot of time. In a few clicks, it let’s you create a boot image from a long list of distros, and format that right out to a USB stick. With many of the distros, you can choose between Live or Net Install images, and from versions a few years back in time. If you’ve already downloaded the ISO image for you distro, that’s OK, but it will even do that job for you if you like.

The list of supported distros is impressive, from the most popular ones, to more obscure (here in random order): Ubuntu, Debian, Linux Mint, openSUSE, Arch Linux, Damn Small Linux, SliTaz, Puppy Linux, gNewSense, FreeBSD, NetBSD, Fedora, PCLinuxOS, Sabayon Linux, Gentoo, MEPIS, Zenwalk, Slax, Dreamlinux, Elive, CentOS, Mandriva, LinuxConsole, Frugalware Linux, xPUD, Foresight Linux, VectorLinux, Slackware, Smart Boot Manager (SBM), xPUD.

To get going in Fedora:

yum install unetbootin syslinux-extlinux

If you don’t run as root, you will be prompted for the root password:


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.