Friday, April 26, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 5009  / 2 Years ago, sun, june 5, 2022, 4:32:22

I build a package from my own source using dh_make and dpkg-buildpackage. The install-file in /debian specifies the destinations for the project files. To make the installed program work, they need to be executable / have execution permissions with chmod. In particular it is about a python script and a .desktop-file.



How do I set those permissions in setup? By only copying them to their destinations it is not done. It would be ok for me if I could trigger a command at the end of setup, or something like this, but don't know how to include this.


More From » python

 Answers
1

The .desktop file doesn't need execution permissions, your .py script does.



braiam@bt:~$ ls -l /usr/share/app-install/desktop/deluge.desktop 
-rw-r--r--. 1 root root 1276 Aug 6 2012 /usr/share/app-install/desktop/deluge.desktop
braiam@bt:~$ ls -l /usr/bin/deluge
-rwxr-xr-x 1 root root 289 Jan 27 2013 /usr/bin/deluge


You should before packaging have set the executable bit on the python script, that dpkg will take care of the rest.



The .desktop file is a configuration file read by xdg, and has it own variables set to execute the needed binary:



cat /usr/share/app-install/desktop/deluge.desktop
[...]
GenericName=BitTorrent Client
X-GNOME-FullName=Deluge BitTorrent Client
Comment=Download and share files over BitTorrent
Exec=deluge-gtk %U
Icon=deluge
Terminal=false
Type=Application
Categories=Network;FileTransfer;P2P;GTK
StartupNotify=true
MimeType=application/x-bittorrent;x-scheme-handler/magnet;


As you wan see it has a Exec variable that takes care of the execution when the file is accessed.


[#29361] Monday, June 6, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
asketbridiculou

Total Points: 168
Total Questions: 116
Total Answers: 115

Location: Antigua and Barbuda
Member since Sat, Jan 28, 2023
1 Year ago
;