Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

required packages #43

Open
ukos-git opened this issue Feb 23, 2018 · 5 comments
Open

required packages #43

ukos-git opened this issue Feb 23, 2018 · 5 comments

Comments

@ukos-git
Copy link

the framework works out of the box in my current ubuntu.

I have a docker container using debian9 and bash 4.4.12. I am getting output like this

igor@04e68d65320c:~/containerroot$ ./igorpro --registerfile serial.txt 
activating bash-oo-framework









 ! Press [CTRL+C] to exit or [Return] to continue execution.
{*}  Continuing...


 ! Press [CTRL+C] to exit or [Return] to continue execution.

where the error description and backtrace is missing. Do I need to install any required packages or fonts - I could not find anything.

@nkakouros
Copy link
Collaborator

Maybe this helps?

https://stackoverflow.com/questions/33493456/docker-bash-prompt-does-not-display-color-output

@ukos-git
Copy link
Author

i do get colors using

$ python -c "print('\033[91mtest\033[0m')"
test

there is really no text underneath the overementioned message.

@ukos-git
Copy link
Author

ukos-git commented Feb 23, 2018

actually, @tterranigma the post had some right ideas. I added the following:

USER igor
# activate color terminal
ENV TERM xterm-256color
RUN sed -i -e 's/^#force_color_prompt=[^\n]*/force_color_prompt=yes/' ~/.bashrc

sourceing ./basrc at run-time after editing is not enough for bash-oo-framework. setting TERM in run-time user environment is also not enough.

Has there been no requirement yet for non-colored terminals? I would have expected pure text-output if no color is activated.

@niieani
Copy link
Owner

niieani commented Feb 23, 2018

We do have color mode detection. No colors should be displayed when we detect a terminal without support for colors:

alias UI.Color.IsAvailable='[ $(tput colors 2>/dev/null || echo 0) -ge 16 ] && [ -t 1 ]'

Perhaps that line doesn't work under Docker. Happy to accept PRs that fix this!

Thanks for investigating. Related issue #19

@ukos-git
Copy link
Author

ukos-git commented Feb 23, 2018

with ENV TERM xterm-256color

$ echo [ $(tput colors 2>/dev/null || echo 0) -ge 16 ]
[ 256 -ge 16 ]

without setting any ENV:

$ echo [ $(tput colors 2>/dev/null || echo 0) -ge 16 ]
[ 8 -ge 16 ]

I don't understand the second part but it resolves to true

$if test -t 1; then echo 1;fi
1

So it seems, standard docker containers get 8 colors. Is 16 colors really a minimum requirement here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants