Help - Search - Members - Calendar
Full Version: Basic Hotplug Questions
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
jbruno
I've noticed that when I plug my SL6000 into the USB cradle while the Zaurus is powered on, my usbd0 interface comes up properly (SL6000 as dhcpcd client talking to Windows XP which is using Internet Connection Sharing).

This works ok.

However, when I remove the zaurus from the cradle (while powered on) - then the usbd0 interface remains up (it never runs the /etc/hotplug/usbd.func script file in this case). How can I fix this?

Also, I tried making the screen rotate when I insert the 6000 into the cradle, but it doesn't work (xrandr says: "Can't open display"). I added the xrandr call to the /etc/hotplug/usbd.func script.

I also tried starting the VNC server from that script, but that also fails.

How can I rotate the screen and start the VNC server (if X is up) when the 6000 is inserted into the cradle?

Thanks for any help!
jbruno
Ok, I have this working now so that two things happen when I insert the SL6000 into the USB cradle (talking to Windows XP)

1) The screen rotates with xrandr

To get this to work from /etc/hotplub/usbd.func, I had to setup the environment a bit, like so:

CODE
       # Screen rotate
       if [ "$ROTATE" = "yes" ]; then
           export HOME="/home/root"
           export PATH="$PATH:/usr/X11R6/bin"
           DISPLAY=:0 /usr/X11R6/bin/xrandr -o normal >> /etc/hotplug/usbd.log 2>&1
       fi


2) VNC Server launched

Same fix as above:
CODE
       # VNC Server
       if [ "$VNCSERVER" = "yes" ]; then
           DISPLAY=:0 /usr/local/bin/x11vnc_control stop >> /etc/hotplug/usbd.log 2>&1
       fi


The problem I'm still having is that when I remove the Zaurus from the cradle, the hotplug events don't seem to work.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.