Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Custom Icon e.g. Starting Favorite Webradio

    Reply
    Page 1 of 5 | 1   2     3   | Next | Last
    Reflektorfalke | # 1 | 2010-01-09, 14:35 | Report

    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-8 
    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...

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by Reflektorfalke; 2010-01-09 at 15:44.
    The Following 14 Users Say Thank You to Reflektorfalke For This Useful Post:
    Bratag, cardiff-blues, Crashdamage, dvergin, Grant, gttnnn, iKneaDough, mattaustin, mivoligo, mrsellout, noobmonkey, pillar, skalogre, weymouthstan

     
    orientel | # 2 | 2010-01-17, 03:18 | Report

    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
      ...

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 10 Users Say Thank You to orientel For This Useful Post:
    Cas07, Crashdamage, Grant, iKneaDough, les_garten, mrsellout, pillar, Reflektorfalke, skalogre, YoDude

     
    Reflektorfalke | # 3 | 2010-01-17, 17:47 | Report

    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!!!

    Edit | Forward | Quote | Quick Reply | Thanks

     
    cardiff-blues | # 4 | 2010-02-03, 21:12 | Report

    How do you create the file in the first instance? Do you do this on the N900 first?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    cardiff-blues | # 5 | 2010-02-03, 21:53 | Report

    Have followed the instructions but don't see the shortcut. DO you have to keep the <> or remove them?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    les_garten | # 6 | 2010-02-03, 22:47 | Report

    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?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Reflektorfalke | # 7 | 2010-02-03, 22:54 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to Reflektorfalke For This Useful Post:
    cardiff-blues

     
    Reflektorfalke | # 8 | 2010-02-03, 22:55 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to Reflektorfalke For This Useful Post:
    cardiff-blues

     
    Reflektorfalke | # 9 | 2010-02-03, 23:02 | Report

    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...

    Edit | Forward | Quote | Quick Reply | Thanks

     
    cardiff-blues | # 10 | 2010-02-03, 23:13 | Report

    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?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 1 of 5 | 1   2     3   | Next | Last
vBulletin® Version 3.8.8
Normal Logout