1

I made a cool alias out of an xrandr command I found on the internet in order to adjust my screen brightness on my laptop from the command line.

However, when I press Ctrl+Alt+F3 into a CLI mode the command doesn't work. I was hoping to find a way to adjust screen brightness while not using the GUI. Is it possible? If not, what brightness level is it set to by default?

Using Ubuntu 18.04.1 LTS.

Edit:

So it looks like switching back to the GUI and adjusting the brightness (either with the widget or the command) also adjusts it for the CLI mode. But I'd like to be able to adjust it entirely without the GUI and the xrandr command does not work in CLI mode. Any ideas?

Kulfy
  • 17,416
  • 26
  • 64
  • 103
  • if you prefer always tty3.. make default tempersture once and it will always start with that value.. ` `gsettings` is working in tty.. other commands are not working. i tried a way to restrat tty but no success.. to restart tty we are going to tty2 and coming back to tty3. it is just pressing keys only know. even if we write scripts.. it should do the same process to refresh tty after running `gsettings` – PRATAP Dec 15 '18 at 19:27

1 Answers1

2

xrandr only applies gamma correction.

To change brightness in gnome, use the gdbus command or write it in a script. Eg: To set the brightness to 20,

gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.freedesktop.DBus.Properties.Set org.gnome.SettingsDaemon.Power.Screen Brightness "<int32 20>"