[SOLVED] Need script to autostart xset -dpms Kubuntu 10.04
UbuntuThis forum is for the discussion of Ubuntu Linux.
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.
I installed Kubuntu 10.04 on my PC to try it out. I noticed the monitor shuts off (sleep?)after 10 minutes of inactivity. I have tried changing the gui setting for the monitor but no matter what I set them to it still goes to sleep after 10 minutes. I did find that xset -dpms will keep the monitor active throught the entire session. However, after a restart it will go back to sleep after 10 minutes. Could someone explain to me how to create a script to autostart xset. Please be specific. I had Ubuntu 10.04 in this PC just before installing Kubuntu and didn't have this problem? Many thanks.
Oups, sorry about that.
For KDE, go to ~/.kde/Autostart directory and create a script (give it a name like xset.sh) with the command(s) you want to run:
Make it executable:
chmod +x ~/.kde/Autostart/xset.sh
and restart X.
Thanks, I created a text file called xset.sh. It contains your xset instruction and chmod instructions correct? I put xset.sh in the .kde Autostart folder. I didn't tell .kde where this file is? Does it matter? It's in my home folder.
I'm not sure what you mean by log in to X? I just restarted Kubuntu. Doesn't that also restart X?
Yes, it's the same, depends on the runlevel you use.
Anyway are you sure you've done everything correct?
You can go to: System Settings-> Click the Advanced tab and Autostart and check if everything is as it should be
I just noticed something. In that autostart folder when I double click on xset.sh a small window pops up and has 3 tabs. General, Permissions, and Preview. The Permissions tab shows Owner can read and write but the "is executable" box is not checked. Should it be?
I'm not positive yet but I think this is solved. Here's what I did after running in the terminal. I removed xset.sh from the .kde/autostart folder. I had originally added the script (xset.sh) via System settings,advanced, Autostart. This time I used Dolphin to add the file. I rebooted and waited for 15 minutes and the screen is still active. I think I understand that -dpms disables the monitor sleep mode and keeps the monitor active all the time? Is it safe to assume that any settings in the display setting gui from now on wont be used?
Thank you bathory for your help. I really appreciate it. This is a learning system for me and this is just one step. Hopefully I can wean myself from Windows eventually. This is my ultimate goal.