hollywood icon indicating copy to clipboard operation
hollywood copied to clipboard

Run on osx

Open mrded opened this issue 7 years ago • 21 comments

It will be cool to run it on macOS as well.

mrded avatar Jun 22 '17 19:06 mrded

I made a little progress on this but am going to stop for now. Documenting what I did so far in case someone else wants to pick it up:

  • Install homebrew
  • Run brew install tmux and brew install coreutils
  • Replace sort -R with gsort -R
  • Run sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist to enable the locate command

Here's a patch for the gsort replacement:

diff --git a/bin/hollywood b/bin/hollywood
index 5d5bcdd..0cd4154 100755
--- a/bin/hollywood
+++ b/bin/hollywood
@@ -40,7 +40,7 @@ while [ ! -z "$1" ]; do
 	esac
 done
 
-widget1=$(ls "$widget_dir/" | sort -R | head -n1)
+widget1=$(ls "$widget_dir/" | gsort -R | head -n1)
 arrangements="main-horizontal main-vertical tiled"
 
 if [ -z "$TMUX" ]; then
@@ -65,7 +65,7 @@ tmux new-window -n $PKG "$widget_dir/$widget1" \; \
 
 split=1
 sleep 0.5
-for w in $(ls "$widget_dir" | sort -R); do
+for w in $(ls "$widget_dir" | gsort -R); do
 	[ "$w" = "$widget1" ] && continue
 	[ "$dir" = "-v" ] && dir="-h" || dir="-v"
 	panes=$(tmux lsp -t $PKG)
diff --git a/bin/wallstreet b/bin/wallstreet
index 20b3b43..5e88362 100755
--- a/bin/wallstreet
+++ b/bin/wallstreet
@@ -23,7 +23,7 @@ trap "rm -rf $TMPDIR; pkill -f -9 lib/$PKG/ >/dev/null 2>&1; exit 0" EXIT HUP IN
 
 dir="-v"
 widget_dir="$(dirname $0)/../lib/$PKG"
-widget1=$(ls "$widget_dir/" | sort -R | head -n1)
+widget1=$(ls "$widget_dir/" | gsort -R | head -n1)
 
 if [ -n "$1" ]; then
 	SPLITS="$1"
diff --git a/lib/hollywood/code b/lib/hollywood/code
index e906130..715e9b8 100755
--- a/lib/hollywood/code
+++ b/lib/hollywood/code
@@ -19,7 +19,7 @@ command -v view >/dev/null 2>&1 || exit 1
 
 trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" HUP INT QUIT TERM
 while true; do
-	FILES=$(locate "/usr/*.java" "/usr/*.c" "/usr/*.cpp" | sort -R | head -n 4096) || true
+	FILES=$(locate "/usr/*.java" "/usr/*.c" "/usr/*.cpp" | gsort -R | head -n 4096) || true
 	for f in $FILES; do
 		[ -r "$f" ] || continue
 		[ -s "$f" ] || continue
diff --git a/lib/hollywood/errno b/lib/hollywood/errno
index 9e407a6..fb8d7f2 100755
--- a/lib/hollywood/errno
+++ b/lib/hollywood/errno
@@ -19,6 +19,6 @@ command -v ccze >/dev/null 2>&1 || exit 1
 
 trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" HUP INT QUIT TERM
 while true; do
-	errno --list | sort -R | ccze -A
+	errno --list | gsort -R | ccze -A
 	sleep 0.6
 done
diff --git a/lib/hollywood/hexdump b/lib/hollywood/hexdump
index b535597..8a33137 100755
--- a/lib/hollywood/hexdump
+++ b/lib/hollywood/hexdump
@@ -19,7 +19,7 @@ command -v ccze >/dev/null 2>&1 || exit 1
 
 trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" HUP INT QUIT TERM
 while true; do
-	for f in $(ls /usr/bin/ | sort -R); do
+	for f in $(ls /usr/bin/ | gsort -R); do
 		head -c 4096 "/usr/bin/$f" | hexdump -C | ccze -A -c default=green -c dir="bold green"
 		sleep 0.7
 	done
diff --git a/lib/hollywood/jp2a b/lib/hollywood/jp2a
index 11d2ead..f73d564 100755
--- a/lib/hollywood/jp2a
+++ b/lib/hollywood/jp2a
@@ -19,7 +19,7 @@ command -v jp2a >/dev/null 2>&1 || exit 1
 
 trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" HUP INT QUIT TERM
 while true; do
-	FILES=$(locate "/usr/*jpg" | sort -R | head -n 4096)
+	FILES=$(locate "/usr/*jpg" | gsort -R | head -n 4096)
 	for f in $FILES; do
 		[ -r "$f" ] || continue
 		[ -s "$f" ] || continue
diff --git a/lib/hollywood/man b/lib/hollywood/man
index 5bb7fe8..489aa6b 100755
--- a/lib/hollywood/man
+++ b/lib/hollywood/man
@@ -19,7 +19,7 @@ command -v ccze >/dev/null 2>&1 || exit 1
 
 trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" HUP INT QUIT TERM
 while true; do
-	FILES=$(ls /usr/share/man/man1/ | sort -R | sed "s/\.1\.gz.*$//" | head -n 4096)
+	FILES=$(ls /usr/share/man/man1/ | gsort -R | sed "s/\.1\.gz.*$//" | head -n 4096)
 	for f in $FILES; do
 		man "$f" | ccze -A
 		sleep 0.2
diff --git a/lib/hollywood/stat b/lib/hollywood/stat
index 205d25f..acf3c37 100755
--- a/lib/hollywood/stat
+++ b/lib/hollywood/stat
@@ -19,7 +19,7 @@ command -v ccze >/dev/null 2>&1 || exit 1
 
 trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" HUP INT QUIT TERM
 while true; do
-	for f in $(find /sys /dev 2>/dev/null | sort -R | head -n 4096); do
+	for f in $(find /sys /dev 2>/dev/null | gsort -R | head -n 4096); do
 		stat "$f" | ccze -A -c default=yellow
 		sleep 0.8
 	done

getaaron avatar Aug 21 '17 18:08 getaaron

Found it much easier to run from a container, try https://hub.docker.com/r/jess/hollywood/

ozskywalker avatar Jan 11 '18 04:01 ozskywalker

@failathon when i use 'docker run jess/hollywood' to launch it.It shows 'open terminal failed: not a terminal'.Do you got a doc on how to use it.

huji0624 avatar Feb 01 '18 13:02 huji0624

I think you might need "docker run -it jess/hollywood", so that Docker provisions a tty.

Dustin Kirkland VP, Product Development Canonical, Ltd. @DustinKirkland

On Thu, Feb 1, 2018 at 7:27 AM, Luckyhu [email protected] wrote:

@failathon https://github.com/failathon when i use 'docker run jess/hollywood' to launch it.It shows 'open terminal failed: not a terminal'.Do you got a doc on how to use it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dustinkirkland/hollywood/issues/18#issuecomment-362265288, or mute the thread https://github.com/notifications/unsubscribe-auth/AAzMhpKz4PsprYtmWCGOu6GgGitJ6nPqks5tQbukgaJpZM4OCuS_ .

dustinkirkland avatar Feb 01 '18 13:02 dustinkirkland

@dustinkirkland it works.thanks a lot.

huji0624 avatar Feb 01 '18 16:02 huji0624

Hope that this software could be run/install directilly from MacOSX's terminal.

Tao-Quixote avatar Aug 25 '18 01:08 Tao-Quixote

did this command: docker run -it jess/hollywood

docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?. btw i us mac

ghost avatar Jul 29 '20 17:07 ghost

docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?. btw i us mac

@J0hsHH that sounds like a Docker issue. Can you try reinstalling Docker; preferably Docker Desktop?

Saakshaat avatar Jul 31 '20 04:07 Saakshaat

Hi, I'm getting following error:

✘ daniel@Daniels-Mac-mini  ~/.ssh  docker run -it jess/hollywood

user@f0cac04d1ab7:~> /usr/bin/hollywood [exited]

Can someone help me?

dxniel7402 avatar Sep 15 '20 20:09 dxniel7402

Are you just trying to run the hollywood app? Just open a terminal and type "hollywood" without the quotes of course...

hwac121 avatar Sep 23 '20 11:09 hwac121

I'm having a similar issue to @dxniel7402. Hollywood starts with a connected TTY, shows the byobu terminal, then does nothing for a random amount of time, and then exits (so, the screen is cleared except for [exited] and the next prompt).

TangentFoxy avatar Feb 13 '21 08:02 TangentFoxy

I tried docker run -it jess/hollywood sh on MacOSX Terminal, and then ran hollywood within the container, and all I got was a bottom bar and some flickering.

MagnusBrzenk avatar Mar 04 '21 02:03 MagnusBrzenk

My attempt on OS X 10.13...

Also important to set TMPDIR in shell-env (probably docker does that?) or else replace "/dev/shm" with "/tmp" or other tempdir in various files. With the latest tmux installed and coreutils with the "g" prefix patch, I get as far as MagnusBrzenk, with some horizontal and vertical dividers every few seconds. But no actual modules fill any of the sections.

dmacks avatar Jun 19 '21 17:06 dmacks

I faced problems of commentators above (@dmacks @MagnusBrzenk @TangentFoxy ) using jess/hollywood docker image. But solved it running fresh ubuntu 21:10 image (docker run -it --rm ubuntu:21.10) and run apt update && apt upgrade && apt -y install hollywood && hollywood. ps: --rm removes container after usage During installation two packages ask to choose some options, just press 1 everywhere. If I push the docker image to dockerhub I'll post it here. image

amordo avatar Nov 28 '21 11:11 amordo

docker run --rm -it bcbcarl/hollywood works for me. Mac OS Big Sur 11.6

aifans avatar Mar 08 '22 07:03 aifans

@aifans are the graphics being displayed properly for you?

d3vCr0w avatar May 04 '22 18:05 d3vCr0w

Are there any version for M1 chip?

smartsl avatar Jun 09 '22 03:06 smartsl

@smartsl As you see in the above comments, there isn't any version for macOS (intel nor m1). So you should use docker solutions written in the above comments.

aliir74 avatar Jun 21 '22 08:06 aliir74

There is a version for MacOSX (should work for intel and M1)

To install:

  1. brew tap real-aazam/homebrew-aazam
  2. brew install hollywood

To run: Type hollywood

If you have issues or suggestions for improvements for the Mac version, you can post here: https://github.com/real-aazam/hollywood

real-aazam avatar Dec 28 '22 21:12 real-aazam

docker run --rm -it bcbcarl/hollywood works for me. Mac OS Big Sur 11.6

Still working in 2024 on Sonoma / Applle Silicon 👍 👍

jamesgreenblue avatar Mar 08 '24 21:03 jamesgreenblue

Woohoo!

On Fri, Mar 8, 2024, 16:15 James Greenhalgh CITP MBCS < @.***> wrote:

docker run --rm -it bcbcarl/hollywood works for me. Mac OS Big Sur 11.6

Still working in 2024 on Sonoma / Applle Silicon 👍 👍

— Reply to this email directly, view it on GitHub https://github.com/dustinkirkland/hollywood/issues/18#issuecomment-1986429816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGMZBRWMQ7URYGE5IWIV7TYXITA5AVCNFSM4DQK4S72U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJYGY2DEOJYGE3A . You are receiving this because you were mentioned.Message ID: @.***>

dustinkirkland avatar Mar 08 '24 21:03 dustinkirkland