I am setting up a PC running Ubuntu 20.04.3 with a touchscreen and no keyboard/mouse. Due to this, I am putting desktop icons that will run the software needed for data taking/analysis. I was able to set one up with no problem first using a .sh file that executes with a single click, then by using a .desktop file.
The problem I am having is that this will not work with a python3 file that runs tkinter and ROOT. I started off by writing the shebang #!/usr/bin/env python3
at the beginning of the .py file and the .sh file that executes the python file. When I click on the .sh file, nothing happens. If I run the .sh file on the terminal by typing ./Bash_File.sh
, it executes with no issues. Also, I did make the .py executable, so I can also run it by going to the directory and typing ./Python_File.py
.
I then decided to try with a .desktop file, similar to the first program I got to work. I tried executing both, the .sh file and the .py file, from the .desktop file and I get the same error: ModuleNotFoundError: No Module named 'ROOT'
. In the .desktop file, I execute the .py file using Exec=/filepath/Python_File.py
. Again, I am able to run this file through the terminal, but not having any luck using the icons to run it. I've looked everywhere online for an answer, but no luck. Thanks for the help