Ensuring Proxmox Shell Continuity During Laptop Sleep Mode

eugene123tw

New Member
Jul 5, 2024
1
0
1
I have Proxmox set up on a mini PC, and I use my laptop to connect to the Proxmox web interface. When I run long tasks in the Proxmox shell, it often freezes if my laptop goes to sleep. For example, while uncompressing split compressed files using unrar in the Proxmox shell CLI, if I leave my laptop and it goes to sleep, the process hangs, and I have to restart it.
Currently, my only solution is to prevent my laptop from going into sleep mode, but this shouldn't be necessary. How can I keep the Proxmox shell running even when my laptop goes to sleep?
 
Personally I use tmux 24*7. While both screen and tmux are old (1987! & 2007) and well established I switched away from screen a decade ago - for a reason I can not really remember.

Actually I put tmuxp in front of it. This is not required of course and probably overkill for @eugene123tw - I just want to mention a more sophisticated use case: when I restart my main login machine, which is used as session multiplexer/gateway, I initialize my ssh-agent with some keys and then I run tmuxp. This will build up ~50 screens and connect to well-known and preconfigured remote servers using those ssh keys. After this single command finishes I can switch inside tmux to those servers - and my maintenance user is already logged in.

This setup is very useful for me. Without this combination I would have to go "ssh user@server" and entering a password (the actual one or the one for the ssh-key or the one for the ssh-agent - as the agent has a timeout of course) a zillion times a day. Because all servers have "real" and independent passwords the first approach would involve my password manager each and every time. This would really be painful.

Code:
~$ apt show tmuxp
Homepage: https://github.com/tony/tmuxp/
 tmux session manager allowing both JSON and YAML configuration
 formats. Available features:
  - allows both simple and very elaborate configs
  - can store and load multiple sessions
  - can custom startup scripts (such as installing project dependencies
    before loading tmux)
  - session freezing: snapshot your current tmux layout, pane paths,
    and window/session names, and dump the result as a tmuxp
    configuration

So my recommendation is to use... tmux :-)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!