Gnome Logo

Recently Used Documents in Ubuntu Gnome

I don't like having my recently used documents get saved across Gnome. I prefer to set individual application preferences. For instance, in jEdit I like to record up to 80 recent documents.

Its a bit tricky to do this, and to be safe I'm using two different methods:

  • Making ~/.recently-used.xbel not modifiable
rm ~/.recently-used.xbel
touch ~/.recently-used.xbel
sudo chattr +i ~/.recently-used.xbel
  • Setting GTK preferences in ~/.gtkrc-2.0
gtk-recent-files-max-age=0
gtk-recent-files-limit=0

OpenOffice Logo

OpenOffice Page Margins

Took me forever to find the page margin settings in OpenOffice. Hope it helps others, but I know I'll come back here to remember!

Its not in any print dialogs, its under Format->Page. Easy as pie, once I found it!

Ghostscript

Printing from the Command Line

Since I use a laptop (Lenovo g555), I'm not always connected to a printer. I wanted to print my documents to a PDF, then batch print them later. Rather than manually opening up the PDFs and then printing each one, I figured it could be done via the command line shell, in my case - bash.

Thanks to tkjacobsen, I'm trying out this function:

function printpdf ()
{
for i in $@; do
if [ "$1" != "$i" ]; then
dt=`date +%y%m%d%H%M%S`
pdftops $i temp-print${dt}.ps
lpr -P $1 temp-print${dt}.ps
rm temp-print${dt}.ps
fi
done
}

I haven't tried it, but I'm about to!

Copy and Paste from jEdit to Gnome Terminal *RESOLVED*

By Albert on August 27, 2010 9:44 PM

On a recent install of Lucid Lynx Ubuntu version 10.4, I was unable to copy and paste from jEdit to Gnome Terminal.

I found this web page that explained how installing the Sun JRE fixed it:

sudo apt-get install sun-java6-jdk

But Lucid Lynx doesn't have the Sun JRE! Thankfully, this page explains that it is available in the partner repository, and how to add it:

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"

After I got that installed, I was still having problems, apparently because I'm using the Awesome window manager. The awesome wiki has a fix that worked for me, putting this at the top of /usr/bin/jedit:

wmname LG3D

Alas, this causes problems with search and replace! I decided to switch back to the OpenJDK packages and switch to lxterminal.

Funny, lxterminal started getting kind of sluggish for me, so I installed Xfce4-terminal and it rocks! So it's not so much a resolution but a workaround.

sudo apt-get install xfce4-terminal
sudo update-alternatives --config x-terminal-emulator

Apache2 Bridge Between S3 and DAV

By Albert on August 22, 2010 3:38 PM

Experimenting with Apache, mod_perl, Apache2::S3, and DAV

I'm going to set this up today and see if this item on my "to-do" list works:

To-Do: Test Apache2::S3 as a DAV Proxy with DAVFS2

Alas, it didn't work. I didn't use davfs2, but actually that's what encouraged me to try this today! After tinkering around the Lucid Lynx Ubuntu system I recently setup on my Lenovo G555 I noticed something that sounded familiar but hadn't actually seen before: .gvfs.

What is GVFS?

GVFS is the successor to the Gnome virtual file system. Thankfully, it doesn't need the usual hardware abstraction layer (HAL) and is apparently very modular, kind of like PAM. I happened upon the hidden .gvfs folder in my home directory while trying to clean it up, with a goal of putting all my settings in $XDGCONFIGHOME (aka ~/.config). Would I want to delete .gvfs? Turns out I definitely want to keep it -- in my humble opinion it is a very very cool little folder! Not so much for what it as a folder does, but for what it alerted me to - the brand new world of GVFS at large.

On my Lucid Lynx install, I have these gvfs related packages installed:

lash@lenovo-g555-2:~$ dpkg -l | grep gvfs
ii  gvfs                                  1.6.1-0ubuntu1build1                            userspace virtual filesystem - server
ii  gvfs-backends                         1.6.1-0ubuntu1build1                            userspace virtual filesystem - backends
ii  gvfs-bin                              1.6.1-0ubuntu1build1                            userspace virtual filesystem - binaries
ii  gvfs-fuse                             1.6.1-0ubuntu1build1                            userspace virtual filesystem - fuse server
ii  libgvfscommon0    

Get the idea? Good! I'll elaborate anyway! Docunext readers may be familiar with FUSE, I know I am - I've been using SSHFS to mount filesystems over the SSH protocol for years, though I've been using NFS more often these days. I still use FUSE all the time for Encfs, too.

Anyway, from what I've learned so far, gvfs is a set of tools, abstraction layers, and programming interfaces to provide tighter integration of FUSE, as well as other filesystem backends, with Gnome. While reading up on gvfs, I discovered that Thibault Saunier is working on a Google Docs interface to gvfs! Believe in the gDrive! The gPhone came true!!

This got me thinking and reminded me that I wanted to try connecting S3 to DAV with Apache2::S3. But as my test confirmed, that won't work at all:

[Sun Aug 22 18:07:02 2010] [error] [client 192.168.1.215] <?xml version="1.0" encoding="UTF-8"?>\n<Error><Code>MethodNotAllowed</Code><Message>The specified method is not allowed against this resource.</Message><ResourceType>BUCKET</ResourceType><Method>PROPFIND</Method><RequestId>B0DA9D7EE6DE73AD</RequestId><AllowedMethod>PUT</AllowedMethod><HostId>tIbZEhZarXoApiO9wzD23fLIrGiYqZ+DKhUxiFYXmG5frXO6faXdpOLgGEAx2Fwc</HostId></Error> at /usr/local/share/perl/5.10.1/Apache2/S3.pm line 153.\n

So, it looks like S3FS it the best bet, though that one definitely needs some more work, too.

Some Ubuntu Customizations I'm Using with Lucid Lynx 10.04

By Albert on August 22, 2010 9:23 AM

I've installed Ubuntu version 10.04 aka Lucid Lynx on my Lenovo G555 and I've just about got it setup how I want, though I definitely made some changes!

Awesome Window Manager

I kept the Gnome default install and setup Awesome following the instructions provided on the Awesome wiki:

apt-get install awesome awesome-extra
gconftool-2 --type bool --set /apps/nautilus/preferences/show_desktop False
 # Still disable the buggy Nautilus desktop thing
 gconftool-2 --type string --set /desktop/gnome/session/required_components/windowmanager awesome
 # sets awesome as wm

~/.local/share/applications/awesome.desktop

[Desktop Entry]
 Version=1.0
 Type=Application
 Name=Awesome
 Comment=The awesome launcher!
 TryExec=awesome
 Exec=awesome

Then I customized my .config/awesome/rc.lua file as I have done in the past.

So far Gnome Keyring is working, so I'll stick with gdm. I moved the bottom panel, opting for the Awesome wiibox, then put the top Gnome panel on the bottom with auto-hide turned on.

Removing Ubuntu One, Shutting Down Unused Services

I removed Ubuntu One following the instructions mentioned in the Docunext wiki, and then stopped a whole bunch of stuff I don't use in Preferences -> Startup Applications, such as bluetooth.

Pam Environment

I added pam_env to /etc/pam.d/common-session so I could set some environment variables upon login via gdm / xdm / ssh whatever.