Does nothing unless there's a started tmux server

Bug #1403659 reported by Marko Stanković
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hollywood (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Hi Dustin,

First of all, thanks for this lovely script!

Upon installation on my kubuntu vivid, I've tried the hollywood, but it did nothing.
I've ran it from byobu (screen backend), from a tty console (a la Alt-F6), and from an xterm console - all with the same results.

After some debugging with
sh -x $(which hollywood)
I've noticed it stops upon executing this line
tmux new-window -n $PKG "$widget_dir/$widget1" \; \
        set-option -g pane-active-border-bg "default" \; \
        set-option -g pane-active-border-fg "default" >/dev/null 2>&1
Which evaluates in runtime as, for example:
tmux new-window -n hollywood /usr/bin/../lib/hollywood/jp2a \; set-option -g pane-active-border-bg default \; set-option -g pane-active-border-fg default
And the outcome is:
failed to connect to server: Connection refused
...unless there's a tmux running somewhere, started by the current user.

Proposed solution is to check if we are ran from within a tmux session (ie TMUX environment variable is set):
if [ -z "$TMUX" ]; then
 tmux new-session ...; else
 tmux new-window ...; fi

Cheers,
Marko

Changed in hollywood (Ubuntu):
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hollywood - 1.7-0ubuntu1

---------------
hollywood (1.7-0ubuntu1) vivid; urgency=medium

  * debian/control:
    - add missing dependency on mlocate:
      https://github.com/dustinkirkland/hollywood/issues/2
  * lib/hollywood/apg, lib/hollywood/bmon, lib/hollywood/cmatrix,
    lib/hollywood/code, lib/hollywood/errno, lib/hollywood/hexdump,
    lib/hollywood/htop, lib/hollywood/jp2a, lib/hollywood/logs,
    lib/hollywood/man, lib/hollywood/mplayer, lib/hollywood/speedometer,
    lib/hollywood/sshart, lib/hollywood/stat, lib/hollywood/tree:
    - test for existence of each widget
      + https://github.com/dustinkirkland/hollywood/issues/1
  * bin/hollywood, share/man/man1/hollywood.1:
    - exit cleanly, trap signals, document exit, renice widgets
      to minimum scheduling priority
  * close LP: #1403659, now that we launch byobu if not already running
 -- Dustin Kirkland <email address hidden> Wed, 17 Dec 2014 22:16:38 -0600

Changed in hollywood (Ubuntu):
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.