Building Linux GTK3 Pale Moon on Gentoo

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
segmentation-fault

Building Linux GTK3 Pale Moon on Gentoo

Unread post by segmentation-fault » 2020-05-01, 21:52

There are a few people here asking for a GTK3-based Pale Moon browser. I have been using such a browser for almost two years now - and didn't even notice it was NOT obvious...So here is how to do it in Gentoo:

Code: Select all

layman -a palemoon
This will add the palemoon overlay to your system through layman. You could theoretically merge it from there, but the ebuild wil use GTK2, which we don't want. So you have to create a local overlay and copy the ebuild from, say

Code: Select all

/var/lib/layman/palemoon/www-client/palemoon/palemoon-28.8.4.ebuild
to your

Code: Select all

/usr/local/portage/overlays/your-overlay/www-client/palemoon/
directory. Then, open the ebuild and change

Code: Select all

    +gtk2
    -gtk3
to

Code: Select all

    -gtk2
    +gtk3
That's the only change you need to do! Then compile as usual:

Code: Select all

ebuild /usr/local/portage/overlays/your-overlay/www-client/palemoon/palemoon-28.8.4.ebuild digest
egencache --update --repo='your-overlay'
eix-update
emerge -1av www-client/palemoon
That's all! Just make sure you don't copy

Code: Select all

/var/lib/layman/palemoon/profiles/package.use.mask
into your overlay, because that will mask GTK3 and will be wondering why your change above is not honored by portage.

:arrow: NOTE: This may not work for the newest 28.9.2 version - I keep getting a GTK2 browser, even with the above change in the ebuild. This has worked for the past versions (from 28.4.0 to 28.8.4) flawlessly - and it has been very stable as well.

segmentation-fault

Re: Building Linux GTK3 Pale Moon on Gentoo

Unread post by segmentation-fault » 2020-05-01, 22:26

I wrote the above while I was downgrading from 28.9.2 to 28.8.4 in the hope to get my old GTK3 browser back. Alas, this did not work...So now I am stuck with a browser whose theme I really hate (did I say I hate GTK2? I do hate it!). It makes me really mad. :evil:

Either I introduced some incompatibility, or UXP.git was changed in a way that GTK3 is currently not possible...

Please reinstate GTK3 - it has been working flawlessly the past year(s). So flawlessly, I didn't even notice I was using something not yet fully supported.

User avatar
adesh
Board Warrior
Board Warrior
Posts: 1277
Joined: 2017-06-06, 07:38

Re: Building Linux GTK3 Pale Moon on Gentoo

Unread post by adesh » 2020-05-02, 15:45

GTK3 support didn't go anywhere. This may be related to new "comm style" build setup. Please read developer wiki to know about the new setup.

segmentation-fault

Re: Building Linux GTK3 Pale Moon on Gentoo

Unread post by segmentation-fault » 2020-05-02, 20:48

adesh wrote:
2020-05-02, 15:45
GTK3 support didn't go anywhere.
Thanks for answering! That's good to know, that it's still there. So it may be a problem on my side.

Let's start from the obvious: how do I know I am running the browser in GTK3 mode? I know this sounds silly, but I have to ask because, until now, I was assuming that what I was seeing was a GTK2 theme - now, with your assertion, I have the suspicion that I might be looking at some GTK3 theme that just reminds me of old GTK2 days!

To put it differently, how do I know that the browser honors the theme I have set in

/etc/gtk-3.0/settings.ini

and does not just display a GTK3 'standard' theme? My theme is a very customized one, but works fine in all other GTK3 applications.

Strange, all this has worked fine in PM for ages... :?
adesh wrote:
2020-05-02, 15:45
This may be related to new "comm style" build setup. Please read developer wiki to know about the new setup.
I found a lot of mentions of "Comm Build System" or "comm-central style" at

https://github.com/MoonchildProductions/Pale-Moon

but not a single explanation, other than "only the code specific to Pale Moon is kept in this repository".

segmentation-fault

Re: Building Linux GTK3 Pale Moon on Gentoo

Unread post by segmentation-fault » 2020-05-02, 21:05

To answer my own question: go to File --> Open File... and look at the open-file dialog you get. If you have to press CTRL+L to get a line to enter the full path to your file, then you are looking at a GTK3 dialog (only GTK3 is so brain-damaged to hide the line to enter the file path from the user)!

In my case: I have to press CTRL+L - so it's that bloody-white Adwaita thing for GTK3 that I was looking at all the time! I spent a day recompiling the browser 3 times, just for this! :facepalm:

O.K., so the question now is: what could have possibly changed and my theme is not used?

Hmm...let's see: starting

gtk3-widget-factory

shows me the same white-maddening theme as PM - NOT *my* theme! So it's not PM's fault. It's just something that must have changed - something that reset the theme back to some 'standard' - although I did not change my /etc/gtk-3.0/settings.ini...

New Tobin Paradigm

Re: Building Linux GTK3 Pale Moon on Gentoo

Unread post by New Tobin Paradigm » 2020-05-02, 21:43

Pale Moon will gain a gtk3 build with version 29. Just as I said before. Also, solaris and ilumos biilds as well.

segmentation-fault

Re: Building Linux GTK3 Pale Moon on Gentoo

Unread post by segmentation-fault » 2020-05-02, 23:24

Thank you Tobin,

as I said, GTK3 had worked with my special theme and PM for ages - so well that I had actually forgotten it.

After some search, I realized that 'something' had created or changed

~/.config/gtk-3.0/settings.ini

I found it with a date of April 29, 2020, and these contents:

Code: Select all

[Settings]
gtk-font-name=Noto Sans 10
gtk-theme-name=Breeze
gtk-icon-theme-name=breeze
gtk-fallback-icon-theme=gnome
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1
gtk-primary-button-warps-slider=0
It is out of question that *I* might have created such a file,
especially since

- I've never heard/used the 'Noto Sans' font
- Had I created this file, it would contain

Code: Select all

  gtk-primary-button-warps-slider = false
and not

Code: Select all

  gtk-primary-button-warps-slider=0
simply because this is the way I know it and use it in my global /etc/gtk-3.0/settings.ini.

As I am in the process of upgrading hundreds of packages in the last days, I have no way to know which one did this. All upgrades are done as root. The ~/.config/gtk-3.0/settings.ini is a file in the home directory of the normal user I use to do normal work. Which application creates/changes the settings.ini file of a normal user upon installation? None. This must be something that was done by an application that this user started/ended on April 29th.

Does Pale Moon do such a thing?

User avatar
Isengrim
Board Warrior
Board Warrior
Posts: 1325
Joined: 2015-09-08, 22:54
Location: 127.0.0.1
Contact:

Re: Building Linux GTK3 Pale Moon on Gentoo

Unread post by Isengrim » 2020-05-03, 03:41

segmentation-fault wrote:
2020-05-02, 20:48
Let's start from the obvious: how do I know I am running the browser in GTK3 mode?
Navigate to about:buildconfig and take a look at the configure options. You should see an option for --enable-default-toolkit with the value being either cairo-gtk2 or cairo-gtk3.
a.k.a. Ascrod
Linux Mint 19.3 Cinnamon (64-bit), Debian Bullseye (64-bit), Windows 7 (64-bit)
"As long as there is someone who will appreciate the work involved in the creation, the effort is time well spent." ~ Tetsuzou Kamadani, Cave Story

0strodamus
Fanatic
Fanatic
Posts: 142
Joined: 2014-11-19, 19:48

Re: Building Linux GTK3 Pale Moon on Gentoo

Unread post by 0strodamus » 2020-05-03, 06:23

Off-topic:
segmentation-fault wrote:
2020-05-01, 22:26
did I say I hate GTK2? I do hate it!
segmentation-fault wrote:
2020-05-02, 21:05
only GTK3 is so brain-damaged to hide the line to enter the file path from the user
To each his own, but seeing you struggle with GTK3 makes me appreciate Pale Moon's continued GTK2 support all the more! ;)

segmentation-fault

Re: Building Linux GTK3 Pale Moon on Gentoo

Unread post by segmentation-fault » 2020-05-03, 09:38

Here is the current status and my (for the moment final, whatever this means) thoughts on the subject:

On April 29th, I realized upon waking up that clicking on the + sign (located to the left of all tabs) did not produce a new tab. As I have hundreds (sometimes possibly even more than a thousand) open tabs at any time, I thought the browser (Pale Moon) had somehow reached a memory limit. However, I could use the browser normally and even open new tabs by using the CTRL+T keyboard shortcut. This indicates a problem with the Tab Mix Plus plugin, rather than the browser itself. Indeed, just yesterday I realized that there was an update for the plugin waiting to be downloaded and installed - maybe this caused it to stop functioning correctly.

I shut down the browser normally without problems, but did not start it immediately. Instead I had a look if a new version was available, so I could install and use that one. In fact there was, and, due to other upgrades that were taking place and required my attention, it took me a few days to compile and install the new version.

That's when I saw that it was using a white, flat theme (turned out to be 'breeze' and not 'Adwaita', as I thought). My beloved CDE theme was gone! I got mad. I thought PM had reverted back to GTK2 - it had not. It was functioning fine as always, displaying a GTK3 theme as always.

It was simply that something had created a ~/.config/gtk-3.0/settings.ini file with the contents:

Code: Select all

[Settings]
gtk-font-name=Noto Sans 10
gtk-theme-name=Breeze
gtk-icon-theme-name=breeze
gtk-fallback-icon-theme=gnome
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1
gtk-primary-button-warps-slider=0
and the browser was just obeying its precedence over my global /etc/gtk-3.0/settings.ini.

My rants about GTK2 should probably be understood as rants against flat, all-white themes, like 'breeze', that I confuse with some similar GTK2 theme. Let's not start a flame war. :)

The question remains: did the browser (or the Tab Mix Plus plugin) automatically create the settings.ini file upon shutdown? I can't find any mention of 'Breeze' in the code - although I thought I had found one in PORTAGE_TMPDIR before it was swept away.

Whatever the cause, the reader should be aware of this possibility and search at the right places for other culprits before stirring up so much dust as I did here. :)

Thanks to all for your help and KUTGW.

Locked