Start a program for a user as root, with process belonging to user
I'm trying to to start a process while running as root. But I want the program to run on a users desktop and have the process belong to the user and not root.
I've been doing something like this:
xauth merge /home/$USER/.Xauthority
this will start the program alright, but the process belongs to root and not to $USER. How do I get this process to be owned by the $USER?