![]() |
Custom Icon e.g. Starting Favorite Webradio
Hi,
inspired by this thread: http://talk.maemo.org/showthread.php?t=35858 I came up with the idea of creating a desktop shortcut for starting my favorite internet radio: Step 1: Create a file named e.g. "webradio.desktop" in the /usr/share/applications/hildon/ directory (will need root access to do that). Step 2: Enter the text below in the new file and replace the text within < ... > (custom name + link to stream) with whatever you want... Step 3: Afterwards you have a new entry in your application list with your custom name and may create a shortcut on your desktop. When you click on your new icon / shortcut a xterm window will appear for a second before media player starts playing your webradio... PHP Code:
http://talk.maemo.org/showpost.php?p...0&postcount=26 Thanx to archebyte for the great work!!! Please share with whatever other functions you create your own custom icons / shortcuts... |
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
|
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
Was experimenting with realizing it via script... Somehow it didnīt work. Whatever now it does - Thanks a lot!!! |
Re: Custom Icon e.g. Starting Favorite Webradio
How do you create the file in the first instance? Do you do this on the N900 first?
|
Re: Custom Icon e.g. Starting Favorite Webradio
Have followed the instructions but don't see the shortcut. DO you have to keep the <> or remove them?
|
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
|
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
cp example.desktop examplecopy.desktop in Xterm. |
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
|
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
If your icon does not appear recheck if you followed the steps as described or have typos somewhere!? I think once it didnīt work for me when I created the .desktop file from the scratch on my Win PC, but it worked when I edited a copy of an existing .desktop file... |
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
|
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
I suggest leafpad as its way easier! For editing with leafpad enter in Xterm: leafpad webradio.desktop |
Re: Custom Icon e.g. Starting Favorite Webradio
does this look ok?
[Desktop Entry] Encoding=UTF-8 Version=0.1 Type=Application Terminal=true Name=KVMV Exec=/usr/bin/osso-xterm '/usr/bin/dbus-send --print-reply --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:" http://kvmv.streamon.fm/player/player.php?username=KVMV&stream=64k&type=1"' Icon=X-HildonDesk-ShowInToolbar=true X-Osso-Type=application/x-executable |
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
Looks like there is a blank before http.. ("_http). Remove this blank and make sure that the Exec command is in one line without break. Then it should work! EDIT: Sorry, just noted that your link goes to a webradio player... But you need to use a link to a media stream... EDIT2: Check the source of the link you used. There you find this link: http://kvmv.streamon.fm/play/KVMV-64k-168-1.html And there you find several media streaming links that should work! |
Re: Custom Icon e.g. Starting Favorite Webradio
1 Attachment(s)
OK, got this working. Very Kewl!
My Favorite shoutcast server is the one streaming FOX Business channel off Directv in my house! Here's the Icon I used, looks pretty kewl to me at least. The Icon is 48x48 and looks great. |
Re: Custom Icon e.g. Starting Favorite Webradio
Thanks for this guys, it was just what I was looking for. Any way to make it so that media player opens in the background, or make it so you end up back at the desktop? This way, if you setup multiple shortcuts to different stations, you could just quickly switch between all of them right from the desktop.
|
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
Can you try this url in your file to see if it will work http://kvmv.streamon.fm/stream/KVMV-64k.mp3 |
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
|
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
When you click on your new icon / shortcut a xterm window will appear for a second before media player starts playing your webradio... <<< I don't get it to play anyway so shouldn't it play regardless of whether I create that script or not? |
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
Post your code, if you want help on it. Here's mine: [Desktop Entry] Encoding=UTF-8 Version=1.0 Name=TurboNET Comment=TurboNET Radio Exec=sh /home/user/turbonet_radio.sh Icon=shoutcast Terminal=false Name=TurboNET Type=Application X-HildonDesk-ShowInToolbar=true X-Osso-Type=application/x-executable See how simple it is. #!/bin/bash /usr/bin/dbus-send --print-reply --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:"http://xxxxxx.com:8000/listen.pls" exit 0 |
Re: Custom Icon e.g. Starting Favorite Webradio
1 Attachment(s)
Quote:
tested your link and it works!:D Attached you will find the .desktop file as well as the shell script. Put kvmv.desktop into /usr/share/applications/hildon and KVMV.sh into /home/user/MyDocs/.documents/Scripts |
Re: Custom Icon e.g. Starting Favorite Webradio
Thanks with your efforts to help me out here :)
I copied the files over to the N900 and was able to click on the icon. A black window then appears (not the xterm window) and I see the animated timer at the top status bar area. It looks like it is going to do something and stays like this for about 5 seconds and then just closes. :( |
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
|
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
|
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
(The command line from the shell script) /usr/bin/dbus-send --print-reply --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:"http://kvmv.streamon.fm/stream/KVMV-64k.mp3" into XTerm? |
Re: Custom Icon e.g. Starting Favorite Webradio
~ $ /usr/bin/dbus-send --print-reply --dest=com.nokia.mediaplayer/com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:"http://kvmv.streamon.fm/stream/KVMV-64k.mp3"
process 1678: arguments to dbus_message_new_method_call() were incorrect, assertion "_dbus_check_is_valid_path (path)" failed in file dbus-message.c line 1078. This is normally a bug in some application using the D-Bus library. process 1678: arguments to dbus_message_set_auto_start() were incorrect, assertion "message != NULL" failed in file dbus-message.c line 2492. This is normally a bug in some application using the D-Bus library. Couldn't allocate D-Bus message |
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
You missed a <blank> after --dest=com.nokia.mediaplayer Copy & Paste and remove the red underscore _ and your good... |
Re: Custom Icon e.g. Starting Favorite Webradio
:) Ok that works in xterm!
|
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
Now copy & paste this line into your shell script and your done ;-) |
Re: Custom Icon e.g. Starting Favorite Webradio
Arghhhh!
Nearly there. It launches and then connects to media player, briefly says, "opening stream" and then comes up with an error message, "no connection to server". |
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
|
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
|
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
|
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
There were obviously some type of invisible meta characters that were driving me nutz with it not working. |
Re: Custom Icon e.g. Starting Favorite Webradio
1 Attachment(s)
Here it is. And thanks for your help
|
Re: Custom Icon e.g. Starting Favorite Webradio
Yipee!
It's working :) Many thanks, Reflektorfalke and les_garten. Thanks for persisting to help and get this sorted for me. In the end I just opened leafpad on the N900 and typed in the all the info into a new KVMV.sh file and it worked. It seems like les_garten's final tip was what was needed but thank you bigtime to Reflektorfalke for all your help these last few days. |
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
See, its quite simple to setup :p Now enjoy listening to your beats with your new webradio icon !!!:D:D:D BTW: Donīt forget to add a nice icon ;-) |
Re: Custom Icon e.g. Starting Favorite Webradio
I am a windows user but since I have got the N900 I just installed kubuntu and have learned a bit just by getting this shortcut to work.
I didn't even know how to create, copy and delete files with linux until you guys started helping me here. :) Thanks. Hopefully if I just do the editing in leafpad on the N900 then I shouldn't get any problems adding other shortcuts. Thanks once again guys! |
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
|
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
|
Re: Custom Icon e.g. Starting Favorite Webradio
Quote:
Short version with my icon cp shoutcast.png /usr/share/icons/hicolor/48x48/hildon cp shoutcast.png /usr/share/icons/hicolor/scalable/hildon there may be two scalable dirs because one of the developers didn't know how to spell scalable. then in your desktop file place just the name of the icon without the .png extension. Look at the other desktop files and you'll figure it out. |
All times are GMT. The time now is 21:28. |
vBulletin® Version 3.8.8