Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dukebound85

macrumors Core
Original poster
Jul 17, 2005
19,131
4,110
5045 feet above sea level
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
 

Nermal

Moderator
Staff member
Dec 7, 2002
20,640
4,039
New Zealand
Install X11 from your OS X DVDs, then load it up and use the ssh -X command.

Disclaimer: That's just a guess :)
 

mrichmon

macrumors 6502a
Jun 17, 2003
873
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.
 

Westside guy

macrumors 603
Oct 15, 2003
6,340
4,158
The soggy side of the Pacific NW
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
 

GeeYouEye

macrumors 68000
Dec 9, 2001
1,669
10
State of Denial
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.
 

dukebound85

macrumors Core
Original poster
Jul 17, 2005
19,131
4,110
5045 feet above sea level
GeeYouEye said:
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.


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.
 

Westside guy

macrumors 603
Oct 15, 2003
6,340
4,158
The soggy side of the Pacific NW
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.
 

ChrisA

macrumors G5
Jan 5, 2006
12,578
1,695
Redondo Beach, California
dukebound85 said:
This may be a really really stupid question. My teacher reccomended we

"Also consider installing cygwin on your home computer

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
 

2ndPath

macrumors 6502
Feb 21, 2006
355
0
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.