View previous topic :: View next topic |
Author |
Message |
ex-LFSler n00b

Joined: 09 Jul 2002 Posts: 21
|
Posted: Thu Dec 29, 2016 2:01 am Post subject: Cant start program via .desktop file in konsole as root |
|
|
hi.
My problem since several months is, that i cant start programms on the desktop if they are defined to start in terminal AND as user root.
without terminal, program starts as root.
But not with the combination "start in terminal + as user root"
for example .desktop file:
(some settings skipped)
this works:
Code: |
[Desktop Entry]
Exec=dolphin
Terminal=false
X-KDE-SubstituteUID=true
X-KDE-Username=root
|
this works also:
Code: |
[Desktop Entry]
Exec=alsamixer
Terminal=true
X-KDE-SubstituteUID=false
X-KDE-Username=
|
but this dont work:
Code: |
[Desktop Entry]
Exec=alsamixer (or any other program/script)
Terminal=true
X-KDE-SubstituteUID=true
X-KDE-Username=root
|
Anybody knows why or even where to look?
if i click on the icon just nothing happens.
system: kde-plasma/plasma-desktop-5.8.3
thanks.
Last edited by ex-LFSler on Thu Dec 29, 2016 9:47 pm; edited 1 time in total |
|
Back to top |
|
 |
Roman_Gruber Advocate

Joined: 03 Oct 2006 Posts: 3806 Location: Austro Bavaria
|
Posted: Thu Dec 29, 2016 8:18 pm Post subject: |
|
|
don t you need permissions for that.
something to ask you for the passphrase=> like sudo does? There were ways and software to grand su permissions
i doubt it work that way, I asssume you did that. ordinary plain user with user permissions, which runs an icon, which says suddenly another user with another user permissions.
--
I do not use kde
my way. example:
shell => su => geany /var/log/messages
open geany with that file so i can edit it for example.
This works since a very very long time without fuss. REgardless of which terminal emulator i use in X |
|
Back to top |
|
 |
ex-LFSler n00b

Joined: 09 Jul 2002 Posts: 21
|
Posted: Thu Dec 29, 2016 9:04 pm Post subject: |
|
|
yes, of course. usually kdesu opens and ask for root password.
but not in my case when i need to execute a program in konsole with root privilegs. |
|
Back to top |
|
 |
Roman_Gruber Advocate

Joined: 03 Oct 2006 Posts: 3806 Location: Austro Bavaria
|
Posted: Thu Dec 29, 2016 9:36 pm Post subject: |
|
|
ex-LFSler wrote: | yes, of course. usually kdesu opens and ask for root password.
but not in my case when i need to execute a program in konsole with root privilegs. |
i do not get your work style.
Open terminal
type su
enter passphrase
open program
where is the issue please?
--
Do you want to run a script with runprivileges?
do you want to run a software like an editor with root privileges? |
|
Back to top |
|
 |
ex-LFSler n00b

Joined: 09 Jul 2002 Posts: 21
|
Posted: Thu Dec 29, 2016 9:46 pm Post subject: |
|
|
sorry if i didnt explain it more clear.
i mean if i click on an *.desktop file on my kde/plasma desktop nothing happens.
of course if i start manually konsole and type su and then the command it works, but thats not what i want to do everytime. |
|
Back to top |
|
 |
Roman_Gruber Advocate

Joined: 03 Oct 2006 Posts: 3806 Location: Austro Bavaria
|
Posted: Fri Dec 30, 2016 2:03 am Post subject: |
|
|
how about a script? e.g. bash script which runs with that desctop icon... |
|
Back to top |
|
 |
|