Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

X11 Client/Server Programming on Panther UNIX
Remote Mac X11 Programming

Mac OS X now provides support for Unix X11 Windows programming! Panther (OS X 10.3) ships with support for the X Windows GUI and includes the XTools IDE and X11 SDK on the Developer CD. So you have all the tools for compiling and running X Windows GUI programs on the Mac. X11 applications should be portable to Unix, Linux and even Windows systems running X11.

More interesting is the power of running X11 applications over a network. By its inherent nature, all X11 applications are divided into a client and a server portion. This inherent division in X11 applications provides built-in support for network remote access. X11 forwarding allows your application to run on a remote host machine while displaying the X11 Window on a local machine!

This page provides the information that you need to build a "Hello World" X11 application and then communicate with the application over a network.
Have fun.
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[10,134 views]  

X11 Client/Server Programming on Panther | 7 comments | Create New Account
Click here to return to the 'X11 Client/Server Programming on Panther' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
X11 Client/Server Programming on Panther
Authored by: b17bmbr on Feb 13, '04 11:33:01PM

yes, but this works with any X11 program. install all the gnome, kde, etc. goodies from fink. then open X11 on your mac, open an xterm, ssh -X in to the remote X11, and run any program. i use it at the school where i teach. i ssh -X into my linux desktop to run mozilla to access web sites that can't get past our web filter. (no, not pR0n, but slashdot, and some free sites, message boards, and stuff).



[ Reply to This | # ]
X11 Client/Server Programming on Panther
Authored by: azxplorer on Feb 14, '04 10:28:58AM

Hello,

This is probably a stupid question but its because I'm a neophyte computer user.

At my employers place they have a program that runs on a Sun computer, that I have been told runs under UNIX.

With all of this discussion of X11, does that mean that I could copy the program over onto my powerbook and run it under OS X via X11 ?

Thanks



[ Reply to This | # ]
Unfortunately, no
Authored by: stewby on Feb 14, '04 12:22:00PM

Definitely not a stupid question. Unfortunately, the answer to the question "does that mean that I could copy the program over onto my powerbook and run it under OS X via X11" is definitely no (Macs use PowerPC chips, basically no-one else does, so compiled code is not transportable).

However, if you have access to the source code of this program, it might well be possible to recompile the program for OS X, then run it under X11... sometimes this is trivial, sometimes it takes quite a bit of know-how; it all depends. As neophyte computer user, getting it to run on your computer might be essentially impossible, unfortunately. The power of X11 and the BSD core of OS X is that projects like fink can take hundreds of programs and utilities (the GIMP, for example), and make OS X versions that anyone can install and use.

If you have the source-code for this program, you might try to find someone who could help you see if porting it over would be easy to do.



[ Reply to This | # ]
X11 Client/Server Programming on Panther
Authored by: crarko on Feb 15, '04 08:37:00AM

What you could do is log in to the Sun system and redirect the display using X11. That's the 'client/server' notion that makes X11 so useful.

The (client) appilcation would actually execute on the Sun machine it's built for, but the GUI window server can be running on your PowerBook, from pretty much anywhere in the world if you have ssh or VPN connectivity to the Sun workstation, and a valid account to use it.



[ Reply to This | # ]
X11 Client/Server Programming on Panther
Authored by: azxplorer on Feb 16, '04 10:39:21AM

Hello and thanks for the replies.

I guess as long as I'm showing just how much of a newbie I am, I might as well ask how this would be done. I'm basically familiar with the terms VPC and SSH but not implentation of it.

Can you recommend a source of information on how to set this up?

Thxs in advance



[ Reply to This | # ]
Do not use Motif with C++
Authored by: ygor on Feb 16, '04 10:53:32AM

As a programmer who spent a few years doing Motif GUI's, I can say with some authority that Motif and C++ do not mix well.

Motif predates C++ and was not built for Object Oriented Programming. It was built to handle the X Event Loop type of linear programming which makes up a lot of the X Window community.

I have seen several attempts to wrap Motif widgets in C++ classes, but I never became comfortable.

I would suggest using Qt instead of Motif. Qt was built for OOP, it is free (for non-commercial use), and it is supported under MacOS X.

The examples in the O'Reilly Qt book work "out of the box".

Just my $0.02 worth.



[ Reply to This | # ]
Do not use Motif with C++
Authored by: gdsimms on Feb 18, '04 11:31:11PM

What I would like to see is an XCode "native" project type for Qt applications. It would have to handle the meta-object compiler and ideally export a .pro file for portability.



[ Reply to This | # ]