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

Print support in GTK 3 example (gtk3.py) on Linux #434

Open
cztomczak opened this issue Jun 11, 2018 · 4 comments
Open

Print support in GTK 3 example (gtk3.py) on Linux #434

cztomczak opened this issue Jun 11, 2018 · 4 comments

Comments

@cztomczak
Copy link
Owner

cztomczak commented Jun 11, 2018

UPDATE: Patch available in Issue #446.

Currently print handler implementation on Linux uses GTK 2 API (GTK 2.0 libraries are included during build). When you execute "print" from mouse context menu it results in this error:

[0611/190031.893481:ERROR:browser_main_loop.cc(339)] Gtk: GTK+ 2.x symbols detected.
Using GTK+ 2.x and GTK+ 3 in the same process is not supported

While this is being fixed, the "Print" option should be removed from mouse context menu in gtk3.py example on Linux.

The final solution to GTK3 problems is described in Issue #446 ("Support linking to GTK 3 when building CEF from sources and when building cefpython module").

@pinebit
Copy link

pinebit commented Aug 6, 2018

I hit the same issue. But the problem is not about "context menu". If you simple invoke browser.Print() this will result in the same error.
Is there a workaround for this?

@cztomczak
Copy link
Owner Author

@pinebit Print handler on Linux depends on GTK API. So I guess no easy way to resolve that. The real solution to the GTK+ 2.x symbols detected error is to build upstream CEF from sources with the use_gtk3=true GN define set in tools/automate.py script. Please ask for help on the Forum if having troubles with that.

@pinebit
Copy link

pinebit commented Aug 6, 2018

@cztomczak I have done this already. I've built chromium 68 with CEF 3440 with use_gtk3=true. However, ldd libcef.so | grep gtk does not display any GTK libraries. Looks like in 68 they have finally removed dependency on GTK (I can be wrong).
However, assuming I have chromium and CEF built with gtk3, I don't quite understand how this is going to work, because all cefpython is built with GTK 2 (it uses gtk-2 includes and links gtk2 libraries).

@cztomczak
Copy link
Owner Author

@pinebit Created Issue #446. Please see/discuss further details there.

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

No branches or pull requests

2 participants