Xfce

Subdomains
 

Weekly update

  • July 4, 2021
  • Yongha Hwang

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

  • June 25, 2021
  • Yongha Hwang

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.

(A bit late) weekly update

  • June 21, 2021
  • Yongha Hwang

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:

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:

image_for_new_UI

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

  • June 12, 2021
  • Yongha Hwang

Transfer queueing

Thunar !569

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

Thunar:async-icon-render

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

  • June 2, 2021
  • Yongha Hwang

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: