×

INDI Library v2.0.0 Released (01 Feb 2023)

Bi-monthly release with major changes to INDI properties and client API in addition to new drivers and improvements.

Headless KStars

  • Posts: 42
  • Thank you received: 1

Headless KStars was created by MountainAir

Hello all,

I realize this isn't a Linux help forum, but I am having trouble finding instructions elsewhere so I thought I would ask.

For the past year I have loved running KStars on StellarMate OS (Raspberry Pi 4), but for various reasons I need more powerful machines.  I tried MacOS (on a pair of Mac minis I had left over from another project) but KStars isn't as stable there as it is on Linux and I can rarely make it through a night of imaging without losing several hours of dark sky.  Windows is out because you can't control equipment with it due to the lack of Indi on that OS, so I'm left with Linux.

I've built several Ubuntu virtual machines for testing, and they work great when I'm at the machine.  The problem is that I cannot seem to get them to operate in headless mode.  I've managed to get SSH working so I at least have an encrypted VNC session to the machine (no Mac VNC clients could connect to Vino, so I had to disable encryption in screen sharing), but I cannot get it to start before I login.  I've followed numerous sets of instructions online, but it seems there might be several ways to do this (none of which worked).  I am trying to connect to these machines when they are strapped to a pier with no monitor/keyboard/mouse to login with, so I need VNC to run at system startup.

Can someone point me to a guide that actually works?  I'm packing up and leaving for my dark sky site tonight, and I'd like to have these working.

Thanks, and clear skies!
 
Last edit: 1 year 9 months ago by MountainAir.
1 year 9 months ago #70148

Please Log in or Create an account to join the conversation.

  • Posts: 379
  • Thank you received: 57

Replied by Jerry Black on topic Headless KStars

This doesn't specifically answer your question, but I'm using NoMachine www.nomachine.com/ to connect to my Odroid-N2 Ubuntu KStars rather than VNC and don't have problems. The NoMachine server starts on the Odroid-N2 upon boot. Not sure about virtual machines, but I naively think it should work.
120 MM Skywatcher Esprit + Celestron CGX, ZWO ASI 224MC guiding, Pegasus FocusCube+PPBA
Nikon Z7 8256 x 5504 4.34 um. Triad Ultra Quad NB Filter
1) MeLE Quieter3C 8G Ubuntu-mate 22.04.1 2) Odroid-N2. 3) StellarMate RPI4 8G
The good, the bad, the ugly at sciencedowneast.no-ip.ca/zenphoto/
The following user(s) said Thank You: Richard Beck
1 year 9 months ago #70151

Please Log in or Create an account to join the conversation.

  • Posts: 42
  • Thank you received: 1

Replied by MountainAir on topic Headless KStars

Thanks, I did see NoMachine referred to before and might try it -- thanks for letting me know it seems to work after boot. I had also tried TeamViewer, but had a similar problem and now I can't seem to connect to that at all. I'm not a Unix guy, so this has been a frustrating experience. In Windows, RDP just works when you enable it regardless of whether you logged in. On the Mac, you just can't use FileVault full-disk encryption if you want it to run before login. I've tried what seem to be 4 different methods to get it to start before login but just can't get it working on Ubuntu. And ultimately this is not for VMs -- I have two fancy new Mini PCs that I can't connect to.
1 year 9 months ago #70153

Please Log in or Create an account to join the conversation.

  • Posts: 297
  • Thank you received: 57

Replied by Scott Denning on topic Headless KStars

Another vote for NoMachine.

VNC is fiddly but NoMachine seems to work out of the box on pi, linux-x64, mac, windows, etc without any fuss.

I run ubuntu 20.04.2 on my main imaging rig on a cheap intel box out under the mount and have no trouble at all controlling everything via KStars headless. DM me if you need step-by-step setup.
1 year 9 months ago #70168

Please Log in or Create an account to join the conversation.

  • Posts: 42
  • Thank you received: 1

Replied by MountainAir on topic Headless KStars

Well, I was able to find mostly success with NoMachine. It is simple, works on startup, supports auto discovery and seems to perform well.

The only problem I'm having, which I don't have time to research now, is how to get it to go full screen and match my monitor's resolution. I saw the interstitial settings page that asked about resolution behavior, and I set it to match the Ubuntu resolution to my client window size. However, everything was coming across too large, so I tried manually changing the resolution. From that point forward, NoMachine only obeys the resolution of the Ubuntu instance rather than my client window. I can't seem to reset it, but will play with it more tomorrow.

I've had my problems with Microsoft, but RDP built into every OS is a breeze. And yes, the virtual graphics driver will resize to the exact pixel dimensions of the client window, making a wonderful remote user experience.
1 year 9 months ago #70171

Please Log in or Create an account to join the conversation.

  • Posts: 379
  • Thank you received: 57

Replied by Jerry Black on topic Headless KStars

Yes getting the resolution to stick as full screen with matching resolution can be a bit of a user interface weirdness, but it can be done with the right sequence of icon clicks. I tend to choose a slightly less than full screen window size on my Mac’s local screen so I manage I windows there more easily. That is probably just a Mac versus Windows common mode of use. Anyway it can be done, and everything works great with that figured out, at least for me.
120 MM Skywatcher Esprit + Celestron CGX, ZWO ASI 224MC guiding, Pegasus FocusCube+PPBA
Nikon Z7 8256 x 5504 4.34 um. Triad Ultra Quad NB Filter
1) MeLE Quieter3C 8G Ubuntu-mate 22.04.1 2) Odroid-N2. 3) StellarMate RPI4 8G
The good, the bad, the ugly at sciencedowneast.no-ip.ca/zenphoto/
1 year 9 months ago #70175

Please Log in or Create an account to join the conversation.

  • Posts: 297
  • Thank you received: 57

Replied by Scott Denning on topic Headless KStars

Getting the screen resolution that you want involves choosing at least three things: (1) the default on your headless machine; (2) the settings on your "client" machine (the one with the physical screen); and (3) the settings in NoMachine.

You may have to fiddle with all three but it definitely works and it's a "once and done." You almost never have to do it again.

I use multiple screens to control my remote imaging (laptop, desktop, tablet), so I prefer to have the remote machine change its resolution to match my physical screen. This works fine for me, pretty much every time.
1 year 9 months ago #70194

Please Log in or Create an account to join the conversation.

  • Posts: 42
  • Thank you received: 1

Replied by MountainAir on topic Headless KStars

Would love to figure this out, but now my NoMachine connection is completely black. Even after rebooting the machine, I get nothing but a black screen when connecting via NoMachine.

Frustration limit exceeded.  Maybe I'll try re-formatting and starting fresh.... sigh.
Last edit: 1 year 9 months ago by MountainAir.
1 year 9 months ago #70196

Please Log in or Create an account to join the conversation.

  • Posts: 297
  • Thank you received: 57

Replied by Scott Denning on topic Headless KStars

You need one of these to fool the OS into thinking there's a monitor attached. 

Or for sure, go back to Windows if you prefer. Use what ever makes you happy!
1 year 9 months ago #70197

Please Log in or Create an account to join the conversation.

  • Posts: 42
  • Thank you received: 1

Replied by MountainAir on topic Headless KStars

I'll try the HDMI yummy plug (already waiting on Amazon), but it doesn't explain why the screen is completely black now.  It worked last night, albeit at the wrong resolution.  When I login at the console, it's completely normal.
Last edit: 1 year 9 months ago by MountainAir.
1 year 9 months ago #70198

Please Log in or Create an account to join the conversation.

  • Posts: 297
  • Thank you received: 57

Replied by Scott Denning on topic Headless KStars

Do I understand you correctly?

When you plug in a monitor, you get a nice desktop display and everything appears to be fine.

But when you connect remotely (through VNC, NoMachine, whatever), the machine is there but the screen is completely black.

If so, that's EXACTLY how my machines have always behaved.

The dummy HDMI plug fixes this problem completely. I'm pretty sure you can also fix it somehow by messing around with display settings and drivers and so forth. But the dummy plug is SO easy I've never bothered with software solutions.

Plugging this cheap thing into the HDMI port makes the computer think it's displaying to a monitor. Without that electronic feedback it doesn't create a display for you to "connect to" in VNC/NoMachine.

I feel your frustration. Hang in there. You're almost done!
The following user(s) said Thank You: Richard Beck
1 year 9 months ago #70199

Please Log in or Create an account to join the conversation.

  • Posts: 42
  • Thank you received: 1

Replied by MountainAir on topic Headless KStars

Not exactly. When I login PHYSICALLY AT THE MACHINE I get a desktop. I don't get a desktop (anymore) when connecting via NoMachine regardless of whether or not there is a monitor attached & turned on.

This worked without a monitor connected several times prior to this. Now I get a full-screen window with a mouse cursor, but it's just black -- there's nothing there at all.

I did reformat and reinstall the OS. Unfortunately I get the same thing, so I thought it might be something with the Mac client so I uninstalled that, deleted the local application data and reinstalled but I get the same thing. This was working for a whole day, with or without an attached monitor.

My HDMI adapters arrive Monday, so I'll try again then but I suspect there's something else going on with NoMachine. I'll also try installing it on another machine.

At any rate, I really, really want to get a working and reliable KStars solution. When I'm in the field, I have a trio of large monitors in a travel trailer that I use for controlling three rigs via WiFi. If I can just work out this screen sharing issue, it'll be a sweet setup. Works great with the Raspberry Pis, they're just not powerful enough anymore.

Thanks for the help!
1 year 9 months ago #70204

Please Log in or Create an account to join the conversation.

Time to create page: 0.603 seconds