I can make it official now, the Debian package Slim is going to be removed from their archive, even though the bugs are fixed for both Debian stable and unstable, in the end the package has to be taken off where that part of that story is fuzzy.
Now it is time to switch to qingy or gdm... or xdm.
As of a last effort I updated the two packages and put them on Alioth. Check the changes files if you want more information.
2009-07-28
2009-07-12
Notes, notebook, tabs
The notes plugin features a notebook since the port to Xfce 4.4 and in the last release I hide the tabs and gave a try to a new navigation bar. Seems you like the tabs so no worries it will be back in the next release.
Update: Revision 7717 has an option to show the tabs.
Update: Revision 7717 has an option to show the tabs.
2009-06-15
Run command, not alias
To execute a command and not its alias there are some ways. I just figured the nicest out there.
Say grep is aliases to "
One way of avoiding the alias is to pass the full path, e.g. "/bin/grep". Another way is to quote the command e.g. "'grep'" and the quicker and nicest way is to put the two quotes before the command e.g. "''grep".
Say grep is aliases to "
grep --color -Hn". This can be annoying in case the output must be send through a pipe to another command because it always prints the source and the line number.One way of avoiding the alias is to pass the full path, e.g. "/bin/grep". Another way is to quote the command e.g. "'grep'" and the quicker and nicest way is to put the two quotes before the command e.g. "''grep".
2009-05-08
Making use of loop devices on Linux
This post is about the loop devices on Linux.
The loop devices are a possibility under Linux to mount regular files. It is often used to mount an iso image, but it can also be used to play with Raid, LVM, or a file system.
To use the loop devices it is mandatory to load the loop module: ”
Remark: work inside a tmpfs like /dev/shm to gain speed when running tests.
File-System
Creating a file-system out of a file, plus being able to mount it, works as follow:
Raid
Using loop devices is very convenient when training with Raid for instance. To create usable devices for a Raid, it works as for a file-system, except that instead of mounting the file as a loop device they must be setup with the tool ”
Preparing a Raid5 works as follow:
The loop devices are a possibility under Linux to mount regular files. It is often used to mount an iso image, but it can also be used to play with Raid, LVM, or a file system.
To use the loop devices it is mandatory to load the loop module: ”
modprobe loop”. This will create the loop devices /dev/loop0, /dev/loop1, etc.Remark: work inside a tmpfs like /dev/shm to gain speed when running tests.
File-System
Creating a file-system out of a file, plus being able to mount it, works as follow:
- Create a file of a hundred mega-bytes:
dd bs=1M count=100 if=/dev/zero of=output- Format the file:
mkfs.ext2 output- Mount the file with a loop device:
mkdir loop-mountmount -o loop output loop-mount- When using the option ”
-o loop” the first available loop device is taken. It is possible to select the loop device to use by giving the option ”-o loop=/dev/loop0”.
mount”. It displays a line like that one:/dev/shm/output on /dev/shm/loop-mount type ext2 (rw,loop=/dev/loop0)It is possible to create files and directories within loop-mount, then unmount the device and remount it back.
Raid
Using loop devices is very convenient when training with Raid for instance. To create usable devices for a Raid, it works as for a file-system, except that instead of mounting the file as a loop device they must be setup with the tool ”
losetup” that is part of the Linux utilities. In fact, it is not possible to prepare devices for a Raid that are already mounted, and losetup makes a loop device in /dev/ ready to be mounted in a way that it is possible to run ”mount /dev/loop0 mount-point” instead of ”mount -o loop file mount-point”.Preparing a Raid5 works as follow:
- Create 3 files:
dd bs=1M count=100 if=/dev/zero of=0dd bs=1M count=100 if=/dev/zero of=1dd bs=1M count=100 if=/dev/zero of=2- Format the files:
mkfs.ext2 0mkfs.ext2 1mkfs.ext2 2- Setup loop devices:
losetup /dev/loop0 0losetup /dev/loop1 1losetup /dev/loop2 2- Prepare the Raid5 device:
mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/loop0 /dev/loop1 /dev/loop2- Mount the Raid5 device:
mount /dev/md0 mount-point
2009-04-17
Moblin Day 1+2
It's the second time I'm testing Moblin. The first time was with Alpha1, but now with Alpha2 I decided to install it. One main reason I kept Alpha2 was because of the availability of Xfce 4.6 ;-) Apart from that the experience is really great and it does boot fast. I turn the netbook on and after 1-2 seconds I already see an image on top of the Xorg session. It feels like hibernation but it's not :-)
The first day
I stumbled over the bug #1088 when I entered my key for the Wifi access. Of course I obviously had to type it wrong... One way to fix this was to clean up the configuration file of connman, within /var/lib/connman/. Otherwise nothing alarming.
After that I themed a little bit the desktop, like the awesome Nodoka-Midnight theme. Next I quickly figured the package manager, yum, and I headed toward a system upgrade. This step took a very long time, up to 3 hours. Alpha2 is as of today around 1 month old and there were over 300 packages to download. That took around 700 actions for yum like installing, updating and cleaning up.
Once the upgrade was done I installed the necessary devel packages to compile xfce4-gvfs-mount and xfce4-clipman-plugin both respectively from git and subversion. The Install/Remove Software GUI (gpk-application) is very nice, better than what I knew from Synaptic. Amongst the Moblin packages I found xfce-software-development which eases a little bit the selection of packages to install.
Well, one issue at the post upgrade was the default background disappearing, so I found out that it came from the package xfce4-desktop-branding-moblin. I'm kinda attached to that background now, I like the electronic-circuit like board, so I managed to copy/paste it. It's called moblin-energy-blue-1024x600.png.
The second day
A few issues:
- Firefox crashes "a lot".
- The gvfs-fuse-daemon is missing.
- Impossible to play MP3 or Divx.
I dunno how to fix Firefox and there are no appearing bug reports. I tried out the official binary provided by Mozilla and it crashes the same ways. GMail is crashing, Twitter is crashing when reloading the page after giving an up-to-date state, https on xfce.org, etc. So this is annoying. I will try to get a backtrace and install Midori since Moblin has a recent version of WebKit GTK+.
Now about the Gvfs topic, I was first fighting with an old build of xfce4-gvfs-mount on my home partition to finally notice that the gvfs mount was useless as gvfs-fuse-daemon was missing by default on the system. This means I can only access the files the hard way by using the gvfs programs to copy, list or delete files. I had to install the package gvfs-fuse.
And finally, the Moblin repository doesn't provide decoders for MP3 or Divx. Those are provided with the set of ugly plugins for GStreamer and is not available.
Hence I downloaded and installed the following packages from Fedora 10: a52dec, libmad, libmpeg2, lame-libs, libmpeg3 and of course gstreamer-plugins-ugly. The gstreamer-plugins-ugly package depends on a little more libraries but I didn't find them and I am already covered with the libs I downloaded.
Last but not least, I miss Wesnoth and the Xfce Power Manager :-)
Update: Screenshots
Update: Actually to get Totem to read Divx I needed to install gstreamer-ffmpeg! I have a dozen of rpms in a directory.
The first day
I stumbled over the bug #1088 when I entered my key for the Wifi access. Of course I obviously had to type it wrong... One way to fix this was to clean up the configuration file of connman, within /var/lib/connman/. Otherwise nothing alarming.
After that I themed a little bit the desktop, like the awesome Nodoka-Midnight theme. Next I quickly figured the package manager, yum, and I headed toward a system upgrade. This step took a very long time, up to 3 hours. Alpha2 is as of today around 1 month old and there were over 300 packages to download. That took around 700 actions for yum like installing, updating and cleaning up.
Once the upgrade was done I installed the necessary devel packages to compile xfce4-gvfs-mount and xfce4-clipman-plugin both respectively from git and subversion. The Install/Remove Software GUI (gpk-application) is very nice, better than what I knew from Synaptic. Amongst the Moblin packages I found xfce-software-development which eases a little bit the selection of packages to install.
Well, one issue at the post upgrade was the default background disappearing, so I found out that it came from the package xfce4-desktop-branding-moblin. I'm kinda attached to that background now, I like the electronic-circuit like board, so I managed to copy/paste it. It's called moblin-energy-blue-1024x600.png.
The second day
A few issues:
- Firefox crashes "a lot".
- The gvfs-fuse-daemon is missing.
- Impossible to play MP3 or Divx.
I dunno how to fix Firefox and there are no appearing bug reports. I tried out the official binary provided by Mozilla and it crashes the same ways. GMail is crashing, Twitter is crashing when reloading the page after giving an up-to-date state, https on xfce.org, etc. So this is annoying. I will try to get a backtrace and install Midori since Moblin has a recent version of WebKit GTK+.
Now about the Gvfs topic, I was first fighting with an old build of xfce4-gvfs-mount on my home partition to finally notice that the gvfs mount was useless as gvfs-fuse-daemon was missing by default on the system. This means I can only access the files the hard way by using the gvfs programs to copy, list or delete files. I had to install the package gvfs-fuse.
And finally, the Moblin repository doesn't provide decoders for MP3 or Divx. Those are provided with the set of ugly plugins for GStreamer and is not available.
Hence I downloaded and installed the following packages from Fedora 10: a52dec, libmad, libmpeg2, lame-libs, libmpeg3 and of course gstreamer-plugins-ugly. The gstreamer-plugins-ugly package depends on a little more libraries but I didn't find them and I am already covered with the libs I downloaded.
Last but not least, I miss Wesnoth and the Xfce Power Manager :-)
Update: Screenshots
Update: Actually to get Totem to read Divx I needed to install gstreamer-ffmpeg! I have a dozen of rpms in a directory.
2009-04-16
Xfce Clipman Plugin 1.0.0
This post is about the latest release of Xfce Clipman Plugin, a Clipboard Manager for the Xfce desktop. I turn it more technical than for end-users. I hope people interested into GTK+, GObjects or Xfce panel plugins will like to read it. The release is going to happen very soon now.
The first major change concerns the plugin being entirely rewritten by using GObjects and Xfconf, this means cleaner, better understandable, maintainable code, etc. There is the "main function" (for sack of clarity) and four objects. A collector which listens to clipboard changes and put them in the history, the history is also an object, a menu (on top of GtkMenu) that displays the history and allows to clear it, and finally another object which is part of a new feature for the clipboard manager.
Now having my objects it's just about instantiating them in the main function and binding them to Xfconf. If there is something missing in an object it is just about modifying a particular aspect of it.
The goal of using Xfconf is to have a less cluttered code for settings, and to make good use of property bindings against the objects. For instance, the object History has a maximum count of items, and being bind against Xfconf, it is possible to run an external command with xfconf-query to change that setting, without having to call a public setter function. Binding a property is a one function call.
Following this major change is the settings dialog. I have written it from scratch with Glade, a UI designer for GTK+, by which I can easily modify and beautify the dialog without having to fight with lines of code several hours a day. In fact it takes a few seconds to change a label and up to 5 minutes to design a goddamn dialog. Glade makes an increased use of memory however, but stop thinking of this when you know you have 1MB times 1000 installed on your system — I have currently 1GB on a netbook and 2GB on a quite-fanless Atom-based workstation but I use only around 300MB in general. If you still fear about having an application that uses only 2 but 5MB with Glade, well I can't help you! From what I have read, the built-in UI designer of GTK+, named GtkBuilder, needs less memory, but the Glade to GtkBuilder conversions are going to happen with Xfce 4.8.
Now about the new feature introduced into this major release. It is called "Actions" which is the fourth object by the way. An action is a match between a text selection and regexes to let you execute specific commands. For example the action "Image" can match text with image filenames and let you choose commands between "View with Ristretto" and "Edit with Gimp". I wrote something simple in the settings dialog to add new actions that is inspired from the Thunar User Custom Actions interface.
Finally, I made other changes that are more geeky than useful, like I made a bundle out of the plugin. The plugin is now installed under the binary directory instead of the common place holder for panel plugins but can still be added inside a panel with the "Add Item" menu action. As you might understand, it can be executed as well now, and if you do so it will run inside the notification area. An item is installed in the applications menu to be able to start it (under the category Utility), and as it is possible to run outside the panel, I added a autostart file.
That's it already. If you have questions, don't mind. If you wanna discuss the Actions/regex feature go ahead. More importantly, I hope you'll take a glimpse at the code.
If you are interested into panel plugins, have a look at the wiki. The panel plugins amongst the goodies are a good way to get to know code and start with something.
Update: ANN: xfce4-clipman-plugin version 1.0.0 released
The first major change concerns the plugin being entirely rewritten by using GObjects and Xfconf, this means cleaner, better understandable, maintainable code, etc. There is the "main function" (for sack of clarity) and four objects. A collector which listens to clipboard changes and put them in the history, the history is also an object, a menu (on top of GtkMenu) that displays the history and allows to clear it, and finally another object which is part of a new feature for the clipboard manager.
Now having my objects it's just about instantiating them in the main function and binding them to Xfconf. If there is something missing in an object it is just about modifying a particular aspect of it.
The goal of using Xfconf is to have a less cluttered code for settings, and to make good use of property bindings against the objects. For instance, the object History has a maximum count of items, and being bind against Xfconf, it is possible to run an external command with xfconf-query to change that setting, without having to call a public setter function. Binding a property is a one function call.
Following this major change is the settings dialog. I have written it from scratch with Glade, a UI designer for GTK+, by which I can easily modify and beautify the dialog without having to fight with lines of code several hours a day. In fact it takes a few seconds to change a label and up to 5 minutes to design a goddamn dialog. Glade makes an increased use of memory however, but stop thinking of this when you know you have 1MB times 1000 installed on your system — I have currently 1GB on a netbook and 2GB on a quite-fanless Atom-based workstation but I use only around 300MB in general. If you still fear about having an application that uses only 2 but 5MB with Glade, well I can't help you! From what I have read, the built-in UI designer of GTK+, named GtkBuilder, needs less memory, but the Glade to GtkBuilder conversions are going to happen with Xfce 4.8.
Now about the new feature introduced into this major release. It is called "Actions" which is the fourth object by the way. An action is a match between a text selection and regexes to let you execute specific commands. For example the action "Image" can match text with image filenames and let you choose commands between "View with Ristretto" and "Edit with Gimp". I wrote something simple in the settings dialog to add new actions that is inspired from the Thunar User Custom Actions interface.
Finally, I made other changes that are more geeky than useful, like I made a bundle out of the plugin. The plugin is now installed under the binary directory instead of the common place holder for panel plugins but can still be added inside a panel with the "Add Item" menu action. As you might understand, it can be executed as well now, and if you do so it will run inside the notification area. An item is installed in the applications menu to be able to start it (under the category Utility), and as it is possible to run outside the panel, I added a autostart file.
That's it already. If you have questions, don't mind. If you wanna discuss the Actions/regex feature go ahead. More importantly, I hope you'll take a glimpse at the code.
If you are interested into panel plugins, have a look at the wiki. The panel plugins amongst the goodies are a good way to get to know code and start with something.
Update: ANN: xfce4-clipman-plugin version 1.0.0 released
Subscribe to:
Posts (Atom)