Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm having a problem with my SuSE9 that I never experienced with Redhat.
I can open files from the command line as user only, not as root
skynet@linux:~> gedit /etc/fstab
This works as it should
skynet@linux:~> su
Password:
linux:/home/skynet # gedit /etc/fstab
bash: gedit: command not found
I emailed a friend about this and he suggested 'su - root'
This brings up a gtk warning
linux:~ # gedit /etc/fstab
(gedit:2308): Gtk-WARNING **: cannot open display:
I get similar errors if I try kwrite instead of gedit.
as a normal user, run 'echo $PATH'
and do the same as root.
there will be a few strings in roots path that are not in the users path (the /sbin stuff)
but every string in the users PATH should also be in the roots PATH.
the path variable is set in $HOME/.bash_profile
if it is the PATH variables fault, edit the bash profile file.
my root path is... /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
SuSE uses .bashrc in the $HOME directory for user profiles and uses /etc/profile.local for root and global changes. You can create a .bashrc file in /root that contains export PATH=<your path>
Also the error that says it can't open the display can be fixed by adding localhost to your xhosts list:
As your regular user open a terminal window and type xhost +localhost
you should then be able to run X apps as root without the display warning.
You could also add this to your .bashrc file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.