FreePBX | Register | Issues | Wiki | Portal | Support

Sangoma 7 / FreePBX 14 - What happened to the Color?


(Greg Snover) #1

Upgraded another machine last night - Now from the Console, I have no color - but on the first machine I upgraded, I do have color - anyone else seen this?

Both of them are Asterisk 13.17.0

Seems so bland…

But, upgrading did actually fix a weird problem I was having, so overall a +


(Marbled) #2

Hi,

You mean Dashboard?

It would be nice if you could post a picture but have you tried clearing your browser cache?

Good luck and have a nice day,

Nick


(Greg Snover) #3

Console - ssh or puTTY if you are coming from a Windows Machine - asterisk -vvvr


(Marbled) #4

Ok, I get you now…

Isn’t that related to the kind of terminal it thinks you are running?

There’s probably something missing in the scripts that set these things in the shell that gets opened…

What is TERM set to?

Good luck and have a nice day!

Nick


(Greg Snover) #5

I wouldn’t think so - I am coming in from the Hyper-V Console - like I was sitting in front of the Physical Machine - but it’s the same through SSH or puTTY (which really is just SSH) - none of the nice Context-Sensitive Coloring of the Asterisk console output.

It’s weird since a machine upgraded the same way (although with an earlier script that broke things that the current script did not) is still giving me the color - I will keep playing with it - it doesn’t affect the function, I am just used to seeing the color and it does make finding things faster.


(Andrew Nagy) #6

You need to enable color in your bash profile.


(Greg Snover) #7

No, I have color at the BASH Prompt - The FreePBX Logo comes up in it’s normal Green - just no color in Asterisk CLI.


(Andrew Nagy) #8

Show us your bash profile


(Greg Snover) #9

Well, a locate .bashrc gives the following files:

[root@pbx-rgfm ~]# locate .bashrc
/etc/skel/.bashrc
/home/asterisk/.bashrc
/home/asterisk/skel/.bashrc
/root/.bashrc
/root/preupgrade/dirtyconf/root/.bashrc

Here they all are - I see nothing in them that is different from the machine that is working - and Like I said, I am getting color when I log in - just not in Asterisk. I am using images so it doesn’t change the formatting.

/etc/skel/.bashrc

Notice I am getting my Green cursor…

/home/asterisk/.bashrc

/home/asterisk/skel/.bashrc

/root/.bashrc

/root/preupgrade/dirtyconf/root/.bashrc

And finally, since it’s included, /etc/bashrc



There you go - I can’t see anything wrong, but I am not a BASH guru by any measure - not even a noob.


(Matt Schwinn) #10

I’m wondering about this too. I use the CLI a lot and the color is very helpful. FreePBX 13 comes out of the box with color and 14 does not. How can I get this back?


#11

I can confirm I am also seeing this on a fresh SNG7/FPBX 14 install. I also miss the color quite a bit. Interesting though, while the color does not show on the asterisk CLI, it does show when I review the logs from the GUI.


(Andrew Nagy) #12

Next time just paste the text from the files. Looking at mismatched screenshots of text files is really hard.


(Greg Snover) #13

I had given up worrying about this but since other people are seeing this too, I do have a little bit more information to provide - if you do an “fwconsole restart” from the CLI, the color comes back like magic - just seems to me to be a little sledge-hammer-for-an-ant kind of solution, but if you really need it (for troubleshooting) this fixes it reliably.

Why it happens at all is still a mystery…


(Artello73) #14

I have exactly the same issue! Recently upgraded to FreePBX 14 and after reboot I have no colors in asterisk CLI which is annoying.If I do “fwconsole restart” the colors come back. So its looks like startup scripts issues.


(ADTopkek) #15

I just noticed my color is gone as well when I use “asterisk -rvvv” on the Freepbx 14 distro. Colors work fine in Freepbx 13,12,11,10,8


(Evgenii Beletskii) #16

I am experiencing pretty much the same issue, where fwconsole restart can bring colors back until the next system reboot and subsequent FreePBX restart.

FreePBX 14.0.1.36


(Casan12) #17

Please fix this. Color really helps when trying to troubleshoot.


(Jordack) #18

Has there been a good fix for this yet?

I know its just a cosmetic issue.


(Attila Zsiros) #19

Very simple :thinking:

https://zsirmo.hu/work/safe_asterisk_colour_fpbx14.patch

— safe_asterisk.orig 2018-07-10 09:32:27.279094016 +0000
+++ safe_asterisk 2018-07-10 09:31:29.484324987 +0000
@@ -173,9 +173,11 @@
if test -n “$TTY” && test “$TTY” != “no”; then
cd “${RUNDIR}”
stty sane </dev/${TTY}
+ export TERM=xterm
nice -n $PRIORITY “${ASTSBINDIR}/asterisk” -f ${CLIARGS} ${ASTARGS} >/dev/${TTY} 2>&1 </dev/${TTY}
else
cd “${RUNDIR}”
+ export TERM=xterm
nice -n $PRIORITY “${ASTSBINDIR}/asterisk” -f ${CLIARGS} ${ASTARGS} >/dev/null 2>&1 </dev/null
fi
EXITSTATUS=$?


(Jeremiah Halstead) #20

I wasn’t all that familiar with changing anything outside of the GUI, so I had to seach for this. If anyone else is in my ignorant state, the file that is being patched is /usr/sbin/safe_asterisk