Wido wrote:
> Hi there folks. First than all, when started to worte this e.mail i
> realised that i've never thank when i asked here, so, to all of you,
> thanks :) (karma point for my :P?)
> second, i'm trying lock my desk when closing my notebook (or laptop,
> choose the name) using ACPi. I'm using debian lenny, acpi are
> installed and working fine, auto-lock an manual-lock works fine. I
> tried the "enlightenment_remote -lock-desktop, but that command only
> runs with my user, when I run thru ACPI i get the a message:
>
> "The E_IPC_SOCKET environment variable is not set. This is
> exported by Enlightenment to all processes it launches.
> This environment variable must be set and must point to
> Enlightenment's IPC socket file (minus port number).
> ERROR: Enlightenment_remote cannot set up the IPC socket.
> Maybe try the '-display :0.0' option?"
>
> i put the "-display" option, but still get the same. If I run the
> enlightenment_remote command as root, I get the same error. Is there a
> woraround or something?
>
>
> ps: the full lid.sh script is like thi (don't kown if is useful for
> something)
>
> [code=/etc/acpi/lid.sh]
>
> #!/bin/sh
>
> test -f /usr/share/acpi-support/power-funcs || exit 0
>
> . /usr/share/acpi-support/power-funcs
> . /usr/share/acpi-support/policy-funcs
> . /etc/default/acpi-support
>
> [ -x /etc/acpi/local/lid.sh.pre ] && /etc/acpi/local/lid.sh.pre
>
> if [ `CheckPolicy` = 0 ]; then exit; fi
>
> grep -q closed /proc/acpi/button/lid/*/state
> if [ $? = 0 ]
> then
> for x in /tmp/.X11-unix/*; do
> displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
> getXconsole;
> if [ x"$XAUTHORITY" != x"" ]; then
> export DISPLAY=":$displaynum"
> . /usr/share/acpi-support/screenblank
> fi
> if pidof enlightenment > /dev/null; then #added by my
> enlightenment_remote -lock-desktop > /root/test ##added by my,
> redireccion is used to test output, it wont be there later
> fi
> done
> else
> if [ x$RADEON_LIGHT = xtrue ]; then
> [ -x /usr/sbin/radeontool ] && radeontool light on
> fi
> for x in /tmp/.X11-unix/*; do
> displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
> getXconsole;
> if [ x"$XAUTHORITY" != x"" ]; then
> export DISPLAY=":$displaynum"
> grep -q off-line /proc/acpi/ac_adapter/*/state
> if [ $? = 1 ]
> then
> if pidof xscreensaver > /dev/null; then
> su $user -c "xscreensaver-command -unthrottle"
> fi
> fi
> if [ `pidof xscreensaver` ]; then
> su $user -c "xscreensaver-command -deactivate"
> fi
> su $user -c "xset dpms force on"
>
> # Press LEFT SHIFT. On some laptops / in some configurations forcing
> # the DPMS on is not enough, X needs to be convinced to unblank the
> # screen. The left shift key is probably the most harmless key we
> # could press. :-)
> acpi_fakekey 42
> fi
> done
> fi
> [ -x /etc/acpi/local/lid.sh.post ] && /etc/acpi/local/lid.sh.post
>
>
> [/code]
>
> thanks in advance
>
Hi,
The problem is that the environment variable E_IPC_SOCKET is not
available from your acpi script. Add the following lines to your script
(this is part of my acpi script hence it has some other wm/de too listed
in it):
if ps -e | grep -q -E '(enlightenment|kwin|dwm)'; then
X_USER=`/usr/bin/who | /bin/sed -n "s,^\(.*\):0 .*$,\1,p"`
X_USER=${X_USER/ /};
fi
if [[ -n $X_USER ]]; then
E_IPC_SOCKET=`ls -c1 /tmp/enlightenment-$X_USER | head -n 1`;
export
E_IPC_SOCKET="/tmp/enlightenment-$X_USER/${E_IPC_SOCKET%\|*}";
export DISPLAY=:0.0
fi
Hope that helps.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-users