takashi1kun/lan-play-GUI

possibility to run headless

Opened this issue · 5 comments

Is your feature request related to a problem? Please describe.
I'm always frustrated when some cool Linux apps needs a GUI to run I won't interact with, so I have to setup e.g. xorg-server on my RaspberryPi.

Describe the solution you'd like
A way to run without the Desktop-GUI (commandline parameter / config setting). For now webserver only I guess. (But maybe Discord/Telegram or whathaveyou in the future if that will be implemented at all).

Describe alternatives you've considered

  • Using some (outdated / not updated) alternatives like Igor195/Switch-lan-play-TelegramBot or update / (re)write them myself
  • rewrite this myself (would need to read up on the app)
  • actually setting up xorg (Note: doesn't work properly for me atm)

Additional context
Maybe document config files in general or webserver-part for changing settings without any GUI like webserver port, if one has ports in use already.

second this! put main configuration in the web UI and give us a --headless option

i am working on a version 2.0 at the moment, when i end with it i will start working with what i am calling "Lan play GUI mini" that would be a headless web implementation of lan play GUI 2.0 without electron.
There is currently no way to do a --headless because i was very messy with the code and all is soo mixed that is unseparable, in version 2.0 is a little bit less messy so i will be able to create the headless version more easy, also the version 2.0 and lite will be powered with angular 9 and material here is a preview of 2.0, the headless version would not be very different, just in a browser
image

I think this would work best as a separate CLI app (since this one is called GUI for a reason), but if @takashi1kun is able to do that in a next version it's cool too.

Well this ist called 'GUI' because it prodives a GUI for an cli app. It shouldn't matter what 'kind' of GUI it is. Also the user interacts normally with the graphical interface - that's the whole point.

One could argue in reverse, that in the case of a 'proper' webserver, the Desktop part (Electron or whatever) could be removed all together, and users could open their webbrowser and navigate to localhost.
(though I may find that (as a potential desktop user) rather awkward)
But even then it could still be called a 'GUI'.

I have no experience with Frameworks such as Electron, but I always thought of it like a webview. It basically displays HTML/CSS and executes JavaScript (or one of their many forms) but has the advantage of being 'closer to the system' (e.g. direct filesystem access).
The elements can be the same. CSS stylesheets, calls to the lan-play executable, and so on.

How I saw it originally: since the files are already there, they are be served via Desktop and Webserver. And now, 'just make the desktop part skipable'

Also if you separate each 'kind' of interface, it becomes a new mess: either have redundant code and deal with inconsistencies or have a common project/module and deal with dependencies. I don't think the project is big enough to justify such a split - it would be more of a headache.

And who cares, if the application is bigger, you ain't gonna run this on a toaster, and SD cards for Pi's are not hard to come by (and who's pc has less disk space than their Pi anyway).

@GsakuL @lsfgrd is not that i am releasing the next version, i am rebuilding the GUI from scratch, that is version 2.0, is basically lan Play GUI 2, after that i will work in Lan Play GUI 2 mini, and that is a headless version of lan play GUI 2 with a webserver only, for you to run on a raspberry or something similar and access it by browser.

Electron is separated in 2 parts, the webview and node, it is supposed to work like the webview was a webpage without privileges and you code the system stuff in the node part, and you make calls similar to http request to the node part like a web would do to a server, and that is the correct way to use electron, but in lan play gui 1 i was still learning and i did not thought of headlessness in the future so i did everything in the webview, even the webserver was on the webview and was a complete mess, in lan play gui 2 i am doing the system stuff in node and the interface stuff in the webview so i can later migrate it later to be really a webpage and its server for lan play gui 2 mini.

So in the future the is going to be 3 version of lan play GUI

  • The deprecated lan play GUI 1.x.x
  • The desktop application lan play GUI 2
  • The headless web app lan play GUI 2 mini

lan play GUI 2 being oriented for the people who prefers a desktop application without complications run and it works kind of deal, and lan play GUI 2 mini for the people who like to setup a headless server without electron on their systems and connect to it from any devices from a web browser.

as a note, lan play GUI 2 and mini are going to have a extra feature, they are going to come integrated with lan play server, so you can run a temporal server on your system to play a private session with your friend.