Source installed byobu doesn't start : "...status': Is a directory"

Bug #1025998 reported by Tomi Hukkalainen on 2012-07-18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Dustin Kirkland 

Bug Description

$ tar -xf Downloads/byobu_5.21.orig.tar.gz
$ cd byobu-5.21
$ ./configure --prefix="$HOME/.local/"
$ make
$ make install
$ cd
$ byobu
rm: cannot remove `/home/tpievila/.local/share/byobu/status': Is a directory

$ ls -R .local/share/byobu/
ec2/ keybindings/ pixmaps/ profiles/ status/ tests/ windows/

rates.ap-northeast-1 rates.ap-southeast-1

common f-keys f-keys.screen f-keys.screen.disable f-keys.tmux f-keys.tmux.disable none


byoburc common NONE screenrc tmux tmuxrc

status statusrc



afoglia (afoglia) wrote :

The error is raised by the following in byobu-janitor

    # Affects: Upgrades from <= byobu 4.30
    # Clear out old style status configuration
    if ! grep -qs "^screen_upper_left=" "$BYOBU_CONFIG_DIR/status"; then
            rm -f "$BYOBU_CONFIG_DIR/status" "$BYOBU_CONFIG_DIR/statusrc"

I'm installing byobu essentially as the user above is (I'm using stow to place it in .local, but otherwise, it's the same), and lib/byobu/include/dirs is determing BYOBU_CONFIG_DIR to be .local/share/byobu.

By explicitly setting BYOBU_CONFIG_DIR to another directory (i.e. ~/.byobu) byobu-janitor runs.

So it's a conflict between the way the files are laid out in ~/.local/share/byobu when installing into .local and when solely using ~/.local/share/byobu for user-specific configuration. I don't know enough about the XDG standard to give a solution.

afoglia (afoglia) wrote :

Ah, looking more closely at the XDG base directory spec and other pages about it, I think byobu should be looking for user configuration files under ~/.config (not ~/.local/share).

From the spec, "$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used."

If you consider the stuff in the old ~/.byobu to be closer to data files than configuration files, then looking under ~/.local/share makes sense, but you should check user-specified $XDG_DATA_HOME instead of $XDG_CONFIG_HOME.

Changed in byobu:
importance: Undecided → Medium
status: New → In Progress
assignee: nobody → Dustin Kirkland (kirkland)
Dustin Kirkland  (kirkland) wrote :

Arg. Okay. Everything about XDG drives me bonkers. I'm looking at the spec again now.

Dustin Kirkland  (kirkland) wrote :

Committed revision 2019.

Changed in byobu:
status: In Progress → Fix Committed
Changed in byobu:
status: Fix Committed → Fix Released
Bram Geron (bgeron) wrote :

I stumbled on this error again in 5.123. It seems 'make install' for me is putting files in ~/.local/share/byobu, and then usr/lib/byobu/include/dirs is detecting that as my chosen configuration path.

I have ~/.byobu/ already from an old installation. I have ~/.config but XDG_CONFIG_HOME not set, I don't have ~/.config/byobu, and (because of make install) I have ~/.local/share/byobu so that seems to be what it's picking up on.

Cheers, Bram

I just saw this again in 5.129. I did

./configure --prefix=$HOME/.local
make install

I worked around it by replacing part of byobu-janitor (at line 53)

# Affects: Upgrades from <= byobu 4.30
# Clear out old style status configuration
if ! grep -qs "^screen_upper_left=" "$BYOBU_CONFIG_DIR/status"; then
        rm -f "$BYOBU_CONFIG_DIR/status" "$BYOBU_CONFIG_DIR/statusrc"


# Affects: Upgrades from <= byobu 4.30
# Clear out old style status configuration
# WGM: Added additional check to avoid problem with the fact that
# $BYOBU_CONFIG_DIR/status is a directory these days:
if [ -f "$BYOBU_CONFIG_DIR/status" ]; then
    if ! grep -qs "^screen_upper_left=" "$BYOBU_CONFIG_DIR/status"; then
        rm -f "$BYOBU_CONFIG_DIR/status" "$BYOBU_CONFIG_DIR/statusrc"

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers