linux - cygwin startxwin, then ssh into a different machine -
i have batch file on windows following line in it:
c:\cygwin64\bin\run.exe --quote /usr/bin/bash.exe -l -c "cd; /usr/bin/startxwin;"
when execute windows, launches xterm window (with xwin enabled) , there can ssh our remote linux server.
what add ssh command in batch file windows desktop, can click it, , end ssh'ing our remote linux server. have tried doing this:
c:\cygwin64\bin\run.exe --quote /usr/bin/bash.exe -l -c "cd; /usr/bin/startxwin; ssh -y my-remote-server xterm"
but doesn't seem work. advice appreciated.
it should work following modifications:
c:\cygwin64\bin\run.exe --quote /usr/bin/bash.exe -l -c "cd; /usr/bin/startxwin & sleep 5; display=:0 ssh -y my-remote-server xterm"
first, startxwin
doesn't daemonize itself, need start &
ensure runs in background.
then need export correct display
enviornment, ssh
know x11 server connect (my solution doesn't export variable, provides ssh
only).
then need wait seconds sure x server started (sleep 5
guess, works on machine).
then start ssh
process connects , executes remote server.
i don't know run.exe
part, don't have in cygwin
installation, maybe in environment work following:
c:\cygwin64\bin\bash.exe -l -c "cd; /usr/bin/startxwin & sleep 5; display=:0 ssh -y my-remote-server xterm"
Comments
Post a Comment