Page 1 of 2 12 LastLast
Results 1 to 20 of 32

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

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

    Default File Open dialog does not show mounted servers under Ubuntu

    In my Ubuntu-10.04 Qt application I need to access files (and select directory) on connected servers, which I see as folder icons on my desktop. However, the open file/select directory dialog does not include these connections.
    What should I do let them be visible in the dialogs?
    I use
    QFileDialog::getOpenFileName(this,tr("Open pattern file"),patternfilepath, tr("Pattern files Files (%1)").arg(pname));
    and
    QFileDialog::getExistingDirectory(this, tr("Open Directory"), "/home", patterndirpath,QFileDialog::ShowDirsOnly | QFileDialog:ontResolveSymlinks);

    Are there dialog variants that will work better?

    BN
    MacOSX user dabbling with Linux and Windows.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 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

    What do you consider a "connected server"?
    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. #3
    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

    As you may know, at the top of the Ubuntu desktop, there is a menubar.
    In this menubar there are Applications, Places and System menus.
    In the Places menu, there is an item called "Connect to server...".
    Activating this item will give a dialog where you can select SSH, FTP (with login), Public FTP, Windows share, WebDAV, Secure WebDAV and Custom Location.
    I have so far used SSH and Windows share.
    For both of these, after supplying the connection details and authentication in to the server, a folder symbol is created on the desktop, containing the files present on the server I am connected to.
    In my application, this server symbol is not present in the File Open.. or Select Directory.. dialogs.

    Please tell me if you need a more detailed explanation of the situation.

    BN
    MacOSX user dabbling with Linux and Windows.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 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
    As you may know, at the top of the Ubuntu desktop, there is a menubar.
    I don't, I don't use Gnome.

    Please tell me if you need a more detailed explanation of the situation.
    Open a console, run "mount" and see if your "connected servers" are listed there. If so, there will be paths listed alongside them where the "connected servers" have been mounted. In Unix there is no concept or "drives" or "servers", there is a coherent filesystem tree starting with the root (/). Mounted devices (be it local or remote) become parts of the tree.
    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. #5
    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

    bnilsson@ubuntu:~$ mount
    /dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    none on /sys type sysfs (rw,noexec,nosuid,nodev)
    fusectl on /sys/fs/fuse/connections type fusectl (rw)
    none on /sys/kernel/debug type debugfs (rw)
    none on /sys/kernel/security type securityfs (rw)
    none on /dev type devtmpfs (rw,mode=0755)
    none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
    none on /dev/shm type tmpfs (rw,nosuid,nodev)
    none on /var/run type tmpfs (rw,nosuid,mode=0755)
    none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
    binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
    .host:/ on /mnt/hgfs type vmhgfs (rw,ttl=1)
    none on /proc/fs/vmblock/mountPoint type vmblock (rw)
    gvfs-fuse-daemon on /home/bnilsson/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=bnilsson)

    I can also tell you that the native Ubuntu Application/Acessories/Text Editor does show the mounted server symbol in the file browser, while my Qt application does not.
    MacOSX user dabbling with Linux and Windows.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 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

    There is no such thing as "native Ubuntu Application". It's an application that uses the Gnome filesystem abstraction. You can handle a similar thing in Qt as well if you implement it yourself but don't expect Qt to handle every possible abstraction of every possible system and solution in the world. You can reverse the situation and ask whether Gnome handles this situation in such a way instead of using someone else's "standard solution". I could ask why my GIMP doesn't handle KDE's "Places" container in its file dialogs.
    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. #7
    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

    So what you are saying is that Qt's implementation of file dialogs in Ubuntu is not working it is my problem to solve it?
    MacOSX user dabbling with Linux and Windows.

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 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

    What I'm saying is that if you need something extra they you have to implement it on your own. For static file dialogs Qt uses by default the desktop implementation of the dialog (so it should pick up what your desktop manager (Gnome+Metacity) offers). If you are not getting some functionality it might offer, you can't expect Qt to handle every possible case of calling the native dialog. You can always call the native dialog yourself with options and API the dialog offers.
    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. #9
    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

    Ok, I would think this feature is pretty darn basic...

    However this is a real bonafide show-stopper for my application.
    Any hints on how I can gather information on how I should proceed?

    I would invite other readers to respond too, if possible.
    MacOSX user dabbling with Linux and Windows.

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 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

    So is your "connected server" in the list of mounted filesystems or not?
    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. #11
    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 line from 'mount'
    gvfs-fuse-daemon on /home/bnilsson/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=bnilsson)
    is related.

    /home/bnilsson/.gvfs contains an item with the same name as the folder symbol on my desktop.
    For a windows share on the server mc2-p007 it is called: bnilsson on mc2-p007
    For a ssh mount on the server mc2-p007 it is called: sftp for bnilsson on mc2-p007

    BN
    MacOSX user dabbling with Linux and Windows.

  12. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 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

    So it's not mounted thus it gets mounted once you actually first access it or it's only accessible from gnome's file dialogs. If you run a file dialog from your Qt apps, do you get the standard gtk file dialog as for other apps on your system or do you get a custom Qt-based dialog?
    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.


  13. #13
    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

    Quote Originally Posted by wysota View Post
    So it's not mounted thus it gets mounted once you actually first access it or it's only accessible from gnome's file dialogs. If you run a file dialog from your Qt apps, do you get the standard gtk file dialog as for other apps on your system or do you get a custom Qt-based dialog?
    As far as I can tell it is native. It looks the same as in other Ubuntu apps with an Open File menu the except that in the left column for "Places" there is nothing inbetween "File system" and "Floppy drive", where my "server" symbol is placed in the other apps.
    Maybe this information is meningless for you since you don't run Ubuntu, but this is what I see.
    MacOSX user dabbling with Linux and Windows.

  14. #14
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 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

    Trust me, the fact that you are using Ubuntu has nothing to do with this. I can install Gnome with gvfs on my Mandriva and have a similar behaviour. If the dialog doesn't contain the "places" part then either Qt does it on purpose because of some reason or there is a Gnome-originated reason for not showing the places container.
    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.


  15. #15
    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

    Quote Originally Posted by wysota View Post
    If the dialog doesn't contain the "places" part then either Qt does it on purpose because of some reason or there is a Gnome-originated reason for not showing the places container.
    I want to point out that the "Places " section is NOT missing from the File Dialog, it is only the "server" item in the "Places" list that is not there.
    MacOSX user dabbling with Linux and Windows.

  16. #16
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 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

    Whatever...
    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.


  17. #17
    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

    Quote Originally Posted by wysota View Post
    Qt does it on purpose because of some reason or there is a Gnome-originated reason for not showing the places container.
    You cannot be serious...


    Added after 13 minutes:


    A workaround for the time being:

    mkdir servers
    ln -s .gvfs servers

    I can open the "server" folder and then find my files.
    But I still it is a bug/flaw in the QFileDialog. You can argue about secret reasons, but this is my standpoint.
    Last edited by bnilsson; 27th October 2010 at 09:17.
    MacOSX user dabbling with Linux and Windows.

  18. #18
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 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 don't argue about "secret reasons", Qt is open-source - take its source code and check it out yourself. Do you expect me to do that for you? Qt uses Gnome's file dialog - it just calls a function from some Gnome library, it doesn't "delete" the entries from the dialog and it doesn't try to "mimic" the original dialog.
    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.


  19. #19
    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, it seems this discussion has reached a dead end.
    I filed a bug report, we'll se what happens next. Maybe someone will take care of it.
    MacOSX user dabbling with Linux and Windows.

  20. #20
    Join Date
    Dec 2010
    Location
    Ukraine, Kharkiv
    Posts
    17
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

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

    I'm using WinXP. I have mounted disks from our local server on fedora. I set to mount them on system startup. Your code works good at my app.
    In My Computer I have three mounted disks and in QFileDialog they displayed properly.

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.