Opening vim as sudo -i or sudo - still doesn't let me write to the file.
Trying to change the keyboard backlight settings on my laptop gives me this output; even with sudo I can't change anything in it. Even opening the file with sudo I can't change it and save it.
10:00:35 @ ・ー ・
cat sys/class/leds/samsung\:\:kbd_backlight/brightness
4
10:01:28 @ ・ー ・
sudo echo '0' > sys/class/leds/samsung\:\:kbd_backlight/
brightness device/ max_brightness power/ subsystem/ trigger uevent
10:01:28 @ ・ー ・
sudo echo '0' > sys/class/leds/samsung\:\:kbd_backlight/brightness
-bash: sys/class/leds/samsung::kbd_backlight/brightness: Permission denied
10:01:58 @ ・ー ・
Here are the permissions
10:04:15 @ ・ー ・
ll /sys/class/leds/samsung\:\:kbd_backlight/
total 0
drwxr-xr-x 3 root root 0 Oct 22 08:44 ./
drwxr-xr-x 3 root root 0 Oct 22 08:44 ../
-rw-r--r-- 1 root root 4096 Oct 22 08:44 brightness
lrwxrwxrwx 1 root root 0 Oct 22 09:26 device -> ../../../samsung/
-r--r--r-- 1 root root 4096 Oct 22 08:44 max_brightness
drwxr-xr-x 2 root root 0 Oct 22 09:26 power/
lrwxrwxrwx 1 root root 0 Oct 22 09:26 subsystem -> ../../../../../class/leds/
-rw-r--r-- 1 root root 4096 Oct 22 09:26 trigger
-rw-r--r-- 1 root root 4096 Oct 22 08:44 uevent
As you can guess, it's really annoying and it's also killing my battery.
:!echo "$HOME"
vim command output? I guess that runningsudo vim
the context environment is not right. – Lety Oct 23 '14 at 18:13