Nvidia control panel won't write to /etc/x11/xorg.conf

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
flaminglemon
Level 1
Level 1
Posts: 12
Joined: Wed May 27, 2009 7:30 pm

Nvidia control panel won't write to /etc/x11/xorg.conf

Post by flaminglemon »

I use dual screens on my laptop. It seems the Nvidia display control won't write to /etc/x11/xorg.conf because it doesn't have the right permissions (which, I suppose, is a good thing). I want to give it permission to write to this file so that it can change my display setup every time I take my laptop with me (single screen mode) and when I plug my laptop back into my monitor (dual screen mode)

At the moment, I have to go into my /etc/x11/ directory as root and swap the xorg.conf file every time I move around.

Is there a way of giving the Nvidia display controls write permissions to etc/x11/ directory so it can do what it has to do?

LitBolt
Level 1
Level 1
Posts: 17
Joined: Sat May 30, 2009 3:19 am

Re: Nvidia control panel won't write to /etc/x11/xorg.conf

Post by LitBolt »

Go into a terminal and type "sudo nvidia-settings" and then type your password. "Sudo" runs the command in super-user mode and will give the program permission to write the file.

flaminglemon
Level 1
Level 1
Posts: 12
Joined: Wed May 27, 2009 7:30 pm

Re: Nvidia control panel won't write to /etc/x11/xorg.conf

Post by flaminglemon »

Thanks LitBolt. But will this give it permissions to always make changes or is it just for the one session?

If it's just for the one session, then it would mean that I'll need to keep doing this every time I plug out and plug in my monitor.

Would it be wise to just set the permissions of my xorg.conf file to "everyone"?

LitBolt
Level 1
Level 1
Posts: 17
Joined: Sat May 30, 2009 3:19 am

Re: Nvidia control panel won't write to /etc/x11/xorg.conf

Post by LitBolt »

Just the one session, and that would get old fast, heh. You could change the permissions, but it's generally considered a bad idea for security and stability reasons. I don't personally know of any consequences good or bad of doing it.

I'm not sure how much it'd help the convenience factor, but if you want nvidia-settings to always open as sudo...

Right click on the mint menu button and choose "edit menu"
Under Administration click on the Nvidia icon and choose properties
In the "command" line, change "/usr/bin/nvidia-settings" to "sudo /usr/bin/nvidia-settings"

That will make it so you don't have to use the command line interface every time you want to actually do something with nvidia settings.

Lantesh
Level 6
Level 6
Posts: 1214
Joined: Sat Apr 12, 2008 1:02 pm

Re: Nvidia control panel won't write to /etc/x11/xorg.conf

Post by Lantesh »

LitBolt wrote:Right click on the mint menu button and choose "edit menu"
Under Administration click on the Nvidia icon and choose properties
In the "command" line, change "/usr/bin/nvidia-settings" to "sudo /usr/bin/nvidia-settings"

That will make it so you don't have to use the command line interface every time you want to actually do something with nvidia settings.
Actually when changing a launch command in the menu it's best to use gksu or gksudo instead of sudo. You also don't need the full path as the system knows the command nvidia-settings, so the proper launch command for the menu is "gksudo nvidia-settings" or "gksu nvidia-settings" without the quotes. Now if you run it from a Terminal window then you would use sudo, ie: "sudo nvidia-settings".

LitBolt
Level 1
Level 1
Posts: 17
Joined: Sat May 30, 2009 3:19 am

Re: Nvidia control panel won't write to /etc/x11/xorg.conf

Post by LitBolt »

Lantesh wrote:
LitBolt wrote:Right click on the mint menu button and choose "edit menu"
Under Administration click on the Nvidia icon and choose properties
In the "command" line, change "/usr/bin/nvidia-settings" to "sudo /usr/bin/nvidia-settings"

That will make it so you don't have to use the command line interface every time you want to actually do something with nvidia settings.
Actually when changing a launch command in the menu it's best to use gksu or gksudo instead of sudo. You also don't need the full path as the system knows the command nvidia-settings, so the proper launch command for the menu is "gksudo nvidia-settings" or "gksu nvidia-settings" without the quotes. Now if you run it from a Terminal window then you would use sudo, ie: "sudo nvidia-settings".
You know, I put gksu first, but then I tried sudo and it worked for me, so I decided to stick with what I knew. I was unaware of the difference, thanks for pointing it out. I just kept what was already in the box since I knew that worked, and it just happened to have the whole path in it.

flaminglemon
Level 1
Level 1
Posts: 12
Joined: Wed May 27, 2009 7:30 pm

Re: Nvidia control panel won't write to /etc/x11/xorg.conf

Post by flaminglemon »

Thanks for the responses, guys. Muchly appreciated. Before reading all your responses, I had already made the file read/writeable. That works fine for me. I know it's a very Windows-user thing to do, but while I learning the ins and outs, this will do for now. :P

Thanks again!

Lantesh
Level 6
Level 6
Posts: 1214
Joined: Sat Apr 12, 2008 1:02 pm

Re: Nvidia control panel won't write to /etc/x11/xorg.conf

Post by Lantesh »

LitBolt wrote:You know, I put gksu first, but then I tried sudo and it worked for me, so I decided to stick with what I knew. I was unaware of the difference, thanks for pointing it out. I just kept what was already in the box since I knew that worked, and it just happened to have the whole path in it.
Hey no problem. I am always learning too. I learn from you, and you learn from me, and we are both better off in the end. That's what it's all about. 8)

Post Reply

Return to “Newbie Questions”