Go to file
Yessiest 49ff93224e fixed readme 2022-01-27 03:19:14 +04:00
include oops 2022-01-27 03:08:00 +04:00
src initial commit 2022-01-27 02:59:38 +04:00
CMakeLists.txt initial commit 2022-01-27 02:59:38 +04:00
LICENSE added license 2022-01-26 23:10:39 +00:00
README.md fixed readme 2022-01-27 03:19:14 +04:00


libwaystub - uhhhhhhhhhh

There was a point in time when attempts at making firefox be compileable with only wayland support brought the issue with a hard runtime dependency on wayland libs even for X users. And that's why this, uh, thing, exists.


If there are functions that we want to just omit in the C++ code, we can write stubs for these functions. That approach, surprisingly enough, worked. By simply writing functions that return NULL with the names of wayland library functions that firefox expects, we force firefox to believe that wayland libraries are either there and functional but wayland isn't running, or that the wayland library functions return errors in all cases (whichever it is). Despite the absurdity, the approach worked.


mkdir build
cd build
cmake ..

you should then have libwaystub.so in the build directory. Copy it to wherever you want to apply the stubs, and add the library to LD_PRELOAD before launching your application that you want to apply this stub for.


gdk, a compiler and, preferrably, brain.


This work is licensed under the MIT-0 license.