There is no need in Python on linux anymore to obtain environment variables
Python script changed to direct `env -0` call on linux
printenv binary for macOS and its source code updated to write output directly to stdout, not to temporary file
Added tests with testcontainers to detect problems on different linux distros
(cherry picked from commit 72f7f7ad782cdb4632980d2622023d117e4485dc)
IJ-CR-19090
GitOrigin-RevId: 95b4cc5cca0cff27856a4e92d4ed26fd8aead416
It's unnecessary and sometimes wrong to assume any encoding
for an environment variable. They can be encoded differently
depending on the requirements of programs that utilize them.
In our case we just need to pass all the environment
variables "as is" to the IDE process.
I've modified printenv.py so that it's the same version of
the script for both Linux and macOS and for all the Python
versions from 2.3 to at least 3.9.
GitOrigin-RevId: 40d73ef6eb56da8609d75fbce8a4a04c52e317b4
fixed IDEA-201291 Linux Native menu bar: if 'windows-style' menu (i.e. located on the window title bar) is used, menu can't be used in the Full Screen mode
fixed IDEA-200379 linux Native menu bar on Ubuntu Linux: the View menu actions have incorrect state
fixed IDEA-151200 Unity menu bar is not available for detached editor tabs and floating tool windows
fixed IDEA-200724 IntelliJ IDEA does not fully start after update, ends with window with menubar and nothing else
fixed IDEA-200374 Throwable at com.intellij.openapi.wm.impl.GlobalMenuLinux.lambda$handleEvent$4
fixed IDEA-200768 Start Splash window doesn't hide
fixed IDEA-200822 Opening any Markdown file freezes recent IntelliJ Ultimate EAP 183.3795.13
fixed GLIB-WARN (child/parent mismatches)
add traces
return checking of registry key linux.native.menu
fix loading of class GlobalMenuLib
fixed PY-32237 GUI tests Unable to register window, error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name com.canonical.AppMenu.Registrar was not provided by any .service files
fixed IDEA-200273 Exceptions: GlobalMenuLinux - Unable to register window and AppMenu-service can't register xid
some of desktop env (KDE for example) doesn't like hierarchy changes when menu is shown, so use 'fixed' internal hierarchy
KDE regulary calls 'about-to-show' for all top-level menus, avoid handling of them with use of event-filter
When the IDE is launched in it's own terminal (File Manager | Run in Terminal), shutting it down kills the restarter script as well. Ignoring the signal allows the script to outlive a terminal and successfully restart the IDE.