Comments (6)
And then I went on an epic odyssey of dealing with dumb build details on the travis-smoketest
branch.
Angry notes I took on this arduous journey
-
I had the webkit package wrong, so I changed it.
-
That one was wrong too. I realised I need a webkit2gtk package and Travis doesn't have those, so I added a PPA that provides it.
-
Then turns out various
gdk_
functions aren't imported. (Why not? They work no problem on my Arch and Void boxes. I don't understand. But whatever, I added an explicit#include <gdk/gdk.h>
, since docs confirm that's where those live.) -
Same error wtf. No complaints about the
#include <gdk/gdk.h>
, so it must have found it, but for some reasongdk_display_get_n_monitors
etc still aren't available? -
So I added
#include <gdk/gdkmonitor.h>
, which should contain all of the things it's not seeing. None of the documentation mentions this, but I found some GTK internals (through Googling everything I could think of) that import it this way. It's annoyingly extraneous on my Arch machine, but it works...At this point I noted that I'll have to consider at the end whether I've created a maintenance nightmare greater than the one I'm supposed to be fixing. 🤔
-
Excusemewhat, there's no
<gdk/gdkmonitor.h>
? That explains multiple problems I've been having, but why? It's right there in thelibgtk-3-dev
filelist, and it's certainly there on every install that I've seen. But not on the Travis test server. 🤷♂️ I can't find any other package that might provide it instead—everything just says it's inlibgtk-3-dev
. But as demonstrated, it's not.
At this point I decided to give up.
Part of me wants to throw my laptop off a bridge and become a farmer.
from hudkit.
OK mystery solved.
I found this solus-project/budgie-desktop#862 (comment):
What GTK version ubuntu 16.10 have? GdkMonitor is 3.22 only thing, AFAIK.
It seems indeed GdkMonitor was added in GNOME/gtk@8372448 for 3.22.
And Ubuntu trusty has:
3.10.8-0ubuntu1.4
So the functions we're using don't exist in the version of GTK available on the Ubuntu that Travis defaults to, and that's why stuff is missing! 🎉
Travis only supports up to Ubuntu xenial with a flag, but even that has only GTK 3.18. The earliest Ubuntu version that has GTK 3.22 is bionic, which Travis doesn't support yet.
There are ways of hacking around it to add a newer Ubuntu's apt source and install something from it, but it sounds fragile, and this branch is already a glass shop as-is.
Keeping closed.
(Wake me when Travis updates to Ubuntu bionic. 💤)
from hudkit.
Wake me when Travis updates to Ubuntu bionic. 💤
Wakey wakey! The future is here. Travis has Bionic now.
from hudkit.
The adventure continues. Here is the tale of da9e694...8e294e1:
After some fighting with Travis to get it to pick up the webkit PPA (because we need the package libwebkit2gtk-4.0-dev
, but it's not whitelisted by Travis), I figured out that the PPA doesn't actually have a distribution for Ubuntu Bionic, which is why the build can't find it. Argh.
But turns out we don't even need the PPA anymore. The reason for having to get the package via a PPA was because it wasn't on Travis' package safelist. But the safelist only applies to the old Docker container architecture they were using. And we're on a proper sudo: require
container architecture already, so the safelist filter doesn't apply, and all the packages are just available! 😮
So after /usr/bin/env
ing the bash
path to accommodate for where Ubuntu likes to put it, the test actually ran for the first time! 🎈
And the result is a fail. Turns out the composite extension is not enabled in the virtual framebuffer, so the window had no transparency, and so the pixel colour didn't match. It works on my local machine, and the Xvfb
line does specifically ask to enable composite, but I'm clearly missing something. I'll get around to debugging that Soon™.
from hudkit.
I changed the Xvfb flag to capitalise Composite
to the way that it wanted, so Xvfb is now happy, but Metacity still thinks the extension is missing, so it won't start in compositing mode. 💫
Mysteriously, the test continues working perfectly on my own machine. Adding to the mystery, replacing metacity with compton
has the opposite problem: compton
starts without complaint inside Xvfb, and reports to Hudkit that compositing is enabled, but the test fails!
from hudkit.
compton starts without complaint inside Xvfb, and reports to Hudkit that compositing is enabled, but doesn't actually provide any compositing
I was wrong. I checked in Xephyr, and apparently compton was just setting the X root window background to grey for some reason. That's easily fixed with a hsetroot
. Which is nice, because the test now works with compton, which is a lighter dependency than metacity.
However, in Travis-land, compton still didn't see the composite extension. This stumped me, so I did some reading, and found a forum thread from 2008 where Rémi Cardona says (emphasis mine)—
As far as Xvfb is concerned, I stepped line by line through CompositeExtensionInit in composite/compext.c and found that Xvfb defaults to 8bit PseudoColor
Forcing Xvfb with "-screen 0 1280x1024x24" allowed Composite to work correctly.
Checking man Xvfb
on my system reveals it already defaults to "1280x1024x24" nowadays. However, Ubuntu bionic's Xvfb man page says it defaults to "1280x1024x8". That would explain why it worked on my machine but didn't on Travis.
Either way, I added a flag to override that dumb default in 9cad2c8 and—
✨ —it works! ✨
Instead of squashing this mess, I think I'll just yolomerge the branch --no-ff
, so the commits stick around for future reference. Dear future maintainer, you're welcome.
from hudkit.
Related Issues (17)
- Hot cool demonstration GIF in the readme HOT 2
- multi-monitor support seems to not work HOT 5
- "Frame load interrupted" error when loading pages directly from filesystem, with the `file://` protocol HOT 1
- Compiling with Nix toolchain HOT 4
- shell subprocessing + keyboard support? questions HOT 6
- Hudkit going behind windows? HOT 3
- Overlay extends off-monitor HOT 2
- On WSL2: Cannot clickthrough example hud HOT 1
- multi-display bug and feature request HOT 3
- Wayland support HOT 9
- Click Through Issue on Fedora 40
- Feature request: Recognise keyboard button presses globally, and pass them to addEventListener in page JS HOT 1
- Research brain-dump: Possible implementation paths for handling input events while also passing them through HOT 1
- Can I use this to display a website as my desktop. HOT 7
- The JS API is callback-based; async/await would be prettier HOT 1
- Feedback on using with Linux Mint (mentioning clang in dependencies is necessary?) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hudkit.