
Various KDE 1.-4. Improvements
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
This patch creates a pen drive device for kde. It will work best for distros that automount and create fstab entries on the fly, like mandrake.
It applies against kdebase-3.3.2, should work with 3.3.0 and 3.3.1.
Extract the patch, then place the file in kdebase-3.3.*/kioslave.
Run:
patch -p0 < patch
in the same directory. then go back to kdebase directory and run
./configure --prefix='kde-config --prefix'
You must do this even if its already been configured.
After its configured, go to kioslave/devices and run make
After its done, run su, and make install.
Restart KDE, right click on the desktop and go to configure desktop. go to behaviour, device icons, and tick off Mounted Pen Drive.
Now, if there is a /dev/sd** in the fstab, a Pen Drive Icon appears on the desktop.
In Mandrake at least, that means you can plug in a pen drive and the icon appears on the desktop, and it dissappears when the drive is removed.
If anyone out there has scsi discs or ipods or mp3 players can you please give me the output of cat /sys/block/sda/device/info (provided the device is sda)
So I can know how to tell appart a disc from the pen drive.
Thanks
16 years ago
1.1.1 - Fixed Pen Drive not appearing. Whoops!
1.1 - Fixed a bug in the Makefile which caused hard drives to lose their mimetype.
1.1.1 - Fixed Pen Drive not appearing. Whoops!
16 years ago
1.1.1 - Fixed Pen Drive not appearing. Whoops!
1.1 - Fixed a bug in the Makefile which caused hard drives to lose their mimetype.
1.1.1 - Fixed Pen Drive not appearing. Whoops!
fzied
16 years ago
Hi hav a S-ATA disk, a multi-head media reader and a USB flash disk
cat /sys/block/*/device/type gave the following :
ST3160023AS (sda)
USB SD Reader (sdb)
USB CF Reader (sdb)
USB SM Reader (sdd)
USB MS Reader (sde)
USB Flash Disk (sdf --> my flash disk)
Hope it helps.
Report
Savage650
16 years ago
Apart from that, you cant just add any "newly-discovered" storage device to the desktop of (every) random user. One could try to find the session belonging to "the" console user, but what about multiheaded boxes?
Ideally, each user would have a set of private mountpoints (~/.mydev/xxx where ~/mydev is chmod 700) and the system should actively prohibit mounting "private" storage devices anywhere else.
Most of this would be doable with mount-by-label/-by-uuid if the devices were formatted with a "linux-native" FS. Unfortunately, most users will need to use their pen drives on foreign (read: Microsoft) computers too, leaving us with (V)FAT for the FS.
As a userland workaround, one could store ownership and preferred mountpoint(s) in (hidden,signed,encrypted) files in the drive's root directory, but such entries would still be nothing more than "suggestions" for cooperating systems.
Report
yoalieh
16 years ago
Anyway, thought being a bit.. primitive (I've done this to add my kdebluetooth devices), it's useful for those not having multiple scsi devices.
Report
Superstoned
16 years ago
please please?
Report
cmf
16 years ago
Report
philr
16 years ago
Is there a way around this?
Phil.
Report
cfraz89
16 years ago
So I can know how to tell appart a disc from the pen drive.
Thanks
Report
philr
16 years ago
Anything else I can try?
Phil.
Report
cfraz89
16 years ago
If you plug in a pen drive, does it appear in /sys/block?
If only pen drives appear in /sys/block, I could test for the folder to determine a memory key.
Thanks.
Report
philr
16 years ago
[phil@undertaker device]$ ls
block detach_state model queue_depth rev state type
delete device_blocked power rescan scsi_level timeout vendor
[phil@undertaker device]$ pwd
/sys/block/sda/device
[phil@undertaker device]$
Phil.
Report
cfraz89
16 years ago
Do you get one if you plug in a pen drive?
Thanks, Chris.
Report
philr
16 years ago
This is on Fedora Core 3, and it's using udev - I'd blame that, it tries to do everything "dynamically" and has caused me problems with my joypad and getting a /dev/cdrom link, amongst other things.
Phil.
Report
cfraz89
16 years ago
Report
BOSSoNe
16 years ago
here is the rule:
BUS="usb", SYSFS{idVendor}="05dc", SYSFS{idProduct}="0080", NAME="usbkey%n"
this trick allow you to have your device always mount in the same mount path (for me /mnt/usbkey and not /mnt/removable*)
here's a nice tutorial on how to write udev rules:
http://www.reactivated.net/udevrules.php
Bye ;)
Report