0

I'm currently migrating from 18.04LTS to 22.04

How can I open for a differnt user than the one logged in

  • a graphical file explorer
  • within this file expolorer: open a command shell by mouse right click 'Open in Terminal'

The solution I used in 18.04 doesn't open a terminal anymore.

See also Failed to execute child process "dbus-launch" on 'Open in Terminal' (Ubuntu 22.04LTS)

ssssstut
  • 667
  • 1
    No good practice. Have the other user log in. – vanadium May 09 '22 at 10:41
  • Actually I have to login as myOtherUser, see shell from 18.04: xhost +SI:localuser:myOtherUser pkexec --user myOtherUser env DISPLAY=$DISPLAY nautilus xhost -SI:localuser:myOtherUser - I need a convenient way to navigate through myOtherUesr's files and open a shell in case I need it. Worked with 18.04 – ssssstut May 09 '22 at 13:05

1 Answers1

0

The following worked for me:

Install dbus-launch (via sudo apt install dbus-x11)

#!/bin/sh
xhost +SI:localuser:myOtherUser
sudo --user myOtherUser env DISPLAY=$DISPLAY nautilus
xhost -SI:localuser:myOtherUser
ssssstut
  • 667