Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 trying to make a package for the Software Center, but so far the problem is that there seems to be no central place to store data for all users.

We need that to store license files that the application can later add if the users want to use the non-free parts of our software. Also we use this for storing document templates that some users edit and make them available for all users on the system.

Is there any solution for this kind of problems? From what I see on this page:

Write all configuration settings to ~/.<pkgName> (This can be one file or a directory containing multiple configuration files.)

EDIT: While talking to the Ubuntu staff it turns out there is no way you can have a central file storage for all users. At least not at the moment. I tried adding scripts to the debian source package that would create folders, but the staff looked at them and did not approve the version. At the moment we are saving the common files in the user .config folder.

share|improve this question

For licenses, you will want to use the license key mechanism built into Oneiric and the application submission portal.

I think you answered your own question as you want to store user space configuration settings to ~/.<somedir> or ~/.config/<somedir> - following the XDG standards would be suggested.

share|improve this answer
That's correct. To learn more about licences, check out – David Planella Oct 14 '11 at 7:21
I think this would be a valid approach if the app was sold from the Software Center. As far as I understand the this license storage mechanism that Ubuntu provides is utilized by it and the license is automatically installed. Our idea is a little different. As I wrote above the license can be added later and it is not sold by the Software Center. It is more of an upsell which is allowed by Ubuntu. – flipm0de Oct 17 '11 at 16:24

You could provide a full debian package instead of a zip for installation under /opt/.

During your .deb installation, you can create a folder /usr/lib/<appname>/templates and make it world writable, like putting a chmod o+w /usr/lib/<appname>/templates in your <appname>.postinst script.

share|improve this answer
As far as I understand I should be able to provide a source package which should be used to build a .deb. Also the package will be audited before approval and this behavior will be clear for the people doing the audit. The only thing that is not very clear is am I allowed to make a folder below /opt/<appname>/ with full access so I can write there? Writing outside /opt/<appname>/ is forbidden as I see in the guide I posted in the question... – flipm0de Oct 17 '11 at 16:31
You understood right. (It can be binary only, though) I just wanted to hint at the other possibility that gives you more control (the link you provided, item #5, box 'Advanced Users'). – aquaherd Oct 17 '11 at 16:48
So do you mean that there is no problem with the review process if I try to make a folder and allow full access during the install of the package? – flipm0de Oct 17 '11 at 18:27
I don't speak on behalf of Canonical on the matter but I would expect that the review process is mostly automated and the zip file won't retain the file mode bits and cause trouble during review, which in turn could be defensively bypassed by providing a debian package, but I might be wrong. Please contact canonical directly. – aquaherd Oct 18 '11 at 16:53
Thanks, I will try your solution and will write back if it worked. – flipm0de Oct 20 '11 at 18:30

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.