thank you Mike Chambers for the suggestion. Since when did the su command change it has always been su root & have never seen any documentation says su - root. Any how just to try it here is the result: [awp@localhost ~]$ su - root Password: [root@localhost ~]# pup Xlib: connection to ":0.0" refused by server Xlib: No protocol specified
Traceback (most recent call last): File "/usr/sbin/pup", line 31, in <module> import gtk File "/usr/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 76, in <module> _init() File "/usr/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 64, in _init _gtk.init_check() RuntimeError: could not open display
[root@localhost ~]# kdesu pup Xlib: connection to ":0.0" refused by server Xlib: No protocol specified
kdesu: cannot connect to X server :0.0
[awp@localhost root]$ su root Password: [root@localhost ~]# pup Xlib: connection to ":0.0" refused by server Xlib: No protocol specified
Traceback (most recent call last): File "/usr/sbin/pup", line 31, in <module> import gtk File "/usr/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 76, in <module> _init() File "/usr/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 64, in _init _gtk.init_check() RuntimeError: could not open display
the result is the same. you do not have to enter su - root to login as root, just su root is good enough.
Ashley Pritchard wrote:
thank you Mike Chambers for the suggestion. Since when did the su command change it has always been su root & have never seen any documentation says su - root. Any how just to try it here is the result: [awp@localhost ~]$ su - root Password: [root@localhost ~]# pup Xlib: connection to ":0.0" refused by server Xlib: No protocol specified
Traceback (most recent call last): File "/usr/sbin/pup", line 31, in <module> import gtk File "/usr/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 76, in <module> _init() File "/usr/lib/python2.5/site-packages/gtk- 2.0/gtk/__init__.py", line 64, in _init _gtk.init_check() RuntimeError: could not open display
[root@localhost ~]# kdesu pup Xlib: connection to ":0.0" refused by server Xlib: No protocol specified
kdesu: cannot connect to X server :0.0
[awp@localhost root]$ su root Password: [root@localhost ~]# pup Xlib: connection to ": 0.0" refused by server Xlib: No protocol specified
Traceback (most recent call last): File "/usr/sbin/pup", line 31, in <module> import gtk File "/usr/lib/python2.5/site-packages/gtk- 2.0/gtk/__init__.py", line 76, in <module> _init() File "/usr/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 64, in _init _gtk.init_check() RuntimeError: could not open display
the result is the same. you do not have to enter su - root to login as root, just su root is good enough.
-- Diolch yn fawr, Ashley
For 10 years I have used: $ su - $ Password # I thought this was the to do it?
Karl
On Tue, 26 Jun 2007 12:59:23 -0600 Karl Larsen k5di@zianet.com wrote:
For 10 years I have used: $ su -
The difference between su and su - is that the - makes the new shell a login shell. This means that you get the default path and environment for the user that you just su'ed to.
On Tue, 2007-06-26 at 06:50 -0700, Ashley Pritchard wrote:
thank you Mike Chambers for the suggestion. Since when did the su command change it has always been su root & have never seen any documentation says su - root. Any how just to try it here is the result:
For your reference, just "su" or "su -" is all you need, you don't have to add "root" at the end of it.
If you don't need to be in root's paths, you only have to use "su" as you are doing. But if you want the paths the belong to root's profile, then you have to use "su -", otherwise, you'll have to use the complete /path/to/the/command to run it. The command "chkconfig" (the command itself, not the using the path to it) is an example of not being able to be ran with just "su", but having to use "su -" to use it (again, unless you use the complete path to the command).
As far as your pup problem, you can run that as normal user, just give the root password when it asks for it in the gui. But as far as your xlib error, not sure on that one.
(hrm, after reading that again, think I even confused myself hehe.)