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 [2008/01/30 07:39] 127.0.0.1 external edit |
linux:howtos-tips [2014/03/28 16:18] (current) cyril |
||
---|---|---|---|
Line 99: | Line 99: | ||
<code bash> | <code bash> | ||
xhost +localhost | xhost +localhost | ||
+ | </ | ||
+ | or/and maybe: | ||
+ | <code bash> | ||
+ | xhost local: | ||
</ | </ | ||
Line 396: | Line 400: | ||
If sound works with the speakers, but not with the headphones, check with '' | If sound works with the speakers, but not with the headphones, check with '' | ||
+ | ===== Speakers are not disabled when plugging headphones ===== | ||
+ | |||
+ | If your speakers keep playing sound even if headphones are plugged, check with '' | ||
===== Full screen doesn' | ===== Full screen doesn' | ||
Line 408: | Line 415: | ||
To fix this, kill all '' | To fix this, kill all '' | ||
+ | |||
+ | ====== Configuration ====== | ||
+ | |||
+ | ===== Do not wake up on lid open ===== | ||
+ | |||
+ | Add to / | ||
+ | < | ||
+ | echo " LID" > / | ||
+ | </ | ||
+ | |||
+ | 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 ===== | ||
+ | |||
+ | If your laptop don't physically switch off your screen when the lid is closed, it sends an ACPI event. Your system will probably switch off the screen by software (if it does not uncomment the " | ||
+ | |||
+ | Create / | ||
+ | <code sh> | ||
+ | #!/bin/sh | ||
+ | |||
+ | case `cat / | ||
+ | open) | ||
+ | #vbetool dpms on | ||
+ | DISPLAY=: | ||
+ | ;; | ||
+ | closed) | ||
+ | #xset dpms force off | ||
+ | #vbetool dpms off | ||
+ | DISPLAY=: | ||
+ | ;; | ||
+ | esac | ||
+ | </ | ||
+ | |||
+ | Edit / | ||
+ | <code sh> | ||
+ | case " | ||
+ | | ||
+ | case " | ||
+ | + lid) | ||
+ | + / | ||
+ | + ;; | ||
+ | </ | ||
+ | ===== Lock on wake up ===== | ||
+ | |||
+ | == With hibernate-scripts == | ||
+ | (hibernate-scripts are probably deprecated) | ||
+ | |||
+ | Add to / | ||
+ | < | ||
+ | LockGnomeScreenSaver true | ||
+ | </ | ||
+ | |||
+ | See "man hibernate.conf" | ||
+ | |||
+ | == With pm-utils == | ||
+ | |||
+ | When using the button or when it is automatic apparently gnome-power-manager and gnome-screensaver deals correctly with it if you configure it to lock when lid closed. But it doesn' | ||
+ | |||
+ | So you can add this script / | ||
+ | < | ||
+ | . " | ||
+ | |||
+ | suspend_nm() | ||
+ | { | ||
+ | } | ||
+ | |||
+ | resume_nm() | ||
+ | { | ||
+ | DISPLAY=: | ||
+ | } | ||
+ | |||
+ | case " | ||
+ | hibernate|suspend) | ||
+ | suspend_nm | ||
+ | ;; | ||
+ | thaw|resume) | ||
+ | resume_nm | ||
+ | ;; | ||
+ | *) exit $NA | ||
+ | ;; | ||
+ | esac | ||
+ | </ | ||
+ | |||
+ | A more complete one to automatically detect the user name is available here: | ||
+ | [[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 ===== | ||
+ | |||
+ | Copy and edit / | ||
+ | |||
+ | ===== Root mail alias ===== | ||
+ | |||
+ | Add to / | ||
+ | < | ||
+ | root: < | ||
+ | </ | ||
+ | |||
+ | And execute | ||
+ | < | ||
+ | newaliases | ||
+ | </ | ||
+ | |||
+ | ===== hddtemp ===== | ||
+ | |||
+ | Edit the file / | ||
+ | |||
+ | ===== Gnome Screensaver ===== | ||
+ | |||
+ | If you don't have gnome-session, | ||
+ | <code patch> | ||
+ | -gvalue = gclient.get('/ | ||
+ | +gvalue = gclient.get('/ | ||
+ | </ | ||
+ | |||
+ | ===== Automatically enable/ | ||
+ | |||
+ | disper -s | ||
+ | disper -e | ||
+ | |||
+ | autodisper | ||
+ | |||
+ | for completely automatic with dock: | ||
+ | http:// |