Ubuntu 12.04 确实有 0.8.1 my-weather-indicator 的反向移植版本。Precise 12.04 的最新版本似乎是 0.6.3,并且它不显示天气预报。
答案1
my-weather-indicator 可以在 12.04 上从以下来源安装:
git clone https://git.launchpad.net/my-weather-indicator
使用以下命令安装依赖项:
sudo apt-get install gir1.2-gtk-3.0 gir1.2-glib-2.0 gir1.2-gdkpixbuf-2.0 gir1.2-appindicator3-0.1 gir1.2-notify-0.7 gir1.2-webkit-3.0 gir1.2-geocodeglib-1.0 python-tz python-cairo python-lxml python-dateutil python-requests python-requests-oauthlib geoclue-hostip geoclue-ubuntu-geoip
sudo apt-get install python3-distutils-extra
sudo apt-get install python3-pip
sudo apt-get install python3-setuptools
sudo apt-get install python3-polib
sudo apt-get install python3-gi
sudo apt-get install gir1.2-geocodeglib-1.0
sudo easy_install3 pip
sudo pip3 install python-dateutil
sudo pip3 install requests
sudo pip3 install requests-oauthlib
sudo pip3 install tz
sudo pip3 install dateutil
sudo pip3 install python-dateutil
sudo pip3 install python-tz
编辑以下文件:
gedit ~/my-weather-indicator/src/weatherwidget.py
将第 92 - 111 行的不透明度参数删除,更改为:
#pin{
border-image: none;
background-image: none;
background-color: rgba(0, 0, 0, 0);
border-radius: 0px;
}
#pin:hover {
transition: 1000ms linear;
border-image: none;
background-image: none;
background-color: rgba(0, 0, 0, 0);
border-radius: 0px;
}
使用以下命令编辑 myweatherindicator.py 文件:
gedit ~/my-weather-indicator/src/myweatherindicator.py
将第 388 行从:
self.weather_updater = GLib.timeout_add_seconds(self.refresh * 3600,
self.update_weather)
到:
self.weather_updater = GLib.timeout_add_seconds(int(self.refresh * 3600),
self.update_weather)
使用命令安装:
sudo python ~/my-weather-indicator/setup.py install
您需要编辑文件并在文件 ~/.config/my-weather-indicator.conf 中手动更改首选项。
然后运行 my-weather-indicator
/opt/extras.ubuntu.com/my-weather-indicator/bin/my-weather-indicator