tags/gnomezack's home pagehttp://upsilon.cc/~zack/tags/gnome/zack's home pageikiwiki2015-03-09T09:21:47Zinterview for The Setuphttp://upsilon.cc/~zack/blog/posts/2015/03/interview_for_The_Setup/2015-03-09T09:21:47Z2015-03-09T09:21:47Z
<h1>my setup, take #2</h1>
<p>Look Ma, I've been <a href=
"http://stefano.zacchiroli.usesthis.com/">interviewed</a> by
<a href="http://usesthis.com/">The Setup</a>, a popular blog with
<em>"interviews asking people from all walks of life what they use
to get the job done"</em>; so I now sport a fancy <a href=
"http://stefano.zacchiroli.usesthis.com">http://stefano.zacchiroli.usesthis.com</a>
too.</p>
<p>While there is overlap with <a href=
"http://upsilon.cc/~zack/blog/posts/2014/09/interview_for_the_gnu_linux_setup/">my
previous take</a> on my setup, the questions are different so most
of the content is novel. In particular, I quite enjoyed the
question about what would be my "dream setup", and indulged in free
software/hardware desiderata.</p>
<p>Many thanks to Daniel Bogan for running the blog and kudos for
his editing work: while it's just a detail, such an abundance and
quality of link titles is not easy to come by on the Web.</p>
interview for the gnu linux setuphttp://upsilon.cc/~zack/blog/posts/2014/09/interview_for_the_gnu_linux_setup/2014-09-03T14:02:16Z2014-09-03T08:48:14Z
<h1>my setup, take #1</h1>
<p>Among the various things I've catched up with during the summer,
I've finally managed to set aside some time to answer a pending
<a href=
"http://www.mylinuxrig.com/post/96462880004/the-linux-setup-stefano-zacchiroli-former-debian">
interview</a> request for <a href=
"http://www.mylinuxrig.com/setup">The [GNU/]Linux Setup</a>: a blog
run by Steven Ovadia that collects interviews about how people use
GNU/Linux-based desktops.</p>
<p>In the interview I discuss my day to day work-flow, from GNOME
Shell to Mutt, from Emacs to Notmuch, and the various glue code
tools I've written for integrating them.</p>
<p><a href=
"http://www.mylinuxrig.com/post/96462880004/the-linux-setup-stefano-zacchiroli-former-debian">
Enjoy</a>!</p>
<p>Feedback is most welcome.</p>
GNOME Awesome Applethttp://upsilon.cc/~zack/blog/posts/2010/11/GNOME_Awesome_Applet/2013-02-15T18:25:42Z2010-11-24T17:15:24Z
<h1>using GNOME with Awesome without die trying</h1>
<p>I'm an avid <a href="http://www.gnome.org">GNOME</a> user, but I
don't want to give up <a href=
"http://en.wikipedia.org/wiki/Tiling_window_manager">tiling</a> due
to that.</p>
<p>After <a href=
"http://upsilon.cc/~zack/blog/posts/2009/04/xmonad_+_gnome_on_Debian/">1.5 years with
xmonad+GNOME</a>, I've decided it was about time to give <a href=
"http://awesome.naquadah.org/">Awesome</a> another try. Last time I
tried, integration with GNOME was really sub-optimal; in particular
I've been it by the showstopping (for me) issue that it was not
possible, back then, to <a href=
"http://awesome.naquadah.org/bugs/index.php?do=details&task_id=503">
disable Awesome systray</a> in favor of GNOME's.</p>
<p>Nowadays, GNOME+Awesome integration is much better. It's very
easy to disable all you don't want of Awesome (including systray)
to rely upon corresponding GNOME desktop components (check my
<a href=
"http://upsilon.cc/~zack/blog/posts/2010/11/GNOME_Awesome_Applet/rc.lua">rc.lua</a>
for an example).</p>
<p>Still, by renouncing Wibox in favor of GNOME Panel, you (used
to) lack some features: (1) the ability to <strong>monitor the
current layout</strong>, (2) <strong>(GNOME) run application
prompt</strong>, and (3) <strong>Lua code prompt</strong>. It is to
overcome these limitations that I've hacked <a href=
"http://upsilon.cc/~zack/hacking/software/gnome-awesome-applet/"><strong>GNOME
Awesome Applet</strong></a>.</p>
<p>Version 0.1.0 is now available for download from the <a href=
"http://upsilon.cc/~zack/hacking/software/gnome-awesome-applet/">homepage</a>. It's
beta-quality and it's the first (hopefully last?) GNOME Applet I've
ever written, … you know the drill. Feedback, bug reports, features
requests, and <a href=
"http://git.upsilon.cc/?p=gnome-awesome-applet.git;a=summary">code</a>
patches are more than welcome.</p>
<p>Enjoy!</p>
xmonad + gnome on Debianhttp://upsilon.cc/~zack/blog/posts/2009/04/xmonad_+_gnome_on_Debian/2009-11-28T12:00:16Z2009-04-15T11:21:35Z
<h1>... finally I'm tiling too!</h1>
<p><strong>Short story</strong>: I've just switched to <a href=
"http://www.xmonad.org">xmonad</a> as my window manager of choice
within a <a href="http://www.gnome.org">Gnome</a> desktop
environment; I give some tips on how to achieve that quickly on a
current Debian/unstable machine.</p>
<h2>/me and tiling window managers</h2>
<p>I switched to Gnome a long time ago. The benefit of that over
good old window managers is enjoying an integrated environment and
a workplace that you can find on other machines (e.g., the netbook
you installed for your mother, the office desktop, the student lab
machines, ...). Still, I've never been particularly happy about
Gnome's default window manager: <a href=
"http://en.wikipedia.org/wiki/Metacity">metacity</a>. The feature I
was missing the most is the ability to configure windows
programmatically so that they appear where and how I want by
default; sadly enough, the Gnome session mechanism is not yet able
to do that properly.</p>
<p>Hence, I've tried various time switching to a tiling window
manager, imposing the extra requirement that it should integrate
with Gnome. The coolest guy on the block of that area seems to be
<a href="http://awesome.naquadah.org/">awesome</a> and I gave it a
try some months ago. I liked most of its (sometime revolutionary)
principles, like window tagging, but I equally hated various
aspects of it:</p>
<ul>
<li>
<p><em>Documentation</em> back then was horrible, starting from the
manpage speaking of mod{1,2,3,4,5} without giving a hint about
where the heck they are mapped to by default, ranging to the lack
of references manual about what you can call from LUA configuration
files. ... use the source, Luke ...</p>
</li>
<li>
<p><em>Community</em> was mainly composed by super-users, which is
good if you want to do some super-configuration. ... but is deeply
bad™ if you are trying to get hints on how to make awesome cope
with Gnome. I remember having been treated as a total luser on IRC,
with people more interested in convincing me that I should stop
using Gnome than in helping out achieving what I wanted to.</p>
</li>
</ul>
<p>People nowadays tell me that awesome works fine with Gnome, so
maybe I've just been unlucky back then, but sometime the first
impression does count.</p>
<p>I've never considered seriously <a href=
"http://www.xmonad.org">xmonad</a>, thinking (with no sound reason,
apparently) that it was a project of the series: "I'm a fan of
programming language $LANG, all my apps should be written in $LANG,
my window manager is no exception", with LANG=haskell.</p>
<p>Then two things happened:</p>
<ol>
<li>
<p>a couple of weeks ago I stumbled upon the xmonad <a href=
"http://www.haskell.org/haskellwiki/Xmonad">wiki</a> and <a href=
"http://xmonad.org/documentation.html">documentation</a>, and I was
impressed by the average quality of the information shipped there.
It is not something you usually find in "language showcase"
projects.</p>
</li>
<li>
<p><a href=
"http://justimho.blogspot.com/search/label/Debian">Patrick</a>
blogged about its switch to <a href=
"http://justimho.blogspot.com/2009/04/gnomad-gnome-xmonad.html">xmonad
+ Gnome</a>, with enthusiastic feedback. If that's not a sign I
don't know what it can be <img src="http://upsilon.cc/~zack/smileys/smile.png" alt=
":-)" /></p>
</li>
</ol>
<h2>Getting started with xmonad + Gnome on Debian</h2>
<p>There is <a href=
"http://www.haskell.org/haskellwiki/Xmonad/Using_xmonad_in_Gnome">a
page</a> explaining how to use xmonad with Gnome in the xmonad
wiki, but a handful of additional tips will help you get started in
Debian, even if you know (almost) nothing about Haskell (yet).</p>
<ul>
<li>You should install <strong>packages</strong> <a href=
"http://packages.debian.org/sid/xmonad">xmonad</a> <em>and</em>
<a href=
"http://packages.debian.org/sid/libghc6-xmonad-dev">libghc6-xmonad-dev</a>.
Without the latter <em>you will not be able to configure</em> your
xmonad; in particular you will not have access to the Gnome
configuration library, which offers sane defaults for using xmonad
with Gnome. <small>(See below for a rant on the disk usage of
installing the second package ...)</small></li>
</ul>
<p>The (crazy) way in which xmonad works is that you create your
config file as <code>~/.xmonad/xmonad.hs</code>. That file is a
full fledged Haskell program, which gets compiled to obtain your
own xmonad executable which you run as your own window manager.
<code>/usr/bin/xmonad</code> is the executable you initially run,
but is just a wrapper around the compilation + run mechanism</p>
<ul>
<li>
<p>Since you have installed libghc6-xmonad-dev, you have access to
a module pre-<strong>configuring xmonad for Gnome</strong>, just
use the following as your starting xmonad.hs:</p>
<pre><code> import XMonad
import XMonad.Config.Gnome
main = xmonad $ gnomeConfig {
modMask = mod4Mask
}
</code></pre></li>
</ul>
<p>The modMask setting means that ALT will get delivered to
applications, while all xmonad commands are delivered via the
infamous windows key: no more conflicts between apps and WM
<code>\o/</code>.</p>
<ul>
<li>At this point you can <strong>configure xmonad as your Gnome
window manager</strong>. Disable re-spawning of metacity in your
session option, and run somewhere <code>killall metacity ; xmonad
&</code> . For the next session runs you will have to remember
the running xmonad in your Gnome session, as usual.</li>
</ul>
<p>The default Gnome configuration is quite nice: you can retain
your Nautilus desktop (in spite of <a href=
"http://www.haskell.org/haskellwiki/Xmonad/Using_xmonad_in_Gnome">what
is written on the wiki</a>), <code>mod-p</code> will get you a
gnome-run dialog box, and appropriate padding for the (upper!)
Gnome panel.</p>
<p>The only glitch is that you will get 9 desktops which can
clutter your workspace switched. My solution is to have the appler
show workspaces on 2 rows but <strong>beware of bug <a href=
"http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=524065">524065</a></strong>,
which is <em>really</em> annoying.</p>
<ul>
<li>
<p><strong>Compositing</strong> works as well, by the means of
<a href="http://packages.debian.org/sid/xcompmgr">xcompmgr</a>.
Just install it and register in your session the result of running
<code>xcompmgr -c &</code>. No wonder that it is way faster
than compositing manager support in metacity.</p>
</li>
<li>
<p>Finally, you can <strong>configure window placement</strong> in
your xmonad.hs by doing something like the following (it already
includes the shorter snippet given before):</p>
<pre><code> import XMonad
import XMonad.Config.Gnome
myManageHook = composeAll [
(className =? "Pidgin" <&&> title =? "Buddy List") --> doFloat
, (className =? "Gnome-panel" <&&> title =? "Run Application") --> doFloat
-- , (className =? "XEyes") --> doShift "7"
]
main = xmonad $ gnomeConfig {
modMask = mod4Mask
, manageHook = myManageHook <+> manageHook gnomeConfig
}
</code></pre></li>
</ul>
<p>The above example will make the pidgin buddy list and run
application dialog box float by default. The commented line is an
example of how to deliver specific windows to arbitrary workspaces.
To find out window properties on which match in your xmonad.hs, my
magic command is <code>xprop | egrep "CLASS|NAME"</code>.</p>
<p>Note that you don't need to care about panel placement because
it is already taken care of by the default gnome config. Still
beware of not using myManageHook as your <em>only</em> management
hook, you should <em>update</em> the default one using the
<code><+></code> monad as I did above.</p>
<h2>xmonad rant</h2>
<p>So, what's wrong with xmonad + Gnome in Debian? Well, the fact
that it will take about 200 Mb of disk space on amd64 by default.
<code>o_O</code></p>
<p>Why so? Because xmonad is affected by the <em>static linking
hell</em> which seems to be shared by modern statically typed
functional languages, including in the category both Haskell and my
beloved OCaml. In short, applications written for those language
link statically code written in the implementation language in most
cases; they rely on legacy shared libraries only for bindings to C
libraries.</p>
<p>For xmonad that means that if you are fine with the default
configuration you will get a cheap 2 Mb binary package. If you are
not, you will need to write your conffile ... which is a Haskell
program ... using several contrib libraries ... and needing ghc6 to
be compiled and run as your own window manager executable.</p>
<p>This is plainly dumb and induces all the usual problems of
static linking, like disk consumption due to non-shared (Haskell)
code, and worries about staying up to date with the latest library
release in case of fixes (including <em>security</em> fixes) need
to be propagated to user executables.</p>
<p>Truth to be said, <code>/usr/bin/xmonad</code> does a wonderful
job in hiding all this to the final user, but still the design
choice is an unpleasant one.</p>