Install .desktop file with

0 votes
I have a python application that is supposed to be launchable via GUI so it has to have a .desktop file in /usr/share/applications/. The application only supports Linux. Normally, pip installs all files in one directory but it is possible to specify other locations (e.g. the .desktop file) in the using data_files=[].

Is this a good solution in this case or is this something that should only happen in a distribution specific package (like .rpm/.deb/.ebuild)? Can anyone help me with this?
Jun 27, 2019 in Python by ana1504.k
• 7,890 points

1 answer to this question.

0 votes
This looks like a good approach but perhaps instead of placing the .desktop file in the system wide /usr/share/applications/ folder, you could place the file in the users applications folder at ~/.local/share/applications.

This would also not require elevated permissions to access the root owned /user directory and it's sub-directories.
answered Jun 27, 2019 by SDeb
• 13,250 points

Related Questions In Python

0 votes
1 answer

Command "python egg_info" failed with error code 1 in C:\Users\Nadeem\AppData\Local\Temp\

Hi@akhtar, I think you are using previous version ...READ MORE

answered May 4 in Python by MD
• 40,740 points
0 votes
1 answer

How to Install Python packages from local file system folder to virtualenv with pip?

Hello @kartik, You can try the code below: pip ...READ MORE

answered May 11 in Python by Niroj
• 41,680 points
0 votes
1 answer

Python Setup file tells you that the module or the ...READ MORE

answered May 14, 2018 in Python by Nietzsche's daemon
• 4,260 points
0 votes
1 answer
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,172 views
0 votes
11 answers
0 votes
2 answers

In Python, how do I read a file line-by-line into a list?

readline function help to  read line in ...READ MORE

answered Jun 21 in Python by sahil
• 540 points