Duncaen / OpenDoas

A portable fork of the OpenBSD `doas` command
Other
610 stars 35 forks source link

doas thunar failing #49

Closed chromer030 closed 3 years ago

chromer030 commented 3 years ago

Hi , Thunar (and all other components of xfce desktop ) cant be run with doas , running with sudo is OK. Arch Linux , Kernel 5.10.11 , XFCE 4.16 , opendoas 6.8.1

/etc/doas.conf :

permit persist :wheel

Error log :

$ doas thunar
Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused

(thunar:6902): Gtk-WARNING **: 18:03:16.326: cannot open display: :0.0
$ _
$ doas xfce4-terminal    
Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused

(xfce4-terminal:7674): Gtk-WARNING **: 18:09:50.338: cannot open display: :0.0
$ _

(I'm not sure if this is fault of XFCE or Doas.)

Duncaen commented 3 years ago

First off I don't think its a good idea to run thunar or any graphical tool as root.

(I'm not sure if this is fault of XFCE or Doas.)

Yours, you need to configure the rule to allow to pass through environment variables like DISPLAY and XAUTHORITY using the setenv option.