本文介绍了Ubuntu 12.04 chroot中的org.gnome.SessionManager的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试以最小的chroot(主机和chroot都是ubuntu 12.04 amd64)测试图腾.加载视频时出现错误

I'm trying to test totem in a minimal chroot (host and chroot both ubuntu 12.04 amd64). When I load a video, I get the error

** (totem:25660): WARNING **: Problem inhibiting the screensaver: GDBus.Error:
org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.gnome.SessionManager" does not exist

实际上,观看视频时屏幕将关闭(会话空闲).确认一下,我使用python进行了测试:

Indeed, the screen will turn off (session idle) while watching a video. To confirm, I tested with python:

>>> import dbus
>>> bus = dbus.SessionBus()
>>> bus.get_object('org.gnome.SessionManager','/org/gnome/SessionManager')

并得到错误

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name
org.gnome.SessionManager was not provided by any .service files

有人知道哪些软件包将在chroot中提供dbus接口org.gnome.SessionManager吗?搜索之后,我尝试了gnome-session,gnome-session-common和gnome-session-bin.

Does anyone know what packages would provide the dbus interface org.gnome.SessionManager in a chroot? After searching on this, I've tried gnome-session, gnome-session-common and gnome-session-bin to no avail.

通过在 packages.ubuntu.com 和完整的12.04系统上都可以正常工作的系统上进行搜索,似乎没有任何软件包提供名为org.gnome.SessionManager.service的文件,那么它要寻找的是什么.service文件?

By searching on packages.ubuntu.com and on a full 12.04 system where these both work correctly, there doesn't appear to be any package providing a file named org.gnome.SessionManager.service, so what .service file is it looking for?.

推荐答案

在该服务正在运行的系统上,您可以通过查询总线来查找,如下所示:

On a system where that service is working, you can find out by querying the bus like this:

$ qdbus org.freedesktop.DBus / org.freedesktop.DBus.GetNameOwner org.kde.klipper
:1.82
$ qdbus org.freedesktop.DBus / org.freedesktop.DBus.GetConnectionUnixProcessID :1.82
1441
$ readlink /proc/1441/exe
/usr/bin/kdeinit4
$ rpm -qf /usr/bin/kdeinit4           # in your case dpkg -S /path/to/program
kdelibs4-4.7.2-5.5.1.x86_64

这篇关于Ubuntu 12.04 chroot中的org.gnome.SessionManager的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-24 13:05