# Run graphical hello world from command line

**URL:** <https://racket.discourse.group/t/run-graphical-hello-world-from-command-line/265>\
**Category:** Questions & Answers\
**Tags:** question\
**Created:** [November 25, 2021, 3:57pm UTC](https://racket.discourse.group/t/run-graphical-hello-world-from-command-line/265 "2021-11-25T15:57:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![decuser](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@decuser](https://racket.discourse.group/u/decuser)\
**Post date:** [November 25, 2021, 3:57pm UTC](https://racket.discourse.group/t/run-graphical-hello-world-from-command-line/265/1 "2021-11-25T15:57:04Z")

</div>

I have modified the example given at [https://racket-lang.org/:](https://racket-lang.org/:)

```
#lang racket/gui

(message-box "Hello, world" "hello world")

```

It works fine in dr racket. How do I run it from the command line?

I saved it in a file hello.rkt, and ran:

```
racket -f hello.rkt

```

and also

```
gracket -f hello.rkt

```

to no avail. I don't get any feedback at the command line, but I don't get any output graphically, either.

```
racket --version
Welcome to Racket v8.3 [cs].

cat /etc/linuxmint/info
RELEASE=20.2
CODENAME=uma
EDITION="Cinnamon"
DESCRIPTION="Linux Mint 20.2 Uma"
DESKTOP=Gnome
TOOLKIT=GTK
NEW_FEATURES_URL=https://www.linuxmint.com/rel_uma_cinnamon_whatsnew.php
RELEASE_NOTES_URL=https://www.linuxmint.com/rel_uma_cinnamon.php
USER_GUIDE_URL=https://www.linuxmint.com/documentation.php
GRUB_TITLE=Linux Mint 20.2 Cinnamon

```

Thanks for any helpful advice!

---

<div class="post-metadata">

**Author:** ![ryanc](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/ryanc/32/71_2.png) [@ryanc](https://racket.discourse.group/u/ryanc)\
**Post date:** [November 25, 2021, 4:16pm UTC](https://racket.discourse.group/t/run-graphical-hello-world-from-command-line/265/2 "2021-11-25T16:16:18Z")

</div>

The `-f` option is for `load`ing non-module files, which is an old and mostly obsolete manner of using Racket. So what your commands did is `load` your file's module declaration... but then nothing told Racket to actually `require` (instantiate) the module, so Racket just exited.

You can use the `-t` option instead:

```
racket -t hello.rkt
gracket -t hello.rkt

```

Or you can just omit it; this also works:

```
racket hello.rkt
gracket hello.rkt

```

The two are slightly different in how they process command-line options after the module file name: in the `-t` version Racket tries to process any subsequent options in the command line (up to a `--`), but in the second version, Racket just forwards all of subsequent options to your program.

---

<div class="post-metadata">

**Author:** ![decuser](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@decuser](https://racket.discourse.group/u/decuser)\
**Post date:** [November 25, 2021, 4:30pm UTC](https://racket.discourse.group/t/run-graphical-hello-world-from-command-line/265/3 "2021-11-25T16:30:16Z")

</div>

Sheesh. I feel dense. That worked perfectly and explained what was happening.
