View previous topic :: View next topic |
Author |
Message |
cloc3 Advocate


Joined: 13 Jan 2004 Posts: 4817 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Sat Sep 16, 2017 2:12 pm Post subject: howto add xdg desktop file to an ebuild. |
|
|
I've write this working personal ebuild for OpenBoard, but I'm not able to add desktop files to it.
inside the source code, I find this code in ./release_scripts/linux/package.sh:
Code: |
xdg-desktop-menu install --novendor /usr/share/applications/${APPLICATION_CODE}.desktop
xdg-mime install --mode system /$APPLICATION_PATH/$APPLICATION_CODE/etc/openboard-ubz.xml
xdg-mime default /usr/share/applications/${APPLICATION_CODE}.desktop application/ubz
|
where should I add these instructions in my ebuild?
is there a way to apply some eclass resource to make all the work? _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3686
|
Posted: Sat Sep 16, 2017 2:25 pm Post subject: |
|
|
Search for make_desktop_entry in
And for a misplaced one, see this commit. |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31603 Location: here
|
Posted: Sat Sep 16, 2017 2:33 pm Post subject: |
|
|
Desktop file already exists in package? if yes you can just move the file in correct path _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
cloc3 Advocate


Joined: 13 Jan 2004 Posts: 4817 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Mon Sep 18, 2017 4:41 am Post subject: |
|
|
thank you.
at the end I solved to use make_desktop_entry to make the desktop file (it doesn't exist in the original package) and xdg.eclass to update mime database.
I'm not find a way to emulate the command xdg-mime default /usr/share/applications/${APPLICATION_CODE}.desktop application/ubz (suggested in the source code for the ubuntu package).
I think it should be needed to pair the application/ubz mime type to the new desktop file.
however, from man:
man xdg-mime wrote: | The default option is for use inside a desktop session only. It is not recommended to use xdg-mime default as root.
|
indeed, using strace, you can observe that the xdg-mime default command opens the /root/.config/mimeapps.list, which is unuseful to perfrom any action at system level and does not touch anything in /usr/share/mime/.
is there a way to set a particular desktop file as default for some mimetype on the whole system? _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3686
|
Posted: Mon Sep 18, 2017 5:32 am Post subject: |
|
|
cloc3 wrote: | I'm not find a way to emulate the command xdg-mime default /usr/share/applications/${APPLICATION_CODE}.desktop application/ubz (suggested in the source code for the ubuntu package). |
You might want to compare with the example in https://wiki.gentoo.org/wiki/Firefox#XDG_integration. See the difference? |
|
Back to top |
|
 |
cloc3 Advocate


Joined: 13 Jan 2004 Posts: 4817 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Mon Sep 18, 2017 11:40 am Post subject: |
|
|
charles17 wrote: | cloc3 wrote: | I'm not find a way to emulate the command xdg-mime default /usr/share/applications/${APPLICATION_CODE}.desktop application/ubz (suggested in the source code for the ubuntu package). |
You might want to compare with the example in https://wiki.gentoo.org/wiki/Firefox#XDG_integration. See the difference? |
yes.
but the command in the wiki is sent by user.
I want to set the same think in the ebuild for all users in my system.
in my opinion (based on man), xdg-mime cannot be used in such a way. _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
 |
ttrindade n00b

Joined: 26 Dec 2009 Posts: 16 Location: Brazil
|
Posted: Wed Oct 23, 2019 3:11 am Post subject: |
|
|
Hello cloc3,
I want more informatation of OpenBoard.ebuild, do you updated it? A am trying to run a version 1.5, but a I had several issues with qt, for example, QtWebKit does not is in the package dependecy of your ebuild. I started to build a qt enviorment for OpenBoard 1.5, if you alreay had a ebuild for this version, can you upgrade it on github?
thank you, and sorry by my bad english. |
|
Back to top |
|
 |
|