Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have written two Perl/Gtk programs. When launched from the dash menu, they run just fine.

However, if I try to launch them from terminal using the very same command found in their .desktop files, their Unity launcher will be blurry and will remain inactive when clicked, if I keep it in the Unity bar.

The problem is solved if the Exec part of the desktop file is replaced with

perl path_to_script

However, that leads to other problems, including a lintian warning and forcing all Perl GUI applications running from terminal to adopt the same launcher.

This issue is quite annoying since one of the programs relies on a different (Python) program in order to be launched and this results in having a blurry and inactive launcher.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I found out what was wrong. I had to enter the correct StartupWMClass at the .desktop file.

For those who are struggling with it, launch the application from terminal and execute in a different terminal the command

xprop | grep WM_CLASS

Click on your application and the output of the previous command will be

WM_CLASS(STRING) = "result"

Add to the .desktop file the following line:

StartupWMClass=result

Substitute result with your output.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.