Hi, I’m new openSUSE and while I’m trying to figure out how things work there is one thing that I couldn’t find an answer to about kdesu command.
For instance, if I changed folders to /etc/X11 and I want to edit xorg.conf I need to run the following command:
kdesu kwrite /etc/X11/xorg.conf
while I’d expect to run the following:
kdesu kwrite xorg.conf
but without the full path it opens an xorg.conf file in a folder somewhere in my home folder (but not directly under /home/user/).
I assume this is normal, but is there a way around it? If I want to edit several files under the same folder I’d rather not have to type out the full path to the each of the files.
Kinda, but remember that kdesu is starting a new environment as another
user (‘root’ in your case) so being exact is not only a good idea, it may
be required:
kdesu kwrite pwd/xorg.conf
Good luck.
Untitled No4 wrote:
> Hi, I’m new openSUSE and while I’m trying to figure out how things work
> there is one thing that I couldn’t find an answer to about kdesu
> command.
>
> For instance, if I changed folders to /etc/X11 and I want to edit
> xorg.conf I need to run the following command:
>
> Code:
> --------------------
> kdesu kwrite /etc/X11/xorg.conf
> --------------------
>
>
> while I’d expect to run the following:
>
> Code:
> --------------------
> kdesu kwrite xorg.conf
> --------------------
>
>
> but without the full path it opens an xorg.conf file in a folder
> somewhere in my home folder (but not directly under /home/user/).
>
> I assume this is normal, but is there a way around it? If I want to
> edit several files under the same folder I’d rather not have to type out
> the full path to the each of the files.
>
> Thanks in advance.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
Did you realy expect that kdesu or kwrite or whoever invented that you need the xorg.conf inside /etc/X11 and not one inside /bin or elsewhere?
You could use a terminal as root and then you cd to the directory you want to be. Then you could use vim or any other CLI tool to let loose on the names found within your working directory.
For different ways do do things as root (some ways are easier to use in some circumstances then others) see: SDB:Login as root - openSUSE
I didn’t expect kdesu to to guess anything hence why I wrote AFTER changing directories to /etc/X11. Perhaps that’s too much to expect but since kdesudo does just that I thought that perhaps somehow kdesu might work the same way.
Thanks for the other suggestions – none worked for me but it was still worth-while asking.
I also tried compiling kdesudo but it doesn’t work the same way it does in other distributions, but the questions was me wanting to know whether I missed anything.
That is clearly stated in the link I provided above. Leaving out the - is a security risk. This is btw illustrated by Untitled_No4. He (as root) is editing another file then he thought he would do.
> Code:
> --------------------
> su -
> --------------------
i had a ‘big’ discussion with others in one of these fora here within
the last month or so…trying to persuade them use the dash when they
wanted to be root…
and, i got such a coordinated stonewall about how wrong i was that i
finely decided to just be quiet and let them do it any way they
want…even if wrong…oh, i think it was a new how-to…i don’t
remember exactly…
@palladium
It is good for my health I did not notice that thread because it is full of awfull things :(.
Sorry, I will not start to venture into it from this thread, it being utterly off topic. The only thing is, why is such a howto not even mentioning the SDB I showed above? The noob will have a difficult time to understand all the well meant contradictionary advice here.
And if my advice is wrong, please do tell me - I will defer to more knowledgeable judgement on this one.
But I’ve been told that the reason you need gnomesu and kdesu (apart from when something outright won’t run in the first place) is to avoid the cross-contamination of permissions / ownership caused by running something as one user but in another’s environment. And I believe that I’ve been told that that isn’t an issue with an ‘su -’, ergo that if it runs, it’s fine.
@Confuseling
You are right. The link is dead. Worse, the whole SDB is dead >:(
I saw that they went over to new systems, new wiki software, etc. Let us hope everything will come back in due time, else a lot of errort will be lost.
Before we hyjack somebody else’s thread I will go over to the other thread, read it carfully and comment on it tomorrow. Is that OK?
(might be later on the day tomorrrow, I have things to do)