[MacPorts] #42852: MacPorts installation sets $DISPLAY=:0 in .bashrc
#42852: MacPorts installation sets $DISPLAY=:0 in .bashrc ------------------------------+-------------------------------- Reporter: Norbert.Marwan@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.2.1 Keywords: X,installation | Port: ------------------------------+-------------------------------- After installing MacPorts I found a new line in .bashrc setting the $DISPLAY variable to :0. This is highly problematic because the Xorg server sometimes creates a new display port (e.g. :1). In this case, X applications will not be able to work because the DISPLAY was set to :0 and an annoying "unable to open display at :0" error appears. MacPort should not set the DISPLAY variable to :0. If it is necessary to set it then the port needs to be set dynamically, depending on the used display port of the currently running X server. -- Ticket URL: <https://trac.macports.org/ticket/42852> MacPorts <http://www.macports.org/> Ports system for OS X
#42852: MacPorts installation sets $DISPLAY=:0 in .bashrc -------------------------------+-------------------------------- Reporter: Norbert.Marwan@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.2.1 Resolution: | Keywords: X,installation Port: | -------------------------------+-------------------------------- Comment (by Norbert.Marwan@…): I need to correct me, it is not .bashrc but .bash_profile. -- Ticket URL: <https://trac.macports.org/ticket/42852#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#42852: MacPorts installation sets $DISPLAY=:0 in .bashrc -------------------------------+-------------------------------- Reporter: Norbert.Marwan@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.2.1 Resolution: | Keywords: X,installation Port: | -------------------------------+-------------------------------- Comment (by cal@…): It seems there is indeed some code that adds a DISPLAY variable, but it should only be run on Tiger and below. Are you using Tiger? If not, what does `sw_vers -productVersion | awk -F . '{print $2}'` echo on your system? Relevant code is source:trunk/base/portmgr/dmg/postflight?marks=268-273#L260. -- Ticket URL: <https://trac.macports.org/ticket/42852#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#42852: MacPorts installation sets $DISPLAY=:0 in .bashrc -------------------------------+-------------------------------- Reporter: Norbert.Marwan@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.2.1 Resolution: | Keywords: X,installation Port: | -------------------------------+-------------------------------- Comment (by Norbert.Marwan@…): Thanks for the reply and clarification. I have used Tiger for long time and also used MacPorts then. Since two years I'm using Lion/ Mavericks. But I have got this problem only quite recently and took me some time to figure out what was the problem. I could not recognise which version of MacPorts caused the modification of .bash_profile. Good to know that this is not an issue anymore. The ticket can then be closed. -- Ticket URL: <https://trac.macports.org/ticket/42852#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#42852: MacPorts installation sets $DISPLAY=:0 in .bashrc -------------------------------+-------------------------------- Reporter: Norbert.Marwan@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: base | Version: 2.2.1 Resolution: invalid | Keywords: Port: | -------------------------------+-------------------------------- Changes (by ryandesign@…): * keywords: X,installation => * status: new => closed * resolution: => invalid Comment: Right, base only adds the DISPLAY variable if you're on Tiger, and you haven't already set DISPLAY yourself. If on Leopard or later, or if you've already set DISPLAY, MacPorts won't modify it. -- Ticket URL: <https://trac.macports.org/ticket/42852#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts