Failed to run child process "gksudo" (nonexistent file or directory)

Good afternoon to the Manjaro community,

When I choose the option “Open folder as Root” in PCManFM or on the desktop, I get a window with the following message;

Failed to run child process "gksudo" (nonexistent file or directory)

Anyone know how to fix this problem?

  Kernel: 5.10.56-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 
  root=UUID=4c99a061-31b7-445a-ad39-2ef99ad4a052 rw quiet udev.log_priority=3 
  Desktop: LXDE 0.10.1 info: lxpanel wm: Openbox 3.6.1 vt: 7 
  dm: LightDM 1.30.0 Distro: Manjaro Linux base: Arch Linux 
  Type: Desktop Mobo: INTEL model: H81 serial: <filter> 
  UEFI: American Megatrends v: 4.6.5 date: 10/21/2020 
  Message: No system battery data found. Is one present? 
  RAM: total: 7.72 GiB used: 1.49 GiB (19.3%) 
  RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
  Info: Dual Core model: Intel Pentium G3250 bits: 64 type: MCP arch: Haswell 
  family: 6 model-id: 3C (60) stepping: 3 microcode: 28 cache: L2: 3 MiB 
  bogomips: 12777 
  Speed: 1008 MHz min/max: 800/3200 MHz Core speeds (MHz): 1: 1008 2: 1146 
  Flags: abm acpi aperfmperf apic arat arch_perfmon bts clflush cmov 
  constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept 
  ept_ad erms est flexpriority flush_l1d fpu fsgsbase fxsr ht ibpb ibrs 
  invpcid invpcid_single lahf_lm lm mca mce md_clear mmx monitor movbe msr 
  mtrr nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge 
  pln pni popcnt pse pse36 pti pts rdrand rdtscp rep_good sdbg sep ss ssbd sse 
  sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust 
  tsc_deadline_timer vme vmx vnmi vpid xsave xsaveopt xtopology xtpr 
  Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
  Type: l1tf 
  mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled 
  Type: mds mitigation: Clear CPU buffers; SMT disabled 
  Type: meltdown mitigation: PTI 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, 
  IBRS_FW, STIBP: disabled, RSB filling 
  Type: srbds mitigation: Microcode 
  Type: tsx_async_abort status: Not affected 
  Device-1: AMD Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] vendor: XFX Pine driver: amdgpu v: kernel bus-ID: 01:00.0 chip-ID: 1002:67ef 
  class-ID: 0300 
  Display: x11 server: X.Org 1.20.13 driver: loaded: ati,modesetting 
  unloaded: radeon alternate: fbdev,vesa display-ID: :0 screens: 1 
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") 
  s-diag: 582mm (22.9") 
  Monitor-1: HDMI-1 res: 1920x1080 hz: 75 dpi: 82 size: 598x336mm (23.5x13.2") 
  diag: 686mm (27") 
  Message: Unable to show advanced data. Required tool glxinfo missing. 
  Device-1: Intel 8 Series/C220 Series High Definition Audio 
  driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8c20 
  class-ID: 0403 
  Device-2: AMD Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X] 
  vendor: XFX Pine driver: snd_hda_intel v: kernel bus-ID: 01:00.1 
  chip-ID: 1002:aae0 class-ID: 0403 
  Sound Server-1: ALSA v: k5.10.56-1-MANJARO running: yes 
  Sound Server-2: JACK v: 1.9.19 running: no 
  Sound Server-3: PulseAudio v: 15.0 running: no 
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  driver: r8169 v: kernel port: d000 bus-ID: 03:00.0 chip-ID: 10ec:8168 
  class-ID: 0200 
  IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  IP v6: <filter> type: dynamic noprefixroute scope: global 
  IP v6: <filter> type: dynamic noprefixroute scope: global 
  IP v6: <filter> type: noprefixroute scope: link 
  WAN IP: <filter> 
  Message: No bluetooth data found. 
  Message: No logical block device data found. 
  Message: No RAID data found. 
  Local Storage: total: 223.57 GiB used: 4.68 GiB (2.1%) 
  SMART Message: Required tool smartctl not installed. Check --recommends 
  ID-1: /dev/sda maj-min: 8:0 vendor: Kingston model: SA400S37240G 
  size: 223.57 GiB block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s 
  type: SSD serial: <filter> rev: 61K1 scheme: GPT 
  Message: No optical or floppy data found. 
  ID-1: / raw-size: 223.27 GiB size: 218.77 GiB (97.98%) used: 4.68 GiB (2.1%) 
  fs: ext4 dev: /dev/sda2 maj-min: 8:2 label: N/A 
  uuid: 4c99a061-31b7-445a-ad39-2ef99ad4a052 
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) 
  used: 312 KiB (0.1%) fs: vfat dev: /dev/sda1 maj-min: 8:1 label: N/A 
  uuid: 84A3-A666 
  Alert: No swap data was found. 
  Message: No unmounted partitions found. 
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Hub-2: 1-1:2 info: Intel Integrated Rate Matching Hub ports: 4 rev: 2.0 
  speed: 480 Mb/s chip-ID: 8087:8008 class-ID: 0900 
  Hub-3: 2-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Hub-4: 2-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0 
  speed: 480 Mb/s chip-ID: 8087:8000 class-ID: 0900 
  Hub-5: 3-0:1 info: Full speed (or root) Hub ports: 10 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Device-1: 3-9:2 info: Dell KB216 Wired Keyboard type: Keyboard,HID 
  driver: hid-generic,usbhid interfaces: 2 rev: 1.1 speed: 1.5 Mb/s 
  power: 100mA chip-ID: 413c:2113 class-ID: 0300 
  Device-2: 3-10:3 info: [Maxxter] Optical Gaming Mouse [Xtrem] 
  type: Mouse,Keyboard driver: hid-generic,usbhid interfaces: 2 rev: 1.1 
  speed: 1.5 Mb/s power: 100mA chip-ID: 18f8:0f97 class-ID: 0301 
  Hub-6: 4-0:1 info: Full speed (or root) Hub ports: 2 rev: 3.0 speed: 5 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
  System Temperatures: cpu: 29.8 C mobo: 27.8 C gpu: amdgpu temp: 33.0 C 
  Fan Speeds (RPM): N/A gpu: amdgpu fan: 1193 
  Processes: 157 Uptime: 3h 53m wakeups: 0 Init: systemd v: 248 
  tool: systemctl Compilers: gcc: 11.1.0 Packages: pacman: 629 lib: 147 
  Shell: Zsh v: 5.8 running-in: lxterminal inxi: 3.3.06

Wild guess: is gksu installed?

What I have installed is:

The way i see it, zensu works the same as gksu, but is still a different program. So pcmanfm should call zensu instead of gksudo in order to use it.
@Chrysostomus Do you confirm?

If you have zensu installed - no need to modify the command as zensu contains a symlink named gksu.

1 Like

The error may then be about the folder to open rather than the delegate command.
Is there a space character in the path to that folder?

Nothing from the repos should be calling gksudo. Please run pcmanfm from the terminal, reproduce the issue and see if it spits out an error.

Run PCManFm using terminal with root mode:
“sudo -i”

After the program opens, select an option;
“Open folder as root”

And returned a dialog with the following message;
“Failed to execute child process “gksudo” (Non-existent file or directory)”

Tried in other folders, including “/home”
They all return the same error.

I have the package “zensu 0.3-1” installed, when I open the terminal and call one of the following commands;

zensu -h
zensu --h
zensu -help
zensu --help

Returns the following error:

/usr/bin/zensu: line 10: zenity: command not found
triggered empty

Never run a GUI as root. Start pcmanfm as your user than try and reproduce it.

I opened PCManFm as user and tried to run the option, it returned the same error “gksudo”

I thought the zensu was depending on zenity and as so was pulling the dependency on install.

sudo pacman -Syu zenity

It is possible to define actions for pcmanfm using .desktop files

System wide


User defined


I have given thought to it - mostly just fixing package errors - but I see that the lxde settings package provides two desktop files which references gksudo.

As mentioned - it is not best practise to run GUI applications as root - and on Wayland it is not possible - so we will have to remove them - as to not encourage actions which could lead to irreparable damage to the system.

It’s an optional dependency among other choices for the dialog. zensu does not provide gksudo, why are we talking about it?

gksudo is long deprecated, insecure and is neither available in the repos nor the AUR. Please change them to use admin://:

leafpad admin:// %f
pcmanfm admin:// %u

Thanks, I was able to access PCManFM as admin.

But I would like to know, where do I change in PCManFM, for when I choose an option from the dropdown menu “Open Folder as Root”

Thanks, I was able to access PCManFM as admin.

But I would like to know, where do I change in PCManFM, so when I choose an option in the dropdown menu “”, it executes the command to open the said folder as Root, without using the gksudo command.

Because, even though I open PCManFM as Root from the terminal, the option in the menu to open the current folder as root remains active, and when I click on this option, it tries to open it with the gksudo command.

Where can I change this command call?

Copy the default desktop files to your user directory:

cp /etc/skel/.local/share/file-manager/actions/*.desktop ~/.local/share/file-manager/actions/

Browse to ~/.local/share/file-manager/actions/ and make the following changes:

In editasroot.desktop, change:

Exec=gksudo leafpad %f


Exec=leafpad admin:// %f

In openfolderasroot.desktop, change:

Exec=gksudo pcmanfm %u


Exec=pcmanfm admin:// %u

I made the changes that guided me and they are working (partially).

The menu to open the file and pcmanfm is now working, however it does not open in the currently selected folder or the selected file.

A doubt;

  • does the variable “%f” refer to the file that will be opened?

  • the variable “%u” refers to the folder that will be opened

Because if these are variables, it seems to me that they are not getting the information from the file or folder that should be called

You’re correct about the variables. They should be working. Maybe @linux-aarhus has an idea since he was the previous LXDE maintainer.

I found this document, I managed to solve the problem of opening the folder as Root.

I’ll continue reading, but I believe the article will help to resolve the remaining issues, thank you so much for everyone’s help.

That’s exactly the same thing we were just talking about. :wink: