"Después del juego es antes del juego"
Sepp Herberger

sábado, 5 de septiembre de 2015

Reaprovechando Thinclients HP5710 (Parte 3 y última)

Nuestro problema inicial para instalar Debian Squeeze es que el disco flash del aparato solo tiene 512Mb, ni un mísero Gigabyte. Cualquier distribución de los últimos años necesita mucho mas simplemente para una instalación básica.

Para intentarlo optamos por elegir la imagen netinst de Debian, ya que es la que menos ocupa (135-175Mb la ISO), a ver si hay suerte. La grabamos en un pendrive como hicimos con DSL, arrancamos e iniciamos la instalación, instalando todo mas pelado que en un Estado neoliberal: sin X y sin servidores de ningún tipo, nosotros luego iremos metiendo los paquetes según vayan haciendo falta. Cuando nos pregunta el nombre de equipo, yo lo he llamado "thinclient", aunque si hacemos una instalación múltiple habría que numerarlo.

Despues de instalar, verificamos que cabe en el disco duro y reiniciamos para arrancar. Siguiendo las instrucciones de aquí hacemos más hueco, borrando además /usr/lib/doc y /usr/lib/man (ocupan espacio y no los vamos a usar). Despues de eso instalamos xserver-xorg  y x2goclient (este último desde backports) junto con sus paquetes dependientes y tachán... compruebo cabe todo y hasta sobra un poquitín:


/dev/sda1               467449    410406     32105  93% /

El kernel usado es:

root@thinclient:~# cat /proc/version 
Linux version 2.6.32-5-486 (Debian 2.6.32-48squeeze6) (jmm@debian.org) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 Tue May 13 16:15:32 UTC 2014


Los paquetes que nos han quedado en esta instalación mínima para ejecutar x2goclient son:

root@thinclient:~# dpkg -l 
Deseado=Desconocido/Instalar/Eliminar/Purgar/Retener
| Estado=No/Instalado/Config-files/Desempaquetado/Medio-conf/Medio-inst/espera-disparo/pendiente-disparo
|/ Err?=(ninguno)/Requiere-reinst (Estado,Err: mayúsc.=malo)
||/ Nombre                          Versión                        Descripción
+++-===============================-===============================-==============================================================================
ii  acpi                            1.5-2                           displays information on ACPI devices
ii  acpi-support-base               0.137-5                         scripts for handling base ACPI events such as the power button
ii  acpid                           1:2.0.7-1squeeze4               Advanced Configuration and Power Interface event daemon
ii  adduser                         3.112+nmu2                      add and remove users and groups
ii  apt                             0.8.10.3+squeeze1               Advanced front-end for dpkg
ii  apt-utils                       0.8.10.3+squeeze1               APT utility programs
ii  aptitude                        0.6.3-3.2+squeeze1              terminal-based package manager (terminal interface only)
ii  aspell                          0.60.6-4                        GNU Aspell spell-checker
ii  aspell-es                       1.10-9                          Spanish dictionary for aspell
ii  base-files                      6.0squeeze10                    Debian base system miscellaneous files
ii  base-passwd                     3.5.22                          Debian base system master password and group files
ii  bash                            4.1-3                           The GNU Bourne Again SHell
ii  bsdmainutils                    8.0.13                          collection of more utilities from FreeBSD
ii  bsdutils                        1:2.17.2-9                      Basic utilities from 4.4BSD-Lite
ii  busybox                         1:1.17.1-8                      Tiny utilities for small and embedded systems
ii  console-setup                   1.68+squeeze2                   console font and keymap setup program
ii  console-terminus                4.30-2                          Fixed-width fonts for fast reading on the Linux console
ii  coreutils                       8.5-1                           GNU core utilities
ii  cpio                            2.11-4                          GNU cpio -- a program to manage archives of files
ii  cron                            3.0pl1-116                      process scheduling daemon
ii  dash                            0.5.5.1-7.4                     POSIX-compliant shell
ii  debconf                         1.5.36.1                        Debian configuration management system
ii  debconf-i18n                    1.5.36.1                        full internationalization support for debconf
ii  debian-archive-keyring          2010.08.28+squeeze1             GnuPG archive keys of the Debian archive
ii  debian-reference-common         2.46                            Debian system administration guide, common files
ii  debian-reference-en             2.46                            Debian system administration guide, English original
ii  debian-reference-es             2.46                            Debian system administration guide, Spanish translation
ii  debianutils                     3.4                             Miscellaneous utilities specific to Debian
ii  dictionaries-common             1.5.17                          Common utilities for spelling dictionary tools
ii  diffutils                       1:3.0-1                         File comparison utilities
ii  discover                        2.1.2-5                         hardware identification system
ii  discover-data                   2.2010.10.18                    Data lists for Discover hardware detection system
ii  dmidecode                       2.9-1.2                         Dump Desktop Management Interface data
ii  dmsetup                         2:1.02.48-5                     The Linux Kernel Device Mapper userspace library
ii  doc-debian-es                   2.6                             Debian FAQ translated to Spanish
ii  dpkg                            1.15.11                         Debian package management system
ii  e2fslibs                        1.41.12-4stable1                ext2/ext3/ext4 file system libraries
ii  e2fsprogs                       1.41.12-4stable1                ext2/ext3/ext4 file system utilities
ii  findutils                       4.4.2-1+b1                      utilities for finding files--find, xargs
ii  fontconfig                      2.8.0-2.1                       generic font configuration library - support binaries
ii  fontconfig-config               2.8.0-2.1                       generic font configuration library - configuration
ii  gcc-4.4-base                    4.4.5-8                         The GNU Compiler Collection (base package)
ii  gettext-base                    0.18.1.1-3                      GNU Internationalization utilities for the base system
ii  gnupg                           1.4.10-4+squeeze4               GNU privacy guard - a free PGP replacement
ii  gpgv                            1.4.10-4+squeeze4               GNU privacy guard - signature verification tool
ii  grep                            2.6.3-3+squeeze1                GNU grep, egrep and fgrep
ii  groff-base                      1.20.1-10                       GNU troff text-formatting system (base system components)
ii  grub-common                     1.98+20100804-14+squeeze1       GRand Unified Bootloader, version 2 (common files)
ii  grub-pc                         1.98+20100804-14+squeeze1       GRand Unified Bootloader, version 2 (PC/BIOS version)
ii  gzip                            1.3.12-9+squeeze1               GNU compression utilities
ii  hostname                        3.04                            utility to set/show the host name or domain name
ii  hwinfo                          16.0-2                          Hardware identification system
ii  ifupdown                        0.6.10                          high level tools to configure network interfaces
ii  info                            4.13a.dfsg.1-6                  Standalone GNU Info documentation browser
ii  initramfs-tools                 0.98.8                          tools for generating an initramfs
ii  initscripts                     2.88dsf-13.1+squeeze1           scripts for initializing and shutting down the system
ii  insserv                         1.14.0-2                        Tool to organize boot sequence using LSB init.d script dependencies
ii  install-info                    4.13a.dfsg.1-6                  Manage installed documentation in info format
ii  installation-report             2.44                            system installation report
ii  iproute                         20100519-3                      networking and traffic control tools
ii  iptables                        1.4.8-3                         administration tools for packet filtering and NAT
ii  iputils-ping                    3:20100418-3                    Tools to test the reachability of network hosts
ii  isc-dhcp-client                 4.1.1-P1-15+squeeze8            ISC DHCP client
ii  isc-dhcp-common                 4.1.1-P1-15+squeeze8            common files used by all the isc-dhcp* packages
ii  ispanish                        1.10-9                          Spanish dictionary for ispell
ii  ispell                          3.1.20.0-7                      International Ispell (an interactive spelling corrector)
ii  jwm                             2.0.1-3                         Very small lightweight pure X11 window manager with tray and menus
ii  kbd                             1.15.2-2                        Linux console font and keytable utilities
ii  keyboard-configuration          1.68+squeeze2                   system-wide keyboard preferences
ii  klibc-utils                     1.5.20-1+squeeze1               small utilities built with klibc for early boot
ii  laptop-detect                   0.13.7                          attempt to detect a laptop
ii  libacl1                         2.2.49-4                        Access control list shared library
ii  libaspell15                     0.60.6-4                        GNU Aspell spell-checker runtime library
ii  libattr1                        1:2.4.44-2                      Extended attribute shared library
ii  libaudio2                       1.9.2-4squeeze1                 Network Audio System - shared libraries
ii  libaudit0                       1.7.13-1+b2                     Dynamic library for security auditing
ii  libavahi-client3                0.6.27-2+squeeze1               Avahi client library
ii  libavahi-common-data            0.6.27-2+squeeze1               Avahi common data files
ii  libavahi-common3                0.6.27-2+squeeze1               Avahi common library
ii  libblkid1                       2.17.2-9                        block device id library
ii  libboost-iostreams1.42.0        1.42.0-4                        Boost.Iostreams Library
ii  libbsd0                         0.2.0-1                         utility functions from BSD systems - shared library
ii  libbz2-1.0                      1.0.5-6+squeeze1                high-quality block-sorting file compressor library - runtime
ii  libc-bin                        2.11.3-4                        Embedded GNU C Library: Binaries
ii  libc6                           2.11.3-4                        Embedded GNU C Library: Shared libraries
ii  libcomerr2                      1.41.12-4stable1                common error description library
ii  libcups2                        1.4.4-7+squeeze5                Common UNIX Printing System(tm) - Core library
ii  libcwidget3                     0.5.16-3                        high-level terminal interface library for C++ (runtime files)
ii  libdb4.8                        4.8.30-2                        Berkeley v4.8 Database Libraries [runtime]
ii  libdbus-1-3                     1.2.24-4+squeeze2               simple interprocess messaging system
ii  libdevmapper1.02.1              2:1.02.48-5                     The Linux Kernel Device Mapper userspace library
ii  libdiscover2                    2.1.2-5                         hardware identification library
rc  libdrm-intel1                   2.4.21-1~squeeze3               Userspace interface to intel-specific kernel DRM services -- runtime
rc  libdrm-radeon1                  2.4.21-1~squeeze3               Userspace interface to radeon-specific kernel DRM services -- runtime
ii  libdrm2                         2.4.21-1~squeeze3               Userspace interface to kernel DRM services -- runtime
ii  libedit2                        2.11-20080614-2                 BSD editline and history libraries
ii  libept1                         1.0.4                           High-level library for managing Debian package information
ii  libexpat1                       2.0.1-7+squeeze1                XML parsing C library - runtime library
ii  libfontconfig1                  2.8.0-2.1                       generic font configuration library - runtime
ii  libfontenc1                     1:1.0.5-2                       X11 font encoding library
ii  libfreetype6                    2.4.2-2.1+squeeze4              FreeType 2 font engine, shared library files
ii  libfribidi0                     0.19.2-1                        Free Implementation of the Unicode BiDi algorithm
ii  libgcc1                         1:4.4.5-8                       GCC support library
ii  libgcrypt11                     1.4.5-2+squeeze1                LGPL Crypto library - runtime library
ii  libgdbm3                        1.8.3-9                         GNU dbm database routines (runtime version)
ii  libglib2.0-0                    2.24.2-1                        The GLib library of C routines
ii  libgnutls26                     2.8.6-1+squeeze3                the GNU TLS library - runtime library
ii  libgpg-error0                   1.6-1                           library for common error values and messages in GnuPG components
ii  libgssapi-krb5-2                1.8.3+dfsg-4squeeze7            MIT Kerberos runtime libraries - krb5 GSS-API Mechanism
ii  libhal1                         0.5.14-3                        Hardware Abstraction Layer - shared library
ii  libhd16                         16.0-2                          Hardware identification system library
ii  libice6                         2:1.0.6-2                       X11 Inter-Client Exchange library
ii  libjpeg62                       6b1-1                           The Independent JPEG Group's JPEG runtime library (version 6.2)
ii  libk5crypto3                    1.8.3+dfsg-4squeeze7            MIT Kerberos runtime libraries - Crypto Library
ii  libkeyutils1                    1.4-1                           Linux Key Management Utilities (library)
ii  libklibc                        1.5.20-1+squeeze1               minimal libc subset for use with initramfs
ii  libkrb5-3                       1.8.3+dfsg-4squeeze7            MIT Kerberos runtime libraries
ii  libkrb5support0                 1.8.3+dfsg-4squeeze7            MIT Kerberos runtime libraries - Support library
ii  liblcms1                        1.18.dfsg-1.2+b3                Color management library
ii  libldap-2.4-2                   2.4.23-7.3                      OpenLDAP libraries
ii  liblocale-gettext-perl          1.05-6                          Using libc functions for internationalization in Perl
ii  liblzma2                        5.0.0-2                         XZ-format compression library
ii  libmng1                         1.0.10-1+b1                     Multiple-image Network Graphics library
ii  libncurses5                     5.7+20100313-5                  shared libraries for terminal handling
ii  libncursesw5                    5.7+20100313-5                  shared libraries for terminal handling (wide character support)
ii  libnewt0.52                     0.52.11-1                       Not Erik's Windowing Toolkit - text mode windowing with slang
ii  libnfnetlink0                   1.0.0-1                         Netfilter netlink library
ii  libpam-modules                  1.1.1-6.1+squeeze1              Pluggable Authentication Modules for PAM
ii  libpam-runtime                  1.1.1-6.1+squeeze1              Runtime support for the PAM library
ii  libpam0g                        1.1.1-6.1+squeeze1              Pluggable Authentication Modules library
ii  libpci3                         1:3.1.7-6                       Linux PCI Utilities (shared library)
ii  libpciaccess0                   0.12.0-1                        Generic PCI access library for X
ii  libpcre3                        8.02-1.1                        Perl 5 Compatible Regular Expression Library - runtime files
ii  libpixman-1-0                   0.16.4-1+deb6u1                 pixel-manipulation library for X and cairo
ii  libpng12-0                      1.2.44-1+squeeze4               PNG library - runtime
ii  libpopt0                        1.16-1                          lib for parsing cmdline parameters
ii  libqt4-network                  4:4.6.3-4+squeeze1              Qt 4 network module
ii  libqt4-svg                      4:4.6.3-4+squeeze1              Qt 4 SVG module
ii  libqtcore4                      4:4.6.3-4+squeeze1              Qt 4 core module
ii  libqtgui4                       4:4.6.3-4+squeeze1              Qt 4 GUI module
ii  libreadline6                    6.1-3                           GNU readline and history libraries, run-time libraries
ii  libsasl2-2                      2.1.23.dfsg1-7                  Cyrus SASL - authentication abstraction library
ii  libselinux1                     2.0.96-1                        SELinux runtime shared libraries
ii  libsepol1                       2.0.41-1                        SELinux library for manipulating binary security policies
ii  libsigc++-2.0-0c2a              2.2.4.2-1                       type-safe Signal Framework for C++ - runtime
ii  libslang2                       2.2.2-4                         The S-Lang programming library - runtime version
ii  libsm6                          2:1.1.1-1                       X11 Session Management library
ii  libsqlite3-0                    3.7.3-1                         SQLite 3 shared library
ii  libss2                          1.41.12-4stable1                command-line interface parsing library
ii  libssh-4                        0.5.3-1~bpo60+1                 tiny C SSH library
ii  libssl0.9.8                     0.9.8o-4squeeze14               SSL shared libraries
ii  libstdc++6                      4.4.5-8                         The GNU Standard C++ Library v3
ii  libtasn1-3                      2.7-1+squeeze+1                 Manage ASN.1 structures (runtime)
ii  libtext-charwidth-perl          0.04-6                          get display widths of characters on the terminal
ii  libtext-iconv-perl              1.7-2                           converts between character sets in Perl
ii  libtext-wrapi18n-perl           0.06-7                          internationalized substitute of Text::Wrap
ii  libtiff4                        3.9.4-5+squeeze10               Tag Image File Format (TIFF) library
ii  libudev0                        164-3                           libudev shared library
ii  libusb-0.1-4                    2:0.1.12-16                     userspace USB programming library
ii  libutempter0                    1.1.5-3                         A privileged helper for utmp/wtmp updates (runtime)
ii  libuuid-perl                    0.02-4                          Perl extension for using UUID interfaces as defined in e2fsprogs
ii  libuuid1                        2.17.2-9                        Universally Unique ID library
ii  libwrap0                        7.6.q-19                        Wietse Venema's TCP wrappers library
ii  libx11-6                        2:1.3.3-4+squeeze1              X11 client-side library
ii  libx11-data                     2:1.3.3-4+squeeze1              X11 client-side library
ii  libxapian22                     1.2.3-2                         Search engine library
ii  libxau6                         1:1.0.6-1                       X11 authorisation library
ii  libxaw7                         2:1.0.7-1                       X11 Athena Widget library
ii  libxcb1                         1.6-1+squeeze1                  X C Binding
ii  libxcomp3                       3.2.0-7-1.1+b1                  NX X compression library
ii  libxdmcp6                       1:1.0.3-2                       X11 Display Manager Control Protocol library
ii  libxext6                        2:1.1.2-1+squeeze1              X11 miscellaneous extension library
ii  libxfont1                       1:1.4.1-5                       X11 font rasterisation library
ii  libxft2                         2.1.14-2                        FreeType-based font drawing library for X
ii  libxi6                          2:1.3-8                         X11 Input extension library
ii  libxinerama1                    2:1.1-3+squeeze1                X11 Xinerama extension library
ii  libxkbfile1                     1:1.0.6-2                       X11 keyboard file manipulation library
ii  libxmu6                         2:1.0.5-2                       X11 miscellaneous utility library
ii  libxmuu1                        2:1.0.5-2                       X11 miscellaneous micro-utility library
ii  libxpm4                         1:3.5.8-1                       X11 pixmap library
ii  libxrender1                     1:0.9.6-1+squeeze1              X Rendering Extension client library
ii  libxt6                          1:1.0.7-1+squeeze1              X11 toolkit intrinsics library
ii  linux-base                      2.6.32-48squeeze6               Linux image base package
ii  linux-image-2.6-486             2.6.32+29                       Linux 2.6 for old PCs (meta-package)
ii  linux-image-2.6.32-5-486        2.6.32-48squeeze6               Linux 2.6.32 for old PCs
ii  locales                         2.11.3-4                        Embedded GNU C Library: National Language (locale) data [support]
ii  login                           1:4.1.4.2+svn3283-2+squeeze1    system login tools
ii  logrotate                       3.7.8-6                         Log rotation utility
ii  lsb-base                        3.2-23.2squeeze1                Linux Standard Base 3.2 init script functionality
ii  man-db                          2.5.7-8                         on-line manual pager
ii  manpages                        3.27-1                          Manual pages about using a GNU/Linux system
ii  manpages-es                     1.55-9                          Spanish man pages
ii  mawk                            1.3.3-15                        a pattern scanning and text processing language
ii  module-init-tools               3.12-2+b1                       tools for managing Linux kernel modules
ii  mount                           2.17.2-9                        Tools for mounting and manipulating filesystems
ii  nano                            2.2.4-1                         small, friendly text editor inspired by Pico
ii  ncurses-base                    5.7+20100313-5                  basic terminal type definitions
ii  ncurses-bin                     5.7+20100313-5                  terminal-related programs and man pages
ii  net-tools                       1.60-23                         The NET-3 networking toolkit
ii  netbase                         4.45                            Basic TCP/IP networking system
ii  netcat-traditional              1.10-38                         TCP/IP swiss army knife
ii  nxproxy                         3.2.0-1-1                       NX X compression library
ii  openssh-blacklist               0.4.1                           list of default blacklisted OpenSSH RSA and DSA keys
ii  openssh-blacklist-extra         0.4.1                           list of non-default blacklisted OpenSSH RSA and DSA keys
ii  openssh-client                  1:5.5p1-6+squeeze5              secure shell (SSH) client, for secure access to remote machines
ii  openssh-server                  1:5.5p1-6+squeeze5              secure shell (SSH) server, for secure access from remote machines
ii  os-prober                       1.42                            utility to detect other OSes on a set of drives
ii  passwd                          1:4.1.4.2+svn3283-2+squeeze1    change and administer password and group data
ii  pciutils                        1:3.1.7-6                       Linux PCI Utilities
ii  perl-base                       5.10.1-17squeeze6               minimal Perl system
ii  procps                          1:3.2.8-9squeeze1               /proc file system utilities
ii  readline-common                 6.1-3                           GNU readline and history libraries, common files
ii  rsyslog                         4.6.4-2                         enhanced multi-threaded syslogd
ii  sed                             4.2.1-7                         The GNU sed stream editor
ii  sensible-utils                  0.0.4                           Utilities for sensible alternative selection
ii  sysv-rc                         2.88dsf-13.1+squeeze1           System-V-like runlevel change mechanism
ii  sysvinit                        2.88dsf-13.1+squeeze1           System-V-like init utilities
ii  sysvinit-utils                  2.88dsf-13.1+squeeze1           System-V-like utilities
ii  tar                             1.23-3                          GNU version of the tar archiving utility
ii  tasksel                         2.88                            Tool for selecting tasks for installation on Debian systems
ii  tasksel-data                    2.88                            Official tasks used for installation of Debian systems
ii  tcpd                            7.6.q-19                        Wietse Venema's TCP wrapper utilities
ii  traceroute                      1:2.0.15-1                      Traces the route taken by packets over an IPv4/IPv6 network
ii  ttf-dejavu-core                 2.31-1                          Vera font family derivate with additional characters
ii  tzdata                          2014e-0squeeze1                 time zone and daylight-saving time data
ii  ucf                             3.0025+nmu1                     Update Configuration File: preserve user changes to config files.
ii  udev                            164-3                           /dev/ and hotplug management daemon
ii  usbutils                        0.87-5squeeze1                  Linux USB utilities
ii  util-linux                      2.17.2-9                        Miscellaneous system utilities
ii  util-linux-locales              2.17.2-9                        Locales files for util-linux
ii  vim-common                      2:7.2.445+hg~cb94c42c0e1a-1     Vi IMproved - Common files
ii  vim-tiny                        2:7.2.445+hg~cb94c42c0e1a-1     Vi IMproved - enhanced vi editor - compact version
ii  wget                            1.12-2.1                        retrieves files from the web
ii  whiptail                        0.52.11-1                       Displays user-friendly dialog boxes from shell scripts
ii  wspanish                        1.0.25                          The Spanish dictionary words for /usr/share/dict
ii  x11-common                      1:7.5+8+squeeze1                X Window System (X.Org) infrastructure
ii  x11-xkb-utils                   7.5+5                           X11 XKB utilities
ii  x2goclient                      3.99.2.1-5~bpo60+1              X2Go Client application (Qt4)
ii  xauth                           1:1.0.4-1                       X authentication utility
ii  xbitmaps                        1.1.0-1                         Base X bitmaps
ii  xfonts-base                     1:1.0.1                         standard fonts for X
ii  xfonts-encodings                1:1.0.3-1                       Encodings for X.Org fonts
ii  xfonts-utils                    1:7.5+2                         X Window System font utility programs
ii  xinit                           1.2.0-2                         X server initialisation tool
ii  xkb-data                        1.8-2                           X Keyboard Extension (XKB) configuration data
ii  xserver-common                  2:1.7.7-18                      common files used by various X servers
ii  xserver-xorg                    1:7.5+8+squeeze1                the X.Org X server
ii  xserver-xorg-core               2:1.7.7-18                      Xorg X server - core server
ii  xserver-xorg-input-all          1:7.5+8+squeeze1                the X.Org X server -- input driver metapackage
ii  xserver-xorg-input-evdev        1:2.3.2-6                       X.Org X server -- evdev input driver
ii  xserver-xorg-input-kbd          1:1.4.0-2                       X.Org X server -- keyboard input driver
ii  xserver-xorg-input-mouse        1:1.5.0-2                       X.Org X server -- mouse input driver
ii  xserver-xorg-input-synaptics    1.2.2-2                         Synaptics TouchPad driver for X.Org server
ii  xserver-xorg-input-wacom        0.10.5+20100416-1               X.Org X server -- Wacom input driver
ii  xserver-xorg-video-vesa         1:2.3.0-3                       X.Org X server -- VESA display driver
ii  xterm                           261-1                           X terminal emulator
ii  xz-utils                        5.0.0-2                         XZ-format compression utilities
ii  zlib1g                          1:1.2.3.4.dfsg-3                compression library - runtime

Como se ve, es lo menos que podemos tener para que funcione todo bien.

Después de esto creamos un usuario "thinclient" con contraseña "thinclient", que será el que se usará para hacer login. Nos interesa que por facilidad se haga login automaticamente, pero no tenemos Display Manager (ni falta que hace), así que lo modificamos /etc/inittab para hacer autologin en consola:

.....
#1:2345:respawn:/sbin/getty 38400 tty1
#Para el autologin:

1:2345:respawn:/bin/login -f thinclient tty1 </dev/tty1 >/dev/tty1 2>&1
.......

Además también nos viene bien que se ejecuten automáticamente las X para entrar en el entorno gráfico, para ello editamos .bash_profile en /home/thinclient y añadimos:

.......
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
    startx
fi
.......

Si se ve la lista de paquetes comprobaremos que no tenemos ningún escritorio ni gestor de ventanas: ni XFCE, ni  KDE, ni LXDE, nada de nada. Nuestro objetivo es ejecutar x2goclient a pantalla completa para conectar con nuestro servidor. Eso se logra editando /etc/X11/xinit/xinitrc para que quede así:

#!/bin/sh
# /etc/X11/xinit/xinitrc
#
# global xinitrc file, used by all X sessions started by xinit (startx)

# invoke global X session script
#/usr/bin/jwm & #no hace falta gestor de ventanas
#xterm -geometry 80x66+0+0 -name login &

exec /usr/bin/x2goclient --thinclient --session=a99-pro --no-session-edit --add-to-known-hosts --haltbt

# . /etc/X11/Xsession

Este es el script que se ejecuta al arrancar las X y básicamente lo modificamos para que para que se ejecute x2goclient usando una sesión determinada ("a99-pro"), que no será modificable por el usuario, que no preguntará por la aceptación de las claves ssh, que no usara window manager y que presentará un botón para el apagado del thinclient (haltbt). Mas información en la página de manual de x2goclient.

Al cargar el sistema se hará el login automático y se cargarán el entorno gráfico, viéndose en pantalla:


En el home de nuestro usuario debemos incluir la configuración local para el cliente x2go. Como hemos establecido que no se puede editar por el usuario (para evitar que los usuarios lo toquen y lo desconfiguren), lo metemos a mano en este fichero:

root@thinclient:~# cat .x2goclient/sessions 
[20150619092956042]
speed=4
pack=16m-jpeg
quality=9
fstunnel=true
export=
iconvto=UTF-8
iconvfrom=ISO8859-1
useiconv=false
fullscreen=false
width=1024
multidisp=false
display=1
height=768
dpi=96
setdpi=false
xinerama=false
usekbd=true
layout=es
type=pc105/es
sound=true
soundsystem=pulse
startsoundsystem=true
soundtunnel=true
defsndport=true
sndport=4713
print=true
name=a99-pro
icon=:icons/128x128/x2gosession.png
host=a99-pro
user=usuarioprueba
key=
sshport=22
autologin=false
krblogin=false
rootless=false
published=false
applications=WWWBROWSER, MAILCLIENT, OFFICE, TERMINAL
command=/usr/bin/startxfce4
rdpoptions=
rdpserver=
xdmcpserver=localhost

Comentemos: la sesión se llama "a99-pro", por que ese es el nombre del servidor con la parte servidora de x2go al que nos conectaremos. El usuario prefijado es "usuarioprueba", que debe ser un usuario local creado en dicho servidor.  Como gestor de ventanas en la sesión remota usamos XFCE4, aunque puede ponerse cualquier otro.

Si no sabemos como definir todos los parámetros lo mejor es lanzar un cliente x2go a mano permitiendo configurar la sesión desde él. Luego el fichero "sessions" creado será el que usaremos.

Una vez escrita la contraseña se realizará la conexión:


Y una vez completada la conexión se mostrará el escritorio remoto, en este caso una sesión de XFCE completa que correrá a toda velocidad en nuestro thinclient:


Otro fichero que no se muy bien para que vale, pero ahi queda:

root@thinclient:~/.x2goclient# cat sizes 
[mainwindow]
size=@Size(533 400)
pos=@Point(24 24)
maximized=false

Por último, recordemos que al ejecutar el cliente x2go añadimos el parámetro "haltbt". Dicho parámetro añade un botón de apagado a la ventana de inicio de sesión remota de x2go, de forma que el usuario pueda apagar el thinclient desde allí, ya que como hemos dicho el cliente x2go se ejecuta a pantalla completa sin entorno de escritorio, por lo que no hay manera sencilla de apagar el dispositivo.

Dicho botón se puede ver en la siguiente imagen:


Al pulsar el botón de apagado, el cliente x2go lo que hace es crear el fichero "/home/thinclient/.halt", de manera que se notifique al sistema la intención de apagarlo. El apagado lo hacemos con el siguiente script que guardamos en /root/check-halt:

#!/bin/bash

rm -f /home/thinclient/.halt
while true
do 
   #Chequeamos cada 10 segundos la existencia del fichero .halt y en ese caso apagamos. 
   /usr/bin/test -e /home/thinclient/.halt && /sbin/halt
   /bin/sleep 10s
done
exit 0

Para arrancarlo al inicio de todo y quedarlo ejecutando de fondo eternamente ponemos en /etc/rc.local:

......
/root/check-halt &
exit 0

Una vez modificados /root/check-halt y /etc/rc.local ya tenemos todo preparado para funcionar.

Aparte de hacerlo para nuestro thinclient todo esto podemos hacerlo en general si en casa o en cualquier otro sitio tenemos un ordenador potente, que haría de servidor x2go y uno o varios PC mas modestos que queremos aprovechar como clientes.

Bueno, una vez funcionando todo ya tenemos posibilidad de montar un aula para ofimática con varios thinclients y un servidor medianamente potente. Misión cumplida.

Antes de finalizar comentaremos tres cosas mas:

Driver de vídeo radeon.

El driver que hemos usado para las X es el driver "vesa", pero la tarjeta gráfica es ATI Radeon RV100 QY [Radeon 7000/VE], asi que lo  mas adecuado es instalar el driver correcto:

# apt-get install xserver-xorg-video-radeon

Este paquete y sus dependencias siguen cabiendo en el disco (no olvidemos eso cada vez que instalemos algo). Ahora tenemos que configurar el /etc/X11/xorg.conf por defecto:

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
    ModulePath   "/usr/lib/xorg/modules"
    FontPath     "/usr/share/fonts/X11/misc"
    FontPath     "/usr/share/fonts/X11/cyrillic"
    FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
    FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
    FontPath     "/usr/share/fonts/X11/Type1"
    FontPath     "/usr/share/fonts/X11/100dpi"
    FontPath     "/usr/share/fonts/X11/75dpi"
    FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
    FontPath     "built-ins"
EndSection

Section "Module"
    Load  "dri"
    Load  "glx"
    Load  "dbe"
    Load  "record"
    Load  "extmod"
    Load  "dri2"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "kbd"
EndSection

Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
    Option        "Protocol" "auto"
    Option        "Device" "/dev/input/mice"
    Option        "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
    #DisplaySize      410   230    # mm
    Identifier   "Monitor0"
    VendorName   "GSM"
    ModelName    "E1911"
    HorizSync    30.0 - 61.0
    VertRefresh  56.0 - 75.0
    Option        "DPMS"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"                # [<bool>]
        #Option     "SWcursor"               # [<bool>]
        #Option     "Dac6Bit"                # [<bool>]
        #Option     "Dac8Bit"                # [<bool>]
        #Option     "BusType"                # [<str>]
        #Option     "CPPIOMode"              # [<bool>]
        #Option     "CPusecTimeout"          # <i>
        #Option     "AGPMode"                # <i>
        #Option     "AGPFastWrite"           # [<bool>]
        #Option     "AGPSize"                # <i>
        #Option     "GARTSize"               # <i>
        #Option     "RingSize"               # <i>
        #Option     "BufferSize"             # <i>
        #Option     "EnableDepthMoves"       # [<bool>]
        #Option     "EnablePageFlip"         # [<bool>]
        #Option     "NoBackBuffer"           # [<bool>]
        #Option     "DMAForXv"               # [<bool>]
        #Option     "FBTexPercent"           # <i>
        #Option     "DepthBits"              # <i>
        #Option     "PCIAPERSize"            # <i>
        #Option     "AccelDFS"               # [<bool>]
        #Option     "IgnoreEDID"             # [<bool>]
        #Option     "CustomEDID"             # [<str>]
        #Option     "DisplayPriority"        # [<str>]
        #Option     "PanelSize"              # [<str>]
        #Option     "ForceMinDotClock"       # <freq>
        #Option     "ColorTiling"            # [<bool>]
        #Option     "VideoKey"               # <i>
        #Option     "RageTheatreCrystal"     # <i>
        #Option     "RageTheatreTunerPort"     # <i>
        #Option     "RageTheatreCompositePort"     # <i>
        #Option     "RageTheatreSVideoPort"     # <i>
        #Option     "TunerType"              # <i>
        #Option     "RageTheatreMicrocPath"     # <str>
        #Option     "RageTheatreMicrocType"     # <str>
        #Option     "ScalerWidth"            # <i>
        #Option     "RenderAccel"            # [<bool>]
        #Option     "SubPixelOrder"          # [<str>]
        #Option     "ClockGating"            # [<bool>]
        #Option     "VGAAccess"              # [<bool>]
        #Option     "ReverseDDC"             # [<bool>]
        #Option     "LVDSProbePLL"           # [<bool>]
        #Option     "AccelMethod"            # <str>
        #Option     "DRI"                    # [<bool>]
        #Option     "ConnectorTable"         # <str>
        #Option     "DefaultConnectorTable"     # [<bool>]
        #Option     "DefaultTMDSPLL"         # [<bool>]
        #Option     "TVDACLoadDetect"        # [<bool>]
        #Option     "ForceTVOut"             # [<bool>]
        #Option     "TVStandard"             # <str>
        #Option     "IgnoreLidStatus"        # [<bool>]
        #Option     "DefaultTVDACAdj"        # [<bool>]
        #Option     "Int10"                  # [<bool>]
        #Option     "EXAVSync"               # [<bool>]
        #Option     "ATOMTVOut"              # [<bool>]
        #Option     "R4xxATOM"               # [<bool>]
        #Option     "ForceLowPowerMode"      # [<bool>]
        #Option     "DynamicPM"              # [<bool>]
        #Option     "NewPLL"                 # [<bool>]
        #Option     "ZaphodHeads"            # <str>
    Identifier  "Card0"
    Driver      "radeon"
    VendorName  "ATI Technologies Inc"
    BoardName   "Radeon RV100 QY [Radeon 7000/VE]"
    BusID       "PCI:0:13:0"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    SubSection "Display"
        Viewport   0 0
        Depth     1
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     4
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     8
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     15
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection

Bueno, tras esto se supone que las X van mas rápidas. No he notado nada especial pero tampoco ha empeorado, haciendo una prueba con glxgears da 15fps, lo cual es mas que suficiente para nuestros fines.

Memorias USB

Un problema de todos los entornos de thinclients es el montaje de dispositivos USB, ya que el escritorio que se ejecuta es remoto y no hay forma sencilla de que detecte que en el cliente se ha conectado una memoria USB. El sistema de x2go es parecido al de rdesktop: no se montan. La solución dada es automontarlos sobre una carpeta determinada (/mnt por ejemplo) y compartir esa carpeta entre el x2go cliente y servidor. En la documentación de x2go viene explicado como hacerlo. Un problema que siempre queda en el aire en estos casos es como realizar un desmontaje seguro: no hay respuestas.

En nuestro caso no he hecho nada ya que no vamos a usar pendrives. Todo se hará con herramientas en la nube.

Sonido en thinclients.

Es posible redirigir el sonido del escritorio remoto desde el servidor al hardware del cliente, ya que x2go lo permite al definir la configuración de la sesión. Para ello hay que instalar y configurar alsa, esd o pulse en el cliente. Como no vamos a reproducir vídeos (por limitaciones de la conexión) ni escuchar música tampoco lo configuro. Además, puede que ese software no quepa en nuestro disco duro.

Bueno, pues podemos decir que misión cumplida. Nos sentaremos a esperar el siguiente embolado.

=========FIN DE LA CITA===========

No hay comentarios:

Publicar un comentario