Open File Dialog Behind Other Windows on Linux

Hi,
I don't know if this is a Windows thing, but I'm not used to clicking to open a file and then digging for the Open File Dialog window. Using Gnome I find that the Open File Dialog window is always created behind the other windows. This is not a user friendly thing to do, at least in Linux, but it happens with Arduino IDE 2.0.2.
Rob

Hi @frohro. Thanks for your report.

What method are you using to open the dialog (e.g., clicking on the File > Open menu item, or pressing the Ctrl+O keyboard shortcut)?

I just tried both of those methods on my Ubuntu 20.04 machine and the dialog was on top of the Arduino IDE window as expected.

@ptillisch, I was using File->Open, but Ctrl-O does the same thing for me everytime. I am using Ubuntu 22.04.1 LTS. I tried it on a machine running 22.10 and it was in front. I thought it might be due to using multiple monitors, but disconnecting them didn't change anything. I rebooted and now the windows are on top. Then I opened another project, moved my development window to a screen in portrait mode, and now the dialog comes up behind that window. Moving the window to any horizontal screen it still comes up behind. I closed the IDE and re-opened it. As long as there has only been one window, it works, but if there are two or more, it is behind, even if I close down to only one window again.
Thanks for noticing this!
Rob

It looks like this bug in the Electron framework used by Arduino IDE 2.x:

It was introduced in electron@14.0.0, which checks out since Arduino IDE is currently using electron@15.5.5.

I saw a possible workaround for the bug as it occurs in VS Code:

https://github.com/microsoft/vscode/issues/146422#issuecomment-1167425008

I'll provide instructions if you want to try it out:

  1. Open a command line terminal in the folder that contains the AppImage file.
  2. Type the following command:
    • If you are using the AppImage package of Arduino IDE:
      GTK_USE_PORTAL=0 ./arduino-ide_2.0.2_Linux_64bit.AppImage
      
    • If you are using the ZIP package of Arduino IDE:
      GTK_USE_PORTAL=0 ./arduino-ide
      
  3. Press the Enter key.

@ptillisch Thanks for the research! I tried your suggested fix, but it didn't fix it. I'm using the zip install. I went to the directory where it was unzipped, and did this did the GTK_USE_PORTAL=0 ./arduino-ide enter and it started the IDE. There were a ton of messages in the terminal that might help debug this. Let me know if you want them. They were pages and pages.
:slight_smile: Rob

Thanks for reporting your results from trying the workaround.

I think the workaround was a bit of a long shot since some reported it didn't help on VS Code and also because Arduino IDE is significantly different from VS Code (even though they do share some code and are built on the same technologies). Well, it was worth a try anyway.

Sure. I'll take a look. The logs printed to the terminal do often provide essential information for identifying and fixing problems. I didn't request them previously in this case because there is more likely to be something useful in the logs when a significant failure occurs in the IDE, whereas in this case it seems like the IDE probably thinks it is doing everything correctly and there is nothing to log about. However, I might very well be wrong about that.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.