Page 1 of 1

[Solved] Global Hotkeys in Fedora 12

Posted: 26 Dec 2009 04:04
by hugo87
Hi!
I'm using VLC 1.03 ("VLC media player 1.0.3 Goldeneye") on Fedora 12 ("2.6.31.6-166.fc12.x86_64".
I've configured VLC with a couple of global hoykeys I used in my previous OS, including ctrl+alt+home (play), ctrl+alt+end (stop), and more.

When I press them, nothing happens. As if I hadn't pressed them.
This has been happening since I installed the OS.

Hope this is enough detail, thanks :)

Re: Global Hotkeys in Fedora 12

Posted: 14 Jan 2010 06:55
by hugo87
I case anyone is interested, since I couldn't solve the issue, I used xbindkeys and a small shell script that does a "PlayPause" though DBus.

If playing => pause
If paused => play
If stopped => play

Code: Select all

#!/bin/bash if [ -z `dbus-send --print-reply --session --dest=org.mpris.vlc /Player org.freedesktop.MediaPlayer.GetStatus | grep "int32 2"` ]; then dbus-send --print-reply --session --dest=org.mpris.vlc /Player org.freedesktop.MediaPlayer.Pause else dbus-send --print-reply --session --dest=org.mpris.vlc /Player org.freedesktop.MediaPlayer.Play fi
I might post this in the wiki as a dbus usage example later on.
Hope this helps someone out there.

[edit] updated to a cleaned up version of the script :oops:
[edit2] hope this proper documentation helps: http://wiki.videolan.org/DBus-usage