Xfce

Subdomains
 

GSoC’22 – [Part 2] User Profiles in Xfce-Terminal

  • October 23, 2022
  • Amrit Borah

User-Profiles in Xfce-Terminal

Note: This feature has not yet been merged. The UI/UX have been finalized but there are some internal implementations that are being reviewed.


MRhttps://gitlab.xfce.org/apps/xfce4-terminal/-/merge_requests/57

The Task

The aim of this feature is to enable users to create multiple different profiles. A profile is just a combination of preferences.

This allows the user to quickly switch between predefined profiles when the need arises.
As a use case scenario, let us consider the following example. One might want to have one particular tab transparent. So one can just create a new profile and change the transparency value on that profile. Then proceed to switch the profile by selecting the desired profile form the newly added "Profiles" menu.

Some considerations on the behavior of this feature,
  • There has to exist at-least one profile.
  • Terminal creates a "default" profile if no profiles are found on the system. Old configuration will be migrated to this profile.
  • One of the profiles is set to be "Default", i.e each new tab or window is opened using this profile. So if one wishes to change profile on a particular tab/window then one can just do so by selecting the desired profile from the Profiles menu.

On the implementation

  • Xfce4-terminal will now be using Xfconf as backend for storing and organizing settings.
  • The TerminalPreferencesDialog, which was previously written using glade, has now been re-written in C as an attempt to make it easier to work on it.
  • A new setting has been added that allows users to specify the orientation of the tabs of the preferences dialog. In the picture above I have set it to the "Left".

 

Work Left

  • I am closely working with my Mentor Sergios to fix a synchronization bug: mismatch in background images when multiple windows are open.

GSoC 22 – The Closing Blog Post

  • October 21, 2022
  • Pratyaksh Gautam

In the summer of 2022, I participated in Google’s Summer of Code, contributing to the Thunar file manager at XFCE, with the help of my mentor Alexander Schwinn. It’s been about a month since my GSoC term was officially over, and after a hectic couple weeks, I’ve finally decided to sit down and write down the closing blog post.

New features in Thunar

I’ll start off by introducing the features that I worked on, and a rough idea of how the implementation for the same works. Of these, undo-redo and file counts for folders are already merged on master and have been released with Xfce 4.18. The tour probably does a much better job than I will here, so be sure to go through it as well!

Undo-redo

This is the big one. While adding support for undo and redo, one of the most crucial things for me was doing it in an elegant way that would make it easy to have multi-level undo and redo.

How we decided to do this was to maintain a global linked list, containing information about the last performed operation, including what type of an operation it was, what files were involved in it, etc. This allowed it to be as trivial as moving a few pointers around to keep track of the state of the system once an undo or a redo is performed. The actual undo/redo operation is simply executing either the inverse of the last performed operation, or executing the exact same operation that was last undone.

I’m of course glossing over a lot of the details that made this a fair bit harder than we had initially anticipated. Nonetheless, with some help from Alex, we were able to ship this in time for the 4.18 release! :raised_hands:

File counts for folders

Adding file counts for features was just a little addition to help better utilize the ‘size’ column for folders, which was essentially wasted space earlier.

It was essential to be asynchronous with its implementation, which turned out to be a bit trickier than I had initially expected. It mostly boiled down to a line of conversions between file abstractions that I had taken for granted would have a low overhead (spoiler alert: they did not have a low overhead).

I was less than confident when first approaching Gallery view, since I thought I’d have to create an entire view from scratch. Luckily, that really wasn’t necessary. I was able to make a new view based off the same abstract view class that the existing icon view used. This is probably better for multiple reasons, since building on existing things makes for much simpler design for the new additions, and easier code review as well.

While I initially had envisioned a masonry image gallery, like the kind you would see on sites such as Pinterest, the abstract icon view lent itself much better to a square icon based gallery, similar to what most Android phone galleries have by default these days.

The gallery view PR is not yet merged into master, needing a few minor fixes on the dialog tooltips (which I’ve sadly been a bit too busy to work on yet), before it’s completely ready.

Not all smooth sailing

While I had initially hoped to complete what I had mapped out in my GSoC proposal in my summer vacations itself, that didn’t work out as intended. Once my semester at college started, I started struggling a bit to balance my academics and my GSoC commitments, but I was steadily making progress.

GSoC being flexible with its contributor timelines this year was an absolute life-saver, since I had to extend my deadline multiple times in order to hit the milestones on my proposal.

The lowest point was when in the midst of all this, some personal family issues cropped up and I essentially went incommunicado for almost a week. This would’ve been enough to fail my proposal in some organizations, but Alex still gave me a chance to make up on lost time when I was back, and for that I’m incredibly grateful. I was able to capitalize on this opportunity and get plenty of work done, though it was really quite hard (and probably not very good for my health long term :sweat_smile:).

Advice for others

I recently received an email from someone who was looking to contribute to XFCE in this year’s GSoC, and wanted some advice. I’ll relay part of what I wrote back over here:

I’d say the most important thing is to dive into it while still knowing that you don’t know anything :P

Try at a problem with your intuition for what might work. If you get stuck, push for another 15-20 mins and note down what you try. In this time you should be consulting documentation, StackOverflow, Github issues etc.
If you still aren’t able to figure it out, send a message on the XFCE IRC/Matrix channel, and be descriptive about what you tried, why you think it should work, and why you think it might not have worked. The mentors are incredibly helpful, and you’ll often get an answer that will deepen your understanding of the system and coding in general.

In addition, I’d also like to stress that communication is key!. Your mentors are there to help you, and they want nothing more than a successful and productive summer for the both of you. Raising issues that you’re facing as early as you can allows the both of you to think about and discuss how to tackle them.

Acknowledgements

I’m incredibly grateful to my mentor Alexander Schwinn, who is one of the most helpful people I’ve had the pleasure of working with. He’s been incredibly kind and polite, more than one could reasonably expect out of anyone given the circumstances.

I’m also very thankful for all the help I’ve received from the dedicated XFCE community, including Sergios Kefalidis, Yonghwa Hong, Gaël Bonithon, and many others.

Finally, I’d like to thank Google Summer of Code for the wonderful opportunity, which has definitely been a fantastic hands-on learning experience for me.

GSoC’22 – File Highlighting in Thunar

  • August 13, 2022
  • Amrit Borah

 

About the feature

  • The aim of this feature is to enable the user to highlight files/folders across the various different views.
  •  The feature can be toggled on/off through the View Menu.
  •  The highlight color can be selected by navigating to the Highlight tab in the properties dialog of the respective file. The properties dialog can be brought about by selecting the Properties option under the Context Menu  (Right click on the desired file/folder to show the context-menu)

Requirement: GVFS (Gnome Virtual File System)

 Implementation

  • The biggest challenge was figuring out how to paint the highlights on the various different views.
  • The solution was to use a GtkCellLayoutDataFunc that is called on each item of the view. This way we can set the specific background color in the CellRenderer for each of the different items on view.
  • Another challenge that came up was implementing the rounded corners.
  • For this, modifications were made to the IconRenderer & a new custom TextRenderer was introduced. The trick was to use cairo to clip the backgrounds & paint the specific color.

 This feature is possible with the support by Thunar's lead developers - Alexander Schwinn (alexxcons), Sergios - Anestis Kefalidis (SKefalidis) and Yongha Hwang (MShrimp4).



GSoC 22 – The First Blog Post

  • May 28, 2022
  • Pratyaksh Gautam

I’m really looking forward to this summer, since my project proposal for this year’s Google Summer of Code has been selected! I’ll be working on adding features to Thunar file manager, an XFCE application, with the help of my mentor Alexander Schwinn.

My history with XFCE

I’ve been big on open-source ever since my school days, and actually ran Xubuntu (an Ubuntu distribution with XFCE as its desktop environment) on my daily driver, an old netbook back in eleventh grade. It was too slow of a device to run GNOME, so I absolutely had to use a lighter-weight desktop environment, and compared to alternatives like LXDE which I didn’t like the aesthetics of, and pantheon (the default DE for elementaryOS) which still felt lacking in terms of performance, XFCE was the perfect balance of form and functionality.

Since then, I’ve done some distro-hopping before settling on my current setup, hand-rolled with awesome window manager and no DE. While I generally prefer to use the command-line, Thunar has been by GUI file manager of choice ever since I started using this setup a little over 2 years ago. It’s fast, light-weight, and gets the job done without getting in your way, which is exactly what I need.

Planned features

Thunar does however lack a few features that would be really handy to have, which is exactly what I’ll be working on.

Undo-redo

Adding undo and redo is an absolute no-brainer for me, and would probably be the single biggest thing I think Thunar is currently missing. If you’re anything like me, you’ve often selected the wrong file to move into another directory, and you have to manually undo it and move the correct file once you realize your mistake. Implementing this would do away with such frustrating tedium in the case of minor mistakes.

File counts for folders

Currently, the list view in Thunar has a ‘size’ column which shows the size of the corresponding file in the listing. However, this column is blank for folders (or directories). As such, it’s essentially wasted space for directories, but it could be put to good use showing the count of the files in the folder instead.

Picture-specific maximized thumbnail view

Managing pictures is primarily based on the content of the picture itself, rather than metadata like the name, date etc. So it would be very convenient to have a specific view optimized for folders with a large number of pictures, where the thumbnails take up as much space on the screen as possible. Think Pinterest, Google images etc.

If somehow I complete the work enlisted in my proposal ahead of time, I plan on looking at some of the file system synchronisation bugs that some Thunar users have reported.

Conclusion

I’m glad to have the opportunity to be able to work on open-source tools I myself use everyday, and feel really lucky to have the support of Google to be able to work on this over this summer. I’m really grateful for the help I’ve gotten along the way to getting my proposal accepted from Sergios Kefalidis, Alexander Schwinn, and other members of the XFCE community.

I’d like to congratulate my fellow XFCE GSoC contributors Yogesh Kaushik and Amrit Borah as well (who coincidentally are also from different IIITs :grin:).

A Journey Begins (GSoC – 2022)

  • May 25, 2022
  • Amrit Borah

 

Introduction

Hello 👋😁 ! I am overjoyed to announce that my proposal to XFCE for GSoC - 2022 got selected !

Oh ! I forgot to introduce myself. My name is Amrit Borah and I am a somophore undergraduate student at the Indian Institute of Information Technology Guwahati (IIITG), India, pursuing Computer Science Engineering (CSE). I have only recently completed my 4th semester at college. 

Tasks in my proposal

So, getting back to the topic at hand - GSoC, I will be taking on 4 tasks for XFCE.

Namely,

  • Implementing option to enable expansion of folders in "Details View" in Thunar. (link)The desired outcome -


  • Adding user profiles to XFCE Terminal (link)
  • I'll also be rewriting the preference-dialog in plain C. Currently it has been written using glade.
  • Handling session restoration for XFCE Terminal (link)
  • Implementing colored highlights for files/folders in Thunar. (link) The desired outcome -


  • Further details on the topics can be found on the links corresponding to the respective tasks.

    What I'll be working with -

     I will be working with GTK - 3.0 toolkit and C source code for the aforementioned tasks.

    Linux, C & XFCE

    I first started using Linux back in 2018. Quite frankly, I hated the look of Windows 10. I wasn't really tech savvy enough to really know the fundamental differences between Windows & GNU/Linux. All I could differentiate them by, was their looks. I wanted to make my desktop look and feel like MacOS. I have always liked it's pleasant looks. The MacOS desktop is pure eye candy to me. But unfortunately I never had the pleasure to own a Apple Mac. So I installed Ubuntu. Followed youtube tutorials and customised gnome to look like mac os. Then as year went by I tried out other distros like Pop OS, Opensuse, etc. But the laptop I had then was the Y530 from Lenovo which had Nvidia GTX 1050. Gaming was an issue for me. So I switched back to Windows. 

    Finally in 2020, when I got my own personal laptop for college, I got a thinkpad E14 with the intention of daily driving Linux. I tried out a variety of flavors on that hardware. It had great keyboard ! On the quest for the perfect Distro, I stumbled upon numerous YouTube channels on Linux notably DistroTube. Following the guide for Arch installation I successfully installed arch and tasted my first WM i.e Awesome WM. Customising it wasn't too bad but since I had little knowledge of lua I found it's config too verbose and hard to hack into ( (whispering...) I wasn't tech savvy back then ) . It was only a matter of time before I started WM hopping much like my distro hoping earlier. Tried out bspwm & xmonad. I even tried learning Haskell, but only went as far as the basics (didn't venture into monads).

    But I think I finally settled down on Fedora. Gnome is/was my favourite DE but I always had one gripe i.e stuttering/lagging when switching into the overview view using intel igpus. It has now been solved ig with Gnome 42, at least it's really smooth for me now. So (I sincerely hope ! distro/wm hopping is fun but tedious 😭) Gnome it is then.

     Coming onto C now, my first introduction to C programming language was in my CS course. It was one of the topics in my 1st semester. I kinda like C to be honest. I am most familiar with it's syntax more so than other programming languages. But memory management is not fun 😭. Oh the seg faults 😇 ! Later we did have Java as a course. I have a good relation with Java. But the real meaty portions of the OS was taught in my Operating Systems course in 4th sem. I loved that course.Finally got a formal introduction to the depths of an operating system.

     I hadn't used XFCE on any of my main machines since they were quite capable hardware. It's only when I bought a raspberry pi 4, I got the taste of the XFCE DE. I am quite impressed with the performant and snappy look and feel of the DE. And Now I have the pleasure to work for XFCE 😄 !

    Final thoughts

    I have gone on for too long now. So keeping it short, I am really greatful for the opportunity that I am provided with and I thank Sergios - Anestis Kefalidis (my mentor & maintainer of XFCE Terminal), Alexander Schwinn (maintainer of Thunar & xfce org admin for gsoc) & Yongha Hwang (Xfce Developer) for the reviews and support.

    I would also like to congratulate my fellow GSoC contributors - Pratyaksh Gautam & Yogesh Kaushik - and wish them the best of luck !

    Really excited ! 😁

    My contributions to XFCE

    • For Thunar (link)
    • For XFCE Terminal (link)

     

    Shiny new things in Thunar thanks to GSoC 2021

    • September 11, 2021
    • Alexxcon's Software Development Blog

    GSoC 2021 is over now and I am happy to tell you that both students working on thunar did an excellent job. Alot of nice stuff has been added thanks to them !

    In order to allow you to discover all these new features, Thunar 4.17.5 was just released. (Note that this is a development release. It still might have some rough edges)

    For details about the new features check the summaries provided by Sergios and Yongha:

    Sergios GSoC Summary

    Yongha’s GSoC Summary

    Besides these, here as well some more new features added during GSoC for which I thought they would be worth to mention:

    • Bookmarks got moved into a separate ‘Bookmarks Menu’ and a ‘create bookmark’ option was added (MR !109 and MR !71)

    bookmark menu

    • A new menu item “Set Default Application” was added to the “Open with” submenu (MR !79)

    Open with - Set Default App

    • A new section ‘Default Application’ was added to the ‘thunar-chooser-dialog’ (MR !81)

    Default App Section

    On top there are still various open merge requests with partial finished features, most of them from GSoC students for which I did not find time so far. So expect more new stuff to arrive soon !

    You as well might want to keep an eye on xfce4-terminal, which received alot of activity recently, since it is now maintained by Sergios Kefalidis.

    If you find a bug on any of these new features, please make use of the xfce bugtracker.

    Happy testing !

    Xfce participation in GSoC 2021

    • June 23, 2021
    • Alexxcon's Software Development Blog

    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:

    … 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:

    Yongha Hwang:

    Sergios Anestis Kefalidis:

    Vishal Sharma:

    Hope you will enjoy the upcoming changes!