Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux 纯终端模式下如何运行? #715

Closed
mlxzlas opened this issue Jul 24, 2015 · 3 comments
Closed

Linux 纯终端模式下如何运行? #715

mlxzlas opened this issue Jul 24, 2015 · 3 comments

Comments

@mlxzlas
Copy link

mlxzlas commented Jul 24, 2015

一直都是在一个局域网中部署一台 goagent/xxnet 的服务器, 给其他所有的设备做代理,这样非常方便,
没有 x 的情况下运行 xxnet
在 2.0 之前的版本, 用 non_tray.py 替换 gtk_tray.py 就可以了
现在替换之后还是会报如下问题

Traceback (most recent call last):
File "launcher/start.py", line 23, in
if X_is_running():
File "launcher/start.py", line 19, in X_is_running
p = Popen(["xset", "-q"], stdout=PIPE, stderr=PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory


@xxnet
Copy link
Contributor

xxnet commented Jul 24, 2015

跟替换没有关系, 是找不到xset, xset是Xwindows的一个工具, 没有装xwindows,就没有这个工具,这里的自动检测好要再完善。
你可以先看看start.py,能不能直接注释掉检测,直接进入non_tray的分支

后面再修复这个问题

2015-07-24 9:35 GMT+08:00 Will Winters notifications@github.com:

一直都是在一个局域网中部署一台 goagent/xxnet 的服务器, 给其他所有的设备做代理,这样非常方便,
没有 x 的情况下运行 xxnet
在 2.0 之前的版本, 用 non_tray.py 替换 gtk_tray.py 就可以了
现在替换之后还是会报如下问题

Traceback (most recent call last):
File "launcher/start.py", line 23, in
if X_is_running():
File "launcher/start.py", line 19, in X_is_running
p = Popen(["xset", "-q"], stdout=PIPE, stderr=PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception

OSError: [Errno 2] No such file or directory


Reply to this email directly or view it on GitHub
#715.

@mlxzlas
Copy link
Author

mlxzlas commented Jul 24, 2015

注释掉了检测,直接用 non_tray 分支可以执行了,但是又遇到新的问题

进入后居然直接打开了一个 w3m 浏览器, 如果使用其代理的话,就会出现如下错误

Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 593, in process_request_thread
self.finish_request(request, client_address)
File "/path/to/xxnet/launcher/web_control.py", line 48, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 649, in init
self.handle()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "/path/to/xxnet/launcher/web_control.py", line 143, in do_GET
controler = module_init.proc_handler[module]["imp"].local.web_control.ControlHandler(self.client_address, self.headers, self.command, path, self.rfile, self.wfile)
KeyError: 'imp'

@xxnet
Copy link
Contributor

xxnet commented Jul 28, 2015

试试注释掉下面两行,可以不弹出w3m浏览器。
if config.get(["modules", "launcher", "popup_webui"], 1) == 1:
webbrowser.open("http://127.0.0.1:8085/")

你试试直接启动:
python gae_proxy/local/proxy.py 这样可以跳过launcher

2015-07-24 20:03 GMT+08:00 Will Winters notifications@github.com:

注释掉了检测,直接用 non_tray 分支可以执行了,但是又遇到新的问题

进入后居然直接打开了一个 w3m 浏览器, 如果使用其代理的话,就会出现如下错误

Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 593, in
process_request_thread
self.finish_request(request, client_address)
File "/path/to/xxnet/launcher/web_control.py", line 48, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 649, in init
self.handle()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in
handle_one_request
method()
File "/path/to/xxnet/launcher/web_control.py", line 143, in do_GET
controler =
module_init.proc_handler[module]["imp"].local.web_control.ControlHandler(self.client_address,
self.headers, self.command, path, self.rfile, self.wfile)
KeyError: 'imp'


Reply to this email directly or view it on GitHub
#715 (comment).

@xxnet xxnet closed this as completed Aug 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants