<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><div>Hi all!<br><br></div>I try to connect to user session bus from my Qt root app. Unfortunately, I can't do this right. <br><br></div><div>First, I share DBUS_SESSION_BUS_ADDRESS variable with my app.<br></div><div>Second, I use setuid(1000) in my app to set user ID.<br></div><div>And all works fine! But.. I can't get root rights back when setuid is used. But if I use seteuid instead of setuid, session bus is unavailable.<br><br></div><div>So, my question is why seteuid is not enough to get access to user session bus? Maybe I do something wrong?<br><br></div><div>FYI: I need root privileges to access system devices directly and session bus to set inhibitions preventing sleep/idle.<span class="HOEnZb"><font color="#888888"><br clear="all"></font></span></div><span class="HOEnZb"><font color="#888888"><div><div><div><div><br>-- <br><div>Best regards, Sergei Lopatin<br>e-mail: <a href="mailto:magist3r@gmail.com" target="_blank">magist3r@gmail.com</a></div>
</div></div></div></div></font></span></div>
</div><br></div>