让我们考虑一下,我们有
- 安装了 Ubuntu MATE 16.04.6 LTS。
- Google(或其他)日历帐户。
安装了一些应用程序,可以使用小部件/screenlet 在桌面上可视化 iCal / iCalendar(ics-file)的内容
在这个问题中,我已经从
ppa:screenlets/ppa
. 它有一个显示 ics 文件的选项:
我应该安装或设置哪些应用程序才能在 Ubuntu 上自动定期导出 iCal 日历文件?
我正在运行已安装的 Ubuntu MATE 16.04.6。
我已经添加ppa:screenlets/ppa
到它并安装了screenlets-pack-all
包。
然后我启动了screenlets
管理器并将 GoogleCalendarScreenlet 0.4.16++ 添加到我的桌面
已在Options → gCal essential → Google account中设置了凭据。
它显示登录成功的通知:
但它不显示我的 Google 日历日历中的事件。
为什么?只是我,还是根本不起作用?
是否存在任何工作桌面(小部件)?
一些日志如下:
$ screenlets
/usr/lib/python2.7/dist-packages/screenlets/backend.py:166: Warning: Source ID 2251 was not found when attempting to remove it
gobject.source_remove(self.__timeout)
Traceback (most recent call last):
File "/usr/share/screenlets/screenlets-pack-all/GoogleCalendar/GoogleCalendarScreenlet.py", line 133, in __deal_with_data
all_calendars_feed = self.screenlet.cal_client.GetAllCalendarsFeed()
File "/usr/lib/python2.7/dist-packages/gdata/calendar/service.py", line 81, in GetAllCalendarsFeed
return self.Get(uri, converter=gdata.calendar.CalendarListFeedFromString)
File "/usr/lib/python2.7/dist-packages/gdata/service.py", line 1107, in Get
'reason': server_response.reason, 'body': result_body}
RequestError: {'status': 403, 'body': '<HTML>\n<HEAD>\n<TITLE>Forbidden</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Forbidden</H1>\n<H2>Error 403</H2>\n</BODY>\n</HTML>\n', 'reason': 'Forbidden'}
$ tail -f ~/.config/screenlets/GoogleCalendarScreenlet.log
Running update
Checking the Internet connection
Fetching events in calendars from: 2019-05-15T00:00:00+03:00 to 2019-06-05T23:59:59+03:00.
END RETRIEVE
Update failed for some unknown reason.
(我在上面看到了Forbidden这个词,所以可能是 API 更改问题)
我想安装 Screenlets,我尝试了以下 bash:
#!/bin/bash
sudo dpkg -l python-wnck >/dev/null 2>&1
if [ $? == 0 ]; then
echo "OK"
else
echo "Install python-wnck"
sudo apt -y install libwnck22
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/g/gnome-python-desktop/python-wnck_2.32.0+dfsg-4_amd64.deb
sudo dpkg -i python-wnck_2.32.0+dfsg-4_amd64.deb
sudo apt --fix-broken -y install
fi
sudo dpkg -l python-gnomekeyring >/dev/null 2>&1
if [ $? == 0 ]; then
echo "OK"
else
echo "Install python-gnomekeyring"
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/g/gnome-python-desktop/python-gnomekeyring_2.32.0+dfsg-4_amd64.deb
sudo dpkg -i python-gnomekeyring_2.32.0+dfsg-4_amd64.deb
sudo apt --fix-broken -y install
fi
sudo add-apt-repository -y ppa:screenlets/ppa
sudo sed -i 's/bionic/xenial/g' /etc/apt/sources.list.d/screenlets-ubuntu-ppa-bionic.list
sudo apt update && sudo apt -y install screenlets screenlets-pack-all
但我得到的只是:
tobi@tobi-System-Product-Name:~$ #!/bin/bash
tobi@tobi-System-Product-Name:~$ sudo dpkg -l python-wnck >/dev/null 2>&1
tobi@tobi-System-Product-Name:~$ if [ $? == 0 ]; then
> echo "OK"
> else
> echo "Install python-wnck"
> sudo apt -y install libwnck22
> wget -c http://archive.ubuntu.com/ubuntu/pool/universe/g/gnome-python-desktop/python-wnck_2.32.0+dfsg-4_amd64.deb
> sudo dpkg -i python-wnck_2.32.0+dfsg-4_amd64.deb
> sudo apt --fix-broken -y install
> fi
OK
tobi@tobi-System-Product-Name:~$ sudo dpkg -l python-gnomekeyring >/dev/null 2>&1
tobi@tobi-System-Product-Name:~$ if [ $? == 0 ]; then
> echo "OK"
> else
> echo "Install python-gnomekeyring"
> wget -c http://archive.ubuntu.com/ubuntu/pool/universe/g/gnome-python-desktop/python-gnomekeyring_2.32.0+dfsg-4_amd64.deb
> sudo dpkg -i python-gnomekeyring_2.32.0+dfsg-4_amd64.deb
> sudo apt --fix-broken -y install
> fi
OK
tobi@tobi-System-Product-Name:~$ sudo add-apt-repository -y ppa:screenlets/ppa
sudo: unable to execute /usr/bin/add-apt-repository: No such file or directory
tobi@tobi-System-Product-Name:~$ sudo sed -i 's/bionic/xenial/g' /etc/apt/sources.list.d/screenlets-ubuntu-ppa-bionic.list
sed: can't read /etc/apt/sources.list.d/screenlets-ubuntu-ppa-bionic.list: No such file or directory
tobi@tobi-System-Product-Name:~$ sudo apt update && sudo apt -y install screenlets screenlets-pack-all
Get:1 http://archive.getdeb.net/ubuntu xenial-getdeb InRelease
Err:1 http://archive.getdeb.net/ubuntu xenial-getdeb InRelease
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Ign:3 http://ppa.launchpad.net/inameiname/stable/ubuntu bionic InRelease
Hit:4 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu bionic InRelease
Hit:5 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Err:6 http://ppa.launchpad.net/inameiname/stable/ubuntu bionic Release
404 Not Found [IP: 91.189.95.83 80]
Get:7 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Hit:8 https://download.sublimetext.com apt/dev/ InRelease
Get:9 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
sh: 1: /usr/lib/cnf-update-db: not found
Reading package lists... Done
E: Failed to fetch http://archive.getdeb.net/ubuntu/dists/xenial-getdeb/InRelease Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://archive.getdeb.net/ubuntu xenial-getdeb InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/inameiname/stable/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code
tobi@tobi-System-Product-Name:~$
我认为 sudo apt-get update 对我不起作用,但我不知道如何解决这个问题。
输出apt-cache policy python3-software-properties
:
python3-software-properties:
Installed: 0.96.24.32.4
Candidate: 0.96.24.32.4
Version table:
*** 0.96.24.32.4 100
100 /var/lib/dpkg/status
0.96.20.7 500
500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
0.96.20 500
500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu xenial/main i386 Packages