LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Launch nvidia-settings automatically (https://www.linuxquestions.org/questions/linux-software-2/launch-nvidia-settings-automatically-750903/)

maxkukartsev 08-28-2009 11:46 AM

Launch nvidia-settings automatically
 
Hello everyone,

I'm trying to have the nVidia control panel program (nvidia-settings) load its settings automatically upon launching a graphical environment, but the methods that were suggested do not appear to work for me.

After I log in to Ubuntu (Jaunty), running this command line makes nVidia adjust screen properties (brightness, contrast, etc):
Code:

nvidia-settings --config=/etc/.nvidia-settings-rc --load-config-only &
To make this happen automatically, people have suggested to place the command into into ~/.xinitrc and create a symbolic link to it from ~/.xsession: http://forums.linuxmint.com/viewtopic.php?f=42&t=3908

I did exactly that, but even after login:
1) Screen properties are still default, no change happened.
2) When I launch the nvidia-settings command manually, the screen properties briefly become as if they were set by nvidia-settings, but then goes right back to the default. This happens over a split-second. If I remove nvidia-settings from ~/.xinitrc, the command sets the screen properties normally.

Can anyone else confirm this behavior on Ubuntu Jaunty?

There was another suggestion - to add the nvidia-settings command to the list of startup applications in GNOME. I did that, but the effect was identical to what I described above with ~/.xinitrc.

How should I make nvidia-settings launch at startup so that it sets screen properties properly?

Thanks in advance,
Max Kukartsev

tredegar 08-28-2009 12:31 PM

This Fixup file works for me (but I'm running KDE3 so it's placed in ~/.kde/Autostart )

Code:

tred@vaio:~$ cat Fixup
#!/bin/bash
# Disable the stupid Caps Lock key, and make it "Shift" instead
xmodmap -e "remove Lock = Caps_Lock"
xmodmap -e "add Shift = Caps_Lock"
# load the default nvidia settings (I like a slightly dimmed screen)
nvidia-settings -l
tred@vaio:~$

Note that Fixup needs to have executable permissions set: chmod +x Fixup

maxkukartsev 09-01-2009 08:55 PM

Quote:

Originally Posted by tredegar (Post 3661073)
This Fixup file works for me (but I'm running KDE3 so it's placed in ~/.kde/Autostart )

Code:

tred@vaio:~$ cat Fixup
#!/bin/bash
# Disable the stupid Caps Lock key, and make it "Shift" instead
xmodmap -e "remove Lock = Caps_Lock"
xmodmap -e "add Shift = Caps_Lock"
# load the default nvidia settings (I like a slightly dimmed screen)
nvidia-settings -l
tred@vaio:~$

Note that Fixup needs to have executable permissions set: chmod +x Fixup

The corresponding autostart directory for GNOME is ~/.config/autostart/, and each autostart entry is in *.desktop format.

Code:

$ cat ~/.config/autostart/nvidia-settings.desktop
[Desktop Entry]
Name=nVidia2
Comment=Load nVidia Configuration
Icon=system-run
Exec=nvidia-settings --config=/etc/.nvidia-settings-rc --load-config-only
Terminal=false
Type=Application
OnlyShowIn=GNOME;XFCE;
X-GNOME-Autostart-enabled=true

With this nvidia-settings.desktop file it works now.


All times are GMT -5. The time now is 08:35 AM.