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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Here is the situation... The PC is logged on as a non-sudoer (the wife's account) and I need to make a little tweak to lets say /etc/fstab. If I open a terminal window and type "gksu gedit /etc/fstab" it will not work as her account is not on the sudoers list.
So in the terminal window I issue the command "su ken" and enter my password. I, a sudoer, am now logged on within the terminal window. I then issue the command "gedit /etc/fstab" and I receive the following error message:
No protocol specified
cannot open display
Of course I can edit the file with vi or switch user and logon with my account with sudoer rights. The real question is - can a currently logged on user su to another user account and execute a graphical program as the second user?
It's because you don't have permission, you'd need to copy the current user's .Xauthority file to your/root's directory. When you did the su ken, if you didn't use a - then as ken you could run X apps because you are still using the previous user's environment, however when you did the sudo for the gedit you switched to the root user and are using root's environment which won't have proper permission without that .Xauthority file. You might also be able to issue an xhost + to open up X's permissions, just remember to turn them back off when your done.
I have the same problem as the original poster here. Is there no solution?
I tried the "export" [etc.] suggestion, but I get command not found. Do I have to install some package to be able to run the "export" command?
I tried logging myself on with su -p kevin, but even though that preserves the non-sudoer's environment, or at least the environment variables I know about, I still am denied when I try to run any graphical program e.g. "gedit" with no filename.
I tried "xhost [my computer name" before su'ing, but that doesn't work either.
Help? Ken & I can't be the only people with this problem.