Skip to main content

How to retain your GUI settings in Kodi

When you restore Kodi or copy your existing Kodi userdata folder to another device it will always default the guisettings.xml, always. Even if you drop your previous settings into Kodi via a network folder, it will still reload it to default upon restart. This is because the guisettings.xml can't be written into the userdata folder when Kodi is running.

To prevent this from happening, overwrite the guisettings.xml with SSH using two programs. One to stop and start the Kodi process and one to copy over the backed up guisettings.xml file that contains all your GUI goodness.

1) Download and install these:
-- PUTTY
-- WINSCP

2) Turn on your sharing/ssh and whatever else...settings. Just make it so your Kodi machine can communicate with your network on all channels. Don't set any additional passwords. Leave it all default to make life easy.

3) Find and copy your guisettings.xml file (usually storage/.kodi/userdata/guisettings.xml). Put it on your desktop or somewhere where you can grab it easily.

4) Open up PUTTY.
A. SSH using PUTTY to the IP Address (Find it in your Kodi settings or your PC settings of the network folder) of your media center
[username: root, Password: openelec (if you use openelec) otherwise, it's blank or whatever shows in your ssh settings in Kodi]
B. Type "systemctl stop kodi.service" - Your screen will go black! This is normal. If it doesn't, something didn't connect.

5) Open WinSCP. Same IP, same username, same password. Note: If you get a popup about caching a host key, just say no for now.
A. Once logged in, navigate to the appropriate folder (usually storage/.kodi/userdata/) and drop your EDITED BACKUP guisettings.xml. You will get a popup asking if you want to overwrite the file. You'll know they're different, because the file sizes will be different. If they're the same, you probably copied the same or default file.
B. Hit the refresh button OR file/refresh to stick the file.

6) Hop on back to PUTTY and type in the following command "systemctl start kodi.service"

Your box will now reset. At this time, you'll either be back on your current skin or Confluence. If it's Confluence, change it back to your skin, and see if your old settings are there.

If you're using the Kodi/XBMC Backup Add-on, it will do 99.9% of the work for you as it creates a file called guisettings.xml.restored during the RESTORE process. In this case, stop Kodi using PuTTy as listed in 4B, deleted the file guisettings.xml and rename guisettings.xml.restored to guisettings.xml and then restart Kodi outlined in step 6. This is the method I used when copying my Openelec instance from a Zotac ZBOX to an Android powered G-Box Q.

Of course, if you are doing this on an Android box, there is no need to stop and start the Kodi process as you can simply close the Kodi app and then edit the guisettings.xml files located in Android/data/org.xbmc.kodi/files/.kodi/userdata/ with ES File Explorer after you've turned on 'Show Hidden Files' and 'Show check boxes' in the display options under settings. Note you'll also need a mouse or keyboard as controlling an app like ES File Explorer with an Android TV remote is neigh on impossible.

http://forum.kodi.tv/showthread.php?tid=218566&pid=1968291#pid1968291

UPDATE 3rd July 2016: If you are running a custom skin like I am (Xonfluence), you'll also need to backup and restore the settings.xml for that modded skin too. In my case, the settings.xml file is located in \\ip.address.of.your.pi\Userdata\addon_data\skin.xonfluence

Comments

Post a Comment

Popular posts from this blog

Using ESPEasy with Home Assistant via MQTT

Preface: I've just started playing around with Home Assistant on a Raspberry Pi and exploring the world of MQTT to control devices on the network. Learning curve is a bit steep but worth the effort as MQTT is very fast. The hardware and software tools I'm using are as follows: 2 x Sonoff relay units 2 x NodeMCU Boards ESPEasy firmware (must be version 121 or above as that contains the MQTT 'retain' flag option. Home Assistant software on Raspberry Pi2 MQTT Test Software: PC: MQTT.fx Android: MQTT Dashboard

My Notepad++ tricks when editing YAML files in Home Assistant

To comment out a whole section in one go: Highlight the text you want to comment out and use CTRL + Q. If you do this at the start of a line, it will only comment that line. CTRL + Q is toggle mode (comment on/off). CTRL + K will allow you to add multiple comments one after the other.

How to check what entities are filling up your Home Assistant database

If you use the Home Assistant MariaDB add-on, this tip will show you how to query the database so see what Home Assistant entity states are triggering the most, filling up your database. What were going to do: Install the phMyAdmin add-on for MariaDB. Query the MariaDB database. See what entity state changes have the most action. Paste the code below into the SQL query box:  select entity_id,count( * ) from states group by entity_id order by count ( * ) desc; And if you're using the internal home-assistant_v2.db instead, you can use the SQLite Web add-on to achieve the same thing.