Wednesday, April 17, 2013

Remote Desktop Session from Ubuntu at the boot time.....



Accessing a remote desktop ( XP / Win 7 / Win 8 / Server 2003 etc )  from Ubuntu  is not new.

A few people wanted to start remote desktop session from Ubuntu at the boot time itself.  This facilitates them to hide Ubuntu from the normal user.

Here is the simple procedure.


I have taken XP as example.  [  Here XP system   will be accessed by Ubuntu system ]

Set-up required on XP System.

1.  System with XP is installed. 


2.   Give static ip address to Windows XP system.   ( Say 192.168.1.10 etc ).


2.   Right Click on My Computer --> Select Properties --> Select Remote Tab and enable " Allow Users to connect remotely to this computer "  as shown in the picture.



3.  Add exception to Remote Desktop in windows firewall if on and configured. ( It is better to disable windows firewall and reboot ).

This completes the setup on XP system.

B.  Set-up required on Ubuntu System.

The the procedure is almost all version of Ubuntu, using 12.04 version of Ubuntu Desktop  has its own advantage being LTS version.  (  32 Bit / 64 Bit - does not matter )

Please ensure that you are admin user and the Ubuntu is installed on the system.  Here I presume that you have Ubuntu 12.04 Desktop default installation.

1.  Open the terminal window.  ( Ctrl + ALT + t  will open a terminal window )

2.  Type following commands one by one ( after finishing the operation of the each command )   while you are connected to internet.  

type  sudo apt-get install rdesktop    and  press enter.
type  sudo apt-get install lxde            and press enter.

( when you are giving command like sudo apt-get install rdesktop   ubuntu will ask for password.  you can type your own password.  Its normal.  System will ask to install respective software.  You need to say Y )

2.   Type nano myrdp and press enter.

3.  Type following line and save by pressing Ctrl + x  key.

rdesktop  -k  en-us  -a 16  -z  -f  -5  -P  192.168.1.10 

( note :  the IP address typed i.e. 192.168.1.10 is of xp ,  you can replace with your own address )

4.  At the prompt type chmod +x  myrdp  to make file executable.

5.  Please logout and select lxde as session at the login.

6.  Again open the terminal window.  ( Ctrl + ALT + t  will open a terminal window ).

at the prompt type cd  .config   and press enter  [ it is dot followed with config ]

once you are in .config directory  type mkdir autostart   and press enter.

 7.  Type nano username.desktop  and press enter.  ( Here you will have change username with you actual username.  

8.  Type following lines and save  by pressing Ctrl + x  key.

[Desktop Entry]
Type=Application
Exec=/home/username/myrdp
Hidden=false
NoDisplay=false
X-GNOME-Austoart-enabled=true


( note :  Exec=/home/username/myrdp  in this line you have to replace word username with your actual username. )


9.   Now within a terminal give following command.

cd /etc/lightdm  and press enter.

Next command is  nano lightdm.conf  and press enter.

Type following lines and save by pressing Ctrl + x  key.

[SeatDefaults]
autologin-guest=false
autologin-user=username
autologin-session=lightdm-autologin
greeter-session=unity-greeter
user-session=LXDE.desktop


( note :   autologin-user=username     in this line you have to replace  word  username with your actual username. )


That it !!!.

Now you reboot the Ubuntu systm .  You will xp's  userlogin prompt when Ubuntu finishes startup.

Enjoy !!!

Notes :  1.  Please ensure that you XP system and Ubuntu System on the same network.

2.  Default XP system allows only one user.

3.  XP  System user must have password set.

Please comment if you have any....

 


3 comments: