-
Notifications
You must be signed in to change notification settings - Fork 79
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
python-wnck removed in Ubuntu 18.04 #95
Comments
Ahh. I didn't catch that because, as every *buntu upgrade I've ever done has unpredictably broken things, I haven't been able to speculatively budget a huge block of time for an upgrade from 14.04 LTS yet. I suspect The proper solution will be me migrating it to Python 3.x and PyGI when I can spare the time (the API adapter to ease porting PyGTK apps to PyGI segfaults when I hook QuickTile up to it, so I need to do it the long way... which also takes time I haven't had). |
Okay. make sense. I'm not familiar with PyGI etc at all so can't help there. For now, using |
If you're reading this because you just want a python-wnck that work on Ubuntu Bionic Beaver 18.04, download it for your architecture from https://packages.ubuntu.com/artful/python-wnck . Thanks @bl4ck5un for the tip! To @ssokolow: thanks for all. It seems python-wnck package was removed a month ago, ref https://launchpad.net/ubuntu/bionic/amd64/python-wnck with reference to https://bugs.launchpad.net/ubuntu/+source/gnome-python-desktop/+bug/1739797
|
then you can run the apt install command EDIT by ssokolow: For people who don't scroll down to my reply, don't use |
The situation is the same with Debian Testing (Buster) which is what Ubuntu 18.04 is based on; |
It looks like there is a way to directly have wnck available from python without dedicated python-wnck package, using the GObject introspection infrastructure. Details are on https://stackoverflow.com/a/43349245/1429390
then
|
I've been aware of that for a while, but there are three problems with it:
Basically, while I do eventually want to use that, it requires a very involved porting process that I'm still trying to make time for:
...and since PyGTK isn't available for Python 3.x and PyGI's support for GTK+ 2.x is flaky at best, I have to do it all at once. (And it's impossible to keep it working during the intermediate steps so I can port incrementally and test for bugs along the way. It many ways, the complexity approaches a complete rewrite and, if there were a suitable equivalent to libwnck in the Qt ecosystem, I'd probably port to PyQt 5 instead.) I'd hoped to write an automated test suite first, but other things kept cropping up. |
For those that want to add the artful repo as mentioned by @Falieson I would recommend using the following command:
|
I recommend adding a file to
|
@ssokolow obviously same issue on 18.10, |
I wasn't really looking forward to play around with sources so I've figured out a crude way of doing quarter tiling using this script: |
@peteruithoven nice, although this looks very very basic! :) quicktile does a lot more than just quarter tile! I've been using quicktile for years now and couldn't find a better option (I'm biased & used to it). You script looks good for 1 single "fixed" monitor, I use it on my laptop which I connect to different external devices. |
@kbsali Oh, I certainly intend to fix it. It's just that my life has been so busy lately that I'm still on Kubuntu 14.04 LTS despite its support period ending in only a few months. The problem is that switching to what's supported in newer releases requires a port from GTK+ 2.x to GTK+ 3.x, and that's more complicated than it sounds because of the need to also port from PyGTK to PyGI. (And staying on Python 2.x initially and using the PyGTK->PyGI porting shim to port in stages is complicated by the fact that, last time I tried that, PyGI segfaulted.) |
I had some free time today, so I decided "appears to work, but potentially buggy" is better than "nothing testable", and I've started to work on getting it ported to PyGI and Wnck 2.x. I'm to the point where the only thing left that static analysis is complaining about is the handful of sparse unit tests I have, which are use UPDATE: ...and manual testing reminded me of how heavily I use UPDATE: To clarify, |
I decided I'll just leave the GTK+ 2.x version easily accessible in a branch for anyone needing pre-1.11.0 PyCairo, so I upgraded my copy of PyCairo and I've continued to work on the porting to GTK+ 3.x. Still not complete enough to run without dying from "no such method" errors, but progress is being made. |
Great news, thanks for the effort! 💪 |
Download python-wnck for 18.10I've been, trying Xubuntu 18.10. Fail?But... it did not work for me. Why? See commands and error below.
Release info
Package info
|
It looks like Does running If so, three options come to mind:
(For the record, I am still working on the port to GTK+ 3.x which will resolve this mess, but things got a little busy so I haven't had time to figure out how to port over a line which got horrendously ugly in the switch from PyGTK to PyGI.) |
Hi @ssokolow and thank you for reaching back. At the moment I can just confirm that I hope I'll try the other steps soon, too. |
Hi @ssokolow
It appeared to have un-confused itself. Now just running quicktile works. You will find a slightly edited version of my terminal log (converted from ANSI color to HTML for reading comfort) here: https://gourichon.org/fsi/quicktile/unconfuse_log.html Reading not only may help you (1) figuring out what became confused, but as it shows the kind of thing that actually happens when trying to follow installation instructions, it might (2) provide insights on how to adjust installation programs or human-readable instructions for maximum efficiency given the variety of people that may follow them. Thanks again and keep up the good things! |
Yeah. I definitely need to make some changes. Here is what I gather from that log: First, I should have explicitly pointed you at the "Removal" section in the README. As for the issues you ran into, they seem to mostly fall into two categories:
I can't find any installation instructions where I forgot to say to to either use I can't be responsible for things breaking because people copy-pasted random bits of my scripts without understanding what preconditions must be upheld.
Again, you seem to be extrapolating from incorrect assumptions because you didn't know about the "Removal" section at the bottom of the README. I'll have to make it more visible.
I don't know why you cancelled this. You were on the right track. My best guess is that I should use
The
I should consistently use
Removing
OK, I admit fault here. I never thought to test that |
- "Crude quarter tiling tool for elementary OS": https://gist.github.com/peteruithoven/db0cba0b0849c8cb5e267f6e75126304 Thank you: github.com/peteruithoven - See also known issue: ssokolow/quicktile#95
Can you please edit your comment from > to >> ? |
Anyone has a solution to work around this without adding an old ppa to my sources? |
this worked for me today on xubuntu 19.04 (in addition to the pre-reqs):
|
Just a little status update. Time was such a mess for me that I actually spent some time running Kubuntu 14.04 beyond even the LTS support window. (Yes, yes, I know. Bad programmer, no biscuit. That said, I was un-stupid enough to switch my Firefox from Canonical builds to Mozilla builds to ensure it kept getting security fixes and I make heavy use of things like uMatrix-based whitelisting.) I'm currently on 16.04 while I squash the bugs, feature regressions, and unacceptable annoyances introduced by switching from Upstart to systemd, from KDE 4 to KDE 5, from a pre-CSD version of GTK+ 3.x to a post-CSD version, and just plain breakages that should be expected because I hacked something the first time rather than doing it properly. Once that's done and I've finished finding Qt replacements for GTK+ 2.x apps that will go GTK+ 3.x in 18.04, I'll upgrade to 18.04 (16.04 isn't a 5-year-supported LTS like 14.04 and 18.04), squash the hopefully smaller number of bugs there, and then get back to work on QuickTile. |
just upgraded to 19.10, good same old game again! 😅
|
Another status update. I've been working on this, but it's slow going because I'm still on Kubuntu 16.04 and the GTK+ 3.x and Cairo bindings appear to be broken, so I'm limited in which parts of QuickTile's codebase I can actually work on and test. (Specifically, Since I'm still not ready to jump up to 18.04 and beyond, I may have to install something newer in a VM and develop in that to get the port done in reasonable time. |
This is of course none of my business, but why are you "stuck" on very old versions of Ubuntu? Nowadays the upgrade processes are pretty smooth! :) |
Thanks a lot for this work! This new branch works perfectly for me on Xubuntu 19.10. |
Glad to hear it... though, with the ice storm here in Ontario, Canada having brought three power outages in two days, I've become very aware of how easily a certain TODO item can cause very visible bugs, so it's likely I'll need to push and get testing on another release candidate before 0.4.0 gets tagged. (I was planning to wait for 0.4.1 to add the code to watch for changes like adding/removing/changing monitor rectangles or panel reservations but it turns out that QuickTile starts before Plasma reserves its panels when using |
Thanks @nreith for sharing some scripts. Looks like the debug part of it benefited the auhor. PR for Debian packageProgress by @ssokolow on branch gtk3_port motivated me to create a debian configuration for the package and open PR #106. This has the benefit of not requiring old packages and kludge. And the package is nicely installed by Debian and uninstallable. Would you like to test the Debian package on branch gtk3_port?If so, you can fetch my branch https://github.com/fidergo-stephane-gourichon/quicktile/tree/feature_debian_package and run Options: local or DockerNotice that building the Debian package requires you to install some debian-development-related packages on your main system. Alternatively, you can install docker and perform package creation inside it. I posted a command line on #106 (comment) . That latter option consumes a lot of bandwidth because you need to fetch a whole distribution and set of packages. The plus side is that it allows to build packages for other distributions. Thank you for your attention. |
I spoke a little fast. There's one regression. I happen to have a xfce panel on the bottom right, with width less than width of window. Usual version of quicktile correctly expands any window on the left side to the full height. New version limits the height uselessly. See attached screenshot, bottom left.
Here in Paris it's cold, but probably no as cold as in Canada. Because of strikes, the public transportation is severely degraded to the point where it's "safer" for commuters to ride, say, 12-18km on a bike to go to work (then again back in the evening).
"Small steps" |
Ahh, yes. That's a known regression. The GTK+ 2.x version used I have no experience implementing something like I had to write my own |
I wanted to test this on Fedora 31, but I was not able to find these two dependencies:
I tried looking for wnck for Python 3, but I don't think it's available at all:
I also haven't found it using pip (PyPI). |
@torsava That's because With Python 2.x and PyGTK, each library had to have a specific Python binding. With Python 3.x and the approach that only really got fully debugged in GTK+ 3, each library has a language-agnostic GObject Introspection (GIR) definition file, then PyGI just knows how to read any GIR metadata you might have installed. It's probably bundled into I'm assuming Debian doesn't do that because it'd be wasted space if all your applications are written in languages like C and C++ where the GIR metadata is only needed at compile time. You probably don't need to worry about Once you find it, let me know which packages need to be installed so I can re-add Fedora to the README. |
@ssokolow Thanks for the work on this! It feels great to have quicktile again under 18.04. It's working a treat for me. 😄 |
@ssokolow I see, interesting system. The paths on Fedora are slightly different, but I found the packages:
So the final list of dependencies on Fedora 31 is:
And it works like a charm! Thank you so much for your work! |
It's basically the bindings equivalent to the Language Server Project. Instead of
Glad to hear it. As someone whose last RPM-based distro was Mandrakelinux 10.1, I have one more question. What's the complete command that's currently recommended for installing that set of packages on Fedora? (If following Phoronix has taught me one thing, the answer to that question has changed over the years.) I'll push an update to the README as soon as I get it. |
Oh, also, what Fedora package provides |
@ssokolow Yeah, the binding system sounds awesome! The full command to install the dependencies is:
And |
I just wish Qt would retrofit it or something similar onto their QWidget API. I'm not a fan of the direction GNOME has taken GTK+ 3 and Rust has no mature QWidget bindings. (The only thing that kept me from following the LXDE guys in upgrading QuickTile from GTK+ 2.x to Qt 5 is that the Qt ecosystem appears to have no libwnck equivalent. As-is, as soon as I have PPA experience from QuickTile work, I need to make a PPA for gtk3-mushrooms.)
Hmm. Is there a site equivalent to http://packages.debian.org/ and https://packages.ubuntu.com/ where I can check what else is inside The fact that the Gio GIR file isn't part of a glib or gio package makes me worry that one of the Gtk and Gdk GIR files (or something else I depend on) may also be in there. |
The main go-to page is Fedora Pagure: https://src.fedoraproject.org/rpms/gobject-introspection From there you can either go to Files -> open the spec file and read how the package is built: https://src.fedoraproject.org/rpms/gobject-introspection/blob/master/f/gobject-introspection.spec Or better yet in this case, click on Packages -> Contents and you can directly see the files contained in there: https://apps.fedoraproject.org/packages/gobject-introspection/ |
Thanks. For some reason, that never seems to turn up in my searches. Instead, I get RPM-ecosystem search engines and hosts for analogues to PPAs and non-default ebuild sources.
Thanks. It looks like it's an interesting grab-bag of everything GTK depends on that isn't part of the GTK package itself, so I would have been depending on it if the bindings to Cairo's |
Done. The README has been updated. |
OK, I'm back to working on this and I'm part-way through converting the documentation to Sphinx to get rid of the last Python 2.x dependency. @fidergo-stephane-gourichon Would you mind opening a separate issue for #95 (comment) to make sure that it doesn't get lost in the shuffle? |
Status Update: The Sphinx rework of the documentation is coming along nicely. I don't want to
Here's a preview of the progress so far: I still want to:
I'm also considering switching to ReadTheDocs-hosted documentation and just hosting some EDIT: Never mind. I'll stick to generating my own docs and read up on how to use Travis-CI for deployment to |
Done. #108 |
Another status update:
The main remaining things that need to be done in the manual are:
I did accidentally introduce and almost not catch a bug in |
...and, since I got so much done, another one quick on its heels.
All that should be left now is the existing site's landing page and the aforementioned "maybe some work on functional testing" before I |
OK. I've just got one more little bit to migrate over on the docs, and then I'll decide whether to do that little bit of functional test improvement or just I did a lot of stuff (including writing a basic Developer's Guide section, polishing up the mobile and print stylesheets, and fixing some accessibility flaws baked into the defaults in Sphinx's Alabaster theme), so I'll just put up a screenshot as a preview: ...and yes, that illustration is a GIF that acts like a hand-drawn screencast. (All 65KiB of it.) |
Done. The changes are now pushed to the If anyone wants to look at the manual, you can generate it by installing the Sphinx-related packages in (If you're just curious about the animation, it's at EDIT: Oh, and hacking together a quick and dirty test window for the functional test harness did prove worthwhile. It turns out that python-xlib sometimes fails to expose the Xinerama method for querying the number of monitors. No clue why, but I switched to using GDK's wrapper for it. EDIT: I figured out the problem I'd fixed. It was "QuickTile will crash on attempting to retrieve the number of monitors if the X server doesn't have the |
OK. The 0.4.0 release candidate is now in the |
I just ran into a problem (#109) which made me realize a feature change I should do (#110) and another bug to be fixed (#111) but, since #109 is a heisenbug I can't reproduce and I think the GTK+ 2.x version didn't do any better on #111, I'm not letting them block the 0.4.0 release. Barring unexpected demands on my time, I hope to have 0.4.0 tagged and pushed to master in time for the "14 days ago" anniversary of 0.4.0 entering release candidate status. |
Done. The |
python-wnck
is no longer available in Ubuntu 18.04. I'm using the package from artful (17.10) as a workaround. Would be great to know how to installquicktile
properly in 18.04.The text was updated successfully, but these errors were encountered: