LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices


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.
Rate this Entry

You CAN use kdialog "getfilename" to choose a directory, contrarily to some tutorials around

Posted 08-06-2021 at 09:06 PM by the dsc
Updated 08-17-2022 at 11:38 AM by the dsc (GrAmm3r ][)

Code:
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 on file managers), it will trigger a "rename" input action, which is highly annoying in this context.


...

I believe at some point in time this trick was working in a more proper way, maybe it was just me being confused, but "right now" just by entering the directory and clicking okay doesn't select it. You got to either type the dir name on the field from its containing directory, or enter it, and type "." on the field, no quotes, just the dot.

Maybe there's some config or parameter that makes just the highlighting/selecting and okaying do all the work, though.
Posted in Uncategorized
Views 653 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 12:49 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration