Bug 7344 - server installer/tl-setup via SSH sometimes displays windows on console
Summary: server installer/tl-setup via SSH sometimes displays windows on console
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Server Installer (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.10.1
Assignee: Peter Åstrand
URL:
Keywords: ossman_tester, prosaic
Depends on:
Blocks: 7342
  Show dependency treegraph
 
Reported: 2019-05-06 12:48 CEST by Peter Åstrand
Modified: 2019-06-26 14:43 CEST (History)
0 users

See Also:
Acceptance Criteria:
* When running installer/tl-setup via SSH, the bootstrap step for installing python/pygtk/python-apt should not use X11 forwarding or create any windows on the local console * There should be no warnings about deprecated gnome-terminal options


Attachments

Description Peter Åstrand cendio 2019-05-06 12:48:33 CEST
From https://www.cendio.com/bugzilla/show_bug.cgi?id=7342#c2:

Install Python from GUI does not work:

$ ./install-server 

Error: No Python 2.x interpreter found.

A Python 2.x interpreter is required for ThinLinc.
I was trying to use the Python interpreter named 'python'.

If Python is installed under a different name, set the PYTHON
environment variable to the Python binary to use. Example:
PYTHON=/usr/bin/python2.6 ./install-server

To install Python, please run this command:

    sudo dnf install python

Would you like to run this command now?
Starting gnome-terminal to run "sudo dnf install python"...
# Flaggan ”-e” är föråldrad och kan tas bort i en senare version av
gnome-terminal.
# Använd ”-- ” för att visa att inga fler flaggor kommer och få kommandoraden
att exekvera.
# _g_io_module_get_default: Found default implementation dconf
(DConfSettingsBackend) for ‘gsettings-backend’
# watch_fast: "/org/gnome/terminal/legacy/" (establishing: 0, active: 0)
# unwatch_fast: "/org/gnome/terminal/legacy/" (active: 0, establishing: 1)
# watch_established: "/org/gnome/terminal/legacy/" (establishing: 0)

Note that the error message was printed *both* to the terminal as well
displayed in a zenity window. Running:

    sudo dnf install python

manually works correctly.

The same issue exists with "pygtk2".
Comment 1 Pierre Ossman cendio 2019-05-07 12:58:47 CEST
A modern GNOME terminal also has the behaviour that it doesn't really support multiple sessions. This can be a problem if the user is using ssh and X11 forwarding to a server to install ThinLinc, and the user is also logged in locally on the same server. GNOME terminal might then start a new window on the local terminal instead of showing one via X11 forwarding.

We should probably reconsider our use of GNOME terminal and perhaps prefer other alternatives.
Comment 2 Peter Åstrand cendio 2019-06-24 13:15:11 CEST
Tested again:

* When running from a gnome-terminal inside a GNOME session (now after fixing bug 7294 and 7295), the installation actually works. The installation is done in a new gnome-terminal window. We still get the warning about the "-e" option, though.

* However, when running through a SSH login with X11 forward, both gnome-terminal and zenity dialogs appears on the console, rather than on the X11 forwarding workstation. Apparently, all GTK3 applications misbehaves like this. This gives a highly confusing behaviour. Dialogs are printed to the SSH terminal, but you cannot answer yes/no.

One idea for a solution is to simply avoid GUI tools, when we are detecting a SSH login. This unfortunately means that X11 forwarding will not be available, so the entire installation will be done in text mode. But it should at least work reliably.

Wrt the problem with "gnome-terminal -e" being deprecated, it seems this can be solved by using "--" instead.
Comment 5 Pierre Ossman cendio 2019-06-26 14:43:37 CEST
The bootstrapping is now indeed text only when using SSH. Tested on RHEL 8.

Tested gnome-terminal on RHEL 8, Fedora 30 and SLES 15.

Tested all other terminals on Fedora Rawhide.

Note You need to log in before you can comment on or make changes to this bug.