OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Basic Hotplug Questions, xrandr not working from hotplug scripts
jbruno
post Jan 10 2006, 07:05 AM
Post #1





Group: Members
Posts: 98
Joined: 16-March 04
Member No.: 2,351



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!
Go to the top of the page
 
+Quote Post
jbruno
post Jan 11 2006, 12:59 PM
Post #2





Group: Members
Posts: 98
Joined: 16-March 04
Member No.: 2,351



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.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 27th December 2014 - 01:29 PM