[Solved] - Thunar settings as root never saved

Hi, there,

I have been using Garuda Xfce for almost a year and it is my favourite distribution. But there is one detail that bothers me. Thunar when run as root, does not keep my settings such as list view, icons, or compact. Every time I change directories, it always uses the icon view. It's very very annoying =- (

Do you have a solution or any leads? I haven't found anything on my side and I'm starting to run out of ideas.

=- /

 = = = rob, @Rob-LapTop, /work/rob → garuda-inxi
System:
  Kernel: 6.1.28-1-lts arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-lts
    root=UUID=313e4967-b79a-40cc-ab3d-a948b3246bc1 rw [email protected]
    quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    loglevel=3 ibt=off
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm
    v: 4.18.0 vt: 7 dm: LightDM v: 1.32.0 Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: Acer product: Nitro AN515-51 v: V1.22
    serial: <superuser required>
  Mobo: KBL model: Freed_KLS v: V1.22 serial: <superuser required>
    UEFI: Insyde v: 1.22 date: 03/15/2019
Battery:
  ID-1: BAT1 charge: 44.3 Wh (100.0%) condition: 44.3/48.9 Wh (90.4%)
    volts: 17.0 min: 15.2 model: LG 004B384234314341 type: Li-ion
    serial: <filter> status: full
  Device-1: hidpp_battery_0 model: Logitech Wireless Keyboard K270
    serial: <filter> charge: 100% (should be ignored) rechargeable: yes
    status: discharging
  Device-2: hidpp_battery_1 model: Logitech Wireless Mouse serial: <filter>
    charge: 55% (should be ignored) rechargeable: yes status: discharging
CPU:
  Info: model: Intel Core i5-7300HQ bits: 64 type: MCP arch: Kaby Lake
    gen: core 7 level: v3 note: check built: 2018 process: Intel 14nm family: 6
    model-id: 0x9E (158) stepping: 9 microcode: 0xF2
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB
    desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB
    desc: 1x6 MiB
  Speed (MHz): avg: 2075 high: 2500 min/max: 800/3500 scaling:
    driver: intel_pstate governor: powersave cores: 1: 800 2: 2500 3: 2500
    4: 2500 bogomips: 20004
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities: <filter>
Graphics:
  Device-1: Intel HD Graphics 630 vendor: Acer Incorporated ALI driver: i915
    v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20 ports:
    active: eDP-1 empty: none bus-ID: 00:02.0 chip-ID: 8086:591b
    class-ID: 0300
  Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile]
    vendor: Acer Incorporated ALI driver: nvidia v: 530.41.03
    alternate: nouveau,nvidia_drm non-free: 530.xx+
    status: current (as of 2023-05) arch: Pascal code: GP10x
    process: TSMC 16nm built: 2016-21 pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 3 speed: 8 GT/s bus-ID: 01:00.0 chip-ID: 10de:1c8d
    class-ID: 0300
  Device-3: Quanta HD Webcam driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-9:4 chip-ID: 0408:a060
    class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.1
    compositor: xfwm v: 4.18.0 driver: X: loaded: modesetting dri: iris
    gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: eDP-1 model: AU Optronics 0x61ed built: 2016 res: 1920x1080
    hz: 60 dpi: 142 gamma: 1.2 size: 344x193mm (13.54x7.6") diag: 394mm (15.5")
    ratio: 16:9 modes: 1920x1080
  API: OpenGL v: 4.6 Mesa 23.0.3 renderer: Mesa Intel HD Graphics 630 (KBL
    GT2) direct-render: Yes
Audio:
  Device-1: Intel CM238 HD Audio vendor: Acer Incorporated ALI
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:a171
    class-ID: 0403
  Device-2: NVIDIA GP107GL High Definition Audio
    vendor: Acer Incorporated ALI driver: snd_hda_intel v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 16 link-max: gen: 3 speed: 8 GT/s bus-ID: 01:00.1
    chip-ID: 10de:0fb9 class-ID: 0403
  API: ALSA v: k6.1.28-1-lts status: kernel-api tools: N/A
  Server-1: PipeWire v: 0.3.70 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter
    vendor: Lite-On driver: ath10k_pci v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 bus-ID: 02:00.0 chip-ID: 168c:003e class-ID: 0280 temp: 41.0 C
  IF: wlp2s0 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Acer Incorporated ALI driver: r8169 v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 03:00.1 chip-ID: 10ec:8168
    class-ID: 0200
  IF: enp3s0f1 state: down mac: <filter>
Bluetooth:
  Device-1: Lite-On driver: btusb v: 0.8 type: USB rev: 2.0 speed: 12 Mb/s
    lanes: 1 mode: 1.1 bus-ID: 1-7:3 chip-ID: 04ca:3016 class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 2 state: down
    bt-service: enabled,running rfk-block: hardware: no software: yes
    address: <filter>
Drives:
  Local Storage: total: 223.57 GiB used: 51.55 GiB (23.1%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/sda maj-min: 8:0 vendor: Crucial model: CT240BX500SSD1
    size: 223.57 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: R013 scheme: GPT
Partition:
  ID-1: / raw-size: 48.83 GiB size: 48.83 GiB (100.00%)
    used: 22.34 GiB (45.8%) fs: btrfs block-size: 4096 B dev: /dev/sda6
    maj-min: 8:6
  ID-2: /boot/efi raw-size: 1000 MiB size: 998 MiB (99.80%)
    used: 55 MiB (5.5%) fs: vfat block-size: 512 B dev: /dev/sda5 maj-min: 8:5
  ID-3: /home raw-size: 48.83 GiB size: 48.83 GiB (100.00%)
    used: 22.34 GiB (45.8%) fs: btrfs block-size: 4096 B dev: /dev/sda6
    maj-min: 8:6
  ID-4: /var/log raw-size: 48.83 GiB size: 48.83 GiB (100.00%)
    used: 22.34 GiB (45.8%) fs: btrfs block-size: 4096 B dev: /dev/sda6
    maj-min: 8:6
  ID-5: /var/tmp raw-size: 48.83 GiB size: 48.83 GiB (100.00%)
    used: 22.34 GiB (45.8%) fs: btrfs block-size: 4096 B dev: /dev/sda6
    maj-min: 8:6
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 7.65 GiB used: 1.5 MiB (0.0%) priority: 100
    dev: /dev/zram0
  ID-2: swap-2 type: partition size: 9.77 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/sda7 maj-min: 8:7
Sensors:
  System Temperatures: cpu: 40.0 C pch: 41.5 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 259 Uptime: 30m wakeups: 5 Memory: available: 7.65 GiB
  used: 3.49 GiB (45.6%) Init: systemd v: 253 default: graphical
  tool: systemctl Compilers: gcc: 13.1.1 Packages: pm: pacman pkgs: 1512
  libs: 413 tools: pamac,paru Shell: Zsh v: 5.9 running-in: xfce4-terminal
  inxi: 3.3.27
Garuda (2.6.16-1):
  System install date:     2023-05-13
  Last full system update: 2023-05-17 ↻
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut nvidia-dkms
  Windows dual boot:       Probably (Run as root to verify)
  Failed units:            

Welcome :slight_smile:

To make it easier to help, it would be nice if you could share what you have done.

Nothing is more frustrating than hearing, I've already tried that, and that too, that anyway, and that of course as the very first thing.

Manual, Thunar forum, github issue?

2 Likes

Hi SGS,

Yes, sorry. I did some web searches via search engines (including forums of other distros...etc.). This led me to look at policekit, gvfs, dbus, sudo/sudoers, pkexec, environment variables.

I also tested on other distros (long time linux user, the first distro I managed to install and use was a mandrake. xD before discovering Xfce with a Xubuntu 6. Since then I have hardly used any other DE. but i had use many diiferent distros, from most basics to most exotics), compare the configuration files with those that don't have this problem and those that do. There is nothing that jumped out at me. After that, it's not that I need thunar as root but quite often I have to navigate through a multitude of backups to juggle a multitude of files. I love the command line, I use it in 95% of the cases. But in the remaining 5% the click/drag/drop is still better. I consider myself as a lambda+ user but lambda nevertheless. This is the first problem I have with Garuda. I really like this distro. And no, I didn't ask anywhere else. I figured that the first place to ask a question was the forum of my daily distro. I didn't do anything special. I replaced the files in /root by those in my $HOME, to try to locate the problem but there are so many mechanisms that cross each other that I don't know where to look. Hence my request for a search path. So that in the process I learn.

Rob'

2 Likes

image

sudo thunar

:slight_smile:

:arrow_up: I never use it. Maybe install Dolphin (and Kate) like me in i3wm, but I never use GUI for root. So ... ?

The commands I use on a daily basis :
sudo / sudo -i / and even su - and su -c

and this :

 = = = rob, @Rob-LapTop, /work/rob → cat /opt/scripts/ROOT_thunar.sh
#! /bin/bash

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY thunar /work/root
                                                                                                                                                                  
 = = = rob, @Rob-LapTop, /work/rob → cat /opt/scripts/ROOT_term.sh
#! /bin/bash
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xfce4-terminal --working-directory=/work/root

 = = = rob, @Rob-LapTop, /work/rob →  cat /opt/scripts/ROOT_thunar.sh
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY thunar /work/root

Both mapped on keyboard shortcuts.
In personalised actions I use the model → pkexec thunar %f

That said, regardless of the command used, the result remains the same. If I change directory, close window/tab, root thunar settings disappear, and this even if connecting root via lightdm (please don't hit me).

I hope I don't forget anything.

I go back to exploring the web. I'll eventually find it... or not. >_<

P.S. : Oh yes, it is! I forgot to mention that as I use zsh I tested with bash, and it's the same

Google → thunar root settings =

https://bbs.archlinux.org/viewtopic.php?id=240261

It's works... just replace gksu with pkexec ( logic )

How I didn't see it before....

1 Like

My fixed command for other users in case :

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY dbus-run-session thunar /work/root

and I add my fixed script :

= = = rob, @Rob-LapTop, /work/rob → cat /opt/scripts/ROOT_thunar.sh 
#! /bin/bash

WKD="/work/root"

[ "$#" != 0 ] && WKD="$1"

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY dbus-run-session thunar "$WKD"

Allows me to use the same command for use via console, keyboard shortcuts, scripts...

The script invoked without parameter will open the default directory ( /work/root/ )

If WKD="" then /root will be opened

If several parameters are passed only the first one will be processed. The others will be ignored.

For thunar actions personalized (thunar contextual menu ), the command will be :

/opt/scripts/ROOT.thunar.sh %f

That's it.

@+ ^_ ^

1 Like

I mark-it-solved ! :slight_smile:

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.