Opened 3 years ago

Last modified 3 years ago

#63217 new defect

Makefile and installer postflight script should remove incorrect DISPLAY environment variable left in shell startup script by MacPorts 2.6.4 installation on Big Sur

Reported by: WHNiii385 Owned by:
Priority: Normal Milestone:
Component: base Version: 2.7.1
Keywords: bigsur Cc:
Port:

Description

Get same error trying to run gimp. Both are MacPorts and neither with access the display. Echo display yields :0.

Change History (4)

comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

DISPLAY should not be :0. Perhaps you are running macOS 11 or later and had installed MacPorts 2.6.4? The MacPorts 2.6.4 installer contained a bug that erroneously sets DISPLAY to :0 in your shell startup file on macOS 11 and later. The MacPorts 2.7.0 and later installers no longer have this bug but they do not fix the problem in your shell startup file if the MacPorts 2.6.4 installer had been used before. So please edit your shell startup file to remove any line that sets DISPLAY.

comment:2 Changed 3 years ago by WHNiii385

So you admit that your code did it, and give me some vague idea that I have to fix it by changing some shell startup file, whatever and wherever that is to fix it. None of my MacPorts will run! Really? You tell me you do not have some kind of instruction Sheet that will show me the steps to fix a problem you created that keeps ALL of your MacPorts solutions from running! Really? Can you at least throw me a bone and tell me where the shell startup file is? A little more help please.

comment:3 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Certainly I admit there was a bug. If you want to read more about it, it's #61649. The bug that caused the problem was fixed, so new installations using MacPorts 2.7.0 and later will no longer be affected. It would have been a good idea for us to also fix up existing installations, but nobody wrote code to do that. We are a volunteer project and things only get done when people do them.

I wasn't more specific about "shell startup file" because it varies depending on which shell you use. You can run echo $SHELL to see what your shell is. If it is zsh, then your shell startup file is the file .zprofile in your home directory. If your shell is bash, then the startup file is .bash_profile in your home directory if present, otherwise it is .bash_login in your home directory if present, otherwise it is .profile in your home directory. Files whose names begin with . are normally hidden in the Finder so you either have to show hidden files in the Finder or else open the file into your editor by using the Terminal. For example, if you use the zsh shell, you could use open -e ~/.zprofile

Once you have found and opened your shell startup file, look for any lines reading export DISPLAY=:0 and remove them. Save and close the file.

comment:4 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Component: portsbase
Keywords: bigsur added
Summary: (gpredict:17718): Gtk-WARNING **: 12:26:26.523: cannot open display: :0Makefile and installer postflight script should remove incorrect DISPLAY environment variable left in shell startup script by MacPorts 2.6.4 installation on Big Sur
Note: See TracTickets for help on using tickets.