Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

We are using Ubuntu Server 12.04.2 to host virtual devices in our office. Our boss has written a program for Ubuntu that logs all activity and time spent at a single workstation to monitor misusage of company assets.

He has tasked me with getting this program to for users in the aduio group (a group we created for receptionists and assistants).

I have tried adding the command to the end of .profile (eg #!/bin/bash confidential -host "ip" -name $USER) the programs starts in a kiosk mode; only this program loads, there is no access to anything else as this user. When the program is started manually from the workstation it executes without a problem.

How do I delay the startup and allow the essentials to load before running this program?

share|improve this question
    
I've just messed around with the English in this post to make it a bit quicker to the point and a little more structured. If you think I've broken it, let me know. –  Oli Jun 5 '13 at 14:46
    
Also, I don't really understand your #!/bin/bash confidential... example. Sticking that halfway through ~/.profile will break it. –  Oli Jun 5 '13 at 14:48
    
What if you run it like confidential -host "ip" -name $USER &? –  Eric Carvalho Jun 5 '13 at 14:48

1 Answer 1

I would keep this out of the user's homedir. That's just begging for people to hack it to bits. That part is simple enough though, you can just add a new file to /etc/X11/Xsession.d/ (eg /etc/X11/Xsession.d/90-confidential with the content:

if [[ `groups | grep aduio` ]]
then
    exec confidential -host "ip" -name $USER &
fi

This isn't immune to being worked around. It's still running as the user (so they can terminate it) and they could butcher their X startup (because it's all run as the user). You probably could lock all that down but it's a big step.

share|improve this answer
    
Thank you Oli so much for such quick response. I will go and try out this solution right now, and provide feed back shortly. –  KISmith211 Jun 5 '13 at 16:19
    
Thank you too Jorqe Castro for correcting my bad grammar. any help is much appreciated this has had me stumped for a while now –  KISmith211 Jun 5 '13 at 16:20
    
I have just attempted to add the file and initiate a reboot to see if the changes would produce the desired effect but I had no luck. I typed your script precisely (making necessary substitutions) and saved it with a similar name as well. Do I have to sudo chmod +x to make it executable? should I have saved the script file as a .sh or .bash? should I have began the script with #!/bin/bash or #!/bin/sh? is there anything implied that I may have missed in your description? –  KISmith211 Jun 5 '13 at 16:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.