Page 2 of 2 FirstFirst 12
Results 21 to 32 of 32

Thread: File Open dialog does not show mounted servers under Ubuntu

  1. #21
    Join Date
    Jan 2008
    Posts
    155
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: File Open dialog does not show mounted servers under Ubuntu

    The problem arises when accessing a remote server from a Ubuntu platform. On Windows or Mac, remote server volumes are visible in the QFileDialog file browser.
    The operating system on the remote server (in your case fedora) seems not important in this case.
    MacOSX user dabbling with Linux and Windows.

  2. #22
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: File Open dialog does not show mounted servers under Ubuntu

    Quote Originally Posted by bnilsson View Post
    The problem arises when accessing a remote server from a Ubuntu platform. On Windows or Mac, remote server volumes are visible in the QFileDialog file browser.
    The operating system on the remote server (in your case fedora) seems not important in this case.
    Hmm... is it possible that the scope of the visibility of the "mounted servers" in Gnome is adjustable? I mean that one application can see them and the other doesn't? That's the case with KDE's "Places" feature (a place can be global or local to an app), maybe in Gnome it is somehow similar?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #23
    Join Date
    Jan 2008
    Posts
    155
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: File Open dialog does not show mounted servers under Ubuntu

    I now realize I forgot to report that I got the answer of the true cause of the problem.
    Below is the response from "Qt bugreports" on this issue.
    This is a deeper problem. It happens that QFile by design cannot handle virtual file systems, which is what Gnome uses underneath. Therefore the file dialog explicitly hides the remotes to avoid showing something that will not be usable.
    Seems you were right all the time, wysota.
    My apologies.

    However, my workaround
    ln -s .gvfs servers
    works fine, virtual file systems or not. I can then open the folder "servers" and access my mounted volumes from there. Maybe the access methods I use is a special case which works anyway.
    MacOSX user dabbling with Linux and Windows.

  4. #24
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: File Open dialog does not show mounted servers under Ubuntu

    I think you need to open the folder "servers" prior to accessing it with QFile. I mean you can't do:
    Qt Code:
    1. QFile file("~/servers/someserver/x/y/z");
    To copy to clipboard, switch view to plain text mode 
    before accessing the bare "servers" directory first, right? The latter will probably mount (as in Unix mount) the server and then anyone can use it as it is part of the real filesystem.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #25
    Join Date
    Jan 2008
    Posts
    155
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: File Open dialog does not show mounted servers under Ubuntu

    I am not sure I follow you, I "communicate" with the file system by QFileDialog only, and browse to the file I want, and supply the output QString to the QFile functions I use.
    Unless I make this "server" symlink there is nothing to browse to.
    I create the "server" symlink once in my home folder, and it is always there since. If I do "Connect to server" in the "Places" menu it gets a content, otherwise not.
    The folder "server" is actually ~/.gvfs, (which might mean 'gnome virtual file system'?)
    Actually, I never explicitly checked the content of the string received from
    QString fileName = QFileDialog::getOpenFileName
    after I have selected a file in a remote volume, so I do not know how it is expressed, abnd if there are any potential problems.
    But yes, the server needs to be mounted before it can be accessed by QFileDialog thru its mountpoint in the ~/.gvfs.
    MacOSX user dabbling with Linux and Windows.

  6. #26
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: File Open dialog does not show mounted servers under Ubuntu

    Quote Originally Posted by bnilsson View Post
    I am not sure I follow you, I "communicate" with the file system by QFileDialog only, and browse to the file I want, and supply the output QString to the QFile functions I use.
    Unless I make this "server" symlink there is nothing to browse to.
    No, it's not what I mean. I don't use Gnome on a daily basis so I don't know exactly how the file dialog from it looks like but I guess it probably has a field where you can enter the directory path you want to browse. Now my guess is that if you enter some subdirectory of your "server" symlink without going explicitly through the "server" directory (like you do when browsing by clicking on directories in the list) your workaround will not work because there will be nothing "under" '~/server'. The same way it will not work when explicitly assigning a path to a QFile without the use of QFileDialog (like when accessing a "recent" file or some other setting that was stored some time in the past).

    Your workaround is probably similar to clicking on the .gvfs entry directly, after all a soft-link is just an alias to some other inode.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #27
    Join Date
    Jan 2008
    Posts
    155
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: File Open dialog does not show mounted servers under Ubuntu

    Well, communication is difficult sometimes.
    The symlink "servers" is created by me, and represents ~/.gvfs, just because "dot-files" are normally hidden by the gui, and thus also to QFileDialog.
    And the workaround does actually work, this is the way I use it now. It's just too bad I need a 'hack' like this...
    MacOSX user dabbling with Linux and Windows.

  8. #28
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: File Open dialog does not show mounted servers under Ubuntu

    Quote Originally Posted by bnilsson View Post
    The symlink "servers" is created by me, and represents ~/.gvfs,
    I understand that.
    just because "dot-files" are normally hidden by the gui, and thus also to QFileDialog.
    You can instruct QFileDialog to show them.

    And the workaround does actually work, this is the way I use it now. It's just too bad I need a 'hack' like this...
    It works because of the way you use it. If this software is just for you then that's not a problem. But if you intend others to use it, their way of doing things might be different than yours and your workaround may fail (even on the same computer system).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #29
    Join Date
    Jan 2008
    Posts
    155
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: File Open dialog does not show mounted servers under Ubuntu

    You can instruct QFileDialog to show them.
    Great! How do I do this?
    Apparently, I must have missed this item in the Assistant docs.
    MacOSX user dabbling with Linux and Windows.

  10. #30
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: File Open dialog does not show mounted servers under Ubuntu

    Hmm... I thought there was an API for it but apparently there is none. Anyway, when the gnome dialog is open you can right click it and check "show hidden files".
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  11. #31
    Join Date
    Dec 2009
    Posts
    128
    Thanks
    7
    Thanked 14 Times in 14 Posts
    Platforms
    Unix/X11 Windows

    Default Re: File Open dialog does not show mounted servers under Ubuntu

    Quote Originally Posted by wysota View Post
    Hmm... I thought there was an API for it but apparently there is none. Anyway, when the gnome dialog is open you can right click it and check "show hidden files".
    what about QFileDialog::setFilter ( ... | QDir::Hidden | .. ) ?

  12. #32
    Join Date
    Jan 2008
    Posts
    155
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: File Open dialog does not show mounted servers under Ubuntu

    what about QFileDialog::setFilter ( ... | QDir::Hidden | .. ) ?
    Tried that, and it doesn't seem to work reliably.
    I think "right-click show hidden files" in the dialog is overriding it.
    Anyway, I was ignorant about the "right-click show hidden files" method, this seems to solve the issue.

    Thanks for all your assistance.
    MacOSX user dabbling with Linux and Windows.

Similar Threads

  1. Failure to Open File on Ubuntu 9.10
    By porosity in forum Newbie
    Replies: 1
    Last Post: 5th August 2010, 16:02
  2. Replies: 5
    Last Post: 25th July 2010, 10:58
  3. File Open dialog with preview?
    By will49 in forum Qt Programming
    Replies: 2
    Last Post: 24th July 2007, 18:08
  4. Rack Mounted Servers...
    By CuCullin in forum General Discussion
    Replies: 2
    Last Post: 20th January 2006, 22:45

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.