Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 30 Aug 2014, 14:31
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Suggestions
[Request]Automagically mount USB drives + add rox bookmarks
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 2 of 3 Posts_count   Goto page: Previous 1, 2, 3 Next
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 5016
Location: Arizona, U.S.A.

PostPosted: Sun 23 Aug 2009, 16:27    Post_subject:  

eocmoney; for your requests; # 2 - # 4 lets talk about them here where you made them.
Don`t worry about the one you already posted, but lets deal with it here.
Any bugs or comments about usb-auto itself put on the usb-auto post.
That will keep people from wondering what all the other chatter is.

I don`t know what Rox bookmarks are, I have never used them.
usb-auto pops up Rox for the USB drive, so folks shouldn`t have trouble.

Setting downloads and Firefox`s Save Page path, is a good idea.
When I made GUIs, I always set the dialog`s path in the GUI`s code.
Firefox may have config. files that can be tweaked for this, I don`t know.
If you come up with info about this I can help, I won`t dig into Firefox...
Post for help as I always do, the Users forum usually gets the most replies.

To handle your requests I think I`ll make usb-auto run 2 other scripts.
One script for when a USB is plugged in, and the other for unplugged.
When run the USB device (sda1, sb1, etc.) will be passed to the script.
Then anything that you want to happen can be put in these scripts.
You probably will want only the first USB plugged in to be the path.

I`m watching this thread... So keep me informed about it here.

P.S. Found some coding errors ( big surprise ), I`ll post a fix soon.
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5016
Location: Arizona, U.S.A.

PostPosted: Sun 23 Aug 2009, 18:00    Post_subject:  

FYI... I posted a bug fix Beta 2 version, it does several USBs now.

I requested dev. help as I don`t have a USB with more than 1 partition on it.
Most Flash drives usually don`t have more than one, but USB HDs do.

Also I put run commands for the 2 files ( plug & unplug ) I spoke of above.
The files are: /usr/sbin/usbauto_mount & /usr/sbin/usbauto_umount
This way all 3 files will be in one place right in a row, nice!
Back to top
View user's profile Send_private_message 
mikeb


Joined: 23 Nov 2006
Posts: 8218

PostPosted: Sun 23 Aug 2009, 19:21    Post_subject:  

Quote:
I requested dev. help as I don`t have a USB with more than 1 partition on it.

I have one stick with 2 partitions....good for testing. I think it's only a problem for some bioses trying to boot from such a setup.

mike
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5016
Location: Arizona, U.S.A.

PostPosted: Sun 23 Aug 2009, 19:31    Post_subject:  

mikeb: If you`re willing to try usb-auto out for me I`d appreciate it.
Be sure to get the new Beta 2 version I just uploaded today.
Run it from a Xterm so you can see what the output is.
Let me know if you`re interested, post any comments to the usb-auto thread.
Back to top
View user's profile Send_private_message 
mikeb


Joined: 23 Nov 2006
Posts: 8218

PostPosted: Sun 23 Aug 2009, 19:45    Post_subject:  

Will do.....was actually trying to volenteer yourself to convert a flash stick Very Happy

now if only the forum will let me get to your thread...

mike
Back to top
View user's profile Send_private_message 
amigo

Joined: 02 Apr 2007
Posts: 2236

PostPosted: Mon 24 Aug 2009, 12:57    Post_subject:  

sunburnt, can you post and attach your original program as it was for oldr versions of Puppy.
I have written a program which does auto-mounting, so I am always inetrested in what others have done/are doing. My solution was based on hotplug, but written with an eye towards implementing the use of udev or some other polling method with mostly the same code.

The older version might be useful as-is for Puppy users who still run older versions for whatever reason.
Back to top
View user's profile Send_private_message 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Wed 26 Aug 2009, 07:41    Post_subject:  

Quote:
eocmoney; for your requests; # 2 - # 4 lets talk about them here where you made them.
Don`t worry about the one you already posted, but lets deal with it here.
Any bugs or comments about usb-auto itself put on the usb-auto post.
That will keep people from wondering what all the other chatter is.

I don`t know what Rox bookmarks are, I have never used them.
usb-auto pops up Rox for the USB drive, so folks shouldn`t have trouble.

Setting downloads and Firefox`s Save Page path, is a good idea.
When I made GUIs, I always set the dialog`s path in the GUI`s code.
Firefox may have config. files that can be tweaked for this, I don`t know.
If you come up with info about this I can help, I won`t dig into Firefox...
Post for help as I always do, the Users forum usually gets the most replies.

To handle your requests I think I`ll make usb-auto run 2 other scripts.
One script for when a USB is plugged in, and the other for unplugged.
When run the USB device (sda1, sb1, etc.) will be passed to the script.
Then anything that you want to happen can be put in these scripts.
You probably will want only the first USB plugged in to be the path.

I`m watching this thread... So keep me informed about it here.

P.S. Found some coding errors ( big surprise ), I`ll post a fix soon.


Hi Sunburnt

Im really itching to test your code! My memory stick is still at work and I wont be able to pick it up til Thursday (having to help a good friend move house in the meantime...as it happens the one that started the abiword ruccus).

The bookmarks are in two places, and Ive found that they are invaluable in helping Linux Newbies navigate the complicated and unfamiliar Linux filesystem. Heres some screenshots of exactly where I mean taken from Ecopup which includes pre-defined bookmarks for the important file locations.

Here is a screenshot of the GTK bookmarks, they are used in application save dialog boxes (Abiword, Seamonkey etc). The actual bookmarks are listed up the left hand side pane. If this script added a bookmark here it would enable them to plug in their pendrive, hit save and be able to save their files directly to their memory stick...the most natural order for them to do this from my observations.



These bookmarks are the ones stored in /root/.gtkbookmarks (explained above)

The other place puppy stores folder bookmarks is in ROX the file manager (many users are confused that a bookmark they create in one isnt created in the other). These are accessed from the button circled in red of the file manager in the Screenshot below.



These bookmarks are stored in xml format in the file /root/.config/rox.sourceforge.net/ROX-Filer/Bookmarks.xml

I hope this clarifies things. When I have more time I will look into the firefox save locations. I think firefox can be set to "Always ask me where to save files", which would bring up the GTK save dialog, with the bookmark your script created. This should solve that problem I think.

Many thanks for your continued work this script.

_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send_private_message Visit_website MSNM 
mikeb


Joined: 23 Nov 2006
Posts: 8218

PostPosted: Wed 26 Aug 2009, 08:00    Post_subject:  

Ecomoney...when I remaster I include common bookmarks. Flash sticks will generally end up in the same place top including sda1 is a safe bet (or sdb1 for sata) or perhaps the /mnt folder or maybe put symlinks in /root instead as /root is generally treat as a starting point once the clutter is removed such as my-roxapps and such ...

Another point....X is normally launched with /root as the starting folder since we run as user root. If this or the application launcher cd to a different folder then that would be the home..not sure about configs but I do this with the gimp to move its home folder...indeed maybe using user spot might be a good move for public use...presents a nice clean floder and safer too

mike
Back to top
View user's profile Send_private_message 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Wed 26 Aug 2009, 11:17    Post_subject:  

Mike, I agree entirely about puppies confusing directory structure. Much improvement could be made here. Its useful to know that puppy doesnt have to use the /root folder as its applications default. Ive done some testing with ubuntu on some puppy users and one of their very common reports is that its home folder structure is much more comprehensible (folders like music, videos, pictures, documents etc). I suppose it is a case of developers choosing locations to make it easier for them to find programs (that they are interested in) rather than douments (that the intended target audience for Puppy is interested in).
_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send_private_message Visit_website MSNM 
Sylvander

Joined: 15 Dec 2008
Posts: 3426
Location: West Lothian, Scotland, UK

PostPosted: Wed 26 Aug 2009, 12:02    Post_subject:  

One of the 1st things I always do is make /00, /01, /02, /03 folders for holding my sub-folders and files in.

Because of the alpha-numeric organization, these folders are always at the top of the folder hierarchy, and therefore easily seen and found. Very Happy
00.jpg
 Description   
 Filesize   41.34 KB
 Viewed   884 Time(s)

00.jpg

Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5016
Location: Arizona, U.S.A.

PostPosted: Fri 28 Aug 2009, 20:22    Post_subject:  

I have not been getting email notices about the progress of this thread!

amigo; The code for the daemon`s loop is the same for all the versions.
Actually there`s been 3 main types of code:
1) Attempt to mount everything with "for" loops and just let the errors fly.
2) Try to figure out what devices are attached by polling with "for" loops.
3) Use available reports to try to identify what devices are attached.
The old usb-auto used "dmesg" which Puppy no longer uses.
The new one checks the /sys dir. for /sd* dirs. to identify devices.

ecomoney; Sorry the forum dropped the ball not giving me email notices.
I spent the afternoon writing these 2 scripts, they seem to work well.
usb-auto_mount & usb-auto_umount are run upon USB insert & removal.
Please test them on your computer with usb-auto first!
gunzip them and put them in: /usr/sbin
Plugging in a USB adds lines to the 2 files you gave me.
Unplugging the USB removes the lines from the 2 files.
Both SeaMonkey and ROX showed the added lines and their removal.
Like any new software... There`s probably still bugs in it.
As usb-auto develops these 2 files will keep working.
Let me know how they work...
usb-auto_u-mount.tar.gz
Description  Ungzip this file and put the 2 files in: /usr/sbin
gz

 Download 
Filename  usb-auto_u-mount.tar.gz 
Filesize  615 Bytes 
Downloaded  328 Time(s) 
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5016
Location: Arizona, U.S.A.

PostPosted: Sun 30 Aug 2009, 03:25    Post_subject:  

### Note: New beta 4 version of USB-Auto at this forum post:

http://www.murga-linux.com/puppy/viewtopic.php?t=45815

ecomoney; have you had a chance to test the 2 event files I gave you?
If they are working we can wrap this up in one more version release!
Cheers... Terry
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5016
Location: Arizona, U.S.A.

PostPosted: Sun 30 Aug 2009, 18:21    Post_subject:  

Back to top
View user's profile Send_private_message 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Mon 31 Aug 2009, 12:18    Post_subject:  

Hi Sunburnt, sorry, it was my Partners Birthday and she wanted taking away from all this!

Testing now

_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send_private_message Visit_website MSNM 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Mon 31 Aug 2009, 14:51    Post_subject:  

Tested and reported on your thread.
_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send_private_message Visit_website MSNM 
Display_posts:   Sort by:   
Page 2 of 3 Posts_count   Goto page: Previous 1, 2, 3 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Taking the Puppy out for a walk » Suggestions
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0904s ][ Queries: 13 (0.0058s) ][ GZIP on ]