Opened 11 years ago

Closed 11 years ago

#39129 closed enhancement (wontfix)

xinit: X11.app does not start automatically on Mountain Lion

Reported by: lpsinger (Leo Singer) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: haspatch Cc: cooljeanius (Eric Gallager), larryv (Lawrence Velázquez)
Port: xinit

Description

X11.app does not start automatically when launching an X application from Terminal because the LaunchAgent is disabled by default. This patch enables the LaunchAgent by default on OS X 10.6.3 and later, by just omitting the patchfile disable-launchagent.patch.

Now, in the activate stage, Snow Leopard pre-10.6.3 users will see:

###############################################################################
# To choose MacPorts' X11 as the default server, you must install xorg-server,
# load the LaunchAgent, logout, and log back in.  To load the LaunchAgent,
# please execute the following:
# 
# launchctl load -w /Library/LaunchAgents/org.macports.startx.plist
# 
# This will be remembered across port updates on Snow Leopard and later.
# 
# Note that doing so on your OS version may make the Apple-provided version
# fail to launch.
###############################################################################

But users of 10.6.3 and later will see simply:

###############################################################################
# To choose MacPorts' X11 as the default server, you must install xorg-server,
# logout, and log back in.
###############################################################################

Attachments (1)

patch-Portfile.diff (2.8 KB) - added by lpsinger (Leo Singer) 11 years ago.
proposed change to Portfile

Download all attachments as: .zip

Change History (12)

Changed 11 years ago by lpsinger (Leo Singer)

Attachment: patch-Portfile.diff added

proposed change to Portfile

comment:1 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

It would be rather unfortunate if the xinit port was installed with an active startx LaunchAgent but no xorg-server to launch. This might result in a user with $DISPLAY pointing to a "bad" MacPorts X11 instead of a working Apple X11.app on SL or Lion.

I think we should stop providing the LaunchAgent in the xinit port and instead provide it in the xorg-server and xorg-server-devel ports.

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

Keywords: haspatch added
Type: defectenhancement

comment:3 in reply to:  1 ; Changed 11 years ago by lpsinger (Leo Singer)

Replying to jeremyhu@…:

I think we should stop providing the LaunchAgent in the xinit port and instead provide it in the xorg-server and xorg-server-devel ports.

Sounds fine to me, but:

What depends on xinit? On my machine I see only:

$ port dependents xinit
xorg-apps depends on xinit
xorg-server depends on xinit

Why does xorg-apps depend on xinit? Perhaps this question just exposes my ignorance of X11's architecture. If xinit was only a dependency of xorg-server, then I would say that it might be OK to have xinit provide the LaunchAgent.

comment:4 in reply to:  3 ; Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Replying to aronnax@…:

Replying to jeremyhu@…:

I think we should stop providing the LaunchAgent in the xinit port and instead provide it in the xorg-server and xorg-server-devel ports.

Note that I'm not opposed to this current patch being an intermediate step towards that end. I don't have much time to dedicate to this at the moment. Feel free to commit if you don't want to do the change that I suggested.

Sounds fine to me, but:

What depends on xinit? On my machine I see only:

$ port dependents xinit
xorg-apps depends on xinit
xorg-server depends on xinit

Why does xorg-apps depend on xinit?

Legacy reasons that probably don't matter much any more. That is from when we made the xorg-apps, xorg-libs, and xorg meta ports to help ease transition.

Perhaps this question just exposes my ignorance of X11's architecture. If xinit was only a dependency of xorg-server, then I would say that it might be OK to have xinit provide the LaunchAgent.

I want to protect against users that have xinit without xorg-server. This is most likely to happen if they hit an error that prevents xorg-server from installing after xinit has been activated.

comment:5 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:6 Changed 11 years ago by larryv (Lawrence Velázquez)

Cc: larryv@… added

Cc Me!

comment:7 in reply to:  4 ; Changed 11 years ago by lpsinger (Leo Singer)

Replying to jeremyhu@…:

Note that I'm not opposed to this current patch being an intermediate step towards that end. I don't have much time to dedicate to this at the moment. Feel free to commit if you don't want to do the change that I suggested.

Thank you. Committed in r106166.

Moving the LaunchAgent to xorg-xserver is probably a good idea, but a little bit trickier because the LaunchAgent is provided by the xinit package.

What about making xorg-server a runtime dependency of xinit?

comment:8 in reply to:  7 ; Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Replying to aronnax@…:

What about making xorg-server a runtime dependency of xinit?

There is already a runtime dependency in the opposite direction. That would introduce a cycle. Are cycles ok for depends_run?

comment:9 in reply to:  8 ; Changed 11 years ago by larryv (Lawrence Velázquez)

Replying to jeremyhu@…:

There is already a runtime dependency in the opposite direction. That would introduce a cycle. Are cycles ok for depends_run?

No; runtime dependencies are installed before build, so it would still cause a problem.

comment:10 in reply to:  9 Changed 11 years ago by lpsinger (Leo Singer)

Replying to larryv@…:

Replying to jeremyhu@…:

There is already a runtime dependency in the opposite direction. That would introduce a cycle. Are cycles ok for depends_run?

No; runtime dependencies are installed before build, so it would still cause a problem.

The thing is, if xorg-server provides the LaunchAgent, then the program that the LaunchAgent is invoking, startx, is still provided by xinit. Wouldn't separating the LaunchAgent and xinit be just as bad as separating xinit from xorg-server?

Last edited 11 years ago by lpsinger (Leo Singer) (previous) (diff)

comment:11 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

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