Move a panel between monitors in Gnome
January 21st, 2010
I’ve used two monitors for years now on a kinda cheap card with one DVI and one VGA port. Naturally, I use the DVI one as the primary monitor, keeping the VGA as a supplement for extra space. However, my card detects the VGA as the “primary” monitor and puts my Gnome panels on that monitor. I learned to live with it, almost enjoying the fact that my primary workspace had no decorations at all.
However, I got curious and dug into it to find the setting to change this:
gconftool-2 -s /apps/panel/toplevels/top_panel/monitor --type int 1
Alternatively, use gconf-editor to navigate to that location and change monitor from 0 to 1 from there. I didn’t even need to re-login, it just hopped across to the other monitor.
UPDATE: Ya, so apparently you can just alt + left click to move the panel between monitors. The interwebs is awesome, thanks to mbooth in the comments for that one.
Screen
January 19th, 2010
I love when I find useful built-in commands that I never knew about. When starting out with Linux, I heard about the typical heavy hitters like grep, sed, and awk. Then I discovered some variations on common commands, such as htop and less. And then every so often, someone mentions a command in passing that causes me to say “Wait… what is that?”
Screen is one of those sorts of tools. I was watching a VNC demo of one of our team’s sprint reviews and was distracted by the fact that he had a tab bar on the bottom of a terminal. It turns out that was just part of the coolness of “screen”.
Screen is basically a window manager that runs in a terminal, letting multiple shells run within the single terminal. I’m sure there are other features that I’d find awesome, but there are two that immediately stood out.
As I mentioned, screen allows you to run multiple shells inside of a single terminal. Instead of starting up a handful of separate SSH sessions to a server, I now just use screen to manage multiple shells inside of a single connection. Each call to screen creates a new shell, with a simple emacs-like syntax to switch between them:
ctrl + a + n # next ctrl + a + p # previous ctrl + a + 0 # select screen 0
One side note on this, by default the tab bar displaying the running shells isn’t displayed. Adding the following to ~/.screenrc enables a visual indicator of the current and possible shells that are open:
hardstatus on
hardstatus alwayslastline "%{-b gk}%-w%{+b kg}%50>%n %t%{-b gk}%+w%< %= %{w}%D %M %d %C%a"
While useful, it can still get a little confusing when a bunch of shells are opened. The title can be set by:
ctrl + a A

The second major piece of awesomeness is the ability to detach from a running screen and reattach later. Going back to the SSH example, this lets me leave some shells running, detach, completely disconnect from the server, and then reattach to the screen later (with everything left exactly as it was).
Again, an emacs-like syntax for detaching from a running screen:
ctrl + a + d
Later, to reattach to the running screen detached from earlier:
screen -dr
Like I said, I’m not trying to make this post sound like I’ve discovered some hidden black magic in Linux. It’s just an attempt to let new users know about this awesomeness.
Removing desktop icons in Gnome
December 11th, 2009
A friend of mine is migrating from Windows to Fedora and has been asking me a bunch of questions about my setup. As I was looking over my wiki for notes I’ve taken, I realized one of the tasks I always find myself doing in Gnome is to disable the default desktop icons. My reasoning is a combination of the fact that I try to use the mouse as little as possible and a compulsive desire to have an empty desktop. I should probably seek some psychiatric help on the compulsion, but since I was able to disable the icons the doctor will have to wait until my next episode.
There is unfortunately no menu option for this in preferences, so I had to use gconf-editor. That’s not installed by default, but it’s easy enough to fix that.
sudo yum -y install gconf-editor
Once it’s installed, run it and navigate to apps -> nautilus -> desktop. Uncheck the *_icon_visible options until your compulsion subsides and you’re good to go.
Devil’s Pie
December 9th, 2009
I’ve been using Gnome for almost a year and a half now, and while I have grown to love a lot of the advantages it has, there are still some things I miss about FVWM. From a keyboard shortcut standpoint, many of them were alleviated when I discovered Gnome Do. However, I still found myself missing sticky, transparent shells that would give me a constant view into certain data, be it htop or tailing some files. It was really quick to set up in FVWM, but I had trouble finding a way to remove window decorations from windows in Gnome.
Sure, there are other ways to get the data I’m looking for, but having text rendered directly on the desktop like that just looks damn cool to me. It also intimidates the crap out of non-geeks when they see my office, which I fully admit is a big plus.
I came across a package called Devil’s Pie that gave me a lot more control over windows. Although I was looking for something that would let me actively select a window to give it certain properties (sticky, no decorations, etc), Devil’s Pie instead passively detects new windows and applies settings to them. It’s a mentality shift from my initial thoughts, but I think over time this model will actually be really useful. Plus, it has “pie” in the name, which is just awesome.
With a combination of gnome-terminal profiles/flags and Devil’s Pie configuration, I was able to get my desktop to automatically populate my desktop with all sorts of data. The following description of how is kinda wordy, but it’s really not complicated at all.
Install and Configure Devil’s Pie
sudo yum -y install devilspie mkdir ~/.devilspie touch ~/.devilspie/console.ds
Devil’s Pie reads all configuration files (I believe they have to end in .ds, but don’t quote me on that) in the above directory on startup. Those files define the rules that will be applied to new windows that are created (there’s also a way to ask it to apply rules to all existing windows as well). For this example, I put my rules in a file named console.ds.
(if (contains (window_name) "console" ) (begin (undecorate) (pin) (skip_pager) (skip_tasklist) ) )
There are two main parts to the above configuration. The first is the matching expression to decide if a window should have the rules applied. In this case, I indicate to apply the actions if the window name contains the string “console” (there are also options for “is” and “matches”). I’ll cover where that rule comes into play in a bit.
The actions do the following:
- undecorate – This is primarily what I was going for, I want the window decorations removed. This includes the title bar and border, though you can still use the shortcut key (alt+F8 by default) to resize a window without decorations.
- pin – Make this window available on all workspaces. There are also attributes to control putting a window on a particular workspace, which could be useful in my case since I use 12 workspaces and am, well, pretty anal retentive about having certain applications in certain workspaces.
- skip_pager – Don’t let the window show up in the pager. It removes the clutter in my pager since I don’t consider this a “real” application, just a status-type window.
- skip_tasklist – A little more useful than skip_pager, this keeps the window off the taskbar, for the same rationale as above.
Needless to say, I’m only scratching the surface of all of the actions supported. I haven’t found a good way to find this list yet; the man page says the -l flag will list symbols but when I try it, it just doesn’t do anything.
Run Devil’s Pie
devilspie
Not much to say about that. I’ll talk more about enabling a debug mode later, but I mention it now to say it’s not done through flags. You’ll need to restart it every time you change your confguration files, but once you’re set add it to System -> Preferences -> Startup Applications and you’re good to go on reboots.
Create Gnome Terminal Profile
To summarize above, Devil’s Pie will take care of removing window decorations and keeping it on the visible workspace. We still need to configure Gnome terminal to add some slickness to how it looks. Since I don’t want this slickness on all of my terminals, I created a new profile named “console” with the following changes:
- Background – Transparent background, with the slider set all the way to none.
- Scrolling – Scrollbar is: Disabled
That gives us a completely transparent shell, reflective of its use to simply throw data at me.
Start the Terminal
Now we just need to make sure we start the terminal such that it will use the right profile and will trigger the window detection from Devil’s Pie. Here’s where the matching expression from above comes into play. I don’t want all of my terminals to have no decorations, just specific ones I want to treat in this fashion. When starting the terminal, tell it to use a specific window title that will match our Devil’s Pie rule from above.
gnome-terminal -t console --profile=console --geometry=140x20+1680-0 -e htop
A quick explanation of above:
- -t – Sets the title of the terminal window. This value should match up to the window_name value from the Devil’s Pie configuration.
- –profile – Tells the terminal to use the slick console profile in all of its transparent goodness.
- –geometry – Initially size and place the terminal on my screen.
- -e – Run a specific command when it starts, in this case
htop.
My screenshot above simply uses a similar call to gnome-terminal, passing a tail command to -e and different geometry to get the log tail on the top of the screen.
Two other notes on Devil’s Pie:
There is a UI for editing the configuration files: gdevilspie. It’s handy because you can easily see the different types of matching expressions and actions, however the files it generated didn’t run for me. For some reason, even with one matching expression it still added a blank condition and an “and” statement and closed the conditions block too early. I haven’t looked to closely yet to see what is wrong.
Enabling debugging is as simple as adding another configuration file. I added one named “debug.ds” to my ~/.devilspie directory that contained simply:
(debug)
Once that is in place, running the devilspie executable from the command line output some really useful window information whenever a new window was created.
It Just Worked
November 29th, 2009
I’m a bit late on any sort of post about Fedora 12 being released. That’s not to say I haven’t been taking advantage of it. On release day I did a clean install of my main desktop. From start to finish, I went from booting into the x86_64 install disk to building and running RHQ in about 70 minutes. That includes dual monitor support with no manual steps on my part and sound support. I even plugged in a tablet input I have and it picked it up without an issue.
That’s it. I ran through the installer, added a few packages I use that aren’t part of the default install, and was back up and running (I intentionally didn’t upgrade just to use it as an opportunity to clean off all the random crap I collect over the lifespan of an OS install). I literally did it during a conference call at work. The installation and initial experience has gotten extremely streamlined.
Over the weekend, I decided it was time to attack my wife’s laptop. She’s been using one of my old laptops for about a year and a half now which was running an older, non-updated version of Ubuntu (probably 8.04). After a quick backup, I popped in the i386 install disk to the same result as on my desktop: it just worked. I typed in the wifi password and she was good to go.
My wife is still a die hard Quicken user. She took extremely well to Linux when I first pushed it on her, but I have yet to mentally prepare myself to argue the accountant in her to move off of Quicken. So as part of this laptop install, I setup a dual boot into Windows (the hardware isn’t beefy enough to run it as a virt guest).
I figured I’d push my luck. I popped in the Quicken CD, pointed wine at the installer, and hoped for the best. 5 minutes later, it was installed. A few minutes after that, it had successfully updated itself from the internet and there was a menu item in Gnome for her to access it.
The worst part? Midway through the installer I called my wife over to show her. Here on her Gnome desktop sat the Quicken Windows installer. I didn’t have to do any sort of odd config file hacking, nor did I have to sacrifice any small furry animals. Her reaction?
“Cool.”
I just kinda stared at her blankly for a minute. It was almost physically painful to see her not appreciate the technological awesomeness that stood before her. I sighed and grabbed my phone intent on texting someone who could appreciate the situation.
Congratulations to the Fedora team on an awesome release. There have been some seriously great improvements in what have historically been uglier areas, such as wifi and dual monitor setups (not to mention the fact that I’ve always been cursed when it came to wine).
Future Red Hat Developer
November 18th, 2009
(Renamed from “Future Fedora Ambassador” because of the hat… not that she can’t be involved in both, but this picture happens to be Red Hat specific
)
It’s been a while since I got a good picture of my 2 year old geeking out. My wife actually took this one after my daughter found my red fedora which was still packed from moving.

Conky
September 28th, 2009
When I first started out using Linux, I was introduced to FVWM as a display manager. I quickly became, well, addicted to dorking with my .fvwm2rc config file. I was hooked on how many possibilities and customizations could be made. I’ve since stopped using FVWM for various reasons (not the least of which is their abrasive community) and thought my config file tweaking addiction was cured.
Then I found Conky. The easiest description is found directly on their site: “Conky is a free, light-weight system monitor for X, that displays any information on your desktop.” The addictive part is that there are hundreds of variables that can be displayed as part of its monitoring. Do I need, at all times, to see the amount of space left on my /home partition? No. Does the fact that I can do it make it awesome anyway? Hell yeah.
In the past week, I’ve had a number of coworkers see it running on my laptop and ask me what it was and how to configure it. The “what” part can be seen in the top right corner of my desktop below (click the image for the full size 1680×1050 version):
The “how”, or at least my settings, can be found here. I’m playing around with a personal github account for backing up and sharing this sort of stuff. I’m still not sure how much I’ll use it, but for now my conky config file can be found there. It’s a bit of a mess, but should be at least enough to give users an idea of what can be done. If anyone knows of any particularly cool use of it that I’m missing, definitely let me know.


