Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cant start program via .desktop file in konsole as root
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
ex-LFSler
n00b
n00b


Joined: 09 Jul 2002
Posts: 19

PostPosted: Thu Dec 29, 2016 2:01 am    Post subject: Cant start program via .desktop file in konsole as root Reply with quote

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
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Thu Dec 29, 2016 8:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
ex-LFSler
n00b
n00b


Joined: 09 Jul 2002
Posts: 19

PostPosted: Thu Dec 29, 2016 9:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Thu Dec 29, 2016 9:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
ex-LFSler
n00b
n00b


Joined: 09 Jul 2002
Posts: 19

PostPosted: Thu Dec 29, 2016 9:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Fri Dec 30, 2016 2:03 am    Post subject: Reply with quote

how about a script? e.g. bash script which runs with that desctop icon...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum