$SOCKETDIR variable usage in byobu scripts

Asked by zorun

How do byobu scripts get called? Are there some variables defined, such as $SOCKETDIR?

My point is that a small part of the code (namely, "/usr/bin/byobu{,-select-profile,janitor}") is using the following to set SOCKETDIR:
    [ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" || SOCKETDIR="/var/run/screen"

Which is perfect for portability, as a distro might want to put screen sessions in /tmp.

However, every script (in /usr/lib/byobu/) I check is making use of the hardcoded /var/run/screen path... Is this intended? Or a missing feature? Or is there anything preventing one from using a variable? (hence my initial question)

Thanks

Question information

Language:
English Edit question
Status:
Answered
For:
byobu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Dustin Kirkland  (kirkland) said :
#1

On Thu, Jun 16, 2011 at 10:41 AM, zorun
<email address hidden> wrote:
> New question #161681 on byobu:
> https://answers.launchpad.net/byobu/+question/161681
>
> How do byobu scripts get called? Are there some variables defined, such as $SOCKETDIR?
>
> My point is that a small part of the code (namely, "/usr/bin/byobu{,-select-profile,janitor}") is using the following to set SOCKETDIR:
>    [ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" || SOCKETDIR="/var/run/screen"
>
> Which is perfect for portability, as a distro might want to put screen sessions in /tmp.
>
> However, every script (in /usr/lib/byobu/) I check is making use of the hardcoded /var/run/screen path... Is this intended? Or a missing feature? Or is there anything preventing one from using a variable? (hence my initial question)

Definitely a bug (or feature request) against byobu. Those should be
using a SOCKETDIR, or better yet, a "RUN" variable.

--
:-Dustin

Revision history for this message
zorun (zorun-42) said :
#2

Is there any technical reason that would make it difficult to do?

Byobu is an excellent project, but because of this, it's a pain to package on Archlinux, as we're using /tmp/screens to store screen information. I have to patch every byobu script...

zorun

Revision history for this message
Dustin Kirkland  (kirkland) said :
#3

On Wed, Jun 22, 2011 at 1:21 PM, zorun
<email address hidden> wrote:
> Question #161681 on byobu changed:
> https://answers.launchpad.net/byobu/+question/161681
>
>    Status: Answered => Open
>
> zorun is still having a problem:
> Is there any technical reason that would make it difficult to do?
>
> Byobu is an excellent project, but because of this, it's a pain to
> package on Archlinux, as we're using /tmp/screens to store screen
> information. I have to patch every byobu script...

Nope, it's quite fixable.

Please file a bug (or convert this question into a bug) and I'll get
it fixed. You're welcome to attach a patch, too :-) Otherwise, I'll
fix it this weekend. Thanks.

--
:-Dustin

Can you help with this problem?

Provide an answer of your own, or ask zorun for more information if necessary.

To post a message you must log in.