In these cases the problem is that PyGTK2 is not installed by default anymore on these distributions.
A refresher for current versions: Ubuntu 16.04 Desktop: Python 2, but no PyGTK2 Ubuntu 16.04 Server: No GUI, no Python 2 [1] Fedora 24 Workstation: No Python 2 Fedora 24 Server: No GUI, no Python 2 [1] But libgtk2 oddly enough
Both Ubuntu Desktop and Fedora Workstation include Zenity though, so you get a graphical error message. Not sure what the scope of this bug is.
We'll try to take a few small steps to make this less painful, until we have something more long term in place (bug 4586).
As a start I've added a platform specific note for Fedora. Will do the same for Ubuntu.
Note also added for Ubuntu.
I also had a look at openSUSE, but they have yet to start deprecating Python 2. The minimal install includes Python 2, and the default desktop (KDE) includes PyGTK. This is true for both Leap and Tumbleweed.
Works rather well now. The installer now starts (in GUI if necessary) on these platforms: - Fedora 24 Workstation - Fedora 24 Server - Ubuntu 16.04 Desktop - Ubuntu 16.04 Server - Kubuntu 16.04 (Note however that support for DNF and APT can still be missing. see bug 5202 and bug 4586.)
Nightly build cannot install: # /home/tlbuilder/buildarea/trunk/ctc/installer/install-server /home/tlbuilder/buildarea/trunk/ctc/installer/install-server: line 26: /home/tlbuilder/buildarea/trunk/ctc/installer/libs/libexec/syscheck.sh: No such file or directory
That is not the proper path to the installer: $ /home/tlbuilder/buildarea/trunk/ctc/server-bundle/install-server Could not start PyGTK. Using text mode fallback... This program must be run as root. Do you want to try re-launching the installer through 'sudo' [Yes/no]?
I have tested installation on following dists: - Ubuntu 16.04LTS - Ubuntu Server 16.04LTS - Sles12SP1 - Debian 8 - Fedora 24 Which provides combinations of python2 and pyktg2 availability. Tested both UI and console. Everything works as expected.
Find one bug were the package installation was made in a inherited tty, reproduce from terminal: 1. unzip server bundler 2. enter unpacked directory and ru 'nautilus .' 3. click on install-server and nothing visually happens. the sudo and installation is redirected to the terminal were nautilus is started.
Additionally, when Ubuntu removed python2 package the package installer module python-apt package was also removed. Which means that package installation doesn't work out of the box on Ubuntu 16.04LTS. We could hijack this bug to install python-apt as prerequisite for running tl-setup to solve this issue. Currently this is documented as platform specific notes.
(In reply to comment #27) > Find one bug were the package installation was made in a inherited tty, > reproduce from terminal: > > 1. unzip server bundler > 2. enter unpacked directory and ru 'nautilus .' > 3. click on install-server and nothing visually happens. the sudo and > installation is redirected to the terminal were nautilus is started. I've tried reproducing this error on Ubuntu 16.04 Server and here's what I've found so far: 1. $ sudo apt install ubuntu-desktop 2. Start a new graphical session. 3. $ sudo apt remove python2.7 4. $ sudo apt autoremove (probably optional) 5. $ pkill nautilus 6. $ nautilus tl-*-server 7. Double-click "ThinLinc Server Installer" in the Nautilus window In the terminal behind the Nautilus window, this output can be seen looping over and over: > 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.4 /home/cendio/server-bundle-nightly/install-server > > To install Python, please run this command: > > sudo apt install python > > Would you like to run this command now? > > > $ sudo apt install python > Reading package lists... Done > Building dependency tree > Reading state information... Done > The following additional packages will be installed: > libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python-minimal > python2.7 python2.7-minimal > Suggested packages: > python-doc python-tk python2.7-doc binfmt-support > The following NEW packages will be installed: > libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python > python-minimal python2.7 python2.7-minimal > 0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. > Need to get 3,907 kB of archives. > After this operation, 16.6 MB of additional disk space will be used. > Do you want to continue? [Y/n] Abort. > > Installation completed successfully. > Restarting /home/cendio/server-bundle-nightly/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.4 /home/cendio/server-bundle-nightly/install-server > > To install Python, please run this command: > > sudo apt install python > > Would you like to run this command now? > > > $ sudo apt install python > Reading package lists... Done > Building dependency tree > Reading state information... Done > The following additional packages will be installed: > libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python-minimal > python2.7 python2.7-minimal > Suggested packages: > python-doc python-tk python2.7-doc binfmt-support > The following NEW packages will be installed: > libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python > python-minimal python2.7 python2.7-minimal > 0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. > Need to get 3,907 kB of archives. > After this operation, 16.6 MB of additional disk space will be used. > Do you want to continue? [Y/n] Abort. > > Installation completed successfully. > Restarting /home/cendio/server-bundle-nightly/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.4 /home/cendio/server-bundle-nightly/install-server > > To install Python, please run this command: > > sudo apt install python > > Would you like to run this command now? > > > $ sudo apt install python > Reading package lists... Done > Building dependency tree > Reading state information... Done > The following additional packages will be installed: > libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python-minimal > python2.7 python2.7-minimal > Suggested packages: > python-doc python-tk python2.7-doc binfmt-support > The following NEW packages will be installed: > libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python > python-minimal python2.7 python2.7-minimal > 0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. > Need to get 3,907 kB of archives. > After this operation, 16.6 MB of additional disk space will be used. > Do you want to continue? [Y/n] Abort. > > Installation completed successfully. > Restarting /home/cendio/server-bundle-nightly/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.4 /home/cendio/server-bundle-nightly/install-server > > To install Python, please run this command: > > sudo apt install python > > Would you like to run this command now? > > > $ sudo apt install python > Reading package lists... Done > Building dependency tree > Reading state information... Done > ^C
While investigating, I noticed that syscheck.sh was marked as a /bin/bash file, but since it's sourced from a /bin/sh file, it needs to be /bin/sh.
With all these commits, I believe this bug is done again. syscheck.sh should now prefer to use the graphical tools if they're available, and fall back to text mode. If we're running on a system with the apt package manager, syscheck.sh will offer to install python-apt.
One problem is that zenity uses WINDOWID from env to set transient window. In the issue were nautilus is started from terminal, zenity dialogs are transient to terminal window and not nautilus, eg hidden behind nautilus. One workaround is to unset windowid when calling zenity like: env -u WINDOWID zenity --calendar
Verified graphical and text installation using Fedora 24 and Ubuntu 16.04 LTS works as expected. Also verified that when running nautilus from terminal and starting ThinLinc installer works as expected.
I'm not sure if this is expected or not, but this is what I get on a minimal SLES12SP1 installation, when installing via SSH with X11 forward enabled: # ./install-server Error: PyGTK not found. PyGTK is required for ThinLinc's graphical installer. To install PyGTK, please run this command: sudo zypper install python-gtk Would you like to run this command now? Alternatively, run this program from a terminal without the DISPLAY environment variable set to get the text mode fallback. (Y/n)? y Could not find a terminal program. Exiting.
(In reply to comment #43) > I'm not sure if this is expected or not, but this is what I get on a minimal > SLES12SP1 installation, when installing via SSH with X11 forward enabled: > > # ./install-server > > Error: PyGTK not found. > > PyGTK is required for ThinLinc's graphical installer. > To install PyGTK, please run this command: > > sudo zypper install python-gtk > > Would you like to run this command now? > > Alternatively, run this program from a terminal without the > DISPLAY environment variable set to get the text mode fallback. > > (Y/n)? y > > Could not find a terminal program. Exiting. Fixed in r31675.
I was about to install build 5231 on Elementary OS which is a ubuntu fork. No python2 installed and I was asked about to install it. However a error message dialog said that I have no terminal. Installed Xterm and it worked as expected. The dialog should hint about which terminal to install probably xterm.
The conclusion that xdg-terminal from xdg-utils was wrong. The actual code used is in syscheck.sh within _doinstall() function. This message can be updated to include an hint about installing a known terminal.
On a debian 8 minimal install sudo is not available. Running install server as ROOT gives me following strange behavior, sudo not found, installation of package success, restart install server telling me that i need to install the previous "installed" package over and over again.. At least, do a check if user running the install server already is root to skip using sudo. (Y/n)? y $ sudo apt install python ./install-server: 126: /root/tl-4.6.0post-server/libs/libexec/syscheck.sh: sudo: not found Installation completed successfully. Restarting ./install-server...
I get this on Ubuntu 16.04.01 desktop: ... Preparing to unpack .../python-cairo_1.8.8-2_amd64.deb ... Unpacking python-cairo (1.8.8-2) ... Selecting previously unselected package python-gobject-2. Preparing to unpack .../python-gobject-2_2.28.6-12ubuntu1_amd64.deb ... Unpacking python-gobject-2 (2.28.6-12ubuntu1) ... Selecting previously unselected package python-gtk2. Preparing to unpack .../python-gtk2_2.24.0-4ubuntu1_amd64.deb ... Unpacking python-gtk2 (2.24.0-4ubuntu1) ... Processing triggers for libc-bin (2.23-0ubuntu3) ... Setting up python-cairo (1.8.8-2) ... Setting up python-gobject-2 (2.28.6-12ubuntu1) ... Setting up python-gtk2 (2.24.0-4ubuntu1) ... Processing triggers for libc-bin (2.23-0ubuntu3) ... bash: line 3: local: can only be used in a function bash: line 5: [: -ne: unary operator expected Installation completed successfully. Please restart ./install-server to continue. Press Enter to close this terminal...
(In reply to comment #56) > I get this on Ubuntu 16.04.01 desktop: > > ... > bash: line 3: local: can only be used in a function > > bash: line 5: [: -ne: unary operator expected Verified that I get this when trying to run install-server on Ubuntu 16.04 using 4.7.0beta1 and that it is fixed with build 5252. I think the experience of installing ThinLinc 4.7.0 on Ubuntu 16.04 is really nice!