# refracta.freeforums.org

place to talk about refracta

Skip to content

Welcome
Welcome to refracta You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!

## Frontend to pmount

Refracta Development, Scripts, etc.
Post a reply
8 posts • Page 1 of 1

### Frontend to pmount

by fsmithred » 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.

fsmithred
  Posts: 2101
  Joined: Wed Mar 09, 2011 9:13 pm

Top

### Re: Frontend to pmount

by golinux » 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.
May the FORK be with you!

golinux
  Posts: 663
  Joined: Thu Nov 08, 2012 1:23 am

Top

### Re: Frontend to pmount

by dzz » 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.

dzz
  Posts: 647
  Joined: Wed Apr 27, 2011 11:53 am
  Location: Devon, England

Top

### Re: Frontend to pmount

by golinux » 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.
May the FORK be with you!

golinux
  Posts: 663
  Joined: Thu Nov 08, 2012 1:23 am

Top

### Re: Frontend to pmount

by thwak » 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?

thwak
  Posts: 174
  Joined: Tue Nov 20, 2012 3:58 am

Top

### Re: Frontend to pmount

by dzz » 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: Select all
  `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: Select all
  `# 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!

dzz
  Posts: 647
  Joined: Wed Apr 27, 2011 11:53 am
  Location: Devon, England

Top

### Re: Frontend to pmount

by fsmithred » Mon May 02, 2016 1:41 pm

> dzz wrote:
> Code: Select all
>   `# 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: Select all
  `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
  `

fsmithred
  Posts: 2101
  Joined: Wed Mar 09, 2011 9:13 pm

Top

### Re: Frontend to pmount

by fsmithred » 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.)

fsmithred
  Posts: 2101
  Joined: Wed Mar 09, 2011 9:13 pm

Top

Display posts from previous:
Sort by

Post a reply
8 posts • Page 1 of 1

Return to Discuss

Jump to:

### Who is online

Users browsing this forum: No registered users and 0 guests

Donate Now
ProNight Style by ModphpBB3
Hosted by © 2017 FreeForums.org | Create a free forum | Powered by phpBB
A Member of the Crowdgather Forum Community
About FreeForums | Legal | Advertise Here | Investors | Contact FreeForums.org
Report Violation
suspicion-preferred