libgnome-shell.so extract, change content in some files and compile back..is it possible?
is it possible to extract the file libgnome-shell.so
and then change content in some files and compile back?
i am using Ubuntu 18.04
I am trying to make some tweaking to gnome-shell by editing .js
files in libgnome-shell.so
file.
Solution 1:
Use the gresource
command to list and extract resources from an ELF file or a .gresource bundle:
gresource extract libgnome-shell.so /org/gnome/shell/ui/main.js > ~/GNOME_Shell/ui/main.js
The compiler, glib-compile-resources
, requires an XML-formatted list of the resources to be compiled, and its output cannot be easily reattached to an existing .so ELF file.
An easier method is to remap some resources to be loaded from the filesystem using "overlays", by setting this environment variable (from ~/.xprofile or ~/.pam_environment):
G_RESOURCE_OVERLAYS="/org/gnome/shell=$HOME/GNOME_Shell"
Now, instead of the /org/gnome/shell/ui/main.js
resource from libgnome-shell.so, GNOME Shell will automatically use the file ~/GNOME_Shell/ui/main.js
with your edits in it.