Windows Terminal Client

I just wanted to add to the excellent post by TBenning.

I got rdesktop to work as well after reading his post and playing around a little bit.

Follow these steps to get rdesktop to work correctly with a powerbook:

-> get the dev tools and XDarwin (see TBenning's post)
-> after you install XDarwin reboot your powerbook
-> untar the rdesktop file and it should make a folder called "rdesktop-1.1.0"
-> next step is to edit the two files - DO THIS BEFORE you try and compile the rdesktop program
-> open the folder and find rdesktop.c double-click on it. The file will open in project builder (if you have the apple dev tools installed properly)
-> now open the attachment TBenning included in his post. Since both of the files you need are included in that one attachment you have to cut and copy the text into the two seperate files. So start cut and copying from the top of the attachment and keep going intil you reach the "comments" section. It will look something like this:
/*
rdesktop: A Remote Desktop Protocol client.
Entrypoint and utility functions
Copyright (C) Matthew Chapman 1999-2001

STOP copying when you reach this part.
-> Now past all the stuff you copied into the rdesktop.c file you have opened in Project builder and save the file as a "C source file" that should be the default.
-> Now you have to do the some thing with other file, xwin.c, use the same steps as listed above. But you have to cut and copy the remaining text instead of only the first part.
-> After you have edited both of the files open the terminal.app
-> In the terminal change directory to the rdesktop-1.1.0
-> Now you have to compile the program with the new edited files. Type the following:
[localhost:/rdesktop-1.1.0] sudo ./configure
Password: **********
[localhost:/rdesktop-1.1.0] sudo make
it will spit out some stuff here - make sure it lists no errors
[localhost:/rdesktop-1.1.0] sudo make install
it will spit out some more stuff here
-> Now the program will be installed! All you have to do is run it.
-> Launch XDarwin - you can run it in "rootless" mode or "full screen" doesn't matter
-> in XDarwin open up your terminal windows and type the following:
[localhost:~] dymas% /usr/local/bin/rdesktop -a 192.168.1.3
-> wait a little bit and a graphical window with your logon screen to the Terminal Server should appear!

***NOTE*** You must use the -a switch when lauching rdesktop or it won't use the keyboard mappings for your powerbook and be all messed up.

That worked perfect for me on my Powerbook 550 Ti running OS X 10.1.3 connecting to a Windows 2000 Advanced Server (service pack 2) running Terminal Services in "Application Mode"

If anybody is having problems with editing the C source files correctly let me know and i'll see if I can find somewhere to post them for you.

Enjoy and hope this helps!
 
OK,

Following the patch instructions above I compiled and was able to
connect to our winterm server, but:
the "d" key was dead ie nothing happened and
the "q" key printed a "d".

I was able to turn on the debug switch and found that the key
code for a "q" is a 0x14 and the key code for a "d" is 0xa.

I was able to fix the translation array so that pressing a "d" give
a "d" but I cannot figure out what to assign to the keycode for
the "q" key to get a "q".

Does this make any sense :)

I have one of the new 933MHZ mac towers....in addition I am
running the xfree 4.2 version of X Window.

Thanks,

--Jerry
 
Hey now - it works !! This is a very useful tool.

Thank you to TBENNING and DYMAS for providing clear instructions.

BTW: I have confirmed the problem with keys "d" and "q".

Can you post the code that fixes this ?

Thanks -
- Steve
 
I've made it work as well. However have not tested the d and q key issue. I'm having a lot of font problems though. Many fonts look garbled. A refresh sometimes helps. Is this just me?

Also, is there any reason why someone doesn't just post the binary? I'm a unix geek and had no problems with the patches and compiling the code, but I imagine there are a lot of people who have (or will). I'll happily post mine (I'm assuming the board will support this) but I'm not sure if the font problem is an issue with my system or my build.

John
 
Originally posted by johngibbons
I've made it work as well. However have not tested the d and q key issue. I'm having a lot of font problems though. Many fonts look garbled. A refresh sometimes helps. Is this just me?

Also, is there any reason why someone doesn't just post the binary? I'm a unix geek and had no problems with the patches and compiling the code, but I imagine there are a lot of people who have (or will). I'll happily post mine (I'm assuming the board will support this) but I'm not sure if the font problem is an issue with my system or my build.

John

Would be very convenient. I haven't got the code to compile yet...
 
John -> thanks for posting that binary! i'm sure that will help some people out.

Jerry and Steve ->
i'll take a look through the code and see if I can't find something to work around the "d" and "q" keys. The terminal server here is having a rough time so I can't test anything out right now. I'll edit some lines in the xwin.c file and see if I can't change the xterminal keycode mapping.

If all else fails I'll post a message to the dev board for rdesktop and see if they can't help us out. My programming skills are quite rusty to say the least :) hehe

-Baptiste
 
***EDITED Fri 4:10PM EST****

Jerry came up with the proper key codes.

The solution is to edit the xwin.c file and the rdesktop.c files with the proper keyboard codes than recompile the program.

I have the corrected files here:
corrected files

the xwin.c file listed above has Jerry's corrections already in it so you should be good to go.
 
Ok, using the patches given above by tbenning and the following keymap:

int ncd19c[] = {
255, 255, 255, 255, 255, 255, 255, 255, 38, 39, 40, 41, 43, 42, 52, 53,
54, 55, 49, 56, 24, 25, 26, 27, 29, 28, 10, 11, 12, 13, 15, 14,
21, 18, 16, 20, 17, 19, 35, 32, 30, 34, 31, 33, 36, 46, 44, 48,
45, 47, 51, 59, 61, 57, 58, 60, 23, 65, 94, 22, 255, 9, 255, 113,
62, 66, 116, 109, 255, 255, 255, 255, 255, 91, 255, 82, 255, 255, 255, 77,
255, 255, 255, 63, 108, 255, 86, 255, 255, 112, 90, 87, 88, 89, 83, 84,
85, 79, 255, 80, 81, 255, 255, 255, 71, 72, 73, 69, 74, 75, 255, 96,
255, 255, 255, 255, 255, 76, 255, 255, 255, 255, 106, 97, 99, 107, 70, 103,
68, 105, 67, 100, 102, 104, 98, 255, 255, 255, 255, 255, 255, 117, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
0};

The main keyboard seems to be working, I think there may still be some
problems with the keypad. ( The only changes in the above map are for
the "d" and and "q" keys. see my earlier message)

This is with a 933 mhz G4 system running xfree 4.2

==Jerry
 
Jerry -

good job! seems the most simple solution always works best :D

a seperate include statement was overkill. fixing the int was much easier.

Anyways - works fine! The delete key and arrow keys are still funky but they work and I can connect fine to my W2K sp2 TS server perfectly.

Thanks for the help! Moving on to other problems...

-B
 
Hi there,
I was following this post and playing with rdesktop. I compiled it successfully! It is working well, except for the keymap troubles. I went onto the website listed by Dymas (Baptiste) and looked for the files he listed:

-----
grab the following three files from my Idisk:

xwin.c
rdesktop.c
kbcodes.h
-----

I found the first two, but no kbcodes.h - does this mean that the xwin.c has been modified so the kbcodes.h is no longer needed? I hate to recompile and then have it look for a kbcodes file that isn't there and then have no keyboard at all... so until I see something, I'll stick with the minor inconvenience of "q" and "d" not working. Also, where can I find a primer on using xwindows? I know I'm missing something since I can only minimize windows, not actually kill them. I'm sure there's much more I'm missing as well.

Thanks!
Matthew
 
Matthew -

Sorry about that - it was my fault. Jerry actually fixed the "q" and "d" file much better than I was trying to. I removed the kbcode.h file since it didn't really work.

I'll edit that post so people don't get mislead that it fixes the problem.

So anyways here is your answer:

-> grab the new files from my Idisk: xwin.c and rdesktop.c
-> put the two new files in your rdesktop folder
-> recompile program (if you need help just reread past posts or ask me)
-> start Xdarwin and type this in a xterm window:
rdesktop -a 192.168.1.3
(change the 192.168.1.3 to whatever you terminal server IP or host name is)

Hope that helps.

hmmm in regards to xwindows - once you install Xdarwin you will have a couple of ugly windows open. Your next step would be to install a new windows manager that looks better. I like OroborOSX, but alot of people use others. OroborOSX will give your Xdarwin windows an Aqua feel to them. After you have a good window manager installed just download and install whatever Xwindows apps you want. Not sure about a good Xwindows guide - but if I find something I'll post it. Enjoy!

-Baptiste
 
Sorry if this is a stupid question, but can somebody explain to me what this does? Like what is it's purpose, and what is the Microsoft terminal server stuff? I've never heard of it. Please enlighten me.

Thanks!
 
dricci,

Terminal servers have been around for a long time. Basically they allow "thin-clients" to connect to servers and run applications. This allows you to install a very processor or memory heavy application on a terminal server, and let the clients work on the program remotely via the terminal server client.

The terminal server would allow clients to login remotely and run applications. Since the applications were actually running on the term server all the overhead would be on the server as opposed to the client.

Now in this case - Microsoft uses a different protocol than other terminal servers (e.g. Citrix) and of course M$ has not (read will not) release a client for Unix/Sun/Mac/etc... so alot of us are very happy about this software.

In my case it will help me work better on my windows network. I can now connect to the terminal server and run all the applications that I need. For example I can connect to the exchange mail server and mange it, or I can even go into the management software and add/remove users in our windows network.

Hope that clear it up - if not like they say a picture is worth a thousand words so here you go:

me connected to a windows 2000 terminal server from OS X:click on rdesktop_w2kts.jpg
 
You guys seem to be having great success with this. That screen shot looks a lot better than my results. I've been getting garbled fonts, however I'm connecting to XP, not Win2k. That may be part of it.

Since we have the Remote Desktop code, how realistic is it to make a native Cocoa version of this? I'm not a C (or C++ or Obj-C) programmer so forgive me if the answer is obvious. :) I've done a lot of programming over the years and do plan on dabbling on OS X (Obj-C, etc). But I wouldn't be much help at first, I'm afraid. If it's realistic are any of you up to the task? It could be put up on Sourceforge. I'm sure there would be other people interested in taking a crack at it too.

Cheers,
John
 
johngibbons,

I suck at programing :p as I've shown in this thread heheh

But that sounds like a great idea! Hopefully someone will pick up the ball and run with this. I'm pretty sure rdesktop is open source so it would just be a matter of porting it over to native OS X app. Although that seems simple to me and you might be a nitemare for the programmer. So we'll see!

As for your WinXP garbled text stuff - i'll test it out tonight at work and post back a picture. The screen shot I did wasn't that great - the start button is actually there in the real thing and the font/text looks better. I would say the rdesktop through xDarwin is pretty darn close to the real windows TS client. I'll post a side-by-side later if you want.

-baptiste
 
I used the patches and have it working perfectly. However I had to run it over VNC since I'm at work. That's a trick, use VNC to access the Mac from my Win2k box at work, and the Mac is running rdesktop to access my XP box on my home LAN. :) I'll try it tonight when I get home and see how the speed is. All in all it's looking great.

A native version would be fantastic. Hopefully someone who's capable of such a thing will take it on. The new Remote Desktop client for Windows supports the full XP GUI, file sharing and sound. It's really quite impressive. Hopefully rdesktop will evolve to support that stuff as well.

Cheers,
John
 
Okay John here is what i found ->

OS X w/ rdesktop connecting to Win XP box - you are right it looks horrible. I noticed the color depth was only 8 bit. That could be some of the problem. As for the text is looks okay but I could def. tell the color depth was highly reduced.

Redhat 7.2 w/ rdesktop connecting to Win XP box - same deal as with OS X. Only 8bit color supported.

I didn't get a chance to play with it much since work was so busy. Have you tried running it in full-screen mode? Or with the "force bitmap updates" commands?
[localhost:~] baptiste% rdesktop -a -f -b 192.168.1.3

the -f switch does full screen, and the -b forces bitmap updates.

I've seen the sound and file-sharing support with XP. Remeber that Microsoft is using the RDP protocol. That is different than other terminal services like Citrix and ICS. I doubt Microsoft will be very helpful in letting people develop apps that support RDP fully since they will never release the source code. I also hear a nasty rumor that Win XP disables the VNC protocol...haven't tried it out myself yet.

Anyways sorry i couldn't be of much help! :(

-B
 
Seems we let this one die out. rdesktop works just fine now with Windows XP, but still only 8 bit color. That's fine, but I'd obviously prefer it to look better. The font problem is gone with the latest version. None of the options help at all with the colors, but that doesn't surprise me. Full screen mode actually takes up both of my screens on my dual monitor setup. Kind of neat, but not how I'd prefer to work. All in all it works well enough for my needs.

I still do wish we could make a native aqua version though. The code seems fairly straight forward, but unfortunately it's a little (a lot) above my skill level.

Cheers,
John
 
Back
Top