Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Configuration of linux box for remote observatory with indi/indiwebmanager/vnc/webvnc, ...
# Instalation guide
### solve locale problem on computer
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
sudo dpkg-reconfigure locales
### Setup automatic time update toward UTC
sudo apt-get install ntp
To modify the systems to use UTC time, edit /etc/default/rcS setting UTC=yes.
###Install Kstars
sudo apt-add-repository ppa:mutlaqja/ppa
sudo apt-get update
sudo apt-get install kstars-bleeding
###Install libgphoto2
sudo apt-add-repository ppa:mutlaqja/libgphoto2
sudo apt-get update
sudo apt-get install gphoto2 libgphoto2-dev
one can test gphoto2 with
gphoto2 --auto-detect
gphoto2 --capture-image-and-download --filename "test.jpg"
###Build indi from sources:
To build libindi, first install the following packages:
sudo apt-get install cdbs libftdi1-dev libcfitsio-dev libnova-dev libusb-1.0-0-dev libjpeg-dev libusb-dev libtiff5-dev libftdi-dev fxload libkrb5-dev libcurl4-gnutls-dev libraw-dev libgsl0-dev dkms libboost-regex-dev libgps-dev libdc1394-22-dev
mkdir ~/Projects
cd ~/Projects
git clone
mkdir -p build/libindi
cd build/libindi
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ~/Projects/indi/libindi
sudo make install
###Third part soft for driving eqmod mounts
cd ~/Projects
mkdir -p build/indi-eqmod
cd build/indi-eqmod
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ~/Projects/indi/3rdparty/indi-eqmod
###Other 3rd party apps/driver
mkdir -p build/3rdparty
cd build/3rdparty
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ../../3rdparty/
###Install for ekos
sudo apt install libastrometry* libnova* astrometry-*
##Install PHD2 for autoguiding
sudo apt-add-repository ppa:pch/phd2
sudo apt-get update
sudo apt-get install phd2
## Webserver for indi
sudo apt-get -y install python-requests python-psutil python-bottle
git clone
cd indiwebmanager/servermanager/
## Usage
The INDI Web Manager can run as a standalone server. It can be started manually by invoking python:
$ cd servermanager
$ python
Then using your favorite web browser, go to http://localhost:8624 if the INDI Web Manager is running locally. If the INDI Web Manager is installed on a remote system, simply replace localhost with the hostname or IP address of the remote system.
## Auto Start
To enable the INDI Web Manager to automatically start after a system reboot, a systemd service file is provided for your convenience:
Description=INDI Web Manager
ExecStart=/usr/bin/python /home/pi/servermanager/
ExecStartPost=/usr/bin/python /home/pi/servermanager/
The above service files assumes you copied the servermanager directory to /home/pi, so change it to whereever you installed the directory on your target system. The user is also specified as pi and must be changed to your username.
If you selected any profile as Auto Start then the INDI server shall be automatically started when the service is executed on start up.
Copy the indiwebmanager.service file to /lib/systemd/system:
sudo cp indiwebmanager.service /lib/systemd/system/
sudo chmod 644 /lib/systemd/system/indiwebmanager.service
Now configure systemd to load the service file during boot:
sudo systemctl daemon-reload
sudo systemctl enable indiwebmanager.service
## Setuping remote access
### Start
sudo apt-get install xvfb x11-xkb-utils
sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic xserver-xorg-core
Lancer la commande :
vncpasswd /etc/vnc/vncpasswd
Ensuite, ajouter le contenu suivant dans /etc/lightdm/lightdm.conf
command=/usr/bin/Xvnc -rfbauth /etc/vnc/vncpasswd
Tester avec sudo /etc/init.d/lightdm restart
#VNC from webserver:
git clone git://
cd noVNC
./utils/ --vnc
## Connect wifi in command line
add wifi_dummy line in /etc/modules
ifconfig wlan0 up
nmcli d wifi list
sudo nmcli d wifi connect UPCC1492B7 password fudefx85kQpu
#Make ubuntu connect automatically (even when no user logged in)
go in Network Manager / Edit Connection. Select your connection, click Edit and check "Available to all users".
You may also need to add a line for each interface that you want to automatically come up at boot time in /etcnetwork/interfaces:
auto eth0
auto wlan0
## Create wifi hotspot directly fron Indi
HOT SPOT: It is possible to create a WiFi hotspot from your Pi3's wireless and connect to it via WiFi and do away with the Ethernet cable completely. Again, I have to thank rlancaste (from the INDI forums) for the information that got me to a successful conclusion here. The key for me was using RealVNC instead of Vino. I tried everything I'm about to tell you with Vino and it wouldn't work. I'm still not sure why RealVNC worked for me and Vino didn't but I suspect it's an encryption issue of some sort. I found this to be pretty straight forward at the time I did it. First thing you need to do is actually create a WiFi Hotspot on your Pi. To do that:
Navigate your way to the Network Connections window (System/Preferences/Internet and Network/Network Connections) to create a new WiFi Hospot.
Click Add to create a new connection
Select WiFi as the type of connection from the drop-down
Now: ◦
Give your connection a name at the top (mine is AstroPi)
Use that exact same name as the SSID
Change Mode to Hotspot
Go to the Wi-Fi Security tab and change it to WPA Personal (if you want a secure connection; recommended) and establish the password you want.
Hit Save, your done here.
Now, you need to be able to start that hotspot when you want it. On the desktop, right-click and select Create a Launcher. Name it something like “Start Hotspot” (your choice here) and insert the command nmcli connection up in the command field. So for me, that command is: nmcli connection up AstroPi. Hit OK and that's done. Just double click on that launcher to make the WiFi hotspot happen. On my system, I can tell the hotspot started because the little up/down arrow for my netork connection in the toolbar goes away. I'll get that back later when I shut the hotspot down. Now, when you start the hotspot, you can look for that WiFi connection from your remote computer and see the SSID you created (AstroPi in my case) and connect to it with the password you specified just like any other WiFi connection. Click properties on that connection and check out the IP address your remote computer was given by the hotspot. That will give you a clue to the IP address you need to use as the address in VNC viewer in order to connect to the Pi. In my case, the IP address assigned to my laptop by the Pi3 is So that means the Pi3's address is (just replace the last number with 1) and that's what I put in the VNC viewer to connect. Works great.
Now, rlancaste also suggested a couple other launchers for the desktop that you can do here, if you want. Some systems are having problems with the nm-applet and it needs to be restarted. So a launcher with nm-applet as the command line can be created to do that. My up/down arrow on the desktop that indicates a network connection sometime just disappears. This launcher will bring it back. This isn't a critical thing. I generally don't care if the network arrows are there or not under normal circumstances. The second launcher will turn off the hotspot and go back to normal network operations. That launcher needs the command line: gksu systemctl restart NetworkManager.service and I used the name that was suggested to me of “Restart Network Manager Service” as the name of the launcher. So, if you do all that you will have a launcher to turn the hotspot on, another to turn it off and go back to normal and a third to restart the nm-applet when it decides to stop working. I suppose you could create a startup command in your startup programs to automatically start the hotspot when the Pi is turned on if you are going to run it headless and via a hotspot. I'm connecting with an Ethernet cable directly to start with and I can activate the hotspot if I like from there.
# How to use Indi (basics ?)
indiserver ../indi/build/libindi/examples/tutorial_one/tutorial_one
Je lance le serveur indi avec la commande suivante:
indiserver indi_lx200basic indi_gphoto
indi_lx200basic pour le Pic-Astro
indi_gphoto pour mon Canon EOS1100D
## How to use PHD2
Start PHD2 in Terminal by simply typing PHD2 and pressing Enter. Do not connect anything at this point, simply get it open so you know it’s working.
Start KStars, then INDI/Ekos and get the INDI server running and everything connected. At this point I would open the Guider Module in Ekos and check to make sure you have a working connection to your guide camera.
Now go back to PHD2 to connect/configure a camera and mount. Click on the USB icon on the bottom left of the PHD screen. Select INDI Mount and INDI Camera as your equipment. Name the profile what you want, I named it “INDI”.
Now, confirm the camera and mount are set up properly within PHD2. Click on the setup icons next to the connect buttons. With INDI server already running and everything connected in Ekos, you should be able select your CCD guide camera in the dropdown for the camera driver and your mount type in the dropdown for your mount driver. In my case with an SSAG camera and EQMod mount, I select QHY CCD for my camera and EQMod Mount for my mount driver. Don’t touch anything here. Of course, you should see your equipment in place of mine in the screens. Close these screens and hit “Connect All” on the PHD2 connect equipment screen.
Now go into the Ekos Guider Module and click on the Options button there near the middle. In the Options window select PHD2 for the guiding option and don't change anything else. Notice that the port in the Options window is 4400. You may have noticed the port listed iN PHD2 was 7642 – that’s OK! They are the right numbers, do not be tempted to change them. At this point hit “OK”, close the options window you should be good. Notice, if you’ve used PHD before, you might be tempted to go back to the PHD control panel and start looping the image like you normally do when it’s stand-alone. Don’t do that. Ekos will start PHD2 when you click “Guide” in the guider module. Of course, you DO need to go into PHD2 and configure the guiding options the way you want. Good luck.
Notes: 1) Start Ekos first so PHD2 sees the drivers. 2) Leave everything at the defaults. 3) Let Ekos start PHD2 imaging, calibration, etc. Don't do it in the PHD2 panel.
# How to use AstroEQ (under linux)
sudo apt-get install libjssc-java
Installation from source:
git clone
cd Downloads
unzip ./
sudo dpkg -i ./astroequploader-3.6.deb
Ensuite utiliser l'utilitaire graphique astroEQ, avec les parametres suivants:
En R.A:
moteur 200 pas/tours
Le rapport de démultiplication est de 1440 par la vis sans fin secteur lisse et de 4 par le jeux de poulie sois une réduciton totale de 1440*4= 5760
il faut aussi multiplier par le nombre de pas du moteur, et de micropas par pas le cas echeant.
Je n'arrive plus a retrouver les references des poulies crantees que j'avais achete sur HPC, donc il faudra compter le rapport de reduction de l'ensemble, mais il doit etre assez proche de celui de l'axe de RA.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment