Help answer threads with 0 replies.
Go Back > Blogs > linux-related notes
User Name


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

Per-application bookmarks on GTK's file dialog?

Posted 12-22-2014 at 12:56 AM by the dsc
Tags gtk, rant

On KDE/QT file dialog there's often a pop-up with a check box saying "remember only in KurrentApplication", so you can have different sets of "bookmarks", restricted to relevant applications. That is, no picture folders on audio applications and vice-versa/whatever.

Is there a hidden way to do that with GTK? Probably answering myself already, but I don't think so (the gtk-terminology would be "shortcut", instead of "bookmark", though):


GtkFileChooser is an interface that can be implemented by file selection widgets. In GTK+, the main objects that implement this interface are GtkFileChooserWidget, GtkFileChooserDialog, and GtkFileChooserButton. You do not need to write an object that implements the GtkFileChooser interface unless you are trying to adapt an existing file selector to expose a standard programming interface.

GtkFileChooser allows for shortcuts to various places in the filesystem. In the default implementation these are displayed in the left pane. It may be a bit confusing at first that these shortcuts come from various sources and in various flavours, so lets explain the terminology here:

Bookmarks: are created by the user, by dragging folders from the right pane to the left pane, or by using the “Add”. Bookmarks can be renamed and deleted by the user.

Shortcuts: can be provided by the application. For example, a Paint program may want to add a shortcut for a Clipart folder. Shortcuts cannot be modified by the user.

For this sort of thing that I mildly hate gnome/GTK.
Posted in Uncategorized
Views 1110 Comments 4
« Prev     Main     Next »
Total Comments 4


  1. Old Comment
    Why don't you drop a line to the GTK devs? Then again... we all know how they've been listening to their users.
    Posted 12-23-2014 at 04:11 AM by goumba goumba is offline
  2. Old Comment
    I really feel bad to rant about these things, after all, it's an entire OS and a suit of applications basically for free. I'm certainly more thankful than annoyed, overall, but the odds are that I'll more often manifest my annoyance.

    But some things... like "open with", on GTK/Gnome... it's unbelievable. It's 2014, for dog sake, and they make you navigate to find the actual binary to make the association (or run once), as if $PATH didn't exist. At least it was still like that not long ago. And if I recall you can't even write the full path, if you happen to know it -- it probably doesn't even have a path field. You have to navigate.
    Posted 12-24-2014 at 01:47 AM by the dsc the dsc is offline
    Updated 12-24-2014 at 01:48 AM by the dsc
  3. Old Comment
    Well, as far as typing the path, you can. The path field isn't immediately visible. When the Open dialog appears, just start typing the path, and a box will automatically pop up.
    Posted 12-24-2014 at 03:17 AM by goumba goumba is offline
  4. Old Comment
    I'll try to remember to try it. I recall that on some GTK file dialogs I'd try to type for "something" (like writing the file name or searching on the current folder) but then "something else" would happen. If I recall it was a search/filter on the current folder, but I also have a faint recollection that you could click somewhere and a location field would show up where "location icons/labes" are.

    It would be really nice if all the linux/unix stuff had a way to easily alternate between a set of uniform behaviors and hotkeys/shortcuts. Like setting "global-shortcut-mode=KDE" somewhere in /etc, and then automatically GTK file dialog would "look and feel", behave, more like KDE's (or vice versa, if that's set) nano would search by control+f and save by control+s. I'm quite often switching these and other shortcuts on nano and kwrite/kate.

    But that's probably a pipe dream.

    The old Opera browser had something similar, though, you could set as an option which file dialog it would use. Perhaps that's a more likely possibility, but even then I don't see that happening. Perhaps most users are comfortable with a non-frankensteinian suit of apps, only KDE, GTK or something else, enough that it's not so much a concern.
    Posted 12-28-2014 at 11:42 AM by the dsc the dsc is offline


All times are GMT -5. The time now is 06:06 PM.

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