disk icons


Forum: X and Fluxbox
Topic: disk icons
started by: kreon28

Posted by kreon28 on May 05 2007,14:19
Hi,

I put some png with disk icons on my desktop.
Now, what should I write in a .lnk files to open a window with my /mnt/hda1 contents ?

Posted by curaga on May 05 2007,16:47
If you mean like a Windows folder view, no chance. But in the emelfm two-sided view it would be
"emelfm /mnt/hda1", I think...

Posted by kreon28 on May 05 2007,17:31
Quote (curaga @ May 05 2007,12:47)
If you mean like a Windows folder view, no chance. But in the emelfm two-sided view it would be
"emelfm /mnt/hda1", I think...

Thanks again for your help and ok, I mean window rather like GNOME or KDE but...anyway
that emelfm could be enough if I can mount that disks.
In that moment my fstab looks like this:

Code Sample

/dev/hda2  /  ext3  defaults,errors=remount-ro  0  1
proc  /proc  proc  defaults  0  0
/dev/fd0  /mnt/auto/floppy  vfat  defaults,users,noauto,rw,showexec,umask=000  0  0
/dev/cdrom  /cdrom  iso9660  defaults,ro,user,noexec,noauto  0  0
/dev/hda1 /mnt/hda1 vfat noauto,users,exec,umask=000,uid=1001,gid=50 0 0
/dev/hda5 none swap defaults 0 0
/dev/hdb1 /mnt/hdb1 vfat noauto,users,exec,umask=000,uid=1001,gid=50 0 0

and I pasted in .xintrc something like:
Code Sample

mount /dev/hda1 /mnt/hda1 &
mount /dev/hdb1 /mnt/hdb1 &


Anyway the fstab doesn't remeber changes after reboot and disks aren't mounted immediately after reboot so I have to use that little automount tool

Now, my first goal is to have mounted the two vfat partitions in main tree at boot
e.g. in fstab
mount /dev/hda1 /Disk_C

and
second goal is using that icon which can point to disk (but you have answered how to do that already in emelfm)

P.S. I have also problem with my floppy, which can be mounted and unmounted only by root and of course I have looked for the answer in the board but unfortunately advices which helped others, didn't help me
P.P.S. I read here in the forum about CD-Rom automounting.
I mean it would be great if I shouldn't have to mount cd-rom every cd I put but rather have some option which can monitor my cd and mount it automaticly. I know that such automounter exist but I don't know which tool I should look for.

Posted by ^thehatsrule^ on May 05 2007,18:45
If you mean a "file manager", in gnome its nautilus and kde uses konquerer (which are much heavier than emelfm).  In mydsl there's rox filer if you want to try that out.

If you want to edit fstab in a frugal, you can boot with "nofstab" and restore your own - but it may be easier to put the mount commands in bootlocal.sh for example (.xinitrc should be reserved for X apps). You could do something like "mkdir /Disk_C && mount /dev/hda1 /Disk_C"

I think you can use the Icon tool to modify/create icons.  If you want to make one manually check in ~/.xtdesktop (see wiki for more info)

For floppy as a regular user, you can try (re)placing a line in fstab for it and set gid/uid flags.

automount was stripped out of DSL, so it isn't there even if you see messages relating to it during boot.  I suppose you can put it back in from the Knoppix cd though.

Posted by kreon28 on May 06 2007,07:43
Quote (^thehatsrule^ @ May 05 2007,14:45)
If you want to edit fstab in a frugal, you can boot with "nofstab" and restore your own - but it may be easier to put the mount commands in bootlocal.sh for example (.xinitrc should be reserved for X apps). You could do something like "mkdir /Disk_C && mount /dev/hda1 /Disk_C"

I think you can use the Icon tool to modify/create icons.  If you want to make one manually check in ~/.xtdesktop (see wiki for more info)

For floppy as a regular user, you can try (re)placing a line in fstab for it and set gid/uid flags.

automount was stripped out of DSL, so it isn't there even if you see messages relating to it during boot.  I suppose you can put it back in from the Knoppix cd though.

I tried to edit bootlocal.sh but I got an error during boot
Code Sample
mount: Invalid argument
(the directory Dysk_C was created)
So I think I should try to make my own fstab, but how to do that if fstab is not remembered after boot?
(I know I can do "nofstab" but if I do that /etc/fstab would be remebered? - I've got HD install of DSL)

Posted by curaga on May 06 2007,12:07
Hd install remembers all.. Just use the nofstab code, so it won't overwrite it on reboot.

There is also supermount, which is a kernel side thingy, so it's lighter and more convenient than automounter. But you need to compile your own kernel for that....

Make the directories you want before rebooting.. Here would be your fstab little modified:
Quote
/dev/hda2  /  ext3  defaults,errors=remount-ro  0  1
proc  /proc  proc  defaults  0  0
/dev/fd0  /mnt/auto/floppy  vfat  defaults,users,noauto,rw,showexec,umask=000,uid=1001,gid=50  0  0
/dev/cdrom  /cdrom  iso9660  defaults,ro,user,noexec,noauto,uid=1001,gid=50  0  0
/dev/hda1 /disk_A vfat auto,users,exec,umask=000,uid=1001,gid=50 0 0
/dev/hda5 swap swap defaults 0 0
/dev/hdb1 /disk_B vfat auto,users,exec,umask=000,uid=1001,gid=50 0 0

Posted by kreon28 on May 10 2007,16:10
Quote (curaga @ May 06 2007,08:07)
Make the directories you want before rebooting.. Here would be your fstab little modified:
Quote
/dev/hda2  /  ext3  defaults,errors=remount-ro  0  1
proc  /proc  proc  defaults  0  0
/dev/fd0  /mnt/auto/floppy  vfat  defaults,users,noauto,rw,showexec,umask=000,uid=1001,gid=50  0  0
/dev/cdrom  /cdrom  iso9660  defaults,ro,user,noexec,noauto,uid=1001,gid=50  0  0
/dev/hda1 /disk_A vfat auto,users,exec,umask=000,uid=1001,gid=50 0 0
/dev/hda5 swap swap defaults 0 0
/dev/hdb1 /disk_B vfat auto,users,exec,umask=000,uid=1001,gid=50 0 0

I did as you wrote.
Made "nofstab" in grub and all changes have been remembered.
In .xintrc I wrote mount /dev/hda1 /disk_A but the disks are not mounted.
After the command in terminal:
Code Sample

# mount /dev/hda1 /disk_A
only root can do that


p.s where can I find some info about supermount in DSL ?

Posted by mikshaw on May 10 2007,18:01
If your device is properly listed in fstab (it looks like it is), you can mount it using only the device name or mountpoint. Using both apparently causes mount to ignore what's in fstab, so you end up needing to be root, specify a filesystem type, etc.

But you have "auto" as an option for that device in fstab, so I think something else is wrong. You shouldn't need to mount from .xinitrc in that case.

Posted by lucky13 on May 10 2007,21:45
I'm curious why you're mounting in .xinitrc instead of during the boot process or otherwise before starting X. If you insist on mounting devices while starting X (which is what that file is for), did you try using sudo in your command? Hint: "only root can do that."

EDIT 10 May:
You can also change permissions for that partition so you can mount it as user (dsl, yourname, etc.) without sudo. That's not necessarily preferable, but I still wouldn't use .xinitrc to handle filesystem tasks like that. Why not write a script to mount and open emelfm to that partition when you click on the icon?

Posted by kreon28 on May 12 2007,06:32
I deleted code in .xinitrc about disk mounting but the disks are still not mounted by command "mount".
Mounting can be done only by root
I could use sudo but if I mount for example floppy as sudo I can't write to floppy as regular user.
Well, now I don't know what to do.

Posted by curaga on May 12 2007,08:47
Check the mount point permissions (ls -l /mnt) and the device permissions (ls -l /dev/hda1)
If they aren't writable for group (something like drwxrw-r--) then user DSL cannot write to them...

Posted by kreon28 on May 12 2007,10:30
Code Sample
# ls -l /mnt
drwxrwxrwx 2 root root 4096 oct 7 2006 hda1
drwxr-xr-x   2 root root 4096 oct 7 2006 hdb1

Code Sample
#ls -l /dev/hda1
brwxrwxrwx 1 root disk 3, 1apr 14 2001/dev/hda1

Posted by curaga on May 12 2007,12:30
if you mount a floppy just as "sudo mount /dev/fd0" it should take the params from fstab, and let dsl write there.. Try that?
Posted by kreon28 on May 12 2007,15:36
Quote (curaga @ May 12 2007,08:30)
if you mount a floppy just as "sudo mount /dev/fd0" it should take the params from fstab, and let dsl write there.. Try that?

Yes, I tried that also
Code Sample
# sudo mount /dev/fd0 /mnt/auto/floppy

Then, after browsing as dsl user in enelfm to /mnt/auto/floppy I got "Permission denied"

Posted by curaga on May 13 2007,10:08
ls -l /mnt/auto?
Posted by kreon28 on May 13 2007,11:13
Code Sample
# sudo ls -l /mnt/auto
drwxr-xr-x 2 root root 4096 oct 7 2006 cdrom
drwxr-xr-x 2 root root 4096 oct 7 2006 floppy

Posted by curaga on May 13 2007,13:51
That's the problem.
Quote
sudo chmod a+w /mnt/auto/*
And the problem disappears...

Posted by kreon28 on May 13 2007,15:26
Quote (curaga @ May 13 2007,09:51)
That's the problem.
Quote
sudo chmod a+w /mnt/auto/*
And the problem disappears...

Unfortunately, still nothing.
Code Sample
ls -l /mnt/auto/floppy
drwxr---r-- 3 root root 7168 Dec 31 1969 floppy

As a dsl user I can't browse floppy. (During boot there is a process of automount /cdrom and floppy/ - maybe that's making a problem?)

p.s After mounting as sudo my VFAT hard drives, regular user also can't browse these disks

Posted by mikshaw on May 13 2007,22:26
Automount doesn't exist in DSL. That message is just a carry-over from Knoppix.

If you mount a floppy as root (using sudo, for example), the floppy will be owned by root. Mount it as user dsl and that user will own the floppy.

Changing the permissions of the mount point to permit writing is not going to help if you still are not allowed to read.
drwxr-xr-x means dsl can't read it.
drwxr-wxr-wx (after running chmod a+w) means dsl still can't read it.
A single "x" for a permission is fairly useless.

Posted by kreon28 on May 14 2007,14:26
Quote (mikshaw @ May 13 2007,18:26)
Automount doesn't exist in DSL. That message is just a carry-over from Knoppix.

If you mount a floppy as root (using sudo, for example), the floppy will be owned by root. Mount it as user dsl and that user will own the floppy.

Changing the permissions of the mount point to permit writing is not going to help if you still are not allowed to read.
drwxr-xr-x means dsl can't read it.
drwxr-wxr-wx (after running chmod a+w) means dsl still can't read it.
A single "x" for a permission is fairly useless.

Yes, but as I said I can't mount any device as dsl user and I don't know why.
Posted by mikshaw on May 14 2007,20:00
Have you tried mounting it with *only* the device name or mountpoint as the parameter? From the examples you have posted it looks like you have not. I think I've already mentioned that mount apparently ignores /etc/fstab options if you provide more than a single argument to the mount command. I have never seen this documented, but it seems to be what happens.

mount /dev/fd0
or
mount /mnt/auto/floppy

Posted by kreon28 on May 15 2007,16:32
Yes! :D, that's what I'm talkin' about. At last.
Now it works
But other problems still exist.
I mean, as I said earlier, it would be great to click a disk icon and have emelfm open with my Disk_A catalog.
I made an icon and put a command line in a .lnk file:
Code Sample
emelfm /Disk_A

When I click it, emelf opens but with a standard view and I have to  enter the Disk_A catalog.
The other question is a supermount kernel option. How can I enable it? (Compile the kernel or what?)
p.s. I have noticed that during mounting openoffice2.dsl, on my desktop openoffice icons are made. But some of them (openoffice impress, calc and base) are laying on themselves. :angry:

Posted by lucky13 on May 15 2007,20:33
You might want to try the rox extension. It gives you a lot more flexibility in how you operate your desktop (managing icons), works as a file manager (drag and drop between directories), mounter (right click a mountable for mount/unmount options), etc.

I have a couple rox-related pages on by blog (www link at bottom of reply). I have a few pics up there as well as in the "my stuff" category showing mountable icons and overlays (I posted a pic showing new overlays I threw together this morning).

EDIT: BTW, rox does what you're trying to get xtdesk to do. It opens a window showing whatever you just mounted.

Posted by mikshaw on May 15 2007,21:12
The Emelfm issue is one that has been with DSL for quite a while. In order to fix an old problem with Emelfm and the desktop icons, a wrapper script was created. This script is actually what is first called when you run the "emelfm" command, and it does not pass commandline parameters to the actual Emelfm program. The result is that emelfm never receives the directory and it opens as if it were called without arguments.

You can override this by using emelfm.bin instead of emelfm. I never knew what the original icon problem was, since i don't use desktop icons myself, so it may cause troubles for you.  You could edit the emelfm script instead, adding a space followed by "$@" after the emelfm command (including the quotes).

Posted by curaga on May 16 2007,06:38
Supermount lives as a patch. It's not updated from 2.4.24 onwards, so I recommend getting it from Con Kolivas patchset, because he has updated it to work with newer kernels. Then on kernel config it can be selected in the filesystems menu..

It's then used like this:
mount none /floppy -t supermount -o dev=/dev/fd0

It's meant for removable devices; when inserted, it does nothing. But if one is in when you cd into that directory, it mounts it automatically, and the second you stop writing to it, you can just remove the floppy/cd/whatever instantly... No mounting/unmounting hassles..

Posted by kreon28 on May 16 2007,15:09
Quote (curaga @ May 16 2007,02:38)
Supermount lives as a patch. It's not updated from 2.4.24 onwards, so I recommend getting it from Con Kolivas patchset, because he has updated it to work with newer kernels. Then on kernel config it can be selected in the filesystems menu..

It's then used like this:
mount none /floppy -t supermount -o dev=/dev/fd0

It's meant for removable devices; when inserted, it does nothing. But if one is in when you cd into that directory, it mounts it automatically, and the second you stop writing to it, you can just remove the floppy/cd/whatever instantly... No mounting/unmounting hassles..

I downloaded the kernel supermount patch in a deb file. I installed it but I wonder if I have to compile a kernel, or it is not necessary?

p.s Have you try any special patchset? Because I've got kernel 2.4.26.

Posted by curaga on May 17 2007,07:04
Yes, to enable it, you need to compile the kernel... I got it from < here > for 2.4.26...

The full patchset is not needed. And while your at it, I recommend adding bootsplash also ;)

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.