Mini Shell
3
C��e�- � @ s� d dl Z d dlZd dlZd dlmZmZ d dlmZmZ d dl Z d dl
Z
d dlZd dlm
Z
mZ d dlmZ d dlmZ d dlmZ d dlmZ d d lmZ e� Zd d
lmZ ee�ZdZdd
� ZG dd� de�Z dS )� N)�network�product)�util� constants)�_�P_)�tui_quit_callback)�VNCPassSpoke)�App)�
ScreenHandler)�get_stdout_logger)�get_module_loggerZXvncc C sP yt jdtg� tjd� W n. tk
rJ } ztjd| � W Y dd} ~ X nX dS )a@ Try to shutdown any running XVNC server
Why is this function on the module level and not in the VncServer class ?
As the server needs to be killed from the exit handler, it would have
to somehow get to the VncServer instance. Like this, it can just kill
it by calling a function of the vnc module.
Zkillallz#The XVNC server has been shut down.z5Shutdown of the XVNC server failed with exception:
%sN)r ZexecWithCapture�XVNC_BINARY_NAME�log�info�OSError�error)�e� r �/usr/lib64/python3.6/vnc.py�shutdownServer, s
r c @ sj e Zd Zddddddddejf dd�Zdd � Zd
d� Zdd
� Zdd� Z dd� Z
dd� Zdd� Zdd� Z
dS )� VncServer�/N� z/tmp/vncserver.logz/tmp/vncpasswordc
C sf || _ || _|| _|| _|| _|| _|| _|| _| | _d | _ d | _
t� | _t
d�tjtjd� | _d S )Nz/%(productName)s %(productVersion)s installation)�productName�productVersion)�root�ip�name�password�vncconnecthost�vncconnectport�log_file�pw_file�timeout� connxinfo�anacondar r r r r r �desktop)
�selfr r r r r r! r"