Need script to autostart xset -dpms Kubuntu 10.04
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.
|
Hi,
You can go to: System->Preferences->Sessions->Startup Programs, use "Add" and add "xset -dpms" Regards |
Quote:
|
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 Code:
chmod +x ~/.kde/Autostart/xset.sh |
Quote:
|
Sure, it's ok in your homedir.
Now when you login into X, dpms will be disabled Cheers |
I got an error after restart. Error launching /USR/share/applications/kde4/desktop. Klauncher is not running or it failed to start the application.
|
I'm not sure what you mean by log in to X? I just restarted Kubuntu. Doesn't that also restart X?
|
Quote:
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 |
From system,advanced, autostart. The xset.sh text file is there. Status says enabled and run at startup. This is the actual contents of xset.sh:
Code:
#!/bin/sh Is there a way to see if the code is being executed step by step? |
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 tried to execute this code from the terminal and got this:
Code:
jim@learn:~$ xset -dpms |
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. |
Glad to see you've made it.
Just to clarify some things: 1. The script code is Code:
#!/bin/sh Code:
chmod +x ~/.kde/Autostart/xset.sh 3. To test the script, you can run: Code:
~/.kde/Autostart/xset.sh |
All times are GMT -5. The time now is 10:47 AM. |