Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Have kdialog preceeded by (or succeeded after an "&" if the context allows it, and if it's preferable for some reason) a loop that has wmctrl "grepping"/activating" the unique name of the kdialog window, followed by xdotool resizing it, and breaking the loop.
Code:
( while true ; do
sleep 0.2 # reduces CPU load if the loop never breaks for some reason
wmctrl -a "relevant and ideally unique title for kdialog window" &&
dir=$(kdialog --getopenfilename "${defdir:-$PWD}" 'inode/directory' --title "Please choose the directory you want") ; cd ${dir}
I like it more than the "--getexistingdirectory" alternative (or zenity/gnome) which uses a system wide directory tree where you have to click on the tiny arrows or plus/minus icons to their left in order to open or close them, if you double click them hoping to enter, as you would on other file/directory navigation dialogs (or...
There are plenty of threads around the internet with this problem, not everyone is able to reproduce it, and probably "fixes" don't always work. In my case, I'm not even on KDE/plasma, even though I prefer KDE file managers and dialogs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.