Create a App Launcher and Desktop Shortcut for FreeCAD AppImage on Linux

An AppImage is a portable compressed linux application file which is mounted at the point of execution. It's main aims is to allow the application to be deployed in a simple self contained way. Allowing compatibility across the many linux distros, it requires no installation or root permission. The underlying operating system is left untouched though configuration settings and target folders can reside outside the distribution. Appimages allow for the FreeCAD ecosystem to be more flexibile. A designer can download the latest development version without worrying about installing and destroying an installed stable version. Different versions and development paths of FreeCAD can be trialed (i.e. Link stage 3) and FreeCAD can always be kept on a USB stick, ready at hand for use on any linux distro.

If you are using a Linux based system such as Ubuntu then you probably are using the AppImage for FreeCAD. For ages I was locating the downloaded AppImage in my downloads directory and double clicking it.  This takes time and I would rather launch this from the app launcher or from the desktop.

Steps to create the Application Launcher Entry

1. Download your Linux AppImage, we will assume this has been downloaded to the Downloads directory and rename to your desired name in this case FreeCAD.AppImage

2. Google a png or icon you want to use to execute the program and save it (we assume you have downloaded it to your Downloads directory).  This icon should be in icon or png format. If you cant find a png but other formats are available then use a paint package to convert to the correct format.  Rename the icon / image to the same name as the program.  In this case FreeCAD.png

3. Open up a terminal. 

4. Change directory to where you have downloaded your files and give the FreeCAD AppImage permissions to be executed:

    cd ~/Downloads

    sudo chmod u+x FreeCAD.AppImage


5. Move both files to a directory such as /opt.  We can keep the files in their current location but they may get lost.  It is far safer to place them somewhere safe.  In this case I have use the /opt directory:

    cd ~/Downloads/

    sudo mv FreeCAD.AppImage /opt/

    sudo mv FreeCAD.png /opt/


5. Create the Application Launcher and shortcut using nano or your favourite text editor:

    sudo nano /usr/share/applications/FreeCAD.desktop


6. Add the following lines to the text file:


    [Desktop Entry]

    Name=FreeCAD

    Exec=/opt/FreeCAD.AppImage

    Icon=/opt/FreeCAD.png

    comment=FreeCAD

    Type=Application

    Terminal=false

    Encoding=UTF-8

    Categories=Utility;


7. Save the file and exit.

You will now be able to start your AppImage directly from the Applications Launcher. 


Optional: Create a shortcut on your desktop

To launch the application from a desktop icon follow these steps:

1. Copy the .desktop script to your desktop

    sudo cp -r /usr/share/applications/FreeCAD.desktop ~/Desktop/


2. Change the owner of the desktop shortcut to your current user you have logged in as (the user in your terminal prompt on each line waiting for a input, i.e youruser@yourcomputername:)

    sudo chown youruser ~/Desktop/FreeCAD.desktop


3 Update the new desktop shortcut permission to "allow this file to run as a program". 

    sudo chmod u+x ~/Desktop/FreeCAD.desktop


 

 

Comments

Popular posts from this blog

Reference Images For Beginners FreeCAD: Exercise 5.1 & 5.2

Beginner FreeCAD Tutorial 14: Reference Document for Exercise 1

FreeCAD For Beginners: CAD Thinking Part 1