Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I log into an X server from Mac OS X? I know that ssh -X username@host will log me in and I will have the capability to run X applications.

On Cygwin/X you can log in and have a whole X session from your computer... and it will look something like this:

enter image description here

How can I replicate this?

Using this batch script:

@echo off
SET DISPLAY=127.0.0.1:0.0

SET REMOTE_HOST=%1

IF "%REMOTE_HOST%" == "" SET REMOTE_HOST=10.0.0.1

SET CYGWIN_ROOT=\cygwin
SET RUN=%CYGWIN_ROOT%\bin\run -p /usr/bin

SET PATH=.;%CYGWIN_ROOT%\bin;%PATH%

SET XAPPLRESDIR=
SET XCMSDB=
SET XKEYSYMDB=
SET XNLSPATH=

if not exist %CYGWIN_ROOT%\tmp\.X11-unix\X0 goto CLEANUP-FINISH
attrib -s %CYGWIN_ROOT%\tmp\.X11-unix\X0
del %CYGWIN_ROOT%\tmp\.X11-unix\X0

:CLEANUP-FINISH
if exist %CYGWIN_ROOT%\tmp\.X11-unix rmdir %CYGWIN_ROOT%\tmp\.X11-unix


if "%OS%" == "Windows_NT" goto OS_NT

echo startxdmcp.bat - Starting on Windows 95/98/Me

goto STARTUP

:OS_NT

REM Windows NT/2000/XP
echo startxdmcp.bat - Starting on Windows NT/2000/XP

:STARTUP

%RUN% XWin -query tekknolagi.dyndns.org -clipboard -lesspointer -scrollbars -screen 0 1050x1655@2 -screen 1 1680x985@1
share|improve this question
    
Maybe you can give some more details on how you do it in cygwin/X? –  tidbeck Nov 18 '11 at 12:48
    
@tidbeck ok! updating the q –  tekknolagi Nov 19 '11 at 8:16

3 Answers 3

up vote 3 down vote accepted
+100

install an xserver on macos: http://xquartz.macosforge.org/trac/wiki

launch it in fullscreen.

share|improve this answer
    
installed; how do i launch fullscreen? and can I have the same effect? –  tekknolagi Sep 16 '11 at 0:47
    
okay i figured out fullscreen - how do i achieve this same effect? –  tekknolagi Sep 16 '11 at 0:57
    
which "effect"? –  akira Sep 16 '11 at 5:52
    
of the image i posted; a full x session –  tekknolagi Sep 16 '11 at 6:46
    
launch the apps you see in your screenshot on the mac. if you want to automate that: write a script (a so called 'session script'). –  akira Sep 16 '11 at 7:49

If you have privileges to install stuff on the linux (and OS X) machine you can install NX Server/Player from NoMachine. It will forward X sessions and only uses ssh for communication.

share|improve this answer
    
i have privileges, but is there another utility that does not require them? –  tekknolagi Nov 18 '11 at 8:46

Recentish OS X systems come with an X server, but it's not installed by default. Install that, and it'll create X11.app. When you run that, you get a very different-looking terminal window. In there, do your ssh -X and you'll have a local X server that will run applications from the server. Launch (for example) xEyes, and you'll see the app pop up on your Mac.

Regarding your batch script, that's a Windows script, and won't work on a Mac.

share|improve this answer
    
I realize it's a batch script, but that's how I recreate the image at the top. Is there a similar feature for Mac? –  tekknolagi Nov 19 '11 at 21:21
    
You can use shell scripts on a Mac instead. In fact, being as Mac OS X is UNIX, you'll probably be able to use scripts from the UNIX computer you're logging in to on the Mac. –  mauvedeity Nov 21 '11 at 5:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.