cygwin

Discussion in 'Mac Programming' started by dukebound85, Sep 30, 2006.

  1. dukebound85 macrumors P6

    dukebound85

    Joined:
    Jul 17, 2005
    Location:
    5045 feet above sea level
    #1
    This may be a really really stupid question. My teacher reccomended we

    "Also consider installing cygwin on your home computer instead of using ssh, so that windows can be displayed on your home pc. To start it, dbl-clik on cygwin, then in the terminal type startx, wait for the xterm to pop up, then use ssh -X login@domain (capital-X in there) Then you can run xemacs and gvim."


    how can i get this to work with osx?

    thanks
     
  2. Nermal Moderator

    Nermal

    Staff Member

    Joined:
    Dec 7, 2002
    Location:
    New Zealand
    #2
    Install X11 from your OS X DVDs, then load it up and use the ssh -X command.

    Disclaimer: That's just a guess :)
     
  3. mrichmon macrumors 6502a

    Joined:
    Jun 17, 2003
    #3
    Cygwin is a unix compatibility layer that you can install on Windows. Once you have installed Cygwin on a Windows box you can then install many unix applications and utilities including an X windows server.

    OS X is based on Unix and the OS X install disk has an option to install X11. You can also install X11 after installing OS X with some of the install CDs.

    Once you have X11 installed you will have the same functionality that your professor is talking about. But the OS X version of X11 is generally faster and certainly more stable than X11 on top of Cygwin on top of Windows.

    As the other poster mentioned, once you have X11 installed on your Mac you simply start X11 and then use "ssh -X" to connect to a remote server but have the X11 windows displaying on your local display.
     
  4. Westside guy macrumors 601

    Westside guy

    Joined:
    Oct 15, 2003
    Location:
    The soggy side of the Pacific NW
    #4
    Your teacher's setup instructions are specific to Windows, and so not applicable to you.

    Just in case you don't know this: Cygwin is port of the GNU tools/utilities (the basic Unix/Linux/BSD applications, scripts, etc.) over to Windows. This stuff is already built in to OS X, so as Nermal said all you need to install is X11 (since normally OS X doesn't use the X11 windowing system that most all other Unix variants use, it uses its own buit-in system). Then start X11, which should bring up an Xterm window right away - and run all your commands from the command line inside of the Xterm.

    There are other ways you can do this, but the simplest is to just do everything inside the Xterm that X11 automatically provides. Use ssh to connect to the remote system, then run xemacs or any other X application.

    If you don't have your OS X install DVDs, you can download X11 from Apple's website.

    Edit: Looks like I was typing at the same time as mrichmon. :D
     
  5. dukebound85 thread starter macrumors P6

    dukebound85

    Joined:
    Jul 17, 2005
    Location:
    5045 feet above sea level
  6. GeeYouEye macrumors 68000

    GeeYouEye

    Joined:
    Dec 9, 2001
    Location:
    State of Denial
    #6
    It's worth reading the manpage on ssh once to make sure that -X is the appropriate flag... for some reason, I think -Y is the currently preferred one (more secure) unless compatability is needed... but I'm not at my Mac to check right now.
     
  7. dukebound85 thread starter macrumors P6

    dukebound85

    Joined:
    Jul 17, 2005
    Location:
    5045 feet above sea level
    #7

    I was able to login to the university network and use gvim and xemacs using -X . Ill try the Y though if the man pages say its more secure. Thanks for the heads up

    Edit:
    Here is what the man pages said

    -X Enables X11 forwarding. This can also be specified on a per-host
    basis in a configuration file.

    X11 forwarding should be enabled with caution. Users with the
    ability to bypass file permissions on the remote host (for the
    user's X authorization database) can access the local X11 display
    through the forwarded connection. An attacker may then be able
    to perform activities such as keystroke monitoring.

    For this reason, X11 forwarding is subjected to X11 SECURITY
    extension restrictions by default. Please refer to the ssh -Y
    option and the ForwardX11Trusted directive in ssh_config(5) for
    more information.

    -x Disables X11 forwarding.

    -Y Enables trusted X11 forwarding. Trusted X11 forwardings are not
    subjected to the X11 SECURITY extension controls.
     
  8. Westside guy macrumors 601

    Westside guy

    Joined:
    Oct 15, 2003
    Location:
    The soggy side of the Pacific NW
    #8
    Well, the problem with the -Y switch is that very few X11 apps actually implement the "Trusted X11 forwarding" concept. So you're generally stuck doing blanket forwarding, or not at all.

    It's possible that, if you're sticking to core Gnu apps, -Y may work; but I wouldn't bank on it.

    Addendum: One other thing to keep in mind - if you're behind a NAT device (e.g. Airport base station, Linksys router, etc.) you may find your ssh connections dying every so often. If you enable ssh keep-alives it'll usually solve that problem.
     
  9. ChrisA macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #9
    cygwin is something that adds UNIX functionality to an MS Windows computer. You don't need that because Mac OS is UNIX.

    You can find the terminal application in the applications/utility folder
     
  10. 2ndPath macrumors 6502

    Joined:
    Feb 21, 2006
    #10
    Cygwin provides some basic Unix functionality for Windows and an environment to install a lot of Unix applications. While Mac OS X includes a lot of this already there are additional packages like Fink, which allow you to install more unix software.
     

Share This Page