Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to Ubuntu development. As a learning experience, I have written a custom chat application using qt4 and I want to deploy it in some sort of setup file. Whats the easiest way of deploying an application viz a viz

  • setting desktop icons.
  • automatically requesting for administrator privileges to execute.
  • inserting an entry into the startup menu.
  • automatically compress my application and reduce download size.
  • automatic startup for my application without user intervention

I am familiar with using NSIS scripts on Windows, but I don't know where to begin on Ubuntu. I would preffer a solution similar to NSIS scripts.

share|improve this question
up vote 6 down vote accepted

You should create a .deb package and you could also upload your application to a PPA. Use one of the packaging guides to help you - the QT one should be particularly useful. Also, see this tutorial on Ubuntu Forums.

It would be a good idea to create a Launchpad account so that you can create a PPA and also a project page where you can upload your .deb file and source code archive. If you use bzr install bzr for version control (which I recommend), you can use Launchpad to manage your code. Launchpad has many other features such as bug management. See: How to start a new project and host it at

As for your specific points:

  • setting desktop icons

Don't. It is bad practice for applications to automatically create icons on the user's desktop. You should, however, create a menu entry for your application so that users can run it from the Applications menu and optionally create a desktop shortcut for it. To do this, you need to write a .desktop file and in your debian/rules file under the binary-indep section, copy it to /usr/share/applications (in debian/tmp).

  • automatically requesting for administrator privileges to execute

I hope you mean for the setup file - a chat app has no reason to run as administrator. The .deb file will do this for you - it will open in Ubuntu Software Centre, which will require a password.

  • inserting an entry into the startup menu

I don't know what this means. What is the startup menu? If you mean the Applications menu, see 'setting desktop icons'.

  • automatically compress my application and reduce download size

This is done automatically when you create the .deb package - .deb packages are compressed.

  • automatic startup for my application without user intervention

I don't know if this is possible but you shouldn't do it anyway. It should be up to the user which applications they want to autostart. This is set through the Startup Applications preferences window.

Once you have managed to create a .deb package and uploaded to a PPA, you should consider trying to get your application into the official Ubuntu repositories. Be prepared for a steep learning curve - debian packaging is hard to understand at first, but if you persevere, you will get it eventually.

share|improve this answer
By entry in the startup menu, I believe he wants his application to execute at log in. Just like how Live Messenger starts up automatically by default whenever you boot up Windows. – Oxwivi Feb 19 '11 at 11:02
Your student in the Ubuntu Forums thread you linked created this: tutorial How about you modify it to make it a general guide rather only for Qt apps? – Oxwivi Feb 19 '11 at 11:14
There is a general guide here: – dv3500ea Feb 19 '11 at 11:30

You might want to check the Ubuntu App Developer site, which explains how you can develop an application from creation to distribution, and provides additional resources to help you along the way.

share|improve this answer

Your Answer


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.