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

Terminal window resizement not passed through via "su -c" #485

Closed
blueyed opened this issue Jan 8, 2014 · 2 comments
Closed

Terminal window resizement not passed through via "su -c" #485

blueyed opened this issue Jan 8, 2014 · 2 comments

Comments

@blueyed
Copy link

blueyed commented Jan 8, 2014

I have noticed that with the following invocation, terminal window resizements (e.g. maximize / restore) do not appear to get through to tmux:

mosh --ssh='ssh -AX -tt' example.com -- su -plc 'tmux new-session -s main -A'

It works when using ssh directly:

ssh -AX -t example.com -- "su -plc 'tmux new-session -s main -A'"

It also works when calling su - only, where tmux then gets invoked from the zshrc file:

mosh --ssh='ssh -AX -tt' example.com -- su -

The same is true for just "su -c" instead of "su -plc".

@andersk
Copy link
Member

andersk commented Jan 9, 2014

I cannot reproduce your second claim (“It works when using ssh directly”). For me it does not even work locally (su -c tmux or su -plc tmux). According to su(1),

-c, --command COMMAND

Specify a command that will be invoked by the shell using its -c.

The executed command will have no controlling terminal. This option cannot be used to execute interractive programs which need a controlling TTY.

Without a TTY, tmux can’t receive SIGWINCH terminal resize events. Consider using a different utility to gain root, such as sudo.

@andersk andersk closed this as completed Jan 9, 2014
@andersk
Copy link
Member

andersk commented Jan 9, 2014

(By the way, --ssh='ssh -AX -tt' doesn’t accomplish anything. Mosh closes the ssh connection immediately upon mosh-server startup; neither SSH agent forwarding nor X forwarding are supported. And mosh always passes -tt.)

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

No branches or pull requests

2 participants