Accessing a "headless" linux "server" from a webbrowser on a LAN? - Page 1
Forum section: electronics / general

author: The Soulman
author_rank: Super Contributor
timestamp: January 03, 2024, 05:34:33 pm
content: 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 thatsoftware/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.

author: jm_araujo
author_rank: Regular Contributor
timestamp: January 03, 2024, 06:12:07 pm
content: 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.

author: The Soulman
author_rank: Super Contributor
timestamp: January 03, 2024, 07:18:50 pm
content: 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=135920seems like a mess to set-up.

author: zilp
author_rank: Frequent Contributor
timestamp: January 03, 2024, 07:52:34 pm
content: Quote from: The Soulman on January 03, 2024, 05:34:33 pmI 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.

author: thephil
author_rank: Regular Contributor
timestamp: January 03, 2024, 08:04:46 pm
content: 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.

author: nightfire
author_rank: Frequent Contributor
timestamp: January 03, 2024, 09:11:10 pm
content: 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.

author: The Soulman
author_rank: Super Contributor
timestamp: January 03, 2024, 09:17:03 pm
content: 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.Quote from: thephil on January 03, 2024, 08:04:46 pmFriends?? The people here are my friends!

author: zilp
author_rank: Frequent Contributor
timestamp: January 03, 2024, 09:41:34 pm
content: Quote from: The Soulman on January 03, 2024, 09:17:03 pmThen 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.

author: shapirus
author_rank: Super Contributor
timestamp: January 03, 2024, 10:06:56 pm
content: take a look athttps://www.home-assistant.io/

author: mendip_discovery
author_rank: Super Contributor
timestamp: January 03, 2024, 10:11:27 pm
content: So I would use a Pi and install,https://github.com/PhilippCo/meas_rpiBy 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.

author: The Soulman
author_rank: Super Contributor
timestamp: January 03, 2024, 10:40:23 pm
content: Quote from: zilp on January 03, 2024, 09:41:34 pmAs 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.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.

author: The Soulman
author_rank: Super Contributor
timestamp: January 03, 2024, 10:49:58 pm
content: Quote from: shapirus on January 03, 2024, 10:06:56 pmCool, 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.

author: The Soulman
author_rank: Super Contributor
timestamp: January 03, 2024, 11:18:05 pm
content: Quote from: mendip_discovery on January 03, 2024, 10:11:27 pmDo 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 adapterhttps://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/).

author: shapirus
author_rank: Super Contributor
timestamp: January 03, 2024, 11:20:32 pm
content: Quote from: The Soulman on January 03, 2024, 10:49:58 pmI'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.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 04, 2024, 01:30:22 am
content: If you want a web interface, you can have a look at cockpit:https://cockpit-project.org/