mobile-shell / mobile-shell/mosh

Mac OS X sleeps (!) while running mosh

Open
#47 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug OS X
Dominant language
C++
Stars
14.5k
Forks
865
PR merge metrics
No merged PRs in 30d

Description

When logged in remotely with mosh to a Macintosh, OS X seems to go to sleep (and we start getting the "Last contact" countup). It doesn't even respond to pings.

SSHing to the machine seems to wake it up.

It looks like this is a feature -- "pmset -g" shows a sleep time of "10" when not logged in with SSH, and a sleep of "0" (disabled) when logged in with SSH. (I think "ttyskeepawake" is what makes SSH inhibit sleeping.)

Is it possible to have mosh-server also set the sleep time to be 0 when there is a user logged in? Unfortunately pmset requires root... Starting a screen did update utmp but didn't disable "sleep".

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue points to mosh-server, pmset -g, ttyskeepawake, and utmp; start by reviewing how mosh-server establishes the logged-in session on macOS and whether sleep inhibition requires root. Done means an agreed, supported way for an active mosh session to prevent sleep, or a documented limitation if that is not possible.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, macos
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.