byobu crashes on start up

Bug #1666212 reported by St John Giddy
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
byobu
Incomplete
Critical
Unassigned

Bug Description

This is the error I'm getting:

Traceback (most recent call last):
  File "/usr/lib/byobu/include/select-session.py", line 163, in <module>
    attach_session(sessions[choice - 1])
  File "/usr/lib/byobu/include/select-session.py", line 108, in attach_session
    os.execvp("screen", ["", "-AOxRR", session_name])
  File "/usr/lib/python3.6/os.py", line 559, in execvp
    _execvpe(file, args)
  File "/usr/lib/python3.6/os.py", line 594, in _execvpe
    exec_func(fullname, *argrest)
ValueError: execv() arg 2 first element cannot be empty

I'm using Arch. I'm seemed to fix it for now by changing
 os.execvp("screen", ["", "-AOxRR", session_name])
to
 os.execvp("screen", [" ", "-AOxRR", session_name])

Revision history for this message
eviweb (eviweb) wrote :

Hi,
I just encountered this issue, and I can confirm that the fix works.
For me it had to be inserted in the tmux call of the attach_session function, like below :

def attach_session(session):
    update_environment(session)
    backend, session_name = session.split("____", 2)
    # must use the binary, not the wrapper!
    if backend == "tmux":
        os.execvp("tmux", [" ", "-2", "attach", "-t", session_name])
    else:
        os.execvp("screen", [" ", "-AOxRR", session_name])

Best regards

Eric

Revision history for this message
CDGSThermi (e-noel) wrote :

That fix works for me, too. I've had that problem for years on new installations. Please introduce the patch.

affects: archlinux → byobu (Arch Linux)
no longer affects: byobu (Arch Linux)
Revision history for this message
eviweb (eviweb) wrote :

Hi,

for info I'm on an Ubuntu distro where the issue is the same and the fix above works also.

Best regards

Eric

Revision history for this message
Theodotos Andreou (theodotos) wrote :

Same here on Ubuntu 16.04. eviweb's suggestion fixed the issue.

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

Is this fix still need as of byobu 5.127? The current code says this:

def attach_session(session):
        update_environment(session)
        backend, session_name = session.split("____", 2)
        cull_zombies(session_name)
        # must use the binary, not the wrapper!
        if backend == "tmux":
                if reuse_sessions:
                        os.execvp("tmux", ["tmux", "attach", "-t", session_name])
                else:
                        os.execvp("tmux", ["tmux", "-2", "new-session", "-t", session_name, "-s", "_%s-%i" % (session_name, os.getpid())])

        else:
                os.execvp("screen", ["screen", "-AOxRR", session_name])

Changed in byobu:
importance: Undecided → Critical
status: New → Incomplete
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.