Cygwin

Information here is for 1.7.1

External References

Internal References

Windows environment issues

Start/Setting/Control Panel/System/Advanced tab/Environment Variables/System variables Variable CYGWIN was "server notitle glob check_case:adjust code_page:oem noenvcache" Changed to "server binmode ntsec"
Don't use tty or X won't work

Overview

Cygwin is a Linux-like environment for Windows. It consists of two parts:

Cygwin doesn't provide binary compatability with Linux but almost any Linux source code can be compiled under Cygwin to produce an .exe that will run under Windows.

Secure tunneling to your Linux box

Although Cygwin has ssh and the X-Server, and tightvnc viewer can be compiled to run under Cygwin, I prefer something lighter weight so I use the Windows aps PuTTY, and tightvnc viewer. If these apps aren't installed on the Windows host, it's possible to use Cygwin. For example, use Cygwin ssh to establish the tunnel, then tightvnc viewer to view the Linux desktop.

All these apps, Xming, PuTTY, and tightvnc can be installed on removable media also so there's no excuse for not using your home Linux box just because you're forced to use a Windows box at work.

  1. On you home Linux box, sudo aptitude install tightvncserver
  2. Run tightvncserver -geometry 800x600 -depth 8 -localhost -nevershared -dontdisconnect :1
  3. Port forward the SSH port on your router/firewall to the Linux box.
  4. Go to work
  5. On the Windows box install PuTTY, set up a normal SSH session.
  6. Verify that you can SSH to your home Linux box. Close the session.
  7. Reload the PuTTY session, go to Connection/SSH/Tunnels dialog box.
  8. Enter 5901 for Source port, localhost:5901 for Destination
  9. Don't forget to save the session
  10. Open the session. It should be a SSH session to the Linux box. Minimize it.
  11. Run tightvnc viewer. Enter localhost:1 and the password you set for tightvnc server.
  12. You now have a secure SSH tunnel running VNC between work and home.

Cron

I'm still trying to get cron running, So far, I've tried:

The above doesn't work

If the cron service does not start, try deleting the file /var/run/cron.pid and then repeating the commands above.

examine /var/log/cron.log

cygrunsrv -L to list running services
chmod +r /etc/passwd
chmod +r /etc/group to make these files readable
run cron-config
Enter the value of CYGWIN for the daemon: [ ]
(This is one of the stupidest prompts I've ever seen -
what it means is to enter ntsec - at least that works for me)
User cyg_server needs a password. It must match
the rules in force on your system.
Please enter the password for cyg_server:
Reenter:

User 'cyg_server' has been created with password 'xxxxxxxx'.
If you change the password, please keep in mind to change the
password for the cron service, too.

ken@SNY ~
$ /usr/bin/init-config
*** Query: Do you want to overwrite existing /etc/inittab file? (yes/no) yes
Creating default /etc/inittab file
*** Query: Do you want to overwrite existing /etc/rc file? (yes/no) yes
Creating default /etc/rc file

*** Warning: The following function requires administrator privileges!
*** Query: Do you want to install init as service? (yes/no) yes

*** Info: The init service has been installed under the LocalSystem
*** Info: account (also known as SYSTEM). To start the service now, call
*** Info: Net start init' or Cygrunsrv -S init'. Otherwise, it
*** Info: will start automatically after the next reboot.

*** Info: Check /etc/inittab and /etc/rc first, if they suit your needs.

Configuration finished. Have fun!

ken@SNY ~
$

Send mail to the Webmaster

logo This site best viewed with a browser
Warning: This is a Debian centric site and MAY contain peanuts.
Many thanks to Debra Lynn and Ian Murdock for making Debian possible
First created Feb 14, 2010 ~ Last revised September 13, 2010

Valid XHTML 1.0 Strict Valid CSS!