Lubuntu 12.04 beta 2: "USB detach bug"
selairi at gmail.com
selairi at gmail.com
Thu Mar 29 09:11:37 UTC 2012
Finally I have done a deb package. Then you can install the script and
go to Lubuntu/Accesories/Extract pendrive icon.
You can add icon to panel, see attached image.
Installer is in:
http://dl.dropbox.com/u/4134722/blog/usb-detach_0.1_all.deb
Source code is in:
http://dl.dropbox.com/u/4134722/blog/usb-detach-0.1.tar.gz
I'm reading documentation for ubuntu ppa.
Thanks
El día 28 de marzo de 2012 17:15, Karl Anliot<kanliot at gmail.com> escribió:
> yeah works ok
>
>
>
>
> On Wed, Mar 28, 2012 at 10:26 AM, Pedro L. Lucas<selairi at gmail.com> wrote:
>>
>> Sorry. My fault. I haven't check partitions in your pendrive. This
>> should work ok:
>>
>> http://dl.dropbox.com/u/4134722/blog/usb3.py
>>
>> I have test it in my pendrives (only a few) and it works ok.
>>
>> Thanks you
>>
>>
>> El día 28 de marzo de 2012 15:02, Karl Anliot<kanliot at gmail.com>
>> escribió:
>> > i've attached the stack trace, i think it crashed
>> > :)
>> >
>> > x:~/Downloads$ ls *py
>> > usb2.py usb.py
>> > x:~/Downloads$ python usb2.py
>> > /org/freedesktop/UDisks/devices/sdb
>> > Traceback (most recent call last):
>> > File "usb2.py", line 109, in reload_callback
>> > for usb in usb_list():
>> > File "usb2.py", line 213, in usb_list
>> > usb_list=parse_udisks()
>> > File "usb2.py", line 262, in parse_udisks
>> > partitions_list=list_partitions(bus, devices, path)
>> > File "usb2.py", line 243, in list_partitions
>> >
>> > partitions_list.append(device_props.Get('org.freedesktop.UDisks.Device',
>> > "DeviceMountPaths")[0])
>> > IndexError: list index out of range
>> > /org/freedesktop/UDisks/devices/sdb
>> > Traceback (most recent call last):
>> > File "usb2.py", line 109, in reload_callback
>> > for usb in usb_list():
>> > File "usb2.py", line 213, in usb_list
>> > usb_list=parse_udisks()
>> > File "usb2.py", line 262, in parse_udisks
>> > partitions_list=list_partitions(bus, devices, path)
>> > File "usb2.py", line 243, in list_partitions
>> >
>> > partitions_list.append(device_props.Get('org.freedesktop.UDisks.Device',
>> > "DeviceMountPaths")[0])
>> > IndexError: list index out of range
>> >
>> >
>> >
>> >
>> >>
>> >
>> > On Wed, Mar 28, 2012 at 8:52 AM, selairi at gmail.com<selairi at gmail.com>
>> > wrote:
>> >>
>> >> Hello,
>> >>
>> >> I have written a better script here:
>> >>
>> >> http://dl.dropbox.com/u/4134722/blog/usb2.py
>> >>
>> >> Could you please test it?
>> >>
>> >> You shouldn't lose data on a FAT32 file system. Maybe your pendrive has
>> >> not been unmounted or your pendrive is broken. You should check
>> >> badblocks in
>> >> your drive:
>> >>
>> >> sudo badblocks -v /dev/hdXX> bad-blocks
>> >>
>> >> where /dev/hdXX is your pendrive device.
>> >>
>> >> Thanks
>> >>
>> >> El 27/03/12 12:02, Karl Anliot escribió:
>> >>
>> >> yor script doesn't list my usb device.
>> >> Is it really typical that you would lose data on a fat32 file system?
>> >>
>> >> I though that buffers are flushed on fat32 pretty quickly
>> >>
>> >> On Mon, Mar 26, 2012 at 5:49 AM, Pedro L. Lucas<selairi at gmail.com>
>> >> wrote:
>> >>>
>> >>> El día 26 de marzo de 2012 11:12, Karl Anliot<kanliot at gmail.com>:
>> >>> > Your script doesn't work on my pc.
>> >>>
>> >>> Why? Does it detach? Does it show window? Is there any terminal
>> >>> output?
>> >>>
>> >>> > IMHO, if we added a duplicate safe remove/power off/detatch to what
>> >>> > is
>> >>> > already in disk utility (palmpiset)
>> >>> > it should either be integrated with pcmanfm or, sit in the system
>> >>> > tray.
>> >>>
>> >>> I'm reading pcmanfm code, but it is faster write a simple python
>> >>> script in order to test detach. Then I would include it in pcmanfm,
>> >>> when I have understood the code.
>> >>>
>> >>> Moreover the script can be used by other projects, ex. icewm, fvwm,...
>> >>>
>> >>> Thanks
>> >>>
>> >>> > On Mon, Mar 26, 2012 at 4:42 AM, Pedro L. Lucas<selairi at gmail.com>
>> >>> > wrote:
>> >>> >>
>> >>> >> Hello, I'm testing Lubuntu 12.04 beta 1. I have just found a bug:
>> >>> >> If
>> >>> >> you try to detach a USB pendrive, PCManFM will only allow you
>> >>> >> umount
>> >>> >> your pendrive (not detach). If you detach your pendrive, the
>> >>> >> pendrive
>> >>> >> will be switch off. If you unmount your pendrive, it will be
>> >>> >> unmount
>> >>> >> but not switch off.
>> >>> >>
>> >>> >> I have tested with pendrives and usb hard drives.
>> >>> >>
>> >>> >> I have written a simple Gtk2 + python script to detach devices. The
>> >>> >> script shows a simple window with all USB devices plugged. Then you
>> >>> >> can detach it.
>> >>> >>
>> >>> >> You can download this script from:
>> >>> >>
>> >>> >> http://dl.dropbox.com/u/4134722/blog/usb.py
>> >>> >>
>> >>> >> Would it be possible include it in Lubuntu? What must I do?
>> >>> >>
>> >>> >> Thanks, and sorry for my broken English
>> >>> >>
>> >>> >> --
>> >>> >> Lubuntu-users mailing list
>> >>> >> Lubuntu-users at lists.ubuntu.com
>> >>> >> Modify settings or unsubscribe at:
>> >>> >> https://lists.ubuntu.com/mailman/listinfo/lubuntu-users
>> >>> >
>> >>> >
>> >>
>> >>
>> >>
>> >
>
>
More information about the Lubuntu-users
mailing list