Ubuntu Desktop Resetting Every Reboot

siriussteve

New Member
Joined
Jul 9, 2022
Messages
13
Reaction score
4
Credits
158
Hi,

I am new to UBUNTU / Linux and having two strange issues when using the desktop version for ubuntu...

One issue is similar to the accepted solution to https://www.linux.org/threads/desktop-settings-reset-every-login-or-restart-solved.33127/

Except... I don't seem to have the files in the /etc/skel/ directory

"it's empty".

I am using Ubuntu 18.04. LTS. Here is my df -h

udev 1.8G 0 1.8G 0% /dev
tmpfs 2.0G 1.3G 767M 62% /run
/dev/sda1 20G 5.6G 14G 29% /
tmpfs 1.8G 342M 1.5G 19% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 800M 0 800M 0% /sys/fs/cgroup
/dev/loop0 56M 56M 0 100% /snap/core18/2409
/dev/loop1 299M 299M 0 100% /snap/snapd/46
/dev/loop2 47M 47M 0 100% /snap/snapd/16292
/dev/loop3 47M 47M 0 100% /snap/snapd/16010
/dev/loop4 299M 299M 0 100% /snap/snapd/48
/dev/sda15 105M 4.4M 100M 5% /boot/efi
tmpfs 368M 16K 368M 1% /run/user/1001


I believe it has something to do with memory? But I am completely lost here and trying to move from windows to ubuntu...

Can anybody please explain how I can keep my settings for sessions when I reboot? I have tried a lot of things and was going to try a symbolic link for the files on the desktop? (after I find them HA!)

I am using both ubuntu desktop and xrdp, using these commands:

sudo apt install lubuntu-desktop

sudo apt install xrdp

I have also tried: sudo apt install ubuntu-desktop and run into the same issues...

This issue might be tied in with some memory issue that after a week or so my computer is randomly rebooting and causing everything to be lost. I have tried to mess with the /run size (there is 4 GB in RAM). It seem to be "ok" most of the time when I check it, but them it's not.

Thank you for any help!
 


Can you provide output from the following commands? They will provide info about your hard drive space and memory.
Code:
ls -la /etc/skel
Code:
free -h
Code:
df -h
 
Can you provide output from the following commands? They will provide info about your hard drive space and memory.
Code:
ls -la /etc/skel
Code:
free -h
Code:
df -h
Yes, of course! I really am not sure which direction to go here...

I can't seem to find anything in the logs...

ls -la /etc/skel
total 28
drwxr-xr-x 2 root root 4096 Jun 10 10:36 .
drwxr-xr-x 153 root root 12288 Jul 10 08:48 ..
-rw-r--r-- 1 root root 220 Apr 4 2018 .bash_logout
-rw-r--r-- 1 root root 3771 Apr 4 2018 .bashrc
-rw-r--r-- 1 root root 807 Apr 4 2018 .profile


free -h
total used free shared buff/cache available
Mem: 3.8G 166M 3.2G 968K 467M 3.5G
Swap: 0B 0B 0B

df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 2.2G 956K 2.2G 1% /run
/dev/sda1 20G 5.6G 14G 30% /
tmpfs 800M 0 800M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 300M 0 300M 0% /sys/fs/cgroup
/dev/loop0 299M 299M 0 100% /snap/snapd/48
/dev/loop1 47M 47M 0 100% /snap/snapd/16292
/dev/loop2 47M 47M 0 100% /snap/snapd/16010
/dev/loop3 299M 299M 0 100% /snap/snapd/46
/dev/loop4 56M 56M 0 100% /snap/core18/2409
/dev/sda15 105M 4.4M 100M 5% /boot/efi
tmpfs 393M 0 393M 0% /run/user/1001

I just had to reboot again this morning, and there is a huge difference in the /run directory now. (i THINK this is what's filling up? But I am not sure and there seems to be no logs for this event that I can find..) I can't ever catch is past about 65% though...

My understanding is that the tmpfs drive can be mounted for twice the amount of space you have in memory? I have tried to keep this below... and it's currently at 3700M +-


I've basically installed ubuntu, installed these two programs and can't keep my box online for more than 24 hours. I then updated my /etc/fstab to use more memory in an attempt to "fix" and it seems a little better, but not much...

Here is my fastab


LABEL=cloudimg-rootfs / ext4 defaults 0 1
LABEL=UEFI /boot/efi vfat umask=0077 0 1
none /run tmpfs defaults,size=2200M 0 0
none /dev/shm tmpfs defaults,size=800M 0 0
none /sys/fs/cgroup tmpfs defaults,size=300M 0 0
Thank you!
I Feel this is probably so basic of a thing, that i'm just missing the concept on or something
 
Last edited:
In the future, wrapping your output in code tags will greatly increase readability.

The first command, ls -la /etc/skel, verifies your skel directory is NOT empty. The files are simply "hidden", unless you use the -a parameter.

The 2nd command, free -h, shows that you have 4GB physical RAM, but you don't appear to have any swap configured. 4GB RAM is enough to get started, but will fill fast with more than a small few apps open. Once you're out of RAM, you'll likely see errors, and your system may behave erratically. You'll want to configure swap. https://www.howtogeek.com/455981/how-to-create-a-swap-file-on-linux/

The third command, df -h, shows that you have allotted a total of 20GB space for the entirety of your Linux installation, of which you have 14GB unused.

Undo all the changes you made to your fstab. Allow Linux to manage the tmpfs allocations.

Use the link I provided above to create a swap file. Based on your physical RAM, and available hard drive space, I recommend 4GB swap.
 
In the future, wrapping your output in code tags will greatly increase readability.

The first command, ls -la /etc/skel, verifies your skel directory is NOT empty. The files are simply "hidden", unless you use the -a parameter.

The 2nd command, free -h, shows that you have 4GB physical RAM, but you don't appear to have any swap configured. 4GB RAM is enough to get started, but will fill fast with more than a small few apps open. Once you're out of RAM, you'll likely see errors, and your system may behave erratically. You'll want to configure swap. https://www.howtogeek.com/455981/how-to-create-a-swap-file-on-linux/

The third command, df -h, shows that you have allotted a total of 20GB space for the entirety of your Linux installation, of which you have 14GB unused.

Undo all the changes you made to your fstab. Allow Linux to manage the tmpfs allocations.

Use the link I provided above to create a swap file. Based on your physical RAM, and available hard drive space, I recommend 4GB swap.

Ahh thanks! I think maybe I am confusing "swap" with "tmpfs"? Or because maybe I have none setup? I will investigate swap drives more and get this installed and post back here soon with updates on what is happening.
I will also investigate for hidden files.. (I did not know linux had this).
What does this mean?

Everything is GONE. When I log back into the desktop, it's like the first time logging back in. My screensaver is back to the default, my bookmarks are all gone. My desktop icons are missing. My files i've saved to the desktop are missing.

It's like basically logging in the first time after installation, every time I reboot. No changes done are saved... Even opening Chrome asks everytime if it wants to be the default browser and send statistics to the browser and all my extensions are gone.
 
Ok, I was able to create the swap drive (I need to increase to 4 GB as you suggested) that I hope resolve the computer from just stalling. I will best investigating more into the swap drive later today. My free -h now says

Bash:
free -h
              total        used        free      shared  buff/cache   available
Mem:           3.8G        168M        1.1G        968K        2.5G        3.4G
Swap:          2.0G          0B        2.0G

P.S. When things have been running a while now. the Swap usage still says 0B...

Bash:
swapon --show
NAME      TYPE SIZE USED PRIO
/swapfile file   2G   0B   -2

I have also updated it with priorty 10 and it still doesn't seem to be working

Bash:
swapon --show
NAME      TYPE SIZE USED PRIO
/swapfile file   2G   0B   10


For the /etc/skel/ directory... I still don't have those files when I add the -a parameter

Bash:
/etc/skel$ ls -a
.  ..  .bash_logout  .bashrc  .profile

Even without the computer stalling, if I ever reboot it would be nice to not loose everything.
Thank you for any help!
 
Last edited:
Ok, I was able to create the swap drive (I need to increase to 4 GB as you suggested) that I hope resolve the computer from just stalling. I will best investigating more into the swap drive later today. My free -h now says

Bash:
free -h
              total        used        free      shared  buff/cache   available
Mem:           3.8G        168M        1.1G        968K        2.5G        3.4G
Swap:          2.0G          0B        2.0G

P.S. When things have been running a while now. the Swap usage still says 0B...
Good job!

Bash:
swapon --show
NAME      TYPE SIZE USED PRIO
/swapfile file   2G   0B   -2

I have also updated it with priorty 10 and it still doesn't seem to be working

Bash:
swapon --show

NAME      TYPE SIZE USED PRIO
/swapfile file   2G   0B   10
Ok, you're being too granular, changing settings where settings don't need to be changed. Change the swap priority back to normal and allow the kernel to manage swap.

Otherwise, you did good setting up swap. If you're comfortable with a total 6GB of memory, then you can keep swap at 2GB.
For the /etc/skel/ directory... I still don't have those files when I add the -a parameter

Bash:
/etc/skel$ ls -a
.  ..  .bash_logout  .bashrc  .profile
What files are you expecting to see in this directory? The /etc/skel directory is just a template for creating a home directory for new users. If you're looking to modify configurations for your existing user account, then you need to do that in your home directory.

/etc/skel has nothing to do with why you may not be saving settings.

Even without the computer stalling, if I ever reboot it would be nice to not loose everything.
Thank you for any help!
You mentioned that you attempted some things from another thread. In the other thread, the user was using another distribution that was based on Ubuntu, and that distribution had some strange settings. So, are you using Ubuntu, or a different distribution?

Now that you've added swap, what happens with the save issue? Can you give some specific examples of your symptoms?
 
To clarify, I had you add swap, because depending on how you use your system, your symptom could be a memory issue. It's ok if swap shows 0 used; it just means the kernel hasn't needed to utilize it yet. But if you use your computer for a while, opening and closing apps, you may notice swap get used.

Can you also post output for:
Code:
cat /etc/issue
This will verify your OS distro.
 
Good job!
LOL :) Small steps .... :)
Ok, you're being too granular, changing settings where settings don't need to be changed. Change the swap priority back to normal and allow the kernel to manage swap.
Oh ok.. that's how ubuntu has seemed so far.. that things need to be Tweaked for some reason and don't work staight out of the box. Hense having to setup this swap drive in the first place..

It would be cool if Ubuntu said... WAIT: You dont' have a swap file! Swap files are needed to maek your system run awesome! Click here to learn more and press Y if you would like to begin setup for your new Swap Drive!
What files are you expecting to see in this directory? The /etc/skel directory is just a template for creating a home directory for new users. If you're looking to modify configurations for your existing user account, then you need to do that in your home directory.

Well the accepted solution for making files still there after rebooting is to edit a few files inside of this directory that tell the system to reset itsself. I don't have these files though...

----
Even with this swap drive now completed.. if I reboot. Everything is still gone. WHen I open Google Chrome, all of my Bookmarks are gone, the ad blocker is missing and if I create a simple file on my desktop it's gone too.

When I type the line to check the type of system, it says 'Ubuntu 18.04.6 LTS \n \l'
 
It's like basically logging in the first time after installation, every time I reboot.

This is what I find most concerning. Alas, I'm not able to come up with an idea as to why it is. Perhaps you've tweaked a setting too far.
 
This is what I find most concerning. Alas, I'm not able to come up with an idea as to why it is. Perhaps you've tweaked a setting too far.
Hmm,, I wish I could say that? I have tried spining up many boxes and running these commands and they all do the same thing.

Basically typing

Code:
sudo apt-get update
sudo apt-get upgrade

sudo apt install lubuntu-desktop

sudo apt install xrdp

sudo adduser xrdp ssl-cert

sudo systemctl restart xrdp



sudo systemctl status ufw
sudo ufw status verbose


sudo ufw allow 43/tcp
sudo ufw allow 53/tcp
sudo ufw allow 22/tcp
sudo ufw allow from 127.0.0.1 (YUR IP)/18 to any port 3389

sudo ufw enable


and even without doing any of the tweaks i've tried, the default behavior does this for me. The second I reboot, everything is gone. I am using XRDP (terminal services) to login (i'm not sure if that matters?)

I am logging in with user XRDP in terminal services
 
Given your experience, this is probably the silly question of the day/year/....

Do you still have a usb stick plugged in with the ubuntu os on it ?
 
Do you still have a usb stick plugged in with the ubuntu os on it ?

I thought of that one - but they have Chrome still installed when they reboot. Otherwise, that'd have been my first guess.

But, yeah... That'd have been my first guess, except Chrome isn't installed by default.
 
Given your experience, this is probably the silly question of the day/year/....

Do you still have a usb stick plugged in with the ubuntu os on it ?

No.. this one i'm testing on is for the Google Compute Instance.
I thought of that one - but they have Chrome still installed when they reboot. Otherwise, that'd have been my first guess.

But, yeah... That'd have been my first guess, except Chrome isn't installed by default.

I installed Chrome using this command line:

Code:
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable

It's just the desktop settings and everything that are not saving... Everything I install via command line seems to work fine, so kindove does point to maybe the user permissions maybe? I'm kindove stumped and have rebooted 1,000 times now LOL

It's like the desktop is being installed into a tmpfs directory, instead of a regular directory and causing the tmpfs files to be wiped on rebooting? I am really not sure and why i'm also messing with memory.
 
Last edited:
It does indeed look like a permisssions issue, but buggered if I can figure out where.

I'll spin up an instance at Google this evening and take a look around.
 
It does indeed look like a permisssions issue, but buggered if I can figure out where.

I'll spin up an instance at Google this evening and take a look around.
That would be sweet! There's not much info trying to search google for this problem... Please see post #13 for the full command line list to type.

Then use windows to open "remote desktop" using session "Xorg" and username "xrdp" and connect in... put a file on the desktop and reboot to replicate.

Here is pretty much the document I went from, which there are many with the same information - yet none describe this problem when rebooting: https://linuxize.com/post/how-to-install-xrdp-on-ubuntu-18-04/

Thank you for all of your help so far! It's so much appreciated!


UPDATE: Adding in the swap drives just made my server crash quicker. The computer didn't "reboot" or "stall" making it unaccusable but everything crashed that was open. When I open back up Chrome, the Adblock extension is still there, but says 'This extension may have been corrupted.' Click to repair.
 
Last edited:
Morning all - that link above is what I have been waiting for :)

Here is pretty much the document I went from...

But why the

lubuntu-desktop

?

Did you not follow the commands for Xfce

Code:
sudo apt update
sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils

?

Wiz
 
Then use windows to open "remote desktop" using session "Xorg" and username "xrdp" and connect in... put a file on the desktop and reboot to replicate.

I am unable to use Windows for anything - but I think I can now make a guess as to at least part of the problem.

When you're logging in with XRDP you're likely logging in as a guest/user without much in the way of permissions. That explains the resetting to default conditions.
 

Members online


Top