<div dir="ltr">On Sun, Mar 3, 2013 at 5:39 PM, Bill Spitzak <span dir="ltr"><<a href="mailto:spitzak@gmail.com" target="_blank">spitzak@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On 03/03/2013 12:04 AM, Scott Moreau wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hi Rune,<br>
<br>
</blockquote>
I believe he is complaining about the different client-drawn items. Compare the "All Settings" button in System Settings to the buttons in the "Synaptic Package Manager". It seems that some Ubuntu programs are drawing with the correct theme (the System Settings) and some are not.<br>
<br>
The fact is the toytoolkit window borders look just fine with the ubuntu theme. Chrome is the only program drawing it's own window borders, and this is identical to how it works under X, so he is not complaining about this.<br>
<br>
"How to find the theme" is infuriatingly complex in GTK and Gnome, and I think the fact that some environment variables are set different is causing the problem. This has nothing to do with xwayland, all the relevant code is in the X clients. It looks like some find it, but others don't and fall back to the default (the gray one with thicker 3D borders). Also Chrome attempts to figure out what the GTK theme is and copy it, and it looks like it is also failing to find it.<br>
</blockquote><div><br></div><div>Hi Bill</div><div><br></div><div>Yes, this is the issue I'm trying to figure out. Would you happen to know which environment variables we're talking about? I find it odd that it works for some programs, while not for others. But perhaps this is because of the complexity you're talking about.</div>
<div><br></div><div style>I've tried running synaptic under Weston (as an XWayland application) and then run it under normal Ubuntu (Compiz/Unity) using "strace -eopen" to see what the difference is between the files they load. Here's a compact output of a diff between the two log files (strace -eopen synaptic). So every line that starts with a "+" is what synaptic run under Compiz does that the Synaptic run under XWayland doesn't, and every line that starts with a "-" is what the XWayland app does that the Synaptic run under Compiz doesn't do. Lines with nothing prepended are done by both:</div>
<div style><br></div><div style><div> open("/usr/share/locale/en/LC_MESSAGES/gtk20-properties.mo", O_RDONLY) = -1 ENOENT (No such file or directory)</div><div> open("/usr/share/locale-langpack/en_US/LC_MESSAGES/gtk20-properties.mo", O_RDONLY) = -1 ENOENT (No such file or directory)</div>
<div> open("/usr/share/locale-langpack/en/LC_MESSAGES/gtk20-properties.mo", O_RDONLY) = -1 ENOENT (No such file or directory)</div><div> +open("/usr/lib/x86_64-linux-gnu/gtk-2.0/modules/liboverlay-scrollbar.so", O_RDONLY|O_CLOEXEC) = 3</div>
<div> open("/home/rune/.Xauthority", O_RDONLY) = 4</div><div> -open("/usr/share/themes/Raleigh/gtk-2.0/gtkrc", O_RDONLY) = 5</div><div><br></div><div> -open("/home/rune/.Xdefaults", O_RDONLY) = -1 ENOENT (No such file or directory)</div>
<div> -open("/home/rune/.Xdefaults-rune-desktop", O_RDONLY) = -1 ENOENT (No such file or directory)</div><div><br></div><div> [repeat the opening of first "/home/rune/.Xdefaults" then "/home/rune/.Xdefaults-rune-desktop", as above, 10 times]</div>
<div><br></div><div> -open("/home/rune/.Xdefaults", O_RDONLY) = -1 ENOENT (No such file or directory)</div><div> +open("/usr/share/themes/Ambiance/gtk-2.0/gtkrc", O_RDONLY) = 5</div><div> +open("/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/libmurrine.so", O_RDONLY|O_CLOEXEC) = 6</div>
<div> +open("/usr/share/themes/Ambiance/gtk-2.0/apps/chromium.rc", O_RDONLY) = 6</div><div> +open("/usr/share/themes/Ambiance/gtk-2.0/apps/ff.rc", O_RDONLY) = 6</div><div> +open("/usr/share/themes/Ambiance/gtk-2.0/apps/gnome-terminal.rc", O_RDONLY) = 6</div>
<div><br></div><div style>So it seems that after trying to load some language pack files, Compiz-Synaptic opens up the Ubuntu-specific scrollbar library (this isn't done by XWayland-Synaptic). Then they both successfully open ~/.Xauthority. Then XWayland-Synaptic continues to open the Raleigh theme (the "gray one with thicker 3D borders") followed by it trying to read ~/.Xdefaults and ~/.Xdefaults-rune-desktop.</div>
<div style><br></div><div style>Could it be related to the .Xauthority file somehow?</div></div>
<div><br></div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I think synaptic run as root, and the theme ain't the same for that profile.</blockquote>
<div><br></div><div>Hi Solerman</div><div><br></div><div>In this example Synaptic isn't run as root. Also, smuxi and google-chrome aren't run as root, so I don't think this is what is causing them to not find the correct theme.</div>
</div></div></div></div>