忍者ブログ

素人翻訳

適当に翻訳する。

ログイン時にGNOMEアプレットの起動に失敗する

 時計のアプレットが起動できず、gnome-panelから時刻表示が消えてしまう。パソコンを再起動したら直った。その後、同じ現象は出ていない。

 エラーが出た時の「.xsession_errors」の中身が下記。

...
...
** (gnome-panel:2099): WARNING **: Failed to load applet ClockAppletFactory::ClockApplet:
GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: パス /org/gnome/panel/applet/ClockAppletFactory のオブジェクト上にインターフェイス 'org.gnome.panel.applet.AppletFactory' がありません
** Message: applet now embedded in the notification area
ウィンドウ・マネージャの警告: CurrentTime used to choose focus window; focus window may not be correct.
ウィンドウ・マネージャの警告: Got a request to focus the no_focus_window with a timestamp of 0. This shouldn't happen!
** Message: applet now removed from the notification area
Shutting down nautilus-gdu extension

(nautilus:2109): Eel-WARNING **: "nautilus-directory.c: directories" hash table still has 3 elements at quit time
gnome-settings-daemon: Fatal IO error 11 (リソースが一時的に利用できません) on X server :0.
polkit-gnome-authentication-agent-1: Fatal IO error 11 (リソースが一時的に利用できません) on X server :0.
gnome-volume-control-applet: Fatal IO error 11 (リソースが一時的に利用できません) on X server :0.
gdu-notification-daemon: Fatal IO error 11 (リソースが一時的に利用できません) on X server :0.
nm-applet: Fatal IO error 11 (リソースが一時的に利用できません) on X server :0.
...

 Some of gnome applets in panel sometimes crashes on startupによると、インタフェイス AppletFactory の登録前に、同インタフェイスの GetApplet メソッドが呼び出されてしまう、ということがよくあるらしい。

 $HOME/GNOME_PANEL_2_31_2/libpanel-applet/panel-applet-factory.c において、

...
...
static const gchar introspection_xml[] =
	"<node>"
	    "<interface name='org.gnome.panel.applet.AppletFactory'>"
	      "<method name='GetApplet'>"
	        "<arg name='applet_id' type='s' direction='in'/>"
	        "<arg name='screen' type='i' direction='in'/>"
	        "<arg name='props' type='a{sv}' direction='in'/>"
	        "<arg name='applet' type='o' direction='out'/>"
	        "<arg name='xid' type='u' direction='out'/>"
	      "</method>"
	    "</interface>"
	  "</node>";
...
...
static void
on_name_acquired (GDBusConnection    *connection,
		  const gchar        *name,
		  PanelAppletFactory *factory)
{
	gchar  *object_path;
	GError *error = NULL;

	if (!introspection_data)
		introspection_data = g_dbus_node_info_new_for_xml (introspection_xml, NULL);
	object_path = g_strdup_printf (PANEL_APPLET_FACTORY_OBJECT_PATH, factory->factory_id);
	g_dbus_connection_register_object (connection,
					   object_path,
					   introspection_data->interfaces[0],
					   &interface_vtable,
					   factory, NULL,
					   &error);
	if (error) {
		g_printerr ("Failed to register object %s: %s\n", object_path, error->message);
		g_error_free (error);
	}

	g_free (object_path);
}
...
...
gboolean
panel_applet_factory_register_service (PanelAppletFactory *factory)
{
	gchar *service_name;

	service_name = g_strdup_printf (PANEL_APPLET_FACTORY_SERVICE_NAME, factory->factory_id);
	g_bus_own_name (G_BUS_TYPE_SESSION,
			service_name,
			G_BUS_NAME_OWNER_FLAGS_NONE,
			NULL,
			(GBusNameAcquiredCallback) on_name_acquired,
			(GBusNameLostCallback) on_name_lost,
			factory, NULL);
	g_free (service_name);

	return TRUE;
}
...
...

 また、$HOME/GNOME_PANEL_2_31_2/gnome-panel/libpanel-applet-private/panel-applet-container.c において、

...
...
#define PANEL_APPLET_FACTORY_INTERFACE   "org.gnome.panel.applet.AppletFactory"
...
...
static void
on_factory_appeared (GDBusConnection   *connection,
		     const gchar       *name,
		     const gchar       *name_owner,
		     AppletFactoryData *data)
{
	PanelAppletContainer *container;
	gchar                *object_path;

	container = PANEL_APPLET_CONTAINER (g_async_result_get_source_object (G_ASYNC_RESULT (data->result)));
	container->priv->bus_name = g_strdup (name_owner);
	object_path = g_strdup_printf (PANEL_APPLET_FACTORY_OBJECT_PATH, data->factory_id);
	g_dbus_connection_call (connection,
				name_owner,
				object_path,
				PANEL_APPLET_FACTORY_INTERFACE,
				"GetApplet",
				data->parameters,
				G_VARIANT_TYPE ("(ou)"),
				G_DBUS_CALL_FLAGS_NONE,
				-1,
				data->cancellable,
				get_applet_cb,
				data->result);
	g_free (object_path);
}
...
...

 結局、panel-applet-factory.c の on_name_acquired 関数中の g_dbus_connection_register_object が、panel-applet-container.c の on_factory_appeared 関数中の g_dbus_connection_call に間に合わないと、アプレットの読み込みに失敗するとのこと。

PR

コメント

お名前
タイトル
文字色
メールアドレス
URL
コメント
パスワード Vodafone絵文字 i-mode絵文字 Ezweb絵文字

カレンダー

03 2024/04 05
S M T W T F S
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

最新コメント

[08/18 NONAME]
[05/18 NONAME]
[04/09 NONAME]
[03/21 NONAME]
[03/20 NONAME]

最新記事

ブログ内検索

広告

バーコード

広告