Thursday, July 26, 2012

Setting the Location of the Maven Local Repository at the Command Line

If you ever need to temporarily override the directory Maven uses for your local repository when running Maven from the command line, you can do so by setting the property maven.repo.local:

    $ mvn -Dmaven.repo.local=/tmp/repository install

Why would you want to do this? I found a useful situation while logged into a server at work where my login had a form of "read-only" access, and therefore no home directory, but where I had access to Maven and needed to test something out. I'm sure there would be other reasons out there as well or the property wouldn't be available?

Resolving Font Preferences Between Openbox and Gnome

While working on setting a new workstation with Linux Mint 13 Maya and Openbox, I had quite a difficult time getting any adjustments to the fonts to take hold while working in Openbox.

The two approaches I took was adjusting the fonts through Gnome Tweak Tool and ObConf. Changes with the tweak tool took effect when logged in to Gnome, but not when in Openbox, which I found surprising in part because Gtk was still being used to render the windows. Adjustments in ObConf only affect items like the font rendering in the window title bar.

The difference however is when in Openbox, gnome-settings-daemon was not running. A good hint is found in the system wide autostart script at /etc/xdg/openbox/autostart:

    # If you want to use GNOME config tools...
    #
    #if test -x /usr/lib/openbox/gnome-settings-daemon >/dev/null; then
    #  /usr/lib/openbox/gnome-settings-daemon &
    #elif which gnome-settings-daemon >/dev/null; then
    #  gnome-settings-daemon &
    #fi

Running /usr/bin/gnome-settings-daemon from a terminal did the trick and the changes made to the fonts did take hold.

To make the changes permanent, you could uncomment the above section in the system-wide autostart script, but I chose for no particular reason to adjust the user-level script, ~/.config/openbox/autostart by simply adding:

    gnome-settings-daemon &

Either way should work if anyone is running into the same issue.