User Tools

  • (equal to forum credentials)

Site Tools


faq

This is an old revision of the document!


FAQ

This page contains answers and solutions to Frequently Asked Questions and/or common issues.

Changing SSH port

“How do I change the SSH port?”

On XBian the SSH daemon runs behind inetd. That's why you have to change the listening port in /etc/services instead of in /etc/ssh/sshd_config. Alternatively you can configure SSH to start in standalone mode - that way you can still use the /etc/ssh/sshd_config file to set the port.

Changing SSH port when using inetd

Edit /etc/services with your preferred text editor and find the following 2 lines:

ssh        22/tcp                # SSH Remote Login Protocol
ssh        22/udp

Then change ”22” to your desired port. Afterwards restart inetd to apply the change:

$ sudo restart openbsd-inetd

Changing SSH port when using standalone mode

To enable the standalone mode, remove the line ”manual” from /etc/init/ssh-hid.override. You can now change the port in /etc/ssh/sshd_config and then start the service with

$ sudo start ssh-hid

Run a script at startup

“How do I get a script running automatically at startup?”

The easiest way to do so, is editing the file /etc/rc.local. In this file you can put in any command you want to run at startup. There are three important things you have to consider:

  • your command must be put before the line exit(0)
  • by default commands in /etc/rc.local are executed as root
  • to keep the command running in the background you have to end the command with an &

Example:

If you want to run the script as user xbian and keep the script running in the background, you have to add a line like this:

su xbian -c "/path/script &"

before the exit(0) line in /etc/rc.local.

If you want to run the script as root, adding the part in the quotes (/path/script &) is already enough.
If it's a command which shouldn't stay running in the background, you have to remove the & sign at the end.

CuBox-I cmdline paramaters

Edit the /boot/boot.src.txt'file and run /boot/mks afterwards.

CuBox-I HDMI2VGA adapter

If you are using one of these adapters, you may need to change the /boot/boot.src.txt file from:

setenv baseconfig ahci_imx.hotplug=1 raid=noautodetect telnet root=/dev/mmcblk0p2 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB25 rootwait consoleblank=0 selinux=0 nohdparm splash
to
setenv baseconfig ahci_imx.hotplug=1 raid=noautodetect telnet root=/dev/mmcblk0p2 video=mxcfb0:dev=hdmi,1280x720@60,if=RGB565 rootwait consoleblank=0 selinux=0 nohdparm splash

If you video mode is incorrect, it can result in a reboot loop.

faq.1404297953.txt.gz · Last modified: 2014/07/02 12:45 by curlymo