tabby: sudo not working on Linux

Version: 1.0.78 Platform: linux 4.18.0-13-generic Plugins: altair, clickable-links, quick-cmds, save-output, scrollbar, shell-selector, theme-gruvbox, title-control

Possible regression with sudo:

sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?

Funding this issue

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We only receive your pledge once the issue is resolved & you’ve verified it.
<picture> <source media="(prefers-color-scheme: dark)" srcset="https://polar.sh/api/github/Eugeny/tabby/issues/960/pledge.svg?darkmode=1"> Fund with Polar </picture>

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 32
  • Comments: 94 (10 by maintainers)

Most upvoted comments

@CoconutMacaroon sorry, it just works for me: image

I have these errors with sudo:

sudo: The "no new privileges" flag is set, which prevents sudo from running as root.
sudo: If sudo is running in a container, you may need to adjust the container configuration to disable the flag.

I think I found a way to replicate them…

image

Whenever Tabby asked me to restart application in order to changes to take effect, I click on that yellow bar, application restart, but suddenly sudo stops working. As pointed out above, killing all process and start Tabby again fix the issue (because exit from toolbar wont kill the PIDs), but it reappears whenever it restarts from that yellow bar.

This issue happened intermittently.

When exiting Tabby the below processes still run in the background.

$ ps -eaf|grep tabby
user    7570    3731  0 Dec20 ?        00:00:00 /opt/Tabby/tabby --type=zygote --no-zygote-sandbox --no-sandbox
user    7571    3731  0 Dec20 ?        00:00:00 /opt/Tabby/tabby --type=zygote --no-sandbox

After killing these I’m able to use sudo

pkill tabby

OS: Fedora 35

The problem seem to be electron v5. https://github.com/electron/electron/issues/18521

If you’re using tmux (screen may also work?), here’s another workaround:

  1. Launch a new tmux session in some other terminal program (e.g. gnome-terminal)
  2. Detach from the session
  3. Attach to the session in Terminus

…and sudo works (probably because sudo is not a child process of Terminus/Electron, but of the tmux server).

Any new tmux window or session (started from within this session) will also have working sudo.

Hi, to be clear, I didn’t meant to be rude It’s a personnal open source project, and you manage your time as you can, and we can all thank you for what you did Your answer is totally clear and understandable

Strange that such a big issue remains unanswered even for a “I don’t care”

@rapha8l I care a lot for everybody who has issues using my app, however I can’t afford to run around posting as much as dedicated project managers in other projects can. There are 500+ open issues and only so much of my free time I can dedicate to working on it.

The reason this hasn’t been fixed for so long is that I’m unable to reproduce it on any of my Linux boxes.

There has already been a similar bug in the past, but that was caused due to Chromium’s own sandboxing preventing SUID binaries (here, sudo) from getting spawned, but that’s been fixed.

Unfortunately the sudo’s error message is not helpful at all and without a viable repro, I have no idea where to start.

I’m pleased to announce that sudo and other setuid commands now work in Alpha 91

If you’re using tmux (screen may also work?), here’s another workaround:

As another alternative, you can ssh localhost. That spawns a new shell that’s not a child of Terminus/Electron, so you can sudo from there.

@albertoglezba this is a great find! Does everybody else have the same problem only when restarting from Settings? Or are there other cases where sudo stops working?

quick restart fixed it for me

Strange that such a big issue remains unanswered even for a “I don’t care”

@nuskooler it’s currently blocked by https://github.com/electron/electron/issues/18521 , so I’m waiting for the Electron to react. Unfortunately it doesn’t seem that there is a workaround without them actually fixing this.

hey just came here via google to check why my new fav term seems to be in sandbox mode, but I too had just restarted via settings. A quick killall tabby (from within tabby itself, which feels… awkward) fixed it right up!

The same issue is present in Fedora 34(Linux 5.15.10-100.fc34.x86_64). Killing the app and restarting did fix it.

This issue happened intermittently.

When exiting Tabby the below processes still run in the background.

$ ps -eaf|grep tabby
user    7570    3731  0 Dec20 ?        00:00:00 /opt/Tabby/tabby --type=zygote --no-zygote-sandbox --no-sandbox
user    7571    3731  0 Dec20 ?        00:00:00 /opt/Tabby/tabby --type=zygote --no-sandbox

After killing these I’m able to use sudo

pkill tabby

OS: Fedora 35

@CoconutMacaroon sorry, it just works for me: image