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

How to solve the problem of Linux graphical Desktop * * exception error

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly introduces "how to solve the problem of Linux without graphical desktop * * exception error". In daily operation, I believe many people have doubts about how to solve the problem of Linux without graphical desktop * * exception error. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubt of "how to solve the problem of Linux without graphical desktop * * exception error"! Next, please follow the editor to study!

Solve: * * exception error: undefined function observer:start/0 problem

1. When running under the Linux without graphical desktop (here is tested under the Win10 App Store version of Ubuntu 18.04 LTS subsystem): observer:start ().

You will be prompted that the observer:start/0 function is not defined, but it will work normally under win10 powershell.

As shown in the figure, the function is not defined: * * exception error: undefined function observer:start/0

2. The solution is to achieve indirect access through rpc. Because the viewer can be started on win10, you can connect to the erlang node on the Linux system with the help of the viewer on win10.

The specific steps are as follows:

Start the erlang node on 1.Win10 and set cookie to: abc

PS C:\ Users\ SummerGao > erl-name rpc@127.0.0.1-setcookie abcEshell V9.1 (abort with ^ G) (rpc@127.0.0.1) 1 > observer:start () .ok (rpc@127.0.0.1) 2 >

Set the cookie of the current node after starting the erlang node on the 2.Linux system (it needs to be consistent with the cookie set on win10)

Root@DESKTOP-VDFG4H0:/home# erl-name summergao@127.0.0.1-setcookie abcErlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [kernel-poll:false] Eshell V9.2 (abort with ^ G) (summergao@127.0.0.1) 1 >

If you forget or don't set cookie at first, you can use erlang:set_cookie (node (), abc). Set the function (you can set cookie in this way on a node that is already started)

(summergao@127.0.0.1) 1 > erlang:set_cookie (node (), abc). True

3. Let's start the connection.

The connection is successful as follows:

Parameter description:

(1) start Erlang with the-name parameter. We can use the "short" name (represented by the-sname flag) when running two nodes on the same machine. But if they belong to different networks, we have to use-name. We can also use-sname when two machines are on the same subnet. And if there is no DNS service,-sname is the only viable way.

(2) make sure that both nodes have the same cookie. This is why the command line parameter-setcookie abc is used when both nodes are started.

(3) ensure that the fully qualified hostname (fully qualified hostname) of the relevant node can be resolved by DNS.

(4) make sure that both systems have the same version of code and the same version of Erlang. If you don't, you may get serious and bizarre mistakes. The easiest way to avoid problems is to run the same version of Erlang everywhere. Different versions of Erlang can be run together, but there is no guarantee that they will work properly, so it is best to check in advance.

At this point, the study on "how to solve the problem of Linux without graphical desktop * * exception error" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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

Internet Technology

Wechat

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

12
Report