One of my machines has:

% echo $DISPLAY
:0

Digging deeper, I find in ~/.zprofile

# MacPorts Installer addition on 2020-12-29_at_06:08:54: adding an appropriate 
DISPLAY variable for use with MacPorts.
export DISPLAY=:0
# Finished adapting your DISPLAY environment variable for use with MacPorts.

My other machine also has a ~/.zprofile, but it only sets the PATH.  it does 
not set DISPLAY.

I surmise that MacPorts stopped fiddling with DISPLAY sometime between late 
2020 and late 2021.  Maybe there should be some automatic check of DISPLAY in 
.zprofile, and a it could offer to clean it up if needed.

Cheers,

Kevin



> On Dec 1, 2023, at 03:42, Christopher Jones <jon...@hep.phy.cam.ac.uk> wrote:
> 
> 
> 
>> On 1 Dec 2023, at 6:52 am, Kenneth Wolcott <kennethwolc...@gmail.com> wrote:
>> 
>> Hi;
>> 
>>  So what is the proper way for X to be started?
> 
> 
> If properly configured the X11 server will automatically start on demand. You 
> really should never need to manually start it.
> 
>> 
>>  Do I need to manually create a launch entry like I have for the
>> emacs server?  If so, what is the invocation? What is being invoked?
>> xorg-server?
>> 
>>  Now that the DISPLAY is null, invoking xpdf fails even after an open
>> -a /Applications/MacPorts/X11.app, complaining about the DISPLAY
>> variable setting
> 
> Having DISPLAY null is as bad as setting it to :0.0
> 
> It should look something like what I posted before
> 
> $ echo $DISPLAY
> /private/tmp/com.apple.launchd.TwDg8TRtvI/org.macosforge.xquartz:0
> 
> This is the launchd socket, the magic if you like, that triggers it to be 
> started on demand.
> 
> Please try as I posted in my first mail completeing uninstalling org-server, 
> then re-install it. Then log out and back in again (this is important) and 
> then see. If it is still null then you have something else setting that and 
> you need to figure out what.
> 
> Chris
> 
>> 
>> Thanks,
>> Ken
>> 
>> On Thu, Nov 30, 2023 at 10:47 PM Kenneth Wolcott
>> <kennethwolc...@gmail.com> wrote:
>>> 
>>> Hi Ryan;
>>> 
>>>  It was defined in ~/.zprofile and created by MacPorts in 2021 :-)  I
>>> commented it out. I'll source the .zprofile and see what happens.
>>> 
>>> Thanks,
>>> Ken
>>> 
>>> On Thu, Nov 30, 2023 at 10:23 PM Ryan Schmidt <ryandes...@macports.org> 
>>> wrote:
>>>> 
>>>> On Nov 30, 2023, at 16:01, Kenneth Wolcott wrote:
>>>>> 
>>>>> 3. My DISPLAY environment variable is set to ":0";
>>>>> I do not know where this variable is not being set properly or is
>>>>> being overridden.
>>>> 
>>>> You need to figure out where DISPLAY=:0 is being set, and remove the code 
>>>> that does so. It's probably in your shell startup file. Depending on which 
>>>> shell you use, there are many possible names for startup files in your 
>>>> home directory: .zshrc, .zprofile, .bashrc, .bash_profile, etc.
>>>> 
>>>> Setting DISPLAY=:0 was correct in Mac OS X 10.4 and earlier but it has not 
>>>> been correct since Mac OS X 10.5.
> 

Reply via email to