Skip to content

Add command "loginctl enable-linger $USER" in install.sh #1861

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

Closed
yu-chenxi opened this issue Jul 3, 2020 · 6 comments · Fixed by #1997
Closed

Add command "loginctl enable-linger $USER" in install.sh #1861

yu-chenxi opened this issue Jul 3, 2020 · 6 comments · Fixed by #1997
Milestone

Comments

@yu-chenxi
Copy link

I install code-server on my ECS by executing install.sh.
Then execute following:

systemctl --user enable --now code-server
systemctl --user start code-server

But when I disconnect the ssh connection from my ECS, the code-server process will be killed immediately and the connection
between ECS and browser will break. Finally, I find this article systemd user instance to solve the problem.

This is solution.

loginctl enable-linger $USER

The issue is only happends when I run code-server as non-root user.
I think you shound add it.

@tidux
Copy link

tidux commented Jul 7, 2020

It might be better to leave this as an option behind a y/n prompt than just do it by default. The enable-linger option has security implications if you're using ssh-agent+keychain or similar tools, and I don't think it should be interfered with silently.

nhooyr added a commit that referenced this issue Jul 22, 2020
systemd's user units are buggy on certain versions
and do not linger by default.

Closes #1771 #1673 #1882 #1861
nhooyr added a commit that referenced this issue Jul 22, 2020
systemd's user units are buggy on certain versions
and do not linger by default.

Closes #1771 #1673 #1882 #1861
nhooyr added a commit that referenced this issue Jul 22, 2020
systemd's user units are buggy on certain versions
and do not linger by default.

Closes #1771 #1673 #1882 #1861
nhooyr added a commit that referenced this issue Jul 22, 2020
systemd's user units are buggy on certain versions
and do not linger by default.

Closes #1771
Closes #1673
Closes #1882
Closes #1861
nhooyr added a commit that referenced this issue Jul 22, 2020
systemd's user units are buggy on certain versions
and do not linger by default.

Closes #1771
Closes #1673
Closes #1882
Closes #1861
nhooyr added a commit that referenced this issue Jul 22, 2020
systemd's user units are buggy on certain versions
and do not linger by default.

Closes #1771
Closes #1673
Closes #1882
Closes #1861
nhooyr added a commit that referenced this issue Jul 22, 2020
systemd's user units are buggy on certain versions
and do not linger by default.

Closes #1771
Closes #1673
Closes #1882
Closes #1861
nhooyr added a commit that referenced this issue Aug 4, 2020
systemd's user units are buggy on certain versions
and do not linger by default.

Closes #1771
Closes #1673
Closes #1882
Closes #1861
@nhooyr
Copy link
Contributor

nhooyr commented Aug 5, 2020

Let's leave this open until a new release is cut.

@nhooyr nhooyr reopened this Aug 5, 2020
@tidux
Copy link

tidux commented Aug 5, 2020

I would recommend systemd stuff not be in the install script at all, since Amazon Linux 2 very deliberately does not include systemd user session support.

@nhooyr
Copy link
Contributor

nhooyr commented Aug 17, 2020

I would recommend systemd stuff not be in the install script at all, since Amazon Linux 2 very deliberately does not include systemd user session support.

Yes, we're switching to to a system unit so we're fine.

@finzzz
Copy link

finzzz commented Aug 19, 2020

At least, write it in the documentation

nhooyr added a commit that referenced this issue Aug 25, 2020
systemd's user units are buggy on certain versions
and do not linger by default.

Closes #1771
Closes #1673
Closes #1882
Closes #1861
nhooyr added a commit that referenced this issue Aug 26, 2020
systemd's user units are buggy on certain versions
and do not linger by default.

Closes #1771
Closes #1673
Closes #1882
Closes #1861
nhooyr added a commit that referenced this issue Aug 27, 2020
systemd's user units are buggy on certain versions
and do not linger by default.

Closes #1771
Closes #1673
Closes #1882
Closes #1861
nhooyr added a commit that referenced this issue Aug 27, 2020
systemd's user units are buggy on certain versions
and do not linger by default.

Closes #1771
Closes #1673
Closes #1882
Closes #1861
@nhooyr nhooyr added this to the v3.5.0 milestone Aug 31, 2020
@nhooyr
Copy link
Contributor

nhooyr commented Aug 31, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants