VMware Cloud Community
Lam_bui
Contributor
Contributor

Running program as current user, NOT root

Hi,


I am having some trouble running a program as current user, NOT root. I know when running the installer, it required root privileges in linux, but I need a certain program to be able to run it under the current user. 


What I need is to install vcrun6 and vcrun2008 using winetricks, logic below, but I keep getting this


' X server not running and $DISPLAY is not set correctly'  error. ${userid} is my current user, not root.

<runProgram>
<explanation>Installing vcrun</explanation>
<program>winetricks</program>
<programArguments>-q vcrun6 vcrun2008</programArguments>
<runAs>${userid}</runAs>
</runProgram>

Labels (1)
0 Kudos
2 Replies
michiel_dhont
Enthusiast
Enthusiast

Can you tell me if it's possible to run the command manually without sudo?

0 Kudos
Lam_bui
Contributor
Contributor

Hi Michiel,

Yes, I can run  or ' winetricks -q vcrun6 vcrun2008 or '  without sudo and it does install correctly.

I believe the problem is because the installer is running as root and I want to run the program as standard user, somehow it doesn't work?...Below is what the command looks like from install logs.

localhost:~ # su ${userid} -c  or ' winetricks -q vcrun6 vcrun2008 or '

0 Kudos