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

System information not appearing #26

Open
paulmadore opened this issue Apr 18, 2017 · 16 comments
Open

System information not appearing #26

paulmadore opened this issue Apr 18, 2017 · 16 comments

Comments

@paulmadore
Copy link

It will appear if I run the program as root. How can I fix this?

1492550935

@mik30s
Copy link
Owner

mik30s commented Apr 19, 2017

Hi @paulmadore can you please tell me the distro you are running on. I have had similar problems with arch linux users. Nice work with your theme BTW.

@paulmadore
Copy link
Author

paulmadore commented Apr 19, 2017

I'm on Debian stretch:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.0 (stretch)
Release: 9.0
Codename: stretch

@mik30s
Copy link
Owner

mik30s commented Apr 19, 2017

Do you have an /etc/lsb-release or /etc/os-release file on you system. If you do and you still have this problem, i might have to find another way to get that information for debian users.

@paulmadore
Copy link
Author

It looks like I don't. I installed the "lsb-core" package and that didn't seem to help that "no modules" situation either. It's really weird that it will allow it to have the info for Root, but not otherwise. There's apparently something you can do with the sudoers file to whitelist a program, but I've never done it before and I'm nervous about editing that file willy nilly.

@mik30s
Copy link
Owner

mik30s commented Apr 19, 2017

Hmm, you can still access that file without running as root. Have you tired changing permissions on the file.
Try apt-get install lsb-release

@paulmadore
Copy link
Author

Already have lsb-release. Here's what my system shows:

1492611062

Which file should I change perms on? Any of these? Because there doesn't appear to be anything in /etc.

@paulmadore
Copy link
Author

I just want to say, also, that I think this program is WAY better than Conky and that styling with HTML/CSS is a brilliant move. I'd like to see that method expanded to a whole desklet system.

@mik30s
Copy link
Owner

mik30s commented Apr 19, 2017

Thanks. It should be a file in the /etc directory. Thats where cysboard will look for it. If it does not find a file named lsb-release in /etc it will look for an os-release file in /etc. If it doesn't find either it will report an error. Can you please run cysboard from a terminal and post the output. That would help alot. I might have to add more logging to resolve future issues.

@paulmadore
Copy link
Author

paulmadore commented Apr 19, 2017

No errors:

1492623582

However, it appears that my os-release file is located in /usr/lib.

Again, it shows the correct (at least, the ram -- still doesn't know it's on Debian) output when run as root:

1492623646

Where is the line of code I can change to make it look in /usr/lib instead? Perhaps a good long-term fix for this is to have a configuration file associated with it that can change defaults like this.

@mik30s
Copy link
Owner

mik30s commented Apr 19, 2017

The code is in the osinfo_linux.cpp (constructor) and it needs some refactoring to search directories first. You can go ahead and create a pull request if you fix it. I will add a fix for this issue as soon as i can.
Thanks again for catching this.

@paulmadore
Copy link
Author

Okay, I'll have a look. Glad to know it wasn't just bad configuration on my part.

@paulmadore
Copy link
Author

Well, this is helpful information: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=444678

Debian does not have an /etc/lsb_release file. I'm wondering if I can create one myself.

@paulmadore
Copy link
Author

paulmadore commented Apr 19, 2017

By creating a file /etc/lsb-release with the following lines:

DISTRIB_ID=Debian
DISTRIB_DESCRIPTION="LCC"
DISTRIB_RELEASE=9
DISTRIB_CODENAME=Stretch

I was able to get it to print Debian. This is quick hack until it is learned how to get the information in Debian.

The ram still does not display without running as root. Looking into that next.

@paulmadore
Copy link
Author

The ram issue was a problem with my template.

What I am going to do is write a little script that generates an lsb-release file for Debian systems, and this can be an optional fix for Debian users whilst you create something more universal.

@mik30s
Copy link
Owner

mik30s commented Apr 19, 2017

Thanks for the work around. Looks like i'll have to have the files in a list generated at compile time for different distros and select from that at runtime.

@paulmadore
Copy link
Author

Yeah, and that's a bit more work than I want to do at this point. I'm going to create a theme repository for Cysboard at lucky.computer/cysboard

For whatever reason Debian broke with the standardized way of providing system information. They minimally comply with the LSB standard by having output via the lsb_release command. My computer company will still be shipping Debian but I think I will have to do something about this issue, some script that generates a standard lsb-release file during updates.

It's really great to see a conky alternative that is more fun to work with.

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

2 participants