Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > running *nix programs remotely through OSX

running *nix programs remotely through OSX
Thread Tools
rogerkylin
Dedicated MacNNer
Join Date: Apr 2001
Location: Columbia, MD
Status: Offline
Reply With Quote
Jun 14, 2002, 08:02 AM
 
Please let me know if I can do this...it may actually be a good 'business reason' to buy some macs at my office....

If I install Xfree86, or some other X window manager (suggestions are welcome), can I log into a *nix machine, an SGI in particular, and get all of the Xwindows to _properly_ display on the mac?

For instance, there are some graphically intense applications that will not display their windows using an X-window emulator under classic, or windows. We are about to spend at least $5k on an os2 workstation, and it seems like this would be a great time to get a _cheaper_ mac.

If this is possible, can you point me to any threads that discuss installing the Xwindow manager of choice? I'll have to put it on my home machine, and bring it in to show the benefits...

thanks a lot.
     
howardm4
Senior User
Join Date: Sep 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Jun 14, 2002, 08:26 AM
 
well, first off, Xfree86 is NOT a window manager. It is an X server.
It is the basic low level hunk of s/w that runs on the local hardware
(Mac in this case) to manage the display and keyboard. The s/w called
'window manager' is another piece of s/w that sits on top of the server
and is what you as the user interact w/.

There are lots of window managers and I'm sure people will recommend
several. It's a personal choice thing. I currently use OroboroOSX.

You should certainly be able to do what you want to do and loading up
XFree86 and its support files shouldn't take more than a few hours.

I do it all the time connecting to big Sun Solaris servers.
     
Detrius
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status: Offline
Reply With Quote
Jun 14, 2002, 09:56 AM
 
I would say loading up XFree86 shouldn't take more than a few minutes.

<a href="ftp://ftp.xfree86.org/pub/XFree86/4.2.0/binaries/Darwin-ppc-5.x/" target="_blank">ftp://ftp.xfree86.org/pub/XFree86/4.2.0/binaries/Darwin-ppc-5.x/</a>

Get all of the files in that directory. Using the terminal, cd into an empty folder that you can download files into. Then run the command:

wget --recursive --depth=1 &lt;the above link&gt;

a simple hierarchy (no more than one branch at each level) of directories was created. cd through them until you see the files (type cd &lt;tab&gt; &lt;tab&gt; &lt;tab&gt; ...)

then,

ssh Xinstall.sh

and it will install the X server.

Once XFree86 is installed, the next big thing to do is to set up the window manager. There are various packaged deals out there. In addition, you can use fink (http://fink.sourceforge.net) to install all kinds of nifty open source unix apps. Once fink is installed, pick a window manager (I like window maker) and install it. (btw, you will need to 'source /sw/bin/init.csh' in your .tcshrc file)

You can view available packages by:

fink list | less

and install one by:

fink install windowmaker

This will actually download the source, compile, and install it. Once it's installed, type

wmaker.inst

and it will set up your .xinitrc file (by just 'exec wmaker')

Then, to launch X, you will now have an App in your Applications folder named XDarwin. Launch it. I prefer full screen. Some people prefer rootless (you can still see Mac OS X behind your windows).

Of course, once in X, at a terminal, log in to your remote box:

ssh -X &lt;your server&gt;

Then just launch your apps. Since this is a full fledged X11 distribution, you can expect your programs to run normally. This is as opposed to stripped down versions that run in Classic.
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
rogerkylin  (op)
Dedicated MacNNer
Join Date: Apr 2001
Location: Columbia, MD
Status: Offline
Reply With Quote
Jun 14, 2002, 12:14 PM
 
Thanks for all of the info so far. I am optimistic this could really work. One quick additional question: rather than connecting to the remote server using ssh, I assume Xfree86 also supports a standard telnet conenction?
     
thanatos
Dedicated MacNNer
Join Date: Sep 2000
Status: Offline
Reply With Quote
Jun 14, 2002, 12:28 PM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by rogerkylin:
<strong>Thanks for all of the info so far. I am optimistic this could really work. One quick additional question: rather than connecting to the remote server using ssh, I assume Xfree86 also supports a standard telnet conenction?</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">Yes it does!
     
Evinyatar
Mac Enthusiast
Join Date: May 2000
Location: Belgium
Status: Offline
Reply With Quote
Jun 14, 2002, 02:14 PM
 
Correct me if I'm wrong but I think you don't even need to install a window manager if you're going to use XFree exclusively for remote connections. The remote computer will have a window manager running, and it'll display on your Mac. I've used my Mac as an X terminal for our university Sun Solaris machine, and my Athlon running Red Hat Linux 2.1 with no problems whatsoever.
Just get the installer <a href="http://www.versiontracker.com/moreinfo.fcgi?id=11027&db=mac" target="_blank">here</a> and in the terminal enter 'X -quartz -query &lt;remote machine's IP&gt;' if the remote machine is running xdm (or one of it's variations like gdm or kdm), or telnet and set the display if necessary ( 'set DISPLAY=&lt;your ip&gt;' if you're using csh ).
PowerMac G4 400MHz/832MB/60GB
AlBook G4 15" 1.25GHz/1.5GB/60GB
Athlon 64 3500+/Asus A8N-SLI Premium/2GB RAM/990GB HD/GF7800GT 512
     
daimoni
Occasionally Quoted
Join Date: Apr 2001
Location: San Francisco
Status: Offline
Reply With Quote
Jun 14, 2002, 02:25 PM
 
.
( Last edited by daimoni; Apr 29, 2004 at 03:59 AM. )
.
     
rogerkylin  (op)
Dedicated MacNNer
Join Date: Apr 2001
Location: Columbia, MD
Status: Offline
Reply With Quote
Jun 14, 2002, 04:24 PM
 
...The Additional Problem....

Two of the programs (Xedge and ModelMan) we run on the SGI (according to our Linux guy) seem to want to display overlays that he said can only be done with a professional level graphics card.

These programs will not run properly through an Xwindow emulator on our PC's and does not work on our old pentium linux box.

Is there any hope these will work on the mac running xfree86, or is it also likely doomed to not having overlay capabilities?
     
howardm4
Senior User
Join Date: Sep 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Jun 14, 2002, 06:04 PM
 
I think a guy in our office had a similar problem (we do highend
electronic chip design and layout). he ended up getting a new/better
video card for his Linux PC.

So, I'd think you'd have to do research and see what and if a suitable
card exists for Mac's and if Xfree supports that card.
     
mmurray
Grizzled Veteran
Join Date: Sep 2000
Location: Adelaide, Australia
Status: Offline
Reply With Quote
Jun 15, 2002, 05:06 AM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by Detrius:
<strong>I would say loading up XFree86 shouldn't take more than a few minutes.

<a href="ftp://ftp.xfree86.org/pub/XFree86/4.2.0/binaries/Darwin-ppc-5.x/" target="_blank">ftp://ftp.xfree86.org/pub/XFree86/4.2.0/binaries/Darwin-ppc-5.x/</a>

Get all of the files in that directory. Using the terminal, cd into an empty folder that you can download files into. Then run the command:

wget --recursive --depth=1 &lt;the above link&gt;

a simple hierarchy (no more than one branch at each level) of directories was created. cd through them until you see the files (type cd &lt;tab&gt; &lt;tab&gt; &lt;tab&gt; ...)

then,

ssh Xinstall.sh

and it will install the X server.

</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">Why not just grab the single click installer
from

<a href="http://sourceforge.net/projects/xonx/" target="_blank">http://sourceforge.net/projects/xonx/</a>

?

Michael
     
rogerkylin  (op)
Dedicated MacNNer
Join Date: Apr 2001
Location: Columbia, MD
Status: Offline
Reply With Quote
Jun 15, 2002, 01:01 PM
 
I used the single double-click installer and can connect to the remote servers. Right now I am at home on a cable modem so I don't know if this is causing a problem, but I am not able to get any remote programs to be able to open an Xwindow on my local machine.

I made sure the DISPLAY environment was set correctly, but here's the message I get when I try to open xclock:

Xlib: connection to "###" refused by server
Xlib: No protocol specified

Error: Can't open display: ....

Any suggestions?
     
howardm4
Senior User
Join Date: Sep 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Jun 15, 2002, 02:37 PM
 
check the man page for 'xhost' or 'xauth'.

You're gonna need to allow the remote host to access the local hardware.
     
Detrius
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status: Offline
Reply With Quote
Jun 15, 2002, 06:40 PM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by Evinyatar:
<strong>Correct me if I'm wrong but I think you don't even need to install a window manager if you're going to use XFree exclusively for remote connections. The remote computer will have a window manager running, and it'll display on your Mac. I've used my Mac as an X terminal for our university Sun Solaris machine, and my Athlon running Red Hat Linux 2.1 with no problems whatsoever.
Just get the installer <a href="http://www.versiontracker.com/moreinfo.fcgi?id=11027&db=mac" target="_blank">here</a> and in the terminal enter 'X -quartz -query &lt;remote machine's IP&gt;' if the remote machine is running xdm (or one of it's variations like gdm or kdm), or telnet and set the display if necessary ( 'set DISPLAY=&lt;your ip&gt;' if you're using csh ).</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">You actually don't NEED to get a window manager, as XFree86 includes twm, which is launched by default.

The --query option is a great option, provided that there is an X server set up to respond. I connect my laptop to the servers on campus and I have the following command added to my .tcshrc file:

alias mosaic 'startx -- -query &lt;thexserver&gt; -fullscreen'

thus, all I have to do is type 'mosaic' at the command line and the login pops up, fullscreen instead of rootless (which you could choose instead of fullscreen; if you want the option, you put -aqua and you can choose each time).
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
mmurray
Grizzled Veteran
Join Date: Sep 2000
Location: Adelaide, Australia
Status: Offline
Reply With Quote
Jun 17, 2002, 07:47 AM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by rogerkylin:
<strong>I used the single double-click installer and can connect to the remote servers. Right now I am at home on a cable modem so I don't know if this is causing a problem, but I am not able to get any remote programs to be able to open an Xwindow on my local machine.

I made sure the DISPLAY environment was set correctly, but here's the message I get when I try to open xclock:

Xlib: connection to "###" refused by server
Xlib: No protocol specified

Error: Can't open display: ....

Any suggestions?</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">As the other post suggested you can use xhost and set DISPLAY.
If you can ssh into the machine you are trying to launch the
applications from I would recommend using

ssh -X machine.you.want.launch.from

the -X option sets up ssh to tunnel the x stuff back to your
machine. After you have done this command do xterm and it should
pop up on your mac. Its very neat as it doesn't care if you
behind an airport box or a firewall etc.

You should try out OroborOSX from

<a href="http://wrench.et.ic.ac.uk/adrian/software/oroborosx/" target="_blank">http://wrench.et.ic.ac.uk/adrian/software/oroborosx/</a>

Adrian also has some good introductory stuff there about how to
use X with OS X.

Michael
     
sweetsdream
Fresh-Faced Recruit
Join Date: Nov 2001
Location: Tampa, FL
Status: Offline
Reply With Quote
Jun 18, 2002, 02:07 AM
 
I have been trying this as well. ssh -X r&lt;emotexserver&gt; works for opening remote windows but I cant seem to get X -quartz -query &lt;remotexserver&gt; to work. I get the following message:

Fatal server error:
XDMCP fatal error: Session failed Session 203536015 failed for display powerbook:0: cannot open display

OsVendorFatalError
AbortDDX
Quitting XDarwin...

Any Ideas?
Cheers,
SweetsDream
     
rogerkylin  (op)
Dedicated MacNNer
Join Date: Apr 2001
Location: Columbia, MD
Status: Offline
Reply With Quote
Jun 18, 2002, 07:59 AM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by sweetsdream:
<strong>I have been trying this as well. ssh -X r&lt;emotexserver&gt; works for opening remote windows but I cant seem to get X -quartz -query &lt;remotexserver&gt; to work. I get the following message:

Fatal server error:
XDMCP fatal error: Session failed Session 203536015 failed for display powerbook:0: cannot open display

OsVendorFatalError
AbortDDX
Quitting XDarwin...

Any Ideas?</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">Another option that works when the '-query' does not is X -quartz -broadcast server.name. Honestly I'm not sure of the subtle differences. This worked when I was getting an unknown host error, so I'm not sure if it will work for you.
     
rogerkylin  (op)
Dedicated MacNNer
Join Date: Apr 2001
Location: Columbia, MD
Status: Offline
Reply With Quote
Jun 18, 2002, 08:01 AM
 
Just as follow-up, I did get everything to work, but I don't think (unfortunately) that getting a mac for this roll will work for us due to graphics card limitations. Apparently some of the SGI CAD programs rely on overlays, that consumer cards do not support. So I'm guessing the 'business decision' will be to buy a better card for a PC we already own.

This is of course unless it is somehow possible to tell Xfree86 to emulate the layers...
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:47 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,