I have a Qt application that I want to deploy as a deb package. I have been reading so many sources, all slightly different - most of what I did follows this How To: preparing an application for submission to the Ubuntu Software Centre

My files are an executable MainProject, a few dependent libraries, Qt libraries and a number of other system libraries that I have to include for deploying on a different system with nothing installed. I created an sh file that sets the library path, then executes the program - so the sh file will have to be launched every time I guess.

I must create a folder structure in /usr/share/MyCompanyFolder/ and associate the executable with an icon. (The spaces and special characters in the path are an unfortunate requirement; the uppercase names also... the program was ported from windows).

/usr/share/My Company's Folder/MainProject/content

I created a package... and it seems to work, installs in the correct location, and surprisingly the program even works after that.

The Problem: The "MainProject.desktop" seems to have no effect - I was hoping to see a link looking like the ico file, placed on the launcher (maybe desktop ? why is it called .desktop ?)...




[Desktop Entry]
Exec=bash /usr/share/MyCompanyFolder/MainProject/MainProject.sh
Comment=MainProject is awesome.

Inside mainproject-1.0 I ran

dh_make --copyright gpl -f ../mainproject-1.0.tar.gz 

Select s, press enter... Then I modified the files in the debian folder created. Ran

dpkg-buildpackage -rfakeroot -my@email.com

Result: It works, creates installer, installer works...

  • The MainProject.desktop file is in /usr/share/applications (but it is a blank thing, with no icon)
  • The icon is added in /usr/share/icons/MyCompanyFolder - but... useless
  • There is nothing in the launcher or desktop
  • MainProject.desktop does launch the application.

What is missing ? From what I read, placing the *.desktop item in the applications folder would be enough to create a launcher item... And how does the icon get associated with it ?


I noticed that all icons used for shortcuts are png files not ico...

I created a png for my icon and it magically worked.

This fixed both the association with the launcher and the fact that the launcher did not work

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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