Menu

#655 Popup dialog suggesting user install XQuartz if not installed

Cantillon
closed
nobody
mac (3)
4normal
2017-03-14
2017-03-14
No

If XQuartz not installed, minsky fails with the following exception.

Error initialising Tk: no display name and no $DISPLAY environment variable(null)
no display name and no $DISPLAY environment variable
no display name and no $DISPLAY environment variable
while executing
"load /opt/local/lib/libtk8.6.dylib Tk"
("package ifneeded Tk 8.6.6" script)
invoked from within
"package require -exact Tk 8.6.6"
(file "/opt/local/lib/tk8.6/tk.tcl" line 14)
invoked from within
"source [file join $tk_library tk.tcl]"
(file "/Users/rks/github/minsky/minsky.app/Contents/MacOS/minsky.tcl" line 90)

We can pop up a message from the shell using the following hint from StackOverflow

You can run fragments of applescript from you bash scripts. A simple popup would look like this:

#!/bin/bash
/usr/bin/osascript <<-EOF

    tell application "System Events"
        activate
        display dialog "Hello world"
    end tell

EOF

This will feed the applescript between the EOF tags to osascript and execute it
(resulting in a Hello World popup).

Discussion

  • High Performance Coder

    • status: open --> closed
    • Milestone: Quesnay --> Cantillon
     
  • High Performance Coder

    Done for Cantillon, and cherry-picked into Quesnay

     

Anonymous
Anonymous

Add attachments
Cancel





Auth0 Logo