Link to home
Start Free TrialLog in
Avatar of hke72
hke72Flag for Norway

asked on

xrdp will not start from script (Fedora 11)

I have computers meant for classrooms. I am sending them away and therefore want xrdp to work perfectly.

My problem is that using a script writing "su -c 'service xrdp start'" does not start the service, but if I log in as root and then write "service xrdp start" it starts.

I would prefer it if people could just run a script, write the root password and start the service.

What is the difference between running a script with su -c and actually logging in as su?
Avatar of medvedd
medvedd

Try to put a full path for service:

su -c '/sbin/service xrdp start'
Avatar of hke72

ASKER

I tried that. No difference :(
I get xrdp is dead, but PID-file exists
sesman runs though!?
It could be a missing X-server. Some programs need an X-display even though they are not really showing anything. xvfb solved these kind of problems for me.

Try http://en.wikipedia.org/wiki/Xvfb
Avatar of hke72

ASKER

But it seemes strange that a program is missing when the only difference between working and not is:
A: log in as su and write service xrdp restart - it works
B: Run a script with one line su -c 'service xrdp restart' - it does not work.
ASKER CERTIFIED SOLUTION
Avatar of medvedd
medvedd

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hke72

ASKER

WOW :) Added sleep 3 and it worked like a charm :) Thank you!