If you don't want to have a certain partition listed in Grub's menu, you can no longer manually edit grub.cfg file because it gets regenerated automatically everytime there's a kernel update or someone runs update-grub.

Instead, you should get the UUID of the offending partition and add it to /etc/default/grub, using the GRUB_OS_PROBER_SKIP_LIST option. For instance, let's say I want to ignore the second partition of sda. You can get its uuid using:

$ blkid /dev/sda2
/dev/sda2: UUID="6ECE6EF8CE6EB84B" TYPE="ntfs" 

Then, add the necessary option to the /etc/default/grub file:

GRUB_OS_PROBER_SKIP_LIST="6ECE6EF8CE6EB84B@/dev/sda2"

Beware of the special syntax for the skip list: you need to type the partition's UUID followed by @ and the logical path. After that, run:

sudo update-grub

to update the grub menu configuration and the partition will be ignored with a message similar to:

Skipped Windows 7 (loader) on /dev/sda2 by user request.

D-Bus is a well known inter-process communication mechanism widely used in Linux environments. Qt offers some modules to work with D-Bus without the hassle of dealing with low level concepts. However, the docs are not as easy to grasp as you would expect. Here’s a quick and simple example to get acquainted with these concepts.

I won’t dig deep into the concepts of D-Bus, there are many tutorials out there about the topic. The bare minimum you need to know is this:

  • D-Bus offers a series of buses that processes can use to communicate with each other. The bus most commonly used with user apps is the session bus.
  • Applications usually connect to the session bus using a specific bus name, like com.josetomastocino.myapp.
  • Applications offer their functionality by exporting objects, which can be found at certain hierarchical paths, like /com/josetomastocino/myapp/InfoProvider.
  • Objects have methods and signals. Methods are called by the clients, can have arguments and may return values. Signals are broadcasted by the server applications and relayed to those clients listening for that signal on that particular bus.

How's this all implemented with Qt? Well, here's a diagram of the classes we'll be working with.

Image