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

autofit false doesn't disable autofit #40

Closed
karlbeecken opened this issue Jun 13, 2020 · 8 comments · Fixed by #54
Closed

autofit false doesn't disable autofit #40

karlbeecken opened this issue Jun 13, 2020 · 8 comments · Fixed by #54

Comments

@karlbeecken
Copy link

karlbeecken commented Jun 13, 2020

I use grafana-kiosk on a RPi 2B on Raspbian 10 Buster with a config file, but when I set autofit to false it doesn't actually diable autofit.

@karlbeecken karlbeecken changed the title autofill false doesn't disable autofill autofill false doesn't disable autofit Jun 13, 2020
@karlbeecken karlbeecken changed the title autofill false doesn't disable autofit autofit false doesn't disable autofit Jun 13, 2020
@DO1JLR
Copy link

DO1JLR commented Jul 2, 2020

I have a similar problem.

The only way I can get autofit to false is to set the environment variable. The option is unfortunately ignored in the config.

asciicast
Don't be surprised, I was desperate and wrote it in the config in several places.

DO1JLR added a commit to roles-ansible/role-grafana-kiosk that referenced this issue Jul 2, 2020
@djschoone
Copy link

Got the same issue on the command line arguments

/usr/bin/grafana-kiosk --URL https://grafana.url/playlists/play/1 --login-method local --username xxx --password xxx --kiosk-mode full --autofit false --playlists

@djschoone
Copy link

Tried with a local config file, but that doesn't work either. I'm testing this on a OSx 10.11.6 with th darwin.amd64 build of 1.0.2

I took a quick peak in the code, but couldn't find any bugs yet

@djschoone
Copy link

djschoone commented Aug 31, 2020

In pkg/kiosk/config.go changing env-default on line 6 to 'false' the false is applied. When giving the argument in de config, it applies the 'true' argument as well when given.

Any known bugs in false versus true in creating structs?

package kiosk

// Config configuration for backend
type Config struct {
	General struct {
		AutoFit     bool   `yaml:"autofit" env:"KIOSK_AUTOFIT" env-default:"false" env-description:"fit panels to screen"`
		LXDEEnabled bool   `yaml:"lxde" env:"KIOSK_LXDE_ENABLED" env-default:"false" env-description:"initialize LXDE for kiosk mode"`
		LXDEHome    string `yaml:"lxde-home" env:"KIOSK_MODE" env-default:"/home/pi" env-description:"path to home directory of LXDE user running X Server"`
		Mode        string `yaml:"kiosk-mode" env:"KIOSK_MODE" env-default:"full" env-description:"[full|tv|disabled]"`
	} `yaml:"general"`
	Target struct {
		IgnoreCertificateErrors bool   `yaml:"ignore-certificate-errors" env:"KIOSK_IGNORE_CERTIFICATE_ERRORS" env-description:"ignore SSL/TLS certificate errors" env-default:"false"`
		IsPlayList              bool   `yaml:"playlist" env:"KIOSK_IS_PLAYLIST" env-default:"false" env-description:"URL is a playlist"`
		LoginMethod             string `yaml:"login-method" env:"KIOSK_LOGIN_METHOD" env-default:"anon" env-description:"[anon|local|gcom]"`
		Password                string `yaml:"password" env:"KIOSK_LOGIN_PASSWORD" env-default:"guest" env-description:"password"`
		URL                     string `yaml:"URL" env:"KIOSK_URL" env-default:"https://play.grafana.org" env-description:"URL to Grafana server"`
		Username                string `yaml:"username" env:"KIOSK_LOGIN_USER" env-default:"guest" env-description:"username"`
	} `yaml:"target"`
}

@vladget
Copy link

vladget commented Sep 15, 2020

Same. Here is workaround, i don't know why but it works with --autofit=false (with equals sign instead of space)

@djschoone
Copy link

djschoone commented Sep 16, 2020

works with --autofit=false

Interesting find!

@victorbrca
Copy link

I tried with both the environment variable and --autofit=false and neither works for me.

@nitwhiz
Copy link

nitwhiz commented Jul 14, 2021

It still does not work via config file. Adding --autofit=false did not help, the environment variable KIOSK_AUTOFIT=false works it for me.

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

Successfully merging a pull request may close this issue.

6 participants