WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: rdesktop freezes affter automatically launch.  (Read 2370 times)

Offline AndreBento

  • Newbie
  • *
  • Posts: 3
rdesktop freezes affter automatically launch.
« on: April 06, 2010, 10:30:47 AM »
Good day to all,
I am trying to construct to a pxe server using tinycore as image. I obtained to construct a tinycore.gz personalized with rdesktop in that. .xsession loads rdesktop and this does not initiate therefore no IP was attributed the NIC. To decide this I call dhcp.sh (/etc/init.d/dhcp.sh) before rdesktop in .xsession (some suggestion of as to improve this) and now rdesktop initiates but if I not to move mouse during boot the same got frozen on screen.
Anyone can help?

(I am trying to improve my english)

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: rdesktop freezes affter automatically launch.
« Reply #1 on: April 06, 2010, 10:38:43 AM »
It's not obvious to tell what's happening there... can be some race condition between the window manager or the mouse config and rdesktop. Did you try to use "sleep 10 && rdesktop IP" instead of just rdesktop? When it waits 10 seconds you can try not to move the mouse and wait for the hang up and move the mouse and tell some difference.
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline AndreBento

  • Newbie
  • *
  • Posts: 3
Re: rdesktop freezes affter automatically launch.
« Reply #2 on: April 06, 2010, 10:48:36 AM »
i put that im my .xsession:

/etc/init.d/dhcp.sh
sleep 5
/usr/local/bin/rdesktop -f xxx.xxx.xxx.xxx

i gonna try now like that

/etc/init.d/dhcp.sh
sleep 10
/usr/local/bin/rdesktop -f xxx.xxx.xxx.xxx
sleep 5

or

/etc/init.d/dhcp.sh
sleep 10 && /usr/local/bin/rdesktop -f xxx.xxx.xxx.xxx
sleep 5

« Last Edit: April 06, 2010, 11:00:18 AM by AndreBento »

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: rdesktop freezes affter automatically launch.
« Reply #3 on: April 06, 2010, 12:04:51 PM »
Did you check whether the udhcpc process is running with or without your call of /etc/init.d/dhcp.sh ? Usually the dhcp client is always running and there's no need to start it by hand (btw. .xsession isn't the right place for that either, you should run it from /opt/bootlocal.sh - as I stated before, IF it is necessary at all).

Other suggestions:
1.) Implement something like an ifconfig check instead of just "hoping" you will have a network connection, that looks like
Code: [Select]
IP=xxx.xxx.xxx.xxx
if [ -n "$(ifconfig | grep inet | cut -d':' -f2 | cut -d' ' -f1 | grep 192)" ];then
  rdesktop $IP 1>>/tmp/rdp.log 2>&1
else
  echo "Don't have network." >> /tmp/rdp.log
  sleep 10
fi
(you can of course wrap this into a loop, replace the 192 with the network prefix you will have, just for debugging)  

The reason is that rdesktop doesn't have great debugging capabilities... it just hangs up if the connection is lost or some other network error occurs. Look at the /tmp/rdp.log if somethings going wrong. And don't use -f for debugging as it only makes that part harder ;-)
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline AndreBento

  • Newbie
  • *
  • Posts: 3
Re: rdesktop freezes affter automatically launch.
« Reply #4 on: April 06, 2010, 12:38:21 PM »
I will try some of those today and reply when done.