![]() ![]()
|
# How to make "systemd" and "tmux" work together
# in meaningful, useful ways: # Non-systemd GNU/Linux # and BSD-Unix # and other Unix-likes # # don't need this overcomplicated stuff. 1) You already have a SSH-connection available. Login via SSH. 2) Execute: $ sudo -i 3) Now You are "root"-user: Check & test: # cd # pwd Result must be: "/root" 4) Now for the interesting part: Do this: # loginctl enable-linger root 5) !!!==> REBOOT <==!!! 6) Install "tmux", if it isn't. 7) If Your shell is "/bin/bash", which it probably is: After rebooting, add this to "${HOME}/.profile" and/or "${HOME}/.bashrc" (both is recommended)
8) On Your KDE neon machine logout of everything. Out of Plasma-desktop and out of virtual TextMode terminals. 9) a) From Your other machine, login into KDE neon via SSH. b) Do: $ sudo -i c) Do: # tmux 10) From within "tmux", You can now do (for example): # pkcon refresh # pkcon update ################################ Why all this? Rationale: If You get disconnected by accident, Your update will run on, undisturbed. Else, Your disconnected SSH-connection would have killed the update in the middle if the action. Which would be bad, dangerous and stupid. ####################################### Enjoy. |
![]() KDE Developer ![]()
|
(when using pkcon, updates carry out regardless of disconnects as it features a client-server architecture)
Annoyed with bbcode since 1999.
|
![]() ![]()
|
Nice to hear this about pkcon server+client.
Did You personally check it out? --- If You are not locally logged into KDE neon at all, (this means: power on, fresh boot, graphical login sitting there, and waiting for login) and THEN login ONLY via SSH, then systemd's logind will kill the whole sshd-cgroup. Thereby, it will kill root's tmux-server, too. And if this happens (and it does), I fear for the pkcon-server's survival. --- I'm not courageous enough to test it with pkcon. But I expect strongly, "systemd & Company" will kill it at SSH-connection interrrupt-time. pkcon-client and pkcon-server. Both. --- I fully respect You and Your information. But did You test it personally, Yourself? |
![]() KDE Developer ![]()
|
The daemon is run in system scope and lives for as long as it needs to in order to complete its pending transaction(s). User session live time has no impact on it, neither does pkcon getting killed or not. Transactions always finish.
Annoyed with bbcode since 1999.
|
![]() ![]()
|
What You say seems like a well informed
professional answer to me. Therefore, I'm now prepared to check it out for myself and do a little fact checking. Thanks a lot for encouragement. --- Otherwise (in the non-pkcon case), my configuration in the original post seems still a good idea to me. I hope others agree, and will profit from it. |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot]