Hardware Setting up an Orange Pi 3 LTS with EKOS/INDI/KStars

Initial setup (Ubuntu image)

The OrangePI 3 LTS used in this article is the 2GB version.
When you get your Orange Pi 3 LTS, I'd recommend using an Ubuntu image instead of the Debian. I spent 8 hours trying to get the Debian image that was available at the time my Orange Pi can in to work with tightVNC, and never could. Once I used BalenaEtcher to install Ubuntu Jammy I had no issues. I will detail the issues that I had with the Debian install at the end of the article. This is primarily targeted at using Ubuntu Jammy with the Orange Pi LTS.

After installing the Ubuntu image on your SD card, you can start the Orange Pi up. It comes loaded with SSH, so you can use that to log in, or you can do like I did and simply hook an HDMI capable display up and a keyboard and mouse for direct access.
The default login info for the Orange Pi is
Username orangepi
Password orangepi
Once you are logged in (the Ubuntu install automatically logs you in when using a display and keyboard mouse upon boot up.
You will need to open a terminal window and make sure you update to the latest of the operating system.

Code:
sudo apt-get update
sudo apt-get upgrade

To set up the VNC server on Ubuntu Jammy

Install the XFonts base used by tightVNC (this may already be installed)
sudo apt-get install xfonts-base

Install tightVNC server
sudo apt-get install tightvncserver

This is where I strayed from most of the guides that tell you to set up a user for VNC. Since I already had the default orangepi user, I simply set up the :1 for that user.
So, while logged in as orangepi I ran
Code:
vncserver :1
You will be prompted to create a password for access. Keep it less than 8 characters. You will also be asked if you want set up a view only password, which I chose not to do.
You can create a user of your own if you choose to.

Once you have done this, you should be able to connect to the instance for the orangepi user by using
IP_Address:5901 in your VNC client on your remote system. I would suggest testing to make sure you can connect at this point.

Now, to get tightVNC to autostart, you will need to do a few more things.
The VERY first thing you need to do is add your orangepi user (or the one you created) into the sudo group by
sudo gpasswd -a orangepi sudo

Create a service by creating the below file (which will be an actual script when done)
Code:
sudo nano /usr/local/bin/tightvncserver
(note, I use joe personally instead of nano as it uses the old WorsStar combos)

In that file you need to have
Bash:
#!/bin/bash
PATH="$PATH:/usr/bin/"
DISPLAY="1"
DEPTH="16"
GEOMETRY="1024x768"
OPTIONS="-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}"

case "$1" in
start)
/usr/bin/vncserver ${OPTIONS}
;;

stop)
/usr/bin/vncserver -kill :${DISPLAY}
;;

restart)
$0 stop
$0 start
;;
esac
exit 0

You now need to make this file executable (to be a script)
Code:
sudo chmod +x /usr/local/bin/tightvncserver

Now you need to set up the Systemd process to start it automatically (again, you can use any text based editor you are comfortable with, nano, vi or joe as examples)
Code:
sudo nano /lib/systemd/system/tightvncserver.service

This file needs to contain the following information

Code:
[Unit]
Description=Manage tightVNC Server

[Service]
Type=forking
ExecStart=/usr/local/bin/tightvncserver start
ExecStop=/usr/local/bin/tightvncserver stop
ExecReload=/usr/local/bin/tightvncserver restart
User=orangepi

[Install]
WantedBy=multi-user.target

Be sure to change your user to whatever you ran the vncserver :1 command under.

The next step to do is restart Systemd and enable the tightvnc server process
Code:
sudo systemctl daemon-reload
sudo systemctl enable tightvncserver.service


You have the basic commands that most services use under Linux for stopping, starting and restarting
to start sudo systemctl start tightvncserver.service
to stop sudo systemctl stop tightvncserver.service
to restart sudo systemctl restart tightvncserver.service
and to get status sudo systemctl status tightvncserver.service

Now all you have to do is reboot your Orange Pi and it should have tightVNC up and running.
About author
Tracy
I've been interested in astronomy since I was in Jr. High (graduated in the early 80's).
It wasn't until I retired that I was able to really get into it due to monetary and time constraints.

Comments

Hi Tracy, total Linux newbie here but I was proficient in DOS back in the day. I just received my Orange Pi 3 LTS a few days ago and I'm going to give this a try. How do we set up an Indi Server only with the client software running on a remote PC? Do you think an Orange Pi Zero 2 would handle that ?
 

Guide information

Author
Tracy Perry
Article read time
9 min read
Views
3,098
Comments
1
Last update

More in Guides

More from Tracy Perry

Share this guide

Top