Jump to content

Editing a file in su mode


Recommended Posts

So far in 2009.0 I haven't found a way to edit a file after SU'ing to root.

 

If I try to start konqueror from a menu entry as root with "konqueror --profile FileManager" it doesn't come up and I get the following error in a popup dialog box: "file:///root/.kde4/share/apps/konqueror/autosave/owned_by." That error keeps popping up until I kill the process.

 

If I try to execute kwrite from a shell after suing to root i get:

"kdeinit4: preparing to launch /usr/lib/kde4/libexec/klauncher

klauncher(19584) kdemain: No DBUS session-bus found. Check if you have

started the DBUS server.

kdeinit4: Communication error with launcher. Exiting!"

 

At the moment, the only thing I can think of doing is to log on as root, and I don't want to have to do that.

 

i think it is all related to that kde4 virus.

 

 

[moved from Software by spinynorman]

Link to comment
Share on other sites

Normally, you would edit a file by using:

 

kdesu appname filename

 

replacing appname with kedit or kwrite for example, and filename with /home/username/filename or whatever it's called and wherever it's located. Alternatively, you can open a console window and then type su to get to root and then type:

 

kwrite filename

 

or the path to the filename included, and then kwrite would launch in your X environment. There's still no need to logon as root. You could even do:

 

kdesu konqueror

Link to comment
Share on other sites

fyi after doing:

 

su
ln -s /usr/lib/kde4/libexec/kdesu /usr/bin/kdesu
chmod +x /usr/bin/kdesu

 

and changing the menu entry to: kdesu konqueror --profile FileManager (trying both run as a different user of root and alsy trying with unchecking that box) and konqueror does not come up.

 

If I put konqueror --profile FileManager within quotes I get the following:

 

The requested operation could not be completed

Cannot Initiate the file Protocol

Technical Reason: Unable to Launch Process

Details of the Request:

URL: file:///usr/share/doc/HTML/index.html

Protocol: file

Date and Time: Thursday 16 October 2008 16:45

Additional Information: Cannot talk to klauncher: Not connected to D-BUS server

Description:

The program on your computer which provides access to the file protocol could not be started. This is usually due to technical reasons.

Possible Causes:

The program which provides compatibility with this protocol may not have been updated with your last update of KDE. This can cause the program to be incompatible with the current version and thus not start.

You may have encountered a bug in the program.

Possible Solutions:

Update your software to the latest version. Your distribution should provide tools to update your software.

Contact your appropriate computer support system, whether the system administrator, or technical support group for further assistance.

 

It almost acts like there is more than one konqueror on my system. No combination of anything seems to let me bring up konqueror as root.

 

(I also couldn't post this in Opera. It ignored clicking on the Add Reply button I'm beginning to think that 2009.0 is just saturated with land mines.)

Link to comment
Share on other sites

Why stop at using nano, vim has syntax highlighting ;)
I don't need syntax highlighting for config files, only for programming. nano is good when you want a simple, quick text editor. vim when you need something more robust (and possibly have a death wish ;) ).
Link to comment
Share on other sites

I was having the same problem.

 

# nano /etc/fstab

bash: nano: command not found

[root@localhost kieth]# kdesu kwrite

bash: kdesu: command not found

[root@localhost kieth]# kwrite /etc/fstab

kdeinit4: preparing to launch /usr/lib/kde4/libexec/klauncher

klauncher(18239) kdemain: No DBUS session-bus found. Check if you have started the DBUS server.

kdeinit4: Communication error with launcher. Exiting!

 

Then I tried su - like Greg said, and it worked.

Link to comment
Share on other sites

Then I tried su - like Greg said, and it worked.

Yep, got that part working. What I can't get working is to bring up konqueror in supervisor mode with a specific profile. (like a filemanager one) I would like to have this as a menu entry, which is how I have had it in previous releases. I actually have konqueror on my menu twice, one instance for normal usage and one instance for supervisor mode (root) usage.

Link to comment
Share on other sites

Here I thought Mandriva included nano by default :-/ - sorry, didn't know they didn't :)

 

Interestingly, Debian (not known as a particularly user-friendly distro) not only includes nano in its base system installation but also sets it up as the default system editor (in the current "testing" release).

 

Jim

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...