Cannot find config.ini /Linux

995 views
Skip to first unread message

dev3011

unread,
Nov 27, 2017, 6:11:26 AM11/27/17
to kivy-...@googlegroups.com
Hey,
I installed kivy ony my Raspberry Pi 1 with Raspbian Stretch Lite (I also tried regular Stretch and Jessie).
I did the setup exactly as explained on https://kivy.org/docs/installation/installation-rpi.html (except I installed Cython 0.25 using apt-get).

When I opened a first example kivy said something like 'no configuration found. creating configuration.' However, there was no .kivy folder created in my home dir and thus I can't find a config.ini there (I am aware .kivy would be hidden).
Next time I start a kivy example it doesn't complain about a missing configuration anymore, so it must be somewhere. But where is it?

Thanks for any help!

ZenCODE

unread,
Nov 29, 2017, 12:50:19 AM11/29/17
to Kivy users support
Try running this file:

https://github.com/kivy/kivy/blob/master/kivy/tools/benchmark.py

It generates a lot of system info and might help? Not sure if it shows the ini path but it's worth trying?

dev3011

unread,
Dec 3, 2017, 4:54:09 AM12/3/17
to kivy-...@googlegroups.com

Thank you for your help. Unfortunately, neither benchmark.py nor report.py (also from the kivy tools) give me the path of my config. report.py gives me details about the configuration (so it can find it) but not its path. Partial output of report.py:


================================================================================
Global
================================================================================

OS platform     : Linux-4.9.59+-armv6l-with-debian-9.1 | armv6l
Python EXE      : /usr/bin/python
Python Version  : 2.7.13 (default, Jan 19 2017, 14:48:08) 
[GCC 6.3.0 20170124]
Python API      : 1013
Kivy Version    : 1.10.1.dev0
Install path    : /usr/local/lib/python2.7/dist-packages/kivy
Install date    : Fri Nov 24 18:14:55 2017

================================================================================

Libraries
================================================================================

gst                  is missing
pygame               exist at /usr/lib/python2.7/dist-packages/pygame/__init__.pyc
pygame.midi          exist at /usr/lib/python2.7/dist-packages/pygame/__init__.pyc
squirtle             is missing
PIL                  is missing
sdl2                 is missing
glew                 is missing
opencv               is missing
opencv.cv            is missing
opencv.highgui       is missing
cython               exist at /usr/lib/python2.7/dist-packages/cython.pyc

================================================================================
Configuration
================================================================================

[kivy]
keyboard_repeat_delay = 300
keyboard_repeat_rate = 30
log_dir = logs
log_enable = 1
log_level = info
log_name = kivy_%y-%m-%d_%_.txt
window_icon = 
keyboard_mode = 
keyboard_layout = qwerty
desktop = 1
exit_on_escape = 1
pause_on_minimize = 0
kivy_clock = default
default_font = ['Roboto', 'data/fonts/Roboto-Regular.ttf', 'data/fonts/Roboto-Italic.ttf', 'data/fonts/Roboto-Bold.ttf', 'data/fonts/Roboto-BoldItalic.ttf']
log_maxfiles = 100
window_shape = data/images/defaultshape.png
config_version = 20

[graphics]
display = -1
fullscreen = 0
height = 600
left = 0
maxfps = 60
multisamples = 2
position = auto
rotation = 0
show_cursor = 1
top = 0
width = 800
resizable = 1
borderless = 0
window_state = visible
minimum_width = 0
minimum_height = 0
min_state_time = .035
allow_screensaver = 1
shaped = 0

[input]
mouse = mouse
%(name)s = probesysfs,provider=hidinput

[postproc]
double_tap_distance = 20
double_tap_time = 250
ignore = []
jitter_distance = 0
jitter_ignore_devices = mouse,mactouch,
retain_distance = 50
retain_time = 0
triple_tap_distance = 20
triple_tap_time = 375

[widgets]
scroll_timeout = 250
scroll_distance = 20
scroll_friction = 1.
scroll_stoptime = 300
scroll_moves = 5

[modules]

================================================================


ZenCODE

unread,
Dec 4, 2017, 3:01:27 AM12/4/17
to Kivy users support
 According to the docs here 


it's in <KIVY_HOME>/config.ini

SO perhaps insert a line into your app that prints that value? (KIVY_HONE will be one of your environment variables...)

dev3011

unread,
Dec 6, 2017, 1:31:41 PM12/6/17
to Kivy users support
I tried that but there is no key KIVY_HOME (or any other kivy key) in my environment variables (neither on my Raspberry nor on my Windows PC).

ZenCODE

unread,
Dec 6, 2017, 2:54:26 PM12/6/17
to Kivy users support
Try

    import kivy
    print(kivy.kivy_home_dir)

dev3011

unread,
Dec 6, 2017, 4:02:36 PM12/6/17
to kivy-...@googlegroups.com
You are a genius, how did you find this command? The folder was /root/.kivy which I didn't find because I couldn't access with normal user access or Filezilla.
Thanks alot!

It would be great if it could be added to the documentation that the config.ini can be in a different folder.

ZenCODE

unread,
Dec 7, 2017, 12:40:01 AM12/7/17
to Kivy users support
I wish. It is documented here: https://kivy.org/docs/api-kivy.html?highlight=kivy_home_dir#kivy.kivy_home_dir

But is pretty obscure. I only found it by doing a text search through all the source code for "kivy_home". Yes, I think we should make that clearer. Thanks for posting back. Glad it's sorted :-)
Reply all
Reply to author
Forward
0 new messages