Posts tagged with "fedora"


Changing timezones in CentOS, Fedora, FreeBSD, Yuki

I knew how this worked in FreeBSD, and fortunately it works in the Red Hat world as well. First, make a backup of your existing timezone file, the create a symbolic link to your timezone. I've seen people copying the file instead, but I feel safer linking.

# mv /etc/localtime /etc/localtime.back
# ln -s /usr/share/zoneinfo/Singapore /etc/localtime

I'm tempted to set my timezone to Reykjavík, it's HOT in Sydney today. Nagato Yuki has the right idea. A-heh-hem.

UPDATE: @dai1311 on Twitter says that this also works on Arch Linux. Incidentally, his avatar is of Yuki!


Running XAMPP on Fedora x86_64

XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.

Aaaaaaaah!

The problem

We've all seen that famously misspelled error message when attempting to install XAMPP on our 64 bit desktop Linux machines. I wonder how many people using XAMPP are still on 32 bit? I suppose enough to justify keeping it 32 bit. Speaking of which, this Kingston biscuit is falling to bits. Munch munch.

Here's the install scenario that will result in that error.

# tar xzvf xampp-linux-[version].tar.gz -O /opt
# cd /opt
# ./lampp start

Chemists have solutions

Other guides I've come across ask you to install a slew of things, and changing the launch script. For me on Fedora 17 x86_64, I was able to run it just by installing this:

# yum install glibc.i686

This also pulls in nss-softokn-freebl.i686.

Now you can run XAMPP without modification:

# tar -C /opt
 sudo ./lampp start
XAMPP: SELinux is activated. Making XAMPP fit SELinux...
Starting XAMPP for Linux 1.8.1...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.

CentOS favicons in Nautilus?

Speaking of short blog posts today, setting up a VPS this evening I noticed a CentOS favicon appearing in Nautilus on my local machine. A Fedora tip of the hat to a somewhat related distribution?

I might look into this. Icons are pretty. I like icons. Having them appear to represent an SFTP session is wild!


HandBrakeCLI --start-at and --stop-at in

Icon from the Gnome desktop project

When trying to use HandBrakeCLI to take a clip from movie, I couldn't figure out why it was ignoring the durations in seconds I was defining with --start-at and --stop-at.

Turns out, you need to append the word "duration", "frame" or "pts" before each value. For example, to create a 20 second clip starting at the 1 minute mark:

HandBrakeCLI [...] \
--startAt duration:60 --stop-at duration:20

Amazing what one can learn if one reads the manual page before wasting half an hour figuring out what's going wrong!


Dog ate my homework, crashed my calculator


Point Gnome 3 Contacts to SeaMonkey Address Book

A silly little hack I devised this afternoon if you run Gnome 3 and have the pretty (but unused) Contacts icon in your Applications menu. Open this as root:

/usr/share/applications/mozilla-seamonkey.desktop

And replace this:

Exec=gnome-contacts

With this:

Exec=seamonkey -addressbook

One of these days I'll fulfill my dream of writing an entirely XUL desktop environment. And it'll use the Walnut theme by default. Oh, you'd better believe it.


Preallocating qemu-img images

Icon from the Tango Desktop Project

To drastically improve virtual drive performance of qemu guests, create images with metadata preallocation:

% qemu-img create -f qcow2 -o size=2147483648,preallocate=metadata disk.qcow2

Then if you're on Linux, use fallocate to preallocate space:

% fallocate -l 2147483648 disk.qcow2

Passing this on for what it may be worth, they both saved me a lot of time copying files this morning. :)


Installing @PollyClient on Fedora 16 and 17

While Polly is understandably optimised for Ubuntu, it runs well enough on Fedora to still be my favourite multi-column Twitter client! Here's the quickest way to get it running.

Getting the source

Polly doesn't ship with an RPM, but we can install it ourselves without too much trouble. Head to their Launchpad download site and download the latest source tarball. As of writing, the latest is:

Polly-0.93.4 (pre-alpha 3.4).tar.gz

Dependencies

The tarball's README list dependencies for Ubuntu, but it didn't take long to find their Fedora equivilents.

Ubuntu Fedora
python-gtk2 pygtk2
python-dbus dbus-python
python-xdg pyxdg
python-notify notify-python
python-oauth2 python-oauth2
python-gconf gnome-python2-gconf
python-socksipy python-SocksiPy
python-httplib2 python-httplib2
python-pycurl python-pycurl
python-numpy numpy
python-keyring python-keyring
python-gtkspell gnome-python2-gtkspell

And here they are on a single line to make installing easier. Depending on which spin you're running, you may already have most of these.

# yum install pygtk2 dbus-python pyxdg notify-python python-oauth2 gnome-python2-gconf python-SocksiPy python-httplib2 python-pycurl numpy python-keyring gnome-python2-gtkspell

These also bring in several dependencies, including:

atlas, gnome-python2-extras, gtkspell, libgfortran, python-nose

Installing

Now it's just a matter of extracting the tarball, and running the install script.

% tar xzvf "Polly-0.93.4 (pre-alpha 3.4).tar.gz"
% cd "Polly-0.93.4 (pre-alpha 3.4)"
# ./install

Restarting gconfd-2

If Polly works now, you're done! Add your accounts, and tweet away!

Even with the latest alpha versions, Polly still refuses to load on any of my Fedora machines unless I restart gconfd-2 before I run it the first time. According to the GConf site, the safest way to do this (other than outright killing it) is:

gconftool-2 --shutdown

The friendly Polly developers I've talked to on Twitter expressed surprise that this was still needed. This leads me to believe it's a localised Fedora issue, which means when I research this further I'll be filing a support ticket with them, and not Polly. We'll see.


Make Qt applications match Gnome 3

Qt applications look acceptable in Gnome 3, but with the Qt4 Configure utility you can change the colours and fonts to match their GTK+ brethren!

Installing Qt4 Configure

This is a potential gotcha; depending on your distribution you may have to specify qt4, or not. For example, in Fedora:

# yum install qt-config

And FreeBSD:

# cd /usr/ports/misc/qt4-config
# make install clean

Once you've installed it, a beautifully large Qt4 Configure icon should appear in the "Other" category of your Gnome 3 Shell. Given many of my GTK+ applications still have crappy icons, having the Qt4 Configure app fit in so well was a pleasant surprise!

Colours

The default GTK+ theme for Qt looks passable, but Gnome 3 uses a whiter shade of pale. This is most noticeable between the title and menu bar in Qt applications.

You can correct this by clicking "Button Background" and "Window Background" under "Build Palette", and slotting in the following values:

  • Red: 239
  • Green: 235
  • Blue: 231

To get the right shade of blue for selected menu items, click "Tune Palette..." under "Build Palette", then choose "Highlight" under "Central color roles". Slot in the following values:

  • Red: 74
  • Green: 144
  • Blue: 217

I derived these colours from using the GColor2 utility, so they may be approximations. I can't tell the difference!

Fonts

For better or worse, Gnome 3 uses Cantarell for its default font. To get Qt applications to match, set the font to "Cantarell" on the "Family" dropdown box under the "Fonts" tab.

Update

Curiously, I had to go through this rigmarole on my Fedora 16 x86_64 tower, but on my MacBook Pro running Fedora 16 i686, Qt had the right colours set for Gnome 3 by default.

I've since discovered it has to do with installation order. If you install Qt4 Configure before any Qt applications such as VirtualBox, Amarok or Opera, the Gnome 3 colours will be included by default. Interesting!


Merging KDE icons into the Task Manager

KDE icons merged with the Task Manager widget

I keep discovering new and wonderful things about KDE again since moving back! These tips are probably already well known, but just in case :).

The problem

If you use KDE like me, you probably have a series of launcher icons in your panel for easy access. The problem with this is on lower resolution displays they take up a lot of horizontal space, which reduces the amount of space your Task Manager widget can use to display window titles:

KDE icons merged with the Task Manager widget

The answer

The clever solution is to let the Task Manager widget handle your shortcuts instead.

  1. Remove all your application launcher icons
  2. Launch the application you use frequently
  3. Right click its button in the task bar
  4. Choose the Advanced menu
  5. Click "Show A Launcher For X when It Is Not Running"

Icons will appear to the left of the task bar as before, but when you launch applications, their corresponding launcher disappears. This quickly saves large amounts of precious screen real estate when you have many different windows open.

As Kmahjongg said to me in 2007:

Kmahjongg: You have won!