LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How do i create a KDE desktop icon which runs a program using a different group-id? (https://www.linuxquestions.org/questions/linux-general-1/how-do-i-create-a-kde-desktop-icon-which-runs-a-program-using-a-different-group-id-453180/)

jcosenzo 06-09-2006 10:13 AM

How do i create a KDE desktop icon which runs a program using a different group-id?
 
How do i create a KDE desktop icon which runs a program using a different group-id?

My default NIS group is "user" and I want a Konsole to launch from a KDE desktop icon with a NIS group of "mech"

Here's what I've done:

KDE Desktop > RMB > Create New > Link to Application
[General] "Konsole-mech-group"
[Execute] > Command: konsole -geometry 1200x400+0-82 --workdir /project/users/jim
[OK]


KDE Desktop > RMB over the icon titled: "Konsole-mech-group" > Properties
[Permissions]
Access Permissions:
rwx for User, Group
r-x for Others
Ownership:
[User] jim
[Ownership] mech
Is there a way to do this? Or am I barking up the wrong tree?

I now believe the [Permission} tab is for setting the access rights to the icon file itself in ~/Desktop/Konsole-mech-group and does not give you the abilty to run the program with a different group-id.

Is there anyone out there who has done this?

bigrigdriver 06-09-2006 01:41 PM

As user, add the application (or a link to it) to your desktop. Default permissions will be jim/users.

Open a console window, and find the desktop link: something like /home/jim/Desktop/<application>. Use the command chgrp to change the group (you may have to su to root). Chgrp mech /home/jim/Desktop/<application>.

Check the properties: ls -l /home/jim/Desktop/<application>, and you should see:
User Jim
Group mech

jcosenzo 06-09-2006 02:43 PM

bigrigdriver: Thanks for your quick reply.
But I think you missed my point... or maybe I wasn't clear enough.

The question is: "How do I create a KDE desktop icon which will run a program as user "jim" and as group "mech" when my default group-id is 'user' ?".

What you are describing is simply how to change the grpid on the ~/Desktop/<appliaction> file to "mech"

David the H. 06-10-2006 09:44 AM

In the shortcut's properties > application > advanced options menu there's a box for setting it to run as a different user. I don't know about changing the group though. Perhaps a shell script?


All times are GMT -5. The time now is 03:12 PM.