You are not logged in.
Pages: 1
Hi,
I am trying to understand the difference in how su and sudo work.
I tried to run dolphin as root to add a mount point at /media/drivex
with su :
I type dolphin at the prompt
and I get this error
<unknown program name>(2348)/: KUniqueApplication: Cannot find the D-Bus session server: "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
<unknown program name>(2347)/: KUniqueApplication: Pipe closed unexpectedly.
dolphin doesnt work
however,
when I use sudo dolphin from a regular user,
dolphin works even though I get a number of errs
Error: "/var/tmp/kdecache-myx" is owned by uid 1000 instead of uid 0.
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kbuildsycoca4.so
kbuildsycoca4 running...
this is repeated a few times, as though it keeps retrying.
1.Anyway why does su not work when sudo does?
2. So when does one use su vs sudo?
3. I did this yesterday and was able to add a mnt point for my esata drive. Today, I had to do it again. The mount point had disappeared. what may have happened?
thanks
Last edited by myxolam (2009-10-16 11:27:15)
Offline
I can't give you any answers, but what if you tried
$ kdesu dolphin
?
Offline
Terminal apps: su, sudo
GUIs: kdesu, gksu
Offline
I didnt realize that ... still have a lot to learn here.
I did a little research based on your replies and it appears using su with graphical apps is really bad.
Something about iceauthority being compromised... anyway I didnt understand it but its good to know the right way to do it.
I will try this when I get on the linux computer.
thanks guys for the answers.
Offline
The only reason I use "su" (as "su -") is to create a new, clean session, just as logging in with that user.
Using "sudo", or "su" without the dash creates a new environment inheriting the session variables from the current user, thus GUI apps can work fine (as they have inherited the $DISPLAY, $DBUS_SESSION_BUS_ADDRESS and other variables used by X applications).
Anyway, as an alternative to "su", you could use "sudo -i".
Another difference which is applicable to Ubuntu and maybe Arch, is that "su"ing to root you are asked for the root password, while using "sudo" you are asked for your password, not the "root" one.
no masters to rule us, no gods to fool us
Offline
thanks eazy,
that adds even more to the "to learn" list.
So many little nuances of the commands. I've got a long way to go.
Offline
Pages: 1