You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On GNOME, this may lead to an error when run as root because gnome-terminal cannot be run with sudo:
Exit status 7
Starting Terminal fails with this error message:
Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Terminal exited with status 7
Reason: You are trying to run gnome-terminal with su, sudo or some similar mechanism. You cannot do so. Instead, run su, sudo, etc., inside the terminal. E.g.
gnome-terminal -- su ...
You should be able to reproduce the problem by running sudo gnome-terminal in a terminal which fails. In contrast, sudo dbus-launch gnome-terminal works, but I don't know if this an acceptable workaround.
Interesting points for an important use case. I think the more obvious fix would be to run su/sudo within the terminal, rather than running the terminal itself like this.
This would require some changes to the logic of spawning the terminals on X11 but it should be worth looking at.
At the time this was written, this was more for the case where the actual root user was the logged in user on the X11 session; this is a much less common case these days. Spawning terminals while in sudo has always been problematic and often needed messing with xhost.
If the extraction script determines that it's not running in a terminal, it will try to open one:
makeself/makeself-header.sh
Lines 573 to 579 in e7eb0fd
On GNOME, this may lead to an error when run as root because gnome-terminal cannot be run with sudo:
You should be able to reproduce the problem by running
sudo gnome-terminal
in a terminal which fails. In contrast,sudo dbus-launch gnome-terminal
works, but I don't know if this an acceptable workaround.Related Stackoverflow: https://unix.stackexchange.com/questions/344617/error-constructing-proxy-when-trying-to-launch-gnome-terminal-as-root
The text was updated successfully, but these errors were encountered: