我对运行 时出现的终端错误输出感到好奇sudo Kate
。我在一个论坛上看到,指示我使用 打开我的记事本gksudo
。意识到它尚未安装,我继续尝试使用 打开我的记事本编辑器并sudo
编辑.conf
文件(成功了,我的意思是它保存了新.conf
文件而没有 root 访问错误,但让我留下“未知错误行”sudo
)。我在我的 Raspberry PI 上运行使用 打开和编辑文本文件没有任何问题nano
。
是什么导致了错误行?如果容易回答的话,如何修复它们?
skratch@Slick:~$ sudo kate
[sudo] password for skratch:
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
Error: "/var/tmp/kdecache-skratch" is owned by uid 1000 instead of uid 0.
Error: "/tmp/kde-skratch" is owned by uid 1000 instead of uid 0.
Error: "/tmp/ksocket-skratch" is owned by uid 1000 instead of uid 0.
Error: "/tmp/kde-skratch" is owned by uid 1000 instead of uid 0.
kdeinit4: Shutting down running client.
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
Error: "/tmp/ksocket-skratch" is owned by uid 1000 instead of uid 0.
Error: "/tmp/kde-skratch" is owned by uid 1000 instead of uid 0.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
Error: "/var/tmp/kdecache-skratch" is owned by uid 1000 instead of uid 0.
kbuildsycoca4 running...
Error: "/var/tmp/kdecache-skratch" is owned by uid 1000 instead of uid 0.
Error: "/var/tmp/kdecache-skratch" is owned by uid 1000 instead of uid 0.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
Error: "/var/tmp/kdecache-skratch" is owned by uid 1000 instead of uid 0.
Bus::open: Can not get ibus-daemon's address.
IBusInputContext::createInputContext: no connection to ibus-daemon
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
Error: "/var/tmp/kdecache-skratch" is owned by uid 1000 instead of uid 0.
QObject::connect: Cannot connect (null)::resourceScoreUpdated(QString, QString, QString, double) to NepomukPlugin::resourceScoreUpdated(QString, QString, QString, double)
QObject::connect: Cannot connect (null)::recentStatsDeleted(QString, int, QString) to NepomukPlugin::deleteRecentStats(QString, int, QString)
QObject::connect: Cannot connect (null)::earlierStatsDeleted(QString, int) to NepomukPlugin::deleteEarlierStats(QString, int)
QDBusConnection: name 'org.kde.kglobalaccel' had owner '' but we thought it was ':1.8'
Error: "/tmp/kde-skratch" is owned by uid 1000 instead of uid 0.
答案1
Uid 1000 是你。Uid 0 是 root。查看 的输出ls -l /var/tmp
。有些文件夹是你拥有的,有些文件夹是 root 拥有的。如果你不是文件的所有者,并且权限是drwx------
,你就无法打开它,就这么简单。当你以 root 权限调用 kate 时,kate 需要访问你拥有的文件夹,但该程序是从 root 的角度执行的。因此出现错误