What can I do with Cygwin and Cygwin/X?
Use Cygwin/X for Windows to Linux connectivity:
Use Cygwin bash to emulate Linux on Windows:
- You can run a local Xserver, and then use xterms and ssh to connect to a remote system and display programs running on a Linux server to your Windows client.
- You can query the display manager of a running Linux system to get a full screen remote Xsession from your Windows client.
- Or you can just bring up a plain xterm and ssh, rlogin, telnet, ftp, etc. When using rlogin you have to remember to "xhost +" and "export DISPLAY".
- Using the cygwin_xlogin.bat script, you can use Windows shortcuts to pass into it, or it will prompt you if nothing was passed.
- Demo scripts:
Use Cygwin for backing up Windows to Linux:
- You can bring up a Cygwin bash shell (instead of a Windows command prompt) and run many programs that have been built for Cygwin.
- Note your home directory is under C:/cygwin/home//, and Cygwin root is usually C:/cygwin/
- GNU Tools examples from /usr/bin: pwd, which tar, ls -al, env | less, df -h /, cd /cygdrive/c, ls -al, du -sh /cygwin/home, find WINDOWS -name "*.dll" -print, cd ~, cat /etc/passwd | grep , man ssh, ssh-keygen, vi t.c, gcc -g, t.c, ./a.exe, gdb ./a.exe, bzip2, bunzip2, bzcat, diff, tar, gzip, md5sum, gawk, sed, tracert, route, netstat, ping, ssh, scp, telnet, ftp, rlogin, rsh, rcp, rsync, not to mention all the stuff in /usr/bin/X11, xterm, !!
- Demo: Cygwin bash shell via cmd OR xterm.
Demos: Local Xserver, xterms w/ssh, Remote Xserver, Cygwin bash, gcc, rsync
- If you've properly configured your Linux host to accept rsync via ssh, and ssh-keygen, then you won't be prompted for password when running this script.
Otherwise, simply provide the password and your windows files will be synchronized to a Linux server. Replace "WINDOWS/TEMP" with "My Documents" and all your Windows personal files will be saved and ready for restore after your next Windows crash!
- Demo script: cygwin_backup.bat
Links: Cygwin Home |
Cygwin FAQ |
Cygwin/X Home |
Cygwin/X FAQ |
Slide 3 of 4