[vlc] VLC Keybinding for window manager

James Robertson j at mesrobertson.com
Sun Oct 26 09:52:41 CET 2008


I'm using Enlightenment (E16) Window Manager on Debian Lenny,

I have a basic use for VLC to just be a Desktop Media Player and I have
googled and read documentation but cannot figure how to implement what
I want.

I need to be able to control a running instance of VLC from the command
line so I can use keymaps in the window manager to manager things
like play/pause, next, previous etc.

I realise their is remote control via console and telnet etc but I
cannot get this approch working properly and I think I'm getting a
little confused about it all. I just need a single instance of VLC
running with the GUI and the ability to control that instance with key
bindings from the window manager.

I am using a basic login script to conigure my keymaps as follows.

#!/bin/bash

xmodmap -e 'keycode 160=F14'	# Mute
xmodmap -e 'keycode 176=F15'	# Vol-up
xmodmap -e 'keycode 174=F16'	# Vol-down
xmodmap -e 'keycode 164=F17'	# Stop
xmodmap -e 'keycode 153=F18'	# Next
xmodmap -e 'keycode 144=F19'	# Previous
xmodmap -e 'keycode 162=F20'	# Play/Pause
xmodmap -e 'keycode 230=F21'	# Star key
xmodmap -e 'keycode 129=F22'	# Headphones	
xmodmap -e 'keycode 178=F23'	# Home

# END

In E16 I have these key bindings configured as an example....  I use
aumix for volume control which works fine.

KeyDown    -      F14 exec aumix -v M
KeyDown    -      F15 exec aumix -v +5
KeyDown    -      F16 exec aumix -v -5

So I need something like

KeyDown    -      F18 exec vlc 'magic command to go to next track'
Keydown    -      F19 exec vlc 'magic command to go to previous track'

The problem I have is that the commands I have ben trying basically just
opens another instance of VLC instead of interacting with the current
instance.  I was using Audacious previously which has a utility called
audtool that uses dbus to control the running instance.  I would have
stuck with it if it didn't use 40-50% CPU all the time.

Like I mentioned I am getting a little confused so if you have to state
the obvious go right ahead :)

Thanks.

James



More information about the vlc mailing list