Glances Web UI shows a blank page on Ubuntu 22.04
Here’s the error:
After upgrading to Ubuntu 22.04, Glances Web UI shows a blank page on any browser.
What is happening and how can you remediate it?
Glances packages for Ubuntu 21.10 and 22.04 are different of course but the filelist for the latter does not include the /glances/outputs/static/public
directory at all.
Copying the public directory and its contents from the older package resolves the issue.
- Get a prior working version, here: glances_3.1.5.orig.tar.gz
$ wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glances/glances_3.1.5.orig.tar.gz
...
..
.
Saving to: ‘glances_3.1.5.orig.tar.gz’
glances_3.1.5.orig.tar.gz
100%[==============================================>] 6.49M 4.55MB/s in 1.4s
...
..
.
2. Extract it
$ tar zxvf glances_3.1.5.orig.tar.gz
3. cd
into
$ cd ~/desktop/glances-3.1.5/glances/outputs/static
...
..
.
$ ll
drwxrwxr-x 2 vivaldi vivaldi 4.0K Aug 19 2020 css
drwxrwxr-x 2 vivaldi vivaldi 4.0K Aug 19 2020 images
drwxrwxr-x 4 vivaldi vivaldi 4.0K Aug 19 2020 js
-rw-rw-r-- 1 vivaldivivaldi vivaldi 790 Aug 19 2020 package.json
-rw-rw-r-- 1 vivaldi vivaldi 224K Aug 19 2020 package-lock.json
drwxrwxr-x 2 vivaldi vivaldi 4.0K Aug 19 2020 public <<<
-rw-rw-r-- 1 vivaldi vivaldi 705 Aug 19 2020 README.md
drwxrwxr-x 2 vivaldi vivaldi 4.0K Aug 19 2020 templates
-rw-rw-r-- 1 vivaldi vivaldi 1.8K Aug 19 2020 webpack.config.js
-rw-rw-r-- 1 vivaldi vivaldi 130K Aug 19 2020 yarn.lock
...
..
.
4. Copy cp
the public directory to your current glances
location.
$ sudo cp -r public /usr/lib/python3/dist-packages/glances/outputs/static
###
##
#
$ ll
-rw-r--r-- 1 root root 43K Jun 15 12:47 9a360c92ce9bda60a8da6389741dcfbf.png
-rw-r--r-- 1 root root 4.2K Jun 15 12:47 favicon.ico
-rw-r--r-- 1 root root 2.2M Jun 15 12:47 glances.js
-rw-r--r-- 1 root root 2.6M Jun 15 12:47 glances.map.js
##
#
5. Verify
Open your web browser and type
http://SERVER-IP:61208
That's it.
We hope this has been a help!!