1. Run update-desktop-database ~/.local/share/applications after you did the edit.
2. Add NoDisplay=true, and it won't be shown in applications menu.
"Scripts" option with right click
Re: "Scripts" option with right click
Sorry for raising old topic, but user scripts are still not implemented, so need to use this way.
I'm trying to create a context menu "Send email", using *.desktop file.
But have a trouble, what default Mimetype i have to use for all files (mean that associate desktop with every file)?
I'm trying to create a context menu "Send email", using *.desktop file.
But have a trouble, what default Mimetype i have to use for all files (mean that associate desktop with every file)?
Re: "Scripts" option with right click
in folder ~/.local/share/applications create your .desktop file, in my case i created two desktop files "test.desktop" and "test2.desktop". runRoland wrote:Sorry for raising old topic, but user scripts are still not implemented, so need to use this way.
I'm trying to create a context menu "Send email", using *.desktop file.
But have a trouble, what default Mimetype i have to use for all files (mean that associate desktop with every file)?
Code: Select all
cp ~/.local/share/applications/mimeapps.list ~/.local/share/applications/mimeapps.list_backup
cat /etc/mime.types |sed 's/\(.*\)\t.*/\1/g'|sed 's/\t//g'| tr "\\n"";"|sed 's/;/=test.desktop;test2.desktop\n/g'>>~/.local/share/applications/mimeapps.list'
P.S. 1. afaik /etc/mime.types is created with tool "mime-types", maybe in other distros there is no such file, but in archlinux there is:)
2. my /etc/mime.types file had comments, so before executing script i manually removed these comments.
3. personally I needed context menu button for all files and only for images, so run script like above and then executed another:
Code: Select all
sed -i 's/\(image\/.*\)/\1test3_only_for_images.desktop;/g' ~/.local/share/applicatons/mimeapps.list
"Kvailam gimti ne sarmata. Tik mirti kvailam gėda." E. M. Remarkas
"Родиться глупым не стыдно, стыдно только умирать глупцом." Э. М. Ремарк
"To born stupid is not shame, just to die stupid is shameful." E. M. Remarque
"Родиться глупым не стыдно, стыдно только умирать глупцом." Э. М. Ремарк
"To born stupid is not shame, just to die stupid is shameful." E. M. Remarque