top | item 17411155

(no title)

martin_ky | 7 years ago

> It’s 2018 and I still see people walking around with Windows laptop lids open because they presumably have no confidence in Windows’ ability to sensibly preserve state after closing the lid.

At my workplace it's about 60:40 Windows to Mac user ratio. Regardless of the machine, nobody closes the lid when moving in the office between desks and meeting rooms. So, I'd say it's probably not that.

discuss

order

ams6110|7 years ago

Probably don't want to lose their ssh connections.

diroussel|7 years ago

Back in 2004 I had an ssh terminal open from my Mac (12" PowerBook) to my home Linux server. I closed the lid and took the laptop away with for a trip. For some reason I didn't use the laptop during the week. When I got back home 6 days later I opened the laptop and saw the ssh session. I tried it out and it still worked! I was amazed!

The ssh client had no keep alive. And the sshd had no keep alive. There was not firewall and a long DHCP lease. So it all just worked.

But because of firewalls aggressivly closing xonnections, these days we tend to need keep alives and so I don't this this would work today.

shpx|7 years ago

If you have tmux or your remote machine, you can add this alias to your mac's bashrc

    alias my-server='ssh server-hostname -t "tmux new-session -s user || tmux attach-session -t user"'
It will connect to a tmux session on the remote machine if it exists or start a new one if it doesn't. If you Cmd+w your terminal window or disconnect, the tmux session stays running on the remote machine.

You could also tell it to try reconnecting every second and bind it to something easy to type like 'kj' (too bad df is already taken)

    alias kj='while true; do my-server; sleep 1; done'

oso2k|7 years ago

There’s tmux, abduco, & screen for that on Linux.

satysin|7 years ago

Modern Standby/Connected Standby in Windows 10 won't lose any network connections while in standby.

emsy|7 years ago

Regardless of the reasons for people not closing their laptop lids, these issues exist and they shouldn't.