Re: How to fix the problem of Cannot open display?
Am 06.10.2009 um 16:42 schrieb Peng Yu: So the instructions the port prints out are wrong? Is there a way to correct them? It sounds like you're saying you need sudo to have access to write the changes to the plist, but I remember from prior discussions that this would cause the launchagent to be running as root, when in fact we want the launchagent running as the current user. You are right, LaunchAgents/org.freedesktop.dbus-session.plist is meant to be run by the current user, not root. And yes, the instructions look kind of wrong. launchctl load -w without sudo does not work because it requires write access to the file. But if -w is not used, the Disabled key will not be removed and it cannot be loaded automatically at system startup time... The bottom line is that the startupitem code needs some love. At present it really can't handle anything beyond launchdaemons that will be started by root. dbus does not use the startupitem.* code for org.freedesktop.dbus-sesstion.plist as it installs multiple plist files which startupitem.* cannot handle. I don't understand what would be the solution to my problem. Could somebody let me know the detailed steps what I should do? I would like to know that, too. It seems to me that dbus is not running correctly on SL and therefore KDE stuff is not running since kdeinit fails... Dom ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: How to fix the problem of Cannot open display?
On 2009-10-06 04:26 , Joshua Root wrote: On 2009-10-6 11:19, Ryan Schmidt wrote: So the instructions the port prints out are wrong? Is there a way to correct them? It sounds like you're saying you need sudo to have access to write the changes to the plist, but I remember from prior discussions that this would cause the launchagent to be running as root, when in fact we want the launchagent running as the current user. You are right, LaunchAgents/org.freedesktop.dbus-session.plist is meant to be run by the current user, not root. And yes, the instructions look kind of wrong. launchctl load -w without sudo does not work because it requires write access to the file. But if -w is not used, the Disabled key will not be removed and it cannot be loaded automatically at system startup time... The bottom line is that the startupitem code needs some love. At present it really can't handle anything beyond launchdaemons that will be started by root. dbus does not use the startupitem.* code for org.freedesktop.dbus-sesstion.plist as it installs multiple plist files which startupitem.* cannot handle. Rainer ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: How to fix the problem of Cannot open display?
On Tue, Oct 6, 2009 at 3:15 AM, Rainer Müller rai...@macports.org wrote: On 2009-10-06 04:26 , Joshua Root wrote: On 2009-10-6 11:19, Ryan Schmidt wrote: So the instructions the port prints out are wrong? Is there a way to correct them? It sounds like you're saying you need sudo to have access to write the changes to the plist, but I remember from prior discussions that this would cause the launchagent to be running as root, when in fact we want the launchagent running as the current user. You are right, LaunchAgents/org.freedesktop.dbus-session.plist is meant to be run by the current user, not root. And yes, the instructions look kind of wrong. launchctl load -w without sudo does not work because it requires write access to the file. But if -w is not used, the Disabled key will not be removed and it cannot be loaded automatically at system startup time... The bottom line is that the startupitem code needs some love. At present it really can't handle anything beyond launchdaemons that will be started by root. dbus does not use the startupitem.* code for org.freedesktop.dbus-sesstion.plist as it installs multiple plist files which startupitem.* cannot handle. I don't understand what would be the solution to my problem. Could somebody let me know the detailed steps what I should do? Regards, Peng ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: How to fix the problem of Cannot open display?
Peng Yu wrote: On Sun, Oct 4, 2009 at 10:05 PM, Ryan Schmidt ryandes...@macports.org wrote: launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist So run that command (not as sudo). Here is what I got after running the command that you mentioned. What's the problem? $sudo port install dbus Password: --- Computing dependencies for dbus --- Cleaning dbus $ launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist launchctl: CFURLWriteDataAndPropertiesToResource(/Library/LaunchAgents/org.freedesktop.dbus-session.plist) failed: -10 $ls /Library/LaunchAgents/org.freedesktop.dbus-session.plist /Library/LaunchAgents/org.freedesktop.dbus-session.plist The -w option requires write access to that file what you usually do not have as a normal user. It is used to remove the Disabled key from the file. Alternatively you can force the load like this: $ launchctl load -F /Library/LaunchAgents/org.freedesktop.dbus-session.plist Rainer ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: How to fix the problem of Cannot open display?
On Mon, Oct 5, 2009 at 1:39 PM, Rainer Müller rai...@macports.org wrote: Peng Yu wrote: On Sun, Oct 4, 2009 at 10:05 PM, Ryan Schmidt ryandes...@macports.org wrote: launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist So run that command (not as sudo). Here is what I got after running the command that you mentioned. What's the problem? $sudo port install dbus Password: --- Computing dependencies for dbus --- Cleaning dbus $ launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist launchctl: CFURLWriteDataAndPropertiesToResource(/Library/LaunchAgents/org.freedesktop.dbus-session.plist) failed: -10 $ls /Library/LaunchAgents/org.freedesktop.dbus-session.plist /Library/LaunchAgents/org.freedesktop.dbus-session.plist The -w option requires write access to that file what you usually do not have as a normal user. It is used to remove the Disabled key from the file. Alternatively you can force the load like this: $ launchctl load -F /Library/LaunchAgents/org.freedesktop.dbus-session.plist Here is what I get and I still get errors when I run gnome-terminal. $ launchctl load -F /Library/LaunchAgents/org.freedesktop.dbus-session.plist org.freedesktop.dbus-session: Already loaded $ gnome-terminal Xlib: extension RANDR missing on display /tmp/launch-blAgTJ/:0. ** ERROR:terminal-app.c:1433:terminal_app_init: assertion failed: (app-system_font_desc != NULL) Abort trap ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: How to fix the problem of Cannot open display?
On 2009-10-05 21:07 , Peng Yu wrote: Here is what I get and I still get errors when I run gnome-terminal. $ launchctl load -F /Library/LaunchAgents/org.freedesktop.dbus-session.plist org.freedesktop.dbus-session: Already loaded $ gnome-terminal Xlib: extension RANDR missing on display /tmp/launch-blAgTJ/:0. ** ERROR:terminal-app.c:1433:terminal_app_init: assertion failed: (app-system_font_desc != NULL) Abort trap Found an upstream bug report of this problem: https://bugzilla.gnome.org/show_bug.cgi?id=590774 Rainer ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: How to fix the problem of Cannot open display?
On Oct 5, 2009, at 13:39, Rainer Müller wrote: Peng Yu wrote: On Sun, Oct 4, 2009 at 10:05 PM, Ryan Schmidt ryandes...@macports.org wrote: launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus- session.plist So run that command (not as sudo). Here is what I got after running the command that you mentioned. What's the problem? $sudo port install dbus Password: --- Computing dependencies for dbus --- Cleaning dbus $ launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus- session.plist launchctl: CFURLWriteDataAndPropertiesToResource(/Library/ LaunchAgents/org.freedesktop.dbus-session.plist) failed: -10 $ls /Library/LaunchAgents/org.freedesktop.dbus-session.plist /Library/LaunchAgents/org.freedesktop.dbus-session.plist The -w option requires write access to that file what you usually do not have as a normal user. It is used to remove the Disabled key from the file. So the instructions the port prints out are wrong? Is there a way to correct them? It sounds like you're saying you need sudo to have access to write the changes to the plist, but I remember from prior discussions that this would cause the launchagent to be running as root, when in fact we want the launchagent running as the current user. Alternatively you can force the load like this: $ launchctl load -F /Library/LaunchAgents/org.freedesktop.dbus- session.plist ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: How to fix the problem of Cannot open display?
On 2009-10-6 11:19, Ryan Schmidt wrote: On Oct 5, 2009, at 13:39, Rainer Müller wrote: Peng Yu wrote: $ launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist launchctl: CFURLWriteDataAndPropertiesToResource(/Library/LaunchAgents/org.freedesktop.dbus-session.plist) failed: -10 $ls /Library/LaunchAgents/org.freedesktop.dbus-session.plist /Library/LaunchAgents/org.freedesktop.dbus-session.plist The -w option requires write access to that file what you usually do not have as a normal user. It is used to remove the Disabled key from the file. So the instructions the port prints out are wrong? Is there a way to correct them? It sounds like you're saying you need sudo to have access to write the changes to the plist, but I remember from prior discussions that this would cause the launchagent to be running as root, when in fact we want the launchagent running as the current user. The bottom line is that the startupitem code needs some love. At present it really can't handle anything beyond launchdaemons that will be started by root. - Josh ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: How to fix the problem of Cannot open display?
On Oct 4, 2009, at 13:53 , Peng Yu wrote: $ gnome-terminal $Failed to parse arguments: Cannot open display: Unless you built Gtk+ with native Aqua support (which I think won't yet work with GNOME stuff), you need to install and run Apple's X11. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon universityKF8NH PGP.sig Description: This is a digitally signed message part ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: How to fix the problem of Cannot open display?
On Sun, Oct 4, 2009 at 12:55 PM, Brandon Allbery allb...@kf8nh.com wrote: On Oct 4, 2009, at 13:53 , Peng Yu wrote: $ gnome-terminal $Failed to parse arguments: Cannot open display: Unless you built Gtk+ with native Aqua support (which I think won't yet work with GNOME stuff), you need to install and run Apple's X11. My OS is leopard. Would you please point me where I should download it? And how to install it? Thank you! Regards, Peng ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: How to fix the problem of Cannot open display?
On Oct 4, 2009, at 16:08 , Peng Yu wrote: On Sun, Oct 4, 2009 at 12:55 PM, Brandon Allbery allb...@kf8nh.com wrote: On Oct 4, 2009, at 13:53 , Peng Yu wrote: $ gnome-terminal $Failed to parse arguments: Cannot open display: Unless you built Gtk+ with native Aqua support (which I think won't yet work with GNOME stuff), you need to install and run Apple's X11. My OS is leopard. Would you please point me where I should download it? And how to install it? Thank you! Official X11 for Leopard is on your install DVD (run System Update afterward). Unofficial, but with updates and bugfixes: http://xquartz.macosforge.net X11 should have been installed by default on Leopard, actually, but without the XQuartz update it won't auto-run; you'll find X11.app in / Applications/Utilities. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon universityKF8NH PGP.sig Description: This is a digitally signed message part ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: How to fix the problem of Cannot open display?
On Sun, Oct 4, 2009 at 3:14 PM, Brandon Allbery allb...@kf8nh.com wrote: On Oct 4, 2009, at 16:08 , Peng Yu wrote: On Sun, Oct 4, 2009 at 12:55 PM, Brandon Allbery allb...@kf8nh.com wrote: On Oct 4, 2009, at 13:53 , Peng Yu wrote: $ gnome-terminal $Failed to parse arguments: Cannot open display: Unless you built Gtk+ with native Aqua support (which I think won't yet work with GNOME stuff), you need to install and run Apple's X11. My OS is leopard. Would you please point me where I should download it? And how to install it? Thank you! Official X11 for Leopard is on your install DVD (run System Update afterward). Unofficial, but with updates and bugfixes: http://xquartz.macosforge.net X11 should have been installed by default on Leopard, actually, but without the XQuartz update it won't auto-run; you'll find X11.app in /Applications/Utilities. I started X11.app in /Applications/Utilities. But I still got the same error as that in my original post. What's the problem? How to run XQuartz update? Do I need to download X11-2.4.0.dmg and install it? What is the difference between X11-2.4.0.dmg and X11.app in /Applications/Utilities? http://xquartz.macosforge.org/trac/wiki/X112.4.0 Regards, Peng ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: How to fix the problem of Cannot open display?
On Oct 4, 2009, at 16:54 , Peng Yu wrote: I started X11.app in /Applications/Utilities. But I still got the same error as that in my original post. What's the problem? You'll need to run gnome-terminal from the initial xterm, or from X11's Application menu, or after starting X11 do export DISPLAY=:0 in a Terminal.app, or install the update do launchd will do forwarding automatically. How to run XQuartz update? Do I need to download X11-2.4.0.dmg and install it? What is the difference between X11-2.4.0.dmg and X11.app in /Applications/Utilities? Yes, download and install X11-2.4.0.dmg. (Note that this won't install on Snow Leopard.) The big user-visible change is that X11 2.4.0 hooks into launchd, so launchd presets $DISPLAY for you and X11.app will launch automatically if needed. Otherwise it's mostly bugfixes. If you're going to make significant use of Apple's X11, I suggest subscribing to x11-us...@lists.apple.com. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon universityKF8NH PGP.sig Description: This is a digitally signed message part ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: How to fix the problem of Cannot open display?
On Oct 4, 2009, at 16:32, Brandon Allbery wrote: On Oct 4, 2009, at 16:54 , Peng Yu wrote: I started X11.app in /Applications/Utilities. But I still got the same error as that in my original post. What's the problem? You'll need to run gnome-terminal from the initial xterm, or from X11's Application menu, or after starting X11 do export DISPLAY=:0 in a Terminal.app, or install the update do launchd will do forwarding automatically. Starting on Leopard, Apple sets the DISPLAY variable for you in a way that X11 should auto-launch when you request an X11 program. So Brandon, you should not manually set DISPLAY, and Peng, I don't understand why X11 did not auto-launch for you. Do you have DISPLAY set to something in for example your .profile? If so, remove that, close the Terminal, open a new one, and try again. Also, note that you can install the xorg-server port and the quartz-wm port in MacPorts, and use /Applications/MacPorts/X11.app instead of Apple's /Applications/Utilities/X11.app. This is a slightly newer version of X11 than the one you'd get from Apple. ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: How to fix the problem of Cannot open display?
On Sun, Oct 4, 2009 at 6:05 PM, Ryan Schmidt ryandes...@macports.org wrote: On Oct 4, 2009, at 16:32, Brandon Allbery wrote: On Oct 4, 2009, at 16:54 , Peng Yu wrote: I started X11.app in /Applications/Utilities. But I still got the same error as that in my original post. What's the problem? You'll need to run gnome-terminal from the initial xterm, or from X11's Application menu, or after starting X11 do export DISPLAY=:0 in a Terminal.app, or install the update do launchd will do forwarding automatically. Starting on Leopard, Apple sets the DISPLAY variable for you in a way that X11 should auto-launch when you request an X11 program. So Brandon, you should not manually set DISPLAY, and Peng, I don't understand why X11 did not auto-launch for you. Do you have DISPLAY set to something in for example your .profile? If so, remove that, close the Terminal, open a new one, and try again. Also, note that you can install the xorg-server port and the quartz-wm port in MacPorts, and use /Applications/MacPorts/X11.app instead of Apple's /Applications/Utilities/X11.app. This is a slightly newer version of X11 than the one you'd get from Apple. I deleted 'export DISPLAY=localhost:0' in my ~/.bash_profile. I also installed the xorg-server port and the quartz-wm port, and started /Applications/MacPorts/X11.app. Then I started gnome-terminal. But I got the following error. Would you please let me know how to fix this problem? $ gnome-terminal Xlib: extension RANDR missing on display /tmp/launch-blAgTJ/:0. Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! Failed to get the session bus: Not enough memory Falling back to non-factory mode. Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: Not enough memory) Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: Not enough memory) Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: Not enough memory) Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: Not enough memory) Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: Not enough memory) Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: Not enough memory) Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: Not enough memory) Dynamic session lookup supported but failed: launchd did not provide a socket path,
Re: How to fix the problem of Cannot open display?
On Oct 4, 2009, at 20:12, Peng Yu wrote: I deleted 'export DISPLAY=localhost:0' in my ~/.bash_profile. I also installed the xorg-server port and the quartz-wm port, and started /Applications/MacPorts/X11.app. Then I started gnome-terminal. But I got the following error. Would you please let me know how to fix this problem? $ gnome-terminal Xlib: extension RANDR missing on display /tmp/launch-blAgTJ/:0. FYI, you can ignore the RANDR message. Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! Sounds like org.freedesktop.dbus-session.plist is not loaded. You should load it. It is provided by the dbus port, which should have printed instructions for you upon installation advising you how to load it. I believe the line it would have printed is: launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus- session.plist So run that command (not as sudo). ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: How to fix the problem of Cannot open display?
On Sun, Oct 4, 2009 at 10:05 PM, Ryan Schmidt ryandes...@macports.org wrote: On Oct 4, 2009, at 20:12, Peng Yu wrote: I deleted 'export DISPLAY=localhost:0' in my ~/.bash_profile. I also installed the xorg-server port and the quartz-wm port, and started /Applications/MacPorts/X11.app. Then I started gnome-terminal. But I got the following error. Would you please let me know how to fix this problem? $ gnome-terminal Xlib: extension RANDR missing on display /tmp/launch-blAgTJ/:0. FYI, you can ignore the RANDR message. Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! Sounds like org.freedesktop.dbus-session.plist is not loaded. You should load it. It is provided by the dbus port, which should have printed instructions for you upon installation advising you how to load it. I believe the line it would have printed is: launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist So run that command (not as sudo). Here is what I got after running the command that you mentioned. What's the problem? $sudo port install dbus Password: --- Computing dependencies for dbus --- Cleaning dbus $ launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist launchctl: CFURLWriteDataAndPropertiesToResource(/Library/LaunchAgents/org.freedesktop.dbus-session.plist) failed: -10 $ls /Library/LaunchAgents/org.freedesktop.dbus-session.plist /Library/LaunchAgents/org.freedesktop.dbus-session.plist ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users