
Gnome Multimedia Keys 2
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
This script will allow the use of keyboard multimedia keys to control playback when running Amarok under Gnome 2.22 and above. The keyboard shortcuts you define system wide will then also work in Amarok 2 as if they were "Global shortcuts". This includes most media buttons found on laptops and keyboards.
Based on my version for Amarok 1.4 http://www.kde-apps.org/content/show.php?content=60910 this is a bit of a hack so please let me know how it works out for you...
Currently supported operations are:
Play/Pause
Pause
Stop
Next Track
Previous Track
Simply run the script, no configuration of the script itself is required. The desired keyboard shortcuts can be configured by selecting "System-->Prefrences-->Keyboard Shortcuts" from the Gnome pannel.
Requires:
python >2.4
python-dbus
libdbus-glib
11 years ago
2.0: Initial version
11 years ago
2.0: Initial version
polyopath
9 years ago
To fix this issue:
modify main.js at line 18, replace "python" for "python2"
Report
polyopath
9 years ago
To fix this issue:
modify main.js at line 18, replace "python" for "python2"
Report
BenjaminOechslein
9 years ago
Quote:
diff -u a/listner.py b/listner.py
--- a/listner.py 2009-04-25 17:12:41.000000000 +0200
+++ b/listner.py 2011-11-10 17:47:04.000000000 +0100
@@ -84,7 +84,8 @@
raise
try:
listner = bus.get_object('org.gnome.SettingsDaemon', '/org/gnome/SettingsDaemon/MediaKeys')
- listner.connect_to_signal("MediaPlayerKeyPressed", signal_handler, dbus_interface='org.gnome.SettingsDaemon.MediaKeys')
+ listner.GrabMediaPlayerKeys("amarok", 0, dbus_interface='org.gnome.SettingsDaemon.MediaKeys')
+ listner.connect_to_signal("MediaPlayerKeyPressed", signal_handler)
except:
exit(104)
raise
Report
BobEl
8 years ago
File "patch.py", line 4
diff -u a/listner.py b/listner.py
^
SyntaxError: invalid syntax
(the formatting changed - the caret was under the a in a/listner)
So I don't know what to do now.
Report
amksep
11 years ago
worked perfectly Gnome 2.26.1 amarok 2.1.1
Report
jordz
11 years ago
Report
soker
11 years ago
11846 is us, dont kill!
detected GNOME v2.24
Using new dbus location
next track
DCOPClient::attachInternal. Attach failed Could not open network socket
DCOPClient::attachInternal. Attach failed Could not open network socket
ERROR: Couldn't attach to DCOP server!
do you know what can I do?
Report
browner
11 years ago
Report
soker
11 years ago
I didn't see that the 2.x number is for gnome version ajajaja
Sorry about that
Report
browner
11 years ago
Report
browner
11 years ago
I would try the solutions listed here: http://www.microdevsys.com/WordPress/2008/12/04/fedora-9-kde-4x-error-couldnt-attach-to-dcop-server/
Namely: see if dcopserver is running (ps axfo pid,ppid,user,cmd=|grep dcop)
If not remove stale files like these:
~/.DCOPserver_lhs.localhostservers__0
~/.DCOPserver_lhs.localhostservers_:0
/tmp/.ICE-unix/dcop10328-1227569420
~/.ICEauthority
Restart your Xwindows session and possibly run kdeinit to restart your kde session.
See the link for more details.
Report
Mozork
11 years ago
Report
ciso
11 years ago
Report
meerkat
11 years ago
Report