From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2438 Path: news.gmane.org!.POSTED!not-for-mail From: Guillermo Newsgroups: gmane.comp.sysutils.supervision.general Subject: nosh: User-space virtual terminal test and questions Date: Sat, 5 Jan 2019 17:59:39 -0300 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1546721863 26283 195.159.176.226 (5 Jan 2019 20:57:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 5 Jan 2019 20:57:43 +0000 (UTC) To: Supervision Original-X-From: supervision-return-2028-gcsg-supervision=m.gmane.org@list.skarnet.org Sat Jan 05 21:57:39 2019 Return-path: Envelope-to: gcsg-supervision@m.gmane.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1gft0k-0006kn-Jo for gcsg-supervision@m.gmane.org; Sat, 05 Jan 2019 21:57:38 +0100 Original-Received: (qmail 31159 invoked by uid 89); 5 Jan 2019 21:00:16 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 31152 invoked from network); 5 Jan 2019 21:00:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=kvNnLvHbaqN5+uMUzDs5met2LsR7ts0vLckyelFgfvY=; b=qHU9CKYD6KF7euTFj9YcjwZ1ONTIPRL7hgvCOrSy4m1nV5w8DS1FhaZqHeIrwNdekp w+D+LAV8jvFt85+UKFICPkbygmXDKawsCKccQnoIMHnBIOZl7Q3D1G6BuqR2xbdsUWFN RnpqJveqpPFuC4VHzBK2l2CIc8+rvuQSYbxKFX7KsLwunDkLf1XtYCqIV0VPS5zyQQ7/ iGwoUEauZ4lgVDsdJXVWQGH6pgp1lMn3rNZmX8JLEFP+WJutNvWo39YvnwAiidI6+G4W jS5tjdcGRaUBmO8OY1IFwxiA43kc8ibyP1VkogHDQHeabmnl2nzLReRWHOCR8SKGhVDu fExQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=kvNnLvHbaqN5+uMUzDs5met2LsR7ts0vLckyelFgfvY=; b=OYTfWVF8EOdJcgTN6t5eUuXzPgCE0vwhlbnkrgR45zhjQZGBiC8w8DGkzM3qdcJgy3 1TRvw7WSlXVob9JDFR+kYWCVuwIFehdFBP8dG8lAWsVXGYJqA2hnLjj60+9S4xFY0mDt 05Ny1cKoYQeLnNUEUDtF+DQJZs/jLhfFj6qBO5LuQvioECu2/tWM/ifP0okxXxDklZw9 lkOowg6MeO74jpBicL3ySiE/tZ35pBXs00amyTZtqr1aEFDUU/NpgIkATKfT4A/u43M1 zNG8Zj0IEmiaRmdvfFYgGh6CFr29PWgGFabCVJZlRSmGBWO9cYTADko5Dt59zFr89Z6B /Prg== X-Gm-Message-State: AJcUukfky5b0JRblxCZgqj79rb7P9/q7Zd8ACgSamdYjHNnEgSt/EYFg axc+OuQa+gE/97gitF0pB0J4QR+D5Dmp3pcTke2wtg== X-Google-Smtp-Source: ALg8bN5Z4SquPc2MZwKrIjNTRj0nRKaXONmmznNDER0Fo4FAWpiqlOSxDiq4I/Vq0Hbdado8D0cr911dOSeqyaztAjg= X-Received: by 2002:a6b:c005:: with SMTP id q5mr36843830iof.225.1546721987654; Sat, 05 Jan 2019 12:59:47 -0800 (PST) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2438 Archived-At: Hello, So, I've gotten around to testing user-space VTs with nosh tools on Gentoo, as described in the nosh Guide. Mostly console-fb-realizer, but I also tested console-termio-realizer on a kernel VT for comparison. This was in a VirtualBox VM, so there were two framebuffer devices available: the one provided by the VirtualBox Guest Additions 'vboxvideo' kernel module (vboxdrmfb), and the kernel's VESA framebuffer device (vesafb). The combination of vboxvideo with console-fb-realizer was explosive, I got a (guest) kernel panic. But console-fb-realizer with the VESA framebuffer device worked, as did console-termio-realizer. "Worked" meaning that I could log in and get an interactive shell using the user-space VT. For ease of troubleshooting I wanted a minimal setup instead of the full-blown one of nosh-bundles and the external formats import subsystem. I left the Gentoo standard agetty processes on /dev/tty1 to /dev/tty6 alone, and had console-fb-realizer or console-termio-realizer take /dev/tty8, and communicate directly with console-terminal-emulator via /run/dev/vc1, with neither a multiplexor (at first) nor an input method front-end processor. I also set up the customary TUI login service using vc-get-tty and open-controlling-tty, and managed to deal with the BSDness of the requirements on font and keyboard map files with the help of FreeBSD's SVN repository :) So now the questions: 1) What is the proper way (if any) to switch between kernel VTs and user-space VTs? What I found out: * console-multiplexor-control with a numeric command and the active kernel VT, or just 'tty', as the vtname, could switch to a different kernel VT, just like Alt + function key. * console-multiplexor-control with an '8' command and the active kernel VT, or just 'tty', as the vtname, and Alt + F8, could both switch to to the user-space VT, with both realizers. * With console-termio-realizer, Alt + F1 in the user-space VT could switch back to the first kernel VT, but I expected that it would likely work, given that this arrangement is a terminal realized on another terminal. * With console-fb-realizer, Alt + F1 did nothing but print "WARNING: Unknown input message" on /dev/console. The messages were probably coming from console-terminal-emulator, as I supposed (and tested later) that this is designed to switch from a user-space VT to *another* user-space VT, if console-fb-realizer is communicating with a console-multiplexor process. So that left 'console-multiplexor-control 0@tty1', which did switch to the first kernel VT... but only if run as root. Looking more closely, it seems that when a kernel VT is specified as the vtname, console-multiplexor-control is just a wrapper around an ioctl() call with a VT_ACTIVATE command, which apparently works on Linux for an unprivileged process if the VT is its controlling terminal. And for a user-space VT it isn't, just like it isn't either for an X11 terminal like rxvt-unicode. So, is there an alternative to console-multiplexor-control as root? 2) Key combinations with Alt (e.g. Alt + f or Alt + b to move forward or backward one word on Bash) did not work with neither console-fb-realizer nor console-termio-realizer. Any idea why, or does this just happen to me? 3) More strangely, Ctrl + x (e.g. to exit from GNU nano) did not work with console-termio-realizer, but did with console-fb-realizer. Other key combinations with Ctrl worked fine. Any idea why, or does this just happen to me? 4) With console-termio-realizer, green is blue and blue is green :D Not with console-fb-realizer, though. Any idea why, or does this just happen to me? Thanks, G.