0

I made myself a culture and understood the basics to build a DEB package of my project. What is not clear to me (and which until now in the guides that I have followed has never been specified to me) is the conventional place where additional files, that my application requires for proper operation, should be placed. Let me explain. In my project folder, I have a Makefile that does its own duty to compile the code and pulls out the executable. When I run the application, it reads and writes from some files that are in a "data" folder in the root of the project folder. At the moment I am able to build the DEB package by positioning the "data" folder inside "/usr" with the necessary consequence of having to change the owner of this folder to be able to run the application without root privileges. So ultimately, I was wondering what was the most appropriate approach to deal with this situation, possibly avoiding having to change the owner of the folder and be able to launch the application as a normal user.

1 Answer 1

0

If the data are something you only need to read, you should place them under /usr/share/package_name/, per the Debian Policy Manual (Ubuntu uses similar document, IMHO the same one), which refers to the Filesystem Hierarchy Standard. That would be appropriate for images, help files, 3d models, UI definitions etc.

For things you need to write to, ideal place would be ~/.your_package. That would be for caches, user settings, sometimes even user data.

1
  • Yes, it makes sense, thank you for the reply !!! May 2, 2020 at 6:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .