You are not logged in.

#1 2011-02-12 11:23:55

Dieter
Member
From: Germany
Registered: 2005-10-13
Posts: 140

kdesu 'konsole -e ...' results in error message

From time to time, I use a root konsole in KDE to run some commands.
In the past, I did that with e. g.

kdesu 'konsole -e kwrite'

and it worked.

Now, I get an error message after having entered the root password "Cannot execute command konsole -e kwrite".

Bug or feature?
Any workaround possible if I want to run scripts as root in the KDE konsole?

Offline

#2 2011-02-12 17:27:36

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: kdesu 'konsole -e ...' results in error message

As far as I know kwrite is not a script but a KDE application, so you can launch it as root directly :

kdesu kwrite

Why do yo want to run it from konsole ?

Kate might be better because it has an integrated console :

kdesu kate

Last edited by berbae (2011-02-12 17:29:43)

Offline

#3 2011-02-13 12:06:15

Dieter
Member
From: Germany
Registered: 2005-10-13
Posts: 140

Re: kdesu 'konsole -e ...' results in error message

I used kwrite only as an example. Here the problems occurs with a perl I script I want to run in the console as root - the Arch update script "alunn_updatescript" which does "pacman -Syu" etc..

Offline

#4 2011-02-13 16:54:15

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: kdesu 'konsole -e ...' results in error message

Have you tried to give the entire path to the script :

kdesu konsole -e /entire/path/to/alunn_updatescript

In a konsole opened as a user, you can also get a root prompt with :

su -
<root password>
/entire/path/to/alunn_updatescript
exit

You can also create a profile which runs your script at start of konsole :

konsole --profile <name of the profile>

It is in Settings/Configure Profiles...

Profile name: Arch Update
Command: /bin/su -c /entire/path/to/alunn_updatescript
...

Last edited by berbae (2011-02-13 16:55:33)

Offline

Board footer

Powered by FluxBB