Astrofriend's homepage


Advertisement /

Tutorial News

My astronomy project:
Kstars and Indi used in an astroserver

(and later also a tutorial if I get this to work)

Build an astroserver based on Linux

  1. Part 1: Change from Windows to a Linux astroserver
  2. Part 2: Collecting information and demands on the astroserver
  3. Part 3: Installation of Ubuntu Mate, setup WIFI
  4. Part 4: Installation of vino VNC, setup screen
  5. Part 5: Installation of Kstars on Raspberry
  6. Part 6: Test of controlling the Canon camera in Kstars/Ekos
  7. Part 7: Test of controlling the mount with INDI EQMod in Kstars/Ekos
  8. Part 8: Coming soon

1: Change from Windows to a Linux astroserver

(I will change and update a lot here when I got more knowledge of what I'm doing)

I take no responsibility or liability for what are written here, you use the information on your own risk!

You maybe have already read about my astroserver project based on a miniPC with Windows operation system:

Windows based astroserver

Nothing wrong with this Windows server, works very well for me. So why change anything?

When looking around on the internet and see what others are doing I have noticed all those small servers that run Indi drivers and controlled by Kstars. They are based on Linux operation system and don't need much capacity from the computer and all software looks to be open source projects. With low demand on the computer you can use a simpler computer, smaller, lower current from battery and cheaper. Most common looks to be Raspberry one card computers:

Raspberry Wiki

You don't have to by an expensive Windows op-system with a Linux solution, it could be important because you maybe divide the system on many small computers.

Back to contents

2: Collecting information and demands on the astroserver

For me that haven't used Unix the last 20 years, it's a very big step to start with Linux. But with help from friends at the Swedish forum Astronet I had solved how to start and what's needed. You can follow the thread here, note: in Swedish language: Swedish forum. Magnus gave me a great introduction to this Linux & Raspberry world over Skype with screen sharing, thanks a lot Magnus!

From friends at Astronet I was provided these links to start with:

Now I also have some demands on the server:

  • I want the server to run independent from my network and overhead computers. I don't want it to go down because of bad network communication.
  • DSLR camera control
  • Mount control
  • Focus stepper motor control
  • Auto guiding
  • Dithering
  • Drift align (polar align)
  • Filter Wheel control (in future)
  • Star atlas with GOTO mount control
  • Sync with plate solving
  • Certainly a lot of other things too

What I'm doing here is a bit different compare to normal installation and more complicated. If you want the system to run over network and have the Kstars installed on the client you will do it in a different way and use other versions of the software, you should not follow this instructions in detail then. My solution will run independent of the network if it goes down, but still I control it over the network.

And with all that information, demands and advices I bought these parts:

Box, Raspberry Pi 3 and microSD 16GB

I found these parts on the Swedish company Webhallen, but there are lot of others places where you can find it.

Webhallen, Sweden

A box in Darth Wader black, a Raspberry Pi 3 (quad processor, 1 Gbyte ram) and a class 10 microSD 16GB memory card. It's amazing, this small computer has HDMI output, four USB ports, Ethernet port, WIFI, Bluetoth and there are even more I/Os too!

There are other more power full one card computers, Odroid is one example, but Raspberry will be a good start for me to get some experience. And it will have enough power to work what I have understood, even with the Kstars and Ekos installed on the server.

Back to contents

Advertisement / Annons:

3: Installation of Ubuntu Mate, setup WIFI

Now it starts to be very complicated for a Windows user as I'm, how to understand how to install and configure these devices with the mix of Windows and Linux system, headache starts!

I have been told to use the software Ubuntu Mate, it's a special version to run the software Kstars and Ekos on the server (Raspberry and Linux). It's small and optimized to run on the Raspberry Pi 2&3.

I try to only have Linux on the Raspberry and only Windows on my laptops. It should work if I only can understand how to configure it.

Read and download from the links below.

Installing Ubuntu Mate:

Windows machine:

Download the Ubuntu Mate and unpack the compressed image file, it will take about 30 minutes, they recommend to use 7-Zip to unpack.

Windows machine:

Format the SD card with SD card Formatter, download from the link below.

Windows machine:

Use Win32 Disk Imager to installed the image file on the SD card, Etcher didn't work for me.

Move the SD card from Windows computer to Raspberry computer.

Raspberry machine:

Connect a HDMI display and an USB keyboard and mouse to Raspberry.

Raspberry machine:

Connect an USB power supply to the micro USB port on Raspberry and power up.

Setup Ubuntu Mate:

Follow the instructions on the Welcome screen.

My settings, yours could be different.

  1. English language
  2. Timezoon +1 hour (Sweden, Stockholm)
  3. Keyboard layout = Swedish
  4. Your name = "Astrofriend"
    Your computer's name = "raspberr"
    Pick a username = "rb01"
    Choose a password = "xxxxxxx"
    Confirm your password = "xxxxxxx"

    Check "Log in automatically"

When finished, press continue and wait, it will take a while when it setup your system.

When the Welcome screen comes up. Now you can "resize" your installation to take full advantage of your memory card, otherwise it will only use a small partition of it.

Click on the big red button "Raspberry Pi Information" on the welcome screen. Click on "Resize Now". Click on red button "Reboot". In the new window, click on "Restart" button. After this you will have full access to all of your SD card memory. Close Welcome window.

Activation of WIFI:

  1. Click on the WIFI symbol on top right
  2. Enable Networkning, Enable Wi-Fi
  3. Click on "Edit Connection"
  4. Click on "Add" button
  5. Choose "Wi-Fi" from dropdown list
  6. Edit Wi-Fi connection, will open automatic
  7. Wi-Fi: Set your Rauter's SSID name
  8. Wi-Fi Security: I use WPA & WPA2 Personal, you maybe something else
  9. Type in your password (WIFI)
  10. Close window

Now your Raspberry should connect to Internet. Do a restart before proceed, click on the start/stop symbol on top most right.

Back to contents

Advertisement / Annons:

4: Installation of vino VNC, setup screen

Read this very well written help PDF file:

Update the Kernel, according to the help file above you should do that.

Open the terminal window. You find it under Applications>System Tools>MATE Terminal:

Read the PDF file above item 14, give the following commands in terminal window, you maybe will be asked to type in your password:

Note: You must have an internet connection to do this!

  1. sudo rpi-update
  2. (type in your password when asked for it)

    This will take several minutes, do a restart when finished.

As I have told earlier I plan to remote control my Raspberry, I tried to use Tight VNC first, but didn't work in my system, but maybe for you. With help from the INDI forum I instead installed the Vino VNC, much better result.

If you didn't set your user account to auto login, read item 8 to 9 in the above help file how to setup auto login to desktop.

Read item 16 to 19 in the above help file for Vino VNC installation. Type in this three commands in terminal window, do a return after each.

  1. sudo apt-get install vino
  2. Type in your password when asked, type in a Y when asked.

  3. vino-preferences
  4. A new window will open up

    Check "Allow other users to view your desktop"

    Check "Allow other users to control your desktop"

    Check "Require a password" and type in your password

    Close windows

  5. gsettings set org.gnome. Vino require-encryption false

Maybe you want setup VNC to auto start, then you don't have to connect any monitor or keybord to Raspberry, you control it from your VNC client.

  1. Open System>Control Center:
  2. Click on "Startup Applications"
  3. Startup Programs: Go to bottom, click on "Add" button
  4. Type in a name "vino VNC"
  5. Browse in file system: usr>lib>vino>vino-server and open
  6. Restart system

You also have to edit the config.txt file to have the correct screen resolution when over remote control with VNC, when in remote you normally don't have any monitor connected and then you need a virtual one.

To edit the config.txt file and some other system files you must be logged in as root, If you haven't already setup a password for root user you do it like this in the terminal:

  1. sudo passwd root
  2. First it will ask for your user password

    Then it asks for new UNIX password

    Then it asks to retype the new UNIX password

Maybe you have to restart your raspberry after this, then from system menu: Log Out and change user to root. You have to type in "root" user. Now you can change config.txt files. Maybe you get an Error message. I just clicked on the OK button, not sure what it's about.

You have the full description here:

Show hidden files with file manager (under Places menu):

Hidden files

It's a bit complicated to find some of the files you need to change if you work with terminal (like old DOS window) because they are hidden. You have to check "Show Hidden Files" on to see them, I did it in the menu window Places>Computer check "Show Hidden Files" under View. And I didn't use the terminal later, I use the files under Places menu, much easier if you are a Windows user like me.

Find config.txt file:

Edit of config.text file

You find the config.txt file under Computer>File System>boot. You are a more serious person than I'm and backup the file before you change anything. Be very careful here, if you do something wrong the machine it maybe don't startup and you have to reinstall everything!

Double click on the config.txt file and then "Display" button.

You will then see this, scroll down to hdmi_force_hotplug

Edit HDMI_force_hotplug=1

Now read item 5 in the PDF file above how to edit this config.txt file. Note how I changed the parameter hdmi_force_hotplug to =1. Don't forget to erase "#" in front of the command you want to use!

Then according to the help file above I changed hdmi_mode to =2, that means it use the DMT part of the resolution table.

Now one last thing to edit, the resolution you want to use. First I tried 1920x1200@60Hz, give me fine big screen to look at, but it slow the system down and I changed once more to a lower resolution, the1368x768@60Hz and now it update the screen faster, this is only a problem in remote mode over VNC. This was the code I used: hdmi_mode=39.

You should set the Power Management also. Open Control Center and click on "Power management" button. Set "Never" on both computer and Display sleep. Close window.

Save your config.txt file and change back from root to your own username, but better to restart your Raspberry.

Back to contents

Advertisement / Annons:

5: Installation of Kstars on Raspberry

Now it's time to install Kstars Bleeding, note: not Kstars! Kstars Bleeding is a special version of Kstars by Jasem Mutlaq, the developer of Ekos, both INDI and Ekos are included in Kstars Bleeding. Note: You must have an internet connection to do this!

Open terminal window in Raspberry and give this three commands with a return for each:

Installing Kstars Bleeding with help from Swedish forum Astronet, thanks Erland! Give the following commands in your terminal, one by one with a return after each:

  1. sudo apt-add-repository ppa:mutlaqja/ppa
  2. Push "Enter" when it ask to continue

  3. sudo apt-get update
  4. sudo apt-get install indi-full kstars-bleeding
  5. Type Y and enter when it ask to continue

I noticed that it was possible to update the system from the System>Administration menu. But when I tried it crashed. When I did it like this it started to update:

Ubuntu software uppdate


  1. System>Administration>Software & Updates
Software and updates

I checked no ones here, goto "Other Software".

Other Software updates

Under Other Software there is already a table of software to check for updates. Click close, maybe it will ask to reload list of updates.

Software and Updates, Reload of cache

Click "Reload" and wait.


  1. System>Administration>Software Updater

Wait until it finished checking available updates:

Softwares updates loading

After a while you get this screen:

Updates ready to install

You will see other updates compare to what I have here, if it's ok click "Install Now" and wait. You will be asked to enter your password. It's wise to do a restart after this. Updates looks to be common, so redo this often.

After this it looks to have been more stable, especially when remote controlling by VNC.

Back to contents

Advertisement / Annons:

6: Test of controlling the Canon camera in Kstars/Ekos

How to setup the INDI and Ekos for your devices you find in the introduction movie by Jasem Mutlaq and linked help files in the beginning of this page.

Before starting to setup the camera you can follow Jasem setup page and do the main configuration:

Jasem's setup guide go through everything, but you can also my specific setup with my equipment.

Now it's only one problem to solve before I can start testing this server:

  • In Kstars/Ekos I can't connect to EQMOD and Canon camera correctly

With help from Magnus I solved the Canon problem, the problem was that it was auto-mounted to the desktop. You must unmount it if this occur.

I have worked out how to do it direct in dconfig editor without using the terminal window, you can open dconf editor from the desktop like this:

Start Dconfig editor

Find the file that has to be reconfigured, org>gnome>desktop>media-handling:

dconf editor edit automount properties

Uncheck the automount and automount-open, looks correct but still it automount for me, I will come back about this. You can still unmount the camera from desktop if it shows up, right click on the icon and unmount, you have to do this every time it shows up. If you have a DSLR camera as I have you should turn off the cameras sleeping mode.

After this I didn't have any big problem to control my camera with Ekos.

Start Kstars and then from tools start Ekos:

Ekos start in Kstars

Make your own profile in Ekos:

Ekos profile editor

Click on the button between the + and - sign. In the new windows that come up, give it a name. I have a Canon camera, maybe you have something else. Connect, save and close the window, don't forget to set mode to local because you have Kstars and Ekos installed on the server if you followed this project/tutorial.

Start INDI, the cameras info about no of pixels will update after your first photo, if not use the update button to the right of the pixel info after you have taken your first image.

Now you have to setup your camera from control panel, look also under Options tab.

Control panel, setup Canon DSLR camera

I will not give any comments about the setup of the Canon camera, we all have different cameras, you will find that at INDI forum or just Google on it.

A great thanks to all that have helped me to come so far, Magnus, Erland, Håkan, Frazze and people from INDI forum!

Back to contents

Advertisement / Annons:

7: Test of controlling the mount with INDI EQMod in Kstars/Ekos

(Under progress)

How to setup the INDI and Ekos for your devices you find in the introduction movie by Jasem Mutlaq and linked help files in the beginning of this page.

Start to read this information about INDI EQMod:

I don't think there is any need to install EQMod, it should already be there if you have downloaded the versions of Ubuntu and Kstars as I did. You can follow the procedure from part 4 above when installing the camera. First select the mount you have in the Profile Editor and save. Then connect.

When I tried to connect to EQMod I got an error.

Ekos connect to EQMod error

I think this is a common problem when first try to start up communication. You must have the right to establish contact or to send command out through the serial port.

Give this command in terminal:

  • sudo adduser $USER dialout

With help from INDI and Jasem, just type it exactly as it is, don't change anything! Then you will be asked to type in your password. If it accepted, restart Raspberry and then try to connect to EQMod once again.

Setup window for EQMod

If you succeed you shall have this window, now you can setup your EQMod or what kind of mount you have.

Ekos EQMod options setup

Under the options menu you find where you setup your main telescope and guide telescope data. I don't know why it's under the EQMod data.

Back to contents