Samba: Difference between revisions
imported>Jchv More improvements to documentation around PCManFM. |
imported>Symphorien the section about PCManFM is true for nautilus and thunar |
||
| Line 30: | Line 30: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Browsing samba shares with | == Browsing samba shares with GVFS == | ||
Many GTK-based file managers like Nautilus, Thunar, and PCManFM can browse samba shares thanks to GVFS. | |||
GVFS is a dbus daemon which must be running for this to work. | |||
If you use Gnome, you have nothing to do as the module already enables it for you, but in less full-featured desktop environments, some further configuration options are needed. | |||
The generic way of enabling GVFS is to add this in <code>/etc/nixos/configuration.nix</code>: | |||
<syntaxhighlight lang="nix"> | |||
services.gvfs.enable = true; | |||
</syntaxhighlight> | |||
There are however some special cases. | |||
===== XFCE ===== | |||
[[Xfce]] comes with a slimmed-down version of GVFS by default which comes with samba support compiled out. To have smb:// support in Thunar, we will use GNOME's full-featured version of GVFS: | |||
<syntaxhighlight lang="nix"> | |||
services.gvfs = { | |||
enable = true; | |||
package = lib.mkForce pkgs.gnome3.gvfs; | |||
}; | |||
</syntaxhighlight> | |||
===== No desktop environment ===== | |||
GVFS relies on polkit to gain privileges for some operations. Polkit needs an authentication agent to ask for credentials. | |||
Desktop environments usually provide one but if you have no desktop environment, you may have to install one yourself: | |||
Excerpt of <code>/etc/nixos/configuration.nix</code>: | Excerpt of <code>/etc/nixos/configuration.nix</code>: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
environment.systemPackages = with pkgs; [ lxqt.lxqt-policykit ]; # provides a default authentification client for policykit | environment.systemPackages = with pkgs; [ lxqt.lxqt-policykit ]; # provides a default authentification client for policykit | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===== DBUS ===== | |||
Furthermore, if you happen to start your Window Manager directly, via <code>.xinitrc</code>, or directly invoke a Wayland compositor such as Sway, you should ensure that you launch dbus at startup in your session and export its environment. If you do not have a dbus session in your environment, you will see errors such as "Operation not supported" when attempting to browse the network. | Furthermore, if you happen to start your Window Manager directly, via <code>.xinitrc</code>, or directly invoke a Wayland compositor such as Sway, you should ensure that you launch dbus at startup in your session and export its environment. If you do not have a dbus session in your environment, you will see errors such as "Operation not supported" when attempting to browse the network. | ||