Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:howtos-tips [2011/12/21 21:09] cyril [Keep screen off when lid shut] |
linux:howtos-tips [2014/03/28 16:18] cyril |
||
---|---|---|---|
Line 99: | Line 99: | ||
<code bash> | <code bash> | ||
xhost +localhost | xhost +localhost | ||
+ | </ | ||
+ | or/and maybe: | ||
+ | <code bash> | ||
+ | xhost local: | ||
</ | </ | ||
Line 423: | Line 427: | ||
Ensure that the file misc.start is executable. | Ensure that the file misc.start is executable. | ||
+ | ===== Fix laptop wakes up immediately after suspend ===== | ||
+ | |||
+ | May be due to some USB devices, even if not plugged. Look if some USB* or EHC* or XHC* are enabled in ''/ | ||
+ | echo EHC1 > / | ||
+ | </ | ||
+ | |||
+ | You can run it in a script at boot time right before suspending:< | ||
+ | for usb in " | ||
+ | state=`cat / | ||
+ | echo " | ||
+ | if [ " | ||
+ | done | ||
+ | </ | ||
===== Keep screen off when lid shut ===== | ===== Keep screen off when lid shut ===== | ||
Line 434: | Line 451: | ||
open) | open) | ||
#vbetool dpms on | #vbetool dpms on | ||
- | DISPLAY=: | + | DISPLAY=: |
;; | ;; | ||
closed) | closed) | ||
#xset dpms force off | #xset dpms force off | ||
#vbetool dpms off | #vbetool dpms off | ||
- | DISPLAY=: | + | DISPLAY=: |
;; | ;; | ||
esac | esac | ||
Line 479: | Line 496: | ||
resume_nm() | resume_nm() | ||
{ | { | ||
- | su cyril -c " | + | |
} | } | ||
Line 496: | Line 513: | ||
A more complete one to automatically detect the user name is available here: | A more complete one to automatically detect the user name is available here: | ||
[[https:// | [[https:// | ||
+ | |||
+ | |||
+ | == With systemd == | ||
+ | |||
+ | Create service ''/ | ||
+ | [Unit] | ||
+ | Description=Lock X session using slimlock | ||
+ | |||
+ | [Service] | ||
+ | User=cyril | ||
+ | ExecStart=/ | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=sleep.target | ||
+ | </ | ||
+ | |||
+ | Ensure right permissions and enable it:< | ||
+ | chmod a+r / | ||
+ | systemctl enable slimlock | ||
+ | </ | ||
+ | |||
+ | Now when you suspend the system with '' | ||
+ | |||
===== Hard Drive power management ===== | ===== Hard Drive power management ===== | ||
Line 524: | Line 564: | ||
+gvalue = gclient.get('/ | +gvalue = gclient.get('/ | ||
</ | </ | ||
+ | |||
+ | ===== Automatically enable/ | ||
+ | |||
+ | disper -s | ||
+ | disper -e | ||
+ | |||
+ | autodisper | ||
+ | |||
+ | for completely automatic with dock: | ||
+ | http:// |