mimetypes for directories?

Stef Bon stefbon at gmail.com
Mon Dec 20 08:59:17 PST 2010


Hello,

I would like to know there is a specification for mimetypes for directories.

I'm working on a construction to provide easy, effective, powerfull
and userfriendly access
to the user to various resources like USB drives, harddisks, cdroms,
network connections like
SMB shares.

It's based upon a FUSE filesystem.

More info you'll find here:

http://linux.bononline.nl/wiki/index.php/Changes_and_issues

and

http://linux.bononline.nl/wiki/index.php/Mount.md5key


With this construction it's possible to:

a. offer all kinds of resource in a subdirectory of the users home
map, default $HOME/Workspace.

or

b. create a GoboLinux like environment where are the user gets an
environment where all the system
directories are "gone". They are still there, because otherwise it
will not work, but hidden by the FUSE filesystem.

The directories the user sees:

/Computer
/Network
/Personal
/System

where:

a. all the hardware like ATA and USB disks, audio cdroms, dvd cdroms,
iso cdroms and other hardware are in Computer

b. networkmounts like SMB (=Windows and/or Samba) shares in Network

c. Personal contains the personal folders like Documents and Video
(normally in users homedirectory)

d. System where the original system is remounted


The construction uses the following:
- FUSE of course and fs fuse-workspace-ll
- automounter to mount smb shares through cifs,
- udev to detect hardware dynamically
- ConsoleKit to setup this construction when session starts (and
disable it when session ends)
- at daemon as general launch manager
- nbtscan, nmblookup and smbclient to detect SMB resources
- usb.ids file for userfriendly names usb devices
- library cdparanoia-III for access to audio cd's
- libpamchroot to create the GoboLinux environment using a chroot.
- a lot of bash scripts

To start with the last, I'm working on that at this moment, showing
the contents of an audio cd works (the readdir call),
reading a file not yet, but I hope to get that working this week.

I've been using this construction with KUbuntu, and it works perfectly.

Now this construction uses a sort of mimetypes for directories to
identify directories and the meaning they have in the context.

For example I'm using the type local.dev.disk.ata.partition for a
partition on an ata disk.
Another example: remote.net.smb.share for a remote smb share.

In the construction I'm using primary and secondary resources.

A primary resource is mountable device, an audio cdrom accessible
through cdparanoia, a directory on the local host like
$HOME/Documents). Examples:

- local.dev.cdrom.fs for a cdrom with filesystem
- local.dev.cdrom.audio for an audio cdrom
- local.dev.disk.usb.disk for the whole usb disk
- local.dev.disk.usb.partition for a partition on an usb disk
- remote.net.smb.share for a smb share
- local.map.documents for a map on the localhost containing documents
- local.map.music for a map on the localhost containing music files
- local.map.sys for a system map

A secondary resource does not have to contain valid data, but has some
meaning in the context. For example:

- remote.net.network for the map containing all the different net
services like SMB, FTP, SSHfs etc
- remote.net.smb.workgroup and
- remote.net.smb.server both have meaning in a SMB context, but do not
offer something special other than being a map.
- local.dev.cdrom.empty for a cdrom not containing any media


So my question is, is there already a specification on mimetypes for
directories?

Thanks in advance,

Stef Bon


More information about the xdg mailing list