KDiff3 missing window controls after upgrade to Ubuntu 18
Asked Answered
S

2

8

I recently upgrade from Ubuntu 16 to Ubuntu 18.04.4. When I open kdiff3 it only opens into a maximized window with no controls visible (minimize/maximize/close).

If I invoke from Applications menu (or command line without any files specified), the controls are initially visible when the file picker modal is visible, but then disappear when I hit OK or Cancel.

I cannot drag the window by the header. F11 has no effect. Clicking Alt+Space does show a menu, but Resize, Unmaximize, and Move are grayed out.

$ kdiff3 --version
Qt: 4.8.7
KDE Development Platform: 4.14.38
kdiff3: 0.9.98 (64 bit)
Southport answered 16/2, 2020 at 17:44 Comment(2)
same here on linux mint cinammon 19.3Omeromero
This appears to be fixed in Ubuntu 20.04.1 LTSSouthport
F
3

The problem is caused by bug https://invent.kde.org/sdk/kdiff3/-/merge_requests/8 which Canonical has not applied for Ubuntu 18.04 LTS because they seem to think that "stable release" only means fixing security bugs, not functional bugs.

The problem is caused by kdiff3 version distributed with Ubuntu 18.04 mixing the concepts of maximized vs fullscreen. If you maximize the kdiff3 window and exit the program, it will store the WindowStateMaximised=true in the configuration file at ~/.kde/share/config/kdiff3rc or ~/.config/kdiff3rc modifying any existing value. If both exist, the first one will be used.

However, the setting WindowStateMaximised=true is considered to mean WindowStateFullScreen=true during the next start which causes the whole problem. To make things worse, this kdiff3 version doesn't seem to have any user accessible interface to switch out of fullscreen state either.

The workaround I'm using on Ubuntu 18.04 LTS is as follows:

Create file ~/bin/kdiff3 with following contents

#!/bin/dash
# workaround https://invent.kde.org/sdk/kdiff3/-/merge_requests/8
# see also: https://mcmap.net/q/1356358/-kdiff3-missing-window-controls-after-upgrade-to-ubuntu-18/334451
perl -i -npe 's/WindowStateMaximised=true/WindowStateMaximised=false/' ~/.kde/share/config/kdiff3rc ~/.config/kdiff3rc
exec /usr/bin/kdiff3 "$@"

The idea is to introduce a new kdiff3 command that first modifies the config file(s) to avoid this problem and then launches the real kdiff3 process with all the passed in command line parameters.

The perl command modifies both the configuration files "in place" (-i) meaning it directly modifies the contents of both config files.

The only real fix for this program is to use fixed version of kdiff3. For Canonical supported versions this requires upgrading the whole operating system to Ubuntu 20.04 LTS or later.

Faviolafavonian answered 30/11, 2021 at 14:34 Comment(0)
H
2

Try changing WindowStateMaximised to false by editing config file ~/.config/kdiff3rc.

This helped for me. Seems there is no GUI option for that. Don't know why it was set to true anyway.

Hydrocele answered 20/1, 2021 at 11:56 Comment(6)
You may have to create ~/.config/kdiff3rc if it doesn't exist and put the line WindowStateMaximised=false into it, but the solution works for me!Intaglio
This should be considered as a workaround at best. You're actually seeing this bug: invent.kde.org/sdk/kdiff3/-/merge_requests/8 – the sad part is that due to Canonical logic of "stable" distribution, Ubuntu 18.04 LTS is forever locked into this broken behavior.Faviolafavonian
Also note that the location of the kdiff3 config file may be at ~/.kde/share/config/kdiff3rc if your user profile is old enough.Faviolafavonian
Also note that if you ever maximize the kdiff3 window, it will reset the configuration to incorrect setting WindowStateMaximised=true which will cause the same problem on the next launch of the program. The only real way to avoid this problem is to upgrade to recent enough version of kdiff3.Faviolafavonian
This is really a never ending story :( If you use multiple screens, the above might not help and you might have to edit kdiff3rc and delete all the Geometry, Position, Height and Width entries once kdiff3 begins to start in full-screen mode again. @mikko-rantalainen is it possible to install a new kdiff3 version on Ubuntu 18.04 without upgrading the whole KDE/Qt?Intaglio
I haven't checked how much you would need to upgrade but depending on how the dependencies are compiled it might require replacing nearly all core libraries in which case it's easier to just upgrade the whole OS to version 20.04 which already includes fixed version of kdiff3.Faviolafavonian

© 2022 - 2024 — McMap. All rights reserved.