Skip to content
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

How to use alternative to xterm with shell-instead? #679

Open
YellowOnion opened this issue Jul 11, 2024 · 2 comments
Open

How to use alternative to xterm with shell-instead? #679

YellowOnion opened this issue Jul 11, 2024 · 2 comments

Comments

@YellowOnion
Copy link

Sometimes I need to debug a game crashing due to overlays and I pass in PRESSURE_VESSEL_SHELL=instead

xterm is a terrible terminal emulator, with terribly small fonts that are a pain to read on a 1440p monitor, but there's zero documentation on how to change what terminal is used.

I tried passing in PRESSURE_VESSEL_SHELL="alacritty -e" and it didn't launch with xterm or alacritty.

Is there anyway to change it?

@TTimo
Copy link
Collaborator

TTimo commented Jul 11, 2024

You need a terminal that is bundled in the Steam for Linux Runtime that you are using (presumably Sniper). Alacritty is not included for instance.

Apparently an adequate .Xresources in your home folder should allow you to set bigger fonts for xterm.

@smcv
Copy link
Contributor

smcv commented Jul 15, 2024

You can increase xterm font sizes by doing Ctrl+right click+hold, and selecting a larger size from the menu. The ability to get a shell inside the container is a developer easter-egg rather than something that was ever intended to be user-facing or user-friendly: the goal is "just barely good enough to be able to capture a log", and anything beyond that is a bonus.

You need a terminal that is bundled in the Steam for Linux Runtime that you are using

Yes, the way PRESSURE_VESSEL_SHELL=instead normally works is that the entire terminal runs inside the container. It is not possible to run a better terminal emulator from your host system, because that terminal emulator is not in the container and (in general) neither are its dependencies.

We included xterm in the container runtime because it's small enough to not significantly hurt the container runtime's size, well-known enough to not be a support burden in its own right (I was tempted to use something smaller like rxvt, but more people are familiar with xterm), has few enough dependencies that it will often work even if we're using it to debug a serious problem with "larger" shared libraries, and is old enough that it's available to even the oldest Steam Runtime branches (which date from 2012, several years before alacritty existed).

The use of xterm to provide a terminal is hard-coded (non-configurable), and we are unlikely to include a better terminal emulator in the container runtime, because it would fail one of the criteria above.

One way to get an interactive shell that is not an xterm is to run Steam from a terminal emulator (or a ssh session or other terminal environment) with PRESSURE_VESSEL_TERMINAL=tty in the environment, like:

PRESSURE_VESSEL_TERMINAL=tty steam

If you do this, then the shell for PRESSURE_VESSEL_SHELL=instead will appear in the terminal from which you ran Steam, instead of as a separate window. (Again, this is a developer thing rather than a user-facing feature, and might change in a subsequent release; it might or might not work in your particular environment, but I tried it today on Ubuntu 24.04 with gnome-terminal, and it seems OK there.)

Another way to get an interactive shell, and the one that is more likely to be extended in future, is to tell SLR to create a D-Bus server analogous to sshd, and then connect to it from outside using a client analogous to ssh, as described here: https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/blob/main/docs/slr-for-game-developers.md#inserting-debugging-commands-into-the-container. (Again, this is a developer thing, not really intended for end-user use.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants