Local configuration file gets overwritten by byobu-config

Bug #803509 reported by zorun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
Fix Released
Medium
Unassigned
byobu (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

/etc/byobu/statusrc is a sample config file (that gets read first by byobu), with the mention:

# Byobu's default status notifications
# Override these in $BYOBU_CONFIG_DIR/status

First, there's no clue about what $BYOBU_CONFIG_DIR might be (I had to read through the code to find out it is $XDG_CONFIG_HOME i.e. ~/.config/byobu by default).

So I copied this to ~/.config/byobu/status and edited it. However, running byobu-config reseted this file to only keep notification configuration (thus deleting commented and uncommented configuration variables). This is annoying...

I just happened to see that byobu also look for ~/.config/byobu/statusrc (probably for backward compatibility, but since byobu was using ~/.byobu before, backward compatibility is broken anyway).

I am thus suggesting the following (btw, tell me if my attempt at configuring byobu started the wrong way):

* keeping names consistent (either use '/etc/byobu/status' and '~/.config/byobu/status' or both files named 'statusrc')
* byobu-config should leave unmodified any line it doesn't know about in '~/.config/byobu/status';
* on the first run of byobu, populate '~/.config/byobu/status' with commented configuration variables: maybe copy '/etc/byobu/statusrc' if it exists (that makes sense because distro packagers may want to activate/deactivate some notifications by default), and bundle an hard-coded default version otherwise;
* adding 'NETWORK_UNITS' to '/etc/byobu/statusrc';
* adding commentaries about the goal and allowed value of each configuration variable (eg. the unit of NETWORK_THRESHOLD). It's in the man, but having to look through every page of byobu man just to have a very basic piece of knowledge is a bit harsh.

If there's some obscure reasons for these facts I didn't see, well, you have all of my excuses.
Keep making byobu a very cool project !

Changed in byobu:
status: New → In Progress
importance: Undecided → Medium
Changed in byobu:
status: In Progress → Fix Committed
Changed in byobu (Ubuntu):
status: New → Fix Committed
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (6.9 KiB)

This bug was fixed in the package byobu - 4.18-0ubuntu1

---------------
byobu (4.18-0ubuntu1) oneiric; urgency=low

  [ Dustin Kirkland ]
  * usr/bin/byobu, usr/bin/byobu-status:
    - remove some redundancies
  * usr/bin/byobu, usr/bin/byobu-config, usr/bin/byobu-ctrl-a,
    usr/bin/byobu-disable, usr/bin/byobu-launcher, usr/bin/byobu-quiet,
    usr/bin/byobu-reconnect-sockets, usr/bin/byobu-select-profile,
    usr/bin/byobu-select-session, usr/lib/byobu/.constants:
    - use a BYOBU_BACKEND environment variable, to support both screen
      and tmux
  * etc/byobu/socketdir, usr/bin/byobu, usr/lib/byobu/date,
    usr/lib/byobu/notify_osd, usr/share/byobu/keybindings/f-keys,
    usr/share/byobu/keybindings/screen-escape-keys,
    usr/share/byobu/profiles/common, usr/share/byobu/profiles/NONE,
    usr/share/byobu/profiles/tmux, usr/share/byobu/windows/common:
    - use a BYOBU_BACKEND environment variable, to support both screen
      and tmux
  * usr/lib/byobu/.common, usr/lib/byobu/.constants:
    - ensure that libraries only get included once
  * === removed directory usr/sbin, usr/sbin/byobu-classroom =>
    experimental/byobu-classroom:
    - move the classroom to experimental (about to be an ensemble formula)
  * etc/byobu/backend, usr/lib/byobu/.constants:
    - add support for storing byobu backend configuration (screen|tmux)
  * debian/control: start suggesting tmux
  * usr/bin/byobu, usr/lib/byobu/.constants:
    - support tmux -V version
  * usr/lib/byobu/.shutil:
    - update ec2 detection method
  * === added directory usr/share/byobu/status, configure.ac,
    etc/byobu/statusrc, experimental/byobu-status-all => usr/bin/byobu-
    statusd, Makefile.am, usr/bin/byobu-janitor, usr/bin/byobu-status-
    print, usr/bin/Makefile.am, usr/lib/byobu/color,
    usr/lib/byobu/.constants, usr/lib/byobu/Makefile.am,
    usr/lib/byobu/.shutil, usr/share/byobu/profiles/common,
    usr/share/byobu/status/1, usr/share/byobu/status/2,
    usr/share/byobu/status/3, usr/share/byobu/status/4,
    usr/share/byobu/status/Makefile.am:
    - add shared configurations for status ordering
    - install symlinks to status ordering
    - add status script for status colors
    - move color function to shared utils
    - add stub for tmux color support
    - add byobu-statusd, daemon to cache and update status information in the
      run directory as the information expires
    - add byobu-status-print, script to concatenate status per ordered
      configuration
    - move byobu backend support below BYOBU_CONFIG_DIR determination
    - move status frequencies to a shared utility function
    - drop the backtick commands for all the individual status functions
    - add the backtick commands for the 4 quadrants of status
    - update the hardstatus line accordingly
  * usr/bin/byobu-select-session, usr/lib/byobu/.common,
    usr/lib/byobu/.constants, usr/lib/byobu/.dirs,
    usr/lib/byobu/Makefile.am, usr/share/byobu/profiles/common,
    usr/share/byobu/status/1, usr/share/byobu/status/2:
    - fix string bug in select session
    - re-add a couple of necessary backticks
    - update caption line to use new statusd cache
    - significantly reduce the numb...

Read more...

Changed in byobu (Ubuntu):
status: Fix Committed → Fix Released
Changed in byobu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.