Operation system, method and equipment compatible with Linux application, medium and product
By deploying shell applications and window compositors in the OpenHarmony operating system, combined with remote desktop protocols and protocol compatibility services, the problem of insufficient application ecosystem in the OpenHarmony operating system is solved, achieving seamless compatibility with Linux applications and expanding application scenarios, thereby improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 深圳开鸿数字产业发展有限公司
- Filing Date
- 2025-12-12
- Publication Date
- 2026-05-12
AI Technical Summary
The existing application ecosystem of the OpenHarmony operating system is significantly lacking in the variety and number of applications compared to other mature operating systems, which limits the expansion of its application scenarios and causes inconvenience to users.
This invention provides an operating system compatible with Linux applications. By deploying a shell application and a window compositor on the desktop operating system, data transmission is carried out using the remote desktop protocol, and protocol compatibility services are introduced, enabling Linux applications with different communication protocols to seamlessly access the system and realize the display of window images and the transmission of control commands.
It achieves seamless compatibility of Linux applications on the OpenHarmony operating system, expands application scenarios, enhances system compatibility and flexibility, and improves user operation convenience.
Smart Images

Figure CN122018969A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer operating system technology, and in particular to an operating system, method, device, medium and product compatible with Linux applications. Background Technology
[0002] With the rapid development of information technology and the increasing prevalence of smart terminal devices, the importance of the operating system as the core software platform for these devices is self-evident. OpenHarmony, an open-source project incubated and operated by the OpenAtoms Foundation, aims to build a framework and platform for an operating system for smart terminal devices, realizing the vision of the Internet of Everything. However, the existing application ecosystem of the OpenHarmony operating system is significantly insufficient in terms of the variety and number of applications compared to other mature operating systems, limiting the expansion of OpenHarmony's application scenarios and causing inconvenience for users.
[0003] Therefore, existing technologies still need to be improved and enhanced. Summary of the Invention
[0004] The technical problem this application aims to solve is to provide an operating system, method, device, medium, and product that are compatible with Linux applications, addressing the shortcomings of existing technologies.
[0005] To address the aforementioned technical problems, the first aspect of this application provides an operating system compatible with Linux applications. This Linux-compatible operating system includes a desktop operating system that runs a Linux system. The desktop operating system deploys Linux services and a shell application that communicates with the Linux services. The Linux system deploys a window compositor and a Linux application corresponding to the shell application. The Linux application communicates with the window compositor, and the window compositor communicates with the Linux services. The window synthesizer is used to transmit the window image formed by the Linux application to the Linux service; The Linux service is used to receive the window image and distribute the window image to the shell application; The shell application is used to display the window image and transmit received control commands to the Linux service; The Linux service is also used to send the control commands to the window compositor; The window synthesizer is also used to transmit the control commands to the Linux application.
[0006] The operating system compatible with Linux applications includes a protocol compatibility service deployed within the Linux system. This protocol compatibility service is communicatively connected to the window compatibility service. The protocol compatibility service is used to ensure compatibility with third-party protocols on the communication protocols supported by the window compatibility service, so that Linux applications using third-party protocols can communicate with the window compatibility service through the protocol compatibility service.
[0007] The second aspect of this application provides a compatibility method for Linux applications, using an operating system compatible with Linux applications as described above. The Linux application compatibility method specifically includes: The window synthesizer receives the window image generated by the Linux application and transmits the window image to the Linux service. The window image is distributed to the shell application corresponding to the Linux application through the Linux service, and the window image is displayed through the shell application.
[0008] The method for ensuring compatibility with Linux applications, wherein before receiving the window image formed by the Linux application through the window compositor, the method further includes: Control the startup of the shell application and send the application startup message to the Linux service; The application startup message is transmitted to the window compositor via the Linux service. The Linux application corresponding to the shell application is launched through the window synthesizer.
[0009] The aforementioned method for ensuring compatibility with Linux applications further includes: The Linux service receives control commands for the shell application and transmits these control commands to the window synthesizer. The control commands are transmitted to the Linux application corresponding to the shell application through the window synthesizer, so that the Linux application responds to the control commands.
[0010] The Linux application compatibility method wherein the control instructions include at least one of the following: control instructions based on mouse input events, control instructions based on the window image, or control instructions input from an external control device.
[0011] The Linux application compatibility method includes the following steps: when the desktop operating system includes a protocol compatibility service, when the Linux application supports the communication protocol used by the window compositor, the Linux application communicates directly with the window compositor; when the Linux application supports the communication protocol used by the protocol compatibility service, the Linux application communicates with the window compositor through the protocol compatibility service.
[0012] A third aspect of this application provides a Linux application compatible device, the Linux application compatible device comprising: an operating system, a memory, a processor, and a computer program stored on the memory and executable on the processor as described above, the computer program being configured to implement the steps of the Linux application compatible method as described above.
[0013] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the Linux application compatibility method described above.
[0014] The fifth aspect of this application provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of the Linux application compatibility method as described above.
[0015] Beneficial Effects: This application provides an operating system, method, device, medium, and product compatible with Linux applications. The system includes a desktop operating system that runs Linux compatiblely. The desktop operating system deploys a Linux service and a shell application that communicates with the Linux service. The Linux system deploys a window compositor and a Linux application corresponding to the shell application. The Linux application communicates with the window compositor, and the window compositor communicates with the Linux service. The window compositor is used to transmit the window image formed by the Linux application to the Linux service. The Linux service is used to receive the window image and distribute it to the shell application. The shell application is used to display the window image and transmit received control commands to the Linux service. The Linux service is also used to send the control commands to the window compositor. The window compositor is also used to transmit the control commands to the Linux application. This application, by deploying a shell application on a desktop operating system and then using the cooperation between the window compositor and the Linux service to enable the shell application to display the window image of the Linux application, realizes the use of Linux applications on a desktop operating system, compensates for the shortcomings of the existing OpenHarmony operating system's application ecosystem, expands the application scenarios of the OpenHarmony operating system, and brings convenience to users.
[0016] Furthermore, the operating system for Linux applications proposed in this application not only supports direct communication between window synthesizers based on the Wayland protocol and Linux applications, but also enables seamless access for Linux applications using third-party protocols such as x11 by introducing protocol compatibility services, further enhancing the system's compatibility and flexibility. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A schematic diagram of an operating system compatible with Linux applications provided in an embodiment of this application.
[0019] Figure 2 A flowchart illustrating a Linux application compatibility method provided in an embodiment of this application.
[0020] Figure 3This is a flowchart illustrating the startup process of a Linux application.
[0021] Figure 4 A flowchart illustrating the response process of Linux applications to control commands.
[0022] Figure 5 A schematic diagram of a Linux application compatible device provided in the embodiments of this application. Detailed Implementation
[0023] This application provides an operating system, method, device, medium, and product compatible with Linux applications. To make the objectives, technical solutions, and effects of this application clearer and more explicit, the following detailed description is provided with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining this application and are not intended to limit this application.
[0024] Those skilled in the art will understand that, unless explicitly stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application’s specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0025] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0026] It should be understood that the sequence number and size of each step in this embodiment do not imply the order of execution. The execution order of each process is determined by its function and internal logic, and should not constitute any limitation on the implementation process of this application embodiment.
[0027] Research has revealed that with the rapid development of information technology and the increasing prevalence of smart terminal devices, the importance of the operating system, as the core software platform of these devices, is self-evident. OpenHarmony, an open-source project incubated and operated by the OpenAtoms Foundation, aims to build a framework and platform for an operating system for smart terminal devices, realizing the vision of the Internet of Things. However, the existing application ecosystem of the OpenHarmony operating system is significantly insufficient in terms of the variety and number of applications compared to other mature operating systems, limiting the expansion of OpenHarmony's application scenarios and causing inconvenience for users.
[0028] To address the aforementioned issues, this application provides an operating system, method, device, medium, and product compatible with Linux applications. The system includes a desktop operating system that is compatible with running a Linux system. The desktop operating system deploys Linux services and shell applications that communicate with the Linux services. The window synthesizer is used to transmit the window image formed by the Linux application to the Linux service; The Linux service is used to receive the window image and distribute the window image to the shell application; The shell application is used to display the window image and transmit received control commands to the Linux service; The Linux service is also used to send the control commands to the window compositor; The window synthesizer is also used to transmit the control commands to the Linux application.
[0029] This application enables the use of Linux applications on desktop operating systems by deploying a shell application on a desktop operating system and then using the cooperation between a window compositor and Linux services to display the window image of a Linux application. This compensates for the shortcomings of the existing application ecosystem of the OpenHarmony operating system, expands the application scenarios of OpenHarmony, and brings convenience to users. Furthermore, the Linux-compatible operating system proposed in this application not only supports direct communication between the Wayland protocol-based window compositor and Linux applications, but also introduces protocol compatibility services, allowing seamless integration of Linux applications using third-party protocols such as x11, further enhancing the system's compatibility and flexibility.
[0030] The application content will be further explained below with reference to the accompanying drawings and the description of the embodiments.
[0031] This embodiment provides an operating system compatible with Linux applications, such as... Figure 1 As shown, the operating system compatible with Linux applications includes a desktop operating system, which is compatible with running Linux systems. The desktop operating system deploys Linux services and shell applications that communicate with the Linux services. The Linux system deploys a window compositor and Linux applications corresponding to the shell applications. The Linux applications communicate with the window compositor, and the window compositor communicates with the Linux services. The window synthesizer is used to transmit the window image formed by the Linux application to the Linux service; The Linux service is used to receive the window image and distribute the window image to the shell application; The shell application is used to display the window image and transmit received control commands to the Linux service; The Linux service is also used to send the control commands to the window compositor; The window synthesizer is also used to transmit the control commands to the Linux application.
[0032] In this embodiment, the Linux system runs as a Linux container within a desktop operating system, specifically the OpenHarmony desktop operating system. After the desktop operating system boots, it can use Docker to start the Linux container, thereby launching the Linux system running within it and ensuring compatibility between the desktop operating system and the Linux system. The Linux container contains a window compositor, a protocol compatibility service, and Linux applications, all of which run behind the Linux container.
[0033] The Linux application refers to various applications running on the Linux system, such as social media applications, email applications, and calendar applications. It typically includes a user interface (UI), a business logic layer, and a data storage layer. The Linux application can run and generate a window image, which is then transmitted to a window compositor. After receiving the window image, the window compositor transmits the window image generated by the Linux application to the Linux service, enabling the Linux service to obtain the window image to be displayed by the shell application.
[0034] In this embodiment, the window compositor and the Linux service can negotiate data transmission using the Remote Desktop Protocol (RDP). The RDP allows users to remotely connect from their local devices to computers running Windows or other RDP-compatible operating systems, thereby accessing the remote computer's desktop environment, applications, file resources, and enabling operation and management of the remote computer, achieving cross-platform remote desktop interaction. Specifically, the Linux container runs the freeRDP remote desktop processing program, and the window compositor uses freeRDP to transmit data with the Linux service. When transmitting window images between the window compositor and the Linux service, the window compositor's display backend is configured with a remote desktop transmission mode. In this mode, the window compositor acts as the remote desktop transmission server, and the Linux service acts as the remote desktop transmission client. The Linux service can then use the remote desktop protocol to obtain window images from the window compositor, allowing the window compositor to transmit the window images to the Linux service. This embodiment achieves efficient and stable transmission of window images from the window compositor to the Linux service by using the window compositor as the remote desktop transmission server and the Linux service as the remote desktop transmission client. This transmission method not only ensures data integrity but also improves transmission efficiency, making Linux applications display more smoothly on desktop operating systems.
[0035] It's understandable that the Linux service, acting as a remote desktop transmission client, receives window images transmitted by the window compositor and distributes these images to the shell application. Specifically, the Linux service can create an RDP client and a communication service. The RDP client connects to the window compositor and transmits data via TCP. For example, if the window compositor has an RDP service deployed within it, this RDP service acts as the RDP server, and the RDP client connects to this service and transmits data via TCP. The communication service communicates with the shell application to transmit window images or messages from the shell application, such as startup messages and control information.
[0036] A shell application is an application in a desktop operating system that corresponds one-to-one with a Linux application. It receives and displays the window images of the Linux application. A shell application may include a user interface renderer and user interface display functionality. The shell application receives the window images sent by the Linux service and renders them using its own user interface renderer to adapt to the desktop operating system's display environment and user operating habits. After rendering, it uses the user interface display functionality to accurately display the window images on the desktop operating system's interface, presenting the user with a visual experience similar to running on a native Linux system.
[0037] The shell application also receives control commands for itself. These commands can include those generated by mouse input events, those generated based on the window image, or those input from external control devices. Specifically, when the shell application displays a window image on the desktop operating system, operations can be performed on it. These operations can be generated by the mouse, by touching the window image, or by being triggered by an external control device. These operations can include clicking, swiping, and inputting. The shell application captures the control commands generated by these operations and transmits them to the Linux service. Upon receiving the control commands, the Linux service forwards them to the window compositor via a communication connection. The window compositor then responds to the Linux application with corresponding actions based on the received control commands, such as adjusting the window size, switching window focus, or executing application functions.
[0038] This application's embodiments implement a Linux-compatible operating system through a window synthesizer and Linux services. This Linux-compatible operating system adopts a modular design, with each module component relatively independent, facilitating its expansion and upgrades, and improving its scalability and compatibility. For example, when more types of Linux applications need to be supported, the corresponding applications can simply be added to the Linux container; when window image transmission efficiency needs to be optimized, the remote desktop protocol can be upgraded or a more efficient transmission method can be adopted.
[0039] In one embodiment, Linux applications may support different communication protocols. For example, some Linux applications support the Wayland protocol, while others support the x11 protocol. When building a window compositor, the compositor typically supports one of the communication protocols supported by the Linux application. For instance, if the compositor supports the Wayland protocol, a Linux application supporting the x11 protocol will not be compatible with the desktop operating system. Conversely, if the compositor supports the x11 protocol, a Linux application supporting the Wayland protocol will not be compatible with the desktop operating system.
[0040] To this end, a protocol compatibility service is also deployed in the Linux container. This service communicates with the window compatibility generator and is used to ensure compatibility with third-party protocols on the communication protocols supported by the window compatibility generator. This allows Linux applications using third-party protocols to communicate with the window compatibility generator through the protocol compatibility service. In other words, for a Linux application using a third-party protocol, the application can first communicate with the protocol compatibility service, and then communicate with the window compatibility generator through the protocol compatibility service. Specifically, in this embodiment, the communication protocol supported by the window compatibility generator is the Wayland protocol; the third-party protocol is the x11 protocol. Of course, in practical applications, the Linux container can deploy multiple protocol compatibility services according to actual needs, each corresponding to a third-party protocol, so that the desktop operating system can be compatible with various Linux applications using different communication protocols.
[0041] This embodiment introduces protocol compatibility services into the Linux container, enabling Linux applications using third-party protocols to seamlessly access the desktop operating system. This further enhances the compatibility and flexibility of the desktop operating system, meeting the usage needs of different users in different scenarios.
[0042] Based on the aforementioned operating system compatible with Linux applications, this application provides a method for ensuring compatibility with Linux applications, using the aforementioned operating system compatible with Linux applications, such as... Figure 2 As shown, the compatibility method for the Linux application specifically includes: S10. Receive the window image generated by the Linux application through the window synthesizer, and transmit the window image to the Linux service; S20. The window image is distributed to the shell application corresponding to the Linux application through the Linux service, and the window image is displayed through the shell application.
[0043] Specifically, the window image is an application layer formed by a Linux application in a running state. This application layer can take various forms, such as a user interface, document content, or multimedia display. These application layers contain various visual elements and information of the Linux application during runtime. After receiving the window image formed by the Linux application, the window compositor detects the mode of the compositor backend. If the compositor backend is in RDP mode, the window compositor transmits the window image to the RDP client in the Linux service through its configured RDP service, thus transmitting the window image to the Linux service. Upon receiving the window image, the Linux service distributes the window image formed by the Linux application to the corresponding shell application, which then displays the window image.
[0044] For example, Linux applications running on a Linux system include Linux application A and Linux application B. Then, on a desktop operating system, there are shell applications a and shell applications b. Linux application A corresponds to shell application a, and Linux application B corresponds to shell application b. The window image generated by Linux application A is distributed to shell application a, and the window image generated by Linux application B is distributed to shell application b.
[0045] It is understandable that in practical applications, multiple Linux applications may run simultaneously. The window compositor would then acquire window images generated by these multiple Linux applications. Since each Linux application corresponds to a different shell application, this embodiment of the application supports a single-window mode. The window image generated by each Linux application is sent separately to the Linux service, allowing the Linux service to distribute the window images to their respective shell applications, thus avoiding window image confusion. Of course, in practical applications, to enable the Linux service to determine the shell application corresponding to each window image, the window image can carry a Linux application identifier (such as the application name) before being transmitted to the Linux service. The Linux service can then determine the shell application corresponding to the window image based on its maintained association information between Linux applications and shell applications, and transmit the window image to that shell application for display. In this way, even if multiple Linux applications run simultaneously, their window images can be accurately distributed to their corresponding shell applications, achieving independent display and management of multiple windows.
[0046] Furthermore, since Linux applications may support different communication protocols—for example, some Linux applications support the Wayland protocol, while others support the x11 protocol—the window compositor in this embodiment incorporates a protocol compatibility service. The window compositor supports one communication protocol supported by the Linux application, and the protocol compatibility service supports third-party protocols supported by the Linux application. Therefore, when a Linux application communicates with the window compositor, it checks whether its supported communication protocol is the same as that supported by the window compositor. If its supported communication protocol is the same, the Linux application directly communicates with the window compositor to transmit the window image. If its supported communication protocol is not the same as that supported by the window compositor (i.e., a third-party protocol), the Linux application communicates with the window compositor through the protocol compatibility service to transmit the window image. This allows Linux applications that support communication protocols different from those originally supported by the window compositor to seamlessly integrate through protocol compatibility services, ensuring that window images can be accurately and efficiently transmitted and displayed on the desktop operating system, thus enhancing the compatibility of the desktop operating system.
[0047] For example: Suppose the window compositor only supports the Wayland protocol, and a Linux application C is running on the Linux system, which only supports the x11 protocol. When Linux application C starts and attempts to transmit a window image, it first checks its supported communication protocols. Finding that its supported x11 protocol is incompatible with the Wayland protocol supported by the window compositor, Linux application C then communicates with a protocol compatibility service deployed in the Linux container, transmitting the window image to the service. Upon receiving the window image from Linux application C, the protocol compatibility service performs protocol conversion, changing the window image from x11 to Wayland, before transmitting the converted window image to the window compositor.
[0048] In one embodiment, before transferring the window image between the Linux application and the shell application via the window compositor and Linux service, the Linux application corresponding to the shell application needs to be launched. Therefore, before receiving the window image formed by the Linux application via the window compositor, a Linux application startup process is also included, such as... Figure 3 As shown, the Linux application startup process specifically includes: Step S01: Control the shell application to start and send an application startup message to the Linux service; Step S02: Transmit the application startup message to the window compositor via the Linux service; Step S03: Start the Linux application corresponding to the shell application through the window synthesizer.
[0049] Specifically, the shell application can be launched manually by the user, such as clicking the application icon in the desktop operating system; or it can be automatically triggered by the system, such as automatically loading the corresponding shell application according to preset configurations during system startup. When the shell application launches, the desktop operating system sends an application launch message to the Linux service, which then transmits the message to the window compositor. The window compositor, based on the launch message, identifies the Linux application to be launched and starts it. The launch message carries relevant identification information for the shell application, informing the window compositor which Linux application needs to be launched. When transmitting the launch message to the window compositor, the Linux service can also transmit it via an RDP client to the RDP service running in the window compositor. The RDP service then launches the corresponding Linux application based on the launch message.
[0050] In one embodiment, during the compatibility operation of a Linux application, in addition to transmitting the window image of the Linux application to the shell application for display, the Linux application can also be controlled by manipulating the shell application. That is, the Linux application compatibility method also includes the Linux application's response process to control commands, such as... Figure 4 As shown, the response process of the Linux application response control command specifically includes: Step S100: Receive control commands for the shell application through the Linux service, and transmit the control commands to the window synthesizer; Step S200: The control command is transmitted to the Linux application corresponding to the shell application through the window synthesizer, so that the Linux application responds to the control command.
[0051] Specifically, the control instructions include at least one of the following: control instructions based on mouse input events, control instructions based on the window image, or control instructions input from an external control device. The control instructions can be operation instructions for moving, scaling, or closing the application window, or instructions for triggering internal functions of the application, such as clicking a menu item, entering text content, or selecting an option. They can also be related instructions for adjusting application display settings, such as brightness adjustment or contrast adjustment.
[0052] The Linux service transmits control commands to the RDP service in the window compositor via its internal RDP client. The RDP service then forwards the control commands to the corresponding Linux application, enabling the Linux application to respond. It's important to note that if the communication protocol supported by the Linux application responding to the control command differs from that supported by the window compositor, the window compositor will first transmit the control commands to a compatibility protocol service. This compatibility protocol service will then translate the control commands, and finally, it will transmit the translated control commands to the Linux application.
[0053] Example 1: A user moves a window in a shell application using a mouse to generate keyboard and mouse input event information. This keyboard and mouse input event information is transmitted to the Linux service as a control command for moving the window, so that the Linux service receives the control command for the display window of the shell application. The Linux service then transmits the control command for moving the window to the window compositor, which in turn transmits it to the corresponding Linux application, so that the Linux application responds to the control command for moving the window.
[0054] Example 2: The window screen has a window decorator with a maximize button, a minimize button, and a close button. When the close button is triggered, the shell application sends the close command generated by clicking the close button to the Linux service. The Linux service transmits the close command to the window compositor, which then transmits it to the corresponding Linux application so that the Linux application responds to the close command and closes the Linux application.
[0055] This application embodiment receives control operations through a shell application and transmits the corresponding control commands to the Linux application through a Linux service and a window synthesizer, enabling the Linux application to respond to the control operation. Then, the response result of the Linux application is transmitted back to the shell application through the Linux service and the window synthesizer, so that the shell application can provide feedback to the user, thus completing the interactive task, improving the convenience of user operation, and expanding the application scope of Linux applications in different scenarios.
[0056] It should be noted that, where the technology is feasible and the logic is clear, the above embodiments can be freely combined in pairs or in multiple combinations. It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the compatibility method of Linux application of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0057] This application provides a Linux application compatible device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to execute the Linux application compatible method in the above embodiment 1.
[0058] The following is for reference. Figure 5 This document illustrates a structural diagram of a compatible device suitable for implementing Linux applications according to embodiments of this application. The compatible devices for Linux applications in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The Linux application-compatible device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0059] like Figure 5As shown, a Linux application-compatible device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the Linux application-compatible device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows compatible devices with Linux applications to communicate wirelessly or wiredly with other devices to exchange data. While the figure shows compatible devices with various Linux applications and systems, it should be understood that implementing or having all of the systems shown is not required. More or fewer systems may be implemented alternatively.
[0060] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0061] The Linux application compatibility device provided in this application employs the Linux application compatibility method described in the above embodiments to solve the technical problem that the OpenHarmony desktop operating system is incompatible with Linux applications. Compared with the prior art, the beneficial effects of the Linux application compatibility device provided in this application are the same as those of the Linux application compatibility method provided in the above embodiments, and other technical features of this Linux application compatibility device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0062] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0063] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0064] This application provides a medium, which is a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the Linux application compatible method in the above embodiments.
[0065] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM). ROM: CD Read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system or device. The program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (Radio Frequency), etc., or any suitable combination thereof.
[0066] The aforementioned computer-readable storage medium may be included in a Linux application-compatible device; or it may exist independently and not be assembled into a Linux application-compatible device.
[0067] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a Linux application-compatible device, cause the Linux application-compatible device to: The window synthesizer receives the shutdown message from the Linux application and transmits the shutdown message to the Linux service; the Linux service then transmits the shutdown message to the shell application corresponding to the Linux application to exit the shell application.
[0068] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0069] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0070] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0071] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the compatibility method of the aforementioned Linux application, thereby solving the technical problem that the OpenHarmony desktop operating system is incompatible with Linux applications. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the compatibility method of Linux applications provided in the above embodiments, and will not be repeated here.
[0072] This application also provides a product, which is a computer program product, including a computer program that, when executed by a processor, implements the steps of the Linux application compatibility method described above.
[0073] The computer program product provided in this application can solve the technical problem that the OpenHarmony desktop operating system is incompatible with Linux applications. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the Linux application compatibility method provided in the above embodiments, and will not be repeated here.
[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. An operating system compatible with Linux applications, characterized in that, The operating system compatible with Linux applications includes a desktop operating system that is compatible with running Linux systems. The desktop operating system deploys Linux services and shell applications that communicate with the Linux services. The Linux system deploys a window compositor and Linux applications corresponding to the shell applications. The Linux applications communicate with the window compositor, and the window compositor communicates with the Linux services. The window synthesizer is used to transmit the window image formed by the Linux application to the Linux service; The Linux service is used to receive the window image and distribute the window image to the shell application; The shell application is used to display the window image and transmit received control commands to the Linux service; The Linux service is also used to send the control commands to the window compositor; The window synthesizer is also used to transmit the control commands to the Linux application.
2. The operating system compatible with Linux applications according to claim 1, characterized in that, The Linux system also deploys a protocol compatibility service, which is connected to the window compatibility service. The protocol compatibility service is used to make third-party protocols compatible with the communication protocols supported by the window compatibility service, so that Linux applications using third-party protocols can communicate with the window compatibility service through the protocol compatibility service.
3. A compatibility method for Linux applications, characterized in that, The operating system for compatibility with Linux applications as described in any one of claims 1-2, wherein the compatibility method for Linux applications specifically includes: The window synthesizer receives the window image generated by the Linux application and transmits the window image to the Linux service. The window image is distributed to the shell application corresponding to the Linux application through the Linux service, and the window image is displayed through the shell application.
4. The Linux application compatibility method according to claim 3, characterized in that, Before receiving the window image formed by the Linux application through the window synthesizer, the method further includes: Control the startup of the shell application and send the application startup message to the Linux service; The application startup message is transmitted to the window compositor via the Linux service. The Linux application corresponding to the shell application is launched through the window synthesizer.
5. The Linux application compatibility method according to claim 3, characterized in that, The method further includes: The Linux service receives control commands for the shell application and transmits these control commands to the window synthesizer. The control commands are transmitted to the Linux application corresponding to the shell application through the window synthesizer, so that the Linux application responds to the control commands.
6. The Linux application compatibility method according to claim 5, characterized in that, The control instructions include at least one of the following: control instructions based on mouse input events, control instructions based on the window image, or control instructions input from an external control device.
7. The Linux application compatibility method according to claim 3, characterized in that, When the desktop operating system includes a protocol compatibility service, and when the Linux application supports the communication protocol used by the window compatibility service, the Linux application communicates directly with the window compatibility service; when the Linux application supports the communication protocol used by the protocol compatibility service, the Linux application communicates with the window compatibility service through the protocol compatibility service.
8. A Linux application-compatible device, characterized in that, The compatible device for the Linux application includes: an operating system, a memory, a processor, and a computer program stored on the memory and executable on the processor, as described in any one of claims 1 to 2, wherein the computer program is configured to implement the steps of the compatible method for the Linux application as described in any one of claims 3 to 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the Linux application compatibility method as described in any one of claims 3 to 7.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the Linux application compatibility method as described in any one of claims 3 to 7.