Categories
Classifieds
Specials
Calendar

Testy3

Brand: SABE
Product Code: accessories
Unit: Each
Availability: In Stock
SKU: Testy 3
   - OR -   

Introduction Next guide will describe how to compile xrdp on your mac. [​IMG] Why I need it because it's much more easy to manage mac computer from windows computer. You don't need to search vnc client you can simply use windows built-in rdp client. (and as for me during connection with VNC client to mac default VNC server aka ARD I have hanging of login screen very often, using XRDP possibility to see hanged vnc login screen reduced, why? i don't know...) If you want just install it you can download Installer OSxXRDP.zip and simply install it. Installation will be done automatically (below i will describe how installer works). Download OSxXRDP installer But if you paranoiac and afraid of some code injections please follow by steps and compile it by yourself :) Caution: I'm really big mac hater (it's not related to Big'MC :) ) I don't like OS x and I'm pretty sure that OS x it's bad, old and outdated copy of Linux (it's mine IMHO so just keep in mind when you are reading that) Preparation I wouldn't describe how install x Code or command line tools you can find it over Internet or ask apple how to do that. First step simply create folder for our project Let's do that in the root of user folder. Code: $ mkdir ~/xrdp Second step we need additional libraries to compile XRDP. Code: autoconf automake gettext libtool tree And my suggestion is to install wget (good linux tool to download files). Download this file: Download wget installer Extract it (double click on file) and install pkg file. Using wget you can simply download files from command line for example previous file can be downloaded with such command: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOWmhDOUdfNlhBdzg" -O wget-1.14_5.pkg.zip But if you don't have it yet use safari to download, if you have it you don't need it (I mean it's just example). There is a few ways to install libs: You can download installers for them using links (I've made them using macports) Create folder to download them: Code: $ mkdir ~/xrdp/deps Download each installer into this folder: autoconf: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOTG92alFFNkFaVGM" -O ~/xrdp/deps/autoconf-1_2.69_2.pkg.zip automake: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOZmQyTG1HbXFCQXM" -O ~/xrdp/deps/automake-1.14.dmg.zip gettext: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOZHpGam15UVBaUW8" -O ~/xrdp/deps/gettext-0.18.3.1_1.pkg.zip libtool: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOby1MQVk4ZWpGb1k" -O ~/xrdp/deps/libtool-2.4.2_3.pkg.zip tree: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOXzVyUl9hNV93cTg" -O ~/xrdp/deps/tree-1.6.0.dmg.zip If you still want to use safari follow by this link and download each file: Libs Installers Extract each installer and install every sure you need root privileges for that. If it doesn't work (then sorry sometimes it's happened) or again if you are paranoiac you can skip this steps and go to the 2nd or 3rd :) It was my way. You need install macports as described here: https://www.macports.org/install.php When you have configured macports. Invoke installation by typing in console: Code: $ sudo port install autoconf $ sudo port install automake $ sudo port install gettext $ sudo port install libtool $ sudo port install tree Sit back and relax. Another way. It' using another repository such like homebrew. http://brew.sh/ Brew doesn't need root so it's for you if afraid root a lot :) Code: $ brew install autoconf $ brew install automake $ brew install libtool $ brew install gettext I've didn't tried this way but I think it should work. Because there is a man who tried this: http://stackoverflow.com/questions/...xrdp-working-on-osx-lion-has-anyone-done-this You can try another repo similar to macports or brew. Or you can try install libs from sources feel free :) Third step Actually it's XRDP downloading. Using wget just copy-paste this into shell (or you can use safari): Code: $ wget "http://downloads.sourceforge.net/project/xrdp/xrdp/0.6.0/xrdp-v0.6.0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fxrdp%2Ffiles%2F&ts=1359787244&use_mirror=iweb" -O ~/xrdp/xrdp-v0.6.0.tar.gz Now extract sources: Code: $ cd ~/xrdp $ tar xvzf "xrdp-v0.6.0.tar.gz" $ cd ~/xrdp/xrdp-v0.6.0 Patching Now you need to apply patch. Really it can be compiled without this patch but. Underlying story: XRDP uses Unix standards to read environments. As I've told you mac it's just cripple Linux sometimes this function available sometimes not. It can be included into libSystem.B.dylib. It doesn't depend on version of mac os even when libs have the same version on one mac it's supported another no. I have suspicious that it's depends on version of x code, it seems mac devs unsucceeded to remove it from each tool and perform solution to make _environ function available but sometimes this function available even when x code wasn't installed maybe some another apple app can modify it too... So you need to apply small patch to use native OS x calls into this os_calls.c file: Code: --- ../xrdp-v0.6.0/common/os_calls.c 2012-02-21 11:00:55.000000000 -0800 +++ ../xrdp-environ/common/os_calls.c 2014-08-17 23:54:53.000000000 -0700 @@ -67,6 +67,9 @@ /* for clearenv() */ #if defined(_WIN32) +#elif __APPLE__ +#include +#define environ *_NSGetEnviron(); #else extern char** environ; #endif @@ -2113,7 +2116,7 @@ void APP_CC g_clearenv(void) { -#if defined(_WIN32) +#if defined(_WIN32) || defined(__APPLE__) #else environ = 0; #endif You can download this patch by link: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOb09qMWwxQ2QycG8" -O ~/xrdp/os_calls.c.patch And actually the command to apply this patch: Code: $ patch ~/xrdp/xrdp-v0.6.0/common/os_calls.c < ~/xrdp/os_calls.c.patch Configuring and compilation Run next: Code: $ ./bootstrap Now we need to configure it properly: Set defaults directories, set it as 32bit as I know there is some mac PCs with 32 bit os (yes PC because now mac it's IBM PC architecture) and target min version of OS x. So in this case I think this binaries will run without problems when you want to transfer it to another mac. Code: $ ./configure -prefix=/usr -sysconfdir=/etc -localstatedir=/var CFLAGS="-m32 -mmacosx-version-min=10.6" After successful configuration run: Code: $ make And finally to put binaries and all content into appropriate directories as root: Code: $ sudo make install Configuring XRDP You think that's all? Don't be so naive it's just begging... xrdp.ini So now we need to reconfigure XRDP with values for mac because it's configured as Linux tool. Run next to change name of libs inside configuration: Code: $ cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak $ sudo sed -i 's/.so/.dylib/' /etc/xrdp/xrdp.ini After that edit this file and change max_bpp to 16 bit color because in some reason when you are trying to use 24 after connecting to mac vnc you will receive grey messed and very creepy screen (it's happened only when you using mstsc when you connecting from Linux everything fine). So to chnge it just run this: Code: $ sudo sed -i 's/max_bpp=24/max_bpp=16/' /etc/xrdp/xrdp.ini Or you can download already modified xrdp.ini file and replace your own: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOTXFQeG9lRHRleEk" -O ~/xrdp/xrdp.ini $ sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak $ sudo cp ~/xrdp/xrdp.ini /etc/xrdp/xrdp.ini $ sudo chmod 666 /etc/xrdp/xrdp.ini xrdp.sh In some reason original xrdp.sh doesn't work correctly on mac (i don't remember what the reason). So you can try to fix it. Or simply download and replace. To do that run next commands: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOek5sOHZGNTRKQVk" -O ~/xrdp/xrdp.sh $ sudo cp /etc/xrdp/xrdp.sh /etc/xrdp/xrdp.sh.bak $ sudo cp ~/xrdp/xrdp.sh /etc/xrdp/xrdp.sh $ sudo chmod 777 /etc/xrdp/xrdp.sh rsakeys.ini Please check now if rsakeys.ini exists: Code: $ sudo ls /etc/xrdp/rsakeys.ini If you see as output the name of file so you don't need to perform next command. If answer that there is no such file so you need to run this: Code: $ sudo xrdp-keygen xrdp /etc/xrdp/rsakeys.ini $ sudo chmod 666 /etc/xrdp/rsakeys.ini So from here we are done to launch XRDP manually. You can try: Code: $ sudo /etc/xrdp/xrdp.sh And check result with: Code: $ ps -A|grep xrdp|grep -v grep 850 ? 00:00:00 xrdp-sesman 851 ? 00:00:00 xrdp You will see two process as an answer: xrdp, xrdp-sesman. If no you need to find what's wrong.... XRDP OS x daemon Sure it's evidentially stupid idea to start xrdp every time manually. So we need to create OS x daemon... It's really bad, pure documented system. But I've did that. Download this description xml file: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOdXppLVFLMGRsZFE" -O ~/xrdp/my.xrdp.plist $ sudo cp ~/xrdp/my.xrdp.plist /Library/LaunchDaemons/my.xrdp.plist $ sudo chmod 644 /Library/LaunchDaemons/my.xrdp.plist $ sudo launchctl load -F /Library/LaunchDaemons/my.xrdp.plist $ sudo launchctl start my.xrdp Enable VNC aka ARD And now don't forget to start VNC to which your XRDP instance will be connected. You can do that using GUI settings of mac. Or simply run this to activate access with the password 12345678 (you can change it): Code: $ /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw 12345678 -restart -agent -privs -all So VNC will be enabled at port 5900 (you can try some custom vnc to change it if you want). Installer Installer assembled using packagemaker app from apple. As I've mentioned above you can download it from here: Download OSxXRDP installer It contains few scripts and two packages. First script will run before start to check your current language if it's Russian language simply exit. You will pass it without problems it's only for Russians why because they're invaders and they support their government in this actions. (Sure it's simply to skip but at least maybe they will think why I did that...) [​IMG] Just go through the dialogs (maybe you'll be asked about choose drive... due to some apple bug sometimes it can ask sometimes no) By default two packages available and marked: one for binaries another one for daemon. So normally you need both. [​IMG] After finish you will see such screen and you can try to check if services where started. [​IMG] That's all now you can launch you RDP client and connect to mac by IP :) [​IMG] Attached Files: RDPScreen.png RDPScreen.png File size: 79.3 KB Views: 8,706 startscreen.png startscreen.png File size: 112.4 KB Views: 8,588 getcurrentlanguage.png getcurrentlanguage.png File size: 201.4 KB Views: 8,386 installationfinished.png installationfinished.png File size: 196.7 KB Views: 8,376 packages.png packages.png File size: 134.1 KB Views: 8,423 share Reply Sep 29, 2014 gabriel3052 macrumors newbie Sep 29, 2014 #2 hi coozoo, excellent post and nice tool you submitted. Installed it on my virtualized mac, however I get the following error after connection with rdp is sucessful and the dialog "Login to rdp" with only drop-down "Module" appeared (without any username/password) fields: "..error loading /usr/lib/xrdp/libvnc.dylib specified in xrdp.ini, pleas.... (rest of the message is truncated).." Thanks for your help in advance! Gabriel share Reply Sep 29, 2014 coozoo thread starter macrumors newbie Aug 31, 2014 Ukraine #3 gabriel3052 said: ↑ hi coozoo, excellent post and nice tool you submitted. Installed it on my virtualized mac, however I get the following error after connection with rdp is sucessful and the dialog "Login to rdp" with only drop-down "Module" appeared (without any username/password) fields: "..error loading /usr/lib/xrdp/libvnc.dylib specified in xrdp.ini, pleas.... (rest of the message is truncated).." Thanks for your help in advance! Gabriel Click to expand... Hi Gabriel, Thanks for trying it, nice catch you found a bug :) Shame on me :) my fault i've missed symlinks you can redownload and reinstall it. Or simply run this to create symlinks: Code: $ sudo cd /usr/lib/xrdp/;for f in *.dylib; do sudo ln -s "$f" "$(echo "$f"|awk -F "." '{print $1'}).dylib";done; thanks. share Reply Dec 12, 2014 easyw macrumors newbie Dec 12, 2014 #4 xrdp osx screen size hi coozoo, thank you for the guide! I managed to use xrdp on my mac! :) now I can rdp my mac through xrdp (I'm using lion) ... I have a prob... when I remote the mac from a pc I have a smaller resolution (eg pc 1600x900, mac 1920x1080) and the rdp window became larger then the pc screen... is there a way to set a different resolution for the vnc session? thank you maurice share Reply Dec 13, 2014 Beachguy macrumors 6502a Nov 23, 2011 #5 coozoo said: ↑ I don't like OS x and I'm pretty sure that OS x it's bad, old and outdated copy of Linux (it's mine IMHO so just keep in mind when you are reading that) Darwin, the system on which Apple's Mac OS X is built, is a derivative of 4.4BSD-Lite2 and FreeBSD, and is in no way a copy of Linux. Actually, it would be more accurate to say Linux is the copy. (Not really accurate, but much closer to truth, and not INaccurate, either.) share Reply Dec 13, 2014 Last edited: Dec 13, 2014 coozoo thread starter macrumors newbie Aug 31, 2014 Ukraine #6 easyw said: ↑ hi coozoo, thank you for the guide! I managed to use xrdp on my mac! :) now I can rdp my mac through xrdp (I'm using lion) ... I have a prob... when I remote the mac from a pc I have a smaller resolution (eg pc 1600x900, mac 1920x1080) and the rdp window became larger then the pc screen... is there a way to set a different resolution for the vnc session? thank you maurice Hi Maurice, it's unbelievable but I have exactly the same problem :) And i have few solutions for that: 1. Change display scaling on mac I don't remember (and i can't check because it's weekend), but i think it changes the real display appearance too. So if someone or you are using this mac not only by remote it's not good idea and better to use second way. - go to Apple menu -> System Preferences -> Display - Set scaled radiobox - and select one of available resolutions [​IMG] For me i have 1366x768 not sure that this will be the same on every mac (for example on macbook if i'm not wrong only one available) And another problem that you are on fixed resolutions... it's possible that some apps not able to fit into screen:) But there is one plus in using this method - screen is updated much more faster due to less resolution :) 2. It's hidden feature of microsoft client :) But you can use it only for saved connections. - To save connection you need to open mstsc, at least you need to set IP, click Options -> Save as - find saved file .rdp and open it by notepad - and add just one line any where (without quotes): "smart sizing:i:1" save and close notepad Now connect using created .rdp file and mstsc client will resize content accordingly to your window size :) [​IMG] enjoy, yura :) Attached Files: scalingmac.png scalingmac.png File size: 79.1 KB Views: 7,344 mstsccscale.png mstsccscale.png File size: 369.2 KB Views: 7,395 share Reply Dec 14, 2014 easyw macrumors newbie Dec 12, 2014 #7 xrdp keyboard Hi yura! the display scaling (opt 1) worked perfectly!!! :) (I'm using freerdp on linux so I had only this option...) the only issue that now remains to me is the keyboard... I have some keys (e.g. Altgr @) that do not correspond on the xrdp screen... I would like to load a keymap on the remote server to match the local keyboard map... thank you again for your suggestions!!! Maurice share Reply Dec 14, 2014 Last edited: Dec 15, 2014 coozoo thread starter macrumors newbie Aug 31, 2014 Ukraine #8 easyw said: ↑ Hi yura! the display scaling (opt 1) worked perfectly!!! :) (I'm using freerdp on linux so I had only this option...) the only issue that now remains to me is the keyboard... I have some keys (e.g. Altgr @) that do not correspond on the xrdp screen... I would like to load a keymap on the remote server to match the local keyboard map... thank you again for your suggestions!!! Maurice Click to expand... Hi Maurice Hm I'm not using key combination :) that's why i didn't saw that :) But really Alt doesn't work... (yesterday eve I've seat little bit) Code: $ xmodmap -pk returns me Alt keycodes on my linux Code: $ xmodmap -pk|grep -i alt 64 0xffe9 (Alt_L) 0xffe7 (Meta_L) 0xffe9 (Alt_L) 0xffe7 (Meta_L) 0xffe9 (Alt_L) 0xffe7 (Meta_L) 108 0xffea (Alt_R) 0xffe8 (Meta_R) 0xffea (Alt_R) 0xffe8 (Meta_R) 0xfe03 (ISO_Level3_Shift) 204 0x0000 (NoSymbol) 0xffe9 (Alt_L) 0x0000 (NoSymbol) 0xffe9 (Alt_L) 0x0000 (NoSymbol) 0xffe9 (Alt_L) On mac Alt is not present by this command... but it exists in events header with different name as Option key Code: $ cat /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/Events.h|grep -i option optionKeyBit = 11, /* option key down?*/ rightOptionKeyBit = 14, /* right Option key down? Not supported on Mac OS X.*/ optionKey = 1 << optionKeyBit, rightOptionKey = 1 << rightOptionKeyBit, /* Not supported on Mac OS X.*/ kOptionUnicode = 0x2325, /* Unicode OPTION KEY*/ kVK_Option = 0x3A, kVK_RightOption = 0x3D, that's really weird... And as I've understood problem lies somewhere in the mac VNC port aka ARD... Even when you use direct connection with VNC, it doesn't work... So I think OSx ARD suxx, but i know that before :) BTW under Linux it's not a problem to use VNC directly if you wish :) i'm using remmina and it have button to scale screen :) But what is annoying for me it's copy/paste. I've tried to compile vnc by myself, to transfer buffer and currently no luck. But during experiments I've found that real vnc is works much more better and copy/paste works between machines, even when you use direct vnc connection or xrdp+realvnc. But real VNC is free only for personal use that's why I didn't include it in installer :) So you can download your own copy of realvnc (http://www.realvnc.com/) and use it. If you still want to use it with xrdp you need to change port in /etc/xrdp/xrdp.ini At least Alt key works in real vnc and clipboard it is a big cookies :) have fun yura share Reply Dec 15, 2014 coozoo thread starter macrumors newbie Aug 31, 2014 Ukraine #9 Oh looks like I know the name of alt key in xmodmap on mac by it's code from linux ) I think name Mode_switch Code: $ xmodmap -pk|grep ff7e 66 0xff7e (Mode_switch) 0x0000 (NoSymbol) 0xff7e (Mode_switch) 69 0xff7e (Mode_switch) 0x0000 (NoSymbol) 0xff7e (Mode_switch) I will check later if it's possible to remap :) (not sure that it will work because as I wrote it doesn't work even when connect using vnc) share Reply Dec 15, 2014 maflynn Moderator maflynn Staff Member May 3, 2009 Boston #10 Not to sound like a jerk, since you put so much work into the guide, but why not use TeamViewer or GotoMyPC or Logmein for remote access. I use GotoMyPC, and its quite simple to set up and use. share Reply Dec 15, 2014 Last edited: Dec 15, 2014 coozoo thread starter macrumors newbie Aug 31, 2014 Ukraine #11 maflynn said: ↑ Not to sound like a jerk, since you put so much work into the guide, but why not use TeamViewer or GotoMyPC or Logmein for remote access. I use GotoMyPC, and its quite simple to set up and use. Sorry maybe you don't know teamviewer it's vnc reimplemintation oriented to use over internet (it's possible to use in LAN network but protocol still will be vnc). "GotoMyPC or Logmein" - :facepalm: My target was to control PC over LAN using microsoft RDP client (mstsc). Explanation: VNC and RDP is totally different protocols. When you have few macs and bunch of persons who need to use it and they don't have access to vnc, partially due to company restrictions, but they still working with windows they have mstsc, additionally you need to show all of them what is VNC and how to use it, it's better to set up mac to allow connections over RDP protocol. Yes to much work so that's why I've did installer file for me and share it here. share Reply nxzc likes this. Dec 16, 2014 w00tguy macrumors newbie Dec 16, 2014 #12 Thanks! This is great! Now I can use RDP to manage all of my headless servers (linux + mac + windows). My only complaint is that RDP can't change the resolution automatically. "smart sizing:i:1" is a good work-around for that, though. share Reply Dec 23, 2014 easyw macrumors newbie Dec 12, 2014 #13 Hi yura! I managed to map almost all the keycodes through ukulele (open source sw) http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=ukelele (I'm not using Alt+Gr for the moment...) so now I can rdp from linux or win to osx!!! thanks again for your great job you have done with xrdp! :) Have a nice holiday!!! Maurice share Reply Apr 12, 2015 Last edited: Apr 12, 2015 buyukbang macrumors newbie Apr 11, 2015 #14 Hello coozoo, Thanks for the great work you did here! This is really a great post. I feel we have the exactly same viewpoint for OSX, so using XRDP will help me and my colleagues. Alternative third party RDP server applications for OS X are way expensive and XRDP is the only free solution for this need AFAIK. I installed your bundled app and it works like a charm. Only problems are clipboard/file copy paste and some Alt Gr key. I believe an account based folder share could be a workaround for clipboard/file copy paste problem. So I'm here to find a solution for keyboard mapping, that you and easyw already discussed above. At the moment I can't use Alt or Alt Gr keys with XRDP. Alt Gr is also missing on ARD itself, but Alt key does all of its functions. As below link states, Alt key of PC keyboard should be mapped as Option key on OS X. This is what we see on ARD. On XRDP Alt key behaves like Windows key and is mapped to Command key. Do you have a suggestion for mapping Alt key to Option key, as it should be. https://support.microsoft.com/en-us/kb/970299 share Reply Apr 16, 2015 Last edited: Apr 16, 2015 easyw macrumors newbie Dec 12, 2014 #15 [How to] control your mac using win RDP client (XRDP compiling guide on OSx) Hi yura and buyukbang, I managed to map almost all the keycodes through ukulele (open source sw) http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=ukelele with xrdp and ukulele you can map: basic key layout shift key layout shift + left alt layout (it is mapped as shift+option) equal to shift + right alt layout (it is mapped as shift+option) so I have 3 key-codes maps to add all the keys I need It is strange that left Alt or right Alt are mapped to Command and shift+leftAlt and shift+rightAlt are mapped to shift+option... may be yura could discover the trick! :) Maurice share Reply May 12, 2015 Last edited: May 21, 2015 Bllacky macrumors newbie May 12, 2015 #16 Impossible No matter how hard I tried to compile xrdp (version 0.9) ... I get this error: Code: checking X11/Xlib.h presence... no checking for X11/Xlib.h... no configure: error: please install libx11-dev or libX11-devel $ I have tried: Code: ./configure -prefix=/usr -sysconfdir=/etc -localstatedir=/var CFLAGS="-mmacosx-version-min=10.9" LDFLAGS="-L/opt/X11/include/" doesn't work... I am out of ideas. I also get this in the config.log Code: AR='ar' AUTOCONF='${SHELL} /Users/User/Downloads/XRDP/xrdp-devel/missing autoconf' AUTOHEADER='${SHELL} /Users/User/Downloads/XRDP/xrdp-devel/missing autoheader' AUTOMAKE='${SHELL} /Users/User/Downloads/XRDP/xrdp-devel/missing automake-1.15' edit: fixed with: $sudo ln -s /opt/X11/include/X11 /usr/local/include/X11 share Reply May 22, 2015 Bllacky macrumors newbie May 12, 2015 #17 Finally After a long struggle I got the thing to compile version 0.8 . But I can't login, I get this: Code: 23/05/15 01:37:37,061 XRDP-sesman[171]: in openpam_read_chain(): /etc/pam.d/xrdp-sesman(2): invalid facility '@include' (ignored) 23/05/15 01:43:08,860 Finder[251]: Metadata.framework [Error]: void _MDItemMarkAsUsedForPath(CFStringRef): was called with a NULL path 23/05/15 01:43:09,107 Console[401]: Metadata.framework [Error]: void _MDItemMarkAsUsedForPath(CFStringRef): was called with a NULL path Any ideas are welcomed! share Reply Jun 18, 2015 Bllacky macrumors newbie May 12, 2015 #18 If anyone still cares about this project, I am still trying to get a working version of it for future updates of XRDP. For now I have moved to github as it seems this thread is dead. https://github.com/neutrinolabs/xrdp/issues/243 share Reply Jun 21, 2015 Last edited: Jun 22, 2015 gbit86 macrumors newbie Feb 6, 2011 #19 This is really great. I had been waiting for someone to figure out how to get xrdp to compile for OSX. There's such a lack of interest I began to wonder if a free RDP solution would ever arrive. Thanks coozoo! Having said that though the Alt key mismap issue is a big problem for me, but I tried a lot of various things to resolve it & finally have. It's simpler than you can imagine. Sudo nano /etc/xrdp/km-0409.ini Edit these two keys Key64=65515:0 Key115=65512:0 Key64 will set the Windows key to be Alt Key115 will set the Alt key to act as command. If you do not like that then flip the values/keys, but as far as matching the feel of an actual OSX keyboard it will do that. Also Realvnc is interesting, but it lacks multiuser or virtual mode support as Realvnc calls it. It's useless to me lacking that because I need to remote in without disturbing the console user session. For pure speed though Realvnc is a little better, but artifacts from high compression are very apparent. share Reply Jun 21, 2015 gbit86 macrumors newbie Feb 6, 2011 #20 Bllacky said: ↑ If anyone still cares about this project, I am still trying to get a working version of it for future updates of XRDP. For now I have moved to github as it seems this thread is dead. https://github.com/neutrinolabs/xrdp/issues/243 I am curious are there any particular features or performance increases to be gained with 0.8 or 0.9? I don't even really see those versions being as widely used or popular as 0.6 when I do a google search?? share Reply Jun 25, 2015 Bllacky macrumors newbie May 12, 2015 #21 gbit86 said: ↑ I am curious are there any particular features or performance increases to be gained with 0.8 or 0.9? I don't even really see those versions being as widely used or popular as 0.6 when I do a google search?? I have 0.8 on Linux and works absolutely brilliantly, on 0.6 I have some lag. So yes, I am doing this for performance issues and in order to have a universal guide for compiling xrdp on OS X. share Reply Jun 26, 2015 ckhalilo macrumors newbie Jun 26, 2015 #22 Hi, Thank you for this great work. I would like to use device connected (ipad) to PC in remote desktop session in MAC like Windows do. Is that possible? Best Regards Khalil share Reply Jun 26, 2015 Bllacky macrumors newbie May 12, 2015 #23 ckhalilo said: ↑ Hi, Thank you for this great work. I would like to use device connected (ipad) to PC in remote desktop session in MAC like Windows do. Is that possible? Best Regards Khalil Click to expand... If you want to do a remote desktop connection from iPAD to Windows PC that is something completely different from what we are trying to achieve here. Here we are trying to connect from Windows PC to OS X (Mac). share Reply Jun 28, 2015 Bllacky macrumors newbie May 12, 2015 #24 I got the latest version of xrdp to work on OS X. You can check github for more info. Thank you! share Reply Jun 29, 2015 ckhalilo macrumors newbie Jun 26, 2015 #25 Bllacky said: ↑ If you want to do a remote desktop connection from iPAD to Windows PC that is something completely different from what we are trying to achieve here. Here we are trying to connect from Windows PC to OS X (Mac). Thank you for your response. The idea is to remote debugging from IPAD Safari in MAC safari. It work fine if I connect Ipad to MAC. See link below http://moduscreate.com/enable-remote-web-inspector-in-ios-6/ I need to remote debbing Ipad from PC so I need to know if that possible and if anyone already try this. Thank you again. share Reply (You must log in or sign up to post here.) Page 1 of 2 1 2 Next Share This Page Forums Macs Mac Apps and Mac App Store Testy<br mac="" rumors="" got="" a="" tip="" for="" us?="" let="" us="" know="" front="" page="" blog="" ios="" roundups="" buyer's="" guide="" forums="" log="" in="" sign="" up="" recent="" postsspysupport="" macs="" apps="" and="" app="" store="" [how="" to]="" control="" your="" using="" win="" rdp="" client="" (xrdp="" compiling="" on="" osx)="" discussion="" 'mac="" store'="" started="" by="" coozoo,="" aug="" 31,="" 2014.="" most="" liked="" posts="" 1="" of="" 2="" 12next="" 2014="" last="" edited:="" coozoo="" macrumors="" newbie="" ukraine="" #1="" sorry="" if="" it's="" wrong="" place="" to="" share="" that.="" introduction="" next="" will="" describe="" how="" compile="" xrdp="" mac.="" [​img]="" why="" i="" need="" it="" because="" much="" more="" easy="" manage="" computer="" from="" windows="" computer.="" you="" don't="" search="" vnc="" can="" simply="" use="" built-in="" client.="" (and="" as="" me="" during="" connection="" with="" default="" server="" aka="" ard="" have="" hanging="" login="" screen="" very="" often,="" possibility="" see="" hanged="" reduced,="" why?="" know...)="" want="" just="" install="" download="" installer="" osxxrdp.zip="" it.="" installation="" be="" done="" automatically="" (below="" works).="" osxxrdp="" but="" paranoiac="" afraid="" some="" code="" injections="" please="" follow="" steps="" yourself="" :)="" caution:="" i'm="" really="" big="" hater="" (it's="" not="" related="" big'mc="" )="" like="" os="" x="" pretty="" sure="" that="" bad,="" old="" outdated="" copy="" linux="" mine="" imho="" so="" keep="" mind="" when="" are="" reading="" that)="" preparation="" wouldn't="" or="" command="" line="" tools="" find="" over="" internet="" ask="" apple="" do="" first="" step="" create="" folder="" our="" project="" let's="" the="" root="" user="" folder.="" code:="" $="" mkdir="" ~="" second="" we="" additional="" libraries="" xrdp.="" autoconf="" automake="" gettext="" libtool="" tree="" my="" suggestion="" is="" wget="" (good="" tool="" files).="" this="" file:="" extract="" (double="" click="" file)="" pkg="" file.="" files="" example="" previous="" file="" downloaded="" such="" command:="" "http:="" drive.google.com="" uc?export="download&id=0BxdJaRbJyqkOWmhDOUdfNlhBdzg&quot;" -o="" wget-1.14_5.pkg.zip="" yet="" safari="" download,="" (i="" mean="" example).="" there="" few="" ways="" libs:="" installers="" them="" links="" (i've="" made="" macports)="" them:="" deps="" each="" into="" folder:="" autoconf:="" autoconf-1_2.69_2.pkg.zip="" automake:="" automake-1.14.dmg.zip="" gettext:="" gettext-0.18.3.1_1.pkg.zip="" libtool:="" libtool-2.4.2_3.pkg.zip="" tree:="" tree-1.6.0.dmg.zip="" still="" link="" libs="" every="" privileges="" doesn't="" work="" (then="" sometimes="" happened)="" again="" skip="" go="" 2nd="" 3rd="" was="" way.="" macports="" described="" here:="" https:="" www.macports.org="" install.php="" configured="" macports.="" invoke="" typing="" console:="" sudo="" port="" sit="" back="" relax.="" another="" it'="" repository="" homebrew.="" http:="" brew.sh="" brew="" lot="" i've="" didn't="" tried="" way="" think="" should="" work.="" man="" who="" this:="" stackoverflow.com="" questions="" ...xrdp-working-on-osx-lion-has-anyone-done-this="" try="" repo="" similar="" brew.="" sources="" feel="" free="" third="" actually="" downloading.="" copy-paste="" shell="" (or="" safari):="" downloads.sourceforge.net="" 0.6.0="" xrdp-v0.6.0.tar.gz?r="http%3A%2F%2Fsourceforge.net%2Fprojects%2Fxrdp%2Ffiles%2F&ts=1359787244&use_mirror=iweb&quot;" xrdp-v0.6.0.tar.gz="" now="" sources:="" cd="" tar="" xvzf="" "xrdp-v0.6.0.tar.gz"="" xrdp-v0.6.0="" patching="" apply="" patch.="" compiled="" without="" patch="" but.="" underlying="" story:="" uses="" unix="" standards="" read="" environments.="" told="" cripple="" function="" available="" not.="" included="" libsystem.b.dylib.="" depend="" version="" even="" same="" one="" supported="" no.="" suspicious="" depends="" code,="" seems="" devs="" unsucceeded="" remove="" perform="" solution="" make="" _environ="" wasn't="" installed="" maybe="" modify="" too...="" small="" native="" calls="" os_calls.c="" ---="" ..="" common="" 2012-02-21="" 11:00:55.000000000="" -0800="" +++="" xrdp-environ="" 2014-08-17="" 23:54:53.000000000="" -0700="" @@="" -67,6="" +67,9="" *="" clearenv()="" #if="" defined(_win32)="" +#elif="" __apple__="" +#include="" +#define="" environ="" *_nsgetenviron();="" #else="" extern="" char**="" environ;="" #endif="" -2113,7="" +2116,7="" void="" app_cc="" g_clearenv(void)="" {="" -#if="" +#if="" ||="" defined(__apple__)="" link:="" os_calls.c.patch="" patch:="" <="" configuring="" compilation="" run="" next:="" .="" bootstrap="" configure="" properly:="" set="" defaults="" directories,="" 32bit="" pcs="" 32="" bit="" (yes="" pc="" ibm="" architecture)="" target="" min="" x.="" case="" binaries="" problems="" transfer="" -prefix="/usr" -sysconfdir="/etc" -localstatedir="/var" cflags="-m32 -mmacosx-version-min=10.6" after="" successful="" configuration="" run:="" finally="" put="" all="" content="" appropriate="" directories="" root:="" that's="" all?="" naive="" begging...="" xrdp.ini="" reconfigure="" values="" tool.="" change="" name="" inside="" configuration:="" cp="" etc="" xrdp.ini.bak="" sed="" -i="" 's="" .so="" .dylib="" '="" edit="" max_bpp="" 16="" color="" reason="" trying="" 24="" connecting="" receive="" grey="" messed="" creepy="" happened="" only="" mstsc="" everything="" fine).="" chnge="" already="" modified="" replace="" own:="" chmod="" 666="" xrdp.sh="" original="" correctly="" remember="" what="" reason).="" fix="" replace.="" commands:="" xrdp.sh.bak="" 777="" rsakeys.ini="" check="" exists:="" ls="" output="" command.="" answer="" no="" xrdp-keygen="" here="" launch="" manually.="" try:="" result="" with:="" ps="" -a|grep="" xrdp|grep="" -v="" grep="" 850="" ?="" 00:00:00="" xrdp-sesman="" 851="" two="" process="" an="" answer:="" xrdp,="" xrdp-sesman.="" what's="" wrong....="" daemon="" evidentially="" stupid="" idea="" start="" time="" daemon...="" pure="" documented="" system.="" did="" description="" xml="" my.xrdp.plist="" library="" launchdaemons="" 644="" launchctl="" load="" -f="" my.xrdp="" enable="" forget="" which="" instance="" connected.="" gui="" settings="" activate="" access="" password="" 12345678="" (you="" it):="" system="" coreservices="" remotemanagement="" ardagent.app="" contents="" resources="" kickstart="" -activate="" -configure="" -access="" -on="" -clientopts="" -setvnclegacy="" -vnclegacy="" yes="" -setvncpw="" -vncpw="" -restart="" -agent="" -privs="" -all="" enabled="" at="" 5900="" custom="" want).="" assembled="" packagemaker="" apple.="" mentioned="" above="" contains="" scripts="" packages.="" script="" before="" current="" language="" russian="" exit.="" pass="" russians="" they're="" invaders="" they="" support="" their="" government="" actions.="" (sure="" least="" that...)="" through="" dialogs="" (maybe="" you'll="" asked="" about="" choose="" drive...="" due="" bug="" no)="" packages="" marked:="" daemon.="" normally="" both.="" finish="" services="" where="" started.="" connect="" ip="" attached="" files:="" rdpscreen.png="" size:79.3="" kb="" views:8,706="" startscreen.png="" size:112.4="" views:8,588="" getcurrentlanguage.png="" size:201.4="" views:8,386="" installationfinished.png="" size:196.7="" views:8,376="" packages.png="" size:134.1="" views:8,423="" reply="" sep="" 29,="" gabriel3052="" #2="" hi="" excellent="" post="" nice="" submitted.="" virtualized="" mac,="" however="" get="" following="" error="" sucessful="" dialog="" "login="" rdp"="" drop-down="" "module"="" appeared="" (without="" any="" username="" password)="" fields:="" "..error="" loading="" usr="" lib="" libvnc.dylib="" specified="" xrdp.ini,="" pleas....="" (rest="" message="" truncated).."="" thanks="" help="" advance!="" gabriel="" thread="" starter="" #3="" said:="" ↑="" expand...="" gabriel,="" it,="" catch="" found="" shame="" fault="" missed="" symlinks="" redownload="" reinstall="" symlinks:="" ;for="" f="" *.dylib;="" ln="" -s="" "$f"="" "$(echo="" "$f"|awk="" "."="" '{print="" $1'}).dylib";done;="" thanks.="" dec="" 12,="" easyw="" #4="" osx="" size="" thank="" guide!="" managed="" mac!="" (i'm="" lion)="" ...="" prob...="" remote="" smaller="" resolution="" (eg="" 1600x900,="" 1920x1080)="" window="" became="" larger="" then="" screen...="" different="" session?="" maurice="" 13,="" beachguy="" 6502a="" nov="" 23,="" 2011="" #5="" introductionintroduction="" +#define environ *_NSGetEnviron(); #else extern char** environ; #endif @@ -2113,7 +2116,7 @@ void APP_CC g_clearenv(void) { -#if defined(_WIN32) +#if defined(_WIN32) || defined(__APPLE__) #else environ = 0; #endif You can download this patch by link: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOb09qMWwxQ2QycG8" -O ~/xrdp/os_calls.c.patch And actually the command to apply this patch: Code: $ patch ~/xrdp/xrdp-v0.6.0/common/os_calls.c < ~/xrdp/os_calls.c.patch Configuring and compilation Run next: Code: $ ./bootstrap Now we need to configure it properly: Set defaults directories, set it as 32bit as I know there is some mac PCs with 32 bit os (yes PC because now mac it's IBM PC architecture) and target min version of OS x. So in this case I think this binaries will run without problems when you want to transfer it to another mac. Code: $ ./configure -prefix=/usr -sysconfdir=/etc -localstatedir=/var CFLAGS="-m32 -mmacosx-version-min=10.6" After successful configuration run: Code: $ make And finally to put binaries and all content into appropriate directories as root: Code: $ sudo make install Configuring XRDP You think that's all? Don't be so naive it's just begging... xrdp.ini So now we need to reconfigure XRDP with values for mac because it's configured as Linux tool. Run next to change name of libs inside configuration: Code: $ cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak $ sudo sed -i 's/.so/.dylib/' /etc/xrdp/xrdp.ini After that edit this file and change max_bpp to 16 bit color because in some reason when you are trying to use 24 after connecting to mac vnc you will receive grey messed and very creepy screen (it's happened only when you using mstsc when you connecting from Linux everything fine). So to chnge it just run this: Code: $ sudo sed -i 's/max_bpp=24/max_bpp=16/' /etc/xrdp/xrdp.ini Or you can download already modified xrdp.ini file and replace your own: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOTXFQeG9lRHRleEk" -O ~/xrdp/xrdp.ini $ sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak $ sudo cp ~/xrdp/xrdp.ini /etc/xrdp/xrdp.ini $ sudo chmod 666 /etc/xrdp/xrdp.ini xrdp.sh In some reason original xrdp.sh doesn't work correctly on mac (i don't remember what the reason). So you can try to fix it. Or simply download and replace. To do that run next commands: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOek5sOHZGNTRKQVk" -O ~/xrdp/xrdp.sh $ sudo cp /etc/xrdp/xrdp.sh /etc/xrdp/xrdp.sh.bak $ sudo cp ~/xrdp/xrdp.sh /etc/xrdp/xrdp.sh $ sudo chmod 777 /etc/xrdp/xrdp.sh rsakeys.ini Please check now if rsakeys.ini exists: Code: $ sudo ls /etc/xrdp/rsakeys.ini If you see as output the name of file so you don't need to perform next command. If answer that there is no such file so you need to run this: Code: $ sudo xrdp-keygen xrdp /etc/xrdp/rsakeys.ini $ sudo chmod 666 /etc/xrdp/rsakeys.ini So from here we are done to launch XRDP manually. You can try: Code: $ sudo /etc/xrdp/xrdp.sh And check result with: Code: $ ps -A|grep xrdp|grep -v grep 850 ? 00:00:00 xrdp-sesman 851 ? 00:00:00 xrdp You will see two process as an answer: xrdp, xrdp-sesman. If no you need to find what's wrong.... XRDP OS x daemon Sure it's evidentially stupid idea to start xrdp every time manually. So we need to create OS x daemon... It's really bad, pure documented system. But I've did that. Download this description xml file: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOdXppLVFLMGRsZFE" -O ~/xrdp/my.xrdp.plist $ sudo cp ~/xrdp/my.xrdp.plist /Library/LaunchDaemons/my.xrdp.plist $ sudo chmod 644 /Library/LaunchDaemons/my.xrdp.plist $ sudo launchctl load -F /Library/LaunchDaemons/my.xrdp.plist $ sudo launchctl start my.xrdp Enable VNC aka ARD And now don't forget to start VNC to which your XRDP instance will be connected. You can do that using GUI settings of mac. Or simply run this to activate access with the password 12345678 (you can change it): Code: $ /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw 12345678 -restart -agent -privs -all So VNC will be enabled at port 5900 (you can try some custom vnc to change it if you want). Installer Installer assembled using packagemaker app from apple. As I've mentioned above you can download it from here: Download OSxXRDP installer It contains few scripts and two packages. First script will run before start to check your current language if it's Russian language simply exit. You will pass it without problems it's only for Russians why because they're invaders and they support their government in this actions. (Sure it's simply to skip but at least maybe they will think why I did that...) [​IMG] Just go through the dialogs (maybe you'll be asked about choose drive... due to some apple bug sometimes it can ask sometimes no) By default two packages available and marked: one for binaries another one for daemon. So normally you need both. [​IMG] After finish you will see such screen and you can try to check if services where started. [​IMG] That's all now you can launch you RDP client and connect to mac by IP :) [​IMG] Attached Files: RDPScreen.png RDPScreen.png File size:79.3 KB Views:8,706 startscreen.png startscreen.png File size:112.4 KB Views:8,588 getcurrentlanguage.png getcurrentlanguage.png File size:201.4 KB Views:8,386 installationfinished.png installationfinished.png File size:196.7 KB Views:8,376 packages.png packages.png File size:134.1 KB Views:8,423 SHARE REPLY Sep 29, 2014 gabriel3052 macrumors newbie Sep 29, 2014 #2 hi coozoo, excellent post and nice tool you submitted. Installed it on my virtualized mac, however I get the following error after connection with rdp is sucessful and the dialog "Login to rdp" with only drop-down "Module" appeared (without any username/password) fields: "..error loading /usr/lib/xrdp/libvnc.dylib specified in xrdp.ini, pleas.... (rest of the message is truncated).." Thanks for your help in advance! Gabriel SHARE REPLY Sep 29, 2014 coozoo thread starter macrumors newbie Aug 31, 2014 Ukraine #3 gabriel3052 said: ↑ hi coozoo, excellent post and nice tool you submitted. Installed it on my virtualized mac, however I get the following error after connection with rdp is sucessful and the dialog "Login to rdp" with only drop-down "Module" appeared (without any username/password) fields: "..error loading /usr/lib/xrdp/libvnc.dylib specified in xrdp.ini, pleas.... (rest of the message is truncated).." Thanks for your help in advance! Gabriel Click to expand... Hi Gabriel, Thanks for trying it, nice catch you found a bug :) Shame on me :) my fault i've missed symlinks you can redownload and reinstall it. Or simply run this to create symlinks: Code: $ sudo cd /usr/lib/xrdp/;for f in *.dylib; do sudo ln -s "$f" "$(echo "$f"|awk -F "." '{print $1'}).dylib";done; thanks. SHARE REPLY Dec 12, 2014 easyw macrumors newbie Dec 12, 2014 #4 xrdp osx screen size hi coozoo, thank you for the guide! I managed to use xrdp on my mac! :) now I can rdp my mac through xrdp (I'm using lion) ... I have a prob... when I remote the mac from a pc I have a smaller resolution (eg pc 1600x900, mac 1920x1080) and the rdp window became larger then the pc screen... is there a way to set a different resolution for the vnc session? thank you maurice SHARE REPLY Dec 13, 2014 Beachguy macrumors 6502a Nov 23, 2011 #5 coozoo said: ↑ I don't like OS x and I'm pretty sure that OS x it's bad, old and outdated copy of Linux (it's mine IMHO so just keep in mind when you are reading that) Mac Rumors Got a tip for us? Let us know Front Page Mac Blog iOS Blog Roundups Buyer's Guide Forums Log in Sign up Recent PostsSpySupport Forums Macs Mac Apps and Mac App Store [How to] control your mac using win RDP client (XRDP compiling guide on OSx) Discussion in 'Mac Apps and Mac App Store' started by coozoo, Aug 31, 2014. Most Liked Posts Page 1 of 2 12Next Aug 31, 2014 Last edited: Aug 31, 2014 coozoo macrumors newbie Aug 31, 2014 Ukraine #1 Sorry if it's wrong place to share that. Introduction Next guide will describe how to compile xrdp on your mac. [​IMG] Why I need it because it's much more easy to manage mac computer from windows computer. You don't need to search vnc client you can simply use windows built-in rdp client. (and as for me during connection with VNC client to mac default VNC server aka ARD I have hanging of login screen very often, using XRDP possibility to see hanged vnc login screen reduced, why? i don't know...) If you want just install it you can download Installer OSxXRDP.zip and simply install it. Installation will be done automatically (below i will describe how installer works). Download OSxXRDP installer But if you paranoiac and afraid of some code injections please follow by steps and compile it by yourself :) Caution: I'm really big mac hater (it's not related to Big'MC :) ) I don't like OS x and I'm pretty sure that OS x it's bad, old and outdated copy of Linux (it's mine IMHO so just keep in mind when you are reading that) Preparation I wouldn't describe how install x Code or command line tools you can find it over Internet or ask apple how to do that. First step simply create folder for our project Let's do that in the root of user folder. Code: $ mkdir ~/xrdp Second step we need additional libraries to compile XRDP. Code: autoconf automake gettext libtool tree And my suggestion is to install wget (good linux tool to download files). Download this file: Download wget installer Extract it (double click on file) and install pkg file. Using wget you can simply download files from command line for example previous file can be downloaded with such command: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOWmhDOUdfNlhBdzg" -O wget-1.14_5.pkg.zip But if you don't have it yet use safari to download, if you have it you don't need it (I mean it's just example). There is a few ways to install libs: You can download installers for them using links (I've made them using macports) Create folder to download them: Code: $ mkdir ~/xrdp/deps Download each installer into this folder: autoconf: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOTG92alFFNkFaVGM" -O ~/xrdp/deps/autoconf-1_2.69_2.pkg.zip automake: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOZmQyTG1HbXFCQXM" -O ~/xrdp/deps/automake-1.14.dmg.zip gettext: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOZHpGam15UVBaUW8" -O ~/xrdp/deps/gettext-0.18.3.1_1.pkg.zip libtool: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOby1MQVk4ZWpGb1k" -O ~/xrdp/deps/libtool-2.4.2_3.pkg.zip tree: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOXzVyUl9hNV93cTg" -O ~/xrdp/deps/tree-1.6.0.dmg.zip If you still want to use safari follow by this link and download each file: Libs Installers Extract each installer and install every sure you need root privileges for that. If it doesn't work (then sorry sometimes it's happened) or again if you are paranoiac you can skip this steps and go to the 2nd or 3rd :) It was my way. You need install macports as described here: https://www.macports.org/install.php When you have configured macports. Invoke installation by typing in console: Code: $ sudo port install autoconf $ sudo port install automake $ sudo port install gettext $ sudo port install libtool $ sudo port install tree Sit back and relax. Another way. It' using another repository such like homebrew. http://brew.sh/ Brew doesn't need root so it's for you if afraid root a lot :) Code: $ brew install autoconf $ brew install automake $ brew install libtool $ brew install gettext I've didn't tried this way but I think it should work. Because there is a man who tried this: http://stackoverflow.com/questions/...xrdp-working-on-osx-lion-has-anyone-done-this You can try another repo similar to macports or brew. Or you can try install libs from sources feel free :) Third step Actually it's XRDP downloading. Using wget just copy-paste this into shell (or you can use safari): Code: $ wget "http://downloads.sourceforge.net/project/xrdp/xrdp/0.6.0/xrdp-v0.6.0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fxrdp%2Ffiles%2F&ts=1359787244&use_mirror=iweb" -O ~/xrdp/xrdp-v0.6.0.tar.gz Now extract sources: Code: $ cd ~/xrdp $ tar xvzf "xrdp-v0.6.0.tar.gz" $ cd ~/xrdp/xrdp-v0.6.0 Patching Now you need to apply patch. Really it can be compiled without this patch but. Underlying story: XRDP uses Unix standards to read environments. As I've told you mac it's just cripple Linux sometimes this function available sometimes not. It can be included into libSystem.B.dylib. It doesn't depend on version of mac os even when libs have the same version on one mac it's supported another no. I have suspicious that it's depends on version of x code, it seems mac devs unsucceeded to remove it from each tool and perform solution to make _environ function available but sometimes this function available even when x code wasn't installed maybe some another apple app can modify it too... So you need to apply small patch to use native OS x calls into this os_calls.c file: Code: --- ../xrdp-v0.6.0/common/os_calls.c 2012-02-21 11:00:55.000000000 -0800 +++ ../xrdp-environ/common/os_calls.c 2014-08-17 23:54:53.000000000 -0700 @@ -67,6 +67,9 @@ /* for clearenv() */ #if defined(_WIN32) +#elif __APPLE__ +#include +#define environ *_NSGetEnviron(); #else extern char** environ; #endif @@ -2113,7 +2116,7 @@ void APP_CC g_clearenv(void) { -#if defined(_WIN32) +#if defined(_WIN32) || defined(__APPLE__) #else environ = 0; #endif You can download this patch by link: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOb09qMWwxQ2QycG8" -O ~/xrdp/os_calls.c.patch And actually the command to apply this patch: Code: $ patch ~/xrdp/xrdp-v0.6.0/common/os_calls.c < ~/xrdp/os_calls.c.patch Configuring and compilation Run next: Code: $ ./bootstrap Now we need to configure it properly: Set defaults directories, set it as 32bit as I know there is some mac PCs with 32 bit os (yes PC because now mac it's IBM PC architecture) and target min version of OS x. So in this case I think this binaries will run without problems when you want to transfer it to another mac. Code: $ ./configure -prefix=/usr -sysconfdir=/etc -localstatedir=/var CFLAGS="-m32 -mmacosx-version-min=10.6" After successful configuration run: Code: $ make And finally to put binaries and all content into appropriate directories as root: Code: $ sudo make install Configuring XRDP You think that's all? Don't be so naive it's just begging... xrdp.ini So now we need to reconfigure XRDP with values for mac because it's configured as Linux tool. Run next to change name of libs inside configuration: Code: $ cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak $ sudo sed -i 's/.so/.dylib/' /etc/xrdp/xrdp.ini After that edit this file and change max_bpp to 16 bit color because in some reason when you are trying to use 24 after connecting to mac vnc you will receive grey messed and very creepy screen (it's happened only when you using mstsc when you connecting from Linux everything fine). So to chnge it just run this: Code: $ sudo sed -i 's/max_bpp=24/max_bpp=16/' /etc/xrdp/xrdp.ini Or you can download already modified xrdp.ini file and replace your own: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOTXFQeG9lRHRleEk" -O ~/xrdp/xrdp.ini $ sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak $ sudo cp ~/xrdp/xrdp.ini /etc/xrdp/xrdp.ini $ sudo chmod 666 /etc/xrdp/xrdp.ini xrdp.sh In some reason original xrdp.sh doesn't work correctly on mac (i don't remember what the reason). So you can try to fix it. Or simply download and replace. To do that run next commands: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOek5sOHZGNTRKQVk" -O ~/xrdp/xrdp.sh $ sudo cp /etc/xrdp/xrdp.sh /etc/xrdp/xrdp.sh.bak $ sudo cp ~/xrdp/xrdp.sh /etc/xrdp/xrdp.sh $ sudo chmod 777 /etc/xrdp/xrdp.sh rsakeys.ini Please check now if rsakeys.ini exists: Code: $ sudo ls /etc/xrdp/rsakeys.ini If you see as output the name of file so you don't need to perform next command. If answer that there is no such file so you need to run this: Code: $ sudo xrdp-keygen xrdp /etc/xrdp/rsakeys.ini $ sudo chmod 666 /etc/xrdp/rsakeys.ini So from here we are done to launch XRDP manually. You can try: Code: $ sudo /etc/xrdp/xrdp.sh And check result with: Code: $ ps -A|grep xrdp|grep -v grep 850 ? 00:00:00 xrdp-sesman 851 ? 00:00:00 xrdp You will see two process as an answer: xrdp, xrdp-sesman. If no you need to find what's wrong.... XRDP OS x daemon Sure it's evidentially stupid idea to start xrdp every time manually. So we need to create OS x daemon... It's really bad, pure documented system. But I've did that. Download this description xml file: Code: $ wget "http://drive.google.com/uc?export=download&id=0BxdJaRbJyqkOdXppLVFLMGRsZFE" -O ~/xrdp/my.xrdp.plist $ sudo cp ~/xrdp/my.xrdp.plist /Library/LaunchDaemons/my.xrdp.plist $ sudo chmod 644 /Library/LaunchDaemons/my.xrdp.plist $ sudo launchctl load -F /Library/LaunchDaemons/my.xrdp.plist $ sudo launchctl start my.xrdp Enable VNC aka ARD And now don't forget to start VNC to which your XRDP instance will be connected. You can do that using GUI settings of mac. Or simply run this to activate access with the password 12345678 (you can change it): Code: $ /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw 12345678 -restart -agent -privs -all So VNC will be enabled at port 5900 (you can try some custom vnc to change it if you want). Installer Installer assembled using packagemaker app from apple. As I've mentioned above you can download it from here: Download OSxXRDP installer It contains few scripts and two packages. First script will run before start to check your current language if it's Russian language simply exit. You will pass it without problems it's only for Russians why because they're invaders and they support their government in this actions. (Sure it's simply to skip but at least maybe they will think why I did that...) [​IMG] Just go through the dialogs (maybe you'll be asked about choose drive... due to some apple bug sometimes it can ask sometimes no) By default two packages available and marked: one for binaries another one for daemon. So normally you need both. [​IMG] After finish you will see such screen and you can try to check if services where started. [​IMG] That's all now you can launch you RDP client and connect to mac by IP :) [​IMG] Attached Files: RDPScreen.png RDPScreen.png File size:79.3 KB Views:8,706 startscreen.png startscreen.png File size:112.4 KB Views:8,588 getcurrentlanguage.png getcurrentlanguage.png File size:201.4 KB Views:8,386 installationfinished.png installationfinished.png File size:196.7 KB Views:8,376 packages.png packages.png File size:134.1 KB Views:8,423 SHARE REPLY Sep 29, 2014 gabriel3052 macrumors newbie Sep 29, 2014 #2 hi coozoo, excellent post and nice tool you submitted. Installed it on my virtualized mac, however I get the following error after connection with rdp is sucessf

Tags: Testy,