# FileChooser in Ubuntu 16.04

**URL:** <https://forum.juce.com/t/filechooser-in-ubuntu-16-04/18049>\
**Category:** Linux\
**Created:** [June 10, 2016, 1:44am UTC](https://forum.juce.com/t/filechooser-in-ubuntu-16-04/18049 "2016-06-10T01:44:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephanecharette](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/stephanecharette/32/83_2.png) [@stephanecharette](https://forum.juce.com/u/stephanecharette)\
**Post date:** [June 10, 2016, 1:44am UTC](https://forum.juce.com/t/filechooser-in-ubuntu-16-04/18049/1 "2016-06-10T01:44:26Z")

</div>

I upgraded my dev vm to Ubuntu 16.04 today, and immediately afterward noticed the FileChooser is no longer working. Here is the code I’m using from within a buttonClicked() inherited from Button::Listener:

```
FileChooser chooser( "Open Image", previous_directory, "*.JPG;*.jpg" );
const bool result = chooser.browseForFileToOpen();

```

That 2nd line hangs forever without ever showing the file dialog. Debugging into it, I see it is hung up on this line in `juce_posix_SharedCode.h`: read() line 1157:

```
return (int) fread (dest, 1, (size_t) numBytes, readHandle);

```

I tried the JuceDemo, and it also hangs in the same place when I click on any of the “Load”, “Choose”, or “Save” buttons on the Dialog Boxes tab. If I disable “Use Native Windows”, then they all work fine.

Anyone else seeing this behaviour on Ubuntu 16.04?

---

<div class="post-metadata">

**Author:** ![stephanecharette](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/stephanecharette/32/83_2.png) [@stephanecharette](https://forum.juce.com/u/stephanecharette)\
**Post date:** [June 10, 2016, 2:25am UTC](https://forum.juce.com/t/filechooser-in-ubuntu-16-04/18049/2 "2016-06-10T02:25:04Z")

</div>

Now that I’ve caught up on the forum, I see I’m not the only one complaining about native FileChooser dialog windows hanging. Apparently a fix is available in a private branch somewhere. Will use non-native dialog boxes until then.

---

<div class="post-metadata">

**Author:** ![tomotello](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@tomotello](https://forum.juce.com/u/tomotello)\
**Post date:** [June 10, 2016, 12:51pm UTC](https://forum.juce.com/t/filechooser-in-ubuntu-16-04/18049/3 "2016-06-10T12:51:10Z")

</div>

the Development branch has included the fix already ( git clone -b develop [https://github.com/julianstorer/JUCE](https://github.com/julianstorer/JUCE) )  
see [this thread](https://forum.juce.com/t/freeze-when-opening-filechooser/16026/39) as well.
