FAQ > OS > HOW TO > SHORTCUT > CREATE-EDIT

CREATE A SHORTCUT

To create a new shortcut (launcher, desktop entry file) from scratch, right-click any empty space on the Desktop and choose Create New... Empty File.


Create New... Empty File

Save the file as xxxx.desktop (this file name is hidden)

xxxx.desktop

Then open the file with Leafpad. Right-click it and choose Leafpad.

Open with Leafpad




MAKE A SHORTCUT TO AN EXISTING FILE

For this example, we'll create shortcut(s) to music and tell VLC to play it. We've saved an album called Freedom Kids in the Music folder. Not only are there MP3s in here, but we've also saved the "cover" image and a few different playlists of the songs in the album (we made with VLC).

Freedom Kids Folder

Right-click any empty space on the Desktop and choose Create New... Empty File. Save the file as freedom-kids.desktop (the name of this album). Then Right-click it and choose Leafpad.

Example shortcuts

A single MP3:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=
The Lion the Lamb
Icon=/home/username/Music/Freedom-Kids/freedomkids_album_cover.jpg
Exec=vlc /home/username/Music/Freedom-Kids/the-lion-the-lamb.mp3
Comment=Freedom Kids


MP3 Shortcut

An xspf playlist:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Freedom Kids
Icon=/home/username/Music/Freedom-Kids/freedomkids_album_cover.jpg
Exec=vlc /home/
username/Music/Freedom-Kids/Freedom-Kids.xspf
Comment=Freedom Kids


An m3u playlist:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Freedom Kids
Icon=/home/username/Music/Freedom-Kids/freedomkids_album_cover.jpg
Exec=vlc /home/
username/Music/Freedom-Kids/Freedom-Kids.m3u
Comment=Freedom Kids


An m3u8 playlist:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Freedom Kids
Icon=/home/username/Music/Freedom-Kids/freedomkids_album_cover.jpg
Exec=vlc /home/
username/Music/Freedom-Kids/Freedom-Kids.m3u8
Comment=Freedom Kids


Playlist


Stop here if you'd just like a Desktop Shortcut

Continue to add the shortcut to the menu

Add Categories:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Freedom Kids
Icon=/home/username/Music/Freedom-Kids/freedomkids_album_cover.jpg
Exec=vlc /home/
username/Music/Freedom-Kids/Freedom-Kids.m3u8
Comment=Freedom Kids
Categories=AudioVideo;Audio;



Copy, or Cut the shortcut. Go to Menu --> System Tools --> LXTerminal (or Ctrl+Alt+T) and type: gksu pcmanfm to open the file manager as root. Navigate to /usr/share/applications, select applications, (single click the folder in the Directory Tree) and paste.

Freedom Kids in Menu

Note: If you don't see the Freedom Kids shortcut under Sound & Video in the menu; enter lxpanelctl restart in LXTerminal, or log out and log back in.




SHORTCUT TO AN INTERNET RADIO STATION
It's easy to make a shortcut to one of many thousands of Internet radio stations [see lists at Christian Tuner, Icecast and Internet Radio]. Simply copy the M3U or XSPF address of the station and add vlc in front of it in the Exec line. For this example we'll use a gospel radio station broadcast by Faith Baptist Church in Cheyenne, WY.

Shortcut to an Internet Radio Station

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=KWYG 98.5
Icon=/usr/share/icons/Adwaita/256x256/devices/audio-headphones.png
Exec=vlc http://s2.stationplaylist.com:7010/listen.aac.m3u
Comment=Wyoming Gospel Radio

Categories=AudioVideo;Audio;


The icon of "audio-headphones" is already available on your C4C Lubuntu ReSpin system, but you may use any icon you see fit.

Add to the Menu
Copy, or Cut the shortcut. Go to Menu --> System Tools --> LXTerminal (or Ctrl+Alt+T) and type: gksu pcmanfm to open the file manager as root. Navigate to /usr/share/applications, select applications, (single click the folder in the Directory Tree) and paste.



EDITING SHORTCUTS
To access nearly all the shortcuts to currently installed applications:

1. Go to Menu --> System Tools --> LXTerminal
(or Ctrl+Alt+T) and Type: gksu pcmanfm
This will allow you to work with the files as root.

2. View files as Directory Tree.

Directory Tree

3. Navigate to /usr/share/applications and select (single-click) the applications folder so it shows the shortcuts inside the folder (they'll be in right pane).

Applications

Copy a .desktop entry file from the Root applications folder and paste it to your desktop. Not only will you have created a Desktop shortcut (a .desktop entry file on your Desktop), but you can then safely open it with Leafpad and learn about it.

root applications folder

If you like what you've come up with; you can always copy (or cut) your edited shortcut from the desktop and paste it into the root applications folder. If you don't see your edits in the menu right away; go to Menu --> System Tools --> LXTerminal and type lxpanelctl restart If it still doesn't show; log out and log back in.





EDIT A SHORTCUT EXAMPLE

For this example, we'll use the Pidgin IM application. Go to Menu --> Internet --> Pidgin Internet Messenger. Let's shorten name and the description.

Pidgin Shortcut in the Menu

Go back to /usr/share/applications (if you closed the root window, type: gksu pcmanfm in LXTerminal again and navigate back there). Right-click Pidgin Instant Messenger and choose Copy.

Copy Shortcut

Right-Click the Desktop and choose paste. A copy of the shortcut to Pidgin Internet Messenger now appears on the Desktop. It's a fully-functional shortcut; double-clicking it will open the Pidgin application. And, because it's a copy; we can make sure we like our changes to it before we replace the original in the menu.

Pidgin Internet Messenger

Edit this, or any shortcut by right-clicking it and choosing Leafpad from the menu.

Open Shortcut with Leafpad

This is what the shortcut looks like when opened in Leafpad:

[Desktop Entry]
Name=Pidgin Internet Messenger
GenericName=Internet Messenger
Comment=Chat over IM.  Supports AIM, Google Talk, Jabber/XMPP, MSN, Yahoo and more
Exec=pidgin
Icon=pidgin
StartupNotify=true
Terminal=false
Type=Application
Categories=Network;InstantMessaging;
X-MessagingMenu-UsesChatSection=true
X-Ubuntu-Gettext-Domain=pidgin


We'll do two simple edits; shorten the Name and Comment.

[Desktop Entry]
Name=Pidgin
GenericName=
Pidgin
Comment=Chat/IM


Go to File --> Save (or Ctrl+S) and "X" out to close.

Pidgin Desktop Shortcut

If you like the way it looks, replace the shortcut in the menu. Copy (if you want to leave the shortcut on the Desktop) or Cut if you don't. Go back to to /usr/share/applications (if you closed the root window, type: gksu pcmanfm in LXTerminal again and navigate back there again). Go to Edit --> Paste (or pick an empty spot in the left pane, Right-Click and then choose Paste) and replace the existing file.

Go back to Menu --> Internet --> Pidgin. Notice the shorter name and description.

Pidgin - New Menu Shortcut

Note: If you don't see your edited version of the Pidgin shortcut in the menu; go to Menu --> System Tools --> LXTerminal and type lxpanelctl restart If it still doesn't show; log out and log back in.


Top