Re: Spawning Xdialogs from devd...
On Wed, 30 Apr 2008 11:18:22 +0200 (CEST), Wojciech Puchar <[EMAIL PROTECTED]> wrote: > > Even if running X under root, it's the same behaviour. Unless devd is > > restarted, there is no sound or xdialogs. If I restart devd from > > another console, then the sound device becomes available and sound can > > do you restart devd from xterm? if so - DISPLAY gets set If I set DISPLAY first in .cshrc, there's no difference. Also, if I set DISPLAY in another console before restarting devd, still same case as before. Also, how about the sound? Is it that devd can't hook into the drivers in question so early in the boot process or something? > > > > be heard, but no Xdialogs. If devd is restarted from within X, then > > both sound and Xdialogs are ok. This is with any window manager, and > > nothing much else is running here to screw things up. > > > > The script is definitely being run on the keypress each time. There's > > obviously something I'm missing about devd here. > > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Spawning Xdialogs from devd...
Even if running X under root, it's the same behaviour. Unless devd is restarted, there is no sound or xdialogs. If I restart devd from another console, then the sound device becomes available and sound can do you restart devd from xterm? if so - DISPLAY gets set be heard, but no Xdialogs. If devd is restarted from within X, then both sound and Xdialogs are ok. This is with any window manager, and nothing much else is running here to screw things up. The script is definitely being run on the keypress each time. There's obviously something I'm missing about devd here. ln -s /home//.Xuathority to /root/.Xauthority and of course add DISPLAY=:0 before Xdialog ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Spawning Xdialogs from devd...
On Wed, 30 Apr 2008 08:25:04 +0200 (CEST), Wojciech Puchar <[EMAIL PROTECTED]> wrote: > > I'm curious to know what is actually going on here. I wouldn't have thought > > the context from which devd is restarted would make any difference, but > > clearly it does. Any clues? > > > > Also, does anyone have any ideas how I can call Xdialog to get the windows > > displayed? > > > > you run Xdialog from root (devd is root), you run X from user. Even if running X under root, it's the same behaviour. Unless devd is restarted, there is no sound or xdialogs. If I restart devd from another console, then the sound device becomes available and sound can be heard, but no Xdialogs. If devd is restarted from within X, then both sound and Xdialogs are ok. This is with any window manager, and nothing much else is running here to screw things up. The script is definitely being run on the keypress each time. There's obviously something I'm missing about devd here. > > ln -s /home//.Xuathority to /root/.Xauthority > > and of course add > > DISPLAY=:0 before Xdialog > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Spawning Xdialogs from devd...
match "subsystem" "IBM"; action "/root/bin/acpi_oem_exec.sh $notify ibm"; }; I'm curious to know what is actually going on here. I wouldn't have thought the context from which devd is restarted would make any difference, but clearly it does. Any clues? Also, does anyone have any ideas how I can call Xdialog to get the windows displayed? you run Xdialog from root (devd is root), you run X from user. ln -s /home//.Xuathority to /root/.Xauthority and of course add DISPLAY=:0 before Xdialog ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Spawning Xdialogs from devd...
G'day. This is an X61 laptop, and I'm trying to use the Fn keys to call scripts to do various jobs, while informing users or getting input using Xdialog popups. Here's an example case. Rebooting the pc if pressing Fn+F4. [/etc/devd.conf] ... notify 10 { match "system" "ACPI"; match "subsystem" "IBM"; action "/root/bin/acpi_oem_exec.sh $notify ibm"; }; [/root/bin/acpi_oem_exec.sh] ... #!/bin/sh NOTIFY=`echo $1` case ${NOTIFY} in 0x04) /home/rep/bin/script.sh & MESSAGE="do script" ;; *) MESSAGE="nothing found" ;; esac ... [/etc/sysctl.conf] ... dev.acpi_ibm.0.events=1 [/home/rep/bin/reboot.sh] ... #!/bin/sh if [ ! -f /tmp/reboot ] ; then touch /tmp/reboot title="Reboot computer" msg="Laptop is rebooting immediately..." Xdialog --title "$title" --beep --ok-label "OK" --infobox "$msg" 5 40 2000 > /dev/null 2>&1 wavplay /home/rep/sounds/shutdown.wav > /dev/null 2>&1 shutdown -r now fi exit 0 >From a fresh boot and startx, pressing Fn+F4 from the window manager (Window >Maker) calls the script and executes, but no Xdialog or sound. If I startx and >run devd in the foreground with: sh /etc/rc.d/devd stop && devd -dD\ all is fine, Xdialogs displayed and sound too. Likewise, if I restart devd from an xterm (sh /etc/rc.d/devd restart), all is fine: However, if I restart devd from an ssh term or another console, only sound, no Xdialogs. I'm curious to know what is actually going on here. I wouldn't have thought the context from which devd is restarted would make any difference, but clearly it does. Any clues? Also, does anyone have any ideas how I can call Xdialog to get the windows displayed? Many thanks, Gary --- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"