Are there any libraries for connecting as a client via Remote Desktop Protocol (RDP) in Linux? The language used is secondary to the issue of existence. Any mainstream language would do (e.g. C++, Perl, Java, Ruby, PHP, Python), and even less popular ones like OCaml or Scheme.
Is there any option available other than taking the rdesktop source and hacking a library out of that?
There is a set of cross-platform open source RDP libraries available in FreeRDP project. They are written in C and under Apache Licence 2.0. See http://www.freerdp.com
Typing rdp into my Mandriva Software Managment tool revealed libxrdp which is a library that xrdp depends on but I don't know the details so it may not be what you want.
The project website is xrdp.sourceforge.net.
You can look at these implementations:
FreeRDP (Apache License) - mostly C.
FreeRDP C# bindings
FreeRDP-WebConnect for HTML5 stuff
rdesktop (GPLv2) - mostly C.
rdpy (GPLv3) - python but bitmap stuff is written in C (borrowing code from rdesktop)
properJavaRDP (GPL) - java
Non portable implementations:
Terminals (MS-CL) - visual studio project.
And the reference documents:
http://msdn.microsoft.com/en-us/library/cc240445.aspx
http://msdn.microsoft.com/en-us/library/cc240452.aspx (message flows / connection sequence)
rdesktop is going to be your best option. The code is quite clean and I don't think making a library would be a huge deal.
Another option if you prefer Java is the ProperJavaRDP Client http://properjavardp.sourceforge.net/ . It's nearly a strait port of rdesktop.
Sorry, but a quick strace and nm of rdesktop reveal nothing beyond X, crypto, and compression libs.
rdesktop does allow embedding into other windows, how does it not serve your purpose?
See the -X option in help
You could embed rdesktop in a window of your own per J-16 SDIZ's suggestion and then send X.org events to that window programmatically. A similar route would be to install a VNC server on the Windows machine and run a VNC client on the Linux machine. That way you can also programmatically send X.org events to the VNC client.
This is what browsershots.org uses to programmatically control various web browsers in a cross-platform way through Python. Have a look at the gui directory if the browsershots.org client source code
I've gotten xrdp to work with RHEL on EC2: xrdp.org
Related
There is an API in windows called URLDownloadToCacheFile that downloads data to the Internet cache and returns the file name of the cache location for retrieving the bits.
Is there any API (C/C++) in linux that downloads a file from internet?
There are some libraries (eg. curl, ...) that useful for downloading but I want a simpler API that does not deponds on any other libraries except browser.
Note that I want a C/C++ API, not a command line tool.
Thanks
A browser is an external application. On a typical Linux system, there's nothing which has the status comparable to that of IE on Windows. You can use Firefox as your browser; you can also completely uninstall Firefox and use only Chrome; you can even use w3m exclusively and no single GUI-based browser.
You seem to be somewhat confused about the differences between Windows and other operating systems.
There's no monolithic "browser" or "Internet cache" built into linux. In Windows you're simply using a function from a library they provide, but it's integrated into the OS (along with Internet Explorer).
There's really no parallel in linux. The OS is not tightly coupled with applications running on it. Using cURL, etc is how you approach what you're trying to do.
Like the other answers noted, there is no such thing as a built-in HTTP API on Linux systems, and you should be quick to accept that you need a HTTP library to do the task. But fear not, linking to libraries and deploying programs linked to libraries is much easier and less error-prone than under windows systems, so library dependencies are not that much of an issue.
libcurl is a well-established solution for HTTP and HTTPS.
I have been using a chrome book for a few months now. I also have been designing a web page. A lot of the work can be done via word press's lame gui, but like any coder, I want to use a real text editor, specifically vi/vim.
I have done some searching around. I found one java script implementation of vi, but it's not good enough IMO to use. Conversely, I'd like to ssh into one of my *nix boxes and use vi that way, although you cannot do that from web pages it seems. HTTP vs TCP issues. Not sure if WebSockets will be able to get around this.
Lastly, I've been looking at plugins. While some decent ones seem to be available for Firefox, the Chrome division is lacking severely.
One desparate try is vnc, but this chromebook has no javascrip support, not can I get the HTML5 vnc running quite right.
Does anyone have any suggestions?
Edit/Update:
Thanks for everyone's effort in answering. I quickly abandoned coding on the netbook, but it looks like some great answers were provided.
I am on a Samsung ARM Chromebook and I do a lot of development work in Vim. Here's how I prefer to do it:
Enable Developer Mode, then download crouton.
Open a shell:
<ctrl><alt>t
...and install Ubuntu command-line environment
sudo sh -e crouton -t cli-extra
Enter the chroot using
sudo enter-chroot
From inside the chroot install vim
sudo apt-get install vim
There are lots more instructions and examples on the crouton github page.
I prefer the command line only version because I can just have Ubuntu in another tab, and all the Chromebook keyboard shortcuts Just Work.
You have few options:
Cloud9, an IDE for JavaScript, Python, PHP, and Ruby. Cloud9 uses the HTML5 FileSystem capability and AppCache to sync files, so you can even code offline. It got some really nice features that I find myself using a lot: github integration, chat, the ability to work and do reviews on your code without any pain of ‘new/other’ tools.
Kodingen is an Online Development Environment including Code Editor, Cloud Hosting etc'. I haven’t play with it (yet) – but I’ve heard some friends that like it.
Codey - Easy to use code editor for HTML, PHP, CSS, JS. They are in Chrome web store.
Akshell - Server-side JavaScript development and hosting platform. They got some git integration built in their IDE.
I hope it helps.
For more, I've posted something about this Q few months ago: http://greenido.wordpress.com/2011/07/04/web-developers-and-the-new-chromebook/
There are web shells: this is the first one that came up with a search, but there are others. Be sure to use HTTPS and place it behind a authentication gateway. I can't vouch for how well they handle vim and it's interesting screen modes, but hopefully one of them might work.
How about SourceKit? Unforunately the bindings are closer to textmate, it has great highlighting and IMHO the text will be easier on the eyes than if you were looking at tiny shell font.
I've picked up a legacy application developed in C/C++ on Linux, using ncurses for UI. What automated testing tools are there for this environment?
Edit: I've used AutomatedQA TestComplete in the past, and this is the type of tool I'm looking for - except running on Linux, and with the ability to test Text UI apps.
I wrote something like that before. Not much docs, but you can try the code. It's written in Python and runs on Linux.
You would basically need the ANSIterm filter, and the expect module. Then you compose them into a filter. You'll likely have to start the process with the proctools module. They are all designed to work together or separately (modular).
I have considered using Rational Function Tester and TestComplete.
RFT has explicit support for testing this type of application (text-mode linux) via built-in terminal emulation.
TestComplete does not support testing Linux apps directly, but can be made to work by "testing" a COM-enabled terminal emulation program (Attachmate Reflection at this stage), and using COM from the test scripts to do screen scraping.
Have also considered using Reflection as the terminal emulator and rolling my own test framework in C# and NUnit.
Edit: "Final" solution is using Terminator (a Java terminal emulator), extending it with an RMI interface and using TestNG...
The expect tool sounds like what you need: http://linux.die.net/man/1/expect
Have a look at the free version of TETware from the Open Group. It is a full test harness based on TCL.
After a lot of searching I have yet to find a way to sign a BlackBerry application on a Linux distribution with no GUI.
As of right now I'm getting the error "Unable to request signatures until this application has completed the initial key generation.". The problem is I'm not able to register the CSI files it seems via CLI. Has anyone accomplished this without setting up X11?
Yes, its definitely possible to do this on a headless Linux box. Heck, I do it on a headless Solaris/UltraSPARC server :-)
For actually running the tool, I like http://bb-ant-tools.sf.net/ . If you are using an older version of the signature tool, you may need to make some modifications as described on http://slashdev.ca/ .
While the tool is fully controllable from command-line parameters, it does unfortunately still require access to a running X server to function. The workaround for this is to install "Xvfb" (a fake X server for purposes like this), launch it in the background on your system, then set the DISPLAY variable so the signature tool will use it for its non-interactive GUI.
Blackberry sigtool may not be supported in Linux and it may be only partially working. BB dev tools are still Windows-centric.
Is there any UI library that can be to build both a text user interface (ncurses) and graphical user interface (GTK? QT?) from the same source?
I know that debconf can be used with various frontends, I would like to build something similar but programmable.
The library that powers YaST independence to do ncurses, gtk and qt with one codebase provides what you are looking for, and it is not tied to YaST itself.
Actually libyui only requires the standard C++ library and phtreads (IIRC). The UI plugins require of course the respective libraries (Qt, ncurses). YaST uses libyui via a set of YCP bindings that export a YCP like API on top of libyui.
The library is a bit lowlevel (one layer below an event loop), my colleage Klaus Kämpf wrote about using it some time ago in his blog, including binding to scripting languages it using swig.
The only part that is SUSE specific is the packaging, so you would need to package it yourself. Stackoverflow did not allow me to link more than once. The code of the library is linked from Klaus blog. Replace libyui for "qt" and "ncurses" for the plugin's code.
Also google for "YaST Independence From YCP" to find a blog entry from Andreas Jäger on the subject.
you could write your program to uses ncurses, and then use PDCurses to convert it to an X11 application - as the readme advertise.
I know it because I've used it as portable curses, though I've never tested its X11 capabilities
Not exactly a library but you could consider writing a web app that degrades well to Lynx
The GoboLinux guys have created their own toolkit for python called AbsTK, they use it for their installer, which actually works really good. I have never used the toolkit myself, but the apps built with it seems solid.
There's Cursed GTK, but it seems a bit dated. I found some references to a port of Qt to ncurses called Qt Console, but it seems to have disappeared.
By using a library that targets both the text-mode and GUI environments, you have a big risk of getting stuck with the worst of both worlds.
You will be better off structuring your code using the MVC pattern, and providing separate views and controllers for each platform you target. Pushing all the logic down to the model classes has several other benefits:
The code will be easier to test because you are forced to keep the user interface out of the actual domain logic.
Your program can have user interfaces that have very little in common, e.g. a web UI, or an UI driven by speech.
You can run the program easily with no UI at all (i.e. script it) by accessing the model classes directly in the same way that the controller classes do.
I think what's used for configuring the linux kernel when compiling is dialog/cdialog/xdialog. But it's been a while since I've compiled a kernel, so my memory may be off. The most promising link I can find is this one for Xdialog.
Maybe tcl/tk would provide what you want http://www.tcl.tk/
Here's the page on interfacing with curses. There is a claim there of integration with ncurses.
http://www2.tcl.tk/2372