The time now is Sun 19 May 2013, 11:13
All times are UTC - 4 |
|
Page 1 of 2 [20 Posts] |
Goto page: 1, 2 Next |
| Author |
Message |
bala4dj
Joined: 14 May 2012 Posts: 8 Location: Canada
|
Posted: Mon 14 May 2012, 17:25 Post subject:
How to automount a USB flash drive? |
|
Hi, I am working on RDP connection to a terminal server from puppy Linux. When a user turns on the computer, he will see some of " Loading kernel modules " and it will directly connect to the terminal server, he will not be able to see the Puppy desktop. - I made some changes !!
Now, i need help - how to auto mount the usb drives, cd rom. (I know it will mount whenever i click the sdb1, sdd1 icon) - wen the user hooks a usb flash drive in his local machine, he should be able to see the drive in the Terminal server. (Redirection) !
I know to mount the usb drive while executing a RDP connection. But I don't know how can the user mount, when he unplugs and plugs it back.
I need some thing like to auto mount the usb flash drive as soon as he connects. Kindly please help me !!!
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6855 Location: Perth, Western Australia
|
Posted: Mon 14 May 2012, 19:46 Post subject:
Re: Automount a USB flash drive Subject description: How to Automount a USB flash drive in puppy linux |
|
| bala4dj wrote: | Hi, I am working on RDP connection to a terminal server from puppy Linux. When a user turns on the computer, he will see some of " Loading kernel modules " and it will directly connect to the terminal server, he will not be able to see the Puppy desktop. - I made some changes !!
Now, i need help - how to auto mount the usb drives, cd rom. (I know it will mount whenever i click the sdb1, sdd1 icon) - wen the user hooks a usb flash drive in his local machine, he should be able to see the drive in the Terminal server. (Redirection) !
I know to mount the usb drive while executing a RDP connection. But I don't know how can the user mount, when he unplugs and plugs it back.
I need some thing like to auto mount the usb flash drive as soon as he connects. Kindly please help me !!! |
Puppy already does what you want. It is the Puppy Event Manager in Menu -> System.
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
bala4dj
Joined: 14 May 2012 Posts: 8 Location: Canada
|
Posted: Tue 15 May 2012, 10:48 Post subject:
|
|
Hi . Thanks for the reply .. I still get a prompt " Probing hard drive " Pmount opens and asks to click on the mount button. But What i am really looking for is - Without me clicking on mount button !! can the usb drive mount / open automatically. . Thank you .
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6855 Location: Perth, Western Australia
|
Posted: Tue 15 May 2012, 22:58 Post subject:
|
|
Well well, your post has revealed a bug. I had always thought that automounting is implemented in Puppy.
Now when I look at it, I see that it is not complete. The Event Manager has an automatic 'handler' feature, which does partially work. For example, you can set it so that when you plug-in a DVD video the default DVD player will start.
But it was not implemented to auto-mount drives. This is going back a few years, when I created this code. Thinking back, I may have decided to launch Pmount only, as a drive may have multiple partitions and perhaps it would be unwise to auto-mount all of them.
But re-thinking it, if a user has ticked the auto-mount/handler checkbox then that is what they want, regardless of number of partitions.
So, I have fixed it. See my blog post:
http://bkhome.org/blog/?viewDetailed=02835
You can download the latest /usr/local/bin/drive_all, replace the old one, make sure the file is set to executable. Run Event manager, tick those checkboxes. Restart X. Plug in drive.
Thanks for bringing this problem to my attention.
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
charlie6
Joined: 30 Jun 2008 Posts: 799 Location: South of Belgium
|
Posted: Wed 16 May 2012, 03:16 Post subject:
Subject description: automount USB flash drive |
|
Hi Barry,
many thanks for that fix !
(running on slacko 5.3.1 k2.6.37.6)
here installed the new drive_all script;
The automount works OK when pluging in an USB flash drive, on an already running Puppy.
But upon bootup it does not automount already pluged in USB drive. One has either to click on their icon, or to unplug and replug it, to get it mounted. Should it go that way , should'nt it?
Cheers, Charlie
|
|
Back to top
|
|
 |
bigpup

Joined: 11 Oct 2009 Posts: 3687 Location: Charleston S.C. USA
|
Posted: Wed 16 May 2012, 16:54 Post subject:
Subject description: automount USB flash drive |
|
| charlie6 wrote: |
But upon bootup it does not automount already pluged in USB drive. One has either to click on their icon, or to unplug and replug it, to get it mounted. Should it go that way , should'nt it?
Cheers, Charlie |
Asked Barry about this his response:
| Quote: | That is right, the automounting only takes affect when a drive is plugged in.
To automount at bootup, for already-plugged-in usb drives, you would need a little script. A script in /etc/rc.d/rc.local could do it. |
You could try this program:
Startmount
http://www.murga-linux.com/puppy/viewtopic.php?t=50845
_________________ I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
Puppy Help 101 An interactive tutorial for Puppy 5.2.5
|
|
Back to top
|
|
 |
bala4dj
Joined: 14 May 2012 Posts: 8 Location: Canada
|
Posted: Wed 16 May 2012, 17:10 Post subject:
|
|
Thank you very much Barry !! One more last thing from me for now is, would it be a hassle for you to tell me, what exactly i should do the changes !! I understand that what i brought to you was a bug and you fixed it, how would i update the file, where is the location for my changes to take place, and what do i do to get it effective. Please let me know, Thank you !
-Bala
|
|
Back to top
|
|
 |
bala4dj
Joined: 14 May 2012 Posts: 8 Location: Canada
|
Posted: Wed 16 May 2012, 17:50 Post subject:
|
|
I tried to replace the /usr/local/bin/drive_all with the code you gave .. But i screwed up !! Now, i feel i need a step by step to solve this .. Please let me know thank you.
- Bala
|
|
Back to top
|
|
 |
charlie6
Joined: 30 Jun 2008 Posts: 799 Location: South of Belgium
|
Posted: Thu 17 May 2012, 01:38 Post subject:
Subject description: How to Automount a USB flash drive in puppy linux |
|
Hi Barry !
thanks for your time, again !
here tested the later drive_all on exprimo 5X3.2.14, render it executable, checked both tick boxes in Icon Handler in /Menu/System/Puppy Event Manager, restared X; then OK !
To bigpup ... thanks a ton ... will soon get a try on it !
To Bala
| Quote: | | i feel i need a step by step to solve this |
Do you need the way to drive_all script download, don't you?
The link to the relevant Barry's blog post is given in the above post referenced
"Posted: Tue May 15, 2012 10:58 pm"
just click on it;
once there, read through to the later comment
"Posted on 17 May 2012, 4:45 by BarryK" there, click on the link to
http://bkhome.org/fossil/woof2.cgi/info/8ecbca0fdd
enter password as explained, and click on the relevant link at bottom of the page, which drives you to the log page of drive_all script; there choose the later (at 1st row... . ); on the new page click on "download" among in the titles ... and the download begins.
Hope this helps !
last edited: ooops ...the tick box to check are in Icon Handler tab in /Menu/System/Puppy Event Manager (here I wrongly checked the autounmount in the Activate tab ...many apologizes
|
|
Back to top
|
|
 |
bala4dj
Joined: 14 May 2012 Posts: 8 Location: Canada
|
Posted: Thu 17 May 2012, 11:04 Post subject:
|
|
Awesome !!! Thank you so much charlie6 .. I really appreciate your patience to write it to me .. I tried and the auto-mount works perfectly well.. Thanks to Barry ! Your post was really helpful to me and my company ! So this is what i m doing ..
/usr/bin/rdesktop -r disk:usb1=/mnt/sdb1 disk:usb2=/mnt/sdc1 disk:usb3=/mnt/sdd1 cdrom=/mnt/sr0 xxx.xxx.xx.xx
I am putting this in /root/.xinitrc ----
so that as soon as the user turns on - he ll not see the puppy startx and it will straight away go to rdeskop !! (my terminal server)
What happens is --- since i have put only sdb1, sdc1, sdd1 --- every time when the usb drive is plugged in - the drive icon name changes to sde1, sdf1, sdg1 ..... etc..
Can this be a fixed name ! or can you please suggest me something - if i m missing any command in rdesktop...
Or what can be done for -- when the user plugs in the usb drive, he should be able to see it in the terminal server screen in My Computer.. no matter how many times he plugs / unplugs .
I am really happy that every time it gives me a progress for what i m doing, but i m stuck somewhere !! help me please . Thank you very much.
|
|
Back to top
|
|
 |
bigpup

Joined: 11 Oct 2009 Posts: 3687 Location: Charleston S.C. USA
|
Posted: Thu 17 May 2012, 11:19 Post subject:
|
|
Have you tried just using this program?
Startmount
http://www.murga-linux.com/puppy/viewtopic.php?t=50845
_________________ I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
Puppy Help 101 An interactive tutorial for Puppy 5.2.5
|
|
Back to top
|
|
 |
bala4dj
Joined: 14 May 2012 Posts: 8 Location: Canada
|
Posted: Thu 17 May 2012, 17:56 Post subject:
|
|
I did try this application !! and it does the same thing as Pmount !! except it has the option to mount all drive on boot up ! also some programs !!
But i m far from this application !! Thank you ..
-- "" /usr/bin/rdesktop -r disk:usb1=/mnt/sdb1 disk:usb2=/mnt/sdc1 disk:usb3=/mnt/sdd1 cdrom=/mnt/sr0 xxx.xxx.xx.xx
I am putting this in /root/.xinitrc ----
so that as soon as the user turns on - he ll not see the puppy startx and it will straight away go to rdeskop !! (my terminal server)
What happens is --- since i have put only sdb1, sdc1, sdd1 --- every time when the usb drive is plugged in - the drive icon name changes to sde1, sdf1, sdg1 ..... etc..
Can this be a fixed name ! or can you please suggest me something - if i m missing any command in rdesktop...
Or what can be done for -- when the user plugs in the usb drive, he should be able to see it in the terminal server screen in My Computer.. no matter how many times he plugs / unplugs . ""
FROM the drive_all script i can see that "$xONEDRVNAME" -- you are calling this function and naming it in /dev/$ONEDRVNAME .... and mkdir -p /mnt/$ONEDRVNAME ..
I want this thing to be reflected in my rdesktop which i connect to ..
Please help me with the syntax or redirection of usb drive to my rdesktop ! Thank you so much to every one..
|
|
Back to top
|
|
 |
jsl06
Joined: 02 Mar 2012 Posts: 9
|
Posted: Fri 18 May 2012, 06:51 Post subject:
|
|
I have not tried this, but have you tried adding the usb drive to etc/fstab.
James
|
|
Back to top
|
|
 |
bala4dj
Joined: 14 May 2012 Posts: 8 Location: Canada
|
Posted: Fri 18 May 2012, 10:04 Post subject:
|
|
Yes !! I have already tried that .. No good !!
One more thing to let you all know that -- A usb pen drive can be plugged only 9 times, at the 10th time, you unplug and plug it in back - IT WONT MOUNT or IT WONT SHOW THE USB ICON !!
sdb1 sdc1 sdd1 sde1 sdf1 sdg1 sdh1 sdi1 sdj1 . it wont take sdk1 etc ...
I am not sure whether it has go this way ! or it can be made a loop ! to start again from sdb1 ... If this works as a loop ! then i think i can think to fix my issue !! any body ??
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6855 Location: Perth, Western Australia
|
Posted: Sun 20 May 2012, 22:16 Post subject:
|
|
| bala4dj wrote: | Yes !! I have already tried that .. No good !!
One more thing to let you all know that -- A usb pen drive can be plugged only 9 times, at the 10th time, you unplug and plug it in back - IT WONT MOUNT or IT WONT SHOW THE USB ICON !!
sdb1 sdc1 sdd1 sde1 sdf1 sdg1 sdh1 sdi1 sdj1 . it wont take sdk1 etc ...
I am not sure whether it has go this way ! or it can be made a loop ! to start again from sdb1 ... If this works as a loop ! then i think i can think to fix my issue !! any body ?? |
That only happens if you don't unmount it prior to unplugging it.
Unmounting a drive's partitions is standard procedure. Even in MS Windows you are supposed to make a drive ready to be unplugged (which flushes the filesystem buffers).
-- in Windows, if I recall rightly, there is a tray applet for doing that.
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
|
|
Page 1 of 2 [20 Posts] |
Goto page: 1, 2 Next |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|