![StackApplet 在 Linux Mint 17.1 中不起作用](https://linux22.com/image/66294/StackApplet%20%E5%9C%A8%20Linux%20Mint%2017.1%20%E4%B8%AD%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8.png)
我从官方存储库安装stackapplet
,小程序启动正常,但我无法使用首选项添加我的帐户。当我尝试添加我的用户名时,没有任何反应。
即使搜索我的名字也不起作用。这似乎是很多人都面临的问题,但不知何故这个问题没有解决方案。我什至尝试了 Launchpad 的最新版本,但这也不起作用。
此外,下拉列表中的站点列表也是空的。
此问题的报告:
看来这个问题对于很多人来说已经解决了。这就是为什么它在各种网络上表现得不那么突出。然而,包括我在内的一些人仍然面临着这个问题。
所以,问题是:有人可以Stackapps
在 Linux Mint 17.1 或 Ubuntu 14.04.1 上工作吗?
答案1
我遇到了你描述的同样的问题,但设法stackapplet
在 Ubuntu 14.04 上运行。
诀窍是手动创建stackapplet
配置文件~/.stackapplet/config
:
停止
stackapplet
:killall stackapplet.py
备份
~/.stackapplet/config
:cp -a ~/.stackapplet/config ~/.stackapplet/config.bak
将的内容替换
~/.stackapplet/config
为:{"theme": "light", "accounts": [{"unread_reputation": 0, "last_comment_ts": 1433419194, "site_name": "Unix and Linux", "unread_comments": 0, "site": "unix.stackexchange", "reputation_on_last_poll": 313, "notifications": 0, "user_id": "26238", "last_answer_ts": 1433419196, "unread_answers": 0}], "language": "", "refresh_rate": 600000}
是的,这是一长行 JSON 数据。不要美化它,否则
applestack
会在退出时默默地忽略config
并使用默认配置文件覆盖它。请注意,config
没有任何行结束符,即\n
JSON 数据字符串的末尾没有任何行结束符。现在找到并更正该键的值
user_id
。您的用户 ID 位于您的个人资料页面的右上角:保存文件并启动
stackapplet
:nohup /usr/share/stackapplet/stackapplet.py &>/dev/null &
如果您想添加更多帐户,只需向accounts
数组添加更多元素即可。这里的技巧是找出每个 StackExchange 站点的site
和的含义:site_name
site
.com
是已删除的网站 URLsite_name
是该网站的“漂亮名字”
这些是我当前在文件中配置的站点config
:
"site_name": "Ask Ubuntu"
"site": "ubuntu.stackexchange"
"site_name": "Unix and Linux"
"site": "unix.stackexchange"
"site_name": "Stack Overflow"
"site": "stackoverflow"
"site_name": "Server Fault"
"site": "serverfault"
"site_name": "Super User"
"site": "superuser"
"site_name": "Ask Different"
"site": "apple.stackexchange"
"site_name": "Ask Different Meta"
"site": "meta.apple.stackexchange"
作为参考,我的config
文件是:
{"theme": "light", "accounts": [{"unread_reputation": 0, "last_comment_ts": 1433419181, "site_name": "Ask Ubuntu", "unread_comments": 0, "site": "ubuntu.stackexchange", "reputation_on_last_poll": 134, "notifications": 0, "user_id": "100272", "last_answer_ts": 1433419183, "unread_answers": 0}, {"unread_reputation": 0, "last_comment_ts": 1433419194, "site_name": "Unix and Linux", "unread_comments": 0, "site": "unix.stackexchange", "reputation_on_last_poll": 313, "notifications": 0, "user_id": "26238", "last_answer_ts": 1433419196, "unread_answers": 0}, {"unread_reputation": 0, "last_comment_ts": 1433419207, "site_name": "Stack Overflow", "unread_comments": 0, "site": "stackoverflow", "reputation_on_last_poll": 167, "notifications": 0, "user_id": "881191", "last_answer_ts": 1433419208, "unread_answers": 0}, {"unread_reputation": 0, "last_comment_ts": 1433419186, "site_name": "Server Fault", "unread_comments": 0, "site": "serverfault", "reputation_on_last_poll": 411, "notifications": 0, "user_id": "134501", "last_answer_ts": 1433419187, "unread_answers": 0}, {"unread_reputation": 0, "last_comment_ts": 1433419190, "site_name": "Super User", "unread_comments": 0, "site": "superuser", "reputation_on_last_poll": 3061, "notifications": 0, "user_id": "156041", "last_answer_ts": 1433419191, "unread_answers": 0}, {"unread_reputation": 0, "last_comment_ts": 1433419199, "site_name": "Ask Different", "unread_comments": 0, "site": "apple.stackexchange", "reputation_on_last_poll": 6681, "notifications": 0, "user_id": "32815", "last_answer_ts": 1433419202, "unread_answers": 0}, {"unread_reputation": 0, "last_comment_ts": 1433419200, "site_name": "Ask Different Meta", "unread_comments": 0, "site": "meta.apple.stackexchange", "reputation_on_last_poll": 6681, "notifications": 0, "user_id": "32815", "last_answer_ts": 1433419203, "unread_answers": 0}], "language": "", "refresh_rate": 600000}