Modding, Mission Design, and Coding > FS2 Open Tools

Ubuntu Desktop Shortcut To Launch Knossos (Supports HiDPi too)


This is a quick guide on how to setup a desktop shortcut on the Ubuntu desktop to launch Knossos rather than having to type in the command in terminal.  I'm using 20.04 but this will probably work on older versions as well.  This can be modified to suit your own distro and/or location of Knossos source files.

First create two files using a text editor:
- x.desktop

where x and y are names of your choosing.  It will be safer just to use a continuous word, unless you're a linux expert and can deal with those spaced names.  For example, I named my files 'Knossos.desktop' and ''.  I will be referring to those files as x.desktop and throughout this guide.  So please make the appropriate name changes for the rest of the guide according to what names you have chosen for those files.   Move the x.desktop file to the Desktop folder under the user (home/user/Desktop).  Move the file to the knossos parent folder.

Open x.desktop in a text editor and enter the following data (copy and paste if you like):

--- Code: ---[Desktop Entry]
Comment=Runs Knossos
Path=/path/to/parent folder
--- End code ---

Name is the text that will show up under the icon after you allow Launching, which I will show you how later.  Exec is the path to the file you created. Icon is the path to the icon (I chose the hlp.png file under the data folder, which is under the knossos parent folder).  Path is the path to the knossos parent folder.  The rest of the options you can leave as is.  Don't forget to save your changes  ;)

Let's edit the file by opening it in a text editor.  Just paste ONE of the following commands inside of it:

--- Code: ---python3 -m knossos
QT_AUTO_SCREEN_SCALE_FACTOR=1 python3 -m knossos
--- End code ---

Use the first command if you have no scaling issues with the GUI.  Use the 2nd command if you have a HiDPi screen, like myself, and/or have scaling issues.  Save your changes  :)

Now for the final step, which may differ amongst distros.  So I cannot say if this works for them; I have only tested this on Ubuntu 20.04.  Go to your physical desktop (physical, AR?, projected particle display?  :confused:), right-click the x.desktop file you just created and click on 'Allow Launching'.  This should make the text below the icon change from x.desktop to the name you chose in the file itself.  It should also change the icon to the path you chose in said file.  If you don't see an icon or something weird, then recheck the path.

Now go ahead and test it by double-clicking on the icon.  It should load Knossos without relying on the terminal.  :yes:


[0] Message Index

Go to full version