Announcement

Collapse
No announcement yet.

Copy home to flash drive - it's made my asthma go crazy

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

    #16
    I know in the past I know that I forgot to use kdesudo and just used sudo. From your explanation I am going to guess that using just sudo is part of the problem. I am guilty of doing the same thing with Kate.
    Going forward it is going to become a habit to kdesudo and not sudo.

    Originally posted by wizard10000 View Post
    Someone mentioned it in another thread of yours but installing the root actions service menu may help.

    Trying to remember to use kdesudo is admirable; I thought I'd share *why* using sudo for graphical applications is a no-no so maybe it'll help you remember.

    sudo without any arguments *does not* inherit root's environment, it uses yours. So - when you use

    Code:
    sudo dolphin
    to mess around in your home directory since root's environment is not inherited dolphin writes files owned by root into *your* home directory.

    Remember in the other thread when you had a buncha kate configuration owned by root in your home directory? That's a direct result of running kate under sudo - chances are it was called from 'sudo dolphin' since you mentioned you'd never run kate.

    You can make sudo use root's environment instead of yours by running 'sudo -i' or 'sudo -H' but if you're gonna have to remember to do that you might as well just use kdesudo

    So -

    Code:
    sudo dolphin
    is a no-no under any circumstances.

    Code:
    kdesudo dolphin
    or

    Code:
    sudo -i dolphin
    or

    Code:
    sudo -H dolphin
    or

    Code:
    kdesu dbus-launch dolphin
    will work, but you should never edit files in your home directory as root. I'm sure you already know this, just explaining why things are the way they are

    And if you change any settings (like dolphin or kate) using sudo those changes will be written into *your* home directory and you end up with files owned by root in ~

    hope this helps -

    Comment


      #17
      Why are you running Dolphin using kdesudo or sudo anyway? You don't it to manage your home folder and if you were managing root partition it's best to use command line.
      systemd is not for me. I am a retro Nintendo gamer. consoles I play on are, SNES; N64; GameCube and WII.
      Host: mx Kernel: 4.19.0-6-amd64 x86_64 bits: 64 compiler: gcc v: 8.3.0 Desktop: Trinity R14.0.8 tk: Qt 3.5.0 info: kicker wm: Twin 3.0 base: Debian GNU/Linux 10

      Comment


        #18
        Originally posted by NickStone View Post
        ...and if you were managing root partition it's best to use command line.
        Why, exactly?
        we see things not as they are, but as we are.
        -- anais nin

        Comment


          #19
          Personal preference is to use an app with a GUI. Way back in the DOS days I was very adept at using commands from the keyboard. Heck I never thought windows would catch on with the people but now I am addicted at the mind numbing ease of an icon in the GUI. With multitasking at my job --- spending time typing a command line is ---- well ---- taking time from other tasks.

          Originally posted by wizard10000 View Post
          Why, exactly?

          Comment


            #20
            Originally posted by urdrwho5 View Post
            Personal preference is to use an app with a GUI. Way back in the DOS days I was very adept at using commands from the keyboard. Heck I never thought windows would catch on with the people but now I am addicted at the mind numbing ease of an icon in the GUI. With multitasking at my job --- spending time typing a command line is ---- well ---- taking time from other tasks.
            Actually I was asking NickStone why it was best to use a command line as root

            It's your machine, you can do things any way you want. I have custom .desktop files to launch dolphin, systemsettings, synaptic and lxappearance as root. If a GUI is available you might as well use it

            cheers -
            we see things not as they are, but as we are.
            -- anais nin

            Comment


              #21
              Yeah I know you were asking NickStone. I was just giving my preferences and personal choice. Now you have said something that interests me and that is your custom .desktop that launches Dolphin as root. Is it just like the old windows batch file?

              Originally posted by wizard10000 View Post
              Actually I was asking NickStone why it was best to use a command line as root

              It's your machine, you can do things any way you want. I have custom .desktop files to launch dolphin, systemsettings, synaptic and lxappearance as root. If a GUI is available you might as well use it

              cheers -

              Comment


                #22
                Originally posted by urdrwho5 View Post
                Yeah I know you were asking NickStone. I was just giving my preferences and personal choice. Now you have said something that interests me and that is your custom .desktop that launches Dolphin as root. Is it just like the old windows batch file?
                Not even - they're more like a Windows shortcut with a different command line

                If you look in /usr/share/applications you'll see the default .desktop files for every application you have installed. They're just text files and easily edited, but *don't edit the originals*. You can copy as many as you like to ~/.local/share/applications and the .desktop files you have in there will override a default .desktop file that has the same name. Hell, you can copy all of them if you want - which is normally what I do then just make my edits in my home directory.

                Soooo... you copy dolphin's desktop file from /usr/share/applications to ~/.local/share/applications and edit away. The only thing you really have to do is change the command line in the .desktop file and rename the thing - so where it says

                Code:
                Exec=dolphin
                You'd change it to

                Code:
                Exec=kdesudo dolphin
                You can change the description if you want and of course, you must rename the desktop file so it doesn't conflict with the default dolphin.desktop

                Have fun with that

                edit: You can also create .desktop files from scratch using KDE's menu editor (kmenuedit). If you right-click the 'K' icon on your panel you'll see an option that says "Edit Applications". You can have all kinds of fun with that
                Last edited by wizard10000; Jan 17, 2017, 11:37 AM. Reason: wanted to use different words :)
                we see things not as they are, but as we are.
                -- anais nin

                Comment


                  #23
                  to answer the question the command
                  Code:
                  sudo rsync -arAX /home/<username> <mounted device>
                  this will copy your files to the mounted device and will preserve the premisisons as well as extended attributes.
                  Mark Your Solved Issues [SOLVED]
                  (top of thread: thread tools)

                  Comment


                    #24
                    Some of the problem was / is finding the name of the external mounted flash drive.

                    Originally posted by sithlord48 View Post
                    to answer the question the command
                    Code:
                    sudo rsync -arAX /home/<username> <mounted device>
                    this will copy your files to the mounted device and will preserve the premisisons as well as extended attributes.

                    Comment


                      #25
                      open dolphin and click on the device in the places widget (on the left) and look at the address bar (if you dont see it editable right click on the bar and select edit)
                      Mark Your Solved Issues [SOLVED]
                      (top of thread: thread tools)

                      Comment


                        #26
                        Originally posted by urdrwho5 View Post
                        Some of the problem was / is finding the name of the external mounted flash drive.
                        Here's an easy way - in a terminal session do this:

                        Code:
                        lsblk
                        we see things not as they are, but as we are.
                        -- anais nin

                        Comment

                        Working...
                        X