Chapter 5. Advanced Tips

Table of Contents

Controlling the server with global hotkeys
Running the server and interface on separate machines

Controlling the server with global hotkeys

Lyricue comes with a small utility called lyricue_remote

If you bind keys to lyricue_remote with various command-line arguments in order to control the server.

The main options are prev_page, next_page, prev_song, next_song and blank

If you are using Gnome with the metacity window manager then run the following commands and those options will be bound to the keys F5, F6, F7. F8 and F9 respectively. This has the advantage of working even if the interface is not running

gconftool-2 --set /apps/metacity/global_keybindings/run_command_1 --type String "F5"
gconftool-2 --set /apps/metacity/global_keybindings/run_command_2 --type String "F6"
gconftool-2 --set /apps/metacity/global_keybindings/run_command_3 --type String "F7"
gconftool-2 --set /apps/metacity/global_keybindings/run_command_4 --type String "F8"
gconftool-2 --set /apps/metacity/global_keybindings/run_command_5 --type String "F9"
gconftool-2 --type string --set /apps/metacity/keybinding_commands/command_1 "lyricue_remote prev_page"
gconftool-2 --type string --set /apps/metacity/keybinding_commands/command_2 "lyricue_remote next_page"
gconftool-2 --type string --set /apps/metacity/keybinding_commands/command_3 "lyricue_remote prev_song"
gconftool-2 --type string --set /apps/metacity/keybinding_commands/command_4 "lyricue_remote next_song"
gconftool-2 --type string --set /apps/metacity/keybinding_commands/command_5 "lyricue_remote blank"

Running the server and interface on separate machines

Lyricue supports running the interface and server on separate machines.For instance you can have a computer running the server connected to your projector and then display the interface on a separate computer sitting elsewhere. This can even work with running the interface on a wireless tabletpc, netbook or laptop.The easiest way to do this is to run both the interface and server on one computer, but use the X-forwarding capability in SSH to forward the interface from the server machine to the client machine.To do this you can run 'ssh -X user@server /usr/bin/lyricue' which will ssh to the host server as user and run the interface. The interface will come up on your local machine.The problem with doing it this way is that there is no way to add a file to the playlist that is stored on the local machine. This can make it difficult to do things such as importing presentations.

The other option is to run the interface directly on the local machine.

There are a few restrictions on this though.

  • The lyricue package must be installed on both machines

  • Both server and interface must be able to access the directories used for images/backgrounds

  • The directory path of the images/backgrounds must be the same

  • MySQL must be configured to listen on the network interface, not just locally

The first thing to do is ensure that MySQL is setup for remote access as by default it is normally only setup for local access. MySQL should be setup/installed on the server (hostB).To do this check your /etc/mysql/my.cnf and ensure you don't have either of the following:

bind-address =

If either of these exist, then remove them and restart the mysql server.

The next thing to do is to ensure that both machines can access the same image/background directories.To make this easier you should use the same username to login on both machines and share the home directory between computers. The easiest way to do this is via NFS.If you are planning on displaying videos it is strongly recommended that you share the directory from the server computer to the interface computer.

There are many ways to do this, but the simplest is log into the server machine (hostB) to install nfs-kernel-server and edit /etc/exports. In that file add a line such as:/home/user *(rw,async)Then run exportfs -a to export that directory as an NFS shareNow go back to the interface computer (hostA) and mount that directory as your home directory.To do this edit /etc/fstab and add a line such as:hostB:/home/user /home/user nfs rw,bg,soft,async,intr 0 0That will mount the share from hostB over /home/userChange the server hostname and username as required.You should now restart the interface machine so that nothing is accessing the old home directory and the new home directory is mounted from NFS.

Once the directory is shared between computers you can specify where the lyricue server and mysql server are located by adding command-line arguments when running lyricue using the '-r' option to say where the mysql server is running.

For example run lyricue -r hostB on the interface computer and just lyricue_server on the server computer.