Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The graphic pattern Framework of linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The difference of graphical Interface between linux and window

Maybe everyone is used to the way windows graphics are operated. No matter which remote method is used (QQ remote, remote connection, teamviewer), windows can only be opened by one user at a time on one desktop system.

For example, when logging in with a remote connection, the host CRT can only close and lock the screen.

For example, when using QQ remotely, you can move the mouse both remotely and locally. Both can see the operation and reflection of the other.

If you look at linux with such an idea, it will not be correct.

Linux can support multiple users opening multiple desktops at the same time. A user opens multiple desktops at the same time. It's the same as SSH.

For example, A

After using the user XX to enter the linux desktop system, su to other users under shell, and then start a graphics software (such as gedit) under shell, will not be opened, and there is a hint: No protocol specified. (are you familiar with this tip)

This is because Xserver does not allow graphics from other users' graphics programs to be displayed on the current screen by default. If you need the graphics of another user to be displayed on the current screen, you should execute the following command xhost + as the currently logged-in user, that is, the user before the identity switch

There is also an example of vnc remote (directly above)

The image above shows redhat users using vnc to remotely log in to the host, and the two desktops can be operated separately.

There is a DISPLAY in the environment variables of the two, which are 5.0and 6.0respectively.

The graphical interface of linux

Structure diagram of the graphic mode of linux

Unix or tcp remote connections are used between Xserver and its clients for information.

1.1. Desktop program

There are a variety of desktop environments, commonly used gnome,kde,unity and so on, they provide a series of components and programs, together to complete desktop services. Each desktop environment has different styles, different modes of operation, and different functions.

However, for xserver incoming calls, desktop programs (gdm,gnome-session) are no different from gedit or dialog programs written by users themselves. Because every graphics program needs to communicate with xserver, xserver can tell this kind of graphics program such as mouse and other events, and then do the action of the application.

However, for graphics (such as gedit), it also has some dependence on the desktop environment. Gedit cannot be opened in character mode. There is an essential difference in graphic mode in character mode, that is, the display on character mode does not require Xserver.

When you start graphic mode in character form, you can use startx, and of course the hint is that the relevant components are already installed.

1.2. Graphics programs do not rely on specific desktop services

When using vnc to connect remotely, the above figure changes the default startup program from gnome-session to twm. Twm is also a client of a desktop program, through which you can also open gedit,gedit. Only the external form changes, and the internal display is decided by the gedit program.

Gnome-session-save-- kill this command is used to log out of this monitor.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report