为什么我只能以 root 身份运行 Hamster Time Tracker?

为什么我只能以 root 身份运行 Hamster Time Tracker?

我已经从源代码安装了 Project Hamster:

git clone git://git.gnome.org/hamster-applet
cd hamster-applet
./waf configure build --prefix=/usr
sudo ./waf install

尝试以我自己的身份运行它会产生以下输出:

~$ hamster-time-tracker                                                                                
Traceback (most recent call last):
  File "/usr/bin/hamster-time-tracker", line 591, in <module>
    from hamster.configuration import runtime, dialogs, conf, load_ui_file
  File "/home/michael-robinson/.local/lib/python2.7/site-packages/hamster/configuration.py", line 79, in
 <module>
    runtime = RuntimeStore()
  File "/home/michael-robinson/.local/lib/python2.7/site-packages/hamster/configuration.py", line 69, in
 __init__
    self.storage = Storage()
  File "/home/michael-robinson/.local/lib/python2.7/site-packages/hamster/client.py", line 69, in __init
__
    self.bus = dbus.SessionBus()
  File "/usr/lib/python2.7/dist-packages/dbus/_dbus.py", line 211, in __new__
    mainloop=mainloop)
  File "/usr/lib/python2.7/dist-packages/dbus/_dbus.py", line 100, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 122, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoServer: Failed to connect to socket /tmp/dbu
s-wLzO4gfRbJ: Connection refused

以 root 身份运行正常:

~$ sudo hamster-time-tracker

我怎样才能修改我的 Hamster 安装以便可以作为普通用户运行它?

答案1

您确定您没有su使用过sudo任何其他预安装命令吗?因为对于我这个普通用户来说,按照以下方式构建时,它可以完美运行:

izx@ppauvm:~/src$ sudo apt-get build-dep hamster-applet
git 克隆 git://git.gnome.org/hamster-applet
cd 仓鼠小程序
./waf 配置构建--prefix=/usr
sudo./waf 安装
仓鼠时间追踪器

在此处输入图片描述

相关内容