Opened 6 months ago

Closed 6 months ago

#68836 closed enhancement (duplicate)

Should clean up DISPLAY=:0 setting from MacPorts 2.6.4 installer

Reported by: khorton (Kevin Horton) Owned by:
Priority: Normal Milestone:
Component: base Version: 2.8.1
Keywords: Cc:
Port:

Description

Some users have found that XQuartz is not opening automatically due to DISPLAY being set to :0. Some of these cases are due to additions to ~/.zprofile apparently inserted by the MacPorts 2.6.4 installer.

Example code fragment from ~/.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.

Diagnosis by Ryan Schmidt on macports-users list 2023-12-03:

The MacPorts 2.6.4 installer for macOS 11 inadvertently added the DISPLAY=:0 setting to shell startup files. The bug was corrected in MacPorts 2.7.0 but no code was ever added to clean up the mess for users who had already used the 2.6.4 installer. 

https://trac.macports.org/ticket/61649

Could you file a new ticket to do that cleanup? Bonus points if you want to submit a pull request to implement it. See:

https://github.com/macports/macports-base/pull/218#issuecomment-739666236

Ideally, a future MacPorts installer would check for the presence of export DISPLAY=:0 in ~/.zprofile on OS versions where it is inappropriate and offer to remove it, or at least bring it to the user's attention and direct him to remove it manually.

Change History (1)

comment:1 Changed 6 months ago by jmroot (Joshua Root)

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.