[Solved] Reset Xfce to its default Salix state.

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
Papasot
Donor
Posts: 247
Joined: 3. May 2015, 18:37
Location: Patras, Greece

[Solved] Reset Xfce to its default Salix state.

Post by Papasot »

Hi fellow Salix users.

Yesterday a neighbor brought his computer to me "to fix it". He runs Salix 14.2 (I installed it some time ago). The problem was that Xfce won't start. Switching to console reveals X couldn't start because of a segmentation fault.
This is not a Salix bug or whatever. The user is not experienced on GNU/Linux, and I doubt he even knows what "sudo" is, but nevertheless he managed to somehow break Xfce. I don't know what he did, but anyway I had to fix it.
I switched to init 3, created a new user, and tried to startx from there; everything works. So I guessed something is wrong in user's ~/.config/xfce4. I renamed that directory, forcing Xfce to start with its default configuration, and indeed it works. This verifies that the user managed to mess up his ~/.config/xfce4.

What I want now is to reset Xfce to its default Salix state. Removing or renaming ~/.config/xfce4 resets Xfce to its default state, which is what you would see if you installed Xfce using Slackware or another third-party package; Salix logo, Salix menus, and several application icons are missing.
I'm sure the original Salix Xfce configuration is stored somewhere. My first guess was /usr/xdg. I tried to copy /usr/xdg/xfce4 to ~/.config/xfce4, but this is equivalent to removing ~/.config/xfce4: it resets Xfce to its default state. So my question is, where Salix stores its default configuration for Xfce? I tried to look up for files found in the default ~/.config/xfce4 created for a new user, but I couldn't find those elsewhere (my guess is they are compressed somewhere and Salix decompress them to ~/.config/xfce4 each time a new user is created).

P.S.: Apparently, I could take a backup of user's personal files, delete the user, and re-create it. This would do the trick, but since I had to bother with someone else's fault, at least I should learn something from it.
Last edited by Papasot on 7. Sep 2017, 19:48, edited 1 time in total.
A pleasant detail in this forum: several people pick a picture of their pet as their avatar. Who am I to do otherwise? ;-)
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: Reset Xfce to its default Salix state.

Post by djemos »

Log in as user who has problem running xfce and type

Code: Select all

cp -R /etc/skel/* ~/
Log out and login again.
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: Reset Xfce to its default Salix state.

Post by gapan »

You could even use (gtk)usersetup to delete the user, while not deleting the user files and then create the same user again. But yes, copying the files you want from /etc/skel is enough.
Image
Image
User avatar
Papasot
Donor
Posts: 247
Joined: 3. May 2015, 18:37
Location: Patras, Greece

Re: Reset Xfce to its default Salix state.

Post by Papasot »

djemos wrote:Log in as user who has problem running xfce and type

Code: Select all

cp -R /etc/skel/* ~/
Log out and login again.
So, THAT is where Salix stores its default user setup. I wonder why I couldn't find files similar to the ones in a new user's ~/.config/xfce4 when I did a system-wide search though; I should find them in /etc/skel/.config/xfce4. Anyway, worked - thank you djemos.
gapan wrote:You could even use (gtk)usersetup to delete the user, while not deleting the user files and then create the same user again. But yes, copying the files you want from /etc/skel is enough.
I realized usersetup does not delete the home directory of a user if you delete the user itself (somehow I assumed the opposite). But I realized that too late. The user's issue was already fixed, and I was just deleting a test user. Thank you for the tip, gapan.
A pleasant detail in this forum: several people pick a picture of their pet as their avatar. Who am I to do otherwise? ;-)
Post Reply