Announcement

Collapse
No announcement yet.

Multiple desktops disappear after reboot

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Multiple desktops disappear after reboot

    I just got a new laptop and am now transitioning from Xfce to KDE.

    I installed Kubuntu 16.04 on it a few days ago, along with all updates (sudo apt-get update && sudo apt-get dist-upgrade).

    The multiple desktop configuration (4 desktops, 2 rows) is reset to default every time I reboot the system. Is there any way of fixing this, like e.g. directly editing the file where that configuration is stored?

    #2
    Sounds 'maybe' like you have a ownership problem within your home directory.

    Open a konsole and verify you are in your user home directory (you should be). Then, and only then, type:

    Code:
    sudo chown -R [I]yourusername:yourusername [/I]*
    Replace yourusername with your login username. Press Enter to execute the command.

    Example: If your login username is bigjohn, the command would be sudo chown -R bigjohn:bigjohn *

    Exit the konsole and logout/reboot.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Originally posted by Snowhog View Post
      Sounds 'maybe' like you have a ownership problem within your home directory.

      Open a konsole and verify you are in your user home directory (you should be). Then, and only then, type:

      Code:
      sudo chown -R [I]yourusername:yourusername [/I]*
      Replace yourusername with your login username. Press Enter to execute the command.

      Example: If your login username is bigjohn, the command would be sudo chown -R bigjohn:bigjohn *

      Exit the konsole and logout/reboot.
      Hi Snowhog, thanks for your reply. I'm afraid that didn't work - the Virtual Desktop configuration was reset after restart. Do you know where those settings are stored? Are they somewhere in ~/.config?

      Comment


        #4
        Thinking aloud, I wonder if he's loading a saved session and if that would override his virtual desktop settings?

        This particular setting is stored in ~/.config/kwinrc - I'd look at file permissions and see if the file is actually being changed.

        Hope this helps -
        we see things not as they are, but as we are.
        -- anais nin

        Comment


          #5
          Thanks wizard1000, you were right - the file was owned by root and therefore locked.

          I changed the ownership to user and now settings are persistent.

          Should I leave it as is or is it advisable to set the ownership back to root?

          Comment


            #6
            Originally posted by sanwablo View Post
            Thanks wizard1000. You were right - the file is owned by root and therefore locked. I tried editing it using sudo kate ~/.config/kwinrc in the following way but it didn't work either:

            ...Is there something else I am missing?
            Possibly. Does root still own the file? As root, right-click the file and change user and group ownership to your user account.

            Snowhog's chown fix should have resolved this. Again, here it is - as a normal user -

            Code:
            cd ~
            sudo chown -R yourusername:yourusername *
            That oughtta fix it. Good luck

            edit: Missed your other question. root shouldn't own *anything* in your home directory. all files in your home directory should be owned by you
            Last edited by wizard10000; Jan 04, 2017, 08:42 AM.
            we see things not as they are, but as we are.
            -- anais nin

            Comment


              #7
              Don't edit it, fix the ownership.

              1) Do a listing and see what in your home is owned but root:

              ls -la ~ |grep root

              2) Change anything you find to your ownership (except .rpmdb if it's there). I can't imagine why Showhog's command didn't work unless you entered it wrong somehow. But this should fix it:

              sudo chown yourusername:yourusername ~/.config/kwinrc

              Repeat for all other files.

              3) STOP USING SUDO WITH GRAPHICAL PROGRAMS! This is what is causing this kind of issue. You just did it again with "sudo kate...". If you keep doing this, you will continue to have this kind of problem. ONLY use KDESUDO with a GUI program. Instead of "sudo kate" use "kdesudo kate" sudo is for terminal only use. kdesudo is for graphical programs. An even better solution is to install the root-actions service menu for Dolphin. Then when you must use root level to edit a file (not often), use the Root Actions menu options to edit the file. This will prevent you from forgetting and messing things up again.

              Please Read Me

              Comment


                #8
                Originally posted by sanwablo View Post
                Thanks wizard1000, you were right - the file was owned by root and therefore locked.

                I changed the ownership to user and now settings are persistent.

                Should I leave it as is or is it advisable to set the ownership back to root?
                As far as I know nothing in your home directory should be owned by root except the .rpmdb folder and maybe one or two other things, but I can't imagine what else.

                Please Read Me

                Comment


                  #9
                  Yes, it's fixed now. I had done it through dolphin before but now I've re-entered Snowhog's chown fix just in case Really loving KDE now.

                  Comment


                    #10
                    Originally posted by sanwablo View Post
                    Yes, it's fixed now. I had done it through dolphin before but now I've re-entered Snowhog's chown fix just in case Really loving KDE now.
                    Excellent. Have fun!
                    we see things not as they are, but as we are.
                    -- anais nin

                    Comment


                      #11
                      Originally posted by oshunluvr View Post
                      3) STOP USING SUDO WITH GRAPHICAL PROGRAMS! This is what is causing this kind of issue. You just did it again with "sudo kate...". If you keep doing this, you will continue to have this kind of problem. ONLY use KDESUDO with a GUI program. Instead of "sudo kate" use "kdesudo kate" sudo is for terminal only use. kdesudo is for graphical programs. An even better solution is to install the root-actions service menu for Dolphin. Then when you must use root level to edit a file (not often), use the Root Actions menu options to edit the file. This will prevent you from forgetting and messing things up again.
                      oshunluvr is right - kdesudo for graphical applications.

                      One other thing that I do - root's ~/.bashrc is one character different than the one in my home directory; it changes the prompt color from green to red. For graphical applications, root's color for the window background is slightly different than it is for my normal user, so I can pretty much always tell when the application is being run under the root account. This is really helpful when I have multiple dolphin windows open or something distracts me and I forget where (or who) I am on the machine

                      If you want to set a slightly different background color for root's stuff you can either edit a color scheme manually and install it or run systemsettings as root; for KDE4 it'd be

                      Code:
                      kdesudo systemsettings
                      and for Plasma5 it'd be

                      Code:
                      kdesudo systemsettings5
                      Changes you make to themes or colors as root only impact applications run *as* root.

                      On the ~..bashrc thing, Debian is a little different than Kubuntu, but the default color of Debian's bash prompt is green. You'd copy your ~/.bashrc into /root and change the first PS1 line so instead of [01;32m] which tells bash to display the prompt in green, you'd change it to [01;31m] which changes prompt color to red for root only.

                      Not sure what color the default Kubuntu prompt is, but that's how I do it. Red prompt for terminal, slightly pink background for graphical apps if I'm running as root. Might be worth considering

                      edit: clickable screenshot



                      cheers -
                      Last edited by wizard10000; Jan 04, 2017, 09:59 AM.
                      we see things not as they are, but as we are.
                      -- anais nin

                      Comment


                        #12
                        Originally posted by oshunluvr View Post
                        Don't edit it, fix the ownership.

                        1) Do a listing and see what in your home is owned but root:

                        ls -la ~ |grep root

                        2) Change anything you find to your ownership (except .rpmdb if it's there). I can't imagine why Showhog's command didn't work unless you entered it wrong somehow. But this should fix it:

                        sudo chown yourusername:yourusername ~/.config/kwinrc
                        You were right, the problem was solved by fixing the ownership, not simply editing the file. My output is:

                        Code:
                        drwxr-xr-x  3 root  root    4096 Dec 31 20:02 ..
                        -rw-r--r--  1 root  root     655 Jan  2 19:15 .profile
                        Should I change the ownership of ~/.profile/ folder then?

                        Originally posted by oshunluvr View Post
                        3) STOP USING SUDO WITH GRAPHICAL PROGRAMS! This is what is causing this kind of issue. You just did it again with "sudo kate...". If you keep doing this, you will continue to have this kind of problem. ONLY use KDESUDO with a GUI program. Instead of "sudo kate" use "kdesudo kate" sudo is for terminal only use. kdesudo is for graphical programs. An even better solution is to install the root-actions service menu for Dolphin. Then when you must use root level to edit a file (not often), use the Root Actions menu options to edit the file. This will prevent you from forgetting and messing things up again.
                        Thank you very much for that, I had no idea! I used sudo with graphical programs in Unity and Xfce before and I didn't seem to have any major problems because of it.

                        Do you know what's the package name for root actions in Kubuntu?
                        Last edited by sanwablo; Jan 04, 2017, 10:17 AM.

                        Comment


                          #13
                          Originally posted by wizard10000 View Post
                          One other thing that I do - root's ~/.bashrc is one character different than the one in my home directory; it changes the prompt color from green to red. For graphical applications, root's color for the window background is slightly different than it is for my normal user, so I can pretty much always tell when the application is being run under the root account. This is really helpful when I have multiple dolphin windows open or something distracts me and I forget where (or who) I am on the machine -
                          That's a great idea!

                          Comment


                            #14
                            Yes, your profile file needs to be owned by you.

                            Please Read Me

                            Comment


                              #15
                              Originally posted by sanwablo View Post
                              That's a great idea!
                              I can't take credit for the GUI background color, Linux Mint does that (or at least it used to) but the bash prompt thing is all mine - I was trying to customize a bash prompt using one of those web tools that help you edit the PS1 line in .bashrc (PS1 tells bash how to display the prompt) and it dawned on me that if my .bashrc had a green prompt and root's had a red one that might save my backside sometime

                              Enjoy Kubuntu - If you have a minute or two I wanna do a bit about user profiles as I think if I spend 15 minutes half an hour typing it might save you months headbanging: Every user that is assigned a login shell has a profile that can be configured, even root. Every configuration file in your home directory can be applied to the root account if root runs that application and if you'd like to save some configurating steps.

                              protip: Don't copy your entire configuration to root; most of the things in there will never be run by that account - just take what you need

                              Now normally the only GUI things you're going to be running as root are a package manager, a file manager and a text editor (and possibly systemsettings) so if you like the way those applications are configured you can certainly create a .config directory under /root if it doesn't already exist and copy any configuration file from your home directory to the same relative location in root's home - for example, if you want root's dolphin to use exactly the same configuration you've become accustomed to as a normal user you'd copy ~/.config/dolphinrc over to /root/.config/dolphinrc and the two profiles would run exactly the same but can be edited separately. Keeps me from having to configure a file manager and text editor twice

                              Application configurations in a user's home directory override system default configurations in /etc in almost every case, So for dolphin, muon, and maybe kate and synaptic or gdebi-kde make them work the way that works best for you and then copy the configurations over to root's account if it makes sense to you.

                              Theming and colors are a little different; although I can and do use lxappearance or gtk-chtheme as root to manipulate GTK+ applications all theming in KDE is done through systemsettings (KDE4) or systemsettings5 (Plasma5). You can run systemsettings as root to change themes, colors and so on and those changes will apply to applications run as root only. The only difference in my user and root themes is as mentioned, the window background color is tinted a little bit pink - just enough that you notice it. System default themes are in /usr/share and that's what root uses if there's no other theme configured.

                              Sorry for being long-winded but if you want KDE to really shine sometimes you have to color outside the lines a little

                              Last, my text editors are all set to make a backup copy of a file before I start messing with it. This doesn't help me much if I have to make multiple edits to the file, so you can do is in dolphin, copy and paste the file over itself. dolphin doesn't like this even a little bit and will ask you if you want to overwrite or rename - just type in a new filename for the backup copy and you can edit with impunity

                              cheers - and sorry for giving a class, but when I see someone's interest sparked I kinda like to encourage it. Then I get carried away
                              we see things not as they are, but as we are.
                              -- anais nin

                              Comment

                              Working...
                              X