! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Launching xfce4-terminal with sudo through the xfce4-terminal shows an error
Status:
RESOLVED: INVALID
Product:
Xfce4-terminal
Component:
General

Comments

Description Charbel Nicolas 2019-09-05 17:50:47 CEST
Created attachment 9005 
Error

When you launch xfce4-terminal through the xfce4-terminal with sudo privileges you get the following error:

% sudo xfce4-terminal
[sudo] password for username: 
Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined

And the resulting launched terminal doesn't have any of the user settings, it launches the default looking xfce4-terminal.
Comment 1 Igor editbugs 2019-09-05 18:53:01 CEST
Hi,

It seems that your sudo settings override $HOME - see, for example, https://unix.stackexchange.com/questions/91384/how-is-sudo-set-to-not-change-home-in-ubuntu-and-how-to-disable-this-behavior
Since xfce4-terminal configuration is stored under the user home dir (~/.config/xfce4/terminal/), running the terminal under 'root' will make it look for the configs in the 'root' home dir which probably doesn't contain them.
Try running 'sudo -E' to keep the current user's environment - this may help to preserve the terminal configuration.

About the SESSION_MANAGER error:
On start, xfce4-terminal tries to connect to xfce4-session (in order to be able to save its state on events like logging out). Since there's no xfce4-session process run by root, it fails to connect, and the error gets printed.

Please let me know if you have any other questions or the bug can be closed.
Comment 2 Charbel Nicolas 2019-09-05 20:48:21 CEST
Thanks for your help, you can close it now. I appreciate it.
Comment 3 Igor editbugs 2019-09-05 20:49:18 CEST
You're welcome!

Bug #15931

Reported by:
Charbel Nicolas
Reported on: 2019-09-05
Last modified on: 2019-09-05

People

CC List:
0 users

Version

Attachments

Error (22.19 KB, image/png)
2019-09-05 17:50 CEST , Charbel Nicolas
no flags

Additional information