Skip to content

Console resize and scale settings #2015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mvollmer
Copy link
Member

@mvollmer mvollmer commented Feb 4, 2025

COCKPIT-1243

The Machines application of Cockpit lets people interact with the graphical console of a virtual machine. This is useful for baby sitting a VM through its boot process or doing the occasional rescue work, but it might also be used to do real day-to-day work in a graphical desktop environment that runs in the VM.

The graphical console in Cockpit Machines is fundamentally limited by having to run in a browser. The browser might eat some keys, for example, and serious work might thus require a external viewer application such as GNOME Connections, TigerVNC, or virt-viewer. Nevertheless, we should make Cockpit's own viewer work as well as possible.

Purpose

The purpose of this task is to improve our own VNC viewer by giving the user control over its resizing and scaling behavior. It should be possible to avoid any scaling and get a 1-to-1 pixel perfect view of a remote desktop, and it should be possible to avoid sending resize requests to a remote desktop.


Demo: https://youtu.be/gXrWcJHXn8s

  • consoles: Redesign #2008
  • Design UI controlling the "scaling" and "resizing" knobs of NoVNC
  • Find a clean way to control the size of the NoVNC widget

@mvollmer mvollmer force-pushed the console-resize-scale-settings branch from 9ba55bf to 5c152a3 Compare February 4, 2025 12:36
@mvollmer mvollmer force-pushed the console-resize-scale-settings branch from 10c0001 to 1bde77f Compare February 27, 2025 12:38
@Venefilyn
Copy link
Member

Just checked the new demo and it looks great!

@mvollmer mvollmer force-pushed the console-resize-scale-settings branch from 82c6141 to 2568222 Compare March 20, 2025 15:03
@mvollmer mvollmer force-pushed the console-resize-scale-settings branch from 2568222 to 0d7531b Compare March 20, 2025 15:25
@mvollmer mvollmer self-assigned this Apr 2, 2025
@mvollmer mvollmer changed the title WIP - Console resize and scale settings Console resize and scale settings Apr 2, 2025
@mvollmer mvollmer assigned garrett and unassigned mvollmer Apr 2, 2025
@mvollmer mvollmer force-pushed the console-resize-scale-settings branch from 0d7531b to 47978a9 Compare April 11, 2025 10:28
mvollmer added 2 commits May 26, 2025 14:47
- A ToggleGroup in the Card header is used to switch consoles

- The console switcher is also there for shut-off machines. This gives
  us a place for type-specific actions that also make sense for a
  shut-off machine, like editing VNC server settings.

- The DesktopViewer is gone, but there is a footer with a "Launch
  viewer" button and a "How to connect" popover.

- Actions for the Graphics and Serial consoles are collected into
  kebab menus.

- The expanded console has less UI around it, and it keeps the type
  that was active in the collapsed view. Instead of the breadcrumb it
  has a "Collapse" button.

- When there is no actual console for a given type, there is now a
  EmptyState component where you can enable it.

- It is possible to change VNC server settings via the "How to
  connect" popup.

- The SPICE console invites you to replace it with VNC.

- The size of the expanded console is now always controlled by the
  browser window and never overflows in height.

- The VncConsole has been imported from @patternfly/react-console and
  stripped down.
@mvollmer mvollmer force-pushed the console-resize-scale-settings branch from 47978a9 to 1d2289c Compare May 26, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants