Archive for the ‘Fedora’ Category

Create a PPTP VPN connection on Fedora 9

Wednesday, June 25th, 2008

In many companies, they use Windows PPTP VPN servers because they are easy to set up. However, there isn’t a native support for this protocol in NetworkManager. Ever wondered how to create a PPTP VPN with Fedora 9? It’s actually not that complicate once you know how to do it.

First of all, switch to user root and install the pptp package, which provides all the tools needed to create a PPTP VPN connection:

su -
yum install pptp

(more…)

Fedora stickers

Monday, May 19th, 2008

Today, I printed some Fedora stickers using Nicu’s sticker kit. It wasn’t that expensive to get good quality prints, around 1€ per A4 page. The Fedora Art team really does a great job :)

Cache problems with Evolution and POP accounts

Saturday, May 17th, 2008

When I migrated from Fedora 8 to Fedora 9, I used the backup function in Evolution. Before backing up my mail accounts (POP3), I deleted all the sent mails and emptied the trash because it was the perfect moment to do so and it would make the backup file a lot smaller. With 5 mails left in Evolution, the backup file was still around 170MB compressed, strange heh?

I had a closer look at my .evolution folder and figured out that there was a huge “cache” directory for each mail account. This folder seems to contain ALL the messages I ever sent/received since the account’s creation.

I can’t see why there should be any cache for POP accounts (seems to be an IMAP feature), and why that cache is still there after emptying the trash…a Google search later, this seems to be a known bug.

I manually deleted the content of the cache folders and everything seems to work fine, no consequence on my inbox content.

So, if you are using Evolution with a POP account and you wonder where your disk space has gone, have a look at this…

NetBeans 6.1 on Fedora 9

Thursday, May 15th, 2008

With the introduction of OpenJDK in Fedora 9 (one of the best thing that could happen to Fedora if you ask me), you now have an easy access to the infinite power of a great IDE: NetBeans. Until now, I still used Windows a lot because of specific software like Enterprise Architect, Office 2007 (colleagues who don’t want to switch to OOo) or NetBeans; now that the latter works almost out of the box with Fedora 9, I can reduce my Windows usage by 1/3 :)

To install NetBeans, you need to install the openjdk-devel package first; yum install java-1.6.0-openjdk-devel should resolve your problems. Then simply head to http://www.netbeans.org and grab the edition you need…done.

Note that since version 6.1, you can’t simply install the PHP plugin on other editions than “NetBeans IDE Early Access for PHP” to highlight your PHP code. If you wonder, all editions can be installed in parallel and will register correctly in the Gnome Applications/Programming menu. Fedora 9 is definitively a huge step forward.

Fedora 9 day 0

Tuesday, May 13th, 2008

As everyone probably knows, Fedora 9 was released earlyer today, you can grab a copy on http://fedoraproject.org/en/get-fedora

I installed it and overall it’s a much better experience than Fedora 8! All control keys on my laptop work :)

As for now, I only encountered a very serious bug: I have a swiss-french (fr_CH-latin1) keyboard, and that’s what I chose during the installation process. Later during the install, you have to create an user and enter a password, that’s what I did, and…I couldn’t login to Gnome with that password! I had to Alt-F2, login as root and manually change the password for my user with “passwd”. This is a bug that will affect absolutely all swiss-french users at least…

That’s it for now. Ah, I updated my “software to install” page to get Fedora 9 with mp3/wmv/divx support…

SSH authentication with your public key

Saturday, May 3rd, 2008

I can see that you are lazy, and I know how hard it is to type an user name and password each time you want to login via SSH on a server.

Today, we are going to learn how to configure your computer and a server to allow automatic SSH authentications using your public RSA key. Less work = More fun!

Configuration on your computer:

As your normal user, open a terminal and type ssh-keygen

It will ask you some questions, you can simply press enter to acknowledge the default choices. You don’t need to enter a password here if you don’t want to be asked for it at each login on the server, it’s not a security flaw. The output should be something like that:

[Steven@HP6710 ~]$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/Steven/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/Steven/.ssh/id_rsa.
Your public key has been saved in /home/Steven/.ssh/id_rsa.pub.

The important thing is that you have 2 new files in your user/.ssh directory.

  • id_rsa is your private key, you should NEVER give it away.
  • id_rsa.pub on the other side is your public key, the one that you can give away.

Configuration on the server:

As the user you wish to be logged in (let’s say root), also run the ssh-keygen command to create the /root/.ssh directory. Now go to your /root/.ssh directory and create a text file named authorized_keys2. Copy the content of your computer’s public key file (id_rsa.pub on HP6710) to this file and save it.

Job done, now you can run ssh root@server from your computer and it will log you in automagically :)

My first RPM

Tuesday, April 29th, 2008

As I said last week, I packaged the PHP MDB2 driver for PostgreSQL as an RPM for Fedora 8 and 9. Actually, this is my first self-made RPM ever and I’m quite happy with it.

I learned my way trough SPEC files and rpmbuild thanks to this excellent documentation on the wiki and of course by looking at other SPEC files…I love Open Source for that!

If I don’t detect any bugs, I’ll try to push this package in Fedora and become an active contributor :)

Ah, my homemade Hackergotchi was also accepted. I now have a face on the Planet. Yes, it’s scary.

Edit: someone already had the same idea :)

Updated kernel for the Fedora 8 Alpha port

Friday, April 25th, 2008

As announced by Jay Estabrook on the axp-list, there is a 2.6.24 kernel available for the Fedora 8 Alpha port (along with some other updates). You may not see these new files if you run a yum update because of yum’s cache, the directory structure on the update server has apparently been changed as far as I can tell. So simply run a yum clean all and voilà, you can install the new kernel.

Once it is installed, you need to tell aboot (the secondary boot loader for Linux/Alpha, we don’t have Grub) how to boot on the new kernel, edit you /etc/aboot.conf file and add a new configuration:

0:1/vmlinuz-2.6.24.4-64.2axp.fc8 initrd=/initrd-2.6.24.4-64.2axp.fc8.img
root=/dev/VolGroup00/LogVol00 selinux=off rhgb quiet
1:1/vmlinuz-2.6.23.10-97.fc8.1axp initrd=/initrd-2.6.23.10-97.fc8.1axp.img
root=/dev/VolGroup00/LogVol00 selinux=off rhgb quiet

The first number is an unique identifier used by the SRM. For example, you can boot on the 2.6.23 kernel with boot dka0 -fl “1″ and on the 2.6.24 kernel with boot dka0 -fl “0″ (if your disk is recognized as DKA0 by the SRM). The second number represents the partition the kernel resides on, BSD-style. man aboot.conf is your friend if you are lost!

PHP, Pear MDB2 and PostgreSQL

Wednesday, April 23rd, 2008

Did you ever wonder how to write portable PHP code that works on MySQL, PostgreSQL, Oracle, MSSQL or SQLite? Then what you need is the Pear MDB2 package. It’s an abstraction layer between your PHP code and the database. It’s really not hard to learn and use! Of course, you have to use “standard” SQL queries that are common to all databases in your PHP code :)

In Fedora 8/9, you can install the MDB2 package with yum install php-pear-MDB2. This is the base package, now you need to install a driver for your database. To access MySQL it’s yum install php-pear-Driver-mysqli.

Note that on the screenshot above (PackageKit in F9), there are only 2 MySQL drivers available as RPM’s in Fedora. This little choice defeats the purpose of the abstraction layer, so I’m probably going to create driver packages for the other databases (or at least PostgreSQL) next week and try to push them into Fedora.

Writing from the Alpha running Fedora 8

Saturday, April 19th, 2008

The screenshot says it all: the Fedora 8 port to the Alpha architecture works fine :) My old EV56 533MHz is happier than ever! The distribution was installed in 32 minutes, and around 50 updates were available via yum directly after the install. All my hardware works, you can see it on my smolt profile.

Alphas ROCK!