You are not logged in.
Is there a weather widget for the panel that doesn't die every few months?
Offline
Which distro and version are you running?
Also, see https://forum.xfce.org/viewtopic.php?pid=59979#p59979 as an alternative.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Xubuntu 20.04.1. All updates from Ubuntu applied. Xfce is whatever version comes with 20.04.1, but I think it is 4.14. The original installation was Xubuntu 18.04, dist-upgraded when 20.04.1 was finally released for upgraders, early October, 2020 as I recall. The xfce4-weather-plugin is 0.10.1-1.
I wish there was another weather applet for the panel that I liked. This thing is a pain. Not that it really matters, but I'm curious why it keeps dying. Do the people at met.no keep changing their connection information, or what?
Can I install a later version? I looked at the link, but I'm not sure what to do with the script.
Edit: $ xfce4-panel -V
xfce4-panel 4.14.3 (Xfce 4.14)
Last edited by John Jason Jordan (2021-03-05 02:59:24)
Offline
Do the people at met.no keep changing their connection information, or what?
Yes. They keep changing the api.
I looked at the link, but I'm not sure what to do with the script.
If xfce4-genmon-plugin is not installed, then install it. Also make sure that curl, fonts-noto and fonts-noto-extra (also noto-fonts-emoji if you want coloured icons) are also installed:
sudo apt install xfce4-genmon-plugin curl fonts-noto fonts-noto-extra
Then copy and paste that script to a file on your computer and make it executable. Make sure you change the first three lines of the script to specify the name of your city/town, and the latitude and longitude coordinates.
Add the genmon plugin to the panel and right click > properties. Set: command to point to the script you created, uncheck Label, set the period to 900 and click save.
The weather should display on the panel. Hovering over it will give you a summary. Clicking on it will open a 3 day forecast in a terminal window.
If you want to build the latest version of xfce4-weather-plugin on xubuntu 20.04, do the following (a bit hackish but it works - and you'll have the latest version):
Uninstall the repo version:
sudo apt remove xfce4-weather-plugin
Make sure the source repository is enable. Run "software-properties-gtk" in a terminal window and on the first tab in the app, make sure that "Source" is checked. You will need to enter your password. Click Close then Reload.
Install the necessary programs and libraries to build the new version:
sudo apt install build-essential git
sudo apt build-dep xfce4-weather-plugin
Get the code:
cd /tmp
git clone https://gitlab.xfce.org/panel-plugins/xfce4-weather-plugin.git
And build it:
cd xfce4-weather-plugin
./autogen.sh --prefix=/usr --libdir=/usr/lib/$(uname -m)-linux-gnu
make
sudo make install
Restart the panel:
xfce4-panel -r
then right-click the weather plugin and reset your location and on the scrollbox tab, add in any labels you want displayed.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
I think these instructions are in the wrong order. When I try to run sudo apt build-dep xfce4-weather-plugin the output returned is
E: Unable to find a source package for xfce4-weather-plugin
Result is, even after going through all the other steps my weather panel plugin is still displaying No Data
And, yes, I did enable the source repository
Offline
E: Unable to find a source package for xfce4-weather-plugin
Did you reload the repository cache after enabling sources?
Try running:
sudo apt update
...to manually do so.
What does the following return:
cat /etc/apt/sources.list | grep deb-src
And, are you also on (x)ubuntu 20.04.x? I've run through these on a 20.04.2 install on a VM and they worked.
Result is, even after going through all the other steps my weather panel plugin is still displaying No Data
Its odd that the other steps worked without errors. Did you right-click the plugin, go into the properties and reset your location?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Hello. I have the same problem. I'm on Linux Mint 20.1 XFCE and I've also tried it with the same Live-CD on another computer and exactly the same thing happens. I don't want to compile a new version of the xfce4-weather-plugin before asking, for fear that it will conflict with something: Can it conflict with something, run out of future updates because I uninstalled it, or something else? Although the first link worked for me, I prefer the one that comes with the default panel. So I have tried to change my location and country, but nothing.
With the command "sudo apt build-dep xfce4-weather-plugin" it throws me this:
Reading package list ... Done
E: You must put some URI "deb-src" in your "sources.list"
What would be better: Wait for a new version, or, try to compile it (which gives me an error when installing the dependencies, as I said above)?
EDIT: I've thought about this, and compiled it. I had an error at the time of make install, but it still installed correctly and works fine. Thank you very much, it worked perfect !!
Last edited by Ezee1015 (2021-03-05 14:16:58)
Offline
Mark7 wrote:E: Unable to find a source package for xfce4-weather-plugin
Did you reload the repository cache after enabling sources?
Try running:sudo apt update
...to manually do so.
What does the following return:
cat /etc/apt/sources.list | grep deb-src
And, are you also on (x)ubuntu 20.04.x? I've run through these on a 20.04.2 install on a VM and they worked.
Result is, even after going through all the other steps my weather panel plugin is still displaying No Data
Its odd that the other steps worked without errors. Did you right-click the plugin, go into the properties and reset your location?
deb-src http://gb.archive.ubuntu.com/ubuntu/ focal universe
# deb-src http://gb.archive.ubuntu.com/ubuntu/ focal-updates universe
# deb-src http://gb.archive.ubuntu.com/ubuntu/ focal multiverse
# deb-src http://gb.archive.ubuntu.com/ubuntu/ focal-updates multiverse
deb-src http://archive.canonical.com/ubuntu focal partner
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse
And yes, I did. To the same location as it already was
Offline
Can it conflict with something, run out of future updates because I uninstalled it, or something else?
Potentially yes. You are manually building a package that is outside of the regular repositories and procedures for keeping the system up-to-date. That being said, if you don't install the repo version, you should be okay. Over time you may run into an issue where the required libraries need to be upgraded, in which you case you would need to re-do the steps to get it re-built again.
The optimal way to deal with this is for the distro to update the package in the repositories.
EDIT: I've thought about this, and compiled it. I had an error at the time of make install, but it still installed correctly and works fine. Thank you very much, it worked perfect !!
Cool.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
And yes, I did. To the same location as it already was
Can you post back:
xfconf-query -c xfce4-panel -lv | grep plugin-$(ps -ef | grep libweather.so | grep -v grep | awk '{print $10}')
Also try removing and re-adding the plugin to the panel.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
If you want to build the latest version of xfce4-weather-plugin on xubuntu 20.04, do the following (a bit hackish but it works - and you'll have the latest version):
Uninstall the repo version:
sudo apt remove xfce4-weather-plugin
Make sure the source repository is enable. Run "software-properties-gtk" in a terminal window and on the first tab in the app, make sure that "Source" is checked. You will need to enter your password. Click Close then Reload.
Install the necessary programs and libraries to build the new version:
sudo apt install build-essential git sudo apt build-dep xfce4-weather-plugin
Get the code:
cd /tmp git clone https://gitlab.xfce.org/panel-plugins/xfce4-weather-plugin.git
And build it:
cd xfce4-weather-plugin ./autogen.sh --prefix=/usr --libdir=/usr/lib/$(uname -m)-linux-gnu make sudo make install
Restart the panel:
xfce4-panel -r
then right-click the weather plugin and reset your location and on the scrollbox tab, add in any labels you want displayed.
I decided to try installing the latest weather plugin, but I failed on the very first command, 'sudo apt remove xfce4-weather-plugin.' The command would have worked, but I aborted it because it requires also removing xfce4-goodies, and there are things in xfce4-goodies that I use even more than the weather plugin.
It looks like I'm just stuck until 22.0.4.1 comes out and I can upgrade the whole distro. And even then, it will probably work for only a few months until met.no changes their API again. (Sigh.)
It would be worth it to me to donate some $ to a project to create a real weather plugin, one that lets the user choose the source of data and is not tied to xfce4-goodies.
Offline
Mark7 wrote:And yes, I did. To the same location as it already was
Can you post back:
xfconf-query -c xfce4-panel -lv | grep plugin-$(ps -ef | grep libweather.so | grep -v grep | awk '{print $10}')
Also try removing and re-adding the plugin to the panel.
mark@mark-HP-EliteBook-8460p:~$ xfconf-query -c xfce4-panel -lv | grep plugin-$(ps -ef | grep libweather.so | grep -v grep | awk '{print $10}')
/plugins/plugin-6 weather
Offline
I removed the plugin and re-added it. Still no data
Offline
It would be worth it to me to donate some $ to a project to create a real weather plugin, one that lets the user choose the source of data and is not tied to xfce4-goodies.
Were you able to try the other script and the genmon plugin? It doesn't require all the work and configuration.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
ToZ wrote:Mark7 wrote:And yes, I did. To the same location as it already was
Can you post back:
xfconf-query -c xfce4-panel -lv | grep plugin-$(ps -ef | grep libweather.so | grep -v grep | awk '{print $10}')
Also try removing and re-adding the plugin to the panel.
mark@mark-HP-EliteBook-8460p:~$ xfconf-query -c xfce4-panel -lv | grep plugin-$(ps -ef | grep libweather.so | grep -v grep | awk '{print $10}')
/plugins/plugin-6 weather
You seem to be missing all of the configuration settings. They should have shown up if it had successfully built.
Have you gone into the properties and reset the city/town name?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Some more workarounds discussed here.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Mark7 wrote:ToZ wrote:Can you post back:
xfconf-query -c xfce4-panel -lv | grep plugin-$(ps -ef | grep libweather.so | grep -v grep | awk '{print $10}')
Also try removing and re-adding the plugin to the panel.
mark@mark-HP-EliteBook-8460p:~$ xfconf-query -c xfce4-panel -lv | grep plugin-$(ps -ef | grep libweather.so | grep -v grep | awk '{print $10}')
/plugins/plugin-6 weatherYou seem to be missing all of the configuration settings. They should have shown up if it had successfully built.
Have you gone into the properties and reset the city/town name?
Yes, I reset everything.
Maybe the problem is that this line
sudo apt build-dep xfce4-weather-plugin
Should be after this line
cd /tmp
git clone https://gitlab.xfce.org/panel-plugins/x … plugin.git?
Offline
It won't matter when you run that command as long as you run it before the "autogen.sh" command. I think the issue is with your sources.list or the state of your repository cache if it can't find the sources.
E: Unable to find a source package for xfce4-weather-plugin
Can you manually run:
sudo apt update
...and post back the output?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
John Jason Jordan wrote:It would be worth it to me to donate some $ to a project to create a real weather plugin, one that lets the user choose the source of data and is not tied to xfce4-goodies.
Were you able to try the other script and the genmon plugin? It doesn't require all the work and configuration.
Initially I didn't try the genmon script because it appeared to be strictly command line, which I do not want. But I took a second look and went ahead and installed it. It is working, and may be a solution. At the moment it is displaying a rain cloud ('cause it's raining here at the moment) and '48F.' Looking at the script I can't figure out how to change it to show C instead of F, plus it would be nice to have some wind information continuously displayed (in kmph) as well, and it doesn't offer any forecast, unless I open it in a terminal. And strangely, if I hover over it I get precipitation and pressure in mm and hPa, even though the temperature and wind speed are in imperial units. Odd that.
I found some general genmon documentation here: https://docs.xfce.org/panel-plugins/xfce4-genmon-plugin . But it didn't give me much detail, plus I'm not very good at figuring out syntax for commands. Maybe with some help I can figure out how to make it show what I want. Better yet, maybe with some group effort we can create various incarnations of the script so people can copy the one they like best.
Also, where does the script get its weather information? (Hopefully not met.no.)
Offline
Looking at the script I can't figure out how to change it to show C instead of F
And strangely, if I hover over it I get precipitation and pressure in mm and hPa, even though the temperature and wind speed are in imperial units. Odd that.
Change line 44 to read:
OUT=$(curl -s v2d.wttr.in/$LATITUDE,$LONGITUDE?format="%c\n%h\n%t\n%f\n%w\n%l\n%m\n%M\n%p\n%P\n%D\n%S\n%z\n%s\n%d\n%C\n?m")
...(added "?m" to the end to force metric).
plus it would be nice to have some wind information continuously displayed (in kmph) as well,
Change line 84 to read:
echo -e "<txt><span size='xx-large'>$WEATHERICON</span><span rise='3000' size='small'> $TEMPERATURE $WIND</span></txt>"
...(added $WIND to the line).
Documentation about wttr.in can be found here if you want to learn more about the options to the call to the service.
Also, where does the script get its weather information? (Hopefully not met.no.)
Its still met.no. The developer is looking to add more different data sources. However, using the script means you always get the latest version and changes are made quickly. The number of free weather data sources are low and dropping (e.g. apple bought out darksky and has/is discontinuing the free service offering).
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Change line 44 to read:
OUT=$(curl -s v2d.wttr.in/$LATITUDE,$LONGITUDE?format="%c\n%h\n%t\n%f\n%w\n%l\n%m\n%M\n%p\n%P\n%D\n%S\n%z\n%s\n%d\n%C\n?m")
...(added "?m" to the end to force metric).
Change line 84 to read:
echo -e "<txt><span size='xx-large'>$WEATHERICON</span><span rise='3000' size='small'> $TEMPERATURE $WIND</span></txt>"
...(added $WIND to the line).
Documentation about wttr.in can be found here if you want to learn more about the options to the call to the service.
I left the original lines in the script, but commented them out (#). The new line 84 worked, although the font is now a bit too small. And interestingly, there is an arrow in front of the mph number, pointing northwest. However, the new line 44 did not force metric. I'll go to the link for wttr.in to see if I can learn a bit more.
Edit: The link says ?m or ?u to force metric, so I changed the ?m to ?u, but it still displays F and mph. Maybe it needs to refresh itself.
Edit 2: Success! I right-clicked on it in the panel and selected Properties, where I noticed an option to change the font size, so I bumped it up a couple of points, and when I closed the popup it displayed C and kmph.
Last edited by John Jason Jordan (2021-03-06 04:13:29)
Offline
Good. Its an interesting workaround and option to the xfce4-weather-plugin. Hopefully xfce4-weather-plugin will get updated in your distro's repositories soon and you can start using it again.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
I just gave up with that method and downloaded the new deb, Everything is fine now
Offline
Good. Its an interesting workaround and option to the xfce4-weather-plugin. Hopefully xfce4-weather-plugin will get updated in your distro's repositories soon and you can start using it again.
It continues to work, but I have a couple questions that I can't find answers for:
1) The arrow in front of the wind speed, at the time when I finally got it working, was pointing NW. Does that mean that the wind was actually coming _from_ the SW? Or that it was coming _from_ the NW? Note that wind direction is one of the dumbest things in the English language - an 'east wind' means that it is coming from the east, where I always thought that it sounds like it is headed _toward_ the east. Well, now I have an arrow, but my confusion continues.
2) This morning I note that it has gone back to displaying F and mph. When I went to bed last night it was displaying C and kmph. The script remains unchanged, but overnight my VPN service switched me from a server in Stockholm to one in Los Angeles. That's the only explanation I can think of. If I right-click on it and select Properties, when I close the popup window it remains F and mph. Just now I manually changed the server to Malmö, and when I closed the popup again it went back to C and kmph. The problem is that I prefer the Los Angeles connection - much faster for me.
3) Is there a way to make it use two lines? As I write this it appears with a big cloud, followed by '43°F←4mp/h.' I'd like to break it so the arrow and wind speed appear on a second line, and then I can increase the font size a bit. From the documentation I think I need \n to make a new line, but I'm not sure where to put it.
Offline
1) The arrow in front of the wind speed, at the time when I finally got it working, was pointing NW. Does that mean that the wind was actually coming _from_ the SW? Or that it was coming _from_ the NW? Note that wind direction is one of the dumbest things in the English language - an 'east wind' means that it is coming from the east, where I always thought that it sounds like it is headed _toward_ the east. Well, now I have an arrow, but my confusion continues.
It refers to the direction it comes from and where it is blowing. So an line with an arrow at the bottom means "coming from the north blowing south".
2) This morning I note that it has gone back to displaying F and mph. When I went to bed last night it was displaying C and kmph. The script remains unchanged, but overnight my VPN service switched me from a server in Stockholm to one in Los Angeles. That's the only explanation I can think of. If I right-click on it and select Properties, when I close the popup window it remains F and mph. Just now I manually changed the server to Malmö, and when I closed the popup again it went back to C and kmph. The problem is that I prefer the Los Angeles connection - much faster for me.
VPNs confuse the system because by default it uses metric unless the connection request comes from a US ip address, in which case it uses imperial. I had a closer look and if I change line 44 like this:
OUT=$(curl -s v2d.wttr.in/$LATITUDE,$LONGITUDE?m\&?format="%c\n%h\n%t\n%f\n%w\n%l\n%m\n%M\n%p\n%P\n%D\n%S\n%z\n%s\n%d\n%C\n")
...it forces metric. I've added "?m\&" right after the LONGITUDE variable. Can you give this line a try?
3) Is there a way to make it use two lines? As I write this it appears with a big cloud, followed by '43°F←4mp/h.' I'd like to break it so the arrow and wind speed appear on a second line, and then I can increase the font size a bit. From the documentation I think I need \n to make a new line, but I'm not sure where to put it.
Yes. This is a change to just the genmon part starting line 83. Just move $WIND (and the part after it) to the next line like this:
#do the genmon
echo -e "<txt><span size='xx-large'>$WEATHERICON</span><span rise='3000' size='small'> $TEMPERATURE
$WIND</span></txt>"
Note that in this line there are also two pango markup formats (sections that start and end with <span></span>):
"xx-large" - this is for the size of the icon. Valid options include: 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'.
rise='3000' - this is the horizontal placement of the text after the icon if you want to move it up or down. Specify values in the thousands to see a change.
You might need to create a new <span></span> section around $WIND if you want to adjust its size separately.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
[ Generated in 0.015 seconds, 7 queries executed - Memory usage: 706.88 KiB (Peak: 755.73 KiB) ]