QB64 Phoenix Edition
Linux - file dialogue boxes... - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11)
+--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2)
+--- Thread: Linux - file dialogue boxes... (/showthread.php?tid=3849)



Linux - file dialogue boxes... - atl068 - 08-04-2025

Hi, I am having an issue moving from Windows to Linux (Chromebook really, with Crostini). I know initially when I had qb64pe running, I had to install some extra libraries to support graphical file dialog boxes. But... for some reasons, they stopped working. E.g. on the IDE, if I do a File, Open, it would just pause, and go back to the editor. No errors, nothing. But I would not get a dialog box to choose a file to open. I had to edit the configuration file to disable GUI dialog boxes.

The problem is even my programs that uses the file dialogue boxes don't work.  For example:

Code: (Select All)
appt_file$ = _OpenFileDialog$("Choose Appointment File...", "", "*.app|*.txt", "Appointment Files", 0)
This works fine on Windows. I remember it worked initially on my Chromebook on Crostini before. But now it doesn't work. I checked my kdialog is working fine. How can I troubleshoot and find out what's wrong? I have temporary changed my program to use a pitiful Line Input to get a text with the filename for the moment. Thanks for any help!


RE: Linux - file dialogue boxes... - SpriggsySpriggs - 08-04-2025

I also have a Chromebook and use the Crostini environment to code with QB64. I have the same problem on the latest version.


RE: Linux - file dialogue boxes... - hsiangch_ong - 08-04-2025

sigh, someone else with chromebook.  so my advice generally for linux will be astray.

usually it requires zenity installed.  (which uses gtk gui toolkit.)  if not yad.  (which uses qt instead.)

try opening a terminal and entering "zenity" to fire a program.  if it says "not found."  then i don't know what else to tell you.  if that happens.  then chromebook is much weirder than the few things i've read from other people.

if "crostini" is a container.  that allows full-featured linux to run.  then zenity should be sufficient to work. (shrugs)

that's funny.  the op says he checked "kdialog."  but usually that works on kde plasma.  at least one of the linux os.  that i installed with kde plasma.  worked with "kdialog" without having to install zenity.  but had to install zenity anyway.  thanks to the sloppy programmers of another program i have to use.


RE: Linux - file dialogue boxes... - atl068 - 08-05-2025

(08-04-2025, 04:51 PM)hsiangch_ong Wrote: sigh, someone else with chromebook.  so my advice generally for linux will be astray.

usually it requires zenity installed.  (which uses gtk gui toolkit.)  if not yad.  (which uses qt instead.)

try opening a terminal and entering "zenity" to fire a program.  if it says "not found."  then i don't know what else to tell you.  if that happens.  then chromebook is much weirder than the few things i've read from other people.

if "crostini" is a container.  that allows full-featured linux to run.  then zenity should be sufficient to work. (shrugs)

that's funny.  the op says he checked "kdialog."  but usually that works on kde plasma.  at least one of the linux os.  that i installed with kde plasma.  worked with "kdialog" without having to install zenity.  but had to install zenity anyway.  thanks to the sloppy programmers of another program i have to use.
Cool Big Grin 
Why do you relegate us Chromebook users to second class Linux citizens? I think CB is the best, readily available Linux laptops out there that is immediately usable out of the box! Crostini is a container. It is full Debian in Crostini. And the passthrough is so good now, I install Epson's Linux drivers for scanners and printers, and can plug them into my chromebook via USB, apply the passthrough to Linux, and they work fine. Same with Brother... I have all my stuff in Linux, (Scribus, Audacity, QB64 of course, WINE, etc.)

But THANK YOU!!! Your hint at Zenity got me going. After installation initially, QB64PE will inform to install Zenity, yad, or kdialog etc... It appears that Zenity is the one not working.

Hence, a simple:
Code: (Select All)
sudo apt remove zenity
That did the trick. It is now using my kdialog I believe.

So, if I may ask (sorry, a bit lazy here... I don't frequent the forums too much and only use QB64PE on/off...):
1. How do I request for better documentation for Linux users on what are supported systems for the GUI file dialogs?
2. How to request a setting in the config.ini for us to choose which of the GUI systems we want the dialog boxes to use... e.g. Kdialog instead of Zenity?

Happy to submit accordingly... Otherwise, hope this post will help those who stumble with the same issue as I have...

(08-04-2025, 01:27 PM)SpriggsySpriggs Wrote: I also have a Chromebook and use the Crostini environment to code with QB64. I have the same problem on the latest version.
Maybe you installed a new package like Zenity (as in my case) that isn't working properly? You can try removing Zenity as I did. Perhaps the Zenity in Crostini isn't working as expected... QB64PE seems to look for Zenity before kdialog...


RE: Linux - file dialogue boxes... - SpriggsySpriggs - 08-05-2025

I had Zenity installed and it still wouldn't work. So I just uninstalled Zenity since it takes up 430 MB. And to MS Paint X-23, your elitism is tiresome.


RE: Linux - file dialogue boxes... - atl068 - 08-05-2025

(08-05-2025, 01:03 PM)SpriggsySpriggs Wrote: I had Zenity installed and it still wouldn't work. So I just uninstalled Zenity since it takes up 430 MB. And to MS Paint X-23, your elitism is tiresome.

I take it that you didn't have Zenity and it didn't work, and then installing it also didn't work. And then uninstalled it.

Keep it uninstalled (doesn't seem to work for me anyway). And make sure you install kdialog (sudo apt install kdialog). Now try again? Seems to me that it works with Kdialog on Crostini at least, but not Zenity.


RE: Linux - file dialogue boxes... - SpriggsySpriggs - 08-05-2025

I'll give that a try. I've never been a fan of how QB64 uses dialogs. It all feels very hacked together.


RE: Linux - file dialogue boxes... - hsiangch_ong - 08-05-2025

elitism?

this will be the last time.  i will give any advice.  for somebody who is less familiar with linux than with windows.  or for something else "non-windows."  since i proposed something installed.  instead the solution was to remove it.  i'm not one of the qb64 phoenix developers.  so what do i know?

Show Content