FAQ > OS > HOW TO > SHORTCUT > MORE

MORE SHORTCUT EXAMPLES
Java
SHORTCUTS TO JAVA APPS
Some applications (like Bible Desktop) are .jar files; meaning they run in Java. OpenJDK Java 8 is included in the C4C Lubuntu ReSpin. The Exec command in a shortcut/launcher for a Java app is java -jar followed by the path to the .jar file.

Make sure the Java app opens in OpenJDK by right-clicking the .jar, choosing Properties from the drop down menu and in the File Properties dialogue box choose to Open with: OpenJDK Java 8 Runtime.

Open with: OpenJDK Java 8 Runtime

You’ll also need to be sure you have permission to run the Java app. Click the Permissions tab and change the Execute: drop down menu to Anyone.

Change Execute to Anyone

More Java info: OpenJDK, Oracle's Java.


- Java App Example 1 -

Password Dragon is a free password manager encrypted with BlowfishJ algorithm; requiring you only to remember the master password. It is also extremely portable as it may be run from a USB flash drive. Download the passworddragon.zip file. Go to your Downloads folder, right-click the file and choose Extract Here from the drop down menu to unzip it. Follow instructions above to ensure the .jar file opens in OpenJDK and you have permission.

Password Dragon shortcut

Right-click an empty space on the Desktop, choose Create New… --> Empty File from the drop down menu and name it password-dragon.desktop then copy and paste the following text into it, save and “X” out of it:

[Desktop Entry]
Name=Password Dragon
Comment=Password Manager
Exec=java -jar /usr/share/passworddragon/passworddragon.jar
Icon=/usr/share/passworddragon/pwm.ico
Terminal=false
Type=Application
Categories=GTK;Utility;
StartupNotify=true


All shortcuts are .desktop entry files. They must be saved as xxxx.desktop

Add
the Password Dragon shortcut/launcher to the menu by going to Edit --> Copy (or Ctrl+C) if you want to leave it on the Desktop, or Cut (or Ctrl+X) if you only want it in the menu. Go to Menu --> System Tools --> LXTerminal (or Ctrl+Alt+T) and type: gksu pcmanfm to open the PCManFM as root.

Password Manager

View files in a Directory Tree. Navigate to /usr/share/applications. Select the applications folder on the left pane. Go to Edit --> Paste (or Ctrl+V). If the Password Dragon menu entry doesn't appear right away, type (or copy and paste): lxpanelctl restart in LXTerminal, or log out and log back in.



- Java App Example 2 -

Minecraft While Minecraft is not free - it is undeniably popular. A building, crafting, adventuring game that despite it's blocky graphics – needs a pretty decent graphics card and good amount of memory. See the Minecraft website.

Minecraft Java App
[Desktop Entry]
Name=Minecraft
Exec=java -jar /usr/share/Minecraft/Minecraft.jar
Comment=Adventure Game
Icon=/usr/share/Minecraft/minecraft.png
NoDisplay=false
Categories=GTK;Game;
Type=Application


All shortcuts are .desktop entry files. They must be saved as xxxx.desktop

Put the shortcut/launcher in the menu: go to Edit --> Copy (or Ctrl+C), or Cut (or Ctrl+X) the .desktop file shortcut. Open the File Manager (PCManFM) as root. Go to Menu --> System Tools --> LXTerminal (or Ctrl+Alt+T) and type: gksu pcmanfm View files in a Directory Tree. Navigate to /usr/share/applications. Select the applications folder on the left pane. Go to Edit --> Paste (or Ctrl+V) to paste the .desktop file into applications. Close open windows. If the menu entry doesn't appear, type (or copy and paste): lxpanelctl restart in LXTerminal, or log out and log back in.




Shortcuts to .sh files

SHELL SCRIPTS
Several popular applications start with shell scripts (.sh files). You'll need to change permissions to enable a shell script to run. Either via command-line...
Go to Menu --> System Tools --> LXTerminal (or Ctrl+Alt+T)
Type (or copy and paste):
chmod +x /path/to/the/shellscript.sh[Enter] or [return]
Or, the graphical way. Right-click (F12) the .sh file, choose "Properties" from the drop-down menu and click the "Permissions" tab:

Execute Nobody

Then change the "Execute" drop-down to "Anyone"

Execute Anyone


The "Exec" property of a shortcut/launcher of a shell script tells the File Manager it's a shell script that's being run, changes the directory to the one in which the shell script resides and finally executes the shell script.


- Shell Script Example -

Lux Delux

For our shortcut to a shell script example, we use a popular game called Lux Delux; like Risk, but with more than 800 different maps. Try to take over the world, over and over (30 times for free). Lux Delux features 11 different computer opponents (an almost unlimited number of real opponents) and easy to setup network / Internet play. See the Lux Delux homepage and map gallery

[Desktop Entry]
Version=1.0
Type=Application
Name=Lux Delux
GenericName=Lux Delux
Comment=World Domination
Icon=/usr/share/LuxDelux/LuxIcon.png
Exec=sh -c "cd /usr/share/LuxDelux/; ./LuxDelux.sh"
Categories=GTK;Game;


All shortcuts are .desktop entry files. They must be saved as xxxx.desktop

Put the shortcut in the menu: Edit --> Copy (Ctrl+C), or Cut (Ctrl+X) the .desktop file shortcut. Open the File Manager (PCManFM) as root. Go to Menu --> System Tools --> LXTerminal (or Ctrl+Alt+T) and type: gksu pcmanfm View files in a Directory Tree. Navigate to /usr/share/applications. Select the applications folder on the left pane. Edit --> Paste (Ctrl+V) the .desktop file into applications. Close open windows. If the menu entry doesn't appear, type (or copy and paste): lxpanelctl restart in LXTerminal, or log out and log back in.




Shortcuts to .html files

WEBPAGES
To make a shortcut to a webpage, simply add the word firefox before the path to the webpage (whether that be an address on the Internet or an .html page on your hard drive) in the "Exec" property. Several Mozilla command-line arguments will also be adhered to, like -new-window and -new-tab. And of course; if you're making several webpage shortcuts - you'll probably want to have separate icons for each.


- Webpage Example -

Firefox
[Desktop Entry]
Name=Bible Knowlege Games
Exec=firefox http://www.savingus.org/knowledg/
Comment=Games for Group Play
Icon=/usr/share/icons/lubuntu/apps/48/firefox.svg
NoDisplay=false
Categories=GTK;Network;WebBrowser;
Type=Application


All shortcuts are .desktop entry files. They must be saved as xxxx.desktop

Put the shortcut in the menu: Edit --> Copy (Ctrl+C), or Cut (Ctrl+X) the .desktop file shortcut. Open the File Manager (PCManFM) as root. Go to Menu --> System Tools --> LXTerminal (or Ctrl+Alt+T) and type: gksu pcmanfm View files in a Directory Tree. Navigate to /usr/share/applications. Select the applications folder on the left pane. Edit --> Paste (Ctrl+V) the .desktop file into applications. Close open windows. If the menu entry doesn't appear, type (or copy and paste): lxpanelctl restart in LXTerminal, or log out and log back in.



Top