How can I make them modal? With modal I mean: The dialog should block the desktop so the user has only two options: Either cancel the dialog or enter text into it. (I want this basically because new windows might popup and can steal focus and additionally that other programs can access configuration files inside that container)

Background: I want to ask a passphrase after login for an encfs container. So either entering a pass, or continue with cancellation of this dialog.

Note: This is not a duplicate of modal dialog popup alarm, as I am interested especially in a solution to Zenity dialogs.


Assuming Linux since encfs is mentioned:

If by "login" you mean "graphical login" (which os reasonable since zenity is Gtk+ based), then one could put the test in ~/.xinitrc (or equivalent depending on window/login manager) without sending it to the background before the window manager is started. This would halt the process until the test has returned.

  • Can you give me some hints on how to do that? I have never before done .xinitrc scripting. And yes you are right with assuming Linux, in particular Ubuntu 11.10 which runs lightdm and xinitrc seems not to work out of the box: askubuntu.com/questions/83858/…, but I found this topic which confuses me, as my ubuntu.desktop file seems to run a gnome-session. – math Apr 16 '12 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.