Discussion:
[Nix-dev] configuring xdg-open
Mathijs Kwik
2013-10-04 13:39:34 UTC
Permalink
Hi all,

I'm running a custom i3 desktop setup with some kde base apps.
When I click a pdf file in dolpin, kde correctly launches okular to
view the file.
However, using xdg-open to open the file leads to my web browser
(conkeror) trying to download the file.

I googled a bit on xdg-open and it seems I need to add some
configuration files to ~/.local/share to configure default
applications per mimetype.
However this did not work. Looking at my environment, it seems XDG_*
variables only point to system-wide or nix-controlled locations.

Is this by design? How should I configure this correctly?
PS: I'm using the new zsh stuff, which might be related.

Have a nice weekend,
Mathijs
p***@yandex.ru
2013-10-05 11:19:08 UTC
Permalink
Post by Mathijs Kwik
Hi all,
I'm running a custom i3 desktop setup with some kde base apps.
When I click a pdf file in dolpin, kde correctly launches okular to
view the file.
However, using xdg-open to open the file leads to my web browser
(conkeror) trying to download the file.
I googled a bit on xdg-open and it seems I need to add some
configuration files to ~/.local/share to configure default
applications per mimetype.
However this did not work. Looking at my environment, it seems XDG_*
variables only point to system-wide or nix-controlled locations.
Is this by design? How should I configure this correctly?
PS: I'm using the new zsh stuff, which might be related.
from http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html :

"$XDG_CONFIG_HOME defines the base directory relative to which user specific
configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a
default equal to $HOME/.config should be used. "

"$XDG_CONFIG_DIRS defines the preference-ordered set of base directories to search for
configuration files in addition to the $XDG_CONFIG_HOME base directory. The directories in
$XDG_CONFIG_DIRS should be seperated with a colon ':'. "

and the same for XDG_DATA*

Thus nixos setup seems to be just fine and xdg is actually used by many packages such as
kde.
Post by Mathijs Kwik
Have a nice weekend,
Mathijs
_______________________________________________
nix-dev mailing list
http://lists.science.uu.nl/mailman/listinfo/nix-dev
Mathijs Kwik
2013-10-05 13:20:17 UTC
Permalink
it works now.

"okular.desktop" is called "kde4/okular.desktop" in nixos.
So the files and locations were right, but nothing happened because
this desktop entry wasn't found in any of the dirs.
Post by p***@yandex.ru
Post by Mathijs Kwik
Hi all,
I'm running a custom i3 desktop setup with some kde base apps.
When I click a pdf file in dolpin, kde correctly launches okular to
view the file.
However, using xdg-open to open the file leads to my web browser
(conkeror) trying to download the file.
I googled a bit on xdg-open and it seems I need to add some
configuration files to ~/.local/share to configure default
applications per mimetype.
However this did not work. Looking at my environment, it seems XDG_*
variables only point to system-wide or nix-controlled locations.
Is this by design? How should I configure this correctly?
PS: I'm using the new zsh stuff, which might be related.
"$XDG_CONFIG_HOME defines the base directory relative to which user specific
configuration files should be stored. If $XDG_CONFIG_HOME is either not set
or empty, a default equal to $HOME/.config should be used. "
"$XDG_CONFIG_DIRS defines the preference-ordered set of base directories to
search for configuration files in addition to the $XDG_CONFIG_HOME base
directory. The directories in $XDG_CONFIG_DIRS should be seperated with a
colon ':'. "
and the same for XDG_DATA*
Thus nixos setup seems to be just fine and xdg is actually used by many
packages such as kde.
Post by Mathijs Kwik
Have a nice weekend,
Mathijs
_______________________________________________
nix-dev mailing list
http://lists.science.uu.nl/mailman/listinfo/nix-dev
_______________________________________________
nix-dev mailing list
http://lists.science.uu.nl/mailman/listinfo/nix-dev
Loading...