byobu removes/rewrites symlink ~/.byobu/status

Bug #899271 reported by Daniel Hahler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
Fix Released
Low
Unassigned

Bug Description

I have setup a symlink as follows, which gets replaced by an ordinary file when running byobu:

  /home/user/.byobu/status -> /home/user/.dotfiles/byobu/status

I would like to keep this as a symlink instead.

Revision history for this message
Andrew McCarthy (andrewmccarthy) wrote :

At the moment, I think you can achieve this by setting an environment variable:
BYOBU_CONFIG_DIR=/home/user/.dotfiles/byobu
This should also make the symlink unnecessary.

Alternatively it might also work to just symlink:
/home/user/.byobu -> /home/user/.dotfiles/byobu
if that works for you.

Revision history for this message
Andrew McCarthy (andrewmccarthy) wrote :

Sorry, both of those will be equivalent and mean all files in ~/.byobu are in your .dotfiles folder. Shouldn't post when I'm tired! :)

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Andrew is pretty much right, though I just committed one bit of code to help you out.

As of byobu-4.53, you should be able to put:
 export BYOBU_CONFIG_DIR=/home/user/.dotfiles/byobu
in ~/.byoburc.

And it should handle your use case for the whole directory. I don't think I want to get into a per-file basis.

Changed in byobu:
importance: Undecided → Low
status: New → Fix Committed
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Committed revision 1806.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Well, I do not want to change the path to the config dir, but there appears to be just a problem with the "status" file itself.
Other files are also symlinked and do not get rewritten by regular files:

% l ~/.local/share/byobu
color@ disable-autolaunch keybindings@ profile@ profile.tmux@ reload-required status statusrc@ windows

Changed in byobu:
status: Fix Committed → New
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Committed revision 1821.

Changed in byobu:
status: New → Fix Committed
Changed in byobu:
status: Fix Committed → Fix Released
Revision history for this message
Daniel Hahler (blueyed) wrote :

I am re-opening this, because the `--follow-symlinks` option to `sed` might be a better option here.

Please feel free to close it again, if you think the current solution is good enough.

OTOH I think `readlink` is tricky regarding portability IIRC, and should be avoided.

Changed in byobu:
status: Fix Released → Triaged
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

I'm using $READLINK, which is set to either readlink or greadlink, for portability.

I'd like to leave it as is. Thanks.

Changed in byobu:
status: Triaged → 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.