• Re: Change file picker in browsers

    From George at Clug@21:1/5 to All on Sat Sep 28 00:50:01 2024
    J,

    I am sure that others will correct me if I am wrong.

    Point 1 - Whatever File Manager (File Picker, as you call it?) you choose to use, it is a program, a specific program and has nothing to do with what file management system of your current Desktop Environment as used by other programs (like Gedit) when
    opening or saving files.


    Point 2 - Usually when a person (or group of people) write a program that interacts with the file system, they use 'system calls' to that Desktop Environment to access the Desktop Environment's own file management libraries (my experience here is with
    Windows), and so I am guessing if a Linux programmer is writing a program, say a Text editor, they will call the current Linux Desktop Environment's file management libraries for opening and saving files. If the Desktop Environment is Gnome, then the
    file management libraries will present a "Gnome" look and feel for the file open/save interfaces. Where as when using XFCE, its Desktop Environment's file management libraries will be themed for the XFCE Desktop Environment. The same being true if you
    use the KDE desktop environment. This makes the developer's life a bit easy, they can just write a program that calls the Desktop Environment's file management libraries for file open/save routines, and they do not have to be concerned about knowing
    which Desktop Environment they are running in, and then keeping with the current Desktop Environment's theme, nor do they have to write their own code for opening and saving files, they simply call the Desktop Environment's file management libraries.
    While Gnome and XFCE use the GTK toolkit, these Desktop Environment's have developed different themes for their own Desktop Environment libraries.


    Point 3 - Sad news. Taking Point 1 and Point 2 into consideration, you are stuck with applications using whatever the Desktop Environment's look and feel for opening and closing flies. This is what the Desktop Environment is designed to do. To provide a
    consistent look and feel across all applications.

    Maybe you can find a Gnome Theme that alters the file open/close look and feel, learn how the theme achieves this then apply that part of the theme to a theme you write? I have not had much success with altering themes in Gnome, though I see other
    people are able to modify the theme in simple ways, but I have not seen any do this for file management look and feel.

    Hope my explanation is clear enough to understand and is a correct description of how programs call the Desktop Environment's libraries for consistent look and feel.

    George.

    On Saturday, 28-09-2024 at 00:01 J wrote:
    Hello!

    So, is there a way to change the file picker in browsers?

    Recently i have switched from Gnome Files (Nautilus) to Thunar.

    Yes, i use Gnome.

    I have used the command

    xdg-mime default thunar.desktop inode/directory

    So.

    $ xdg-mime query default inode/directory
    thunar.desktop

    But then i noticed that file opener in browsers (Firefox-stable and Chrome) both are "Gnomish". I thought that it is Nautilus.

    I went full speed and added

    xdg-mime default thunar.desktop x-directory/normal

    xdg-mime default thunar.desktop inode/directory

    to

    /.config/mimeapps.list

    .local/share/applications/mimeinfo.cache

    .local/share/applications/mimeapps.list

    /usr/share/applications/mimeapps.list

    Then i understood that it is not Nautilus, but Gtk File chooser.

    Now i wonder if there is a way to use "native" Thunar and not this GTK file chooser?

    I tried

    GTK_USE_PORTAL=1 google-chrome-stable

    No help.

    I tried for Firefox

    ui.allow_platform_file_picker=true

    widget.use-xdg-desktop-portal=true

    in
    *about:config *
    (i did not know how to make it correctly so it looks like this)

    https://i.ibb.co/6NfVH3X/Screenshot-from-2024-09-26-21-48-19.png

    https://i.ibb.co/WsHwzCJ/Screenshot-from-2024-09-26-21-47-21.png
    [image: Image] <https://ibb.co/mSM19LN> [image: Image] <https://ibb.co/3kTqFKZ>
    Also no help.

    I read there is some bug with it in FF, but what about Chrome then?

    I use Firefox-stable as a main browser.

    Found this solution but dont know how to implement it here

    https://github.com/hyprwm/Hyprland/discussions/4988

    Any ideas?


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From George at Clug@21:1/5 to All on Sat Sep 28 01:40:02 2024
    On Saturday, 28-09-2024 at 08:59 J wrote:
    Thanks for your reply! But i am sorry, you completely missed the point. I know what a file manager is.

    "Then i understood that it is not Nautilus, but Gtk File chooser.

    Now i wonder if there is a way to use "native" Thunar and not this GTK file chooser?"

    The question was if there is a way to make *browsers *use default *file manager *and *not *the *GTK file chooser*?

    No, there is no way to "make *browsers *use default *file manager*".

    The File Manager is just a program, not something that a web Browser can call to manage files.


    Or at least where are the GTK file chooser configs to make changes to it?

    A very clever person could take the source code of the web browser and write their own file open/save code. That is theoretically speaking, but practically I cannot see anyone doing this.
    Web Browsers are designed to use the system calls of the Desktop Environment and Desktop environments are designed to enforce certain look and feel constraints.

    Or a very clever person could take the source code of Gnome and rewrite it to do whatever they want. Again theoretically speaking, but practically I cannot see anyone doing this.
    Desktop Environments are specifically written in a way to provide a certain look and feel, and sadly not to give users a way to change this.

    I recommend to accept this as just the way it is. Way too much effort for something that is not easily attainable.

    I do not really like the way KDE presents the file system to the user, but I realise the only way I can change this is to use a different Desktop Environment, or just accept the way KDE presents it.

    I am hopeful that someone knows how to use themes to give a different look and feel to file management (e.g. Open/Save files dialog boxes), but I have yet to find any information of people having achieved this.

    George.



    Point 3 - Sad news. Taking Point 1 and Point 2 into consideration, you are
    stuck with applications using whatever the Desktop Environment's look and feel for opening and closing flies. This is what the Desktop Environment is designed to do. To provide a consistent look and feel across all applications.



    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From George at Clug@21:1/5 to All on Sat Sep 28 01:50:01 2024
    I really hope I am wrong, and there is a way to change the theme
    for "file management" dialog boxes. Does any know of any DE's in which
    this can be done?


    George.



    On Saturday, 28-09-2024 at 09:29 George at Clug wrote:


    On Saturday, 28-09-2024 at 08:59 J wrote:
    Thanks for your reply! But i am sorry, you completely missed the
    point. I
    know what a file manager is.

    "Then i understood that it is not Nautilus, but Gtk File chooser.

    Now i wonder if there is a way to use "native" Thunar and not this
    GTK file
    chooser?"

    The question was if there is a way to make *browsers *use default
    *file
    manager *and *not *the *GTK file chooser*?

    No, there is no way to "make *browsers *use default
    *file  manager*".

    The File Manager is just a program, not something that a web Browser
    can call to manage files.


    Or at least where are the GTK file chooser configs to make changes
    to it?

    A very clever person could take the source code of the web browser and
    write their own file open/save code. That is theoretically speaking,
    but practically I cannot see anyone doing this.
    Web Browsers are designed to use the system calls of the Desktop
    Environment and Desktop environments are designed to enforce certain
    look and feel constraints.

    Or a very clever person could take the source code of Gnome and
    rewrite it to do whatever they want. Again theoretically speaking, but practically I cannot see anyone doing this.
    Desktop Environments are specifically written in a way to provide a
    certain look and feel, and sadly not to give users a way to change
    this.

    I recommend to accept this as just the way it is. Way too much effort
    for something that is not easily attainable.

    I do not really like the way KDE presents the file system to the user,
    but I realise the only way I can change this is to use a different
    Desktop Environment, or just accept the way KDE presents it.

    I am hopeful that someone knows how to use themes to give a different
    look and feel to file management (e.g. Open/Save files dialog boxes),
    but I have yet to find any information of people having achieved this.

    George.



    Point 3  - Sad news. Taking Point 1 and Point 2 into
    consideration, you are
    stuck with applications using whatever the Desktop Environment's
    look and
    feel for opening and closing flies. This is what the Desktop
    Environment is
    designed to do. To provide a consistent look and feel across all applications.



    <html>
    <head>
    <style type="text/css">
    body,p,td,div,span{
    font-size:13px; font-family:Arial, Helvetica, sans-serif;
    };
    body p{
    margin:0px;
    }
    </style>
    </head>
    <body><div>I really hope I am wrong, and there is a way to change the theme for "file management" dialog boxes. Does any know of any DE's in which this can be done?</div><div><br></div><div>George.</div><div><br></div><br>On Saturday, 28-09-2024 at 09:29
    George at Clug wrote:<br><blockquote style="border:0;border-left: 2px solid #22437f; padding:0px; margin:0px; padding-left:5px; margin-left: 5px; ">On Saturday, 28-09-2024 at 08:59 J wrote:<br>
    &gt; Thanks for your reply! But i am sorry, you completely missed the point. I<br>
    &gt; know what a file manager is.<br>
    &gt; <br>
    &gt; "Then i understood that it is not Nautilus, but Gtk File chooser.<br>
    &gt; <br>
    &gt; Now i wonder if there is a way to use "native" Thunar and not this GTK file<br>
    &gt; chooser?"<br>
    &gt; <br>
    &gt; The question was if there is a way to make *browsers *use default *file<br>
    &gt; manager *and *not *the *GTK file chooser*?<br>

    No, there is no way to "make *browsers *use default *file&nbsp;&nbsp;manager*".<br>

    The File Manager is just a program, not something that a web Browser can call to manage files.<br>

    &gt; <br>
    &gt; Or at least where are the GTK file chooser configs to make changes to it?<br>

    A very clever person could take the source code of the web browser and write their own file open/save code. That is theoretically speaking, but practically I cannot see anyone doing this.<br>
    Web Browsers are designed to use the system calls of the Desktop Environment and Desktop environments are designed to enforce certain look and feel constraints.<br>

    Or a very clever person could take the source code of Gnome and rewrite it to do whatever they want. Again theoretically speaking, but practically I cannot see anyone doing this.<br>
    Desktop Environments are specifically written in a way to provide a certain look and feel, and sadly not to give users a way to change this.<br>

    I recommend to accept this as just the way it is. Way too much effort for something that is not easily attainable. <br>

    I do not really like the way KDE presents the file system to the user, but I realise the only way I can change this is to use a different Desktop Environment, or just accept the way KDE presents it.<br>

    I am hopeful that someone knows how to use themes to give a different look and feel to file management (e.g. Open/Save files dialog boxes), but I have yet to find any information of people having achieved this.<br>

    George.<br>


    &gt; <br>
    &gt; Point 3&nbsp;&nbsp;- Sad news. Taking Point 1 and Point 2 into consideration, you are<br>
    &gt; &gt; stuck with applications using whatever the Desktop Environment's look and<br>
    &gt; &gt; feel for opening and closing flies. This is what the Desktop Environment is<br>
    &gt; &gt; designed to do. To provide a consistent look and feel across all<br> &gt; &gt; applications.<br>
    &gt; &gt;<br>
    &gt;</blockquote></body></html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Ritter@21:1/5 to George at Clug on Sat Sep 28 02:30:02 2024
    George at Clug wrote:
    I really hope I am wrong, and there is a way to change the theme
    for "file management" dialog boxes. Does any know of any DE's in which
    this can be done?


    It's not a function of the desktop environment.

    In Android, it's an externally callable standard function. In Windows,
    there's (usually but not always) a standard File Open dialogue, and
    calls to that can be intercepted and substituted.

    In Linux, it is 100% up to each application, and it is not
    expected to be customizable. There is no central authority.

    If you change the default GTK theme, that will affect all
    applications that respect that. If you change the default GNOME
    theme, similarly. If you change the default KDE
    theme, similarly. If you change the default XFCE theme... well,
    Thunar will change appearance a little.

    But you can't ask Firefox to use a different Save or Open
    dialogue, sorry.

    -dsr-

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Geoff@21:1/5 to All on Sat Sep 28 03:50:01 2024
    J wrote:
    Hello!

    So, is there a way to change the file picker in browsers?

    Recently i have switched from Gnome Files (Nautilus) to Thunar.

    Yes, i use Gnome.

    I have used the command

    |xdg-mime default thunar.desktop inode/directory|

    So.

    |$ xdg-mime query default inode/directory thunar.desktop|

    But then i noticed that file opener in browsers (Firefox-stable and Chrome) both are "Gnomish". I thought that it is Nautilus.

    I went full speed and added

    |xdg-mime default thunar.desktop x-directory/normal xdg-mime default thunar.desktop inode/directory |

    to

    |/.config/mimeapps.list .local/share/applications/mimeinfo.cache .local/share/applications/mimeapps.list /usr/share/applications/mimeapps.list |

    Then i understood that it is not Nautilus, but Gtk File chooser.

    Now i wonder if there is a way to use "native" Thunar and not this GTK file chooser?

    I tried

    |GTK_USE_PORTAL=1 google-chrome-stable|

    No help.

    I tried for Firefox

    |ui.allow_platform_file_picker=true widget.use-xdg-desktop-portal=true|

    in /about:config
    /
    (i did not know how to make it correctly so it looks like this)

    https://i.ibb.co/6NfVH3X/Screenshot-from-2024-09-26-21-48-19.png <https://i.ibb.co/6NfVH3X/Screenshot-from-2024-09-26-21-48-19.png>

    https://i.ibb.co/WsHwzCJ/Screenshot-from-2024-09-26-21-47-21.png <https://i.ibb.co/WsHwzCJ/Screenshot-from-2024-09-26-21-47-21.png>
    Image <https://ibb.co/mSM19LN> Image <https://ibb.co/3kTqFKZ>
    Also no help.

    I read there is some bug with it in FF, but what about Chrome then?

    I use Firefox-stable as a main browser.

    Found this solution but dont know how to implement it here

    https://github.com/hyprwm/Hyprland/discussions/4988 <https://github.com/hyprwm/Hyprland/discussions/4988>
    *
    *Any ideas?

    Have a look at:

    https://wiki.archlinux.org/title/Firefox#XDG_Desktop_Portal_integration

    Changing widget.use-xdg-desktop-portal.file-picker in about:config from 2 to 1 gives me the kde file picker.

    Regards.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)