Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 254
  • Last Modified:

x11 from Mac to Linux

Hello,
I am trying to open a GUI on linux such as xclock from a Mac machine.
I tried various ways but no success. Can some one clearly explained what needs to be done?
The linux OS is OEL 5.5. (RedHat).
Regards,
Tamir
0
tamirmilo
Asked:
tamirmilo
  • 6
  • 3
  • 3
  • +1
1 Solution
 
ahoffmannCommented:
Mac's modern GUI is far too stupid to handle well known usable plain old X, unfortunately
however, there exist an X port for Mac OS X, you can install it using macports (or similar), then a X server ist started on Mac and mainly operates flawless with any other X as we are used to since ages ;-)
but keep in mind that it is not possible to start Mac GUIs in X, obviously
0
 
Duncan RoeSoftware DeveloperCommented:
You don't actually need an X server on the Mac. You run a client there, such as xclock. In order to see the output from that xclock on your system, there are essentially 2 things you have to do

1. Tell xclock to use the display on your Linux system

Like most X programs, xclock accepts the -display argument, so for example if your Linux system is called linux.local.net then you can put xclock -display linux.local.net. Alternatively set the DISPLAY environment variable in one of the various possible ways e.g. export DISPLAY=linux.local.net; xclock or DISPLAY=linux.local.net xclock

2. Tell the Linux X server to accept connections from clients on the Mac

Normally, X only accepts connections from authorized clients. Adding a new client is complicated enough that I won't go into details right now, but I do it and if you post that you'd like the details then I'll provide them.
However as a quick test all you need do on linux.local.net is enter the command xhost +. Your X server will then allow any host to connect. After your test, you can revert to normal X authorization by the command xhost -
0
 
ArneLoviusCommented:
install xquartz on the mac
start xquartz
connect to the linux machine with X forwarding over ssh
start the application
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Duncan RoeSoftware DeveloperCommented:
My bad I got the DISPLAY variable wrong in http:#a38847686:
xclock -display linux.local.net:0
DISPLAY=linux.local.net:0; xclock
DISPLAY=linux.local.net:0 xclock

I.e. in ever case, append :0 (colon zero) to the system name. Please try it and post back
0
 
ArneLoviusCommented:
rather than set the display, I tend to just use "ssh -x user@host" and then launch the application...
0
 
Duncan RoeSoftware DeveloperCommented:
Will that actually show xclock running on the Mac? I read that to be the requirement - or am I wrong?
0
 
ahoffmannCommented:
> Will that actually show xclock running on the Mac?
as already explained: you need an xserver on MAc for that (see previous comments)
0
 
Duncan RoeSoftware DeveloperCommented:
ahoffman: I disagree. There is no need to have an X server on a system in order for X clients (such as xclock) to run. I regularly run an xterm on my router which has no X server: I just need to set its DISPLAY (and I set up authorization rather than use xhost +)
0
 
ArneLoviusCommented:
the computer with the display is the x server, the application running is the x client

xquartz is an x server, that allows you run an application such as xclock on a remote computer but displaying on the local computer.
0
 
Duncan RoeSoftware DeveloperCommented:
Yes that is quite true. He wants to see xclock on the Linux system. He wants to run xclock on the Mac.
0
 
ahoffmannCommented:
> I am trying to open a GUI on linux such as xclock from a Mac machine.
that's the question, is it?

"from a Mac" tells me, that the GUI is the Mac, so you  need a xserver there (xquartz, X.org, whatever)
tamirmilo, please correct me if I'm wrong
0
 
Duncan RoeSoftware DeveloperCommented:
tamirmilo, please confirm whether http:#a38859290 describes what you want to do
0
 
tamirmiloAuthor Commented:
fdfdfdfd
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 6
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now