WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Problem with the i3-wm configuration  (Read 2008 times)

Offline ElboronII

  • Newbie
  • *
  • Posts: 4
Problem with the i3-wm configuration
« on: December 06, 2019, 09:47:42 AM »
Hello members of the TCL forum,

this is my first TCL installation and I have encountered the problem,
if I edit my ~/.i3/config files, they are resetted after rebooting.
Is there any way to solve this?
Is this a bug or a feature and I just don't understand why the system is doing this?
If you need more details, don't be afraid of sending me an E-Mail

Glad about every answer,
ElboronII

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
Re: Problem with the i3-wm configuration
« Reply #1 on: December 06, 2019, 10:19:14 AM »
Hi ElboronII
Welcome to the forum. The first thing you want to do is learn about persistence. I recommend you read this fine book:
http://tinycorelinux.net/corebook.pdf
and spend some time browsing the Wiki:
http://wiki.tinycorelinux.net/wiki:start

You may also find some useful answers here:
http://tinycorelinux.net/faq.html

Did you use the  tc-install  utility or a third party installer? If you used a third party installer it will likely cause problems.

Run the command:
Code: [Select]
showbootcodesand post the results.

Offline ElboronII

  • Newbie
  • *
  • Posts: 4
Re: Problem with the i3-wm configuration
« Reply #2 on: December 06, 2019, 10:40:37 AM »
Thank you very much, I didn't know that a system could be inpersistent. I decided to use a persistant home opt directory.
Yours sincerely,
ElboronII

Offline ElboronII

  • Newbie
  • *
  • Posts: 4
Problem continues existing
« Reply #3 on: December 06, 2019, 11:11:06 AM »
The Problem still exists.
I made my home partition persistent and rebooted,
I can now create file without getting deleted every single reboot
Except one file.
And this is the i3-WM configuration file.
This seems to be a TCL-i3 specific bug but I am not 100% sure.

Any help would be welcome.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
Re: Problem with the i3-wm configuration
« Reply #4 on: December 06, 2019, 11:37:54 AM »
Hi ElboronII
See if these files provide any clues:
Code: [Select]
/usr/local/share/i3/files/i3.config
/usr/local/tce.installed/i3
The file in  /usr/local/tce.installed/  is a script that runs everytime  i3  gets installed (I.e every time you boot).

Offline ElboronII

  • Newbie
  • *
  • Posts: 4
Re: Problem with the i3-wm configuration
« Reply #5 on: December 06, 2019, 11:50:33 AM »
Yes, the /usr/locale/tce.installed/i3 file contains a script
which overwrites the file everytime.
The new problem is, I cannot edit this file because the file
is in a "read-only Filesystem". The Filesystem is of course mounted writable.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
Re: Problem with the i3-wm configuration
« Reply #6 on: December 06, 2019, 01:36:13 PM »
Hi ElboronII
Yes, the /usr/locale/tce.installed/i3 file contains a script
which overwrites the file everytime. ...
Actually, the script tests for the existence of the file and copies it if it does not exist:
Code: [Select]
tc@E310:~/x$ cat squashfs-root/usr/local/tce.installed/i3
#!/bin/sh
echo "i3" > /etc/sysconfig/desktop

read USER < /etc/sysconfig/tcuser

if [ ! -d /home/"$USER"/.i3 ]; then
  mkdir -p /home/"$USER"/.i3
  chown -R "$USER":staff /home/"$USER"/.i3
fi

if [ ! -f /home/"$USER"/.i3/config ]; then
  cp /usr/local/share/i3/files/i3.config /home/"$USER"/.i3/config
  chown -R "$USER":staff /home/"$USER"/.i3
fi

if [ ! -d /etc/i3 ]; then
  ln -s /usr/local/etc/i3 /etc/i3
fi
tc@E310:~/x$

Thank you very much, I didn't know that a system could be inpersistent. I decided to use a persistant home opt directory.
Yours sincerely,
ElboronII
After making  /home  and  /opt  persistent did you remember to remove those entries from  /opt/.filetool.lst  and then
run a backup? If you click on the  Control Panel  icon you'll find there is a  Backup/restore  tool for making those changes.