Search improvements
Search improvementsWelcome back. This is my last (or second to last) blog post for this year's Google Summer of Code with Xfce and Thunar. Unlike previous weeks this time I have only one new thing to talk to you about. Searching in Thunar.
Most of you might have noticed that Thunar has had a significnt deficiency for a while. Thunar has been missing a decent solution for searching for files in the filesystem. Users could search for files in the selected directory, but even that was a pretty mediocre experience, because results weren't being filtered while searching. Fortunately there is another program under the Xfce umbrella that makes searching for files a breeze. That program is, of course, Catfish. Unfortunately this status quo requires users to juggle between Thunar and Catfish even when searching for simple things.
In the past two weeks I've been working on two things. First, making Catfish easier to use through Thunar. Second improving Thunar's built-in search features to make routine and/or simple searches possible without leaving Thunar. The first improvement is pretty straightforward. A new button has been added that allows the user to open catfish with the specified search query from inside Thunar. As far as the improving the built-in search features goes, I've implemented a basic depth-limited recursive search in Thunar that is accessed from the location bar, which can now be used as both a location bar and a search bar. As the user types his/her search query the view is updated with the results. For convenience in addition to the current directory and its subdirectories, Thunar searches the GTK-Recent database for eligible entries.
Instead of describing how all this works I would like to demonstrate state of things to you. Some small things are missing (like options for selecting whether the GTK-Recent database should be searched and a new `location` column that will be introduced), but the core functionality has been implemented and is close to being merged.
Link to all my Merge Requests: link
Previous post
Supporting shared thumbnail repositories and video update
Supporting shared thumbnail repositories and video updateGreetings! After 84 yea.... 17 days I'm back with another blog-post. This time a shorter one, since most of my work has been on finishing the features that I talked about last week and implementing support for shared thumbnail repositories (as specified in freedesktop.org).
Support for Shared thumbnail repositories: For 15 years the #SHARED part of the freedesktop.org thumbnail specification has been ignored by the vast majority of Linux file managers. At last, the time has come for Thunar to be one of the first, if not the first, file managers that support shared thumbnail repositories. 'What are shared thumbnail repositories' I hear you ask. Let me explain. Imagine that you have a large external hard drive that contains family photos (something that most, if not all of us have). Connecting it in a new PC or as a different user would normally lead to thumbnailing for all the files that are visible in your file manager. That process is both slow and wasting space. That is the problem that shared thumbnail repositories solve. Instead of creating and storing thumbnail in the default location of the PC filesystem, thumbnails are stored locally in the USB/HDD/CD. It is a niche but potentially extremely useful feature.
I've linked a video that showcases the stuff that I've talked about in these blogposts, with the exception of shared thumbnail repositories. Even though the code is complete and it works as it should there has been a problem with Tumbler while refactoring. Specifically, it looks like Tumbler doesn't use libxfce4util, where I placed some shared code to avoid duplication. Hopefully next time I'll be able to show them to you.
Link to all my Merge Requests: link
Previous post
Weekly update
Safety flag
Related: Thunar !121
Coding safety flag interface is done, but since it requires new version of libxfce4util, it is waiting for docker image to be updated.
Keep metadata when copying from remote location
Related: Thunar !127
Thunar loses some metadata on copy when file source is from remote location like ftp://. Right now, I am working on what metadata should be copied in that case.
Use proper name to copy files
Related: Thunar !128
gvfs-gdrive extension provides a neat way to use Google Drive as a network drive, but copied files got an unintelligible name for some reason. So I am patching up the logic to move the files into a readable name.
Safe copy
Related: Thunar !130
This MR will add a feature to separate copy-in-progrss files and already copied files in case something aborts the copy, so “skip all existing files” on the second try can guarantee that every file is copied properly. Without this feature, the user has to copy every file again or somehow find which one is a corrupted file (which is like finding a needle in haystack).
It also will provide optional feature to check every file copied that it is not corrupted - probably used for network drives.
Right now only the first part is done - every files copied will be first named as *.partial~
(which is hidden) and be renamed after copy.
Weekly update
Another update!
Safety flag - almost done!
Related : Thunar !121
Interface for safety flag is almost done. A bit more polishing and it would be good to go.
Exo-Desktop-Item-Edit
Keep metadata on edit
Related : xfdesktop #68->Exo #64, Exo !43
exo-desktop-item-edit, which is used to edit .desktop files, removed metadata while writing changes. This caused permission bits to be reset without execution bit. It is now patched to preserve metadata (including safety flag and execution bit).
Support for safety flag
Related : Exo !44
While fixing previous issue, I added an optional feature to support safety flag on exo-desktop-item-edit. Now if libxfce4util
supports safety flag, .desktop file will be created with safety flag on.
Xfce participation in GSoC 2021
I am a bit late with my blog post .. though I suppose better late than never :D
This year Xfce applied to the Google Summer of Code program and I am happy to tell you that we accomplished to get 3 slots ! (That’s very good, since new organization usually only receive one or two slots)
There was a lot of interest by students. In total 15 proposals were received for Xfce. So sadly we had to refuse several nice proposals. However the number of mentors as well was limited, so that this year Xfce anyhow would not be able to mentor more students.
Now there are 3 very motivated GSoC students supporting Xfce. Allow me to introduce:
Yongha Hwang, who applied for various thunar issues, mostly related to file transmission.
Sergios Anestis Kefalidis, who as well works on thunar, targeting a wide range of features.
Vishal Sharma, who is looking into sample/skeleton panel plugins in different GOI supported languages.
Since I maintain thunar, I am the main mentor of Sergios and Yongha.
These two and as well some other thunar focused GSoC applicants kept me very busy by adding many contributions long before the official coding part started :) Already now I think mentoring for GSoC was a good thing to do. The gain by far outweighs the burden. I don’t have much time left to work on issues myself, though the students overcompensate that by magnitudes.
Here a small taste of the recent activity related to GSoC:
- Thunar issues fixed by GSoC students
- Currently 12 open thunar merge requests, 9 opened by GSoC students
… and that is only thunar. There is as well a lot of activity on exo and libxfce4-util !
Many various smaller tweaks already made it into thunar 4.17.2. Some bigger ones, e.g. issues from the project ideas list are currently in work, or even already landed in the current master.
If you want to take a peek on the upcoming changes and new features already now, you can check the students frequent blog posts:
Hope you will enjoy the upcoming changes!
(A bit late) weekly update
Well, it’s a bit late for a weekly update that it should be rather called decadly update. But well, better than nothing!
WIP: Safety flag
Related:
- Backend: libxfce4util !16
- UI: Thunar !121
- Additional discussions: Thunar #156
I’m still working on safety-flag, which is mentioned in my introduction post and 2nd saturday post. Not much have changed, but now an interface for safety flag is going to be merged into libxfce4util
. Also, this flag will now only be used for .desktop files, rather than every executables.
Also, the UI part of this project also got its MR page (Thunar !121). Several discussion later (startig from here), we decided to put checkbox for safety flag on Property->Launcher. Because flicking trusted flag on should also trigger executable flag on, it would be preferrable to show it visually. Thus toggle button for executable flag would also be on Launcher tab. So this would be how it will look like:
Additional update
Related: libxfce4ui !42 (42 is a nice number!)
While I was working on safety flag, I got distracted by the boilerplates used on several XFCE projects, which was a direct copy of thunar_gtk_label_set_a11y_relation()
. To use this function across XFCE projects, I ported this to libxfce4ui
as xfce_gtk_label_set_a11y_relation()
. Doesn’t it feel good when duplicate codes are replaced with a proper function?
Weekly update – transfer queueing, execution safety flag, and MTP
Transfer queueing
After transfer queueing was introduced, it frequently caused crashes or freezing when working with remote location. This problem was solved by introducing a waiting queue. To be released in Thunar 4.17.4.
-
This patch will not be backported. If you have this problem with Thunar 4.16, it is recommended to set parallel transfer to “Always” to avoid this problem.
-
You might ask about how it was done before. How can a job can be queued when there is no queue? The answer is simple. Since every transfer job runs on a separate thread, it is possible to play a game of musical chairs. Every thread tries to be the only active thread, and if a thread fails to start, it waits until the next opportunity arises. This is easy to implement when parallel transfer is already implemented. But unfortunately, the game did not go well.
WIP: Introduction of an execution safety flag
(I recommend reading Thunar !156 for the context.)
Since the executable bit is not enough to confirm that the file is safe to execute, I am implementing an additional metadata (execution safety flag). Thunar will check this flag even if the execution bit is on, so a user has to confirm that they know that they are launching an executable. This data is contained in GVFS-metadata, and will remember SHA-256 hash value of that file. This will work as a per-file option to allow launching the executable.
I already finished coding a feature to save a hash value per-file and using it to verify executable, and will be added to libxfce4util soon. Interface with this safety flag is still work-in-progress, though.
WIP: MTP freeze
Recently, there are a lot of issue reports about MTP, and most of the complaints are about freeze. A directory under mtp:// that contains a lot of files tends to cause problems. One problem is that icon renderer reads file contents and might clog the main event loop, so I am experimenting with icon rendering right now. Trying to change directory while a directory is loading also freezes the environment, so requesting a file list of the current directory (or cancelling it) might be blocking for some reason.
GSOC 2021
Good news! I have been accepted to GSoC 2021. (Well, actually, it had been 3 weeks since it was announced, so I “was” accepted, to be exact.) I am contributing to XFCE this summer, so I will explain who I am, and what I am going to do.
First stop. So, who am I? My name is Yongha Hwang, and I am an Electronic Engineering sophomore. And that’s enough for personal information to do about contributing, so I’ll explain my experience with Linux, XFCE and C altogether.
I use Linux as my main OS. For developemnt, for surfing web, for entertainment like gaming, and everything else that happens after pressing power button. Although I use it as a main OS, I reinstall linux every 3~6 months. Since I don’t install the same thing everytime, I have used Ubuntu, Xubuntu, Linux Mint (both Cinnamon and MATE), Manjaro, Arch, Gentoo, and et cetra. I have even used Linux from Scratch (with LXQt) as a main OS.
My first experience with XFCE was Xubuntu in 2011. My first linux distribution was Ubuntu, as you have guessed. At that time Ubuntu was packed with Unity DE. It looked very futuristic to me since the only UI experience was with Windows XP and 98. But it did have one big problem to me: it was resource-heavy. The computer I was using at that time was quite slow and Internet Explorer took a whopping 12 seconds to show up. So I had to look for a lighter alternative and Xubuntu was a natural choice. Since then I liked how light DEs look like, so I use light DEs most of the time not because of my low-end PC, but because I like the visual of “nothing fancy but looks fine enough.”
I started programming in C about the time I started using Linux. I have not much to tell about C, though. What I do have to show is a Scheme interpreter, which I made when I was studying SICP (for fun, and I think it’s worth the time.)
So, what do I work on for XFCE? I have set two big goals for this summer.
Fix buggy launch behavior
Some people experience a bug that thunar tries to execute ordinary files like subtitles, and even directories. That happens when these files have execution bit (+x) enabled. I will try to fix this problem by checking MIME type before executing.
Another problem with launch behavior is that someone can slip in an executable file with execution bit on by packing it inside tar archives. This may not be a problem with normal scripts, but .desktop files can change their icon or file name to resemble normal document files. Files (formerly known as Nautilus,the file manager of GNOME) had the same problem before and they introduced safety flags using GVFS metadata as a solution. We can do the same trick because we use GVFS, too.
Improvements to file transmission
Have you ever experienced this: You were copying a lot of files, and somehow it got interrupted. You copy same files again. You skipped everything that was “already copied” to save time, only to find out a year later that the most important file was interrupted during the copy and you are left with the first 10KB of that file. To prevent this issue, you can copy every files again just to be sure, but that is a huge waste of time. If there is an option that leaves a partailly copied file as *.partial and it automatically deletes one, wouldn’t it be a better solution? If I have spare time I also would implement pedantic feature like “verify checksum of every files copied” to use on network drives.
Speaking of network files, Thunar loses metadata when copying files from GVFS. GVFS is a wrapper (naively speaking) for exotic locations like network file shares, smartphones, trash bin, and et cetra. Also, files copied from GDrive are labeled with unreadable names rather than the actual file name. I would also fix this problem.
Well, that’s what as far as I can tell! Congratulations to fellow XFCE GSoC contributors Vishal Sharma and Kefalidis Sergios, and major thanks to my mentor Alexander Schwinn.
Check out my Thunar contributions here:
Post 4.16 fatigue and what’s next
After we successfully released Xfce 4.16 as an early Christmas gift to all users last year I personally fell into the typical “post release fatigue” (PRF). On the one hand I was exhausted, on the other hand that’s how far our plans had taken us so there were no clear next steps we had settled on (apart from taking a break and recharging :)).
So what’s been going on since then…
Xfce 4.16 maintenance
First of all, we’ve done quite a few maintenance release of 4.16 to ensure it’s stability. We already provided lots of bugfix releases of 4.14 – some even very recently (Desktop, Appfinder) – but it looks like 4.16 may end up being (at least: among) the best maintained Xfce release so far.
Thunar is probably the active component with a 6th patch release being available already. Here goes an overview of all patch releases since 4.16.0 in December 2020:
- Thunar: 4.16.1, 4.16.2, 4.16.3, 4.16.4, 4.16.5, 4.16.6
- Panel: 4.16.1, 4.16.2
- Xfwm4: 4.16.1
- Garcon: 4.16.1
- Appfinder: 4.16.1
Developer documentation
In order to improve documentation for developers and make it more readily available we have started developer.xfce.org. For now this site hosts the API documentation of most relevant core components. This documentation is automatically kept up-to-date as part of our GitLab CI for the xfce/xfce-build Docker container and re-deployed on every week based on the latest 4.16 release tags.
Furthermore, we improved the shell-based helper scripts for developers, e.g. xfce-build (to locally run distcheck in the same Docker container used in our CI) with subcommands.
Task manager
I have fixed some bugs and done maintenance releases of the 1.4 series and started the 1.5 development series, which features a port of Task manager to Xfconf and Client-side decorations.
New icon naming scheme
As we changed the icon names for all Xfce components during the 4.16 cycle, I also migrated some plugins to the new naming scheme.
To briefly explain the rationale behind our change in 4.16: the previous names were highly inconsistent, overlapped with icons also used/shipped by other packages in distributions (so shipping our own icons with those “old” / “used” names would lead to unsolvable packaging conflicts). Especially the “standard” names like “preferences-desktop-*” would have been impossible to update and ship for us. In order to provide a consistent look and also to make it easier for icon theme maintainers to set up icons for Xfce we decided to follow the rDNS naming scheme for desktop files. The same naming scheme is already followed by Gnome, so it is fairly widespread in Gtk-based environments. Finally: previously no icon theme maintainer could even provide dedicated icons because the names overlapped and would also appear in other contexts or Desktop Environments.
Being an icon theme maintainer myself, I understood that this would lead to work for others. Sean even created a script to make it easier for everyone to update existing themes.
Plugin updates
I have taken a look at the three more prominent “monitoring plugins” of Xfce, namely CPU-graph, Systemload and Netload. I have created new icons for all three of them in a style consistent to the icons introduced in Xfce 4.16 and also ported Systemload to Xfconf.
I have also updated the Weather plugin quite a bit, adding a new icon, porting to Xfconf and improving the UX of the settings and forecast summary windows.
Finally some of the plugins mentioned above now implement the xfce_dialog_show_help API, which creates a “Help” button linking to the plugin’s documentation. This has been made possible by Kev, who ported the plugin documentation pages to docs.xfce.org and harmonized them, where possible. He also helped with adding more of these “Help” buttons and we’ll probably continue updating our plugins in parallel to the 4.18 cycle to make it easier for users to find the corresponding online documentation.
What’s next
The next step for me will likely be to focus on kickstarting the 4.18 cycle, which is still in its planning phase.
Xfce Panel Profiles 1.0.13 Released
Xfce Panel Profiles 1.0.13 has been released! The new release introduces new macOS and Windows layouts and improves on existing ones.
The post Xfce Panel Profiles 1.0.13 Released appeared first on Sean Davis.