Mini Shell
3
C��e6 � @ sT d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZ d dl m
Z
d dl mZ d dlm
Z
mZ d dl mZ d dlmZ d d lmZ d d
lmZ d dlmZ d dlmZ d dlZ d dlZd d
lmZ d dlmZ d dl m!Z! d dl"m#Z#m$Z$ e#e%�Z&e$� Z'dZ(dd� Z)dd� Z*dd� Z+dd� Z,dd� Z-dd� Z.dd� Z/d$d d!�Z0d"d#� Z1dS )%� N)�conf)�WatchProcesses)�isys)�
startup_utils)�util� constants)�vnc)�_)�flags)�NETWORK)�AskVNCSpoke)�tui_quit_callback)�DISPLAY_MODE_TEXT)�App)�
ScreenHandler)�get_module_logger�get_stdout_loggera� Do not load the stage2 image over a slow network link.
Wait longer for the X server startup with the inst.xtimeout=<SECONDS> boot option.The default is 60 seconds.
Load the stage2 image into memory with the rd.live.ram boot option to decrease access time.
Enforce text mode when installing from remote media with the inst.text boot option.
Use the customer portal download URL in ilo/drac devices for greater speed.c C s, t jdg �} | rtjd| � n
tjd� dS )z�Start the spice vdagent.
For certain features to work spice requires that the guest os
is running the spice vdagent.
z
spice-vdagentz#spice-vdagent exited with status %dzStarted spice-vdagent.N)r �execWithRedirect�log�info)Zstatus� r �/usr/lib64/python3.6/display.py�start_spice_vd_agentA s r c C st t j� t j� }|jt� t| j|d�}tj|� t j � | jj
jrp| jsTt
jd� tjj| _dt_| jj
j|_dS )a Ask the user if TUI or GUI-over-VNC should be started.
:param anaconda: instance of the Anaconda class
:param vnc_server: instance of the VNC server object
:param str message: a message to show to the user together
with the question
)�messagez?VNC requested via VNC question, switching Anaconda to GUI mode.TN)r Z
initializeZget_event_loopZset_quit_callbackr
r �ksdatar Zschedule_screenZrunr �enabled�gui_moder r r �DisplayModes�GUI�display_moder
�usevnc�password)�anaconda�
vnc_serverr ZloopZspoker r r �ask_vnc_questionP s
r$ c C s� g }d}t jj� tjk r6|jdt jj� tjf � d}| jrPtjrP|jd� d}| j j
jtkrl|jd� d}t
j� }|j� r�|j r�|jd� d}tjdtj�s�|jd� d}||fS ) z�Check if we can start VNC in the current environment.
:returns: if VNC can be started and list of possible reasons
why VNC can't be started
:rtype: (boot, list)
TzANot asking for VNC because current memory (%d) < MIN_GUI_RAM (%d)Fz2Not asking for VNC because of an automated installzJNot asking for VNC because text mode was explicitly asked for in kickstartz2Not asking for VNC because we don't have a networkz
/usr/bin/Xvncz-Not asking for VNC because we don't have Xvnc)�blivetr Ztotal_memoryr ZMIN_GUI_RAM�append�tui_moder
ZautomatedInstallr ZdisplaymodeZdisplayModer r Z get_proxyZIsConnectingZ Connected�os�access�X_OK)r"