请求 QGIS 2.2 访问台式机上的数据时发生崩溃。运行 Ubuntu 14.04 LTS。
通过终端以 root 身份运行 QGIS 桌面确实允许我打开文件!但程序运行后(即初始加载/欢迎图形消失后)也会立即弹出错误消息:
图层 /usr/share/applications/%F 不是有效图层,无法添加到地图中
有什么想法可以让我让 QGIS 以 root 权限从 GUI(unity)运行,而无需通过终端打开它并添加 sudo 前缀?
我已尝试 edm 在下面提供的解决方案,但打开的窗口挂起,并且我收到与 klauncher 相关的错误:无法启动进程无法与 klauncher 对话:未连接到 D-Bus 服务器。如何从 Unity Launcher 以 root 身份启动应用程序?
可能是我的 KDE 配置文件已损坏。有什么办法可以纠正这个问题,以便我可以从 unity 运行 qgis?
我对此还只是个初学者,因此如果我需要发布更多命令输出,请提供任何说明。
$ qgis
Warning: loading of qt translation failed [/usr/share/qt4/translations/qt_en_AU]
qgis.bin(32381)/KSharedDataCache KSharedDataCache::Private::mapSharedMemory:无法建立共享内存映射,将回退到私有内存——内存使用量将增加 kbuildsycoca4 正在运行……kbuildsycoca4:创建数据库“/home/lyndon/.kde/cache-Gerhard-ThinkPad-W530/ksycoca4”时出错!目标目录中的权限不足。警告:错误:运行 KSycoca 失败。QGIS 因信号 11ptrace 而死亡:操作不允许。未选择线程无堆栈。gdb 返回 0 中止(核心转储)'
任何请求,例如打开文件、浏览、创建新项目等都会导致崩溃。
输出:
sudo ls -l /home/lyndon/.kde/cache-Gerhard-ThinkPad-W530/
total 10320
-rw-r--r-- 1 root root 10547304 Apr 25 2013 icon-cache.kcache –
以 root 身份(通过终端)运行程序可以正常工作。但是出现了一个新错误:
$ sudo qgis %F
Warning: loading of qt translation failed [/usr/share/qt4/translations/qt_en_AU]
Error: "/tmp/kde-lyndon" is owned by uid 1000 instead of uid 0.
Error: "/tmp/ksocket-lyndon" is owned by uid 1000 instead of uid 0.
Error: "/tmp/kde-lyndon" is owned by uid 1000 instead of uid 0.
kdeinit4:正在关闭正在运行的客户端。连接到已弃用的信号 QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString) 错误:“/tmp/ksocket-lyndon”归 uid 1000 所有,而不是 uid 0。错误:“/tmp/kde-lyndon”归 uid 1000 所有,而不是 uid 0。QDBusConnection:在 QCoreApplication 之前创建会话 D-Bus 连接。应用程序可能出现错误。QDBusConnection:在 QCoreApplication 之前创建会话 D-Bus 连接。应用程序可能出现错误。 kbuildsycoca4 正在运行... kbuildsycoca4(8139) VFolderMenu::loadDoc: “/home/lyndon/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu” 中的解析错误,第 1 行,第 1 列:“意外的文件结束” kbuildsycoca4(8139)/kdecore (服务) KServicePrivate::init: 桌面条目文件“/usr/share/applications/evolution-data-server-uoa.desktop”的 Type=“Application”,但没有 Exec 行
kbuildsycoca4(8139) KBuildServiceFactory::createEntry: Invalid Service : "/usr/share/applications/evolution-data-server-uoa.desktop"
kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: 桌面文件“/usr/share/applications/Launchpadlaunchpadnet.desktop”引用操作“S0”,但未定义它 kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: 桌面文件“/usr/share/applications/Launchpadlaunchpadnet.desktop”引用操作“S1”,但未定义它 kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: 桌面文件“/usr/share/applications/Launchpadlaunchpadnet.desktop”引用操作“S2”,但未定义它 kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions:桌面文件“/usr/share/applications/Launchpadlaunchpadnet.desktop”引用了操作“S3”,但未定义它 kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: 桌面文件“/usr/share/applications/Launchpadlaunchpadnet.desktop”引用了操作“S4”,但未定义它 kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: 桌面文件“/usr/share/applications/Launchpadlaunchpadnet.desktop”引用了操作“S5”,但未定义它 kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: 桌面文件“/usr/share/applications/Launchpadlaunchpadnet.desktop”引用了操作“S6”,但未定义它定义它 kbuildsycoca4(8139)/kdecore (服务) KServicePrivate::parseActions: 桌面文件“/usr/share/applications/Launchpadlaunchpadnet.desktop”引用操作“S7”,但未定义它 kbuildsycoca4(8139)/kdecore (服务) KServicePrivate::parseActions: 桌面文件“/usr/share/applications/Launchpadlaunchpadnet.desktop”引用操作“S8”,但未定义它 kbuildsycoca4(8139)/kdecore (服务) KServicePrivate::parseActions: 桌面文件“/usr/share/applications/Launchpadlaunchpadnet.desktop”引用操作“S9”,但未定义它 kbuildsycoca4(8139)/kdecore (服务) KServicePrivate::parseActions:桌面文件“/usr/share/applications/Launchpadlaunchpadnet.desktop”引用了操作“S10”,但未定义它 kbuildsycoca4(8139)/kdecore (服务) KServicePrivate::init: 桌面条目文件“/usr/share/applications/unity-scope-gdrive.desktop”的 Type=“Application”,但没有 Exec 行
kbuildsycoca4(8139) KBuildServiceFactory::createEntry: Invalid Service : "/usr/share/applications/unity-scope-gdrive.desktop"
KBuildServiceFactory::createEntry: Invalid Service : "/usr/share/applications/updf.desktop"
kbuildsycoca4(8139)/kdecore (services) KServicePrivate::init: The desktop entry file "/usr/share/applications/updf.desktop" has Type= " Application" instead of "Application" or "Service"
kbuildsycoca4(8139) KBuildServiceFactory::createEntry: Invalid Service : "/usr/share/applications/updf.desktop"
kbuildsycoca4(8139) KBuildServiceFactory::createEntry: Invalid Service : "/usr/share/applications/unity-lens-photos.desktop"
kbuildsycoca4(8139) kdemain: Emitting notifyDatabaseChanged ("servicetypes", "xdgdata-mime", "services", "apps")
Error: "/tmp/kde-lyndon" is owned by uid 1000 instead of uid 0.
Warning: Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
Warning: Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)
Error: "/tmp/ksocket-lyndon" is owned by uid 1000 instead of uid 0.
Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)
答案1
通过输入以下命令解决了该问题:
sudo chown -R lyndon:lyndon /home/lyndon/.kde/cache-lyndon-ThinkPad-W530/