Leiden University (Dutch) Leiden Observatory Banner

Fedora tips

Useful tips for Fedora and its applications. Most of these tips apply to Fedora in general, but some are specific to the Sterrewacht environment and the software we have installed on our systems.


 

Media players , audio cds and dvds

By default, Fedora installs some media players that can hardly play any media. This is because of software patents and other restrictions which do not apply here. So, we have other media players available and you can select one that works.
Go to the menu "System" - "Preferences" and select "Removable drives and Media" . Under "Multimedia" you can fill in which applications to use for audio cds and video dvds. You may have personal favorites, but a player that works is xine with the options:
Audio cd: xine --auto-scan cd --auto-play
Video dvd: xine --auto-scan dvd --auto-play
Or execute these commands:

         gconftool-2 --set /desktop/gnome/volume_manager/autoplay_cd_command 'xine --auto-play --auto-scan cd'
         gconftool-2 --set /desktop/gnome/volume_manager/autoplay_dvd_command 'xine --auto-play --auto-scan dvd'
    

To select which player to use to play media files from disk, right-click on the file in the nautilus file manager and select "properties". if your preferred application is already listed, select it to make it the default for this type of file. if not, click on "Add" to get a list of all applications that are registered with the filemanager, and you can even provide a custom commandline for a non-registered application there.


 

Keyboard settings

Keyboard settings come in a couple of categories. The "System" - "Preferences" menu has two items: "Keyboard" and "Keyboard shortcuts" and the submenu "Accessibility" has another set of keyboard options.

Keyboard properties (gnome-keyboard-properties) offers to select the keyboard layout (normally US English).
Under "Layout options" one can set a lot of useful things:

  • Adding the Euro sign: select on which key you want the € as a 3rd character. Most keyboards show it on the "5". You will also need to select a third level chooser, see below.
  • Third level chooser: here you can change the meaning of one of the Ctrl, Alt, menu or windows-keys to become the chooser for a third symbol on a key (e.g. the euro sign, if set up as described here).
    Note: Right-Alt doesn't always seem to work; on some keyboards both Alt-keys generate the same keycode.

Keyboard shortcuts () is the place to tell the system what to do if special function keys are pressed, e.g. the multimedia keys present on many keyboards.


 

Dropbox

Dropbox is a nice tool to synchronize some documents between computers. It is available on our desktops, but take care of a couple of things:

  • Dropbox offers 2GB storage. But synchronization implies, that a local copy is made. Default location is in your home directory, but you don't have 2GB there. So make sure you move your Dropbox folder to another location, preferably on the local disk of your desktop. (Dropbox preferences - Advanced tab)
  • Disable LAN sync (Dropbox preferences - general tab). It would only be useful to synchronize between computers in the local network, but the computers in our network can share disks through automount, so there just is no point to have Dropbox generate a lot of network traffic to duplicate a feature we already offer (with much greater flexibility, and not limited to a single directory of 2 GB).
  • Do not run Dropbox on multiple strw desktops at the same time. Dropbox isn't aware of the fact, that a data location on /disks/something is shared between computers, it will try to synchronize from that location on to that same location on another computer, potentially overwriting or damaging the files And again: there is no need to use Dropbox to synchronize between computers in our network (however, synchronizing between desktop and laptop is possible, and useful).


 

Mail notification applet

Fedora puts mail-notification in the user's standard session. This is an application which goes into the system tray in the panel, and shows you if you have new mail. Very useful, if configured properly. So, when unconfigured, it pops up a configuration dialog where you can fill in your mail details. But unfortunately, if you don't want the thing at all, you cannot simply tell it to go away. However, you can remove it from your session by going to "System" - "Preferences" - "Personal" - "Sessions". Look under "Startup programs", select "mail-notification" and click on "disable" or "delete".


Performance issues

Some applications are clearly designed for use by a single user on a single system, and some of this doesn't scale well to n users on m systems (something like n*m comes to mind). In other words, things come to a grinding halt, complicated even more by the lack of disk quota on the home disk, whereas $HOME is one of the few locations an application can count on to exist on any system. here are some tips to get around that kind of problem.

 

Firefox and other disk hogs

Firefox and a number of other programs use a lot of space in your home directory. And since home is on a remote disk, it will even be slower than running locally.
The easiest solution is, to move the entire directory tot the local disk and make a link to it, like this:

  mv ~/.mozilla /data/username/
  ln -s /data/username/.mozilla ~
Of course, /data/username should be an existing directory on your local disk, so don't copy this example literally.
The same trick works for some other disk hogs, here is a list:
  • Firefox, Seamonkey (Mozilla), Sunbird: .mozilla
  • Thunderbird: .thunderbird
  • Evolution: Evolution now follows the XDG standards see below
  • Google Chrome: Cache goes to .cache/google-chrome, see below for XDG standards; there doesn't seem to be a setting in Chrome to change location or size of the disk cache
  • Gimp: .gimp-2.6 (directory name will change with the program version).
    Note: for Gimp, you can also go into the preferences and change the locations of the swap directory and temporary files. This is probably easier than moving the directory and remembering to repeat those steps when a new version of the program comes out.

 

XDG basedir standards

A lot of programs are using the (relatively new) freedesktop XDF basedir setup, which puts configuration files in .config, cache in .cache and various data files of the application in .local
However, the data and cache parts can become quite big, causing two problems: quota usage on the home disk, and performance loss (since the home disk is remote, and this can cause lots of read and write access).
Now the XDG standard provides a mechanism to move those files to another location, and we suggest users move them to one of their local data disks. We also provide a script that takes care of the environment setup, but selecting a location and moving the files is something you have to do yourself.
Follow these steps to get started:

  1. close programs that may have files open in the XDG directories. This is especially important for Evolution (mail client).
  2. Run 'sfinx-xdg' with the path where you want to store the files. Default is /data/$USER/xdg but if you want to be able to use it from other computers as well, /net/$HOSTNAME/data/$USER/xdg might be a better alternative. Or, on recent desktops where /data2 is a RAID1 disk, so guarded against disk failure, you may want to use /data2 in stead of /data.
    Or maybe you want it in another location altogether.
  3. If the specified directory doesn't exist yet, it will be created along with subdirectories for cache and data. Also created is a file .sfinx-xdgrc which contains the path, and this will be used on subsequent logins to set the environment.
  4. Set the environment in your current shell, and move the existing files to their new locations:
         eval `sfinx-xdg`
         mv ~/.cache/* $XDG_CACHE_HOME/
         mv ~/.local/share/*  $XDG_DATA_HOME/
    
  5. Log out, and on your next login, all programs should find their data and cache in the new location.
  6. Witness the increase in performance, especially in the Google Chrome browser and the Evolution mail client.
One thing to note: evolution stores all local mail folders in its data structure, so now that those are on your local data disk, they are no longer included in system backups. But, we are talking about local folders, not IMAP folders on the mail server (which are in ~/Maildir on the server) so this will probably not affect your mail. But if you make backups, you may want to include $XDG_DATA_HOME just to be sure.

 

Gnome 3 - cutting down on overhead

The most important new cpu and network bandwith hog is tracker, the Gnome 3 search tool which tries to index all files. Slowness is due to 2 issues: indexes are stored in the home directory (which is on the network), and all mounted network disks are indexed as well.
The 3 tasks that make up tracker can be disabled from gnome-session-properties. Once this is done, you should also kill the running tracker programs, and get rid of .cache/tracker.
This should have been done automatically by now on all systems, but it never hurts to check.

 

KDE 4.x - cutting down on overhead

The new KDE version 4.2 (& higher) contains a lot of enhancements, but also a tool that drives users over their disk quota fast. And a lot of processes get started in your session, whether you want them or not.
The disk hog is called akonadi, it is started automatically, and even without doing anything with it, it creates a database of 140 MB in .local/share/akonadi. This database is used as backend for the addressbook and a couple of other applications, and the size may grow if you actually use it.
A few other services in KDE may take a lot of memory, cpu time and disk space. Now this is all fine if you are actually using these services, like the addressbook database stored by akonadi, the desktop search features provided by Nepomuk, etc. But if you don't need these services, here is how to get rid of them:

  • Start the System Settings utility (KDE menu - System - System Settings; or execute 'systemsettings' from the terminal)
  • Go to the "Advanced" tab
  • Open "Akonadi". In the tab "Akonadi server settings", uncheck "use internal mysql server". then press the "stop" button at the bottom of the screen. Then press "apply"
  • Back to the system settings overview and go to the item "Autostart". here you can uncheck services that you don't need. Bluetooth, Kerneloops, Network Manager, PackageKit and SELinux troubleshooter are certainly of no use in our network. Disable others to suit your own taste.
  • Next to the item "Desktop search". Uncheck "Nepomuk semantic services" and press "apply".
  • Next, remove the files already created. Akonadi takes approx 140 MB in ~/.local/share/akonadi and you can just throw it all away. Nepomuk takes up a bit of space in ~/.kde/share/apps/nepomuk