This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Feature: Desktop Software

Seamlessly integrate XP into Linux with SeamlessRDP

By Sergio Gonzalez Duran on January 31, 2008 (4:00:00 PM)

Share    Print    Comments   

Today users have many choices for combining Linux and Windows on the same machine. You can go with a traditional dual-boot system in which the operating systems reside on different disk partitions but share a common partition for files, or you can use an emulator such as Wine, which lets you install Windows applications right in your Linux system. Virtualization programs, such as those from VMware, bring you closer to the more ideal solution of using both systems at once, but one is always the host and one is always the guest, shown inside a window. But by combining VMware Server with some free software, you can run Windows XP along with Linux, not inside a console window, but completely integrated into the Linux environment.

To make this work, you need three tools installed on your system. Though not open source, VMware Server is free as in beer; it requires a license number that you get from the same page where you download the program. (Of course you also need a copy of Windows XP to run under VMware Server.) rdesktop is a Remote Desktop Protocol client bundled with virtually every Linux distro, and Cendio's SeamlessRDP is a GPL-licensed utility that lets you integrate rdesktop with Windows XP.

With this solution, you're connecting to a virtual machine in the background, but you don't see a window frame or the Windows desktop. All you see is the Windows XP menu bar along with your regular KDE or GNOME menu bar, creating the illusion that both operating systems are working at the same time side by side. In Figure 1. below, notice the KDE menu bar on the top and the Windows XP menu bar on the bottom of the screen. You can launch applications from both.

To start, install Windows XP in VMware with the usual options, and make sure to set the network connection option to Network Address Translation (NAT). This simplifies the connection from the host machine. After you complete the Windows installation, log in and set a password for an account you've created that you'll call from Linux. You must allow remote connections to this Windows virtual machine, which you can do by going to Start -> Control Panel -> System (you may have to switch to the classic view). Once the system icon opens, go to the Remote tab and check "Allow users to connect remotely to this computer."

Now install VMware Tools for your Windows XP virtual machine. You must know which IP address the VMware DHCP server assigned to the virtual machine; to find it, open up a DOS console and type ipconfig.

Next, install SeamlessRDP from within your Windows virtual machine. Open Internet Explorer and download the SeamlessRDP zip file. Create a directory under C: (C:\seamless) and extract the archive's content there. Unzip the three files into the directory; you'll use seamlessrdpshell.exe later.

Now you can log off the Windows session, but don't turn off the virtual machine. Once you have Windows displaying the Welcome screen, you can close the VMware Server console, leaving the Windows XP virtual machine session is alive in the background. A simple ps -ef | grep vmware proves it's still there.

Now it's time to use rdesktop. First, try to open a simple application, such as Notepad. Start a terminal session under Linux, and run this command from your xterm:

rdesktop -A -s "c:\seamless\seamlessrdpshell.exe notepad" 192.168.217.129 -u admin -p secret

Of course, change the IP address, username, and password to match your settings. If everything is OK, you should see the Notepad application pop up on your Linux system.

The -A option enables the SeamlessRDP mode that creates an X11 window for each application you launch. This option requires you to set a shell (-s) that launches the application indicated in the rdesktop command. Notice that you're using the directory you created and the SeamlessRDP application, c:\seamless\seamlessrdpshell.exe. The argument to this command is the Windows program that you wish to run. You need the full path if the program isn't in the regular path variable.

The -u and -p switches are optional. If you don't use them, the application will launch a Windows login screen asking for credentials.

Note that when you close Notepad or any other Windows-launched application, the rdesktop connection is still on. You must log out, because until you do, rdesktop won't be able to start other applications. Since you don't have a desktop and a Start menu from which to log off, you must go to the Windows XP virtual machine and press Ctrl-Alt-Del, then log off, or restart the virtual machine.

Once you know how to launch a Windows application from rdesktop with the SeamlessRDP option, try it with explorer.exe itself. This application creates a full desktop environment so users can interact mainly through the menu bar. If you run it "as is," it will pop up the full Windows XP desktop (including the wallpaper, icons, and shortcuts on the desktop).

If that's too intrusive for you, you can hack the Windows registry to get rid of the desktop and keep only the menu bar. Once you're in Windows XP again, launch the Registry editor by going to Start -> Run and typing regedit. Search for HKEY_CURRENT_USER -> Software -> Microsoft -> Windows -> CurrentVersion -> Policies -> Explorer. Once there, right-click on the right panel and select New -> DWORD Value. Name it NoDesktop, then click on it and change the data value to 1. Close the Registry editor and restart Windows.

When you turn off your Linux system, any virtual machine that is running in the background will obviously be lost, so you must start the VMware virtual machine and close the server console every time you want to connect to Windows this way. Before running the rdesktop command, consider moving your menu bar from the bottom of the screen to the top, because the Windows bar will sit there.

Now run the rdesktop command like this:

rdesktop -A -s 'c:\seamless\seamlessrdpshell.exe c:\windows\explorer.exe' 192.168.217.129 -u admin -p secret

VoilĂ ! After a few seconds, you should have the Windows XP menu bar at the bottom of the screen, and you should be able to launch any application you have installed. You've created the illusion that both operating systems are working on the same machine at the same time. Very cool.

This trick doesn't work with just VMware virtual machines. It also works with Windows clients on your network and other virtual machine software. Simply install SeamlessRDP and configure Windows XP properly so that rdesktop can connect to it.

Sergio Gonzalez Duran is a Linux administrator, systems developer, and network security counselor who also teaches Linux courses and publishes the Spanish-oriented Linux and open source Web site linuxtotal.com.mx.

Share    Print    Comments   

Comments

on Seamlessly integrate XP into Linux with SeamlessRDP

Note: Comments are owned by the poster. We are not responsible for their content.

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 217.187.255.191] on January 31, 2008 05:06 PM
or just use virtualbox and save a lot of time ;)

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 131.215.234.27] on January 31, 2008 05:13 PM
^---- I agree..
I to use VirtualBox. It has a seamless mode that works vary well.

---

#

Re: Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 83.211.157.227] on February 02, 2008 11:50 PM
virtualbox is great...
and it runs lighter tha vmware ever will: a lot less overhead.
i use it to amaze my poor windows using friends ;-)

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 204.137.64.112] on January 31, 2008 05:44 PM
This may be the exact type of thing that helps buisness slowly move over to linux without having to spend money to train their ignorant employees.

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 204.57.112.11] on January 31, 2008 06:14 PM
No, they'll just continue to spend money training their ignorant employees how to use Vista and the new Office.

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 204.57.112.11] on January 31, 2008 06:16 PM
It doesn't launch Notepad for me. It launches the full desktop. Might as well just use Vmware player or Rdesktop without the added overhead of the seamlessrdp.

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 84.56.196.155] on January 31, 2008 06:27 PM
If you want to get rid of this odd "logout" problem use runh.exe and a command like this
rdesktop -A -s 'c:\seamlessrdp\seamlessrdpshell.exe runh "cmd /c start /wait notepad && shutdown -l"' <IP> -u <USER> -p <PASSWORD>
You get runh @ http://www.msterminalservices.org/download.cfm. After you close the application (notepad) now the next command that is executed is "shutdown -l" which logs you off.

Also look forward for Workstation 6.5 there might be a feature like this out of the box

#

Re: Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 64.161.218.131] on February 01, 2008 09:56 PM
Hi guys,

I made a small utility that gives you a launchpad gui from which you can run any application you need. Freely available at my site here:

http://www.miguelfurtado.com/srdp.aspx

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 213.49.80.142] on January 31, 2008 06:31 PM
I confirm: VirtualBox is way easier to setup and have a seamless XP desktop within your favorite Linux distro. Just install VirtualBox, create an NTFS virtual disk, install Windows XP on top of it and boot it. Once booted, there is a shortcut (can't remember which one as I don't use it, I'd rather keep XP in its own 'separate' window) to run WindowsXP seamlessly within your Linux environment.

Good article tho, it's a shame the author didn't know about VirtualBox ;)

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 66.92.72.174] on January 31, 2008 06:56 PM
Great article. Minor mistake, though; you do realize that Wine Is Not an Emulator, right? It is technically a software compatibility layer.

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 196.40.38.110] on January 31, 2008 09:29 PM
WINE = Wine Is Not an Emulator

#

Re: Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 24.80.34.124] on February 01, 2008 03:31 AM
Right and Gnu's not Unix but don't tell it to the posix board. Wine is a software abstraction layer which is veeerrrryyyy different from what an emulator does. Don't ask me how, I don't know, I just repeat what I read elsewhere.



God save us.

#

Virtual Box seamless is neat, just missing some of the higher-end options

Posted by: TK on January 31, 2008 11:10 PM
VB's seamless mode is neat. It shows the Windows task bar along with your Linux task bar, so you may have to move one of them around. It runs nicely though. The downside is the lack of DirectX support in VB (although, from what I read, it is rather scant in VMWare for now).

#

WINE = Wine Is Not an Emulator

Posted by: Anonymous [ip: 203.127.19.220] on February 01, 2008 02:04 AM
WINE = Wine Is Not an Emulator
WINE = Wine Is Not an Emulator
WINE = Wine Is Not an Emulator
WINE = Wine Is Not an Emulator
WINE = Wine Is Not an Emulator
WINE = Wine Is Not an Emulator
WINE = Wine Is Not an Emulator
WINE = Wine Is Not an Emulator
WINE = Wine Is Not an Emulator
WINE = Wine Is Not an Emulator

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 68.123.27.242] on February 01, 2008 03:17 AM
Very interesting. But my main use for WinXP is to connect to my workplace from home, using Nortel Network Access which takes over the IP stack and makes my home network invisible. Would that make the rdesktop disconnect at that point?
Thanks

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 24.208.146.127] on February 01, 2008 03:29 AM
Don't try this with XP Home, it doesn't include Remote Desktop.

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 124.83.91.243] on February 01, 2008 05:24 AM
I'm already doing something similar with VirtualBox using it's seamless option.

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 190.77.35.105] on February 01, 2008 11:20 AM
In my case, it also showed the Desktop. It did not show the notepad application at all. Whatever.

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 207.61.91.196] on February 01, 2008 12:37 PM
Thanks for a nice article. I use VirtualBox myself. For an easier way to accomplish the same thing using VirtualBox have a look here:

http://www.itvidya.com/how_to_run_windows_and_linux_at_one_place

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 220.233.18.253] on February 01, 2008 01:14 PM
To all you saying use VirtualBox, think about running a resource intensive app on a server and bringing the display back to your desktop. X has been able to do this for years and I'm glad I can now do it with windows too. I still have a few windows only apps at work so I rdp into a terminal server just to run one app, now with a bit of magic I don't have to bring the whole windows desktop back, just the one app I need.

#

VirtualBox is not the Holy Grail

Posted by: Anonymous [ip: 96.245.7.179] on February 01, 2008 02:08 PM
Everyone posting about VirtualBox is correct, but this article provides a method of integrating a virtual OR PHYSICAL Windows machine into your Linux desktop. If you only have to run a few applications then VirtualBox is probably the way to go. If you have an existing Windows machine - or perhaps your company requires XP on a company-owned laptop, this is a very nice solution for integrating that environment into a secondary desktop form within X.

Nice article.

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 203.200.58.136] on February 01, 2008 02:44 PM
Does SeamlessRDP support copy & paste between Linux and Windows applications?

#

Re: Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 65.60.70.211] on February 01, 2008 04:56 PM
Yes.

#

But Will this help me?

Posted by: Anonymous [ip: 192.94.94.105] on February 01, 2008 03:13 PM
I want to switch, but I am a gamer and require instant gratification to my "Direct X" games, Is there a solution for me as well?

#

Automatic Shutdown

Posted by: Anonymous [ip: 65.60.70.211] on February 01, 2008 05:07 PM
I use Seamless RDP & VMWare on Kubuntu, and I wanted a safe way to shutdown the Virtualized Windows when I shutdown the computer. So I added the following line to the [Shutdown] section of /etc/kde3/kdm/kdmrc:

HaltCmd=/path/to/shutdown-vm.sh&&/sbin/poweroff

shutdown-vm.sh
--------------------------------------------------------------------------
#!/bin/bash
# A script to safely shutdown a guest OS running in VMWare
# We can hack /etc/kde3/kdm/kdmrc (/HaltCmd) to run this at shutdown

VMCMD='/usr/bin/vmware-cmd'
WINDOWS='/var/lib/vmware/Virtual Machines/Windows XP Professional/Windows XP Professional.vmx'

$VMCMD "$WINDOWS" stop trysoft & >> /var/log/shutdown-vm.log

echo "[`date`] VM $WINDOWS safely powered off " >> /var/log/shutdown-vm.log

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 82.171.140.137] on February 01, 2008 05:56 PM
It would be kewl to integrate the profiles as well, using Samba. Change my documents to point to a network path, and use folder redirections for the rest. I don't know the details of how to configure Windows to do this, but I think it's doable. You'd save something to the desktop under Windows and it shows up on the Gnome desktop. You save something to your Documents or Home folder and it shows up under My Documents in Windows. Now THAT would be smooth integration.

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 66.210.78.114] on February 01, 2008 07:56 PM
wine is NOT an emulator, it's a windows kernel rewrite! that is, kernel32.dll, user32.dll, gdi32.dll & so on were actually rewritten, natively under linux/unix/mac/etc
this fact makes linux capable of natively run windows applications (often faster than windows itself!)
on the other hand, wmware is JUST an emulator (slow, etc)
i don't quite follow, why the press seams to constantly have problems with understanding the difference...

#

Re: Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 70.42.41.114] on February 01, 2008 09:08 PM
I think you need to know about instruction coding before making blatant remarks with actually know what an emulator is? Your comment to "wmware is JUST an emulator (slow, etc) i don't quite follow" ... I think the only part which you have correct is "i don't quite follow". Vmware doesn't emulate any code unless it needs to like low level memory management, etc..etc.. Since Vmware interpret instruction sets natively, no need to emulate when it's already native to x86 hence and i repeat most code will run natively without "EMULATION".

#

Re(1): Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 71.87.193.91] on February 02, 2008 03:16 AM
VMware, VirtualPC, VirtualBox, and others are emulators, because they emulate PC hardware. Just like the programs some folks use to emulate an SNES or a Playstation on a PC, these programs emulate the hardware environment well enough for the entire OS and associated applications to run unchanged. That's why they are called emulators.

WINE, on the other hand, is a complete rewrite of the various Windows APIs and system DLLs. It replicates the behavior of Windows by making equivalent system calls to the Linux kernel or the Darwin kernel in Mac OS X. The Windows applications make their function calls, and the WINE APIs turn those calls into code for the underlying OS. Theoretically, WINE should be faster for a given Windows app than an emulator such as VMware, but in practice, the reverse is usually true. PC emulators usually take longer to boot up than a natively-installed Windows on the same hardware, but then apps will usually run at speeds close to native (depending on the app). WINE takes longer for the application itself to start up, then often runs into more delays as other API functions are initialized and executed.

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 70.42.41.114] on February 01, 2008 09:00 PM
This is truly a waste of time and resource. I can see only enthusiast using this but for corporate? No....And basically it's exactly as stated "You've created the illusion that both operating systems are working on the same machine at the same time" - Illusion being the keyword here.

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 213.154.213.148] on February 01, 2008 09:22 PM
I have an iTouch. It works with Xp only. For some reason Amarok doesn't work. Is it possible for me to use my iTouch in Linux, because it doesn't worj with V

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 70.182.160.140] on February 01, 2008 09:34 PM
One note, this will NOT work for XP Pro if the PC is on a corporate domain. It will always show the entire desktop.

As stated this method can be used to bring a virtual OR a physical Windows desktop to your Linux desktop seamlessly. Plenty of processor, disk and RAM? Virtual box will confine it to the same physical box. Already got an XP box along with your Linux box? This is a good way to eliminate a KVM switch, dual dedicated monitors or worse yet having to disconnect and reconnect to change OS. It IS slow either way since you are pumping the desktop over the network - so 100mb or 1000mb connections are best. Forget gaming, it's not fast enough, DOS boxes won't redirect either.

Now how about a way to make this work for OSX? Running 3 desktops in one would be way cool.

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 64.161.218.131] on February 01, 2008 09:59 PM
Hi guys,

For those interested I created a utility that makes it easier to run multiple applications out of one rdp session using the seamlessrdp, you can see it here:

http://www.miguelfurtado.com/srdp.aspx

Please let me know how it works for you guys, its freely available.

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 68.32.107.64] on February 02, 2008 05:11 AM
Having tried to use SeamlessRDP (and VirtualBox) recently I can say that neither really provide a true 'Windows' integration into Linux. The Windows Remote Desktop service required for SeamlessRDP doesn't support screen colors beyond 16 bit so the colors and fonts are not as aesthetically pleasing as they are on Windows. Not a big deal if you only need the occasional Windows app but if you are in it all day, it becomes quite annoying. VirtualBox's seamless mode works better but is still a bit buggy. The last version I tried was 1.5.2 and while it worked well enough, there were problems with the keyboard and mouse between the host and the guest. Also, after I upgraded to Gutsy, the Windows task bar covered the Ubuntu task bar which was very annoying.

Ultimately, again, I ended up back on Windows for work. I attempted to use many Linux/FOSS tools to integrate into my work environment but still failed. The biggest issue for me? Calendar integration. Not e-mail, not office docs but calendar. We use Exchange for e-mail, calendar, etc and the inability to easily see and update my calendar forced me back to Windows. Oh well, I'll try again next year.

#

Re: Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 84.56.162.227] on February 17, 2008 09:31 AM
Regarding the 16 colors: You can set the colour deepth to 256 by editing this registry key in Windows:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Terminal Server\WinStations\RDP-Tcp\ColorDepth
Set it to 4 and the appearance is much better although not perfect of course.

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 212.248.237.1] on February 04, 2008 01:02 PM
Brilliant - I use windows XP at work for two things only, outlook and my (windows only) firewall management software. I have used KVM's, VNC, rdesktop, nxclient, and various monitor arrangements to get what I want but i think this ticks the majority of the boxes...

However...

I work in a corporate windows/linux environment making use of AD domains. To get this working I had to do a few tweaks which included removing the windows machine form the domain and enabling fast user switching and the welcome screen. This results in losing lots of the things I actually like about the Windows & AD stuff. But I'm sure with lots of hacks I can get round them.

All in all an excellent little article!

M

#

Re: Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 212.248.237.1] on February 05, 2008 01:36 PM
>>To get this working I had to do a few tweaks which included removing the windows machine form the domain and enabling fast user switching and the welcome screen.

UPDATE _ I got it working on a machine on our Domain. Well kind of...

Couldn't get it working on the domain machine because the corporate group policy prevented me from using fast user switching and the welcome screen.

I disabled the desktop using gpedit.msc on the target machine. I also added a shortcut to the startup menu containing "C:\seamlessrdp\seamlessrdpshell.exe explorer.exe". Now all I do is "rdesktop -A targetmachine.ADdomain.corporation.com -u user.name -p Pass.Word" and I get the task bar. Advantage of this is you can log off using the taskbar when you are done.

M

#

Seamlessly integrate XP into Linux with SeamlessRDP - briing in dual boot?

Posted by: Anonymous [ip: 24.141.129.92] on February 04, 2008 04:56 PM
But what about when you've got a dual boot and just want to run XP inside of Virt? does that require a seperate install?

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 76.115.1.23] on February 04, 2008 10:20 PM
For those of you just getting a desktop instead of notepad make sure the "fast user switching" service is enabled. Also to allow multiple connections try this hack:
http://www.golod.com/2005/10/enabling-multiple-remote-desktop-sessions-in-windows-xp-professional-and-media-center-edition-2005/

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 78.146.103.26] on February 06, 2008 05:13 PM
Why bother with anything Windoze?

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 70.88.30.235] on February 06, 2008 10:52 PM
Dumbness, waste of my time... I dont even see my notepad. I will go back to my vmware and use my full screen mode whenever i need windows.

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 70.88.30.235] on February 06, 2008 10:56 PM
and for people hating on windows, quit that because without windows, the average Joe couldn't afford a computer and i couldn't had gotten . Windows made it to where we can all afford it and plus it is job security.

#

Re: Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Joe Barr on February 07, 2008 12:43 AM
Windows is what makes PCs expensive, and Windows share of the total cost pie has increased over time rather than decreased, like hardware. To suggest that Windows makes them more affordable is very silly.

#

Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 82.19.79.207] on February 09, 2008 10:14 PM
just a minor irk - vmware server is not free "as in beer", as beer is only free in the sense that we can all find out how it's made and create our own (open source). vmware server is free as in gratis (no cost).

#

Re: Seamlessly integrate XP into Linux with SeamlessRDP

Posted by: Anonymous [ip: 90.29.155.80] on February 20, 2008 12:24 PM
yes it's free as in beer, but it's not free as in speech...

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya