Kirsle.net logo Kirsle.net

Tagged as: Xfce

A review of Linux desktop environments
June 17, 2016 by Noah

The next version of Fedora (24) is coming out soon, so I decided a couple weeks ago that I'd take a tour of all the different desktop environments and see if I like any of them enough to switch from Xfce. My original desktop environment of choice was GNOME 2, and I had jumped ship to Xfce after GNOME 3 was released because I was no fan of the tablet-focused, feature-stripped interface of the new desktop and GNOME 2.32 was, in my opinion, the pinnacle of the desktop metaphor for Linux.

Read more...

Tags: 0 comments | Permalink
Yum Updates Daemon for XFCE
June 4, 2012 by Noah

Update (5/28/13): I've ported this script over to Python: pyupdatesd. The Python version only requires pygtk2, which tends to come preinstalled on Fedora XFCE systems.


Since about three versions of Fedora ago, there wasn't an updates daemon for the XFCE desktop environment (or LXDE or the others, for that matter). KDE still had theirs, and Gnome 3's update daemon was built in to the desktop environment. So, XFCE users were stuck having to look for updates manually.

Not anymore!

I finally got around to writing a Perl script that checks for available updates, and shows a Gtk2 tray icon and a notification pop-up when one has been found. You can set it to start up automatically in your session settings and it will check updates for you every 15 minutes.

kupdatesd screenshot

You can get it from http://sh.kirsle.net/kupdatesd. Or you can see its source code here. :)

#!/usr/bin/perl

# kupdatesd - A simple yum update checker.
#
# This script will watch for available yum updates and show a GTK+ TrayIcon
# and notification pop-up when updates become available.
#
# This is intended for desktop environments like XFCE that don't have a native
# PackageKit update watcher.
#
# Set this script to run on session startup and it will check for updates every
# 5 minutes (by default; this is configurable in the source code).
#
# --Kirsle
# http://sh.kirsle.net

use 5.14.0;
use strict;
use warnings;
use Gtk2 -init;
use Gtk2::TrayIcon;
use Gtk2::Notify -init, "kupdatesd";

################################################################################
# Configuration Section                                                        #
################################################################################

my %c = (
    # The title to be shown on the pop-up and the icon tooltip.
    title    => "Updates Available",

    # The message to be shown in the pop-up.
    message  => "There are updates ready to install.",

    # The icon to use for the pop-up and tray icon.
    icon     => '/usr/share/icons/gnome/32x32/status/software-update-available.png',

    # How often to check for updates (in seconds).
    interval => 900,

    # The path to your yum binary.
    yum      => '/usr/bin/yum',

    # The path to your graphical updater.
    # gpk-update-viewer is provided by gnome-packagekit
    gui      => '/usr/bin/gpk-update-viewer',
);

################################################################################
# End Configuration Section                                                    #
################################################################################

# Gtk objects
my ($icon, $image, $eventbox, $tooltip, $notify);
my $visible = 0; # Icon is currently being displayed?

# Enter the main loop.
my $check = time() + $c{interval};
while (1) {
    select(undef,undef,undef,0.1);

    # Keep Gtk2 active.
    if (defined $icon) {
        Gtk2->main_iteration while Gtk2->events_pending;
    }

    if (time() > $check) {
        # Look for updates.
        unless ($visible) {
            system("$c{yum} check-update > /dev/null 2>&1");
            if ($? >> 8 == 100) {
                say "There are updates available!";
                show_icon();
            }
        }

        # Queue another check.
        $check = time() + $c{interval};
    }
}

sub show_icon {
    # Already initialized this once before?
    if (defined $icon) {
        # Just show the icon and notification again.
        $icon->show_all;
        $notify->show;
        $visible = 1;
        return;
    }

    # Tray icon. Image goes in EventBox, EventBox goes inside TrayIcon.
    $icon = Gtk2::TrayIcon->new("kupdatesd");
    $image = Gtk2::Image->new_from_file($c{icon});
    $eventbox = Gtk2::EventBox->new;
    $eventbox->add($image);
    $icon->add($eventbox);
    $icon->show_all;

    # Attach the tooltip.
    $tooltip = Gtk2::Tooltips->new;
    $tooltip->set_tip($icon, $c{title});

    $eventbox->signal_connect("button_press_event", sub {
        $icon->hide;
        $visible = 0;
        system($c{gui});
    });

    $notify = Gtk2::Notify->new(
        $c{title},
        $c{message},
        $c{icon},
    );
    $notify->show;
    $visible = 1;
}

Tags: 15 comments | Permalink
Video Thumbnails on Fedora XFCE
February 10, 2012 by Noah
This post is mostly for my own reference but if Google sends anybody here, hopefully it'll help them too.

tl;dr version: it seems that the gstreamer-ffmpeg package is required for Thunar (or tumblerd, specifically) to render thumbnails of video files on the XFCE desktop for Fedora 16. This package is provided by RPM Fusion yum repository (rpmfusion-free-updates specifically).

It seems to be pretty hard to find this information online. None of my Fedora XFCE systems were able to render thumbnails of videos, and this caused me some headaches with removable drives (when I'd be done with the drive and want to unmount it, I wouldn't be able to because "the device is still busy"... and lsof /media/Cyro would show that tumblerd was the culprit... it was trying to render thumbnails of any video files I may have seen while browsing in Thunar and wasn't having much luck with it).

The usual set of packages that provide all the video codecs for me didn't do the job (vlc, smplayer, gstreamer-plugins-{good,bad,ugly}), I even tried installing ffmpegthumbnailer and no luck. Finally I installed gstreamer-ffmpeg, and after doing a killall thumblerd and then visiting a folder full of videos in Thunar, it finally worked and started making thumbnails.

Tags: 1 comment | Permalink
Xfce for Gnome 2 Refugees
November 14, 2011 by Noah
Ever since I jumped ship from Gnome to Xfce a few years ago when Gnome 3/Shell was first announced, I've configured my Xfce desktops to strongly resemble the standard Gnome 2 panel layout.

Screenshot - click for bigger version
Click the screenshot for the full size version.

Along the top panel I have my Applications and Places menus, app launchers for my commonly used programs, my CPU usage graph, notification area and clock. On the bottom panel are my task bar and workspace switcher. These are all standard Xfce panel applets.

The details for anyone who's interested (the only panel applet options shown are the ones that differ from the default options):

  • Top Panel:
    Orientation: Horizontal
    Size (pixels): 24
    Length (%): 100
    • Applications Menu
      Button title: Applications
      Icon: a Fedora icon in /usr/share/pixmaps...
    • Places Menu
      Show: Label Only
      Label: Places
    • Separator
    • Many Launcher applets for my commonly used programs
    • Separator
      Style: Transparent
      Expand: checked
    • Brightness plugin
    • Screenshot
    • CPU Graph:
      Background: black
      Width: 48
      Show frame: checked
      Show border: unchecked
    • Separator
    • Notification Area
    • Separator
    • DateTime:
      Layout Format: Date Only
      Date Format: Custom: %a %b %e, %l:%M %p
      The DateTime applet has a drop-down calendar, unlike the normal Clock applet.
  • Bottom Panel:
    Orientation: Horizontal
    Size (pixels): 24
    Length (%): 100
    • Window Buttons
    • Workspace Switcher
So, any Gnome 2 refugees who can't stand Gnome 3... Xfce 4.8 is a very good option and you can configure it to look and feel just like Gnome 2. :)

Update (5/28/13):

To get the look of the "System" menu to go with your Applications and Places, I found this tip elsewhere online:

Add a Launcher applet, set it to launch the Settings Manager (xfce4-settings-manager), rename the launcher to "System", and on the Advanced tab of the Launcher applet, check the box to "Show label instead of icon".

System button

This won't get you a drop-down menu, but it will complete the Gnome 2 look for your main menu part of the panel. :)

Tags: 8 comments | Permalink