Author Topic: [SOLVED] Turn ON lxdpms when boot  (Read 1059 times)

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 359
[SOLVED] Turn ON lxdpms when boot
« on: March 13, 2012, 05:46:42 AM »
Hi friends,

now I am with my netbook and PCLOS LXDE run fine, but.... lxdpms is OFF when I but and I have to turn ON.

In my laptop lxdpms was ON when I boot by default. Why in my netbook is different and how configure lxdpms "enabled" automatically when start?
« Last Edit: March 14, 2012, 01:10:03 PM by Aleph »

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3729
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: Turn ON lxdpms when boot
« Reply #1 on: March 13, 2012, 11:42:02 AM »
try lxautostart, click on advanced, and type in entry line

Code: [Select]
lxdpms &
click on ok. Logout/in

Regards...

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 359
Re: Turn ON lxdpms when boot
« Reply #2 on: March 13, 2012, 03:18:02 PM »
Hi Leiche,

is better... now when log in a lxdpms message said "Lxdpms is enabled" and I have to do OK...

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3729
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: Turn ON lxdpms when boot
« Reply #3 on: March 13, 2012, 03:20:09 PM »
Which Version is installed?

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 359
Re: Turn ON lxdpms when boot
« Reply #4 on: March 13, 2012, 03:26:10 PM »
The 0.1.3-1

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3729
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: Turn ON lxdpms when boot
« Reply #5 on: March 13, 2012, 03:29:09 PM »
Then open the file /usr/bin/lxdpms
and set in line 43, and 44 a #

You must have root privilegs for do this

As sample

Code: [Select]
#yad --text=$"Energy Star is disabled" --button="gtk-ok:0" \
#--window-icon=$ICONOFF --image=$ICONOFF --title=$TITLE

and you don't must click in future of ok

Regards...

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3729
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: Turn ON lxdpms when boot
« Reply #6 on: March 13, 2012, 03:43:30 PM »
ahhhhh...., can it be sin, you have in BIOS deactivated Energy Star on your netbook?

ps.
not 43, and 44
You have do do it in line 52, and 53... (no body is perfect...) ;)

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 359
Re: Turn ON lxdpms when boot
« Reply #7 on: March 13, 2012, 03:58:34 PM »
Quote
you have in BIOS deactivated Energy Star on your netbook?

I don't know...  Should I see it?

Quote
You have do do it in line 52, and 53... (no body is perfect...)

Now I don't have massage!!

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3729
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: Turn ON lxdpms when boot
« Reply #8 on: March 13, 2012, 04:02:24 PM »
First question, maybe...

Second solution, if you like messages remove # from line 43, and 44, and You get a messages, when if disabled EnergyStar on your netbook

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 359
Re: Turn ON lxdpms when boot
« Reply #9 on: March 14, 2012, 02:23:35 AM »
Hi Leiche,

sorry, yesterday I had to stop...

Now lxdpms is like is in my laptop, Enabled when boot, and I can get icons when is disabled.

I was looking for  a reference to Energy Star at BIOS but I could not find. How can I know if is deactivated?

How can I know if Lxdpms is working properly in my netbook?


Regards! :)

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3729
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: Turn ON lxdpms when boot
« Reply #10 on: March 14, 2012, 10:50:11 AM »
This is really simple, there is no Icon on your systray. If an Icon on your systray, you know EnergyStar is disable  ;)

But if you like an Icon for enable status, try

Code: [Select]
#!/bin/bash
#
# Toggle Energy Star off or on.
# It makes sense when watching movies.
#
# Author: D-M-Wilhelm
# Icons: Neal Brooks
# Tester: Neal Brooks
# Suggestions: Neal Brooks
# Licence: GPL
# First build: Wed Dec 28 2011
# Build under PCLinuxOS-LXDE
# Copyright 2011-2012
########################################################################
ICONON="/usr/share/icons/lxdpms-on.png"
ICONOFF="/usr/share/icons/lxdpms-off.png"
TITLE=lxdpms
ON=$( xset q | grep Enabled | cut -d " " -f5)
KI1=$(ps -ejH | grep -A2  lxdpms | grep yad | cut -d " " -f1,2)
export TEXTDOMAIN=lxdpms
export TEXTDOMAINDIR="/usr/share/locale"


function Real ()
{
xterm -hold -title $"lxdpms_real_status" -e xset q
}
export -f Real

if [ "$ON" = "Enabled" ]; then
xset -dpms
#yad --text=$"Energy Star is disabled" --button="gtk-ok:0" \
#--window-icon=$ICONOFF --image=$ICONOFF --title=$TITLE
else
xset +dpms
yad --text=$"Energy Star is enabled" --button="gtk-ok:0" \
--window-icon=$ICONON --image=$ICONON --title=$TITLE
yad --window-icon=$ICONON --image=$ICONON --title=$TITLE \
--notification --text=$"Energy Star enabled" \
--command='yad --title='$TITLE' --form --field '$"Turn_On:btn"' \
--field '$"Real_Status:btn"' \
--button="gtk-close:0" --width=200  --window-icon='$ICONON' \
--image='$ICONON' "sh -c Real"'

fi


Copy'n'paste for your actually /usr/bin/lxdpms ( don't forget, you must do this as root)

Regards...

 ps. removed exit function

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 359
Re: Turn ON lxdpms when boot
« Reply #11 on: March 14, 2012, 12:22:26 PM »
Hi Leiche,

I did, I changed the code and now I have the icon ON on the systray, but... :

- I get again the message for Turn ON when boot. I could solve it adding # like before.

- I can't turn OFF. Is no important Turn off for my, I thing is better always ON, but I can't turn off. When I do click on the ON icon a message said "Turn ON" (?) I do click an a message appear with the real status report...

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3729
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: Turn ON lxdpms when boot
« Reply #12 on: March 14, 2012, 12:29:25 PM »
Remove this code

 
Code: [Select]
--field '$"Turn_On:btn"'
You want to turn off, too?

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 359
Re: Turn ON lxdpms when boot
« Reply #13 on: March 14, 2012, 12:50:26 PM »
Now only the Real Status is available when I do click on the icon ON :)

And I have the icon ON when boot and the message doesn't appear more. Fantastic!! :)

Quote
You want to turn off, too?

What do you thing?

For me is ok always ON...
« Last Edit: March 14, 2012, 01:02:14 PM by Aleph »

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3729
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: Turn ON lxdpms when boot
« Reply #14 on: March 14, 2012, 01:03:37 PM »
It is your baby ;)

When it is solved, so is it solved  ;D