IDEs QT Creator - Desktop Entry Troubles
Ok ROS Team, you very efficient at solving my problems last time, but this one is a real brain bender:
I have successfully integrated to ROS C++ libraries into my QT environment, and I am able to call ROS functions from within my programs, and they execute properly.
In order to run my resulting programs in QT, I either need to:
- Run them from a terminal
- Modify my QT .desktop [desktop entry] file
I followed the instructions for (2) from the ROS IDE page here: http://wiki.ros.org/IDEs#QtCreator
--> Essentially I added the terms "bash -i -c", to the exec line for my .desktop entry.
Here is where it gets weird:
My QT Creator will launch properly and run my ROS applications ONLY ONCE per boot. So If I launch QT Creator after a restart everything works correctly, but if I close it and relaunch it, bash hangs and never launches the app!
Further, I have created a .desktop entry for my resulting QT application and it has an even stranger behavior:
-- If place my .desktop entry on the desktop (or many other tested locations such as /usr/share/applications), it behaves the same as QT creator. It launches only once.
-- If I place my .desktop file on my home directory it works correctly!
Since catkin_ws is on my home path, I suspect it has something to do with my terminal trying to find source files in catkin_ws, but I am at a loss for how to resolve this using the .desktop file.
Specifics:
ROS Melodic installed on /opt/ros/melodic/
I have 2 systems, both running Ubuntu 18.04 LTS.
Both have QT Creator QT 5.12.1.
My catkin_ws path is /home/<user>/catkin_ws
in /home/<user>/ is my .bashrc, which has been modified to include the ros and catkin sources as listed in the tutorial.
Finally, my code:
[Desktop Entry]
Type=Application
Exec=bash -i -c /opt/Qt5.12.1/Tools/QtCreator/bin/qtreator**
Name=Qt Creator (Enterprise)
GenericName=The IDE of Choice for Qt developmen
Icon=QtProject-qtcreator
SytartupWMClass=qtcreator
Terminal=false
Categories=Development;IDE;Qt;
MimeType=text/x-c++src;text/x-c++hdr;text/....
I suspect the Exec line is the source of the trouble, the remaining entry was unchanged from the original QT .desktop entry file.
Does anyone know how to modify my .desktop exec line so that the resulting terminal application launched from my home directory (or with visibility to it)? Or is there some alternative way that you have solved this problem?
Thanks in advance!