Launching GC in Linux

Hello All,

I am installing GC for the first time and I believe that I have successfully installed it on my Linux Mint (Mate) box, I can launch it in the terminal by issuing the “python main.py” command. Should there be an Icon on Desktop or in GroundControl-master folder which can be double clicked to launch GC? Also is it possible to add it to the applications menu under the Applications menu?

Thanks

1 Like

@Kelvin

Awesome you are flying on good ol’Mint. Good news! You absolutely can make an Icon to launch with and add it to a menu. Bad news it isn’t in anyway automated. If you look around you can find out how to add an icon to the desktop you are using. Then you need to build the command to launch form it in the properties of the icon. Google is you friend mostly on this. The same is true for a menu. I’ve not personally worked with mint but often there are several choices of desktops and menu systems in them. Many have specific steps.

Let me know if you need more direction on this.

Thank you

Thanks Bee, that is great. I mainly wanted to make sure I wasn’t missing something obvious (it happen more than I care to admit). I will google it and post my solution.

1 Like

I’ve done something similar but my google last night came up saying things change greatly between versions of the Ubuntu your using.

Thank you

A rightclick on the desktop should give you the option to create a new launcher.
My launcher has (start-GC.deskop) opened in a text editor looks like this:
[Desktop Entry]
Type=Application
Terminal=true
Name=Maslow GC
Exec=python /home/whoareyou4/Maslow/GroundControl-master097/main.py
Path=/home/whoareyou4/Maslow/GroundControl-master097
Icon=firefox

Still need to fix the icon though…

3 Likes

Hello,

I was not able to get the Launcher option to work but was able to create a text file (script?) that works.

The launcher gave me the following options…
Type:
Application
Application in Terminal
Location
Name:
Command: (with Browse Button)
Comment:

I tried…
Type: Both Application & Application in Terminal
Command:
/home/maslow/GroundControl-master/main.py
python /home/maslow/GroundControl-master/main.py

I goth the same error on both
Details: Failed to execute child process “xterm” (No such file or directory)

I gave up, but am still interested if anyone has suggestions.


I then created a text file on the desktop with…

#!/bin/bash
cd /home/maslow/GroundControl-master
python main.py

This worked great. Added a the Maslow M-Dot for the icon and I am set.

4 Likes

Good you found a solution.
I’m running Ubuntu-Mate 17.10
When I click my launcher, a small terminal opens with a symbol of an X over a T, that must be the xterm I guess.
I found this, but did not really get what the solution was. To install gnome terminal?

Edit: Just noticed the post is 4 years old :flushed:

In Ubuntu 17.10 I followed these instructions checked as best answer.

My .desktop file

[Desktop Entry]
Comment=MaslowCNC
Terminal=true
Name=GroundControl
Exec=python /home/jamtek/GroundControl/main.py
Type=Application
Icon=/home/jamtek/GroundControl/48x48maslow.png

I stole, I mean borrowed the Maslow logo by right clicking the logo on the top right corner of this web page and doing a save as. Opened in gimp and selected image/scale image and then changed size to 48 x 48 pixels saved it to the Ground Control folder.

48x48maslow

3 Likes

I just installed gnome terminal and the launcher I created earlier worked. From what I can gather the terminal needs a xterm wrapper to successfully complete the command from the launcher and Mate Terminal does not have one or one is not defined/assigned. Further down the post it links to a bug report and at the end it list it has fixed in Mate Feb-2018. All this is a bit over my head but I am going to update my install (Linux Mint 18.2 Sonya) since I am not sure how how old my install cd is.

Also does anyone have opinions on which solution, Launcher vs Script would be the best?

1 Like

So I updated my system to Linux Mint Mate 18.3 and the Launcher option still does not work.

I installed gnome-terminal and created a launcher and it worked, below is the command used

python /home/maslow/GroundControl-master/main.py

Now both methods work.

3 Likes

Hi Kelvin, please help me with this. I have the same problem on my linux mint, the launcher for ground control doesn’t work. i haven’t been able to get it working, despite a fresh installation of mint.

I have read your solution, but on a first search i found this article which does not recomend the instalation of gnome on mint. https://community.linuxmint.com/tutorial/view/1829

Yet I just don’t completely understand what you are saying, since I have never used gnome. Are you referring to install just the terminal, instead of the hole gnome? if so,how can this be done? after checking the article, would you still recommend this?

Further more here’s a screen shot of the error the terminal comes up with ( ImportError: No module named PIL)

Any advice on this matter, I will really appreciate

Perhaps install PIL (Pillow) the Python Imaging Library

how you do this?
I have tried : sudo apt-get install pil
and also: sudo apt-get install pillow

I have found a couple of topics about this error in stackoverflow, but they are related to python, and don’t mention ground control at all. Some of them suggest to instal PIL, other says PIL is deprecated, and now you have to use Pillow. After trying to install both of them trough the terminal (sudo apt-get install pil (or pillow on the second try)) the answer is : Unable to locate package Pil. So I am guessing pil or pillow are components from the python language rather than installable linux packages.

a google search for linux mint PIL.py gets me to
https://community.linuxmint.com/software/view/python-pil

apparently the filename is python-pil

give that a try (I haven’t used mint, so I could be wrong)

David Lang

From within the GC directory, this should install all the required files:

pip install -r requirements_linux.txt

I think that will take care of installing PIL as well.

personally, I prefer to install the OS packages instead of using PIP, it’s more
maintainable over time (one upgrade process rather than one for the OS files and
a different one for PIP installed software)

David Lang

syntax you mention shows this error: “comand “pip” not found but can be installed with: sudo apt install python-pip”

This last one apparently works, but theres no change on the GC launcher still doesn’t work.

It tries to install but shows this error:

could not resolve “archive.ubuntu.com
failed to fetch (long web address to archive.ubuntu.com)…

If I understand, ‘pip’ wasn’t installed, but you’ve corrected that by running ‘sudo apt install python-pip’. That should make pip available for the line I suggested. If not, you could try

sudo pip install -r requirements_linux.txt

@dlang, using the install file in the GC release assures that the versions installed will be compatible.

sorry…none of the syntax work… in the first one, the suggestion about how to install pip appears again…
in the last one shows (sudo: pip: command not found)