Refracta Development, Scripts, etc.
Post a reply

Frontend to pmount

Tue Feb 09, 2016 3:09 pm

I wanted an easy clicky way to use pmount in xfce without having to install
spacefm and without gvfs. So I recycled some code from refracta2usb and added inotifywait.

The result is a set of scripts that will pop up a window showing the
partitions on the usb drive when it's plugged in. Then it mounts your
choice and opens it in your default file manager.

If anyone wants to try it, there's a tarball here -
http://sourceforge.net/projects/refract ... z/download

Installation is completely manual right now. Open the tarball and copy the
files according to the file list. I can roll up a .deb file later.

You can use usbpmount.sh and usb-unmount.sh with panel buttons without
using inotifywait. You won't get a popup window this way, but you can
click to mount and unmount as unprivileged user. (pmount/pumount)

If you want the popup window, the user needs sudo privileges for one of
the scripts. A file is included to add to (/)etc/sudoers.d/ for this.

With a few changes, it'll work (mostly) with zuluMount instead of yad|zenity.

Depends: pmount, hwinfo, yad|zenity
Recommends: inotify-tools

yad for jessie is available here -
http://debs.slavino.sk/files-testing.php

Comments and suggestions are welcome.

Re: Frontend to pmount

Tue Feb 09, 2016 4:05 pm

Well done! Just saw your post to the ML. Looking forward to the discussion that will inevitably follow.

Re: Frontend to pmount

Thu Feb 11, 2016 12:45 am

Good work, useful if running an openbox-type system (although I mostly run tde and xfce4, which handle removables fine)

On a side note, yad is now in stretch/sid, same version as in slavino.sk. It should install in jessie, however I noticed while the slavino.sk package depends libgtk2.0-0 the debian package depends libgtk-3-0, which pulls in a ****load of other cruft.

Re: Frontend to pmount

Thu Feb 11, 2016 12:49 am

dzz wrote:however I noticed while the slavino.sk package depends libgtk2.0-0 the debian package depends libgtk-3-0, which pulls in a ****load of other cruft.

I imagine that's part of the gnome/systemd 'feature' creep.

Re: Frontend to pmount

Thu Feb 11, 2016 6:31 pm

Whatever the reason, the agenda, of the debian package maintainer... clearly no dependency specific to gtk3lib exists.
Are we resigned to comiserating in posts here b/c we've learned from experience that a bugzilla ticket requesting change to "dep gtk3lib OR gtk2lib" will yield a "wont fix" outcome?

Re: Frontend to pmount

Fri Feb 12, 2016 1:16 am

Don't want to go too much "off-topic" from the excellent pmount frontend (but yad debs were mentioned). Looking at the yad source, we see it is designed to build by default for gtk2, optionally gtk3. (either way, the appropriate libs will be needed to build and run it) In the debian "rules" file for the stretch/sid package:
Code:
override_dh_auto_configure:
   dh_auto_configure -- --with-gtk=gtk3

Yad came about because of limitations and lack of development in (yes, now gtk3) zenity.

Code:
# apt install zenity
#SNIP
After this operation, 107 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

Try fitting that on your live cd!

Re: Frontend to pmount

Mon May 02, 2016 1:41 pm

dzz wrote:
Code:
# apt install zenity
#SNIP
After this operation, 107 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

Try fitting that on your live cd!


I did try, and you stopped me, thanks. That was when it was still less than 100MB.

I updated usbpmount.sh. The script now handles mounting of usb, sd/mmc and cd/dvd devices.
usbpmount3.tar.gz
https://sourceforge.net/projects/refrac ... s/testing/

Here's the readme -
Code:
                  USBPMOUNT3


usbpmount3.sh is a graphical frontend to pmount. It allows mounting of
USB drives, SD/MMC cards and CD or DVD media by unprivileged users.

This is not an automounter, and nothing will automatically tell you that
you plugged in a removable device. It is assumed that you know what your
hands are doing. It's also up to you to remember to un-mount your device
before you unplug it.

This tool is just a clicky way to use pmount/pumount.

thumb-pick3.sh is the cli version of the script.


usb-unmount.sh will show you what's mounted on /media and let you
un-mount it. (USB, SD/MMC, CD/DVD)


Depends: hwinfo, pmount, yad | zenity



                  INSTRUCTIONS

Put the scripts somewhere in your user's path. (or not)
Use the icon files for panel buttons that point to the scripts.
(green, upward pointing fork for mount; red/down for un-mount.)


Sorry, no support for file system labels at this time. I don't know a
reliable way for users to get the labels. blkid only works for user
under some conditions (i.e. only after root has run blkid.)


- [email protected]      May 1, 2016

Re: Frontend to pmount

Fri May 20, 2016 3:09 pm

Updated it again to usbpmoun5. It now pops up a password entry window for an encrypted partition.
(That part only works with yad. If you use zenity, you'll probably get an error.)
Post a reply