Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: [11.2 Gnome] Where to set shortname=winnt mount option?

  1. #1

    Question [11.2 Gnome] Where to set shortname=winnt mount option?

    Where do I set the default mount options for automounted removable drives, like memory cards?

    Right now the cards are being mounted with shortname=lower. That option causes my (vfat) memory card's files to appear with lowercase letters, but I'm more used to have 8.3-style msdos filenames as uppercase, (unless specifically mixed case).

    I've tried editing the setting in gconf, as well as editing /usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi, nothing works. Mount keeps using shortname=lower, regardless of what settings I put in those 2 locations.

    Searching the forums gave me those 2 locations above, and nothing too current.


    thanks

  2. #2

    Default Re: [11.2 Gnome] Where to set shortname=winnt mount option?

    ^up .. .. ..

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,869

    Default Re: [11.2 Gnome] Where to set shortname=winnt mount option?

    As HAL is the one that does the mounting, looking somewhere in its files might give you a clue. many be searching for "shortname=lower" will help.

    But I admit that HAL is not the not very easy to understand.
    Henk van Velden

  4. #4

    Default Re: [11.2 Gnome] Where to set shortname=winnt mount option?

    I tried looking into this file: /usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi

    It doesn't have shortname=lower anywhere, in only has

    Code:
    <append key="volume.mount.valid_options" type="strlist">shortname=</append>
    I changed it to:

    Code:
    <append key="volume.mount.valid_options" type="strlist">shortname=winnt</append>
    restarted haldaemon, but mount still shows shortname=lower

  5. #5

    Default Re: [11.2 Gnome] Where to set shortname=winnt mount option?

    I tried to manually run gnome-mount, and it did try to use the gconf setting, however, it said that shortname=winnt is not allowed for my uid. It worked when set to win95 though, which is close enough.

    Code:
    gnome-mount -vdb /dev/sdf1
    Code:
    gnome-mount 0.8
    ** (gnome-mount:10586): DEBUG: Mounting /org/freedesktop/Hal/devices/volume_label_EOS_DIGITAL
    ** (gnome-mount:10586): DEBUG: read default option 'shortname=winnt' from gconf strlist key /system/storage/default_options/vfat/mount_options
    ** (gnome-mount:10586): DEBUG: read default option 'flush' from gconf strlist key /system/storage/default_options/vfat/mount_options
    ** (gnome-mount:10586): DEBUG: read default option 'utf8' from gconf strlist key /system/storage/default_options/vfat/mount_options
    ** (gnome-mount:10586): DEBUG: read default option 'uid=' from gconf strlist key /system/storage/default_options/vfat/mount_options
    ** (gnome-mount:10586): DEBUG: Mounting /org/freedesktop/Hal/devices/volume_label_EOS_DIGITAL with mount_point='EOS_DIGITAL', fstype='', num_options=4
    ** (gnome-mount:10586): DEBUG:   option='shortname=winnt'
    ** (gnome-mount:10586): DEBUG:   option='flush'
    ** (gnome-mount:10586): DEBUG:   option='utf8'
    ** (gnome-mount:10586): DEBUG:   option='uid=1000'
    ** Message: Mount failed for /org/freedesktop/Hal/devices/volume_label_EOS_DIGITAL
    org.freedesktop.Hal.Device.Volume.InvalidMountOption : The option 'shortname=winnt' is not allowed for uid=100
    So I set it to 'shortname=win95' in gconf, and it worked. The setting is in the following key
    Code:
    /system/storage/default_options/vfat/mount_options

  6. #6

    Default Re: [11.2 Gnome] Where to set shortname=winnt mount option?

    Quote Originally Posted by r8dhex View Post
    I tried to manually run gnome-mount, and it did try to use the gconf setting, however, it said that shortname=winnt is not allowed for my uid. It worked when set to win95 though, which is close enough.

    Code:
    gnome-mount -vdb /dev/sdf1
    Code:
    gnome-mount 0.8
    ** (gnome-mount:10586): DEBUG: Mounting /org/freedesktop/Hal/devices/volume_label_EOS_DIGITAL
    ** (gnome-mount:10586): DEBUG: read default option 'shortname=winnt' from gconf strlist key /system/storage/default_options/vfat/mount_options
    ** (gnome-mount:10586): DEBUG: read default option 'flush' from gconf strlist key /system/storage/default_options/vfat/mount_options
    ** (gnome-mount:10586): DEBUG: read default option 'utf8' from gconf strlist key /system/storage/default_options/vfat/mount_options
    ** (gnome-mount:10586): DEBUG: read default option 'uid=' from gconf strlist key /system/storage/default_options/vfat/mount_options
    ** (gnome-mount:10586): DEBUG: Mounting /org/freedesktop/Hal/devices/volume_label_EOS_DIGITAL with mount_point='EOS_DIGITAL', fstype='', num_options=4
    ** (gnome-mount:10586): DEBUG:   option='shortname=winnt'
    ** (gnome-mount:10586): DEBUG:   option='flush'
    ** (gnome-mount:10586): DEBUG:   option='utf8'
    ** (gnome-mount:10586): DEBUG:   option='uid=1000'
    ** Message: Mount failed for /org/freedesktop/Hal/devices/volume_label_EOS_DIGITAL
    org.freedesktop.Hal.Device.Volume.InvalidMountOption : The option 'shortname=winnt' is not allowed for uid=100
    So I set it to 'shortname=win95' in gconf, and it worked. The setting is in the following key
    Code:
    /system/storage/default_options/vfat/mount_options
    It seems like I spoke to soon. It's only reading the gconf and mounting shortname=win95 when I manually run gnome-mount. However, if I plug in the card reader, it still mounts as shortname=lower.

  7. #7

    Default Re: [11.2 Gnome] Where to set shortname=winnt mount option?

    Further testing seems to show that gnome-mount isn't even involved with my situation, that's why it's not using the values in gconf.

    I renamed /usr/bin/gnome-mount program to gnome-mount.orig, and put a bash script called gnome-mount in it's place, to try to intercept the call to gnome-mount. Plugging the card-reader in doesn't seem to call gnome-mount at all.

    HAL seems only concerned with enumerating devices, and not involved with the actual mount. While the changes to the .fdi file do reflect in lshal, whatever is doing the actual mount seems to be ignoring the HAL "recommendations"

    Gnome-mount doesn't seem to be involved either. manually invoking gnome-mount does read the gconf setting. However, replacing the gnome-mount binary with a wrapper script demonstrates that it isn't being called, hence, doesn't use gconf settings.

    How do I find out which processes are involved with the automounting?

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,869

    Default Re: [11.2 Gnome] Where to set shortname=winnt mount option?

    I am not with you here. May be we use the same words for different things, or different words for the same things (the base for a lot of misunderstandings in this world )

    What we are looking at here is NOT automounting. Automount is an extension to NFS. Like NFS started by Sun Microsystems years ago. It is about mounting NFS mounts only when needed. That is when a user accesses a file inside the mount, that mount is then done. after some time of none usage, an umount is done. The main configuration is in /etc/auto.master. I repeat, that is NOT what we are talking about here.

    I do not know what you mean by "enumerating devices". When a device shows up, the kernel gives it an unique number (MINOR) within the category (MAJOR) it belongs to. The kernel then signals the udev daemon and udevd then creates the device special files like /dev/sdf, /dev/sdf1, /dev/sr0 and the /dev/disk/by-... entries in /dev/ (whatever is needed).

    HAL is signaled by udevd. HAL checks if there is an entry for the device in /etc/fstab. When yes, HAL sees this as prove that the device is not to be handled by HAL and does not do anything. When HAL decides that is has to mount, it creates a mount point. For this it creates a directory in /media. The name of this directory will be the volume label of the partition. When no volume lable is available it will use the class of the device (disk, cd, dvd) and when allready in use it will add numbers to this (disk-1) to make them unique (thus, today the mountpoint may be /media/disk and tomorrow, when allready another device is connnected earlier, it may be /dev/disk-1 for tthe same device). Hal then does the mount (and here lies our big question: WHERE DO THE FS PARANMETERS COME FROM?). The mount is not done by any component of your desktop for the simple reason that they do not run as root.

    HAL communicates with the desktop to find out who must be the owner of the mount point. HAL signals back to the desktop that it mounted and the desktop can then inform the user (e.g. by pop-up window). One of the problems here is that Linux is a multi user system. Thus which one of the running desktop sessions is involved here?

    The above to make the whole process a bit more transparent to you. I am not a Gnome user, thus I do not know how the Gnome desktop handles this together with HAL.
    Henk van Velden

  9. #9

    Default Re: [11.2 Gnome] Where to set shortname=winnt mount option?

    Quote Originally Posted by hcvv View Post
    I am not with you here. May be we use the same words for different things, or different words for the same things (the base for a lot of misunderstandings in this world )
    Yes, probably.

    What we are looking at here is NOT automounting. Automount is an extension to NFS. Like NFS started by Sun Microsystems years ago. It is about mounting NFS mounts only when needed. That is when a user accesses a file inside the mount, that mount is then done. after some time of none usage, an umount is done. The main configuration is in /etc/auto.master. I repeat, that is NOT what we are talking about here.
    Understood, I am not talking about NFS, just talking about automatically mounted usb devices. Specifically, a card reader with vfat filesystem.

    I do not know what you mean by "enumerating devices". When a device shows up, the kernel gives it an unique number (MINOR) within the category (MAJOR) it belongs to. The kernel then signals the udev daemon and udevd then creates the device special files like /dev/sdf, /dev/sdf1, /dev/sr0 and the /dev/disk/by-... entries in /dev/ (whatever is needed).

    HAL is signaled by udevd. HAL checks if there is an entry for the device in /etc/fstab. When yes, HAL sees this as prove that the device is not to be handled by HAL and does not do anything. When HAL decides that is has to mount, it creates a mount point. For this it creates a directory in /media. The name of this directory will be the volume label of the partition. When no volume lable is available it will use the class of the device (disk, cd, dvd) and when allready in use it will add numbers to this (disk-1) to make them unique (thus, today the mountpoint may be /media/disk and tomorrow, when allready another device is connnected earlier, it may be /dev/disk-1 for tthe same device).
    This clears things up for me a bit, thanks.

    Hal then does the mount (and here lies our big question: WHERE DO THE FS PARANMETERS COME FROM?).
    This is my main issue, if it's HAL that does the mount, then how do I properly edit the configuration to use shortname=win95? Whatever I edit doesn't seem to affect the operation of HAL in any significant way.

    The mount is not done by any component of your desktop for the simple reason that they do not run as root.
    What you're saying is that gnome-mount could not be responsible for mounting, since it's not run as root?

    HAL communicates with the desktop to find out who must be the owner of the mount point. HAL signals back to the desktop that it mounted and the desktop can then inform the user (e.g. by pop-up window). One of the problems here is that Linux is a multi user system. Thus which one of the running desktop sessions is involved here?

    The above to make the whole process a bit more transparent to you. I am not a Gnome user, thus I do not know how the Gnome desktop handles this together with HAL.
    From what you said, it seems that the mount is desktop-agnostic, and would probably be mounted by the same daemon/program/process whether on KDE or Gnome. The question is which one? And where does that process store it's settings.

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,869

    Default Re: [11.2 Gnome] Where to set shortname=winnt mount option?

    What you're saying is that gnome-mount could not be responsible for mounting, since it's not run as root?
    Yes, but gnome-mount can talk to a daemon running as root (using e.g. DBUS) and that will then do the mount. That daemon might be HAL.

    From what you said, it seems that the mount is desktop-agnostic, and would probably be mounted by the same daemon/program/process whether on KDE or Gnome. The question is which one? And where does that process store it's settings.
    HAL does the mounting on behalf of the desktop. When you (and everybody else if you have more users) log out of the GUI and connect a device, HAL will not mount. You can check this by logging in from logical screen 1 (using Ctrl-Alt-F1), become root and use
    Code:
    mount
    When you then log in into the GUI (using Ctrl-Alt-F7 to get to the login screen) and check back at screen 1 with mount again, you will see it is mounted now. This is what I experienced in a test this morning.

    When you use "HAL mount paramaters" in Google you will get some interesting results. Among them Arch Linux Forums / How to change hal mount options. At post #5 there is an example how to influence HAL's actions. Not everybodies piece of cake.
    Henk van Velden

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •