Progate - A Remote Desktop Sharing System to support Multiparty Conference Prof. Rupali Bagate, Sumeet Singh, Rajni Joshi, Gaurav Pandey, Ritu Bhargarh Pursuing Fourth year degree course in Information Technology, University of Pune Army Institute of Technology, Pune, Maharashtra India www.aitpune.com rupali.bagate@gmail.com, sumeet.s.krishna@gmail.com, rajni.joshi0103@gmail.com, gauravpandey19914u@gmail.com, rtbhargarh203@gmail.com Abstract - PRO-GATE is a simple, fast and secure application for PC remote control which can support multiparty conference to share desktop for online presentations or collaboration. The basic purpose of PRO-GATE is to provide an application which will help the users in accessing and controlling any desktop from anywhere in the world. The idea is to create a virtual space for interaction of more than two users, i.e. a conference supportive system and not only peer-to-peer system. This allows creating, modifying and sharing documents and information jointly. Most of the available systems have bad scalability and slow down with increase in number of users, PRO-GATE uses existing technologies and advanced functions to provide a better real-time collaboration system. The user access in PRO-GATE is kept as simple as possible with minimal human intervention while setting up. This is an open source tool, and thus could be customized according to individual preferences. The application can be used in industries, organizations and educational institutes for collaborative studies, project demonstrations and distance learning. It can be used to maintain cyber security by monitoring any suspicious activities on desktop. Keywords – Collaboration, VNC – Virtual Network Computing; RFB – Remote Frame Buffer Protocol; Socket Programming; Multi-threading; GUI – Graphical User Interface I. INTRODUCTION PC remote control means ability to access and control a shared desktop from anywhere in the world. The user can log-in via a web application and directly view his/her desktop without tedious procedure. Collaboration means working together, a computer supported collaboration system would help to provide a remote support to create a notion of virtual space where online presentations and meetings could be held. And multiparty conference would support not only peer-to-peer interaction, but an ability to get more than two users to be able to collaborate and work together. Here multiple clients could use this real-time collaboration system to join a meeting hosted by a user, such that each one of them would be able to view and control the desktop of the host. These characteristics make it very useful in professional, educational and personal context – they enable exchange of information and documents, to create, share and modify projects and ideas jointly. The ability of this tool to be installed in a private network gives maximum security while sharing a desktop. Also it has functions to send chat messages, transfer files and folders, helping in exchange of information amongst individuals. There are already many Desktop Sharing Softwares available in markets which work on computer-supported real-time collaboration systems [6], but with certain limitations. 1) 2) 3) 4) Many systems are slow, i.e. have bad scalability as their performances decreases with the increase in number of users. Do not have a good Graphical user Interface, which could be easily used and understood by the users. Many of them are required to be installed at the user site and thus involve a tedious procedure while setting up for use. They charge for their commercial use, which makes it difficult for the start-up companies to provide remote support for the clients. In this paper, we propose an ALL IN ONE solution which overcomes above limitations. This is achieved by using existing technologies – VNC – Virtual Network Computing, which is having Remote Frame Buffer Protocol, RFB as its underlying technology [1][5]. VNC is a platformindependent system, which supports graphical desktop sharing. Optimization of VNC is done to support real time collaboration. Ruby on Rails – Rails is a web application development framework written in the Ruby language used to develop the Graphical User Interface. The GUI is such that it makes user access in PRO-GATE very simple with minimal human intervention while setting up. This is an open source tool so organizations can customize it according to their own needs. This paper is organized as: Section 2 specifies literature survey of the topic, Section 3 defines the Progate Design, Section 4 defines the algorithm and handling of clients and Section 5 depicts the conclusion and future work. II. RELATED WORK During detailed study of the existing technologies it was found that the following technologies would be required to develop the application. A. VNC B. Sockets VNC – Virtual Network Computing – is remote control software, which allows interacting with one computer using a simple program on another computer [1]. It is a protocol for accessing graphical user interfaces. It works at the framebuffer level, which makes it platform-independent, and thus it is potentially applicable to all operating systems. It thus allows a user to control a remote machine, i.e. server on a local machine, i.e. client. The basic operations: Sockets are used for inter-process communication. They are a way to speak to the other programs using standard UNIX file descriptors. Socket API is especially provided by the operating system allowing application programs to control and use network sockets [2][3]. File descriptor for network communication is got through a call to the socket () system routine, which returns the socket descriptor. Communication is done through it using the specialized send () and recv () socket calls. The file descriptor returned by socket () is sockfd, listen () is used to wait for the incoming connections, accept () returns a new socket file descriptor for each connection established. Socket-tosocket virtual connection is known as session and send () and recv () are used for communicating over datagram sockets or stream sockets, refer Figure 1. 1) VNC Server It is a program which runs on a machine that shares its screen. It allows to view a desktop not only on the machine on which it runs, but from anywhere on the Internet, The server sends framebuffer as small rectangles to the client and passively allows the client to take control of it [1]. 2) VNC Client It is a program installed on the client’s machine and connects to the server component [1]. Also known as VNC viewer, it watches, controls, and interacts with the remote machine, i.e. server by sending to it the inputs and accepting the outputs 3) RFB Protocol A Communication Protocol on which VNC is based. It is used to remotely access the graphical user interfaces. This protocol all server to update framebuffer which is displayed on viewer’s side. The events – keyboard press and mouse movements – messages from client are sent to server. Desktop is represented as small rectangles of pixel data at the specified x, y position and transmission is done by relaying the updated graphical screen portions in the other direction, over a network [1]. The RFB relies on sending encoded pixels to the client that contains the information of the Desktop of Server. The client then decodes the pixels and draws them on a graphical application running on its machine. Events occurring at the client side like keyboard press and mouse pointer movements are trapped and sent to the Server. Server then reflects back these changes. For this purpose the RFB protocol suggests the use of a Frame Buffer. The Frame Buffer actually contains the desktop information which is updated when the client generates any kind of event. This updated buffer must be sent to the Server which updates its own desktop accordingly. Similarly when the Server generates events that affect the desktop, the updated buffer is redrawn at the Client. This exchange of framebuffers provides synchronized desktop sharing. The basic emphasis is that there should be very few requirements at the client’s side. As RFB works at the level of framebuffer, it is independent of the platform, i.e. it is applicable to all windowing systems. So, clients can run on widest range of hardware, this makes implementation of client as simple as possible. Sockets deliver the incoming data packets to specific process or thread of an application. Server is the computer application that provides application services. It creates sockets on start up in listening mode [2] [7]. Once listener is run, all it does is to sit there and listen whether a packet arrives or not. Similarly many functions are there which are said to block, i.e. if there is no data, they sleep there until some data arrives. Such functions are accept (), recv (), even when the first socket descriptor is created using socket (), the kernel sets it to block. But to put a program on busy wait looking for data is not a good practice as it’ll suck up CPU time and thus reduces the overall efficiency. Figure 1. Server Client Communication C. Advanced Techniques To solve the above problem select () function can be used to perform synchronous handling of input and output at multiple sockets. Select (): This function is used as synchronous I/O multiplexing and thus can monitor multiple sockets, Figure 2, at the same time. It will tell which sockets are ready to read, which are ready to write and which ones have got an exception. And rather than always being in busy-wait condition while blocking to perform read and write operations, a time structure could be used to specify a timeout period. Thus select () function is used to determine the status of the sockets, that it handles [3] [7]. It has to monitor sets of file descriptors, FD_SET in a synchronous manner. web application [4].The user access in Progate is kept as simple as possible with minimal human intervention while setting up. As it provides one click access to the remote desktop this increases the ease of use of the product. This is facilitated by automatic downloading of the exe at the client’s side. It is an open source tool, free to use and could be customized according to individual preferences. B. Working Desktop sharing [8] such that one could access it from a distant place is kept simple. As soon as user registers using our web page an executable file is downloaded at user’s machine and irrespective of whether it is host machine or guest machine. This executable file is downloaded at user’s machine without any prompt to the user and since the size of file is too less, that is 52 kb, it is downloaded quickly. This downloaded file is stored in a temporary file (for example %temp% folder in windows) and hence it is executed. Now, the problem which may arise here is that the browser doesn’t have the rights to execute the executable file, but the java applet could execute it. As the browser can run the java applet. So now we were able to download and execute the executable file at user’s end without even bringing it in notice of user. Now, once this executable file is downloaded and executed it will start communicating with our Progate Server. And now the Server will just act as a bridge between the host client and the guest client and the executable file will run at both the clients. C. Role of Server Figure 2. File descriptors D. Ruby on rails Web development technology, wherein Rails is a web application development framework written in the Ruby language – a fully featured object-oriented language. In rails changes made are reflected immediately in run-time environment that makes it easier for developers to use [4]. Ruby on the other hand is also easily testable. Integration of Ruby with Rails is simply, clean and seamless due to dynamic nature of Ruby. So, ruby on rails provide a consistent approach to support development of web services. The server acts as a reflector, Figure 3, present in the public domain and maintains Control Connection table and Data connection Table. Control Connections are made first at the time of user log-in and registration in the Progate. Once the entries in control tables have been made, the user is free to either host a new session or to join an existing session by providing the id of the host to which it wishes to connect to. Data Connections are made in addition to handle the data transfer between the stream sockets for a particular session. The session ends as the client logs out or the meeting is no longer continued by the host. III. PROGATE DESIGN The requirements to design a real-time collaboration system to support interaction of more than two users were identified and above mentioned technologies were kept in mind while developing Progate.The design is focussed to provide an easy to access collaboration system that supports multiple users and not only peer-to-peer. A. GUI The Graphical user interface has been developed using Ruby on Rails, which provides a consistent way to develop a Figure 3. Server as a Reflector Here in the socket programming the server has to listen for incoming connections as well as keep reading and writing from and to the connections it already has. For this accept () and recv()s could be used as blocking functions but this sucks up CPU time and efficiency. As there are multiple users which are requesting server for connection and data transfer requests, so multiple threads are required to handle these connections. To share resources amongst multiple threads a function is required to assure thread safety, so that these threads can work simultaneously within the same process. So as discussed above an advanced function – select () – is thus used for synchronous I/O multiplexing to handle multiple sockets created by connection handling threads. The select () API [2] [3] creates a common point where multiple threads are put on to wait. This function monitors “sets” of file descriptors; in particular readfds, writefds, and exceptfds, thus multithreading can be handled efficiently. IV. METHODOLOGY For the tool to be developed, a very simple methodology is used in which the server will be running in listening mode [8]. As soon as the client logins, an executable will run on the client side which will contain the VNC server and the VNC client, these are responsible for desktop sharing as well as desktop accessing. This executable is responsible for connecting to the server and doing further work. The shared desktop and the sharing desktop are connected to the server via a control connection. This will create an entry in the control connection table which is present at the server location. Some of the columns in data connection table will be filled when the sharing desktop is connected and the entry will be full if the accessing desktop completes all the credentials and asks for the permission to access the desktop. The Client interacts with the Server through the following functions: Get Support Connection Setup method is called when a client asks to connect to Server and makes a Control Connection, Figure 4.1. Give Support Connection Setup provides Control Connection to the client, Figure 4.2.To request for data transmission Remote Support Request is done, Figure 4.3. Accept Support Acknowledgement, accepts the data connection request and a Data Connection gets established, Figure 4.4. After Data Connection establishment Data Exchange, Figure 4.5, occurs synchronously among the clients joined during a session. This way the server interacts with the clients who are connecting to it, and the data connections and data transfer are facilitated by the connection handler method which manages the file descriptors. This interaction between the Server and Client stops once a client either logs out or the host dissolves the session, causing the data connections with its clients to get cleaned up. This could be done using Get Logout Request and Give Logout Request methods. Figure 4. Sequence Diagrams A. SERVER CONFIGURATION V. CONCLUSION The server maintains the record of clients which wants to share the desktop. It bridges the data connection of interested clients. Control connection of client with server is always active. Better is the connectivity between two machines better will be the Performance. Connection Schema identifying clients on Server is stored in the following manner, Figure 5: TABLE I CONTROL CONNECTION TABLE USER ID PASSWORD SYSTEM ID SOCKET ID TABLE II DATA CONNECTION TABLE REQ SYS ID TARGET SYS ID REQ USER ID TARGET USER ID REQ CONTROL SOCK ID TARGET CONTROL SOCK ID Figure 5. Control and Data Connection Tables The data connection table is partially created when the meeting is created and fully filled when somebody else joins the meeting. Unique ID will be generated for each meeting which will help the users to make their meeting private and secure. So until or unless you don’t make your team ID public you are safe. B. APPROACH TO IMPLEMENTATION The project is divided in many phases as given below:1. 2. 3. It includes making PROGATE as an online service and as a software that can be installed in a network. It focuses on providing registration facility and multiparty conferences. It is the final phase and includes providing security to the system using SSL encryption. The code for the server and the client can be written using socket programming in any language like C++/java. The existing technologies and additional advanced functions along with a user friendly GUI could create a much faster and simpler remote desktop sharing system to support multiparty conference where in addition to peer-to-peer, more than two users can interact. The project is free and open source, the source code and documentation would be available at the project web site. The multiple clients are handled by providing a time slice to the sockets requesting for data transmission and thus the multiple threads governing the sockets are handled accordingly. The increase in number of users, i.e. the scalability can be taken care of by extending VNC to support multicast data transmission. Whether you want quick access to your home computer from anywhere in the world, remote desktop applications can make your life easier. With the right remote desktop tool, you can access your home computer as though you're sitting right in front of it— no matter where you are, no matter what you're doing. VI. FUTURE WORK Future enhancements could be done to extend the audio and video abilities of remote desktop sharing. As the tool goes by the open source terms anyone in the world can access the source code and make the changes for the betterment of the System. It will be released as a free service for the use of common man. To ensure the better scalability and performance of the service it will be hosted on Cloud. Mobile based application which will be having the potential to support the service can be developed. ACKNOWLEDGMENT Propalms pvt ltd sponsored the project Progate. Mr. Vijender Yadav, the external guide and Prof. Rupali Bagate, project guide at Army Institute of Technology wishes to acknowledge Sumeet Singh, Gaurav Pandey, Rajni Joshi and Ritu Bhargarh for developing Progate to support remote desktop sharing for multiparty conference. This research is totally attributed to the guidance of above mentioned. REFERENCES [1] [2] [3] [4] Tristan Richardson; Quentin Stafford-Fraser; Kenneth R.Wood & Andy Hooper (January / February 1998) "VirtualNetworkComputing":http://aardappel.13thmo nkey.org/ documentation/misc/VNC-paper-98.1.pdf Socket_programming :http://home.iitk.ac.in/~chebrol u/ee673-f06/sockets.pdf Beej’s Guide to Network Programming : http://beej.us/guide/bgnet/output/html/singlepage/b gnet.html Ruby on rails: http://www.abletech.co.nz/blog/whitepaper-10-reasons-for-ruby-on-rails [5] [6] Beier,C.:CollabKit-A Multi-User Multicast Collaboration System based on VNC, HU-Berlin, Thesis, 04 2011. http://edoc.huberlin.de/docviews/abstract .php?id=39 389 Existing_Technologies:http://www.brighthub. com/office/ collaboration/articles/ 71329.aspx [7] [8] Interconnection Networks, An Engineering Approach by José Duato, Sudhakar Yalamanchili, and Lionel Ni S Ichimura, Y Matsushita "Lightweight Desktop-Sharing System for Web Browsers" IEEE 2005