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

[BUG] Display of Terminal being used changed from older versions #738

Closed
daniejstriata opened this issue Feb 26, 2024 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@daniejstriata
Copy link

General description of bug:

  • What happened:
    I noticed that when I login to a host the Terminal is shown as tmux. This change came in later. I checked on a host with 2.4.0 and there the Terminal is (in my view Correct) as/dev/pts/1 and when sudo the termninal is xterm-256color.

in 2.8.5, when I login the terminal is tmux and when I sudo to root the Terminal changes to sudo.

image
vs as root
image

On older version:
image
as root:
image

Output of fastfetch -c ci.jsonc --format json:

  {
    "type": "Version",
    "result": {
      "projectName": "fastfetch",
      "architecture": "aarch64",
      "version": "2.8.5",
      "versionTweak": "",
      "cmakeBuiltType": "RelWithDebInfo",
      "compileTime": "Feb 25 2024, 00:00:00",
      "compiler": "gcc 11.4.1",
      "debugMode": false,
      "libc": "glibc 2.34"
    },
    "stat": 0
  },
//paste here

Output of fastfetch --list-features:

threads
gio
dconf
dbus
zlib
sqlite3
rpm
opencl
videodev2
Proprietary GPU driver API

@daniejstriata daniejstriata added the bug Something isn't working label Feb 26, 2024
@CarterLi
Copy link
Member

I login to a host the Terminal is shown as tmux

It's expected when you run fastfetch inside tmux

I sudo to root the Terminal changes to sudo

I can't reproduce it. I got Terminal: tmux when I ran sudo fastfetch inside tmux. The tmux version was lost because you lost environment variables when running fastfetch with sudo, which is also expected.

@daniejstriata
Copy link
Author

daniejstriata commented Feb 27, 2024

I realise what I'm saying is that the terminal id being used by the session is lost. Which is also the output of tty:
image
Can the Terminal output not be:
tty + NULL
or
tty + sudo
or
tty + tmux

It could be presented as:

Terminal: sudo on /dev/pts/2

if not in sudo or tmux

Terminal: /dev/pts/2

if in tmux

Terminal: tmux on /dev/pts/2

@CarterLi
Copy link
Member

You may use fastfetch -s terminal --terminal-format '{5} {6} on {8}'

@daniejstriata
Copy link
Author

@CarterLi Can this display not be the default as both are correct together and either are less correct on their own?

@CarterLi
Copy link
Member

I don't get it. Please file a new feature request and describe what you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants