Usb initialize at startup?

Hello,

I am currently starting up my usb mouse using rc.local :

/bin/devu-uhci
/bin/devu-mouse

Then after I boot into photon as root:

/usr/photon/bin/devi-hirun msoft fd -d/dev/usbmouse0


This works really well. Except that I’d really like to have it all done automagically as I boot up.

I tried adding the devi-hirun call into rc.local but it error’d on me at first because /dev/usbmouse0 didn’t exist (which i fixed by putting in a wait (actually a test). But the call still fails because (I believe) photon isn’t running yet.

Is there a photon startup script I can add this call to? Is there another better way to get USB initialized?

Thanks.

K. S. <kristan@magma.ca> wrote:

I am currently starting up my usb mouse using rc.local :
/bin/devu-uhci
/bin/devu-mouse
Then after I boot into photon as root:
/usr/photon/bin/devi-hirun msoft fd -d/dev/usbmouse0
This works really well. Except that I’d really like to have it all done automagically as I boot up.
I tried adding the devi-hirun call into rc.local but it error’d on me at first because /dev/usbmouse0 didn’t exist (which i fixed by putting in a wait (actually a test). But the call still fails because (I believe) photon isn’t running yet.
Is there a photon startup script I can add this call to? Is there another better way to get USB initialized?

To handle this you can create a file in your

'$HOME/.ph/'directory called phapps. This can be done by typing

the following in your ~/.ph directory:

‘touch phapps’

Once this file is created, set it so that it is executable (making it a script file).
‘chmod +x phapps’

You can now edit the file adding the following line:
‘/usr/photon/bin/devi-hirun msoft fd -d/dev/usbmouse0 &’

Note: This file can be used to start any application


-Adam