Announcement

Collapse
No announcement yet.

Multiple desktops disappear after reboot

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

  • wizard10000
    replied
    Originally posted by sanwablo View Post
    Just one last question for you. In Gtk environments I usually installed laptop-mode-tools, preload and powertop. Do they also work in KDE or are there any other alternatives that are preferable?
    Those tools work just as well in KDE as they do elsewhere. I don't think you'll find anything within KDE that'll match their function.

    On laptop-mode-tools, preload and powertop I have three different answers, depending on which machine we're talking about. I have two laptops and a netbook - only the newest laptop runs KDE, the other two run fluxbox.

    The newest laptop (i7-4800MQ) can't use laptop-mode-tools without disabling other processor features and runs from an SSD, which IMO wouldn't really benefit much from preload. I don't use powertop because I'm working on a project to use a udev rule to switch the CPU governor from performance to powersave and back depending on whether the laptop is plugged into mains power or running on battery. You can do this easily with laptop-mode-tools and I miss having that capability.

    The other laptop (i7-740QM) can use laptop-mode-tools and powertop but I don't use them as I've turned the machine into a fileserver and it's locked at lowest CPU frequency - also no requirement to run it on battery because it's a server now preload is not necessary as the machine runs 24/7 and unless it's running backups for the other machines on the network or someone is watching a movie on one of the TVs it just sits idle. Only headless laptop I know of - display is not used This is the laptop I had configured to switch CPU governors depending on power source - sadly, laptop-mode-tools is no longer necessary. I also had laptop-mode-tools enabling and disabling my swap partition (need a place to hibernate if the battery goes flat) and experimented with shutting off two of four processor cores while on battery which *almost* worked. It was stable transitioning from two cores to four four cores to two 95% of the time but in this context 95% ain't good enough.

    The netbook runs lean - it's an old Atom N270 with 2GB of RAM and it needs all the help it can get but it does get the job done - as long as the job is casual websurfing or managing the other two machines on the network over SSH.. Even though this laptop has a small SSD I do use preload because the netbook only uses SATA1 and although it has ridiculously fast seek times it doesn't move data any faster than a normal hard drive. On laptop-mode-tools and powertop this netbook has processor locked at max frequency, so no real requirement. Like I said, it needs all the help it can get

    cheers -
    Last edited by wizard10000; Jan 05, 2017, 06:24 PM. Reason: wanted to use different words :)

    Leave a comment:


  • sanwablo
    replied
    Originally posted by jlittle View Post
    • Text editors can do more than that.* I get mine to append a timestamp to the backup copy name, and move it off to a backups directory automatically, but a better approach is to do automatic check-ins to a VCS like git; then there's lots of tools to help sort things out just when you need lots of help. Good editors have plug-ins to support this.
    • Another approach altogether, not as fine grained as using as the above, but protects against other screw-ups, is use btrfs with an automatic snapshot tool like snapper. I've been surprised twice since I started using btrfs last year how cool it was to be able to get back files just as they were at convenient times in the past. (Using the Trash protects against rm file but not echo blah > file.)
    Cheers jlittle, that's also very good advice!

    Leave a comment:


  • sanwablo
    replied
    Originally posted by oshunluvr View Post
    Root action service menu is in the KDE store here.

    Download the file, unzip it somewhere, install "ruby" the run the install script.
    Thanks, it works like a charm!

    Leave a comment:


  • sanwablo
    replied
    Originally posted by wizard10000 View Post
    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
    Thank you ever so much wizard1000 for taking the time to explain all this! Now I understand that root has its own profile, and it's not just myself with more permissions.

    It seems in Kubuntu the different theming has already been done for me, as you can see below, but now I can edit it as I see fit

    Click image for larger version

Name:	Screenshot_20170105_121536.jpg
Views:	1
Size:	47.9 KB
ID:	643441

    Just one last question for you. In Gtk environments I usually installed laptop-mode-tools, preload and powertop. Do they also work in KDE or are there any other alternatives that are preferable?
    Last edited by sanwablo; Jan 05, 2017, 09:35 AM.

    Leave a comment:


  • jlittle
    replied
    Originally posted by wizard10000 View Post
    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...
    • Text editors can do more than that.* I get mine to append a timestamp to the backup copy name, and move it off to a backups directory automatically, but a better approach is to do automatic check-ins to a VCS like git; then there's lots of tools to help sort things out just when you need lots of help. Good editors have plug-ins to support this.
    • Another approach altogether, not as fine grained as using as the above, but protects against other screw-ups, is use btrfs with an automatic snapshot tool like snapper. I've been surprised twice since I started using btrfs last year how cool it was to be able to get back files just as they were at convenient times in the past. (Using the Trash protects against rm file but not echo blah > file.)

    *OS's can too... VMS, anyone?

    Leave a comment:


  • oshunluvr
    replied
    Root action service menu is in the KDE store here.

    Download the file, unzip it somewhere, install "ruby" the run the install script.

    Leave a comment:


  • wizard10000
    replied
    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

    Leave a comment:


  • oshunluvr
    replied
    Yes, your profile file needs to be owned by you.

    Leave a comment:


  • sanwablo
    replied
    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!

    Leave a comment:


  • sanwablo
    replied
    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.

    Leave a comment:


  • wizard10000
    replied
    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.

    Leave a comment:


  • wizard10000
    replied
    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!

    Leave a comment:


  • sanwablo
    replied
    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.

    Leave a comment:


  • oshunluvr
    replied
    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.

    Leave a comment:


  • oshunluvr
    replied
    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.

    Leave a comment:

Users Viewing This Topic

Collapse

There are 0 users viewing this topic.

Working...
X