Page MenuHomePhabricator

port msgcollector to python3 and python3-pyqt5
Closed, ResolvedPublic

Description

Partially done. See python3 branch of msgcollector.

https://github.com/Whonix/msgcollector/tree/python3

files:

TODO:

  • fix the favicon
    • the favicon (the icon in the very left top in the window title) is no longer shown in any of these scripts

msgdispatcher_dispatch_x TODO:

  • fix the itype
    • For example warning should result in an exclamation mark such as can be seen in the following image.
  • port the QtCore.QObject.connect part?
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Dialog.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject)

tb_updater_gui TODO:

  • the window is too long (exceeds the screen) but not very wide
    • should be made wider

test script:

(Comment in/out msgdispatcher_dispatch_x / generic_gui_message / tb_updater_gui.)

#!/bin/bash

set -e

testfunction() {
   who_ami=user

   local MSG="<p>Time Synchronization Result:
<br></br><b>Whonixcheck gave up waiting.</b>
<br></br>
<br></br>Time synchronization status: $time_synchronization_status_word
<br></br>sdwdate reports: $time_synchronization_msg
<br></br>
<br></br>Possible issues:
<br></br>- sdwdate will need a few more moments for fetching the time.
<br></br>- sdwdate time sources might be dysfunctional.
<br></br>
<br></br>Recommendations:
<br></br>
<br></br><b>A)</b> <u>Rerun whonixcheck</u>:
<blockquote>$start_menu_instructions_system_first_part Whonix Check</blockquote>
or in Terminal: <code>whonixcheck</code>
<br></br>or in Terminal with debugging: <code>whonixcheck --debug --verbose --gui --cli</code>
<br></br>
<br></br><b>B)</b> <u>Restart sdwdate.</u>
<blockquote>$start_menu_instructions_system_first_part sdwdate-gui -> right click on sdwdate-gui systray -> Restart sdwate - instantly adjust the time</blockquote>
or in Terminal: <code>sudo service sdwdate restart</code>
<br></br>
<br></br><b>C)</b> <u>Manually set the time.</u>
<br></br>
<br></br>As last resort...
<br></br>
<br></br>1. Open a terminal. ($start_menu_instructions_system_first_part Terminal)
<br></br>2. Set the clock to the correct time in UTC. (Example.) <blockquote><code>sudo date --set \"$anondate_suggested_date\"</blockquote>
3. Simulate sdwdate success. <blockquote><code>sudo touch /var/run/sdwdate/first_success</code></blockquote>
4. Rerun whonixcheck.</p>"

   if [ "$MSG" = "" ]; then
      MSG="$msg"
   fi
   if [ "$msg" = "" ]; then
      msg="$MSG"
   fi

   #../Whonix/packages/msgcollector/usr/lib/msgcollector/msgdispatcher_dispatch_x "info" "test title" "$MSG" 0 ""

    #./Whonix/packages/msgcollector/usr/lib/msgcollector/generic_gui_message "$icon" "$title" "$msg" "What to do?" "yesno"

    ./Whonix/packages/msgcollector/usr/lib/msgcollector/tb_updater_gui "info" "test title" "none installed" "3,5,10.5" "$msg" "What to do?" "yesno"

   #MSG="$(./Whonix/packages/msgcollector/usr/lib/msgcollector/striphtml "$MSG")"

   #echo "$MSG"

}

testfunction

Details

Impact
Normal

Event Timeline

Patrick created this task.Feb 13 2017, 10:34 PM
Patrick updated the task description. (Show Details)Feb 13 2017, 10:39 PM

https://github.com/Whonix/msgcollector/pull/2/files

should fix the issues

#1
../Whonix/packages/msgcollector/usr/lib/msgcollector/msgdispatcher_dispatch_x "info" "test title" "$MSG" 0 ""

The last argument is for icon. So if you specify "", it will not show any icon.
If you skip the argument, icon will appear.

#2 There are two commits involving 3 files.

Patrick assigned this task to joysn1980.Feb 14 2017, 4:18 PM
Patrick edited projects, added Whonix 14; removed Whonix 15.

Good quality, could merge into git master and ready for Whonix 14 already.

One remaining issue. With all of them. But just a simple example for reproduction. With the package installed...

/usr/lib/msgcollector/tb_updater_gui "info" "test title" "none installed" "3,5,10.5" "$msg" "What to do?" "yesno"

Also having https://github.com/Whonix/anon-icon-pack installed (on a Debian stretch system)... So /usr/share/icons/anon-icon-pack/whonix.ico does exist. Yet, the favicon is not showed in the window title bar.

Something strange. I can see it in my VM

Can you share your screen shot?

Patrick closed this task as Resolved.Feb 14 2017, 4:57 PM

Looks good on your side. Possibly a Qubes bug. I'll look into it in the next developers build.