You are not logged in.

1

Friday, July 16th 2004, 1:52am

Customizing KDE?, Please help me....

Hi guys at KDE Forum. I'm a newbie of mandrake 10 and I also use KDE 3.2 desktop in my system, I love it. I have a little question and I hope you guys can help me. I found in this address

Quoted

http://www.steidler.net/uptime/
, some information about creating a " File manager super user" icon for your KDE menu. With this icon you will invoque a file manager utility (ex. konqueror) with root priviledges. Doing this allows you to manipulate files in all possible ways. But there is a problem when you locate the file you want to edit, is there any way you can "double click" the file and open it in "Kwrite" with root priviledges so you can edit the file if need to. Because right now if you click the file it give you an error. I enjoy very much the GUI of KDE and that's why I want to customize it as much as possible. Thank you all.

Javi
Mandrake distro newbie

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Friday, July 16th 2004, 9:54am

Right click the file, choose "open with" and use
kdesu kwrite
as the command

Cheers,
_
Qt/KDE Developer
Debian User

3

Friday, July 16th 2004, 11:22pm

I create a shortcut in my Kicker menu that when I click it the "Run as root "window pops up. Then I type my root password and Konqueror open The GUI. I can do everything in there now but when I click a file (ex. lilo.conf), A windows appear with an error That says;

KDE init could not launch 'kwrite'

I want this shortcut to work some way, that I don't have to navigate to the service menu or open the kconsole and run kwrite with root priviledges. I want to be able to open a file in "kwrite" from within Konqueror application using the same root priviledges by double clicking the file. I want to know the command or the switch I have to add to the configuration discuss on the address I posted at the begining of this thread.. If this isn't possible, instead I will like to add in the service menu, when you right click a file, a service like this "Kwrite su", so when you click it will prompt you to enter the root password and then open the file in question with root priviledges in kwrite to perform editing.

Javi
Mandrake distro newbie

4

Saturday, July 17th 2004, 12:54am

instead of simply kwrite, use /path/to/kde/bin/kwrite, because normally kwrite is not in the PATH in root (because root is not a normal user)

i do not know for mandrake, but you can use locate kwrite to find the full path
I understand why you're confused. You're thinking too much. -- Carole Wallach

5

Saturday, July 17th 2004, 1:35am

Hi damir, you're saying that I have to find the path for "kwrite". Well I did a search of kwrite and it come up with this path;
/usr/bin/
/usr/share/apps/

Okay now. What should I do to add the "kwrite su" entry in the service menu pointing to this path with root priviledges. Oh! by the way, can you help me with my original problem.I did this in Menudrake to view/manipulate files:

General
Title: Konqueror SU Mode
Long Title:
Command: kfmclient openProfile filemanagement

Extended
Attribute: kde_opt
Value: \\nEncoding=UTF-8\\nX-KDE-SubstituteUID=true

Attribute: kde_filename
Value: konquerorsu

But the problem is I can not open an editor from within konqueror in Super User Mode. Do you have any idea how to fix this or where can I find an answer.

Javi
Mandrake distro newbie

6

Saturday, July 17th 2004, 2:28pm

Quoted

Original von jmr0311

Hi damir, you're saying that I have to find the path for "kwrite". Well I did a search of kwrite and it come up with this path;
/usr/bin/
/usr/share/apps/


so the kwrite is located in /usr/bin? ( try running /usr/bin/kwrite in the console )

if i e.g. run [code:1]
[damir@Asteraceae /]$ locate kwrite
/opt/kde/bin/kwrited
/opt/kde/bin/kwrite
/opt/kde/bin/kwriteconfig
/opt/kde/lib/kde3/kwrited.la
/opt/kde/lib/kde3/kwrited.so
/opt/kde/lib/kde3/kwrite.la
/opt/kde/lib/kde3/kwrite.so
/opt/kde/lib/libkdeinit_kwrited.la
/opt/kde/lib/libkdeinit_kwrited.so
/opt/kde/lib/libkdeinit_kwrite.la
/opt/kde/lib/libkdeinit_kwrite.so
/opt/kde/share/doc/HTML/de/kwrite
...
[/code:1]

so i have /opt/kde/bin/kwrite instead of your line - see what i mean? (i do not know mandrake and the paths they use for kde)

Quoted

Original von jmr0311


Okay now. What should I do to add the "kwrite su" entry in the service menu pointing to this path with root priviledges.


what do you mean by "service menu"? if you want to associate some command with a filetype, have a look at the mime .desktop files or use the controlcenter for this

Quoted

Original von jmr0311


Oh! by the way, can you help me with my original problem.I did this in Menudrake to view/manipulate files:

General
Title: Konqueror SU Mode
Long Title:
Command: kfmclient openProfile filemanagement

Extended
Attribute: kde_opt
Value: \\nEncoding=UTF-8\\nX-KDE-SubstituteUID=true

Attribute: kde_filename
Value: konquerorsu

But the problem is I can not open an editor from within konqueror in Super User Mode. Do you have any idea how to fix this or where can I find an answer.


i do not know exactly what this Menudrake is and how it works, but if your paths are set right, you can simply run
[code:1]
kdesu kwrite
[/code:1]
to run kwrite as root ... so simply add this line as command for an entry to have it

i think you were searching for this

good luck - and post the errors/output if you have trouble with something
I understand why you're confused. You're thinking too much. -- Carole Wallach

7

Saturday, July 17th 2004, 2:31pm

ok, i figured out what this menudrake is ...

use this command, to run konqueror as root:

[code:1]
Command: kdesu kfmclient openProfile filemanagement
[/code:1]

instead of your

[code:1]
Command: kfmclient openProfile filemanagement
[/code:1]

:-)

is this what you wanted?
I understand why you're confused. You're thinking too much. -- Carole Wallach

8

Saturday, July 17th 2004, 4:08pm

Hi damir, thank you for hanging in there for me and trying to help me.I run the command "locate kwrite and this is what the screen in terminal says:

Quoted

[jmr0311@home-desktop jmr0311]$ locate kwrite
warning: locate: could not open database: /var/lib/slocate/slocate.db: No such file or directory
warning: You need to run the 'updatedb' command (as root) to create the database

Then I decide to try typing /usr/bin/kwrite and a window of kwrite pops open. Sorry, I call "service menu", the menu that open when you right click a file(menu window). What i was thinking was if I can't get my original problem to work, I was thinking if I could add a new entry to that window, (ex. "kwrite su"), to open that file as a root so I can edit it.

I did add the instruction you toll me to my menudrake, but still the problem is not being corrected. In my system with the menudrake before I add the "kdesu" to the command line konq was opening as a root fine. The problem is that, ones the konq window is open I browse to a location (ex. /etc/) looking for a file(ex. lilo.conf) that I want to edit( you need root rights to edit this file ),remember I'm in konq as 'root, then I double click the file hoping that is going to be open in 'kwrite' , but then is when I get the error of;

Quoted

KDE init could not launch 'kwrite'

This is what I will like to figure out, How to make this two (konq and kwrite) work in conjuction using the Menudrake I create it. I will like to find the commands or switches I need to add so they can work together.

Javi
Mandrake distro newbie

9

Saturday, July 17th 2004, 5:22pm

Quoted

Original von jmr0311

Hi damir, thank you for hanging in there for me and trying to help me.I run the command "locate kwrite and this is what the screen in terminal says:

Quoted

[jmr0311@home-desktop jmr0311]$ locate kwrite
warning: locate: could not open database: /var/lib/slocate/slocate.db: No such file or directory
warning: You need to run the 'updatedb' command (as root) to create the database

Then I decide to try typing /usr/bin/kwrite and a window of kwrite pops open. Sorry, I call "service menu", the menu that open when you right click a file(menu window). What i was thinking was if I can't get my original problem to work, I was thinking if I could add a new entry to that window, (ex. "kwrite su"), to open that file as a root so I can edit it.

I did add the instruction you toll me to my menudrake, but still the problem is not being corrected. In my system with the menudrake before I add the "kdesu" to the command line konq was opening as a root fine. The problem is that, ones the konq window is open I browse to a location (ex. /etc/) looking for a file(ex. lilo.conf) that I want to edit( you need root rights to edit this file ),remember I'm in konq as 'root, then I double click the file hoping that is going to be open in 'kwrite' , but then is when I get the error of;

Quoted

KDE init could not launch 'kwrite'

This is what I will like to figure out, How to make this two (konq and kwrite) work in conjuction using the Menudrake I create it. I will like to find the commands or switches I need to add so they can work together.

Javi


about locating files:
you must create a db for locate to work - run updatedb as root (this can take some time the first time)

about kwrite out of konqueror as root i suspect that the PATH's in root are not set right to (find and) run kwrite or other kde-apps as root

if you open a konsole as root (kdesu konsole), can you run kwrite in it? i don't know the default PATH's in mandrake

have also a look at
http://www.mandrakeusers.org/index.php?showtopic=14501
I understand why you're confused. You're thinking too much. -- Carole Wallach

10

Saturday, July 17th 2004, 6:08pm

Thanks ones again;

1-

Quoted

if you open a konsole as root (kdesu konsole), can you run kwrite in it? i don't know the default PATH's in mandrake

To answer you question, Yes. When I run kconsole as a root, I type kwrite and a window that says on the header " untitled-kwrite" opens up.

2-

Quoted

about kwrite out of konqueror as root i suspect that the PATH's in root are not set right to (find and) run kwrite or other kde-apps as root

How can I verify if this is the case so I can corrected it.

3)

Quoted

about locating files:
you must create a db for locate to work - run updatedb as root (this can take some time the first time)

I will run the command updatedb as instructed it, just to eliminate the possibility of this interfering with what I'm trying to do. Also I will take a look to that reference you post it. I will let you know if anything comes up.

Javi
Mandrake distro newbie