Testing Unity session on Ubuntu 21.10

@khurshid-alam

After a bit more investigation I have a better problem description and some screenshots.
I instrumented the wrapper to both output the $LD_PRELOAD value as well as a indication
of which of the exports we were doing so I could know which was being executed.

This first screenshot is what happens if you open a terminal and type sudo dmesg:

This is the actual problem. For some reason we are getting the export LD_PRELOAD run when doing a sudo command(not application) in a terminal.

This second screenshot shows that if you invoke the the wrapper directly and launch a app
(in this case gnome-calculator) it works fine. Note the instrumented code that states that
the wrapper is being called directly.

This third screenshot is what happens if you invoke the same above command using sudo:

So for some reason the LD_PRELOAD is getting invoked when we are doing sudo and launching
a command or app from the terminal. This does not happen on 21.04 or on my build machine
which does not have the new libgtk3-nocsd code in it.

There is also another spot in the wrapper code where we do the export LD_PRELOAD that I have
instrumented but it not getting hit due to not calling the executable directly. Not sure if this gets
hit otherwise. We also do an export LD_PRELOAD in the /etc/X11/Xsession.d/51gtk3-nocsd-detect
file. This file is sourced and not executed by xsession so I am not sure how you would instrument it
or test it(maybe make a copy of it and make it a bash executable and run it manually?). I also am not
sure when this gets run but I assume this is what gets run normally when not invoking the wrapper
directly(or maybe it’s the other case in the wrapper).

That’s as far as I have gotten so far. In short the new libgtk-nocsd code works but I am getting
this weird artifact from it. It maybe because I have purge and replaced it a few time and something has gotten messed up.

Next steps:
1- make new updated iso without the new libgtk-nocsd code and install on test machine.
2- install new libgtk-nocsd deb again on the fresh install to make sure it’s reproducible.
3- if worse comes to worse I will have to install the actual Ubuntu beta and test it on it
(probably should do this anyway just for completeness but had mine already installed
and wanted to save time).

Questions:
1- which tool do you use for making your debs? I am using dpkg-deb -R and dpkg-deb -b
should I be using dpkg-repack or something else instead?
2- what do you use to build your iso?. Are you using the standard ubuntu build scripts
or something else?

I checked out your beta and it’s really well done. I usually make separate Unity, Gnome and
Plasma dists as well as Ubuntu Studio on occasion.

Anyway back to testing,
Brett “WolfMan” Bogert