一般问题:如何通过终端最紧密地模仿 Unity 执行程序的方式?
我能够从 Unity 界面 (Ubuntu 12.04 LTS) 成功运行 pidgin (2.10.3),但当我从命令行简单地运行“pidgin”时,我收到段错误。理想情况下,我希望从命令行使用“-d”(调试)标志运行“pidgin”以查看调试输出。我想也许 Unity 使用了一些特殊标志等,但标准 /usr/share/applications/pidgin.desktop 文件只是说:
[Desktop Entry] Name=Pidgin Internet Messenger GenericName=Internet Messenger Comment=Chat over IM. Supports AIM, Google Talk, Jabber/XMPP, MSN, Yahoo and more Exec=pidgin Icon=pidgin StartupNotify=true Terminal=false Type=Application Categories=Network;InstantMessaging; X-Ubuntu-Gettext-Domain=pidgin
段错误文本:
** (Pidgin:12897): WARNING **: Could not connect: Connection refused (Pidgin:12897): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Could not connect: Connection refused (Pidgin:12897): libnotify-WARNING **: Failed to connect to proxy (Pidgin:12897): libindicate-ERROR **: Unable to get session bus: Could not connect: Connection refused Trace/breakpoint trap (core dumped)
答案1
比较终端()中的环境变量env
并通过桌面快捷方式运行脚本。
脚本
#!/bin/sh
env > ~/myenv
检查 DBUS_SESSION_BUS_ADDRESS 的值是否不同,因为这似乎是问题所在。