jesustorresdev/yakuake-session

user sessions

Closed this issue · 2 comments

Hello,
when yakuake is started with my user, regular-user.

i switch my session to root

sudo su

after that i run:

yakuake-session -t "Test title"

Two instances of yakuake are started.

regular-user   23421  1.3  0.4 991648 74264 ?        Sl   10:25   0:31 yakuake
root     27520  3.6  0.2 512936 43900 pts/29   Sl   11:03   0:00 yakuake

Second instance is started by root user. I expected that one instance run with 2 tabs

Hi,

Thank you for your report.

I only have a question. Do you expect the second tab is open as root or as regular user?

To avoid a second instance of Yakuake, the dbus instance of regular user must have to be accesible from root session.

Ok, we know we are in a root session inside a regular session thanks to SUDO_UID and SUDO_USER. The file <REGULAR_USER_HOME>.dbus/session-bus/ contains the variables to connect to the user dbus. But dbus refuses some connection attempts because the session EUID (root) doesn't match with the dbus user (regular user).

http://stackoverflow.com/questions/6496847/access-another-users-d-bus-session

The script must call seteuid(<REGULAR_USER_UID>) but I think it can't be done from BASH. I need to use some tool or scripting language with a seteuid() wrapper. For example, Perl.