xrdp.sh error

gromit4x4
Posts: 12
Joined: Wed Feb 29, 2012 3:33 pm

xrdp.sh error

Postby gromit4x4 » Fri Sep 21, 2012 2:25 pm

Hi, I have installed xrdp via yum. I can start the service manually and it is working well but I want xrdp to run at boot

when I do:

Code: Select all

/sbin/chkconfig --add xrdp.sh
I get the message "error reading information on service xrdp.sh: Bad file descriptor"

Any ideas on how best to resolve this?
Thanks

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: xrdp.sh error

Postby bigfoot65 » Fri Sep 21, 2012 2:52 pm

chkcfg is only for init scripts. You will need to create a cron job to start it on boot.

Do this (may need to be root user):

Code: Select all

/usr/bin/crontab -l > apache-crontab;
Create a file called apache-crontab and add this text to it:
@reboot /path/to/xrdp.sh
Finally do this:

Code: Select all

/usr/bin/crontab apache-crontab; rm -rf apache-crontab;
This will ensure it starts on reboot.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

gromit4x4
Posts: 12
Joined: Wed Feb 29, 2012 3:33 pm

Re: xrdp.sh error

Postby gromit4x4 » Fri Sep 21, 2012 11:30 pm

Thanks Bigfoot, I was following the instructions from here:
http://www.xrdp.org/index.php?option=co ... s&Itemid=7

Te path of xrdp is: /etc/init.d/xrdp, to run I have to ssh to the HDA and then:

Code: Select all

su -c '/etc/init.d/xrdp start'
I will give your method a try, thanks again.
gromit.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: xrdp.sh error

Postby bigfoot65 » Sat Sep 22, 2012 6:26 am

That's not what you indicated in your initial post. Since that is an init script, do this as root user:

Code: Select all

chkconfig xrdp on
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

gromit4x4
Posts: 12
Joined: Wed Feb 29, 2012 3:33 pm

Re: xrdp.sh error

Postby gromit4x4 » Sat Sep 22, 2012 6:58 am

Thanks Bigfoot, that last code worked fine.

I didn't mean to confuse, perhaps I should of mentioned the path in the original post. Sorry.
I meant to say, to run manually I do

Code: Select all

su -c '/etc/init.d/xrdp start'
which works.

But when I try to run automatically at boot using

Code: Select all

/sbin/chkconfig --add xrdp.sh
I get the error

I still don't understand why

Code: Select all

/sbin/chkconfig --add xrdp.sh
did not work and gave the error.

Regards
gromit.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: xrdp.sh error

Postby bigfoot65 » Sat Sep 22, 2012 7:18 am

No problem. When enabling an init script to start on boot, you only do as I instructed in the previous post.

There is no .sh on the end of the init script name. There is no need to run the script as

Code: Select all

su -c
as that is telling it to run as root. The chkconfig will do that automatically, so following the guidance I posted will be sufficient.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 67 guests