<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>G-Loaded Journal &#187; GNOME</title>
	<atom:link href="http://www.g-loaded.eu/tag/gnome/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.g-loaded.eu</link>
	<description>An open-source software and technology related journal</description>
	<lastBuildDate>Thu, 02 Sep 2010 17:01:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
		<item>
		<title>Access gvfs mounts from the command line</title>
		<link>http://www.g-loaded.eu/2008/12/08/access-gvfs-mounts-from-the-command-line/</link>
		<comments>http://www.g-loaded.eu/2008/12/08/access-gvfs-mounts-from-the-command-line/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 14:50:52 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Filesharing]]></category>
		<category><![CDATA[Filesystem]]></category>
		<category><![CDATA[GNOME]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/?p=744</guid>
		<description><![CDATA[In the past, having used the &#8220;Connect to server&#8221; feature in GNOME, you could easily access the remote server&#8217;s filesystem from within Nautilus, but it was impossible to access it from the command line (please correct me if I miss something here). Now GNOME uses gvfs. As soon as GNOME connects to the remote server, [...]]]></description>
			<content:encoded><![CDATA[<p>In the past, having used the &#8220;<em>Connect to server</em>&#8221; feature in <a href="http://gnome.org">GNOME</a>, you could easily access the remote server&#8217;s filesystem from within Nautilus, but it was impossible to access it from the command line (please correct me if I miss something here). Now GNOME uses <strong>gvfs</strong>. As soon as GNOME connects to the remote server, for instance an anonymous FTP server, you can effortlessly access the files on the server using command line tools by changing to the <code>/home/&lt;USER&gt;/.gvfs/&lt;server_connection_name&gt;</code> directory. This also gives us the chance to do some other cool things, like initiating file transfers <em>from a remote server A to a remote server B</em> using our desktop. Beautiful!</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2008/12/08/access-gvfs-mounts-from-the-command-line/">Access gvfs mounts from the command line</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2007/02/24/creative-commons-v30-licenses-launched/" rel="bookmark">Creative Commons v3.0 Licenses Launched</a></li>
<li><a href="http://www.g-loaded.eu/2005/11/06/manage-users-from-the-command-line/" rel="bookmark">User management from the command line</a></li>
<li><a href="http://www.g-loaded.eu/2005/11/10/using-a-cups-printer-from-command-line/" rel="bookmark">Using a CUPS printer from command line</a></li>
<li><a href="http://www.g-loaded.eu/2008/12/08/creative-pc-cam-750-on-fedora-10/" rel="bookmark">Creative PC-CAM 750 on Fedora 10</a></li>
<li><a href="http://www.g-loaded.eu/2007/05/15/blanking-a-rewritable-cddvd-in-gnome/" rel="bookmark">Blanking a rewritable CD/DVD in GNOME</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2008/12/08/access-gvfs-mounts-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Creative PC-CAM 750 on Fedora 10</title>
		<link>http://www.g-loaded.eu/2008/12/08/creative-pc-cam-750-on-fedora-10/</link>
		<comments>http://www.g-loaded.eu/2008/12/08/creative-pc-cam-750-on-fedora-10/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 14:03:40 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[WebCam]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/?p=735</guid>
		<description><![CDATA[About two years ago, I had published some notes about how to use the good old Creative PC-CAM 750 digital camera/webcam combo under Linux using the spca5xx kernel module. Many things have changed since then. The &#8216;spca5xx&#8216; driver has been re-released under the name GSPCA, which has lately made its way into the kernel. This [...]]]></description>
			<content:encoded><![CDATA[<p>About two years ago, I had <a href="http://www.g-loaded.eu/2005/10/30/creative-pc-cam-750/">published</a> some notes about how to use the good old Creative PC-CAM 750 digital camera/webcam combo under Linux using the <a href="http://mxhaard.free.fr/spca5xx.html">spca5xx</a> kernel module. Many things have changed since then. The &#8216;<em>spca5xx</em>&#8216; driver has been re-released under the name <a href="http://mxhaard.free.fr/spca5xx.html">GSPCA</a>, which has lately made its way into the <a href="http://kernel.org/">kernel</a>. This should have made things simpler, but, apparently, the fact that this device can be used both as a digital camera and a webcamera complicates its use under <a href="http://gnome.org/">GNOME</a>. By default, GNOME <strong>mounts</strong> the device&#8217;s internal flash memory, so you can pull those digital photographs you have taken. This is a rather expected behaviour despite the fact that this is an old-tech digital camera. The main problem though is that there is no obvious way to switch to <strong>webcam-mode</strong> from within GNOME. Below are some notes about how to do it.<br />
<span id="more-735"></span><br />
The following steps have been tested on Fedora 10 (GNOME v2.24.2). Most probably, they will work on other recent Linux distributions (Ubuntu, OpenSUSE, Mandriva, etc).</p>
<p>As mentioned previously, as soon as the device is plugged into the USB port, GNOME mounts its internal flash memory.</p>
<p>Looking at <strong>dmesg</strong> output as <strong>root</strong>:</p>
<pre class="codesnp">
# dmesg
usb 3-1: new full speed USB device using uhci_hcd and address 2
usb 3-1: configuration #1 chosen from 1 choice
usb 3-1: New USB device found, idVendor=041e, idProduct=4013
usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 3-1: Product: Creative PC-CAM 750
usb 3-1: Manufacturer: ViewQuest Technologies INC.
Linux video capture interface: v2.00
gspca: main v2.2.0 registered
gspca: probing 041e:4013
gspca: probe ok
gspca: probing 041e:4013
usbcore: registered new interface driver sunplus
sunplus: registered
gspca: disconnect complete
</pre>
<p>As you can see, despite the fact that the webcam has been recognized by the <strong>gspca-sunplus</strong> driver, gspca loses control of the webcam. This happens because GNOME (<strong>gvfs</strong>) has mounted its memory. Obviously, the device cannot operate as a webcam while its internal memory is mounted.</p>
<p>To list the currently mounted block devices by gvfs run the following command as your currently logged in <strong>user</strong>:</p>
<pre class="codesnp">
$ gvfs-mount -l
Drive(0): CD-RW/DVD±RW Drive
Drive(1): Mass Storage Drive
...
...
Mount(0): Creative Technology, Ltd PC-Cam 750 -> gphoto2://[usb:003,002]/
</pre>
<p>So, there it is. The <strong>gphoto2</strong> driver has been used to mount the device&#8217;s flash memory.<br />
To <strong>unmount</strong> it run (as the currently logged in <strong>user</strong>):</p>
<pre class="console">
$ gvfs-mount -u gphoto2://[usb:003,002]/
</pre>
<p>Replace the usb port reference according to your <code>gvfs-mount -l</code> output.</p>
<p>Alternatively, you can unmount all devices mounted by the gphoto2 driver with the following command:</p>
<pre class="console">
$ gvfs-mount --unmount-scheme gphoto2
</pre>
<p>Now, the camera&#8217;s memory shouldn&#8217;t be listed in <code>gvfs-mount -l</code> output.</p>
<p>All you have to do now to get to webcam-mode is reload the gspca-sunplus module.</p>
<p>As root:</p>
<pre class="console">
# /sbin/modprobe -vr gspca-sunplus
# /sbin/modprobe -v gspca-sunplus
</pre>
<p>Running <strong>dmesg</strong> we confirm that the <strong>gspca-sunplus</strong> module controls the device</p>
<pre class="codesnp">
# dmesg
...
...
Linux video capture interface: v2.00
gspca: main v2.2.0 registered
gspca: probing 041e:4013
gspca: probe ok
gspca: probing 041e:4013
usbcore: registered new interface driver sunplus
sunplus: registered
</pre>
<p>Also, the <strong>ls</strong> command shows that our v4l device has been created:</p>
<pre class="console">
# ls -l /dev/video*
lrwxrwxrwx  1 root root     6 2008-12-08 15:49 /dev/video -> video0
crw-rw----+ 1 root root 81, 0 2008-12-08 15:49 /dev/video0
</pre>
<p>That&#8217;s it. As a user, run <a href="http://projects.gnome.org/cheese/">cheese</a> and say <em>hello</em> to yourself!</p>
<p>This should work for all other digital-camera / web-camera combo devices as well, provided that you use the appropriate gspca driver as shown in the dmesg output.</p>
<p>Your feedback is welcome.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2008/12/08/creative-pc-cam-750-on-fedora-10/">Creative PC-CAM 750 on Fedora 10</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2005/10/30/creative-pc-cam-750/" rel="bookmark">Creative PC-CAM Series webcams in linux</a></li>
<li><a href="http://www.g-loaded.eu/2008/12/08/access-gvfs-mounts-from-the-command-line/" rel="bookmark">Access gvfs mounts from the command line</a></li>
<li><a href="http://www.g-loaded.eu/2005/09/19/a-different-approach-hal/" rel="bookmark">A different approach&#8230;HAL</a></li>
<li><a href="http://www.g-loaded.eu/2007/02/24/creative-commons-v30-licenses-launched/" rel="bookmark">Creative Commons v3.0 Licenses Launched</a></li>
<li><a href="http://www.g-loaded.eu/2008/01/24/viceo-backend-for-sane-with-libusb-support/" rel="bookmark">Viceo Backend for SANE with libusb support</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2008/12/08/creative-pc-cam-750-on-fedora-10/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Using a switch to prevent system shutdown/reboot/suspend</title>
		<link>http://www.g-loaded.eu/2008/11/26/using-a-switch-to-prevent-system-shutdownrebootsuspend/</link>
		<comments>http://www.g-loaded.eu/2008/11/26/using-a-switch-to-prevent-system-shutdownrebootsuspend/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 21:36:30 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[System]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/?p=658</guid>
		<description><![CDATA[What I tried to accomplish today was to prevent a system shutdown or reboot or suspend, if a specific process was still running in the background. This might sound pretty useless, but having shut my PC down once again this afternoon while the backup process was still active in the background, I decided to resolve [...]]]></description>
			<content:encoded><![CDATA[<p>What I tried to accomplish today was to <em>prevent</em> a system <strong>shutdown</strong> or <strong>reboot</strong> or <strong>suspend</strong>, if a specific process was still running in the background. This might sound pretty useless, but having shut my PC down once again this afternoon while the backup process was still active in the background, I decided to resolve this issue for good. But things are not that easy as they might seem&#8230; After many hours of digging into the operating system&#8217;s <strong>initscripts</strong>, <strong>upstart events</strong> and the methods used by GNOME to perform a shutdown/reboot/suspend, I am still away from a decent solution that will, not only work when directly invoking the relevant commands from the <strong>console</strong>, but also when I perform the aforementioned actions from the <strong>GNOME shutdown applet</strong>. Here is what I&#8217;ve tried so far&#8230;<br />
<span id="more-658"></span><br />
First of all, having failed with all the initscript or upstart event modifications I&#8217;ve tried, I decided to completely override the relevant commands, for instance <code>/sbin/shutdown</code>, by placing a wrapper script with the same name in <code>/usr/local/sbin/</code>. Here is such a wrapper script for the shutdown command, saved as <code>/usr/local/sbin/shutdown</code>:</p>
<pre class="codesnp">
#! /bin/sh

if [ -f /var/lock/noshutdown.lock ] ; then
  logger -t shutdowndog shutdown prevented
  exit 1
fi

/sbin/shutdown "$@"
</pre>
<p>Then, I created the file that would act as a <strong>switch</strong>:</p>
<pre class="console">
touch /var/lock/noshutdown.lock
</pre>
<p>Then, I initiated the <strong>shutdown procedure</strong> from the command line:</p>
<pre class="console">
shutdown -h +0
</pre>
<p>There was no shutdown! It had worked!</p>
<p>Syslog confirmed that the check had taken place:</p>
<pre class="codesnp">
Nov 25 19:19:04 galeon shutdowndog: shutdown prevented
</pre>
<p>I rushed to try to shut down the system from GNOME&#8217;s shutdonw panel (<code>Menu System -> Shut Down...</code>), but, after pressing the relevant button, the system went down normally&#8230;</p>
<p>It was obvious that GNOME had not used my override, but another mechanism to power-off the system instead. Since I use the GNOME menu to shutdown/reboot/suspend the system, I spent a couple of hours trying to find what was going on in GNOME and finally discovered the file <code>/usr/bin/gnome-power-cmd.sh</code>:</p>
<pre class="codesnp">
#!/bin/sh
# Copyright (C) 2007 Richard Hughes <richard@hughsie.com>
#
# Licensed under the GNU General Public License Version 2
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

#$1 = method name
execute_dbus_method ()
{
        dbus-send --session --dest=org.freedesktop.PowerManagement              \
                  --type=method_call --print-reply --reply-timeout=2000 \
                  /org/freedesktop/PowerManagement                      \
                  org.freedesktop.PowerManagement.$1
        if [ $? -eq 0 ]; then
                echo "Failed"
        fi
}

if [ "$1" = "suspend" ]; then
        echo "Suspending"
        execute_dbus_method "Suspend"
elif [ "$1" = "hibernate" ]; then
        echo "Hibernating"
        execute_dbus_method "Hibernate"
elif [ "$1" = "reboot" ]; then
        echo "Rebooting"
        execute_dbus_method "Reboot"
elif [ "$1" = "shutdown" ]; then
        echo "Shutting down"
        execute_dbus_method "Shutdown"
elif [ "$1" = "" ]; then
        echo "command required: suspend, shutdown, hibernate or reboot"
else
        echo "command '$1' not recognised, only suspend, shutdown, hibernate or reboot are valid"
        exit 1
fi
</pre>
<p>So, GNOME makes the appropriate calls for power-related events through <strong>D-bus</strong>. I initially thought that GNOME used <code>/usr/bin/gnome-power-cmd.sh</code> whenever the shutdown/reboot/suspend button was pressed, so I modified it so to check for my switch (<code>/var/lock/noshutdown.lock</code>) and then proceed accordingly. It did not work out&#8230;</p>
<p>I had already spent much time on this, so I decided to quit. But, it is crucial for me to make this thing work and I will probably investigate it a bit more and report back at some later time.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2008/11/26/using-a-switch-to-prevent-system-shutdownrebootsuspend/">Using a switch to prevent system shutdown/reboot/suspend</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2008/11/28/delayed-shutdown-initscript/" rel="bookmark">delayed-shutdown initscript</a></li>
<li><a href="http://www.g-loaded.eu/2009/10/30/selinux-setenforce-mode/" rel="bookmark">Using setenforce to switch SELinux mode wisely</a></li>
<li><a href="http://www.g-loaded.eu/2008/06/18/use-the-alternatives-system-to-switch-to-a-custom-firefox-release/" rel="bookmark">Use the Alternatives System to switch to a custom Firefox release</a></li>
<li><a href="http://www.g-loaded.eu/2007/03/15/screenshot-of-a-menu-under-gnome-round-2/" rel="bookmark">Screenshot of a menu under GNOME: ROUND 2</a></li>
<li><a href="http://www.g-loaded.eu/2007/03/05/print-a-man-page/" rel="bookmark">Print a Man Page</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2008/11/26/using-a-switch-to-prevent-system-shutdownrebootsuspend/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Problems using libnotify for User to User Notifications</title>
		<link>http://www.g-loaded.eu/2007/11/18/problems-using-libnotify-for-user-to-user-notifications/</link>
		<comments>http://www.g-loaded.eu/2007/11/18/problems-using-libnotify-for-user-to-user-notifications/#comments</comments>
		<pubDate>Sun, 18 Nov 2007 17:06:19 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Communications]]></category>
		<category><![CDATA[D-Bus]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Notifications]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/11/18/problems-using-libnotify-for-user-to-user-notifications/</guid>
		<description><![CDATA[There are several methods that can be used for text message exchanging between different non-privileged users. Usually, when the sender of such a message is a service and the recipient, who is supposed to see the message, is a human, that message is called a &#8220;notification&#8220;. The method used by many services that run within [...]]]></description>
			<content:encoded><![CDATA[<p>There are several methods that can be used for text message exchanging between different non-privileged users. Usually, when the sender of such a message is a service and the recipient, who is supposed to see the message, is a human, that message is called a &#8220;<em>notification</em>&#8220;.  The method used by many services that run within the scope of a desktop session in order to send notifications to the desktop session owners involves the use of <strong>DBus</strong> and <strong>libnotify</strong>. But, would it be possible to use libnotify to send notification messages from a system service to one or more desktop users?<br />
<span id="more-461"></span><br />
Despite my last post&#8217;s overwhelming <a href="http://www.g-loaded.eu/2007/11/17/solutions/">optimism</a>, it is sometimes impossible to find a solution for a problem, because one does not exist. It turns out that the above task cannot be accomplished, at least at the moment of writing, as it is impossible for one user (system account or other non-privileged user) to send a notification through libnotify to another user that runs a desktop session. The easiest way to test this is with a cron job in the system&#8217;s crontab:</p>
<pre class="codesnp">
*/1 * * * * root /usr/bin/notify-send "lala" "test message"
</pre>
<p>No notification appears on the desktop, no matter how long I wait. After doing some research it turns out that <strong>notify-send cannot automatically send notifications to all users</strong> that run a desktop session. It can only send notifications <strong>only to one user at a time</strong> provided that the user&#8217;s D-Bus session address is available to <code>notify-send</code>.</p>
<p>So, I decided to set the cron job to send a notification to my own user account by providing notify-send with my <strong>DBUS_SESSION_BUS_ADDRESS</strong>.</p>
<p>The following is a method a system user (or any user except me) would use to retrieve my <strong>DBUS_SESSION_BUS_ADDRESS</strong> address. These steps are actually taken from this <a href="http://gnome-hacks.org/hacks.html?id=82">GNOME-Hack</a>, which is supposed to send notifications from a cronjob.</p>
<p>In order to retrieve this address, my gnome-session&#8217;s PID number is needed.</p>
<pre class="console">
$ ps axu | grep gnome-session | grep -v grep
gnot      2602  0.0  1.3  33432  7064 ?        Ssl  16:56   0:00 /usr/bin/gnome-session
</pre>
<p>The needed PID number is 2602. The D-BUS session&#8217;s address exists as an environment variable (DBUS_SESSION_BUS_ADDRESS) of that process (2602). This can be retrieved with the following:</p>
<pre class="console">
$ grep -z DBUS_SESSION_BUS_ADDRESS /proc/2602/environ
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-vKzOHyaDdi,guid=f45436454463d8df2f8d265447405220
</pre>
<p>Notice that the PID number has been used in the <code>/proc/2602/environ</code> path.</p>
<p>Adding this information to the initial cronjob one would expect that the notification would appear on the desktop.</p>
<pre class="codesnp">
*/1 * * * * root DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-vKzOHyaDdi,guid=f45436454463d8df2f8d265447405220 /usr/bin/notify-send "lala" "test message"
</pre>
<p>Unfortunately, it didn&#8217;t. I also retrieved my desktop session&#8217;s display number and added it to the cron job.</p>
<pre class="codesnp">
*/1 * * * * root DISPLAY=:0.0 DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-vKzOHyaDdi,guid=f45436454463d8df2f8d265447405220 /usr/bin/notify-send "lala" "test message"
</pre>
<p>Unfortunately, nothing happened.</p>
<p>It seems that not only <code>notify-send</code> can send a notification to <em>only one</em> desktop session owner at a time, but also it is that desktop session owner who must issue the <code>notify-send</code> command. So, as long as most <strong>system services drop privileges</strong> and run as processes of non-privileged system users, <em>they cannot send notifications to desktop users</em>.</p>
<p>This is probably because of one or more of the following reasons:</p>
<ol>
<li>either D-Bus is incomplete when it comes to message exchanging between non-privileged users</li>
<li>or there is some kind of security mechanism that prevents the above from happening. Unfortunately, I haven&#8217;t found any information about such a mechanism.</li>
<li>or I miss something way too important</li>
<li>or I make a mistake in one of the steps</li>
</ol>
<p>If I miss anything, please let me know.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/11/18/problems-using-libnotify-for-user-to-user-notifications/">Problems using libnotify for User to User Notifications</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2008/01/12/towards-the-resolution-of-the-issues-with-libnotify/" rel="bookmark">Towards the resolution of the issues with libnotify</a></li>
<li><a href="http://www.g-loaded.eu/2007/12/07/email-notifications-from-a-linux-system/" rel="bookmark">Email Notifications from a Linux System</a></li>
<li><a href="http://www.g-loaded.eu/2009/10/12/the-kind-of-rpm-dependencies-i-dislike/" rel="bookmark">The kind of RPM dependencies I dislike</a></li>
<li><a href="http://www.g-loaded.eu/2005/11/06/manage-users-from-the-command-line/" rel="bookmark">User management from the command line</a></li>
<li><a href="http://www.g-loaded.eu/2007/02/12/lock-out-a-user-after-n-failed-login-attempts/" rel="bookmark">Lock out a user after N failed login attempts</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/11/18/problems-using-libnotify-for-user-to-user-notifications/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Dictionary Lookups Anywhere</title>
		<link>http://www.g-loaded.eu/2007/10/18/dictionary-lookups-anywhere/</link>
		<comments>http://www.g-loaded.eu/2007/10/18/dictionary-lookups-anywhere/#comments</comments>
		<pubDate>Thu, 18 Oct 2007 17:40:22 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Dictionaries]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Resolved]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/10/18/dictionary-lookups-anywhere/</guid>
		<description><![CDATA[I consider ditionaries, either in printed or electronic form, as one of the most useful sources of valuable information and an indispensable companion when reading. Lately, I&#8217;ve been reading lots of stuff, which involved scientific terminology in the English language, so it was very often required to lookup words on various online dictionaries. I did [...]]]></description>
			<content:encoded><![CDATA[<p>I consider ditionaries, either in printed or electronic form, as one of the most useful sources of valuable information and an indispensable companion when reading. Lately, I&#8217;ve been reading lots of stuff, which involved scientific terminology in the English language, so it was very often required to lookup words on various online dictionaries. I did most of the reading using <a href="http://www.gnome.org/projects/epiphany/">epiphany</a> or <a href="http://www.gnome.org/projects/evince/">evince</a>. Epiphany has a very handy feature which can send the selected text to a <a href="http://www.g-loaded.eu/2007/05/11/smart-bookmarks-in-epiphany/">smart bookmark</a> or even to <a href="http://en.wikipedia.org/wiki/Gnome-dictionary">gnome-dictionary</a>. Unfortunately, evince lacks such features, so I had to manually copy and paste words to the web browser in order to look them up on the web. This, combined with evince&#8217;s performance issues (version 0.6.0 &#8211; Fedora Core 6), led me to look for a more universal method of looking up words or phrases, regardless of the document viewer. And, usually, when your sole ambition becomes to overcome an annoying situation, a solution is on the way.<br />
<span id="more-446"></span><br />
What I needed was the following:</p>
<ol>
<li>Select some text with the mouse (easy :P)</li>
<li>Trigger a dictionary lookup for the selected text.</li>
<li>Get the word&#8217;s definitions in a browser window.</li>
</ol>
<p>After some research on the web, I came up with a decent solution. I discovered that when some text is selected under X, it is temporarily stored in a location called &#8220;<em>Primary Clipboard</em>&#8220;. The text could be somehow retrieved from that location and could be sent to an online dictionary by pressing a specific keyboard combination. This is totally independent of the application which the text had been selected from. This method also makes <strong>dictionary lookups as easy and fast as it can get</strong>.</p>
<p>But, this was just in theory. I needed a way of retrieving the selected text from the primary clipboard programmatically. This was the most difficult part, as X or GTK programming is out of my league&#8230;</p>
<p>Fortunately, I was told that this exact functionality exists in the <a href="http://raphael.slinckx.net/deskbar/">deskbar applet</a>. The user can select some text, then press <strong>Alt-F3</strong> and the deskbar applet displays a list of pre-defined places (epiphany smart bookmarks included) to search for the selected text, which also includes gnome-dictionary in order to look up the word on a dictionary server.</p>
<p>Using this deskbar applet&#8217;s functionality for the dictionary lookups could be the perfect solution. But, on the other hand, being able to specify different key combinations for different dictionaries and not having to pick a search location from the deskbar&#8217;s list would be more than perfect. Grepping into deskbar applet&#8217;s source code I soon found what I was looking for in the first place: that is <em>the way to programmatically retrieve the selected text from the primary clipboard</em>. Of course, I shamelessly stole that small piece of code :P</p>
<p>Provided that some text has been selected, its retrieval is possible with the following python snippet:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> gtk
clipboard = gtk.<span style="color: black;">clipboard_get</span><span style="color: black;">&#40;</span>selection = <span style="color: #483d8b;">&quot;PRIMARY&quot;</span><span style="color: black;">&#41;</span>
text = clipboard.<span style="color: black;">wait_for_text</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span> text</pre></div></div>

<p>The rest was easy. What was needed was a key combination to trigger the execution of the above script. Unfortunately, a custom command cannot be set in the <strong>gnome-keybinding-properties</strong> application. So, a workaround was needed even for that!! After some research, it turned out that one can set a <strong>custom command</strong> and assign a keyboard shortcut for it in GNOME&#8217;s window manager, <a href="http://en.wikipedia.org/wiki/Metacity">metacity</a>.</p>
<p>So, finally, it worked! Read on for detailed info&#8230;</p>
<h4>How to set things up</h4>
<p>First of all, create a small script:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#! /usr/bin/env python</span>
<span style="color: #808080; font-style: italic;"># -*- coding: utf-8 -*-</span>
&nbsp;
command = <span style="color: #483d8b;">&quot;epiphany -n http://en.wiktionary.org/wiki/%s&quot;</span>
<span style="color: #808080; font-style: italic;">#command = &quot;epiphany -n http://dictionary.reference.com/search?q=%s&quot;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> gtk
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">urllib</span> <span style="color: #ff7700;font-weight:bold;">import</span> quote
&nbsp;
clipboard = gtk.<span style="color: black;">clipboard_get</span><span style="color: black;">&#40;</span>selection = <span style="color: #483d8b;">&quot;PRIMARY&quot;</span><span style="color: black;">&#41;</span>
text = clipboard.<span style="color: black;">wait_for_text</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
text = text.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">if</span> text:
	text = quote<span style="color: black;">&#40;</span>text<span style="color: black;">&#41;</span>	<span style="color: #808080; font-style: italic;"># This is basically for multiword selections</span>
	<span style="color: #dc143c;">os</span>.<span style="color: black;">popen</span><span style="color: black;">&#40;</span>command <span style="color: #66cc66;">%</span> text<span style="color: black;">&#41;</span></pre></div></div>

<p>Save the script to a directory of your choice. The rest assumes that the script has been saved to:</p>
<p><strong>/home/johndoe/bin/selectionlookup.py</strong></p>
<p>What this does is to retrieve the selected text from the &#8220;<em>primary clipboard</em>&#8221; and execute the specified command. In this case, the command is actually a system call to the epiphany browser which is instructed to load a page with the possible definitions for the selected text. The English version of <a href="http://en.wiktionary.org/">Wiktionary</a> or <a href="http://dictionary.reference.com/">Dictionary.com</a> (whichever is uncommented) is used for the lookup. Note that <strong>multiword selections are supported</strong> by both the script above and the aforementioned online dictionaries.</p>
<p><a name="customkeybinding"></a><br />
Second of all, a <strong>global keyboard shortcut</strong> needs to be set in metacity for the reasons I explained previously.</p>
<p>First, the custom command needs to be set. Open the <strong>gconf-editor</strong> and browse to the key:</p>
<pre class="codesnp">
/apps/metacity/keybinding_commands/command_1
</pre>
<p>Of course use any command key you wish. Here <code>command_1</code> is used. Set the following value:</p>
<pre class="codesnp">
python /home/johndoe/bin/selectionlookup.py
</pre>
<p>Then set up the keybinding for that command. Browse to the key:</p>
<pre class="codesnp">
/apps/metacity/global_keybindings/run_command_1
</pre>
<p>And set the combination (the following is an example):</p>
<pre class="codesnp">
&lt;control&gt;&lt;alt&gt;g
</pre>
<p>Test it by selecting some text anywhere and by pressing <code>Ctrl-Alt-g</code>. A new tab will appear in the browser window with a page with the selected text&#8217;s definitions (if any).</p>
<h4>Appendix I: Using a dictionary server</h4>
<p>Instead of looking the selected text up on a web-based dictionary, you can retrieve definitions from a dictionary server. Adjust the script accordingly. For example:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#! /usr/bin/env python</span>
<span style="color: #808080; font-style: italic;"># -*- coding: utf-8 -*-</span>
&nbsp;
command = <span style="color: #483d8b;">&quot;echo 'DEFINE * <span style="color: #000099; font-weight: bold;">\&quot;</span>%s<span style="color: #000099; font-weight: bold;">\&quot;</span>' | nc dict.org 2628 | zenity --text-info --title='Dict Lookup' --width=500 --height=500&quot;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> gtk
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>
&nbsp;
clipboard = gtk.<span style="color: black;">clipboard_get</span><span style="color: black;">&#40;</span>selection = <span style="color: #483d8b;">&quot;PRIMARY&quot;</span><span style="color: black;">&#41;</span>
text = clipboard.<span style="color: black;">wait_for_text</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
text = text.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">if</span> text:
	<span style="color: #dc143c;">os</span>.<span style="color: black;">popen</span><span style="color: black;">&#40;</span>command <span style="color: #66cc66;">%</span> text<span style="color: black;">&#41;</span></pre></div></div>

<p>The following happens when the keyboard shortcut is pressed:</p>
<ol>
<li>The following dictionary protocol specific command: <strong>DEFINE * &#8220;selectedtext&#8221;</strong> is piped to netcat (see some <a href="http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/">netcat examples</a>).</li>
<li>Netcat opens a connection to the <code>dict.org</code> dictionary server, sends the command and retrieves the results.</li>
<li>The results are piped to <a href="http://freshmeat.net/projects/zenity">zenity</a> and are displayed in an information textbox.</li>
</ol>
<p>Obviously, in order to successfully run the above command you will need <strong>netcat</strong> (<strong>nc</strong>) and <strong>zenity</strong>.</p>
<h4>Final Thoughts</h4>
<p>A whole dictionary application can be built around the selected text that is stored at the primary clipboard. The above is the fastest and most effective way of retrieving word/phrase definitions from any possible dictionary. It is independent of the application from which the text is selected and no time is wasted in meaningless copy-pasting. If you know a better way of looking up words, please let me know.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/10/18/dictionary-lookups-anywhere/">Dictionary Lookups Anywhere</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2006/05/17/epiphany-python-console-open-new-tab/" rel="bookmark">Epiphany Python Console &#8211; Open New Tab</a></li>
<li><a href="http://www.g-loaded.eu/2006/03/16/dictexpress/" rel="bookmark">DictExpress</a></li>
<li><a href="http://www.g-loaded.eu/2007/02/28/taking-a-screenshot-of-a-menu-under-gnome/" rel="bookmark">Taking a screenshot of a menu under GNOME</a></li>
<li><a href="http://www.g-loaded.eu/2007/10/19/zim-a-desktop-wiki/" rel="bookmark">Zim &#8211; a Desktop Wiki</a></li>
<li><a href="http://www.g-loaded.eu/2006/09/23/use-python-to-get-the-web-page-data-in-epiphany/" rel="bookmark">Use Python to get the web page data in Epiphany</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/10/18/dictionary-lookups-anywhere/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Some thoughts about Epiphany extensions</title>
		<link>http://www.g-loaded.eu/2007/05/16/some-thoughts-about-epiphany-extensions/</link>
		<comments>http://www.g-loaded.eu/2007/05/16/some-thoughts-about-epiphany-extensions/#comments</comments>
		<pubDate>Wed, 16 May 2007 09:53:58 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Epiphany]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Opinion]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/05/16/some-thoughts-about-epiphany-extensions/</guid>
		<description><![CDATA[Many GNOME users have not realized that the Epiphany browser, apart from the official extensions package, can be further extended by third party extensions, which haven&#8217;t made their way into the official package yet. A good place to start checking what else is available for your favourite browser is the Third Party Extensions for Epiphany [...]]]></description>
			<content:encoded><![CDATA[<p>Many GNOME users have not realized that the <a href="http://www.gnome.org/projects/epiphany/">Epiphany browser</a>, apart from the official extensions package, can be further extended by third party extensions, which haven&#8217;t made their way into the official package yet. A good place to start checking what else is available for your favourite browser is the <em><a href="http://live.gnome.org/Epiphany/ThirdPartyExtensions">Third Party Extensions for Epiphany</a></em> page in the <a href="http://live.gnome.org/">GNOME Live wiki</a>.<br />
<span id="more-401"></span><br />
Another thing you should know is that the <code>epiphany-extensions</code> <strong>binary</strong> package for your distribution might not contain all those extensions that have been made official and are included in the <code>epiphany-extensions</code> <strong>source</strong> package. This is because the official extensions are further grouped according to their <strong>level of code maturity</strong>. So, for now we have the following ephy extensions groups:</p>
<ol>
<li>The official extensions that are marked as <strong>safe</strong> by the packagers and, generally, by all the folks that make decisions for each distribution. These extensions are finally available to the end users through the extensions panel.</li>
<li>The official extensions that are <strong>not mature enough</strong> to appear in Epiphany&#8217;s extension panel. This means that there is a <strong>great issue</strong> with this group of extensions. If an end user does not check the official extensions package sources or the Epiphany project&#8217;s webpage, it is absolutely impossible even <strong>to know about the existence</strong> of these &#8220;<em>imature</em>&#8221; extensions.</li>
<li>The <strong>third party</strong> extensions, which are mainly distributed by their developers.</li>
</ol>
<p>All these restrictions do a good job protecting the end user from using buggy code, but this situation, not only narrows the end user&#8217;s freedom of choice, but also leads new Epiphany users, who are not aware of the situation, to make the false assumption that it is way too difficult to extend this browser&#8217;s functionality to suit their needs. The <a href="http://www.mozilla.com/en-US/firefox/">Firefox</a> phenomenon has shown the importance of the high availability of software that extends the browser&#8217;s functionality.</p>
<p>My suggestion to packagers is: enable <strong>all official</strong> extensions (except for the examples maybe) in the <code>epiphany-extensions</code> package. The end users have the right to choose to use imature code.</p>
<p><em>NOTE</em>: Those users who wish to recompile the extensions package, please <a href="http://www.g-loaded.eu/2006/05/06/a-note-about-the-epiphany-extensions-on-fedora/">read here</a>.</p>
<p>Another thing that requires much thought is how well this <code>epiphany-extensions</code> package <strong>concept</strong> will work when the number of the available extensions increases. It will give both the end users and the developers a hard time. Furthermore, this concept promotes the distribution of 3rd party extensions by many different locations on the web, which is absolutely unacceptable when it comes to <strong>security</strong>. I mean this is a web browser, not a calculator!</p>
<p>I hope the folks at the Epiphany project give a higher priority to the organization of the extension distribution system in a more effective way.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/05/16/some-thoughts-about-epiphany-extensions/">Some thoughts about Epiphany extensions</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2006/05/06/a-note-about-the-epiphany-extensions-on-fedora/" rel="bookmark">A Note About The Epiphany Extensions on Fedora</a></li>
<li><a href="http://www.g-loaded.eu/2007/09/14/featured-epiphany-plugins/" rel="bookmark">Featured Epiphany Plugins</a></li>
<li><a href="http://www.g-loaded.eu/2006/05/16/tab-session-management-extension-for-epiphany/" rel="bookmark">Tab Session Management extension for Epiphany</a></li>
<li><a href="http://www.g-loaded.eu/2006/05/17/epiphany-python-console-documentation/" rel="bookmark">Epiphany Python Console &#8211; Documentation</a></li>
<li><a href="http://www.g-loaded.eu/2007/02/28/tab-links-extension-for-the-epiphany-browser/" rel="bookmark">Tab Links extension for the Epiphany browser</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/05/16/some-thoughts-about-epiphany-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Blanking a rewritable CD/DVD in GNOME</title>
		<link>http://www.g-loaded.eu/2007/05/15/blanking-a-rewritable-cddvd-in-gnome/</link>
		<comments>http://www.g-loaded.eu/2007/05/15/blanking-a-rewritable-cddvd-in-gnome/#comments</comments>
		<pubDate>Tue, 15 May 2007 14:02:07 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Resolved]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/05/15/blanking-a-rewritable-cddvd-in-gnome/</guid>
		<description><![CDATA[Chances are that your removable media preferences in GNOME are set in a way so that CDs get mounted automatically. There is a usability bug that comes into play whenever you try to blank an already written rewritable CD or DVD with Gnomebaker or directly with the command-line tool (cdrecord). An error message that the [...]]]></description>
			<content:encoded><![CDATA[<p>Chances are that your removable media preferences in GNOME are set in a way so that CDs get mounted automatically. There is a usability bug that comes into play whenever you try to blank an already written rewritable CD or DVD with <strong>Gnomebaker</strong> or directly with the command-line tool (<strong>cdrecord</strong>). An error message that the volume is already mounted is displayed and the operation cannot continue. Unmounting the volume <strong>as a user</strong> is not possible because, nowadays, <code>/etc/fstab</code> does not contain any entries about the mounted CDs/DVDs like it used to.<br />
<span id="more-399"></span><br />
So, in order to blank that rewritable CD, you have to do <strong>one of the following</strong>:</p>
<p><strong>-1-</strong> Eject the medium, set your &#8220;<em>removable media preferences</em>&#8221; in a way so that CDs do not get mounted automatically, and then load the medium into the drive again and continue on with blanking it.</p>
<p><strong>-2-</strong> Use <strong>su</strong> or <strong>sudo</strong> to unmount the medium. Although this is the most common solution to such issues, I think that root access should not be required in order to accomplish everyday tasks of such simplicity.</p>
<p><strong>-3-</strong> The third way involves using the utility <strong>gnome-mount</strong>. I found out about this today, while, from the nautilus interface, I was unable to directly unmount the volume <strong>as a user</strong> without ejecting it. The syntax is very simple. Assuming that <code>/dev/hdc</code> is your writer, then issue the following command as a user:</p>
<pre class="console">$ gnome-mount --unmount -d /dev/hdc</pre>
<p>The volume gets unmounted, but the CD still remains loaded into the drive. If there is another way to perform this task through a graphical interface, I&#8217;d appreciate it if you dropped me a line.</p>
<p><strong>-4-</strong> Yes, there is always an extra option :) Use <a href="http://perso.orange.fr/bonfire/">brasero</a> (ex bonfire). This is yet another desktop CD/DVD burning application, but it is smart enough to unmount the written rewritable medium before trying to blank it! And it is good when applications are a bit smart ;)</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/05/15/blanking-a-rewritable-cddvd-in-gnome/">Blanking a rewritable CD/DVD in GNOME</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2005/11/10/packet-writing-on-cdrw-and-dvdrw-media/" rel="bookmark">Packet Writing on CDRW and DVDRW media</a></li>
<li><a href="http://www.g-loaded.eu/2008/12/08/creative-pc-cam-750-on-fedora-10/" rel="bookmark">Creative PC-CAM 750 on Fedora 10</a></li>
<li><a href="http://www.g-loaded.eu/2006/10/06/turning-off-window-animations-in-gnome/" rel="bookmark">Turning off window animations in GNOME</a></li>
<li><a href="http://www.g-loaded.eu/2005/09/09/gnome-212-is-out-but/" rel="bookmark">GNOME 2.12 is out, but&#8230;</a></li>
<li><a href="http://www.g-loaded.eu/2007/03/15/screenshot-of-a-menu-under-gnome-round-2/" rel="bookmark">Screenshot of a menu under GNOME: ROUND 2</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/05/15/blanking-a-rewritable-cddvd-in-gnome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Smart Bookmarks in Epiphany</title>
		<link>http://www.g-loaded.eu/2007/05/11/smart-bookmarks-in-epiphany/</link>
		<comments>http://www.g-loaded.eu/2007/05/11/smart-bookmarks-in-epiphany/#comments</comments>
		<pubDate>Fri, 11 May 2007 15:17:01 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Epiphany]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/05/11/smart-bookmarks-in-epiphany/</guid>
		<description><![CDATA[Smart Bookmarks is an extension for the Epiphany browser. Admitedly, its name or description in the browser extensions panel does not help the user understand what exactly it is about. What is a smart bookmark after all? In short, a smart bookmark is a dynamic bookmark. A bookmark which accepts an argument and returns results [...]]]></description>
			<content:encoded><![CDATA[<p><em>Smart Bookmarks</em> is an extension for the <a href="http://www.gnome.org/projects/epiphany/">Epiphany browser</a>. Admitedly, its name or description in the browser extensions panel does not help the user understand what exactly it is about. What is a <em>smart bookmark</em> after all?<br />
<span id="more-383"></span><br />
In short, a smart bookmark is a dynamic bookmark. A bookmark which accepts an argument and returns results in accordance to the given argument. So, it is clear that this type of bookmark suits the needs of bookmarking a search engine&#8217;s URL that contains the necessary search term and returns results.</p>
<h4>How to create a smart (dynamic) bookmark</h4>
<p>This is quite easy. Assume that you need to create a smart bookmark that searches the archives of your favourite mailing list.</p>
<p>All you need to do is perform a search on that list for a distinctive sequence of characters. For example I searched the <abbr title="Greek Linux Users">LGU</abbr> list for the term <em>AAAAAA</em>:</p>
<pre class="codesnp">
AAAAAA site:http://lists.hellug.gr/pipermail/linux-greek-users/
</pre>
<p>Or better, you may want to use Google&#8217;s advanced search feature.</p>
<p>Now, all you have to do is bookmark (<code>Ctrl-D</code>) the results page, but before actually saving the bookmark, you should <strong>substitute</strong> the <strong>AAAAAA</strong> sequence with <strong>%s</strong>. (that&#8217;s two characters <strong>%</strong> and <strong>s</strong>)</p>
<p><strong>%s</strong> will be substituted with the requested search terms every time the smart bookmark is used.</p>
<p>Now, your bookmark is a <strong>smart</strong> one and you may finally press the &#8220;<code>Add</code>&#8221; button to save it. All you have to do is type the search terms on the browser&#8217;s address bar and choose your smart bookmark from the bottom of the <strong>dropdown list</strong> that appears below the address bar.</p>
<p>Another cool thing you can do with a smart bookmark is to open the bookmarks editor (<code>Ctrl-B</code>), right click on your smart bookmark and select the &#8220;<strong>Show on Toolbar</strong>&#8221; option. A textbox should appear in your bookmarks bar, so you can search this resource quickly.</p>
<p>Finally, if you use the <a href="http://raphael.slinckx.net/deskbar/">Deskbar applet</a>, then you should know that this tool recognizes your saved smart bookmarks and lets you assign a shortcut to each one of them. For example, one could assign the &#8220;<code>lgu</code>&#8221; string to the aforementioned search on the mailing list archives. So now a search on the mailing list can be performed right from the desktop (deskbar applet) with the following:</p>
<pre class="codesnp">lgu kernel</pre>
<p>This will search the mailing list for all entries that contain the term <em>kernel</em>.</p>
<p>Smart bookmarks are a neat feature. I use this very frequently. This post was written for those who have overlooked this really useful feature.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/05/11/smart-bookmarks-in-epiphany/">Smart Bookmarks in Epiphany</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2006/04/05/epiphany-browser-review/" rel="bookmark">Epiphany Browser Review</a></li>
<li><a href="http://www.g-loaded.eu/2007/10/18/dictionary-lookups-anywhere/" rel="bookmark">Dictionary Lookups Anywhere</a></li>
<li><a href="http://www.g-loaded.eu/2007/03/05/organizing-mailing-list-messages-with-evolution/" rel="bookmark">Organizing Mailing List messages with Evolution</a></li>
<li><a href="http://www.g-loaded.eu/2009/05/07/descramble-passwords-from-gftp-bookmarks-using-python/" rel="bookmark">Descramble Passwords from gftp Bookmarks using Python</a></li>
<li><a href="http://www.g-loaded.eu/2007/09/14/featured-epiphany-plugins/" rel="bookmark">Featured Epiphany Plugins</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/05/11/smart-bookmarks-in-epiphany/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Screenshot of a menu under GNOME: ROUND 2</title>
		<link>http://www.g-loaded.eu/2007/03/15/screenshot-of-a-menu-under-gnome-round-2/</link>
		<comments>http://www.g-loaded.eu/2007/03/15/screenshot-of-a-menu-under-gnome-round-2/#comments</comments>
		<pubDate>Thu, 15 Mar 2007 04:18:59 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[GNOME]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/03/15/screenshot-of-a-menu-under-gnome-round-2/</guid>
		<description><![CDATA[A few days ago, I had written a post about the difficulties I had encountered in an attempt to capture an image of a menu under GNOME. A reader, &#8220;mysurface&#8220;, who, by the way, has written an article about taking screenshots, was 100% positive that, after issuing ImageMagick&#8217;s import command, it is still possible to [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago, I had written a <a href="http://www.g-loaded.eu/2007/02/28/taking-a-screenshot-of-a-menu-under-gnome/">post</a> about the difficulties I had encountered in an attempt to capture an image of a menu under GNOME. A reader, &#8220;<em>mysurface</em>&#8220;, who, by the way, has written an <a href="http://linux.byexamples.com/archives/215/how-to-take-a-screenshot/">article</a> about taking screenshots, was 100% positive that, after issuing ImageMagick&#8217;s <code>import</code> command, it is still possible to switch between running applications with <code>Alt-Tab</code> and trigger menus with <code>Alt</code>, before using the mouse cursor to select the area that will be captured.<br />
<span id="more-382"></span><br />
Well, I have tried all that but, as soon as I issue the <code>import</code> command, <code>Alt-Tab</code> or <code>Alt+menu_trigger</code> simply do not work. Mysurface also was kind enough to record a video in order to prove his words. You can watch it below:</p>
<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/maa37Fs8ZTE"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/maa37Fs8ZTE" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object></p>
<p>Although YouTube&#8217;s video resolution is not suitable for this type of videos, it was enough to convince me that something does not function as expected on my machine. But, first of all, a few remarks about the video:</p>
<ol>
<li>After issuing the <code>import</code> command, the cursor does not turn into a cross. Usually, the cursor change indicates a change of mode. But I guess this is not of significant importance.</li>
<li>This is definitely not the <a href="http://www.gnome.org/">GNOME</a> desktop environment. It is <a href="http://fluxbox.sourceforge.net/">fluxbox</a> (or I have been badly misled), but, sincerely, I have no problem at all with this&#8230;</li>
</ol>
<p>I tried to take a screenshot of a menu under fluxbox. After issuing <code>import</code>, to my relief I could switch applications with <code>Alt-Tab</code>, but, when I tried to trigger a menu with <code>Alt-F</code>, for example, the menu, although triggered, it was <strong>not visible</strong>. How can anyone take a screenshot of an invisible menu?</p>
<p>I use Fedora Core 6 with almost the latest updates. I would be very glad to know what I am missing here&#8230;</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/03/15/screenshot-of-a-menu-under-gnome-round-2/">Screenshot of a menu under GNOME: ROUND 2</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2007/02/28/taking-a-screenshot-of-a-menu-under-gnome/" rel="bookmark">Taking a screenshot of a menu under GNOME</a></li>
<li><a href="http://www.g-loaded.eu/2007/05/15/blanking-a-rewritable-cddvd-in-gnome/" rel="bookmark">Blanking a rewritable CD/DVD in GNOME</a></li>
<li><a href="http://www.g-loaded.eu/2006/10/06/turning-off-window-animations-in-gnome/" rel="bookmark">Turning off window animations in GNOME</a></li>
<li><a href="http://www.g-loaded.eu/2005/09/09/gnome-212-is-out-but/" rel="bookmark">GNOME 2.12 is out, but&#8230;</a></li>
<li><a href="http://www.g-loaded.eu/2006/02/20/gnome-214-rawhide-suse-and-more/" rel="bookmark">GNOME 2.14, Rawhide, SUSE and more&#8230;</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/03/15/screenshot-of-a-menu-under-gnome-round-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Print a Man Page</title>
		<link>http://www.g-loaded.eu/2007/03/05/print-a-man-page/</link>
		<comments>http://www.g-loaded.eu/2007/03/05/print-a-man-page/#comments</comments>
		<pubDate>Mon, 05 Mar 2007 15:22:36 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Printing]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/03/05/print-a-man-page/</guid>
		<description><![CDATA[Reading a man page using a terminal application is easy, but I doubt if it would ever win a convenience award. Sometimes, it is necessary to print the man page. I can recommend two ways of doing this. First, using the -t switch, when launching the man command from a terminal, causes the man page [...]]]></description>
			<content:encoded><![CDATA[<p>Reading a man page using a terminal application is easy, but I doubt if it would ever win a convenience award. Sometimes, it is necessary to print the man page. I can recommend two ways of doing this.<br />
<span id="more-367"></span><br />
First, using the <strong>-t</strong> switch, when launching the <strong>man</strong> command from a terminal, causes the man page to be formatted in <strong>Postscript</strong>. Technically, it uses <code>groff</code> to perform the conversion. More information about this can be found within the man command&#8217;s manual page (<code>man 1 man</code>).</p>
<p>The Postscript output can be piped to <strong>lpr</strong> for printing in a CUPS printer. The following example prints the <code>iptables</code> manual page to the <em>HP690C</em> printer:</p>
<pre class="console">$ man -t iptables | lpr -P HP690C</pre>
<p>Alternatively, the output can be saved to a postscript file:</p>
<pre class="console">$ man -t iptables > iptables.ps</pre>
<p>More on using a CUPS printer from the CLI can be found <a href="http://www.g-loaded.eu/2005/11/10/using-a-cups-printer-from-command-line/">here</a>.</p>
<p>Those who have the <a href="http://live.gnome.org/Yelp">Yelp</a> GNOME application installed, can take advantage of its internal man page parser and HTML converter. For example, in order to display the iptables man page in Yelp, launch it like the following:</p>
<pre class="console">$ yelp man:iptables</pre>
<p>From there, you can use the GNOME print dialog to print the iptables manual.</p>
<p>I tend to prefer the quality of the man page when it has been printed through Yelp.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/03/05/print-a-man-page/">Print a Man Page</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2005/11/10/print-to-cups-printer-instances/" rel="bookmark">Print to CUPS printer instances</a></li>
<li><a href="http://www.g-loaded.eu/2005/11/10/using-a-cups-printer-from-command-line/" rel="bookmark">Using a CUPS printer from command line</a></li>
<li><a href="http://www.g-loaded.eu/2006/05/04/write-a-man-page/" rel="bookmark">Write A Man Page</a></li>
<li><a href="http://www.g-loaded.eu/2006/12/03/pdf2email-cups-backend/" rel="bookmark">pdf2email CUPS Backend</a></li>
<li><a href="http://www.g-loaded.eu/2006/09/23/use-python-to-get-the-web-page-data-in-epiphany/" rel="bookmark">Use Python to get the web page data in Epiphany</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/03/05/print-a-man-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
	</channel>
</rss>
