Quantcast
Channel: Active questions tagged 22.04 - Ask Ubuntu
Viewing all articles
Browse latest Browse all 4421

.desktop file not launching on double click

$
0
0

I'm having trouble getting my .desktop application to launch with a double click. I've created a .desktop file that runs a .bash script, and I've given all necessary permissions to both the .desktop and .bash files. However, it doesn't work when I double click the .desktop file.

Ubuntu version : 22.04

Interestingly, if I use the following command, the application launches correctly:

gio launch ~/Desktop/gui_app.desktop

Here are the details of my files:

.bash file (/home/dragon/gui.bash):

#!/bin/bash# Source ROS 2 environmentsource /opt/ros/humble/setup.bash# Launch the first ROS 2 launch fileros2 run py_testing_pkg gui_original

.desktop file (~/Desktop/gui_app.desktop):

[Desktop Entry]Name=my_guiVersion=1.0Comment=Run my ROS2 NodeIcon=/home/dragon/Pictures/gui.pngExec=/home/dragon/gui.bashTerminal=falseType=ApplicationX-Desktop-File-Install-Version=0.26

I've ensured that both files are executable with chmod +x.

Does anyone have any idea why double-clicking the .desktop file doesn't launch the application, while using gio launch works perfectly?

Any help would be greatly appreciated!


Viewing all articles
Browse latest Browse all 4421

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>