VeraCrypt icon indicating copy to clipboard operation
VeraCrypt copied to clipboard

[Linux] Check/Repair Filesystem not working with gnome-terminal

Open bugtracker2019 opened this issue 1 year ago • 6 comments

Trying to check or repair a filesystem of a mounted volume is resulting in an error message (see screenshot). If the corresponding dbus-launch command is entered manually in a terminal, I get the following output:

$ dbus-launch --autolaunch=1fda3a94e8bb40e2b882855496f18d9a --binary-syntax --close-stderr
Autolaunch requested, but X11 support not compiled in.
Cannot continue.

Just checked. It makes no difference, if you're using X11 or Wayland.

Expected behavior

Checking/Repairing Filesystem should work.

Steps to reproduce

  1. Launch VeraCrypt
  2. Mount a volume, right-click on it and try to check or repair filesystem
  3. Error

Screenshots

Bildschirmfoto vom 2024-09-24 11-32-04

Please tell us more about your environment

VeraCrypt version: 1.26.14

Operating system and version: Arch Linux, Gnome 47, X11

bugtracker2019 avatar Sep 24 '24 10:09 bugtracker2019

This is just a generic error caused by the attempt to launch gnome-terminal with elevated privileges. Running GUI programs as sudo is not ideal but it works on most systems but there seems to be some new changes that makes it not work anymore. You can get the same error by just running sudo gnome-terminal. I think the solution is to launch the gnome-terminal as regular user and then elevate within it with sudo.

Meanwhile as a workaround you can manually:

sudo umount /mnt/veracryptX
sudo fsck -n /dev/mapper/veracryptX
sudo fsck -r /dev/mapper/veracryptX

Jertzukka avatar Sep 24 '24 18:09 Jertzukka

Hi Jertzukka,

thx for responding. Do you mean

some new changes that makes it not work anymore

in sudo, gnome-terminal or VeraCrypt? I'm using the latest version of sudo (1.9.16) and just checked an older version (1.9.15.p4-1 from Dec. '23). But the error still remains. Didn't check an older version of VeraCrypt though.

Btw.:

Running GUI programs as sudo is not ideal

Yeah, that's a little understatement. One of the first things I learned, when switching to Linux was: Don't use sudo for graphical programs.

bugtracker2019 avatar Sep 25 '24 09:09 bugtracker2019

in sudo, gnome-terminal or VeraCrypt?

Something to do with gnome-terminal, seems to work fine on other terminal emulators such as Konsole on my Arch KDE VM.

Jertzukka avatar Sep 25 '24 14:09 Jertzukka

I can confirm the problem is connected to gnome-terminal. Just checked with xterm. Works flawlessly.

Not so happy with the way VeraCrypt handles terminal emulators, though. As I found out, when I uninstalled gnome-terminal, it only supports xterm, konsole or gnome-terminal (supposed to). So if I wanna use sth. different i.e. Alacritty, I've got bad luck. Bildschirmfoto vom 2024-09-25 18-08-23

bugtracker2019 avatar Sep 25 '24 16:09 bugtracker2019

Seems this issue was already addressed (but not solved): https://github.com/veracrypt/VeraCrypt/pull/1086

bugtracker2019 avatar Sep 25 '24 16:09 bugtracker2019

gnome-terminal (supposed to).

I tested the newest Ubuntu 24.10 which also comes with the GNOME 47 and the same version of gnome-terminal and VTE library that the Arch install uses, and it works fine on it. So it is something else that's different on the Arch install that causes it. But anyhow, there definitely should be a better way to do it, I can take a look at some point.

Adding support for more terminal emulators isn't difficult, but one needs to go through all the specific options for each as they're different on almost all of them.

Jertzukka avatar Sep 25 '24 23:09 Jertzukka