Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot render on Linux because of "gtk theme" #13

Closed
jukefr opened this issue Aug 2, 2018 · 7 comments
Closed

Cannot render on Linux because of "gtk theme" #13

jukefr opened this issue Aug 2, 2018 · 7 comments

Comments

@jukefr
Copy link

jukefr commented Aug 2, 2018

Hello,

When trying to render on Ubuntu Linux 4.17.11-041711-generic I get the following error :

Theme parsing error: gtk.css:6777:29: Missing opening bracket in color definition

Here is a demo of the issue : https://asciinema.org/a/nrVz5y3NxIXMDL99Y7NrNh90q

I don't really understand how this error makes it impossible for the app to work as I run many other Electron apps on my desktop and have never had such a problem (where the app will simply die for no apparent reason)

The theme file isn't even mine, pretty sure it is a standard theme that came with Ubuntu.

@jukefr jukefr changed the title Cannot render Cannot render on Linux because of "gtk theme" Aug 2, 2018
@jukefr
Copy link
Author

jukefr commented Aug 2, 2018

There probably is a flag in electron somewhere that tells it to ignore GTK warnings or at least not die when it sees a GTK warning.

@jukefr
Copy link
Author

jukefr commented Aug 24, 2018

Maybe add some default valid fallback values packaged in the release as a "workaround".

@oliversturm
Copy link

Any updates on this? I see this when I execute terminalizer render recording.yml:

Error: 
  Error: 
(electron:16146): Gtk-WARNING **: 15:56:04.432: Theme parsing error: gtk.css:68:35: The style property GtkButton:child-displacement-x is deprecated and shouldn't be used anymore. It will be removed in a future version

(electron:16146): Gtk-WARNING **: 15:56:04.432: Theme parsing error: gtk.css:69:35: The style property GtkButton:child-displacement-y is deprecated and shouldn't be used anymore. It will be removed in a future version

I don't know where those warnings come from, but they appear harmless - it took me a while to realize that apparently electron thinks they are deadly errors! Can't they be ignored somehow?

Running Ubuntu 18.04.

@MaximDevoir
Copy link

MaximDevoir commented Aug 30, 2019

I was not able to ignore the error and ended up switching to a theme that the program did not complain about. I liked my theme before, but I also needed to run certain applications that would fail to load my GTK theme.

This is not a Terminalizer issue. Nor does it appear to be an Electron issue, but rather a GTK issue or how GTK is configured - based on seeing this warning pop up in non-Electron apps. Fix appears in #66

If the theme is open source, you could file an issue like this person, but the theme still hasn't been updated. Or get lucky and only have 1 or 2 errors that need to be fixed in your gtk.css file like this person. Or be like me: have a thousand deprecation warnings and realize updating the theme to remove those warnings isn't a viable solution.

@oliversturm
Copy link

I'm debugging this and I found that Terminalizer escalates these warnings into errors - this will be easy to fix. Whether or not a specific GTK theme actually has issues that may cause trouble is a different question, but there's no reason for Terminalizer to die with errors as a result of warnings that Electron doesn't really care about (as you can easily see by running Electron by itself).

As part of my debugging work I have updated package versions and I'm still seeing some trouble I'm looking into. I'll submit a pull request when I find the solutions.

@miraclx
Copy link
Contributor

miraclx commented May 4, 2020

The underlying issue is described here
#102

And fixed on PR #97

@bassmanitram
Copy link

Hello,

When trying to render on Ubuntu Linux 4.17.11-041711-generic I get the following error :

Theme parsing error: gtk.css:6777:29: Missing opening bracket in color definition

Here is a demo of the issue : https://asciinema.org/a/nrVz5y3NxIXMDL99Y7NrNh90q

I don't really understand how this error makes it impossible for the app to work as I run many other Electron apps on my desktop and have never had such a problem (where the app will simply die for no apparent reason)

The theme file isn't even mine, pretty sure it is a standard theme that came with Ubuntu.

This is closed but for anyone who comes across this, you are probably using a Mac theme of some sort. In my case it is MacBuntu-Sierra-light. The gtk-3.0/gtk.css of that theme has some errors in it:

6777:  text-shadow: 0 0 2px alpha #000, 0.3, 0 1px 2px alpha #000, 0.6;
6779:  -gtk-icon-shadow: 0 0 2px alpha #000, 0.3, 0 1px 2px alpha #000, 0.6;
6785:  box-shadow: 0 0 2px alpha #000, 0.3, 0 1px 2px alpha #000, 0.6;

these should read

6777:  text-shadow: 0 0 2px alpha(#000, 0.3), 0 1px 2px alpha(#000, 0.6);
6779:  -gtk-icon-shadow: 0 0 2px alpha(#000, 0.3), 0 1px 2px alpha(#000, 0.6);
6785:  box-shadow: 0 0 2px alpha(#000, 0.3), 0 1px 2px alpha(#000, 0.6);

Hope that helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants