Skip to content

Commit

Permalink
Merge pull request #2 from marmarek/improvements
Browse files Browse the repository at this point in the history
Various fixes
  • Loading branch information
adrelanos authored Feb 16, 2021
2 parents b31fac9 + 6755478 commit ff63139
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 25 deletions.
5 changes: 5 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include:
- project: 'QubesOS/qubes-continuous-integration'
file: '/r4.1/gitlab-base.yml'
- project: 'QubesOS/qubes-continuous-integration'
file: '/r4.1/gitlab-dom0.yml'
2 changes: 1 addition & 1 deletion qubes-remote-support-receiver-start
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ dom0_x2go_setup() {
}

dom0_create_key_files_archive() {
tar -zcvf "$temp_dir/remote-support-keys.tar.gz" -C "$temp_dir" keys >/dev/null
tar -zcf "$temp_dir/remote-support-keys.tar.gz" -C "$temp_dir" keys
}

wormhole_send_wrapper() {
Expand Down
6 changes: 5 additions & 1 deletion remote_gui/remote_gui.glade
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<requires lib="gtk+" version="3.20"/>
<object class="GtkDialog" id="ask_dialog">
<property name="can_focus">False</property>
<property name="icon_name">qubes-remote</property>
<property name="type_hint">dialog</property>
<child>
<placeholder/>
Expand Down Expand Up @@ -179,6 +180,7 @@
</object>
<object class="GtkDialog" id="progress_dialog">
<property name="can_focus">False</property>
<property name="icon_name">qubes-remote</property>
<property name="type_hint">dialog</property>
<child>
<placeholder/>
Expand Down Expand Up @@ -242,7 +244,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">10</property>
<property name="label" translatable="yes">Starting Qubes Remote Support Service....</property>
<property name="label" translatable="yes">Starting Qubes Remote Support Service....
(this can take up to 10 minutes)</property>
<property name="justify">center</property>
</object>
<packing>
<property name="expand">False</property>
Expand Down
41 changes: 21 additions & 20 deletions remote_gui/remote_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,32 +109,31 @@ def start_thread(self):
self.progress_window.success_label.set_visible(True)
break

while True:
while self.start_process.returncode is None:
if self.aborted:
return
self.start_process.poll()
if self.start_process.returncode is None:
continue
if self.start_process.returncode == 0:
GObject.idle_add(self.progress_window.progress_dialog.hide)
GObject.idle_add(self.status_icon.enable_icon)
GObject.idle_add(
self.show_message,
"Connection successful!",
"Remote connection established. Use tray icon to "
"terminate Qubes Remote Support Daemon when it's "
"no longer needed.",
False)
return
time.sleep(1)

if self.start_process.returncode == 0:
GObject.idle_add(self.progress_window.progress_dialog.hide)
GObject.idle_add(self.status_icon.enable_icon)
GObject.idle_add(
self.show_message,
"Connection error!",
"Remote connection failed. Error code: {}".format(
self.start_process.returncode),
False,
self.exit_app)
time.sleep(1)
"Connection successful!",
"Remote connection established. Use tray icon to "
"terminate Qubes Remote Support Daemon when it's "
"no longer needed.",
False)
return
GObject.idle_add(self.progress_window.progress_dialog.hide)
GObject.idle_add(
self.show_message,
"Connection error!",
"Remote connection failed. Error code: {}".format(
self.start_process.returncode),
False,
self.exit_app)

def progress_thread(self):
while not self.progress_window.wormhole_label.get_text() and \
Expand Down Expand Up @@ -333,6 +332,8 @@ def _guess_vm(self):
for domain in domains_with_network:
if 'whonix' in str(domain) and 'sys' in str(domain):
return str(domain)

for domain in domains_with_network:
if 'whonix' in str(domain) and domain.klass != 'TemplateVM':
return str(domain)

Expand Down
6 changes: 3 additions & 3 deletions rpm_spec/qubes-remote-support-receiver-dom0.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Scripts to easily receive remote support using Qubes OS.
%install
%py3_install
make install-dom0 DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/xdg/autostart
cp qubes-remote-support-gui.desktop $RPM_BUILD_ROOT/etc/xdg/autostart
mkdir -p $RPM_BUILD_ROOT/usr/share/applications
cp qubes-remote-support-gui.desktop $RPM_BUILD_ROOT/usr/share/applications/
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/22x22/apps/
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/24x24/apps/
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/32x32/apps/
Expand Down Expand Up @@ -71,7 +71,7 @@ cp icons/72x72/qubes-remote-on.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/72x72
%{python3_sitelib}/remote_gui/remote_gui.glade

/usr/bin/qubes-remote-support-gui
/etc/xdg/autostart/qubes-remote-support-gui.desktop
/usr/share/applications/qubes-remote-support-gui.desktop

/usr/share/icons/hicolor/22x22/apps/qubes-remote.png
/usr/share/icons/hicolor/24x24/apps/qubes-remote.png
Expand Down

0 comments on commit ff63139

Please sign in to comment.