Registered Member
|
hello,
I want to create a desktop shortcut to konsole which will run as root. I enter the properties of the shortcut and in the application->advance I click 'run as' and enter root as the username. the problem is that even though konsole runs as root (and immediately asks me for the password), all the environment is set as my regular user. how can I tell kde to run this shortcut completely as root (something like the - in the su command)? thanks. OS: fedora 13, kde 4.4.5 |
Registered Member
|
Create "New link to application" on your desktop.
Under "Application"->"Command", fill out: kdesu konsole Works for me.
..............bird from paradise..............
|
Registered Member
|
thanks, but still not working. all the environment variables (like USER, LOGNAME and KDESU_USER) are set to the normal user (not root). is it not the same for you? |
Manager
|
instead of run as user root with command = konsole use "kdesu konsole" as the application command
|
Registered Member
|
that's what I did |
Manager
|
yes, but fonts, theme, colors, home, KDEHOME are root's note: QT_PLUGIN_PATH, GTK2_RC_FILES, GS_LIB, MAIL and LOGNAME are also still the normal user's Not knowing exactly what you are trying to accomplish it might be that what you need to do is open a remote shell to your computer as root or open a remote X session so that all env variables are root's |
Registered Member
|
It is working here, like expected, so in root-prompt.
..............bird from paradise..............
|
Administrator
|
Running Konsole as root is not needed. Add a shell to Konsole ( Settings > Manage Profile ) and set the shell to "/bin/bash -c 'su -'"
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Instead of opening a normal konsole and writing 'su -' to go root I was just trying to make a shortcut which will start as root. was a bit lazy I guess...
thanks, that's working well enough. |
Registered Member
|
I saw same problem when I tried to create an application launcher on the panel to run gnome-terminal.
First what didn't work: (fails to give root his proper $PATH and environment) kdesu -c gnome-terminal and what I found to work: kdesu -c "/bin/bash --login -c gnome-terminal" should work in your case or other applications that need more proper of an environment. |
Administrator
|
As previously mentioned, it is possible to simply get Konsole to execute a root shell, which ensures that Konsole itself remains part of your session.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Put as command for your shortcut:
The Konsole should then open on "Password:" and wait for input.
KDE 4.10.1 Archlinux x86_64 on both laptops
"Our life is the immortals' death" |
Registered Member
|
According to https://userbase.kde.org/Konsole you would just make a new profile, e.g. call it “root konsole”, and set the command “/bin/su -” as its shell. Done. Now all you need to select is a new “root konsole” from a running Konsole, or start the Konsole with this profile (“konsole --profile <name>”)…
|
Registered Member
|
All.
I'm attepting the opening of Konsole with 3-4 ""Sudo mode" tab sessions and have written my issues up at: https://www.linuxquestions.org/question ... ost6082123 And would appreciate any help; in finishing my BASH script to do this! Cheers! TBNK |
Registered Member
|
All, Some progress on this as 3 tabs correctly open with correct working dirs, but still not getting to "SUDO" mode on these! Update posting in the writeup link! Cheers! TBNK |
Registered users: Bing [Bot], Google [Bot], kesang, Yahoo [Bot]