Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mosh: add libutempter #4667

Merged
merged 10 commits into from
Oct 28, 2021
Merged

Mosh: add libutempter #4667

merged 10 commits into from
Oct 28, 2021

Conversation

hgy59
Copy link
Contributor

@hgy59 hgy59 commented Jun 3, 2021

Motivation: This is a followup of the work started by @sn00pster (new account: @fizzyade)
Linked issues: #3583, closes #3582, closes #3583, #4820

Checklist

  • Build rule all-supported completed successfully
  • Package upgrade completed successfully
  • New installation of package completed successfully

Remarks

As for #3583 no dedicated branch was created, it was not possible for me to make the fixes on the original branch.

This was referenced Jun 3, 2021
@hgy59
Copy link
Contributor Author

hgy59 commented Jun 7, 2021

@sn00pster to work on #3583 (comment) I need to have a use case for detached sessions.
Any guidance on how to use mosh and how to detach sessions would be appreciated.

@fizzyade
Copy link

fizzyade commented Jun 7, 2021

@sn00pster to work on #3583 (comment) I need to have a use case for detached sessions.
Any guidance on how to use mosh and how to detach sessions would be appreciated.

I’m not sure what you mean? Mosh allows the session to float between connections, unlike ssh where if the connection dies, the session is terminated.

I don’t use Synology equipment any more.

@hgy59
Copy link
Contributor Author

hgy59 commented Jun 7, 2021

I’m not sure what you mean? Mosh allows the session to float between connections, unlike ssh where if the connection dies, the session is terminated.

I don't know mosh at all (and didn't find any guidance)

  • do I have to start the mosh server on the diskstation?
  • what app do I need on a mobile (android) device?
  • how do I connect (protocol, credentials)?

@fizzyade
Copy link

fizzyade commented Jun 7, 2021

Mosh isn't a daemon.

When you want to open a mosh connection to a server, it actually ssh's into the target machine and then spawns the mosh command which either starts a new or attaches to an existing session, the ssh connection is closed, it's literally only used to initiate a session.

it uses utmp to handle the sessions, libutempter is used to list the target machines sessions, because mosh connections are persistent until you physically log the session out (sessions remain through disconnects), so of your client crashes or doesn't' save the state, the sessions will hang around on the target. utempter is used to list these on connection, so you know that they exist and that you can then close them.

No idea about an android client, I don't use android. I'm sure somebody has created or provided a mosh binary for it. I personally use iOS and the best client I've ever found is Blink, which is really good.

As above, sessions are initiated via ssh, mosh handles this for you. You need ssh to start the connection, once logged in and a mosh session is created using the mosh binary, the communication then goes via UDP.

@hgy59
Copy link
Contributor Author

hgy59 commented Jun 7, 2021

@fizzyade thank you very much for the detailed description.
So I will use mosh on my debian workstation and MobaXterm on windows to test mosh with a diskstation as I have no OSX device.

Comment on lines +13 to +17
+prefix ?= /usr
+libdir = $(prefix)/lib
+libexecdir = $(prefix)/lib
+includedir = $(prefix)/include
+mandir = $(prefix)/share/man
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is worth to submit this upstream to ease maintenance

@ymartin59
Copy link
Contributor

@hgy59 Thanks. As far as I remember tmux may benefit from libutempter too.

@ymartin59 ymartin59 force-pushed the mosh_add_libutempter branch from e8e7fda to 2ceee03 Compare October 23, 2021 14:54
@hgy59 hgy59 force-pushed the mosh_add_libutempter branch from 2ceee03 to 00c154a Compare October 24, 2021 07:44
@ymartin59
Copy link
Contributor

@hgy59 I have rebased your branch to resolve conflict, test package and publish... but it looks like you have force-pushed back - reintroducing merge conflict I have resolved yesterday. Have you got changes I have not included yesterday? Do you mind to move to my rebased-resolved branch with git reset --hard?

@hgy59 hgy59 force-pushed the mosh_add_libutempter branch from 00c154a to 1f68175 Compare October 24, 2021 08:07
@hgy59
Copy link
Contributor Author

hgy59 commented Oct 24, 2021

@hgy59 I have rebased your branch to resolve conflict, test package and publish... but it looks like you have force-pushed back - reintroducing merge conflict I have resolved yesterday. Have you got changes I have not included yesterday? Do you mind to move to my rebased-resolved branch with git reset --hard?

@ymartin59 sorry, I didn't see your comment. We had different base commits for this branch, that was leading to merge conflicts. Yes I did a hard reset and cherry picked your latest commit adding Perl as spk dependency.

As I have rebased to the current head @ master and done some cleanup is there anything left?

Copy link
Contributor

@ymartin59 ymartin59 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, good for merge and publish

@hgy59 hgy59 merged commit a368386 into SynoCommunity:master Oct 28, 2021
@hgy59 hgy59 deleted the mosh_add_libutempter branch October 28, 2021 21:53
@hgy59 hgy59 added the status/published Published and activated (may take up to 48h until visible in DSM package manager) label Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/published Published and activated (may take up to 48h until visible in DSM package manager)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mosh Detached session message
4 participants