andresgongora / synth-shell-greeter

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

(standard_in) 1: syntax error #23

Closed darthmongo closed 3 years ago

darthmongo commented 4 years ago

Describe the bug A clear and concise description of what the bug is. Installed the script on my laptop and everything works great. Followed the same instructions on another machine and I'm getting "(standard_in) 1: syntax error" on the top two lines when I open my command shell, but no graphic DeepinScreenshot_select-area_20200506092055

Expected behavior I should see the standard opening graphic in ASCII.

Screenshots I've attached a screenshot.

andresgongora commented 4 years ago

Hi! I'm glad you like my script. There are some bugs in the master branch of synth-shell. Could you try to clone and install the develop branch? We are working on getting all fixes ready and then we'll merge them into master.

git clone --recursive https://github.com/andresgongora/synth-shell.git
checkout -b develop
git pull
synth-shell/setup.sh
bassamanator commented 4 years ago

@andresgongora I'm getting a similar error. I installed the develop branch. It still gives me the same error:

Error: error sending query: Error creating socket
(standard_in) 1: syntax error
(standard_in) 1: syntax error

Love this btw!

RDP-Technology commented 4 years ago

I too am getting the same error. I'm running latest Raspian (Buster). I also note the CPU temp doesn't show up for me either?

RDP-Technology commented 4 years ago

Here is a screenshot of my terminal Not sure why the errors are coming up as well as no CPU temp?

Screenshot from 2020-05-22 17-15-29

RDP-Technology commented 4 years ago

It appears my errors were caused by the CPU temp not showing up even with lm_sensors installed. After removing CPUTEMP from my status.config file under: print_info=" The errors disappeared. Here is another screenshot showing no errors after removing CPUTEMP. Hope this helps others. I have opened a pull request (I think!) and happy for others to use the updated status.config file but please note it will have the Raspberry Pi logo I designed which you can see in the screenshots. :)

Screenshot from 2020-05-22 17-56-41

bassamanator commented 4 years ago

So I looked in

/home/bassam/.config/synth-shell/

to try to implement @RDP-Technology's fix but didn't find a status.config file.

:/

RDP-Technology commented 4 years ago

@bassamanator Did you install it as a user (i.e. for yourself only) or globally (for everyone? i.e. system wide). Each time I install it I always do it for user only. You should have a status.config file in ~/.config/synth-shell

If not then perhaps you installed for everyone (system wide) so it may be under a different directory such as /etc/andresgongora/synth-shell (I think this is where Andre has put the global directory - I'm sure he will correct me if I'm wrong). I looked through his status.sh file to see where the file is installed and these two locations is where the script is looking for the status.config file:

local user_config_file="$HOME/.config/synth-shell/status.config" local sys_config_file="/etc/andresgongora/synth-shell/status.config"

bassamanator commented 4 years ago

I'm 100% I installed it for the current user only. I'll reinstalled to check. I also moved the status.config from the install folder to $HOME/.config/synth-shell and edited it as you did and the problem still exists for me.

I think I forgot to mention, my cpu temp is not showing up either even though i have lm_sensors installed and I can view my cpu temp in Ksysguard.

bassamanator commented 4 years ago

So I uninstalled synth-shell. Made sure .confg/synth-shell didn't exist anymore. Reinstalled what I consider to be the dev version. I still get the syntax error and cpu temp is not displaying.

RDP-Technology commented 4 years ago

@bassamanator - Can you back-up your copy of status.config file then install my version just to test? I've attached it here:

status.config.zip

If it doesn't work just reinstate yours and delete mine. I just want to see if my version works for you even though it has the Pi logo. Let me know how you go. If it works I'll fix the original file that has the original logo and upload for you to use.

bassamanator commented 4 years ago

@RDP-Technology So after the reinstall, I still didn't get a status.config file in my /home/bassam/.config/synth-shell/ directory.

I put your status.config in the above mentioned folder, opened up a new konsole, opened up a new guake windows....no change.

I don't get it. I've searched my whole system (/) and the only status.config file I can find is in the installation directory. I'm only installing to the current user btw. I've done it many times by now :/

Thanks for your help though.

RDP-Technology commented 4 years ago

@bassamanator Can you double check to ensure you don't have the following directory:

System wide: /etc/synth-shell/

I just read the front page and the system wide directory is the one above and not where I mentioned in one of my previous post. If it doesn't exist and you only have the ~/.config/synth-shell/ directory then I'm not sure why your getting the error :(

I'm sure Andre will fix the issues in the next couple of weeks though.

bassamanator commented 4 years ago

@RDP-Technology /etc/synth-shell does not exist :/

I hope though I'm in no particular rush. Directories not listing with 'ls' is a bigger problem that I'm having. Followed the install instructions to the T.

Alarg commented 4 years ago

Hello,

I want to interject:

VirtualBox_Arch_27_05_2020_14_31_03

I'm having the same issue. I'm using synth-shell on system-wide install and this is the content of my config (I thought that CPU temp not showing was the problem so I deleted it).

Edit: I forgot to add, there is this written above the "OS" on the right window: (standard_in) 1: syntax error (standard_in) 1: syntax error

RDP-Technology commented 4 years ago

I can confirm that lm_sensors causes the errors. I tried on another machine that did not have lm_sensors installed and I got no errors. As soon as I installed lm_sensors I got the two errors. I suspect everyone that has this error has had lm_sensors installed (generally automatically by their Linux distro) prior to installing this script and not getting the CPU temperature to show in their terminal either?

andresgongora commented 4 years ago
Sorry for the late reply. I have several major projects going on and so I was unable to address all issues of this repo. I'm a bit more free now and so we should be able to fix all issues in a short time.

Please let me remind you that synth-shell is going through a big change. I'm moving all script inside synth-shell to external repos, so that they now becomes submodules that can, if the user wishes so, be installed completely independently. This is a big improvement, but requires a lot of work. Just as a brief overview:

- synth-shell https://github.com/andresgongora/synth-shell: this will be the parent repo. Eventually it will contain little code on its own and will become a bundle of submodules.

- bash-tools https://github.com/andresgongora/bash-tools: all auxiliar functions that have "generic" use will be store here. Like printer helpers and such.

- synth-shell-greeter https://github.com/andresgongora/synth-shell-greeter, formerly known as status.sh, is the script that prints the logo and system status info.

- synth-shell-prompt https://github.com/andresgongora/synth-shell-prompt: prints a nice colored prompt with triangles.

Hi all, thanks for the patience. This bug is clearly related to synth-shell-greeter. I'm moving the issue over there to get lm_sensors fixed asap

transmissionator commented 3 years ago

I think this issue can be closed now since https://github.com/andresgongora/synth-shell-greeter/pull/27. If the sensors command produces an error then it should not attempt to get the CPU temperature.

andresgongora commented 3 years ago

@transmissionator There is also a second bug that produces the exact same error. We are working on it as well. It's related to floating point numbers that use either . or , depending on the locale.

andresgongora commented 3 years ago

Closing, as we think we have found the exact issue in #28