- First of all, install Cygwin (and make sure that you've included X).
After installation, alter your system path to the Cygwin bin directory. This is needed for Windows to find Cygwins .dll files. Right-click on "your computer" on the desktop, select the advanced tab and click on "environment variables". In the "system" section, find the Path variable and add the new path last (C:\cygwin\bin;).
- Create a directory ~/bin and a file ~/.bash_profile and in the latter add (at least) the following lines:
export PATH=~/bin:$PATH
export DISPLAY=:0.0
export DISPLAY=:0.0
- Create a ssh key binding to the machine you want to use (see previous post)
- Make an association in windows to .sh files with bash (right-click on any .sh.file and select "open with")
To associate bash scripts with Cygwing you'll need to alter the key in regedit. Find the key:
HKEY_CLASSES_ROOT\sh_auto_file\shell\open\command
HKEY_CLASSES_ROOT\sh_auto_file
- Change it's default value from:
"C:\cygwin\bin\bash.exe" "%1"
to:
"C:\cygwin\bin\bash.exe" "-l" "%1"
to:
"C:\cygwin\bin\bash.exe" "-l" "%1"
- Now create some start scripts in ~/bin. For each command/application you want to run on the remote mashine, create a .sh script with the same name in the form:
~/bin/acommand.sh
===============
#!/bin/bash
ssh -X server acommand
(replace "acommand" with your application/command name and "server" with the name of your server)
===============
#!/bin/bash
ssh -X server acommand
(replace "acommand" with your application/command name and "server" with the name of your server)
- Drag a shortcut to you desktop and click it - voilĂ ! (make sure you've started X first though, in case you want to run graphical apps).
No comments:
Post a Comment