Gnome Multimedia Keys

Amarok 1.x Scripts

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

1
Become a Fan
5.0

Description:
This script will allow the use of keyboard multimedia keys in Gnome 2.18 and above (eg. ubuntu feisty/gusty/hardy) to control playback. This includes most multimedia buttons found on many laptops. Support for this was broken due to changes in the handling of keyboard shortcuts by gnome 2.18 and later.

Amarok 2 Version is here: http://www.kde-apps.org/content/show.php?content=103448

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
Last changelog:

0.2: Added checks to make sure we only run on an affected system.
0.3: Locale fix.
0.4: Add configuration dialogue, add checks to avoid multiple instances.
0.5: add gnome 2.21/22 support
0.5.2: locale fix


Ratings & Comments

42 Comments

sunnyrescue

2.2 complains it can not read package.

NSLW

this doesn't work on GNOME 2.28 , Fedora 12, Amarok 2.2.0

browner

This script is for the Amarok 1.4.x series. For Amarok 2 use this one: http://www.kde-apps.org/content/show.php?content=103448

NSLW

Funny, because this script worked with Amarok 2 on Fedora 11, but thanks for making me aware of that, I'll download correct version.

edubunyu

Hi guys, I'm new to ubuntu and the idea that you need to run a script to install something. Therefore I need your help to run this script on my computer to get my multimedia keys to run in Amarok 2.0.2 on Ubuntu 9.04. I downloaded the newest script and extracted it on my desktop. To make it a bit easier I renamed the folder to gmk. Now how can I run it? I tried: cd /ed/desktop/gmk/ - but it gives me no such directory Please help me out :) Thanks

browner

Hi, The script is not designed to be run by the user but rather run by Amarok directly and can be installed as follows: 1) Download the file (do not extract it). 2) Open Amarok 3) Click on "Tools" then "Script Manager" from Amarok's menu bar. 4) Click "Install Script" and locate the file you downloaded. 5) Select the script from the list and select "run" The script should then automatically be started each time Amarok is opened. Hope that helps you out, Cheers :)

edubunyu

Perfect - works great :) Just a note - the Amarok need to be restarted after the script installation.

ahmedhamdy

I do the same But when I select install script and locate to the file a message appears to me with "Script installation failed. The package did not contain an executable file. Please inform the package maintainer about this error." and I talking about My PC with Key board with multimedia keys (the same) Can any one help me !!?

browner

I've never heard of this problem before. Please download the file again as it may be corrupt.

NSLW

Thank you very much. Thanks to your script, multimedia keys are working in Amarok 2 on Fedora 11 GNOME 2.26.2

gimbal

The functionality enabled with this script plugin -- namely, being able to control a background music player process, from my keyboard -- it's such that I've been missing since I began to migrate my media files from iTunes+Vista+DRM to Amarok+Linux on my Linux desktop. These little conveniences can serve to make the computing experience a whole lot nicer. So, thank you for providing this script plugin, to the public Amarok users. It's sincerely appreciated, by this user, too.

browner

Sorry for not keeping up to date with the comments here... as for Amarok 2 support I don't think it it's going to happen anytime soon - not from me anyway. The scripting interface has changed completely and scripts are now required to be written in javascript so it would mean starting over a fresh in a language I've never used before. Currently I don't even have Amarok 2 installed and my time is limited however I will try and investigate this sometime soon. Cheers, Chris

stom

yep, would also love to see this work under amarok 2! tested on 15 January 2009 with script v0.5 on amarok 2.0, kde 4.1.3 and gnome v 2.24.1 thank you!

TheWiseDj

Hi everybody! Those are the commands you need to play, pause and so on: qdbus org.kde.amarok /Player org.freedesktop.MediaPlayer.Play qdbus org.kde.amarok /Player org.freedesktop.MediaPlayer.Pause qdbus org.kde.amarok /Player org.freedesktop.MediaPlayer.Stop qdbus org.kde.amarok /Player org.freedesktop.MediaPlayer.Next qdbus org.kde.amarok /Player org.freedesktop.MediaPlayer.Prev If you know how to put them in a script ;)

stom

hey, Thanks for the tip. I've not worked with amarok scripting before. can you give any starting pointers? many thanks

ciso

I add my request for an Amarok2 version :)

nenelinux

Can you make it work in amarok 2? please

hardysmiles

hi there, the script below was my second attempt trying to install this script. the first time the command line never came back to me, it was just stuck on "using new dbus location" which is the last line of this second attempt, pasted below. as you can see, when i tried running it again, there was this added mumbo jumbo in the middle, about the dark theme, which i think is the color theme for my windows... anyways, i just wanted to get the multimedia control buttons work on my xps m1210 labtop, running hardy with 2.22.3 gnome. if anybody has an inkling on what i need to to do, i'm all ears. thanks! hilary@lilbit:~/Desktop/gnome_media_keys$ ./gnome_media_keys.py checking for old instances of the script PID CMD 6187 python /usr/share/system-config-printer/applet.py 30320 python ./gnome_media_keys.py 30320 is us, dont kill! /home/hilary/.themes/Darker theme/gtk-2.0/gtkrc:50: Clearlooks configuration option "menuitemstyle" is not supported and will be ignored. /home/hilary/.themes/Darker theme/gtk-2.0/gtkrc:51: Clearlooks configuration option "listviewitemstyle" is not supported and will be ignored. /home/hilary/.themes/Darker theme/gtk-2.0/gtkrc:52: Clearlooks configuration option "progressbarstyle" is not supported and will be ignored. detected GNOME v2.22 Using new dbus location

enigma0Z

Stop, Next, and Prev. are broken in Gnome 2.24... It seems that the signal handler isn't being called for these keys: signal_handler(*mmkeys) (tested by printing mmkeys on each instance) Hmm....

9a3eedi

I'd like to say thanks for this awesome script. Worked perfectly fine in Ubuntu. I must say though for some reason when I run this script it uses 100% of my CPU. I suspected that it was a loop polling the keys or something, so I looked at the code, and couldn't find anything (I'm not familiar with python or linux programming). Can you please look into that? thanks :D

9a3eedi

Ok, ignore my last comment. I realized something wierd. When I run it from terminal, the CPU usage is perfectly fine. But when I start it from natuilus, it uses 100% of my CPU o__O Strange. Maybe it's an Ubuntu thing (I'm using x86_64 Hardy) Again, great job on the script. You made everybody's lives better :D

mplanchard

I had this script installed in Gutsy and for one reason or another it stopped working on the upgrade to Hardy. To get it working again I just uninstalled and reinstalled the script. Thanks very much!

mordisko

Hello! First of all: thank you very much for this script, for a long time it has served me very well to control my amarok with a wiimote. Sadly, i've been experiencing some problems lately and i suposse it has something to do with system updates. I'm using debian lenny/sid, gnome 2.22.1 and amarok 1.4.9.1 (using KDE 3.5.9) and the script does not seem to work anymore. Well, it does, but in a very strange way, let me explain: the script (it is running and there is only one instance) accepts every key i send but does not process them until i stop the playing list. An example of this: a song is playing and i hit 3 times the "next track button", one time the "stop/play" and one time the "previous track"; at first amarok won't do a thing but as soon as the song stops or moves to the next amarok will move 3 songs forward, stop playing and will go 1 song backwards. I didn't find an appropiate way to send bugs so i could only contact you by this comment. Great job BTW, i only hope this issue fixes for me soon :) If you need more info i can give it to you. Regards mordisko

WhiteDragon

I have exactly the same problem. Using debian lenny/sid with Gnome 2.22.2, Amarok 1.4.9.1 (Using KDE 3.5.9), and Gnome Multimedia Key's [sic] Amarok Script version 0.5. All multimedia keyboard commands only take effect after the song changes.

Db0

...for this. I couldn't get it to work in any other way (like keytouch) in a Dell Inspiron Laptop. Your script worked perfectly. Cheers!

Pling
0 Affiliates
Details
license
version 0.5.2
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 2

Other Amarok 1.x Scripts:

Gnome Play Video in Totem
mwheatland
last update date: 19 years ago

Score 5.0

editLyrics-gnome
ZeeD
last update date: 19 years ago

Score 5.0

amarok Alarm
aroth
last update date: 16 years ago

Score 5.0

amaroK Web Collection V xmms
pti-jean
last update date: 16 years ago

Score 5.0

SongLogger
lucatnt
last update date: 17 years ago

Score 5.0

amaroK Web Collection
pti-jean
last update date: 16 years ago

Score 5.0



System Tags