SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Well, that script seems to work great as long as X is running. My only complaint (beyond it requiring X) is that when I open the lid, I can no longer click with the track pad -- I have to use the buttons.
Edit-
Another problem: the script only works once! I can hit the lid button as many times as I want and nothing happens. /proc/acpi/button/lid/LID/state still reads the status correctly.
Last edited by Pig Monkey; 03-16-2005 at 07:41 PM.
I'm not starting it at all. I moved it into /etc/rc.d
Doesn't that load it automatically?
nope. make sure you added execute permission (chmod +x /etc/rc.d/rc.myscript) first. then decide where you want to call it. i suppose a fairly safe place would be rc.local, but other ppl probably have more suggestions. so anyway, open up rc.local and add a line starting your script:
Ok, I did that. At first it couldn't find xset (not in root's path, I guess), but I changed it to the full location in the script (/usr/X11R6/bin/xset) and fixed that problem. Now the script appears to run but do nothing. Whether it launches through rc.local or I launch it myself (both as user and root), nothing happens. It returns no errors, but hitting the lid button does nothing.
Before I still had the power management enabled in KDE's control center, which is why I saw it doing something. Strangely, that seemed to work better than it ever had before (it actually went to sleep and woke back up, only with the previously mentioned problems of only working once and not being able to click with the trackpad) and I'm not sure what I've done to cause that.
Everything is commented out in /etc/acpi/events/default and when testing the script I disabled everything in KDE's power control.
Yes you are right. This script will only work when X is running. I am currently looking for a way to fix that.. It would have to be completely different though, seeing as the only thing I am really doing is monitoring the state and running the x command to turn off the display.
This script will work with acpid running and I believe it has to have acpid running to work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.