LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 08-31-2007, 02:45 PM   #1
wadsworth
Member
 
Registered: Aug 2007
Distribution: Slackware64 13.37
Posts: 213

Rep: Reputation: 63
Fluxbox - removable media


I'm using Slackware 12 with Fluxbox, and am looking for a simple way to
mount/unmount removable media.

So far I've tried:
pmount + ivman. But I don't want auto-mounting. And I still have to manually unmount.
wmvolman from dockapps.org. But I can't seem to get it to work. And I don't want that
big "dockapp" thing sitting on my desktop anyway.

The best solution I've come up with so far is to add these entries in my menu:
Code:
[submenu] (Mount)
      [exec]   (mount-CD) {pmount /dev/hdc && rxvt -e mc /media/hdc}
      [exec]   (unmount-CD) {pumount /dev/hdc}
      [exec]   (mount-USB) {pmount /dev/sda1 && rxvt -e mc /media/sda1}
      [exec]   (unmount-USB) {pumount /dev/sda1}
[end]
If I could write something to add or remove my own icon in the system tray,
I would add it to my menu solution and be completely satisfied.
(I'd like to have some feedback when the drive is mounted or unmounted)

What I really want is to insert some media, and have an icon appear in the system tray.
Then I would right-click that icon and select mount or unmount.
(It would be nice if it could automatically open a file manager, like my menu "script" does)

Anyone know how to manually add/remove a custom icon to the system tray in Fluxbox?
Or a better solution to this problem?
 
Old 08-31-2007, 03:14 PM   #2
redbuds
LQ Newbie
 
Registered: Apr 2003
Location: SE oklahoma
Distribution: slackware
Posts: 16

Rep: Reputation: 0
The way I do it is with gkrellm's file system , which reads your /etc/fstab or you can put your mount commands in it. But, you may not want gkrellm on your desktop.

redbuds
 
Old 08-31-2007, 04:38 PM   #3
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,185

Rep: Reputation: 285Reputation: 285Reputation: 285
I used to use GKrellm with Flux too. But switched to kde now that it has hal support. With Gkrellm you can have a mount/umount button and the icon shows a green dot when the medium is mounted.
 
Old 09-01-2007, 02:39 PM   #4
Fluxx
Member
 
Registered: Aug 2005
Location: Bavaria, Germany
Distribution: Slackware (Current)
Posts: 225

Rep: Reputation: 30
I also use Slackware 12 and fluxbox. I use ivman and pmount to mount devices and to start actions if I plug in a new device (e. g. DVB-T-stick via USB starts xine, VideoDVD starts xine, AudioCD starts audacious, DataCD/DVD starts rox, storage medias start rox). To avoid automounting a removable device I added a Xdialog question which I can answer with YES (to automount) or NO (not to automount).

Fluxx.

Last edited by Fluxx; 09-01-2007 at 02:41 PM.
 
Old 09-09-2007, 06:08 PM   #5
wadsworth
Member
 
Registered: Aug 2007
Distribution: Slackware64 13.37
Posts: 213

Original Poster
Rep: Reputation: 63
Thanks for the tip about Xdialog.

I now have ivman set up so that an inserted CD or USB drive is auto-mounted
AND opens Midnight Commander so I can start working with the files right away.
(thats satisfactory as long as I have visual confirmation that a drive was mounted)

Unmounting CDs is no problem - apparently you don't have to do that anymore.
Just push the button on the drive and the CD is unmounted and ejected.
(I'm not sure when that behavior changed, but I definitely remember having
to unmount a CD before it would eject.)

Unmounting a USB drive isn't quite so elegant. I still have a menu item that
"pumount"s the drive, but now ivman detects the unmount and throws up an Xdialog
for confirmation. Pretty slick.

I'm satisfied with this solution, but still looking for others.
Thanks to all for posting their advice, it's been very helpful.
 
Old 01-24-2009, 06:20 AM   #6
seaelf
Member
 
Registered: Apr 2004
Location: Virginia
Distribution: Slackware 10.1 & 12.0
Posts: 66

Rep: Reputation: 16
ivman opens with MC

wadsworth-

that sounds like the solution for me too....I have just installed ivman but don't know how you got it to auto-open with MC? can you point me to a site for tips like that?

thanks
neil
 
Old 01-24-2009, 07:33 AM   #7
seaelf
Member
 
Registered: Apr 2004
Location: Virginia
Distribution: Slackware 10.1 & 12.0
Posts: 66

Rep: Reputation: 16
wadsworth

I think I am on the right track....
ivman /dev/sda1 && rxvt -e mc /mnt/flash

not sure if this is correct but will keep at it....

I reread the beginning of this thread and saw your example for your flux menu and that provided the clue for me.... thinks me....
 
1 members found this post helpful.
Old 01-24-2009, 08:35 AM   #8
Joe 6 Pack
LQ Newbie
 
Registered: Dec 2008
Location: Franklin, TN
Posts: 14

Rep: Reputation: 0
Well here is a solution that will at least give you the feedback you wanted:

Code:
[submenu] (Mounting)
	[exec]	(mount-CD) {pmount /dev/hdc /media/hdc && rxvt -e mc -b /media/hdc}
	[exec]	(unmount-CD) {pumount /dev/hdc && xmessage 'media ready to eject'}
	[exec]	(eject-CD) {eject}
	[exec]	(mount-USB) {pmount /dev/sda1 /media/sda1 && rxvt -e mc -b /media/sda1}
	[exec]	(unmount-USB) {pumount /dev/sda1 && xmessage 'media safe to remove'}
[end]
The first time you set this up, check in a terminal to make sure you are really unmounting your usb stick. xmessage isn't going to know or care if the command is wrong.

Joe

Last edited by Joe 6 Pack; 01-24-2009 at 09:09 AM.
 
Old 01-24-2009, 08:48 AM   #9
wadsworth
Member
 
Registered: Aug 2007
Distribution: Slackware64 13.37
Posts: 213

Original Poster
Rep: Reputation: 63
It's been a while since I played with any of this stuff,
I'm presently using the KDE 4.2rc that showed up in /testing a few days ago.
But I still have the ivman configuration files I was using.
I'll try to cut out the relevant parts.

IvmConfigActions.xml
Code:
    <ivm:Match name="hal.block.device" value="/dev/sda1">
	    <ivm:Match name="hal.volume.is_mounted" value="true">
		    <ivm:Option name="exec" value="rxvt -e mc '$hal.volume.mount_point$'" />
	    </ivm:Match>
    </ivm:Match>

    <ivm:Match name="hal.volume.disc.type" value="cd_rom">
	    <ivm:Match name="hal.volume.is_mounted" value="true">
		    <ivm:Match name="hal.volume.disc.has_data" value="true">		    
			    <ivm:Option name="exec" value="rxvt -e mc '$hal.volume.mount_point$'" />
		    </ivm:Match>
	    </ivm:Match>
    </ivm:Match>

IvmConfigProperties.xml
Code:
    <ivm:Match name="hal.block.device" value="/dev/sda1">
	    <ivm:Property name="hal.volume.is_mounted">
		    <ivm:Action value="false" exec="message-box-umount" />
	    </ivm:Property>
    </ivm:Match>
message-box-umount (requires Xdialog available at slackbuilds.org)
Code:
#!/bin/sh
DIALOG=Xdialog

$DIALOG --no-buttons --title "UNMOUNT" \
        --infobox "Drive is unmounted..." 5 30 5000

Maybe some of this will help.

I should mention that pmount needs its configuration slightly modified
when used on Slackware 12.2. Look here:
http://slackbuilds.org/repository/12.2/system/pmount/

Last edited by wadsworth; 01-24-2009 at 10:21 AM.
 
Old 09-11-2009, 11:31 PM   #10
mudangel
Member
 
Registered: May 2008
Location: Ohio
Distribution: Slackware
Posts: 267

Rep: Reputation: 48
ok, it's an OLD thread...

but, if you don't want stuff automounted, yet easily accessed, you could do worse than this:

[submenu] (Rox)
[exec] (Rox-filer) {rox}
[exec] (USB) {rox /mnt/usb}
[exec] (DVD) {rox /mnt/dvd}
[end]

...for fluxbox, anyway. saves all the messing about with pmount and whatnot, anyway

Last edited by mudangel; 09-11-2009 at 11:32 PM. Reason: missed an l
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removable Media Problem PipeDreams Linux - General 9 08-09-2007 05:46 AM
No removable media works... phantom_cyph Linux - Hardware 3 04-29-2007 02:13 PM
SUSE 10.2 and removable media izquierdista Suse/Novell 4 04-05-2007 08:38 AM
How to mount a removable media using C skie_knite007 Programming 1 10-02-2005 12:49 AM
Mounting removable media george_mercury Linux - General 1 07-28-2004 11:14 AM


All times are GMT -5. The time now is 08:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration