Skip to content

modify unix default mounting point prefix (use /run/media/veracrypt t…#1524

Merged
idrassi merged 5 commits intoveracrypt:masterfrom
stevenleeS0ht:master
Apr 30, 2025
Merged

modify unix default mounting point prefix (use /run/media/veracrypt t…#1524
idrassi merged 5 commits intoveracrypt:masterfrom
stevenleeS0ht:master

Conversation

@stevenleeS0ht
Copy link
Contributor

…o replace /mnt/veracrypt).

This pull request is to solve this issue #1521.

@stevenleeS0ht
Copy link
Contributor Author

@idrassi , please have a look

@stevenleeS0ht
Copy link
Contributor Author

@Jertzukka , I fix the semicolon and append \mnt to the last one before temporary directory. Is it OK now?

@stevenleeS0ht stevenleeS0ht requested a review from Jertzukka April 16, 2025 09:02
@stevenleeS0ht
Copy link
Contributor Author

@idrassi is it ok?

@idrassi
Copy link
Member

idrassi commented Apr 21, 2025

@stevenleeS0ht Thank you for the proposed changed.

Using /run/media on Linux is ok for me since it is closer to the approach adopted by udisk2. I would ask to put the new code inside #if defined (TC_LINUX) #endif since this is Linux specific.

Can you please do this change?

Another thing is to check the behavior of FileManagers like Nautilus, Nemo and Dolphin after applying this change. For example, today on Linux Mint, after mounting a volume, it is automatically detected and shown in Nemo FileManager. I will try to check the behavior after this change.

@stevenleeS0ht
Copy link
Contributor Author

stevenleeS0ht commented Apr 23, 2025

@stevenleeS0ht Thank you for the proposed changed.

Using /run/media on Linux is ok for me since it is closer to the approach adopted by udisk2. I would ask to put the new code inside #if defined (TC_LINUX) #endif since this is Linux specific.

Can you please do this change?

Another thing is to check the behavior of FileManagers like Nautilus, Nemo and Dolphin after applying this change. For example, today on Linux Mint, after mounting a volume, it is automatically detected and shown in Nemo FileManager. I will try to check the behavior after this change.

@idrassi , I think #ifdef TC_LINUX like other places, would be more concise. Is it OK now?

@idrassi
Copy link
Member

idrassi commented Apr 25, 2025

Thank you for the change.

I'm having a hard time testing this modification because I haven’t found a single Linux distribution where it gets triggered. Either /media already exists, so /run/media is not checked, or neither /media nor /run/media exist, in which case /mnt is used.

In what environment would this change be useful? Given that we already have the VERACRYPT_MOUNT_PREFIX environment variable to override the default mount point prefix, we need a strong justification for this addition.

@evan0greenup
Copy link

@idrassi @stevenleeS0ht , Sorry for forgetting put Linux Distro information in my issue.

I can confirm that Arch Linux and all its derivatives use /run/media as prefix. This is quite a large portion of Linux world.

@evan0greenup
Copy link

@idrassi , as evidence, please read https://wiki.archlinux.org/title/Udisks#Mount_to_/media

By default, udisks2 mounts removable drives under the ACL controlled directory /run/media/$USER/

@stevenleeS0ht
Copy link
Contributor Author

Thank you for the change.

I'm having a hard time testing this modification because I haven’t found a single Linux distribution where it gets triggered. Either /media already exists, so /run/media is not checked, or neither /media nor /run/media exist, in which case /mnt is used.

In what environment would this change be useful? Given that we already have the VERACRYPT_MOUNT_PREFIX environment variable to override the default mount point prefix, we need a strong justification for this addition.

@idrassi , yeah, I also use Arch Linux (EndeavourOS for desktop), the information and links provided by @evan0greenup is correct.

@idrassi
Copy link
Member

idrassi commented Apr 30, 2025

Thank you for these details.

I also did a check on an Arch Linux machine and /media is absent which makes VeraCrypt use /mnt. With this change, /run/media will be used which will align with expected logic.
I don't see any issues with this change so I'm merging it.

@idrassi idrassi merged commit 43ea510 into veracrypt:master Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants