Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Linux: Create A Desktop Icon (if compiled version) (If you compile upp (stable = 5485 at this time), you may find this useful.)
Linux: Create A Desktop Icon (if compiled version) [message #44082] Tue, 23 December 2014 12:55
rainbowsally is currently offline  rainbowsally
Messages: 29
Registered: December 2014
Promising Member
Linux: Create A Desktop Icon

If you compile upp (stable), you may find this useful.

This script will create a Desktop icon to launch theide and works with several of the linux desktops.

file: create-desktop-icon.exec (exec, with a 'c' so you know it's clickable)
purpose: create a desktop icon to launch TheIDE
#!/bin/sh

##########################################################
# script to create TheIDE launcher icon on a Linux Desktop
# -Rainbow Sally
##########################################################

# Let's make it clickable, just for fun
CURDIR=`dirname $0`
cd $CURDIR

cat << _eof > ~/Desktop/TheIDE.desktop
[Desktop Entry]
Comment[en_US]=
Exec=$HOME/theide
GenericName[en_US]=The IDE U++
GenericName=The IDE U++
Icon=$HOME/upp/uppsrc/ide/theide-48.png
Name[en_US]=TheIDE
Name=TheIDE
StartupNotify=true
Terminal=false
Type=Application
_eof

if [ -f ~/Desktop/TheIDE.desktop ]; then

# some linuxes, particularly newer ones require this.
chmod +x ~/Desktop/TheIDE.desktop 

MSG="All done
  Have fun with U++ and TheIDE"

# add more if you want to here...  :-)
if ! kdialog -title "Done" -msgbox "$MSG"; then
  if ! xmessage -center "$MSG"; then
    if ! zenity --info icon-name=information --text="$MSG"; then
      $TERM -e dialog --msgbox "$MSG" 7 40
    fi
  fi
fi

fi


Run it as 'sh' create-desktop-icon.exec or make it executable so it will execute itself and be clickable as well.

If your 'theide' is in another location or the icon is not in ~/upp/uppsrc/ide, you will get a non-functioning icon which you can edit using the right-click (well, in linux you just never really know...) properties editor.

In fact you can probably use "create link to application" in the right-click context menu instead of doing this, but this is more fun and shows you how these icons are created and how they work. Smile

This is verging on being off-topic, but the application mentioned below has already been uploaded for other purposes and it is also useful for dealing with a problem with certain flavors of linux, especially newer ones.

If you can't click on executable scripts to run them, find "launch" in the Sound For Linux thread. Set your desktop environment preferences to "open with" and set it to simply "launch" after you have placed the utility in your ~/bin folder or some other place in your PATH.

Good luck.

-rs

Previous Topic: error: stray '@' in program
Next Topic: Assist++ for STL
Goto Forum:
  


Current Time: Fri Mar 29 13:07:00 CET 2024

Total time taken to generate the page: 0.01572 seconds