When my system initially boots up, I have noticed that the Mount Tray icon is gray and only shows two options in the menu: Open Media Directory, and Close Tray. I closed it, then relaunched it via the Control Panel shortcut. The icon turned blue and my various partitions/slices showed up as expected.
I set all my internal ntfs partitions/slices to automount. Every time I did, it popped up a file browsing window and everything looked great. I also verifed that ~/.pc-automounttray was populated as expected.
Rebooted my pc to test it out, but on bootup I got the same behavior (gray icon with no drives).
I quit and restarted Mount Tray via the Control Panel again, and it once again listed all the drives, with Auto-mount checked by the ones that I set. However....none of them were mounted. And even if I explicitly try to mount them using the Mount Tray, nothing happens.
I then closed the Mount Tray and launched it from a terminal. Got this output:
pc-mounttray: starting up
-User detected: "Sean"
-File manager detected: "thunar"
-Loading automount device list: "/home/Sean/.pc-automounttray"
-Starting up the DEVD watcher
-Performing initial device scan
-Existing devices discovered:
- "/dev/ada0s1" -> "Movies-03" , "SATA:::NTFS"
Mounting device "/dev/ada0s1" on "/media/Movies-03" ( "NTFS" )
- command: "ntfs-3g /dev/ada0s1 /media/Movies-03"
pc-mounttray: Error creating mountpoint: "/media/Movies-03"
- Error message: ("mkdir: /media/Movies-03: File exists")
- "/dev/ada1s1" -> "Movies-01" , "SATA:::NTFS"
Mounting device "/dev/ada1s1" on "/media/Movies-01" ( "NTFS" )
- command: "ntfs-3g /dev/ada1s1 /media/Movies-01"
pc-mounttray: Error creating mountpoint: "/media/Movies-01"
- Error message: ("mkdir: /media/Movies-01: File exists")
So I deleted /media/Movies-01 as a test and relaunched Mount Tray from the Control Panel. Sure enough, the Movies-01 directory was created and mounted.
I looked at the mountTray.cpp code and the offending line seems to be if( output.join(" ").simplified().isEmpty()
in the "mountDevice" subroutine.
After thinking about it, I think I see why this bug exists. Mount Tray was most likely created for removable devices, so it was expected that the user would always unmount the device (which I see deletes the directory). However, I am using it to attempt to automount my ntfs partitions which are on internal drives. So I don't unmount them before rebooting, I just let the OS do it.
In case you say "Don't do this"...please check out my other post, which has been sadly neglected for far too long: http://forums.pcbsd.org/showthread.php?t=18060
Regardless, I think Mount Tray can react more appropriately to this situation. Ken, since this seems to be your baby, can you check this out and verify?