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

List external disk drives in FileDialog on Linux #1118

Closed
lukas-w opened this issue Aug 30, 2014 · 12 comments · Fixed by #6834
Closed

List external disk drives in FileDialog on Linux #1118

lukas-w opened this issue Aug 30, 2014 · 12 comments · Fixed by #6834

Comments

@lukas-w
Copy link
Member

lukas-w commented Aug 30, 2014

Just like we did with OS X (see #1058), we should find a way to list external drives on Linux.

On OS X, we just included the /Volumes directory, which contains all mounted drives, and new drives automatically get mounted and land in there. On Linux however, it's not that easy. Because of the many flavours of Linux, there's no common place for mounting disks, and on top of that, they might not even be mounted.

So the proper way to do this would be using the udisk API. As far as I know, udisk or udisk2 is shipped with most popular distros.

However, to make sure, I'd like to ask everyone to try if the commands udisks and/or udisksctl are available on their Linux system, and write the result and the used distro here. Thanks 🍺

Oh and if someone else than me wants to tackle this, feel free to assign yourself to the issue, as I probably won't be able to do it very soon.

@diizy
Copy link
Contributor

diizy commented Aug 30, 2014

Mint 13 here, udisks and udisksctl are both available.

@lukas-w
Copy link
Member Author

lukas-w commented Aug 30, 2014

Thanks.
I checked some other distros and will continue compiling a list here.

@diizy Mint 13 is based on Ubuntu 12.04LTS, but 12.04 doesn't have udisks2 in its repositories. Could you check where you got that package (or the command udisksctl) from? I.e. run dpkg -S $(which udisksctl), that will most likely output udisks2, and then run apt-cache policy udisks2 and post that output here please. Thanks ;)

Distro udisks udisks2 udisks2 since month
CentOS Yes Since 7.0 07/2014
Debian Since 7 - 2011/02 No
Manjaro Yes Yes Rolling Release
Mint Yes Since 15 05/2013, Not in old LTS
Ubuntu Yes Since 13.04 04/2013, Not in old LTS
openSUSE Yes Since 12.2 09/2012

@diizy
Copy link
Contributor

diizy commented Aug 30, 2014

udisks2:
Installed: 2.1.0-4ubuntu0.1ubuntu12.04ppa1
Candidate: 2.1.0-4ubuntu0.1ubuntu12.04ppa1
Version table:
*** 2.1.0-4ubuntu0.1ubuntu12.04ppa1 0
500 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/
precise/main i386 Packages
100 /var/lib/dpkg/status

@lukas-w
Copy link
Member Author

lukas-w commented Aug 30, 2014

Thanks. This means udisks2 is neither in Mint's nor in Ubuntu's oldest still supported LTS releases (Mint 13 Maya and Ubuntu 12.04 Precise). Those two releases are very widely used and both will be supported until 04/2017.

However, I suggest only supporting udisks2, as implementing the feature for both udisks and udisks2 would be too much effort, and udisks doesn't even have a C library.

Therefore we'll have to make udisks2 an optional dependeny and disable the feature where it's not available.

@lukas-w
Copy link
Member Author

lukas-w commented Mar 16, 2017

Note: Qt 5.4 probably solves this issue for us on all platforms with QStorageInfo.

@PhysSong
Copy link
Member

PhysSong commented Feb 20, 2022

Note: Qt 5.4 probably solves this issue for us on all platforms with QStorageInfo.

LMMS requires Qt 5.6 now, so it could be implemented quite easily(not only for Linux).

@allejok96
Copy link
Contributor

LMMS on Windows has this feature already I think...

There is QStorageInfo::mountedVolumes() but I don't see any way to mount volumes like you would with udisks. Displaying the mounted ones on Linux would maybe be helpful, but would that include /home and /var etc...? And subvolumes on btrfs...?

I'm was trying to implement localized sorting and bak-files in the file browser, but the more I tried the deeper mess I got into. Now it has become something of a refactor... so I might as well look into this.

@Owl-A
Copy link

Owl-A commented Mar 29, 2022

Hello. Is @lukas-w still tackling this issue? I'd like to work on this since I happen to specialise in linux internals (at least in theory). So, not only does this make for a great first issue, it'll help me easily put into perspective some of the interactions of LMMS with the OS (in this case, retrieving block device data) and understand coding conventions and community!
Also, note that I might be slow to work till 3rd April, 9 am Indian time, since I'm on a vacation. This seemed to be an issue of interest judging by the recent surge in activity and I, by no means, wish to stall progress on this issue in case this is a priority issue.
Edit: just read the last comment and finally understood why this is a good first issue. QStorageInfo greatly simplifies this!

@DomClark DomClark assigned Owl-A and unassigned lukas-w Mar 30, 2022
@allejok96
Copy link
Contributor

@Owl-A I'm glad you're up for the task! But I'm not sure QStorageInfo provides the best solution... Guess we'll see when you've dug deeper.

@zonkmachine
Copy link
Member

@Owl-A I see no activity here so I'm unassigning you. Please bump us if you're still deep into this. :)

@MrTopom
Copy link
Contributor

MrTopom commented Aug 27, 2023

Does anyone is working on it? It could be a good start for me.

@zonkmachine
Copy link
Member

@MrTopom Have a go! 👍

@sakertooth sakertooth linked a pull request Aug 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants