Active Topics

 



Notices


Reply
Thread Tools
Reflektorfalke's Avatar
Posts: 597 | Thanked: 490 times | Joined on Dec 2009 @ Germany
#1
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:
[Desktop Entry
Encoding=UTF-
Version
=0.1 
Type
=Application 
Terminal
=true 
Name
=<custom name
Exec=/usr/bin/osso-xterm '/usr/bin/dbus-send --print-reply --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:"<link to your webradio / stream>"' 
Icon
X-HildonDesk-ShowInToolbar=true 
X
-Osso-Type=application/x-executable 
BTW, you can also exchange the blue standard icon - check this post to see what you need to do!
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...

Last edited by Reflektorfalke; 2010-01-09 at 15:44.
 

The Following 14 Users Say Thank You to Reflektorfalke For This Useful Post:
Posts: 6 | Thanked: 12 times | Joined on Nov 2009 @ Rome, Italy
#2
Originally Posted by Reflektorfalke View Post
When you click on your new icon / shortcut a xterm window will appear for a second before media player starts playing your webradio...
Thanks, cool idea! I also found a way to avoid seing xterm windows:
  • Create a script file (e.g. "play.sh") like the following including the xterm command to be executed
    Code:
    #!/bin/bash
    /usr/bin/dbus-send --print-reply --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:"<link to your webradio / stream>"
    exit 0
  • Change the Exec including sh command followed by the script file created, e.g.:
    Code:
    ...
    Exec=sh /home/user/play.sh
    Terminal=false
    ...
 

The Following 10 Users Say Thank You to orientel For This Useful Post:
Reflektorfalke's Avatar
Posts: 597 | Thanked: 490 times | Joined on Dec 2009 @ Germany
#3
Originally Posted by orientel View Post
Thanks, cool idea! I also found a way to avoid seing xterm windows
Aah sweet, nice improvement!!!

Was experimenting with realizing it via script...
Somehow it didnīt work.
Whatever now it does - Thanks a lot!!!
 
Posts: 739 | Thanked: 220 times | Joined on Dec 2009 @ Surrey, UK
#4
How do you create the file in the first instance? Do you do this on the N900 first?
__________________
There is a way that seems right to a man, but in the end it leads to death. Proverbs 14:12
 
Posts: 739 | Thanked: 220 times | Joined on Dec 2009 @ Surrey, UK
#5
Have followed the instructions but don't see the shortcut. DO you have to keep the <> or remove them?
__________________
There is a way that seems right to a man, but in the end it leads to death. Proverbs 14:12
 
Posts: 1,283 | Thanked: 370 times | Joined on Sep 2009 @ South Florida
#6
Originally Posted by orientel View Post
Thanks, cool idea! I also found a way to avoid seing xterm windows:
  • Create a script file (e.g. "play.sh") like the following including the xterm command to be executed
    Code:
    #!/bin/bash
    /usr/bin/dbus-send --print-reply --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:"<link to your webradio / stream>"
    exit 0
  • Change the Exec including sh command followed by the script file created, e.g.:
    Code:
    ...
    Exec=sh /home/user/play.sh
    Terminal=false
    ...
I rebooted and still don't see my entry showing up. I've seen this before with other applications and then they mysteriously appear some hours later. Any idea how to refresh the applications Icon menu?
 
Reflektorfalke's Avatar
Posts: 597 | Thanked: 490 times | Joined on Dec 2009 @ Germany
#7
Originally Posted by cardiff-blues View Post
How do you create the file in the first instance? Do you do this on the N900 first?
Just create a copy of another .desktop-file by typing

cp example.desktop examplecopy.desktop

in Xterm.
 

The Following User Says Thank You to Reflektorfalke For This Useful Post:
Reflektorfalke's Avatar
Posts: 597 | Thanked: 490 times | Joined on Dec 2009 @ Germany
#8
Originally Posted by cardiff-blues View Post
Have followed the instructions but don't see the shortcut. DO you have to keep the <> or remove them?
You have to remove <>, they just highlight the parts you want to edit
 

The Following User Says Thank You to Reflektorfalke For This Useful Post:
Reflektorfalke's Avatar
Posts: 597 | Thanked: 490 times | Joined on Dec 2009 @ Germany
#9
Originally Posted by les_garten View Post
I rebooted and still don't see my entry showing up. I've seen this before with other applications and then they mysteriously appear some hours later. Any idea how to refresh the applications Icon menu?
Well I remember reading about a command that refreshs the icon cache, but reboot will do the same!
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...
 
Posts: 739 | Thanked: 220 times | Joined on Dec 2009 @ Surrey, UK
#10
Originally Posted by Reflektorfalke View Post
Just create a copy of another .desktop-file by typing

cp example.desktop examplecopy.desktop

in Xterm.
OK it wouldn't show up in app manager so I have followed your tip here. Now how do I put the content into my webradio.desktop file that I have just created?
__________________
There is a way that seems right to a man, but in the end it leads to death. Proverbs 14:12
 
Reply

Tags
yd config


 
Forum Jump


All times are GMT. The time now is 18:00.