[SOLVED] Sudo with "nvidia-settings" not working, getting error?
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.
I tried running your command and I get the following:
> sudo env DISPLAY=$DISPLAY /usr/bin/nvidia-settings
Invalid MIT-MAGIC-COOKIE-1 key
ERROR: The control display is undefined; please run `/usr/bin/nvidia-settings --help` for usage information.
If I echo $DISPLAY, it does show that it is defined:
> echo $DISPLAY
So I'm not really sure why "sudo" wouldn't be working?
Is there anyway to make the "nvidia-settings" command run as root no matter what?
descendant_command, thanks for the reply.
I don't seem to have "gksu":
> gksu nvidia-settings
If 'gksu' is not a typo you can use command-not-found to lookup the package that contains it, like this:
I checked to see if it was something that I can install from Software Manager but no luck.
Think it's something that I should look for online somewhere... Or if I don't already have it then it's probably not going to be compatible..?
Not sure what I did wrong the first go-around, but got it going this time.
Basically I just wanted to create a "Custom Application Launcher" on the "The GNOME Panel 2.32.1" to launch the
nvidia-settings control panel GUI without having to launch a terminal sign in as root and then issue the nvidia-settings command.
Now I just need to click my "Launcher" and am good to go.
Thanks for all your suggestions. I'll post the code if anyone wants it, thanks...
I am curious to know why I don't have the "gksu" and the "gksudo" commands? Because this isn't the first post
where I was suggested to use that instead of just plain old "su" and "sudo".
If this makes a difference, here's my specs:
> uname -a
Linux localhost 126.96.36.199-0.11-default #1 SMP 2011-12-19 23:39:38 +0100 i686 i686 i386 GNU/Linux
> cat /etc/SuSE-release
openSUSE 11.4 (i586)
VERSION = 11.4
CODENAME = Celadon
mmartin:/etc # cnf gksu
gksu: command not found
mmartin:/etc # cnf gksudo
gksudo: command not found
mmartin:/etc # which gksu
which: no gksu in (/usr/lib/mpi/gcc/openmpi/bin:/home/mmartin/bin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin)
mmartin:/etc # which gksudo
which: no gksudo in (/usr/lib/mpi/gcc/openmpi/bin:/home/mmartin/bin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin)
I think I found the command that would be the equivalent of what you guys were telling me about...
Is it gnomesu:
> gnomesu --help
-h, --help Show help options
--help-all Show all help options
--help-gtk Show GTK+ Options
-c, --command=COMMAND Pass the command to execute as one single string.
-u, --user=USERNAME Run as this user instead of as root.
--display=DISPLAY X display to use
I haven't really gotten a chance to test it yet, but it seems like it should do the trick