andresgongora / synth-shell-greeter

A system status report and your personal ASCII-art logo for your terminal sessions
GNU General Public License v3.0
12 stars 15 forks source link

Shell greeter - printout errors #28

Open Janiaje opened 3 years ago

Janiaje commented 3 years ago

Describe the bug Before the logo there are some errors displayed:so Screenshot from 2020-11-24 00-08-40

To Reproduce Steps to reproduce the behavior:

  1. Clear install on Ubuntu 20 following the stepts in the README.md
  2. Startup a terminal

Expected behavior No errors displayed.

andresgongora commented 3 years ago

This issue might be related to #24 . Can you check whether you have bc installed?

sudo apt-get install bc

Janiaje commented 3 years ago

It is already installed:

image

andresgongora commented 3 years ago

Ok, then it's probably related to your locale. Do you write decimals with , or . (e.g., 13.2 vs 13,2)? I've pushed a new fix that should solve this. Just update your repository from master and try again. Please let me know if it worked ;)

andresgongora commented 3 years ago

@Janiaje Did it work? :)

Janiaje commented 3 years ago

Sry for the delay.

It did not work though I am not sure I reinstalled it properly:

And now it prints out the greeter twice on terminal startup (the error message is there before each greeter).

Janiaje commented 3 years ago

My locale is the following: image

It uses , to write decimals: image

Janiaje commented 3 years ago

I ran the ~/.config/synth-shell/uninstall.sh and reinstalled from the bginning and I still get the error messages

andresgongora commented 3 years ago

Sorry it took so long. The issue is that I only fixed the bc problem in one file, when there where several files using it. I've fixed the whole issue by calling the script with LANG=C for everything (see /synth-shell-greeter/synth-shell-greeter.sh line 248).

This should solve the problem once and for all. Let's give it a try :)

andresgongora commented 3 years ago

I ran the ~/.config/synth-shell/uninstall.sh and reinstalled from the bginning and I still get the error messages

The uninstall script is quite broken... I fear. It does not remove all files, really. But reinstalling should fix the issue

andresgongora commented 3 years ago

Quick fix. I'm on my way to work: go to ~/.bashrc and edit it with a text editor. At the bottom you should find two blocks that call synth-shell-greeter. Remove one of them and that should fix the duplication problem.

Ok. The error is 100% related to . vs ,

I'll have a look at it later. Thanks for all your feedback on tracking this issue!

On Tue 1 Dec 2020, 00:33 János Tihanyi, notifications@github.com wrote:

I ran the ~/.config/synth-shell/uninstall.sh and reinstalled from the bginning and I still get the error messages

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/andresgongora/synth-shell-greeter/issues/28#issuecomment-736118619, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC36INTMZY2EDVJ3ZZCMSLTSSQTTXANCNFSM4UCLIQLA .

andresgongora commented 3 years ago

@Janiaje I sent a message last Tuesday but it's not listed here. Odd. I think I've fixed it now. Please upadte your master branch and just follow the usual install process. Uninstalling is not required.

If you get a double prompt:

nano ~/.bashrc

And delete everyline that says synth-shell. Then reinstall and open a new terminal :)

andresgongora commented 3 years ago

I've created a test setup and I'm able to reproduce the error but I'm still not sure of the cause. Working on it...

Janiaje commented 3 years ago

Thank you for working on it! :)

On Fri, Dec 11, 2020, 18:48 Andres Gongora notifications@github.com wrote:

I've created a test setup and I'm able to reproduce the error but I'm still not sure of the cause. Working on it...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/andresgongora/synth-shell-greeter/issues/28#issuecomment-743334858, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGBVTXPPFSNKAZLNCYUGCE3SUJLQVANCNFSM4UCLIQLA .

andresgongora commented 3 years ago

The problem is 99.99% related to the locale it is run with. I've edited the script so that it runs with LANG=C.

Just in case, @Janiaje try the following:

## Should work fine:
LANG=C source .config/synth-shell/synth-shell-prompt.sh

## If it fails, it's with this. Maybe it no longer fails:
LANG=hu_HU.utf8 source .config/synth-shell/synth-shell-prompt.sh

To install the latest version of synthshell (I've edited the setup script, so you might want to create a clean install):

  1. Edit ~/.bashrc and remove the lines reffering to synth-shell, usually at the bottom of the file.

    nano ~/.bashrc
  2. Remove the folder containing the script, should be in your home folder. Maybe you want to backup your config and logo first.

    rm -r ~/.config/synth-shell/
  3. Clean synth-shell setup:

    git clone --recursive https://github.com/andresgongora/synth-shell.git
    chmod +x synth-shell/setup.sh
    synth-shell/setup.sh
andresgongora commented 3 years ago

P.S.: your bash prompt would look nicer if you install the font hack-ttf or ttf-hack and tell your terminal (I guess it's gnome-terminal??) to use that instead of the default ubuntu-mono font ;)