[SOLVED] Need script to autostart xset -dpms Kubuntu 10.04
UbuntuThis forum is for the discussion of Ubuntu 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.
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:
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:
Code:
#!/bin/sh
xset -dpms
Make it executable:
Code:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.