You are not logged in.

#51 2011-11-23 10:11:18

jnguyen
Member
Registered: 2011-02-17
Posts: 139
Website

Re: bashmount: removable devices kept simple and made easy!

bashmount 1.6.0 released now with support for blacklisting, following a request from GSF1200S.

Please do let me know if it doesn't work as expected, or if you notice any other bugs.

Last edited by jnguyen (2011-11-23 10:12:08)


TOMOYO Linux: Mandatory Access Control.
My AUR packages

Offline

#52 2011-11-23 11:16:39

MadCatMk2
Member
Registered: 2010-05-10
Posts: 84

Re: bashmount: removable devices kept simple and made easy!

Thank you so much for this sweet application. It's something I always thought would be nice to have but never wrote.

I have an android device which I tested this with.
My small enhancement contribution from it:

Once the device is connected to the computer info_has_media() returns 0.
When, on the device, I select "Connect storage to PC" (to make it accessible), info_has_media() returns 1.

However, obviously, when info_has_media() returns 0 mounting fails. It would be a nice to have an indication of this.
Maybe add something like

info_has_media="$(info_has_media "${devname}")"
            if (( info_has_media == 1 )); then 
                printf '%s' "Has media"
            else 
                printf '%s' "No media"
            fi

in removable_devices()

Or maybe make the entry bold? That's up to you.

Last edited by MadCatMk2 (2011-11-23 11:17:16)

Offline

#53 2011-11-27 23:44:34

jnguyen
Member
Registered: 2011-02-17
Posts: 139
Website

Re: bashmount: removable devices kept simple and made easy!

Hi MadCatMk2, thanks very much for your feedback.

I too have an Android device. I'll have a think about it adding some kind of indication when I get more time.


TOMOYO Linux: Mandatory Access Control.
My AUR packages

Offline

#54 2012-02-05 22:58:28

jnguyen
Member
Registered: 2011-02-17
Posts: 139
Website

Re: bashmount: removable devices kept simple and made easy!

bashmount 1.6.1 released with a small bug fix and some code cleanup.

Development has moved to GitHub.

In the future, bashmount will use udisks2, which will at some point supersede udisks (Fedora 17).

@MadCatMk2: I decided against applying your changes, as the user should know to click "Connect storage to PC" on their Android. I also feel the current feedback is sufficient:

Mount failed: Error mounting: mount: no medium found on /dev/sdd

Thanks very much for taking the time to provide some feedback though. smile

Last edited by jnguyen (2012-02-05 22:59:56)


TOMOYO Linux: Mandatory Access Control.
My AUR packages

Offline

#55 2012-07-02 02:03:07

zoqaeski
Member
From: /earth/australia/.
Registered: 2009-09-30
Posts: 132

Re: bashmount: removable devices kept simple and made easy!

jnguyen wrote:

In the future, bashmount will use udisks2, which will at some point supersede udisks (Fedora 17).

Would this be much effort to implement? udisks2 changed where disks are mounted to /run/media/USER/LABEL, which was a minor PITA (changing symlinks and configuration files, etc). All the commands have changed, and the documentation is poor.

/media was so much simpler, especially for those of us who don't use a graphical file manager.

EDIT:Just reading through the code to bashmount, and I think there's only a handful of lines that would need to be changed to switch to udisks2. The only one which looks to be difficult to implement is the --enumerate-device-files as there's no direct (shorthand) equivalent in udisks2, though the information could probably be parsed out of `udisksctl dump`

Last edited by zoqaeski (2012-07-02 02:15:07)

Offline

#56 2012-07-14 09:13:38

jnguyen
Member
Registered: 2011-02-17
Posts: 139
Website

Re: bashmount: removable devices kept simple and made easy!

zoqaeski wrote:
jnguyen wrote:

In the future, bashmount will use udisks2, which will at some point supersede udisks (Fedora 17).

Would this be much effort to implement? udisks2 changed where disks are mounted to /run/media/USER/LABEL, which was a minor PITA (changing symlinks and configuration files, etc). All the commands have changed, and the documentation is poor.

/media was so much simpler, especially for those of us who don't use a graphical file manager.

EDIT:Just reading through the code to bashmount, and I think there's only a handful of lines that would need to be changed to switch to udisks2. The only one which looks to be difficult to implement is the --enumerate-device-files as there's no direct (shorthand) equivalent in udisks2, though the information could probably be parsed out of `udisksctl dump`

Hi, sorry for the late reply. I will be working on this when I have time, so likely not before October. Watch this space!


TOMOYO Linux: Mandatory Access Control.
My AUR packages

Offline

#57 2014-03-13 15:41:22

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: bashmount: removable devices kept simple and made easy!

Hi,

recently i did a rewrite of bashmount that does not depend on udisks.
You can find it on github.
It uses lsblk instead of udisks for gathering information and runs subjectively faster.
Devices are sorted by internal media, removable media and optical media.
For mounting devices different backends like udevil,udisks,/usr/bin/mount,... can be used.
You can find a list of differences between bashmount 2.0.0alpha1 and the forked version here.

By the way, i also got rid of the fancy sort function and other hacks ;-)

Offline

#58 2014-03-13 15:52:39

lkraav
Member
Registered: 2011-04-08
Posts: 37

Re: bashmount: removable devices kept simple and made easy!

Very nice, following the project

Offline

#59 2014-03-13 16:54:33

Awebb
Member
Registered: 2010-05-06
Posts: 6,611

Re: bashmount: removable devices kept simple and made easy!

teateawhy wrote:

By the way, i also got rid of the fancy sort function and other hacks ;-)

What exactly does replacing printf with echo achieve?

Offline

#60 2014-03-13 17:02:11

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: bashmount: removable devices kept simple and made easy!

Awebb wrote:

What exactly does replacing printf with echo achieve?

I have used echo out of habit, and the code is easier to read, but according to this the change should probably reverted.

Offline

#61 2014-03-13 17:24:38

Awebb
Member
Registered: 2010-05-06
Posts: 6,611

Re: bashmount: removable devices kept simple and made easy!

teateawhy wrote:
Awebb wrote:

What exactly does replacing printf with echo achieve?

I have used echo out of habit, and the code is easier to read, but according to this the change should probably reverted.

I only asked because you explicitly mention it on your changes page, so I thought this might be a big deal for some reason and wanted to know why. I use printf out of habit, since it's not unique to bash.

Offline

#62 2014-03-14 11:14:44

jamielinux
Member
From: United Kingdom
Registered: 2014-03-14
Posts: 7
Website

Re: bashmount: removable devices kept simple and made easy!

teateawhy wrote:

Hi,

recently i did a rewrite of bashmount that does not depend on udisks.

Hi! I'm the original bashmount author (I lost my previous bbs login). Really cool changes. I'd love to see some pull requests smile

Offline

#63 2014-03-23 13:03:27

jamielinux
Member
From: United Kingdom
Registered: 2014-03-14
Posts: 7
Website

Re: bashmount: removable devices kept simple and made easy!

Many thanks to teateawhy (aka Lukas B.) for the awesome port to lsblk, and various other improvements worthy of a bump to 3.0.0.

https://sourceforge.net/projects/bashmount/

bashmount 3.0.0beta2 (2014-03-23)
  - Fix newline in UI
bashmount 3.0.0beta1 (2014-03-23)
  - Autodetect the presence of udisksctl, but also allow to manually disable
    the use of udisks
  - Re-order the configuration file and remove redundant options
  - Allow blacklisting by TYPE
  - The first three custom commands are now built-in to bashmount, so only
    custom4_command, custom5_command and custom6_command are configurable
  - Remove show_device_path option, and instead always show the device path
bashmount 3.0.0alpha1 (2014-03-23)
  Many thanks to Lukas B. (aka https://github.com/vitamins) for porting
  bashmount to use lsblk where appropriate and a variety of other changes:

  - Information retrieval is now based on `lsblk` instead of `udisksctl`,
    which allows us to get rid of a lot of horrible parsing
  - Devices are sorted by internal media, removable media and optical media
  - Only partitions are listed, no disks
  - Opened luks containers are also listed by default

  Configuration file:
  - Add "mount_command" and "unmount_command" which can be configured by the
    user
  - "optical_devices" and "removable_devices" are no longer present
  - "show_internal" is set to '1' by default
  - "show_removable_device_filename" and "show_optical_device_filename" have
    been replaced by a single variable named "show_device_path"
  - "fancy_sort" is no longer present

Offline

#64 2014-03-23 13:17:33

jamielinux
Member
From: United Kingdom
Registered: 2014-03-14
Posts: 7
Website

Re: bashmount: removable devices kept simple and made easy!

Et voilà, bashmount-3.0.0 is available for your enjoyment :-)

https://sourceforge.net/projects/bashmount/

bashmount 3.0.0 (2014-03-23)
  - Allow pressing [enter] to refresh device list

Last edited by jamielinux (2014-03-23 13:17:47)

Offline

#65 2014-04-03 18:47:20

Sirsurthur
Member
Registered: 2009-02-02
Posts: 124

Re: bashmount: removable devices kept simple and made easy!

Hello Jamielinux,

Bashmount is great but I get one little issue (that may come from me). I have a mp3 player with an internal memory and an mini sd-card.

The sd-card is shown in the list of device and can be mounted. That's not the case for the internal memory. If I use for example udevil, then the internal memory is shown and mounted.

Would you need some outputs to see if there is an little issue in bashmount ?

Thanks again for your work !

Offline

#66 2014-04-03 19:34:28

jamielinux
Member
From: United Kingdom
Registered: 2014-03-14
Posts: 7
Website

Re: bashmount: removable devices kept simple and made easy!

Sirsurthur wrote:

Bashmount is great but I get one little issue (that may come from me). I have a mp3 player with an internal memory and an mini sd-card.

The sd-card is shown in the list of device and can be mounted. That's not the case for the internal memory. If I use for example udevil, then the internal memory is shown and mounted.

Would you need some outputs to see if there is an little issue in bashmount ?

bashmount uses `lsblk` to find devices.

What is the location of the internal memory in /dev/ ?

Can you post the output of

lsblk -plno NAME

and

lsblk -a -plno NAME

and see if your device is listed?

Offline

#67 2014-04-04 05:27:38

Sirsurthur
Member
Registered: 2009-02-02
Posts: 124

Re: bashmount: removable devices kept simple and made easy!

I guess that the internal memory is in /dev/sdc.

You can see the output of lsblk -plno NAME here : http://pastebin.com/F6xNG2r3

and the output of lsblk -a -plno NAME there : http://pastebin.com/9kMEbB2r

I also posted a screenshot of bashmount here : http://imagebin.org/303734

I hope it helps !

Offline

#68 2014-04-04 08:02:44

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: bashmount: removable devices kept simple and made easy!

Sirsurthur wrote:

I guess that the internal memory is in /dev/sdc.

You can see the output of lsblk -plno NAME here [...]

The device sdc does not contain a partition. Bashmount only displays partitions, not devices, that means /dev/sdc is not displayed.
You need to create a partition and a filesystem on the device.

Offline

#69 2014-04-04 10:40:27

Sirsurthur
Member
Registered: 2009-02-02
Posts: 124

Re: bashmount: removable devices kept simple and made easy!

Not keen on formatting back my mp3 player. Too bad that they are no workaround to show device in bashmount ?

Offline

#70 2014-04-04 14:39:33

sekret
Member
Registered: 2013-07-22
Posts: 289

Re: bashmount: removable devices kept simple and made easy!

Why haven't I tested this earlier?! Really well done, it even supports luks encryption *happy*. I'll look into your code, maybe I'll be able to finally finish my dmenu script for mounting and umounting devices. Until then I use bashmount!

Offline

#71 2014-04-04 18:25:58

jamielinux
Member
From: United Kingdom
Registered: 2014-03-14
Posts: 7
Website

Re: bashmount: removable devices kept simple and made easy!

Sirsurthur wrote:

Not keen on formatting back my mp3 player. Too bad that they are no workaround to show device in bashmount ?

Fixed in bashmount 3.1.0 smile

Last edited by jamielinux (2014-04-04 18:27:05)

Offline

#72 2014-04-06 06:54:27

Sirsurthur
Member
Registered: 2009-02-02
Posts: 124

Re: bashmount: removable devices kept simple and made easy!

Works great with 3.1.1 !

Thanks a lot jamielinux !

Offline

Board footer

Powered by FluxBB