Skip to content

Commit b7b7dc7

Browse files
committed
VNC/SPICE should listen on all interfaces
Until now, we only allowed VNC/SPICE console to listen on connections coming from localhost. This however breaks "Desktop viewer" use case where user wants to download a virt-viewer file to a client computer and open a VNC/SPICE console connected to a remote VNC server. Fixes #1078
1 parent c905ae2 commit b7b7dc7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/scripts/install_machine.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def get_graphics_capabilies(connection):
4646

4747
def prepare_graphics_params(connection):
4848
graphics_config = {
49-
'spice': {'listen': '127.0.0.1'},
50-
'vnc': {'listen': '127.0.0.1'}
49+
'spice': {'listen': '0.0.0.0'},
50+
'vnc': {'listen': '0.0.0.0'}
5151
}
5252
try:
5353
# Configparser needs a default section
@@ -57,12 +57,12 @@ def prepare_graphics_params(connection):
5757
config = configparser.ConfigParser()
5858
config.read_string(config_string)
5959

60-
graphics_config['spice']['listen'] = config['dummy_section'].get('spice_listen', '127.0.0.1')
60+
graphics_config['spice']['listen'] = config['dummy_section'].get('spice_listen', '0.0.0.0')
6161
spice_password = config['dummy_section'].get('spice_password', None)
6262
if spice_password is not None:
6363
graphics_config['spice']['password'] = spice_password
6464

65-
graphics_config['vnc']['listen'] = config['dummy_section'].get('vnc_listen', '127.0.0.1')
65+
graphics_config['vnc']['listen'] = config['dummy_section'].get('vnc_listen', '0.0.0.0')
6666
vnc_password = config['dummy_section'].get('vnc_password', None)
6767
if vnc_password is not None:
6868
graphics_config['vnc']['password'] = vnc_password

0 commit comments

Comments
 (0)