[arch-general] Permanently allow root access
I want to run root X application in a terminal. [root@archbox ~]# smplayer smplayer: cannot connect to X server [root@archbox ~]# I followed the wiki https://wiki.archlinux.org/index.php/Running_X_apps_as_root added export XAUTHORITY=/home/archie/.Xauthority to /etc/profile. After this I am not able to login with my user account archie through gdm. Deleting the added line to /etc/profile let me log back in. How can I get this thing working as I wish? I definitely don't prefer the method given under temporarily allow root access as per the wiki page, since in other distribution I can start the X applications in a root terminal without a hitch. I would like to start root X applications in a terminal.
Am 01.02.2014 04:55, schrieb piruthiviraj natarajan:
I want to run root X application in a terminal.
[root@archbox ~]# smplayer smplayer: cannot connect to X server [root@archbox ~]#
I followed the wiki https://wiki.archlinux.org/index.php/Running_X_apps_as_root
Again, the most convenient method of doing this is not included in the wiki. Add the line session optional pam_xauth.so to /etc/pam.d/su and /etc/pam.d/su-l. Then switch to your root user using 'su' or 'su -'.
On Sat, Feb 1, 2014 at 2:22 PM, Thomas Bächler <thomas@archlinux.org> wrote:
Again, the most convenient method of doing this is not included in the wiki. Add the line
session optional pam_xauth.so
to /etc/pam.d/su and /etc/pam.d/su-l. Then switch to your root user using 'su' or 'su -'.
How is this inconvenient? I don't get it. Your method worked and it can't be any easier. Thank you so much.
Am 01.02.2014 10:06, schrieb piruthiviraj natarajan:
On Sat, Feb 1, 2014 at 2:22 PM, Thomas Bächler <thomas@archlinux.org> wrote:
Again, the most convenient method of doing this is not included in the wiki. Add the line
session optional pam_xauth.so
to /etc/pam.d/su and /etc/pam.d/su-l. Then switch to your root user using 'su' or 'su -'.
How is this inconvenient? I don't get it.
Your method worked and it can't be any easier. Thank you so much.
All the methods in the wiki are inconvenient, this one is - on the contrary - extremely convenient.
On Sat, Feb 1, 2014 at 5:31 PM, Thomas Bächler <thomas@archlinux.org> wrote:
All the methods in the wiki are inconvenient, this one is - on the contrary - extremely convenient.
sorry! my bad, I misread as 'inconvenient' in your first post. Clearly my mistake. I have added your advice in the wiki. I hope it helps others!
El 01/02/2014 13:14, "piruthiviraj natarajan" <piruthiviraj@gmail.com> escribió:
On Sat, Feb 1, 2014 at 5:31 PM, Thomas Bächler <thomas@archlinux.org>
wrote:
All the methods in the wiki are inconvenient, this one is - on the contrary - extremely convenient.
sorry! my bad, I misread as 'inconvenient' in your first post. Clearly my mistake.
I have added your advice in the wiki. I hope it helps others!
As user exec first: xhost + And try again.
On 01.02.2014 04:55, piruthiviraj natarajan wrote:
I want to run root X application in a terminal.
[root@archbox ~]# smplayer smplayer: cannot connect to X server [root@archbox ~]#
I followed the wiki https://wiki.archlinux.org/index.php/Running_X_apps_as_root
added export XAUTHORITY=/home/archie/.Xauthority to /etc/profile.
After this I am not able to login with my user account archie through gdm. Deleting the added line to /etc/profile let me log back in. How can I get this thing working as I wish?
I definitely don't prefer the method given under temporarily allow root access as per the wiki page, since in other distribution I can start the X applications in a root terminal without a hitch. I would like to start root X applications in a terminal.
why don't you just use sudo? $ sudo env ... DISPLAY=:0 XAUTHORITY=/home/damjan/.Xauthority ... those are propagated by default (I don't remember setting this up) -- дамјан
On Mon, Feb 10, 2014 at 7:10 PM, Damjan <gdamjan@gmail.com> wrote:
why don't you just use sudo?
$ sudo env ... DISPLAY=:0 XAUTHORITY=/home/damjan/.Xauthority ...
those are propagated by default (I don't remember setting this up)
-- дамјан
Well... locally, at least, that's exactly why I needed that wrapper: $ command sudo env | grep ^XAUTHORITY $ sudo env | grep ^XAUTHORITY XAUTHORITY=/home/martti/.Xauthority you yourself are obviously relying on one of the proposed fixes, likely the one from your sudoers file. cheers! mar77i
On вто, 11 фев 2014 13:41:08 CET, Martti Kühne wrote:
On Mon, Feb 10, 2014 at 7:10 PM, Damjan <gdamjan@gmail.com> wrote:
why don't you just use sudo?
$ sudo env ... DISPLAY=:0 XAUTHORITY=/home/damjan/.Xauthority ...
those are propagated by default (I don't remember setting this up)
-- дамјан
Well... locally, at least, that's exactly why I needed that wrapper:
$ command sudo env | grep ^XAUTHORITY $ sudo env | grep ^XAUTHORITY XAUTHORITY=/home/martti/.Xauthority
you yourself are obviously relying on one of the proposed fixes, likely the one from your sudoers file.
hmm, seems not pacman -Qkk sudo sudo: 146 total files, 0 altered files /etc/sudoers is not changed, nor is /etc/pam.d/sudo - and it just includes system-auth which is not changed from the original either The only thing custom I have is /etc/sudoers.d/wheel with damjan ALL=(ALL) ALL -- damjan
participants (5)
-
Damjan
-
Martti Kühne
-
Maykel Franco
-
piruthiviraj natarajan
-
Thomas Bächler