Author Topic: Accessing a "headless" linux "server" from a webbrowser on a LAN?  (Read 857 times)

0 Members and 1 Guest are viewing this topic.

Offline The SoulmanTopic starter

  • Frequent Contributor
  • **
  • Posts: 949
  • Country: nl
  • The sky is the limit!
Goal: remote 24/7 data-logging of various pieces of test equipment connected via usb (gpib) and serial port by running HKJ's testcontroller and/or picolog/picoscope software, and being able to access that
software/desktop from a (windows) computer via the web-browser by entering the assigned ip-address in the same way as you would access the user interface of a router or solar-inverter etc.
Just a hobby, nothing mission-critical.
I'm sure something like that has been done before but my google-fu fails me.

I have zero linux experience, but this could be a nice way to get my feet wet.

Please advice on what hardware (rpi? multiple serial ports?) and software (mint?) to use and how to set things up.
 

Offline jm_araujo

  • Regular Contributor
  • *
  • Posts: 72
  • Country: pt
Re: Accessing a "headless" linux "server" from a webbrowser on a LAN?
« Reply #1 on: January 03, 2024, 06:12:07 pm »
Thin Client running Proxmox hypervisor, with virtual machines (windows/linux/whatever) configured with needed software.
Can be easily managed remotely.
A used thin client from HP can be found for less than 100€ with core i5 (>gen6 for low power, <10W when idle), 8GB Ram min recommended, ssd capacity as needed.

For an easier solution, google about how to run RPi headless, not too hard but more limited.
« Last Edit: January 03, 2024, 06:14:56 pm by jm_araujo »
 
The following users thanked this post: The Soulman

Offline The SoulmanTopic starter

  • Frequent Contributor
  • **
  • Posts: 949
  • Country: nl
  • The sky is the limit!
Re: Accessing a "headless" linux "server" from a webbrowser on a LAN?
« Reply #2 on: January 03, 2024, 07:18:50 pm »
Thanks, setting up a thin client isn't really ideal as space is limited and heat and noise generation is also unwanted.

Googling "rpi-headless" I've found some tutorials about setting up pi-os with vnc enabled using pi-imager, and at the client (windows) side using tiger-vnc to connect to the pi.
This seems the simplest and easiest way to do it.

Also found someone else attempting to connect to a pi desktop straight from a web-browser:
https://forums.raspberrypi.com/viewtopic.php?t=135920 seems like a mess to set-up. 
 

Offline zilp

  • Regular Contributor
  • *
  • Posts: 206
  • Country: de
Re: Accessing a "headless" linux "server" from a webbrowser on a LAN?
« Reply #3 on: January 03, 2024, 07:52:34 pm »
Goal: remote 24/7 data-logging of various pieces of test equipment connected via usb (gpib) and serial port by running HKJ's testcontroller and/or picolog/picoscope software, and being able to access that
software/desktop from a (windows) computer via the web-browser by entering the assigned ip-address in the same way as you would access the user interface of a router or solar-inverter etc.

I mean, I don't know what exactly you are actually trying to achieve, but I would suggest reconsidering both the "desktop" and the "via web browser" requirements, as both of those are very atypical ways of remotely accessing unixoid systems, especially in that combination.

If you want to display data graphically, consider doing so natively as a web application, if you don't need that, consider working with command line or other text console interfaces and accessing those via SSH (potentially with screen or tmux), and if you really need remote GUI access, consider X forwarding via SSH, and if that doesn't work for you, consider VNC ...

Also, consider copying the data from that machine elsewhere for analysis. Like, use rsync to sync the data to your workstation to process it locally or something.

 
The following users thanked this post: The Soulman

Offline thephil

  • Regular Contributor
  • *
  • Posts: 62
  • Country: de
    • Techbotch
Re: Accessing a "headless" linux "server" from a webbrowser on a LAN?
« Reply #4 on: January 03, 2024, 08:04:46 pm »
The "thin" in thin client refers to the extremely low footprint. They really are small. And they are a lot easier to set up than a Pi, because they are standard off-the-shelf PC hardware and you can easily add a normal SSD or more RAM. I highly recommend them over a Pi whenever you really want a small PC rather than something embedded with GPIO capabilities. They come with a proper case, various interfaces and a power supply. None of the thinclients I own has a fan or produces any heat I could perceive without using a temperature sensor.

Don't get me wrong – I like the Pi. But only when I want something "embedded" for directly controlling stuff. But there is no benefit when you want a small PC.

For a small machine, you may not even want a graphical user interface / desktop – the command line is plenty for many things. For running Testcontroller, however, I think you need it. Remote access to the machine is trivial: ssh for command line and some flavor of VNC (realvnc / tightvnc / ...) for gui access. It doesn't get much simpler. Browser access to the desktop is quite unusual – don't go that route.  Of course, you are right that this will require getting familiar with LINUX to some degree, but that's not rocket science as long as you stay on your local network and don't expose the host to the internet.

So go ahead and stop worrying about the hardware. In terms of OS, any LINUX distribution will do. I like Debian, but Ubuntu, Mint, or pretty much any other will be fine. I recommend picking whatever distro your friends use – that way you get the best local support.
« Last Edit: January 03, 2024, 08:22:44 pm by thephil »
It's never too late to have a happy childhood!
 
The following users thanked this post: The Soulman

Offline nightfire

  • Frequent Contributor
  • **
  • Posts: 585
  • Country: de
Re: Accessing a "headless" linux "server" from a webbrowser on a LAN?
« Reply #5 on: January 03, 2024, 09:11:10 pm »
In Short: Get the Penguin of your choice on inexpensive hardware, and then look how you get the sensor data aggregated (depending on the sensor in question, there should be several tools available), and then feed them into a MRTG/rrdtool- this is the classic stuff to visualize curves etc. and t here are plenty of howto's available.

 
The following users thanked this post: The Soulman

Offline The SoulmanTopic starter

  • Frequent Contributor
  • **
  • Posts: 949
  • Country: nl
  • The sky is the limit!
Re: Accessing a "headless" linux "server" from a webbrowser on a LAN?
« Reply #6 on: January 03, 2024, 09:17:03 pm »
Thanks for the input guys.

VNC it is, will have to investigate further on what hardware and OS to use, pi or pc/thinclient (rpi4 or 5 with dual rs232 hat look tempting because how easy it is to create a boot-able image with pi-imager and the small form factor and easy to power).

I want to do some remote data-logging were I don't want or need to touch the setup for weeks and can remotely (via lan not wan) login to the desktop to see how things are going.
 
I recommend picking whatever distro your friends use – that way you get the best local support.

Friends?? The people here are my friends!  :-+
 

Offline zilp

  • Regular Contributor
  • *
  • Posts: 206
  • Country: de
Re: Accessing a "headless" linux "server" from a webbrowser on a LAN?
« Reply #7 on: January 03, 2024, 09:41:34 pm »
VNC it is, will have to investigate further on what hardware and OS to use, pi or pc/thinclient (rpi4 or 5 with dual rs232 hat look tempting because how easy it is to create a boot-able image with pi-imager and the small form factor and easy to power).

I want to do some remote data-logging were I don't want or need to touch the setup for weeks and can remotely (via lan not wan) login to the desktop to see how things are going.

Then don't use VNC. Seriously, the idea that you want to access "the desktop" is a very Windows-centric approach, that is not how you use unixoid servers, you typically use such servers via SSH access to the shell, "the desktop" is not a central component of the system like it is on Windows.

I mean, unless you have to use some specific software that is necessarily GUI-based, of course, but it seems to me like you are trying to apply Windows patterns to Linux, and chances are that that'll just cause you pain.
 
The following users thanked this post: The Soulman

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: ua
Re: Accessing a "headless" linux "server" from a webbrowser on a LAN?
« Reply #8 on: January 03, 2024, 10:06:56 pm »
 

Offline mendip_discovery

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: Accessing a "headless" linux "server" from a webbrowser on a LAN?
« Reply #9 on: January 03, 2024, 10:11:27 pm »
So I would use a Pi and install,
https://github.com/PhilippCo/meas_rpi
By a member on here.

Raspberry offer a headless install option and it is fairly easy to use.

Use Python or Jupyter to do the logging and then use the data the way you want. I even have grafana running on a Pi show my data. All I do is access via SSH aka command prompt when I need to do nerdy stuff otherwise it's in a browser window. There is plenty of documentation and assistance out there.
Motorcyclist, Nerd, and I work in a Calibration Lab :-)
--
So everyone is clear, Calibration = Taking Measurement against a known source, Verification = Checking Calibration against Specification, Adjustment = Adjusting the unit to be within specifications.
 

Offline The SoulmanTopic starter

  • Frequent Contributor
  • **
  • Posts: 949
  • Country: nl
  • The sky is the limit!
Re: Accessing a "headless" linux "server" from a webbrowser on a LAN?
« Reply #10 on: January 03, 2024, 10:40:23 pm »
VNC it is, will have to investigate further on what hardware and OS to use, pi or pc/thinclient (rpi4 or 5 with dual rs232 hat look tempting because how easy it is to create a boot-able image with pi-imager and the small form factor and easy to power).

I want to do some remote data-logging were I don't want or need to touch the setup for weeks and can remotely (via lan not wan) login to the desktop to see how things are going.

Then don't use VNC. Seriously, the idea that you want to access "the desktop" is a very Windows-centric approach, that is not how you use unixoid servers, you typically use such servers via SSH access to the shell, "the desktop" is not a central component of the system like it is on Windows.

I mean, unless you have to use some specific software that is necessarily GUI-based, of course, but it seems to me like you are trying to apply Windows patterns to Linux, and chances are that that'll just cause you pain.

As mentioned in my first post my primary use for it are gui based data-logging programs such as test-controller and pico-log and attached to various pieces of test equipment, as opposed to a full windows desktop machine cluttering up the bench and running that 24/7 (between updates and the auto re-numbering of virtual comm-ports etc..). I already use a (windows) laptop for 99% of all the other things so why not use that to access a small headless computer when required.

https://www.eevblog.com/forum/testgear/program-that-can-log-from-many-multimeters/

I grew up with windows 3.1 and later 95, only used dos for installing and loading (gui based) programs.
On windows 10 I've started using the command line for some things because the (graphical) user interface is broken in some spots.  :palm:
Another reason to start to move away from windows..
But yeah I do prefer a graphical user interface for most if not all computing tasks.  :)

 
 

Offline The SoulmanTopic starter

  • Frequent Contributor
  • **
  • Posts: 949
  • Country: nl
  • The sky is the limit!
Re: Accessing a "headless" linux "server" from a webbrowser on a LAN?
« Reply #11 on: January 03, 2024, 10:49:58 pm »
take a look at https://www.home-assistant.io/

Cool, but I'm not sure if that does what I want?
Mind you I despise anything that is claiming to be "smart" I've purchased my first "smart"-phone only months ago and would like to change the name "smart" to cheeky.
 

Offline The SoulmanTopic starter

  • Frequent Contributor
  • **
  • Posts: 949
  • Country: nl
  • The sky is the limit!
Re: Accessing a "headless" linux "server" from a webbrowser on a LAN?
« Reply #12 on: January 03, 2024, 11:18:05 pm »
So I would use a Pi and install,
https://github.com/PhilippCo/meas_rpi
By a member on here.

Raspberry offer a headless install option and it is fairly easy to use.

Use Python or Jupyter to do the logging and then use the data the way you want. I even have grafana running on a Pi show my data. All I do is access via SSH aka command prompt when I need to do nerdy stuff otherwise it's in a browser window. There is plenty of documentation and assistance out there.

Do I understand correctly that it only supports the NI usb-gbib NS adapter (clone..) and LXI-enabled instruments?

I plan to use a few meters with serial output (owon xdm2041) and at least one via gpib (keithley 192 with arduino based ar488 adapter https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/).
 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: ua
Re: Accessing a "headless" linux "server" from a webbrowser on a LAN?
« Reply #13 on: January 03, 2024, 11:20:32 pm »
take a look at https://www.home-assistant.io/

Cool, but I'm not sure if that does what I want?
I'm not sure either, that's just some food for thought.

It obviously won't work as a drop-in replacement for a remote desktop or VNC session. However, the approach of having a server with a web interface via which data from multiple sensors and devices can be accessed is worth considering. I believe it can be done with home assistant. And don't be confused by the buzzwords, cloud offerings etc. It's all FOSS and can be self-hosted. Large community (so docs, tutorials etc.) as well.
 
The following users thanked this post: The Soulman

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14487
  • Country: fr
Re: Accessing a "headless" linux "server" from a webbrowser on a LAN?
« Reply #14 on: January 04, 2024, 01:30:22 am »
If you want a web interface, you can have a look at cockpit: https://cockpit-project.org/
 
The following users thanked this post: The Soulman


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf