You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

x11 server on Mac

Hi, I know this subject probably talked here a lot but sadly I still not figure it. I used to work with SecureCRT on Windows 11 and connected to my VDI session (Linux Machine), I enable x11 forwarding to open X apps like virt-manager or xclock. (to enable X server on Windows I use X410 app), it's actually was very easy and worked like magic. Now I moved to MacBook M1 Pro with Ventura OS and installed SecureCRT. as I understand MacOS should to support X11 via XQuartz app. I installed it and actually able to work it once but not any more. my main issue is understand what my localhost (x11) server ip to config on SecureCRT. (I remember on windows it's was - 127.0.0.1:10.0 or something similar). if I opening XQuartz and configure xclock inside it and open MacOS terminal xclock it's working.


can someone please suggest me how to continue from here?

MacBook Pro 14″, macOS 13.5

Posted on Sep 19, 2023 1:12 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 19, 2023 10:36 PM

Deep_Purple26 wrote:

@BobHarris
Thank you for great replay,
if i working with XQuartz i need everytime do log off and in when i open him?
as far i know my local linux machine the display variable is: "localhost:10.0" and when i was on Windows and used in same way it's never was an issue.


The default X display for X clients is set to the local X Window server display when you launch the Xquartz X Window server. That is the DEFAULT environment variable shown above. That X display selected is the local display.


You only need alter that DISPLAY (or potentially specify the target X Window server display explicitly on a command that supports an X client) if you want to send the display to a remote X Window server.


Most X Window servers work this way with the local default display automatically established, including some very weird X11 environments.


And ssh -X or ssh -Y will set DISPLAY for you, aiming it back to the X Window server that originated the ssh connection.




X Window server: the hunk of X that is running the hardware display. This part of X is usually running local to the hardware display, but that is not strictly required. The X Window server is effectively driving what you’re looking at.


X Window client: an app that supports creating an X app display on some local or remote X Window server.


X Quartz is an X Window server and one among many, and also provides various X Window client apps.

Similar questions

6 replies
Question marked as Top-ranking reply

Sep 19, 2023 10:36 PM in response to Deep_Purple26

Deep_Purple26 wrote:

@BobHarris
Thank you for great replay,
if i working with XQuartz i need everytime do log off and in when i open him?
as far i know my local linux machine the display variable is: "localhost:10.0" and when i was on Windows and used in same way it's never was an issue.


The default X display for X clients is set to the local X Window server display when you launch the Xquartz X Window server. That is the DEFAULT environment variable shown above. That X display selected is the local display.


You only need alter that DISPLAY (or potentially specify the target X Window server display explicitly on a command that supports an X client) if you want to send the display to a remote X Window server.


Most X Window servers work this way with the local default display automatically established, including some very weird X11 environments.


And ssh -X or ssh -Y will set DISPLAY for you, aiming it back to the X Window server that originated the ssh connection.




X Window server: the hunk of X that is running the hardware display. This part of X is usually running local to the hardware display, but that is not strictly required. The X Window server is effectively driving what you’re looking at.


X Window client: an app that supports creating an X app display on some local or remote X Window server.


X Quartz is an X Window server and one among many, and also provides various X Window client apps.

Sep 19, 2023 3:30 PM in response to Deep_Purple26

If you are running X11 based apps locally you do NOTHING. Once XQuartz is installed, and your logout of your Mac account and login again (or reboot), your logged in account already has a

echo $DISPLAY
/private/tmp/com.apple.launchd.o49YNoFyj7/org.xquartz:0

established.


So you can invoke commands such as

xclock

xeyes

xterm

etc...



If you are connecting to a remote system, then you use

ssh -Y username@remote.system.address


and that will pass your DISPLAY environment variable to the remote system. DO NOT set your own DISPLAY environment variable on the remote system. Let ssh establish an X11 tunnel and create the DISPLAY environment variable that points to the ssh X11 tunnel created by the -Y option.


Then you can run any X11 based commands on the remote system and the output will be displayed on your Mac.


NOTE: Some Linux systems have been playing with Wayland, which is NOT X11 based, so if you are using one of those systems, you may have issues trying to export X11 to your Mac.


If that is the case, then using a VNC connection and a client such as TigerVNC (available for the Mac) might be a better options for viewing remote GUI windows.

Sep 20, 2023 11:00 AM in response to Deep_Purple26

If I understand correctly SecureCRT is just another terminal emulator.


By default DISPLAY environment variable should exist when you start a SecureCRT session, and you SHOULD NOT define your own DISPLAY value, but let the system create one for you.


And it should look similar to:

/private/tmp/com.apple.launchd.o49YNoFyj7/org.xquartz:0


And if you are going to use ssh -Y (or ssh -X) to a remove system, then the ssh command will create a DISPLAY environment variable on the remote host that points back to XQuartz on the Mac.

x11 server on Mac

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.