Image of Linux Kernel Development (3rd Edition)
Image of Modern Operating Systems (3rd Edition)
Image of Operating System Concepts
Image of RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302) (Certification Press)

GNOME Shell/Cinnamon Extension Configuration Persistence

In a previous post, I demonstrated how you could modify the appearance and actions of a Cinnamon extension called righthotcorner, which added an overview hot corner to the right upper corner of your primary screen, by communicating with the extension via D-Bus. In this post I show you how I extended this extension to incorporate persistence of a user’s preferences for the extension’s configurable options, namely hot corner icon visibility and hot corner ripple visibility. Although I am using a Cinnamon extension for the purposes of this post, the concept is equally applicable to a GNOME Shell extension. Most of

Controlling a GNOME Shell or Cinnamon Extension using D-Bus

In my last post, I discussed how you could use D-Bus object introspection to enumerate the methods, signals and properties of the GNOME or Cinnamon Shell, and showed how you could enable, disable or list extensions using a command line utility that used D-Bus to talk to the Shell. In this post, I demonstrate how you can add D-Bus support to a Shell extension and allow a command line utility to control the operating characteristics of the extension via a command line utility. The Shell extension I shall use for demonstration purposes is a simple Cinnamon extension that adds a

D-Bus, Cinnamon and the GNOME Shell

Many people are unaware of the fact that both the GNOME Shell and Cinnamon provide a D-Bus ((Desktop Bus) interface. D-Bus is a form of inter-process communications (IPC) which provides a mechanism for applications running on a single platform to “talk” to each other. In this post, I will show you how to enumerate the available methods and properties and how to enable and disable extensions via the session D-Bus using a command line tool. D-Bus is a system for low-latency, low-overhead IPC using messages rather than byte streams. The core protocol is a 2-way, asynchronous, binary protocol. A message

Retrieving a Property using Python and GDbus

The documentation on retrieving or setting an D-Bus object’s properties using Python is pityful and mostly inaccurate. Recently GDBus has replaced dbus-glib as the preferred way to interface with D-Bus on GNOME platforms. The central concepts of D-Bus are modelled in a very similar way in dbus-glib and GDBus. Both have objects representing connections, proxies and method invocations. However there are some important differences: dbus-glib uses the D-Bus libdbus reference implementation, GDBus does not. Instead, it relies on GIO streams as transport layer, and has its own implementation for the the D-Bus connection setup and authentication. dbus-glib uses the GObject

Create a Repeated String

This question is often asked in the various Unix and Linux forums. For example, suppose you want to create a string of 50 asterisks other than str=”***********************************” Here are some of the ways I have come across over the years. perl -e ‘print “*”x50’ ruby -e ‘puts “*”*50’ awk ‘BEGIN { while (a++<50) s=s “x”; print s }’ printf ‘%*s’ “50” ‘ ‘ | tr ‘ ‘ “*” echo “*****” | sed ‘s/.*/&&&&&&&&&&/’ The following works for gawk but not oawk. echo | awk NF=51 OFS=*