How to properly and easily configure `xdg-open` without any environment?
I'm making use of OpenBox window supervisor with no desktop computer setting .
xdg-open acts oddly. It opens up every little thing with
$ xdg-settings --list Known properties: default-web-browser Default web browser
I'm seeking a straightforward program ; something like reviewing every
*.desktop documents in
/usr/share/applications/ folder and also instantly establishing xdg setups.
You could use something like this to generate the appropriate
xdg-mime commands for each of your
.desktop files and the mimetypes they contain, then execute the ones you like. Note
/usr/share/applications might have subdirectories.
find /usr/share/applications ~/.local/share/applications -iname '*.desktop' -print0 | while IFS= read -r -d $'\0' d; do for m in $(grep MimeType "$d" | cut -d= -f2 | tr ";" " "); do echo xdg-mime default "'$d'" "'$m'" done done
Why not to make use of energies from xdg itself?
To make Thunar the default documents - internet browser, i.e. the default application for opening up folders.
$ xdg-mime default Thunar.desktop inode/directory
to make use of xpdf as the default PDF viewer:
$ xdg-mime default xpdf.desktop application/pdf
This need to create an access
[Default Applications] application/pdf=xpdf.desktop
in your neighborhood MIME data source
Your PDF files need to be opened up with xpdf currently.
You can install and also make use of perl-file-mimeinfo in the
extra database to take care of mimetypes.
Instance to open all
/usr/bin/vendor_perl/mimeopen -d $file.pdf
or on various other Linux circulations where
mimeopen is NOT in
/usr/bin/vendor_perl/ yet remains in among the
$PATH directory sites:
mimeopen -d $file.pdf
and afterwards, at the punctual, enter the application: