Kodi Community Forum

Full Version: [SOLVED] I need to run a command at boot.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!!!! this is my first post and i do it here because i don't find the answer .

I have installed xbmcbuntu and it works very very well but i need to use it remotely. I need to use it in graphic mode not in terminal vis ssh or similar.

I have found this instructions and it works fantastic but i need the system execute this command at the beginning (in a terminal, i use Terminator):

x11vnc -forever -usepw -httpdir /usr/share/vnc-java/ -httpport 5800

(source: h**p://lifehacker.com/317125/set-up-vnc-on-ubuntu-in-four-steps)

Then i use TightVNC to connect from a windows 7 PC.

This way works great but when i reboot the xbmc i have to type the command again to do the remote works.

I don't know how to do this automatically without my intervention.

I have tried it in xbmcbuntu but i don't know if this works when the system boot into xbmc.

Can you help meHuh Thank you very much.

PD: i hope you can understand me, i'm spanish and my english is not very good. (but sometimes better than google traductor) Wink
Try this.
Edit file /etc/rc.local

sudo nano /etc/rc.local

Add your command BEFORE exit 0

...

x11vnc -forever -usepw -httpdir /usr/share/vnc-java/ -httpport 5800
exit 0


Reboot
ok, i'll try it.

thank you!!!!!!
Not Works. ...... i have logged in with UBUNTU shell and in this shell IT WORKS!!!! but when i logged out and logged in in xbmc session nothing. It seems that when i close the gnome shell the script closes and it's only valid for gnome session.

is possible that this can not be done in xbmc shell??

other way it could be that the pc inits in UBUNTU shell and add xbmc runs at start. But UBUNTU shell spends more memory than xbmc shell, ins't it?? (the PC only have 1GB ram)

Any ideasHuh
well i have done it logging into ubuntu shell and put the command and the xbmc in startup applications.

In this way this works fine and for me it's ok.

Thanks for your help!!