[Solved] Gateway desktop background notice message is god-awful

[quote=“JasonJAyalaP, post:15, topic:140”]Having two separate images might mean more work for the chooser, and in the case of a custom wallpaper, asking a contributor to do double work. Maybe it’s not a big deal.

Alternatively, the gateway desktop could be the same as the workstation but black and white or inverted colors! Maybe not the most artistic choice, but users would be instantly alerted that “this one is the different one you’re not supposed to trust”.

And that gateway notice message is just god-awful. :P[/quote]

Gateway notice message is god-awful, yes.

What is the worst case scenario here? User puts his sensitive docs on GW desktop? He downloads a browser?

Notice is really out of place and with icons all over it makes it a very non-ideal way to send the message “This is not WS. Be careful of what you do”.

Can we restrict the user in some way? Change notice to pop-up when a certain action (sudo apt-get install?) is performed?

Edit by Patrick:
Changed title.

What is the worst case scenario here? User puts his sensitive docs on GW desktop? He downloads a browser?
Yes, as per "anything can go wrong, will go wrong", someone only downloading the gateway, assuming this is enough and going ahead using it for anonymous activity or believing "this damn thing doesn't work, let's get rid of it".

A prettier solution to communicate this would be much appreciated. In desperation to stop anyone confusing this, I cam up with this “let’s add it to the desktop wallpaper” solution.

Hooking attempts to run apt-get would work, but not having a browser pre-installed would still confuse too many users, which will then quickly discard the project as broken and give up.

What about making a quiz?

whonixsetup could explain what Whonix-Gateway is used for, then accept “ok” as only reply. After that, a question could be asked. Something like “What is Whonix-Gateway considered to be used for?” Menu:

“Dunno.” (default choice, goes back to info text)
“I can start an anonymous browser here”. (tells the user this was wrong, goes back to info text)
“I need to (download|install)(?) Whonix-Workstation or set up my own Custom-Workstation.” (proceeds)

What about a GUI notice, whonixcheck or timesync like, popping at the first run of the gateway, with a “Do not show this message at startup” checkbox?

This is a good idea. Unfortunately, I have to learn python first because bash/zenity does not support “do not show this message again” check boxes. Or someone else has to implement this in meanwhile.

What about making a quiz?

Please no. I want to use a piece of software not being quizzed about it’s inner workings. I can safely say I would never use that software again if the scenario you mentioned would occur.

I would like to move the discussion more into practical examples of what can go wrong.

someone only downloading the gateway, assuming this is enough and going ahead using it for anonymous activity or believing “this damn thing doesn’t work, let’s get rid of it”.[/quote]

This seems unlikely. They would still have to install the browser. If they can apt-get and can’t read instructions what makes you think they will read the subtext?

I see. Perhaps was a bad idea. An optional, voluntary security quiz however would might still be useful. But that’s another story and can be created when more important things are done.

Just click, click, download, install, not reading and then trying is quite common. The desktop text is so intrusive, that no one ever got it wrong again.

Option 1:
Keep the text.

  • Users shouldn’t be enjoying the desktop image on the gateway anyway.
  • If users hate it that much, they can manually change it.

Option 1b:
Use a solid color background instead of nice wallpaper, plus the text

  • The warning text won’t look as ugly

Option 2:
Replace text with big popup. No “don’t show me” option.

  • Good enough until we get a GUI programmer.
  • “Don’t Show” isn’t a big deal. It’s supposed to be an annoyance. Doesn’t reappear after VM suspend/awake anyway.

Option 3:
Set Gateway default VirtualBox ram to 128

  • Most users, especially first time users, don’t need to configure the gateway anyway.
  • Saves RAM for most people
  • Discourages desktop use of gateway. Gateway boots to terminal saying “Go load up the workstation!”
  • Adjusting RAM is a “natural quiz”, making sure users have at least the minimal skill required to poke around in the gateway.
  • Probably the direction we’re going anyway once we get gateway specific console tools (ncurses HUD, etc) developed.

[quote=“JasonJAyalaP, post:8, topic:196”]Option 1:
Keep the text.

  • Users shouldn’t be enjoying the desktop image on the gateway anyway.
  • If users hate it that much, they can manually change it.[/quote]
    Good. Getting the emotional component into it, probably your next solution seems more attractive.

[quote=“JasonJAyalaP, post:8, topic:196”]Option 1b:
Use a solid color background instead of nice wallpaper, plus the text

  • The warning text won’t look as ugly[/quote]
    I like this even better. Curious what others think.
Option 2: Replace text with big popup. No "don't show me" option. - Good enough until we get a GUI programmer. - "Don't Show" isn't a big deal. It's supposed to be an annoyance. Doesn't reappear after VM suspend/awake anyway.
Seems annoying. Still considering it.

(VM suspend/awake isn’t recommended for Whonix-Gateway - confuses Tor due to slow clock.)

Option 3: Set Gateway default VirtualBox ram to 128 - Most users, especially first time users, don't need to configure the gateway anyway.
- console window looks scary, targets more linux-console-type than causal user - setting up bridges - accessibility - updating - power of without typing "sudo poweroff" is bad, can lead to "strange" issues - some stuff from https://www.whonix.org/wiki/FAQ#Graphical_Whonix-Gateway.3F such as Whonix controller

A python script that might solve the problem.

Prerequisites for testing :

  • install PyQt4. The package name is python-qt4.
  • create a file ‘first_use_check’. Content is “0”. Do not use nano, as it adds a new line on saving and the variable ‘check’ in the script would evaluate to “0\n”.

Create the script ‘first_use_notice.py’.

#!/usr/bin/python
# -*- coding: utf-8 -*-

import sys
from PyQt4 import QtGui, QtCore

f = open("/home/user/first_use_check", "r")
check = f.read()
f.close()
if check != "0":
    sys.exit()


class Notice(QtGui.QWidget):

    def __init__(self):

        super(Notice, self).__init__()

        self.initUI()

    def initUI(self):

        cb = QtGui.QCheckBox('Do not show this message again', self)
        cb.move(25, 180)
        cb.stateChanged.connect(self.checkState)

        OKbtn = QtGui.QPushButton('OK', self)
        OKbtn.clicked.connect(QtCore.QCoreApplication.instance().quit)
        OKbtn.resize(OKbtn.sizeHint())
        OKbtn.move(270, 210)

        lb = QtGui.QLabel(
"""This is a test label. Enter your text here. Adjust the lines length after the size of the window
in 'self.resize'. As the text grows, you may have to adjust he window's height in 'self.resize'
second parameter' Adjust the Y coordonate in 'cb' and 'btn' accordingly.""", self)
        lb.move(25, 20)

        self.resize(600, 250)
        self.center()
        self.setWindowTitle('First use notice')
        self.show()

    def checkState(self, state):

        f = open("/home/user/first_use_check", "w")
        f.write(str(state))
        f.close()

    def center(self):

        qr = self.frameGeometry()
        cp = QtGui.QDesktopWidget().availableGeometry().center()
        qr.moveCenter(cp)
        self.move(qr.topLeft())


def main():

    app = QtGui.QApplication(sys.argv)
    ex = Notice()
    sys.exit(app.exec_())

if __name__ == '__main__':
    main()

Run ‘python first_use_notice.py’ or ‘./first_use_notice.py’ if you make it executable.
Check ‘Do not show this message again’. Close the window.
Run the script again, the message should not pop.

Thinking forward.

There might be a problem wit the text if the user’s system font is different from mine (text too small or outside the boundaries of the window). Should be tested by different users.

The window has to be open modal, so that it cannot be hidden beneath another one. Should be easy.

This script is versatile for fixed message. We can probably use a message box when there is no user input.

If we want to replace the timesync and whonixcheck popups (not a necessity, but…), as the text is variable, using a fixed size window (no alt+F4 to close it!) with a scroll bar could do the job.

A precision. This is my first ‘real world’ python script. The python tutorials I have tried just bother you with useless lists, tuples and other dictionaries.
I have some experience in GUI (and a little more) programming with VisualStudio .net. The first impression here is that the syntax for objects and events handling is way simpler in python.

Should be taken care of.

#!/usr/bin/python
# -*- coding: utf-8 -*-

import sys
from PyQt4 import QtGui, QtCore

f = open("/home/user/first_use_check", "r")
check = f.read()
f.close()
#print(("Before click", check))
if check != "0":
    sys.exit()


class Notice(QtGui.QDialog):

    def __init__(self):

        super(Notice, self).__init__()

        self.initUI()

    def initUI(self):

        cb = QtGui.QCheckBox('Do not show this message again', self)
        cb.move(25, 230)
        cb.stateChanged.connect(self.checkState)

        OKbtn = QtGui.QPushButton('OK', self)
        OKbtn.clicked.connect(QtCore.QCoreApplication.instance().quit)
        OKbtn.resize(OKbtn.sizeHint())
        OKbtn.move(270, 260)

        lb = QtGui.QLabel(
"""The previous text is now obsolete. You can type lines of any length, it results as one paragraph per line. For example, you could write the story of you life in a single line (if you had a simple life).

Just enter a blank line

to separate the paragraphs.

Work in progress to automatically adjust the size of the window and the size of the text label depending on the text size.


""", self)
        lb.setGeometry(0, 0, 550, 190)  # window vsize -110.
        lb.setWordWrap(True)
        lb.move(25, 20)

        self.resize(600, 300)
        #self.center()
        self.setWindowTitle('First use notice')
        self.show()

    def checkState(self, state):

        f = open("/home/user/first_use_check", "w")
        f.write(str(state))
        f.close()
        #print(("After click ", str(state)))

    def center(self):

        self.resize(False)
        qr = self.frameGeometry()
        cp = QtGui.QDesktopWidget().availableGeometry().center()
        qr.moveCenter(cp)
        self.move(qr.topLeft())


def main():

    app = QtGui.QApplication(sys.argv)
    ex = Notice()
    sys.exit(app.exec_())

if __name__ == '__main__':
    main()

Nice! I would like to change the logic a bit.

Check if ~/.whonix folder exists, if not create it.

Check if ~/.whonix/gateway_first_use_notice_done exists (or a better file name for such a status file).

If status file does not not -> show popup.

If uses checks the “do not show again” box -> create ~/.whonix/gateway_first_use_notice.

If status file exists -> do nothing -> exit.

I liked Whonix Gateway better with no desktop :wink:

The VM was smaller, which is good when downloading via Tor and/or VPN chains. Also, the text console is foreboding to naive users. If there were a clear warning in all caps to use the Whonix Workstation, wouldn’t that be enough?

Am I not understanding why the gateway needs a desktop?

Please see Reply #8 above (last paragraph).

[quote=“Patrick, post:14, topic:196”][quote author=mirimir link=topic=207.msg1721#msg1721 date=1398399164]
Am I not understanding why the gateway needs a desktop?
[/quote]
Please see Reply #8 above (last paragraph).[/quote]
From Reply #8

The fact that it “looks scary” may be a good thing, if it prevents casual users from messing with it :wink:

Perhaps posting could be suppressed, with a simple welcome message. Hitting Enter would restore the prompt.

- setting up bridges
That's an advanced activity, no? Even without a desktop, I'm sure that something could be hacked with ASCII.
- accessibility
For whom? There are text-based readers, I suspect. What accessibility is the current setup providing?
- updating
That could be scripted, and even automated.
- power of without typing "sudo poweroff" is bad, can lead to "strange" issues
I often use VBox Machine | ACPI Shutdown (Ctrl-H). The welcome message could explain that.
- some stuff from https://www.whonix.org/wiki/FAQ#Graphical_Whonix-Gateway.3F such as Whonix controller
I get what you say there.

How about two versions of the Gateway? One with no desktop would be for casual users, and users who want a small VM. The other with desktop would be for advanced users who want more configuration and testing options.

(I may have more comments later, not through reading wilders yet.)

[quote author=Patrick link=topic=207.msg1697#msg1697 date=1397950027] - console window looks scary, targets more linux-console-type than causal user[/quote] The fact that it "looks scary" may be a good thing, if it prevents casual users from messing with it ;)
It also scared potential users away from using it Whonix all.
[quote]- setting up bridges[/quote] That's an advanced activity, no?
When you're in a censored country, it is no advanced activity at all. Without it = no activity at all.

The current graphical desktop can be seen as a intermediate step in evolution of Whonix usability. The mid term plan is using tor-launcher addon as standalone xul on Whonix-Gateway (https://www.whonix.org/wiki/Dev/Sponsor/A#Better_Circumvention_User_Interface).

Even without a desktop, I'm sure that something could be hacked with ASCII.
Apart from that, I would be happy to have a text version of a bridge wizard. There isn't one yet, because it is a challenge for me to create one and other tasks got into the way. Experiences by Vidalia and tor-launcher addon show, that a Tor connection / bridge wizard isn't a trivial thing.
[quote]- accessibility[/quote] For whom? There are text-based readers, I suspect. What accessibility is the current setup providing?
- Magnifier. - Virtual Keyboard. - "KMouseTool clicks the mouse whenever the mouse cursor pauses briefly. It was designed to help those with repetitive strain injuries, for whom pressing buttons hurts."

(Packages: kdeaccessibility, kvkbd, kmousetool, kmag, kmouth, jovie.)

In future, this will hopefully improve.

As for the text based readers, it seems like those are quite difficult to configure in a VM / text mode. Needs more research.

[quote]- updating[/quote] That could be scripted, and even automated.
Automatic updates would be a desirable features, there are challenges: https://www.whonix.org/wiki/Dev/Automatic_Updates#Automatic_Updates
How about two versions of the Gateway? One with no desktop would be for casual users, and users who want a small VM. The other with desktop would be for advanced users who want more configuration and testing options.
The would be a fine solution. We could introduce an "advanced options" link on the download page. The only thing preventing this solution is time / man power.

At the moment I am building, signing and uploading:

  • Whonix-Gateway KDE ova (+ me testing)
  • Whonix-Workstation KDE ova (+me testing)
  • Whonix-Gateway KDE qcow2 (for KVM)
  • Whonix-Workstation KDE qcow2 (for KVM)

When I was to maintain a Whonix-Gateway terminal-only version, it would be me building, signing and uploading:

  • Whonix-Gateway KDE ova (+ me testing)
  • Whonix-Gateway terminal only ova (+ me testing)
  • Whonix-Workstation KDE ova (+me testing)
  • Whonix-Gateway KDE qcow2 (for KVM)
  • Whonix-Gateway terminal-only qcow2 (for KVM) [Y]
  • Whonix-Workstation KDE qcow2 (for KVM)

~33% more time required for building, uploading and testing.

If there was a Release Manager contributing to The Whonix Project or at least someone willing to build terminal-only versions of Whonix-Gateway (which is not about developing, only about running the build script and uploading), we could easily provide a terminal-only version of Whonix-Gateway. As long very few people are contributing to The Whonix Project, this won’t be possible.

That someone could be you. Would you be interested to take care of (and [Y])?

[quote=“Patrick, post:16, topic:196”][quote]
How about two versions of the Gateway? One with no desktop would be for casual users, and users who want a small VM. The other with desktop would be for advanced users who want more configuration and testing options.
[/quote]
The would be a fine solution. We could introduce an “advanced options” link on the download page. The only thing preventing this solution is time / man power.

At the moment I am building, signing and uploading:

  • Whonix-Gateway KDE ova (+ me testing)
  • Whonix-Workstation KDE ova (+me testing)
  • Whonix-Gateway KDE qcow2 (for KVM)
  • Whonix-Workstation KDE qcow2 (for KVM)

When I was to maintain a Whonix-Gateway terminal-only version, it would be me building, signing and uploading:

  • Whonix-Gateway KDE ova (+ me testing)
  • Whonix-Gateway terminal only ova (+ me testing) [X]
  • Whonix-Workstation KDE ova (+me testing)
  • Whonix-Gateway KDE qcow2 (for KVM)
  • Whonix-Gateway terminal-only qcow2 (for KVM) [Y]
  • Whonix-Workstation KDE qcow2 (for KVM)

~33% more time required for building, uploading and testing.

If there was a Release Manager contributing to The Whonix Project or at least someone willing to build terminal-only versions of Whonix-Gateway (which is not about developing, only about running the build script and uploading), we could easily provide a terminal-only version of Whonix-Gateway. As long very few people are contributing to The Whonix Project, this won’t be possible.

That someone could be you. Would you be interested to take care of [X] (and [Y])?[/quote]
I could do X and Y, I think. Building the workstation took about an hour, and it’s a dedicated building machine with task-specific SSDs.

How often do you typically update builds?

When I setup the build machine, I verified your gpg key’s fingerprint, and ran “git tag -v 8.1” to verify that. Then:

sudo ~/Whonix/build-steps.d/1100_prepare-build-machine
several warnings about “possibly missing firmware” for Realtek NIC [gotta fix that]
completed saying ‘INFO: End of: /home/user/Whonix/build-steps.d/1100_prepare-build-machine
No error detected. (benchmark: 01:09:16)’
sudo ~/Whonix/whonix_build --clean --tor-gateway
… No error detected. (benchmark: 00:00:01)
sudo ~/Whonix/whonix_build --clean --tor-workstation
… No error detected. (benchmark: 00:00:00)
sudo ~/Whonix/whonix_build --build --tor-workstation >> ~/log-workstation 2>&1 <= started 2014-04-23 20:40
… No error detected. (benchmark: 01:11:46)

But I didn’t follow < Security Guide - Whonix > or < Dev/Redistribution - Whonix >. I’ve just been playing, after all. But I’d need to complete all that in order to contribute. I’ll get back after some study and testing.

Releases are infrequent. Last test release is 8.2, a maintenance/security release. Due to bigger usability bugs (torbrowser downloader broken), there have been two point releases after Whonix 8 (8.1 and soon 8.2) with perhaps 1 or 2 months in between? Other than that, Whonix 9 will take a while. If I am not mistaken, on average there were 6 months in between major releases.

The Dev/Redistribution - Whonix page is a bit simpler than it looks like. It targets a full blown release manager (someone who would stabilize releases and do everything I am doing currently to prepare releases).

  • “Use a newer snapshot.debian.org repository.” - don’t worry about that - that’s more a dev thing.
  • “Update Whonix debian package repository.” - same here.
  • " update download readme" - same here.
  • Same for pushing code to github.
  • Same for Whonix apt repository management.
  • Same for Whonix News.
  • Same for “Source Code”.
  • Same for Wiki Page Updates (perhaps except checking links for terminal-only updated builds).
  • “Announcement” - nevermind, I can do that in one go.

./release/sign_images and ./release/upload_images, ./release/compress_qcow those are just helper scripts saving some typing. I can introduce you into those.

[quote=“Patrick, post:12, topic:196”]Nice! I would like to change the logic a bit.

Check if ~/.whonix folder exists, if not create it.

Check if ~/.whonix/gateway_first_use_notice_done exists (or a better file name for such a status file).

If status file does not not -> show popup.

If uses checks the “do not show again” box -> create ~/.whonix/gateway_first_use_notice.

If status file exists -> do nothing -> exit.[/quote]

Yes, there was no logic, the script was only for test. The following is more “whonixlike”.

#!/usr/bin/python
# -*- coding: utf-8 -*-

import sys
from PyQt4 import QtGui, QtCore
from subprocess import call


folder_return_code = call("ls ~/.whonix", shell=True)
if folder_return_code == 0:
    file_return_code = call("cat ~/.whonix/first_use_check.done", shell=True)
    if file_return_code == 0:
        sys.exit()
else:
    call("mkdir ~/.whonix", shell=True)


class Notice(QtGui.QDialog):

    def __init__(self):

        super(Notice, self).__init__()

        self.initUI()

    def initUI(self):

        cb = QtGui.QCheckBox('Do not show this message again', self)
        cb.move(25, 230)
        cb.stateChanged.connect(self.checkState)

        OKbtn = QtGui.QPushButton('OK', self)
        OKbtn.clicked.connect(QtCore.QCoreApplication.instance().quit)
        OKbtn.resize(OKbtn.sizeHint())
        OKbtn.move(265, 260)

        lb = QtGui.QLabel(
"""
The previous text is now obsolete. You can type lines of any length, it results as one paragraph per line. For example, you could write the story of you life in a single line (if you had a simple life).

Just enter a blank line

to separate the paragraphs.

Work in progress to automatically adjust the size of the window and the size of the text label depending on the text size.
$
23456

""", self)
        lb.setGeometry(0, 0, 550, 190)  # window vsize -110.
        lb.setWordWrap(True)
        lb.move(25, 20)

        self.resize(600, 300)
        #self.center()
        self.setWindowTitle('First use notice')
        self.show()

    def checkState(self, state):

        if (str(state)) == "2":
            f = open("/home/user/.whonix/first_use_check.done", "w")  # IOError if "~/.whonix"
            f.close()
        elif (str(state)) == "0":
            call("rm ~/.whonix/first_use_check.done", shell=True)

    def center(self):

        self.resize(False)
        qr = self.frameGeometry()
        cp = QtGui.QDesktopWidget().availableGeometry().center()
        qr.moveCenter(cp)
        self.move(qr.topLeft())


def main():

    app = QtGui.QApplication(sys.argv)
    ex = Notice()
    sys.exit(app.exec_())

if __name__ == '__main__':
    main()

I’ll start again with the packaging, but I think it would be nice to try replacing the popups for whonixcheck and timesync too.

That one works really great! It should be packaged as gateway-first-run-notice and installed by default in Whonix 9?

Yeah. Created a separate topic for it: