linuxmuster / linuxmuster-linbo

Linbo imaging system for linuxmuster.net
23 stars 22 forks source link

FR: Make -n -d disable the GUI immidiately after boot #178

Closed dorianim closed 3 years ago

dorianim commented 3 years ago

Hi @HappyBasher,

There is an Issue with linbo-remote -c when used in conjunction with -w: When a client has autostart enabled, it will just start instead of waiting for the ssh connection from the server. You previously solved this by setting all OSs to disabled. I think this was removed in conjunction with #161. In my opinion the optimal solution would be to set the GuiDisabled = yes option in start.conf on boot via init.sh.

Would be nice to get that fixed as linbo-remote -c -w is mostly unusable currently.

HappyBasher commented 3 years ago

Have you tried parameter -n?

HappyBasher commented 3 years ago

Not reproduceable here. linbo-remote -w0 -p <command> -n -i <hostname> works as expected. A configured autostart in start.conf will be suppressed.

dorianim commented 3 years ago

Yes, that works indeed. Sorry, I didn't know that option. I'm going to change my proposal then: When -n is given in conjunction with -d I would like the GUI to be disabled from the beginning not just after the server starts executing commands via ssh. This will prevent people from accidentally booting or shutting down the machine.

HappyBasher commented 3 years ago

Does this make sense? In which scenario do you need a disabled gui after linbo has processed all remote commands on boot? I think in this case all is done and the gui is ready to wait for user interaction. Doesn't linbo-remote -w <n> -c <cmd list> -d meet all the requirements you need? Implementing this requirement means a certain effort, which must be very well justified.

dorianim commented 3 years ago

Let me explain again:

  1. I execute linbo-remote -w 60 -n -d -c sync:1 -i test-client
  2. Linbo starts and disables the autostart
  3. Linbo is in a normally usable state
  4. The 60 seconds delay has passed and the server starts executing commands
  5. the GUI is disabled
  6. commanda are executed
  7. the GUI is re-enabled
  8. Linbo is usable again

If someone happens to walk by the Client betweed step 3 and 4, they might shut it down because there is no indication that it will start syncing shortly and this is what I want to prevent. So in my opinion it would make sense to disable the GUI already at step 2. I do not need the Gui disabled after commands are executed but before. Wouldn't this just ne a case of expanding the onboot task of -n to disable the gui as well?

dorianim commented 3 years ago

(sorry, I mixed up -p and -c earlier, I am talking about -c)

HappyBasher commented 3 years ago

But if you do linbo-remote -w 0 -n -p sync:1 -i test-client you have achieved the same and no problem at all with users. So why implement something with effort which can be achieved otherwise?

dorianim commented 3 years ago

Okay, I see your point. Will you merge it if I implement it myself?

dorianim commented 3 years ago

I implemented if in #181 Would be nice if you could take a look at it :) There are actually not too many changes, the biggest one is that I had to move some code in gui_ctl into functions.

HappyBasher commented 3 years ago

Edited the title because -c -w do work in combination with autostart.

dorianim commented 3 years ago

You have reverted my PR so please reopen this issue.

dorianim commented 3 years ago

I have re-opened the pr. It is not responsible for any of the mentioned issues, as far as I can tell. https://github.com/linuxmuster/linuxmuster-linbo/pull/187