Posts: 1
Joined: Mon Jun 24, 2013 4:58 pm

Autostart rdesktop

Mon Jun 24, 2013 5:18 pm

I am having partial success getting the RPi running Raspbian Wheezy to run rdesktop automatically at startup. The only part I haven't figured out is- When I log out of Remote Desktop the session doesn't autostart again. I am dropped to my X windows environment.
Here is the procedure I have used so far-
#1 Autologin
pi@raspberrypithinclient ~ $sudo nano /etc/inittab
Scroll down to:
1:2345:respawn:/sbin/getty 115200 tty1
and change to
#1:2345:respawn:/sbin/getty 115200 tty1
Under that line add:
1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1
and save changes
#2 Install remote desktop (rdesktop)
pi@raspberrypithinclient ~ $sudo apt-get install rdesktop
#3 Autostart X at startup
In Terminal:
pi@raspberrypithinclient ~ $sudo nano /etc/rc.local
Scroll to the bottom and add the following above exit 0:
save the file
pi@raspberrypithinclient ~ $su -l pi -c startx
#4 Autostart rdesktop when X display starts
In Terminal:
pi@raspberrypithinclient ~$ sudo nano /etc/xdg/lxsession/LXDE/autostart
Scroll to the bottom and add @rdesktop -x lan –f -z –P –d domain server
(where domain and server are replaced with my actual domain and server names)
save the file.

This process works perfectly. The pi starts and brings me directly into a RDP environment. The only problem is when I log off. I am dropped back to my X Window. According to the page ...If a line begins with @, the command following the @ will be automatically re-executed if it crashes. Obviously this is not happening for me. Any ideas? Perhaps I need to ask in the LXDE forum?

Return to “Troubleshooting”