aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Timber <dxdt@dev.snart.me>2024-11-01 17:01:50 +0100
committerDavid Timber <dxdt@dev.snart.me>2024-11-01 17:01:50 +0100
commitc0afe2bac60c18cf25b8d5fa9aa9ac193ab952e4 (patch)
tree00d9a0e52feb112de0245a0ec905f2a317f28b52
parentccea7db392fbbf9c8c8a742b20c79cd913e19f36 (diff)
Fix crash bug, update docHEADmaster
-rw-r--r--README.md34
-rw-r--r--src/xbouncing.c11
2 files changed, 39 insertions, 6 deletions
diff --git a/README.md b/README.md
index 0a02297..a28345f 100644
--- a/README.md
+++ b/README.md
@@ -2,3 +2,37 @@
The X11 bouncing DVD logo. A little gimmick for a new video.
![Screen capture of xbouncing in action](doc/animated.webp)
+
+## Cloud Demo
+If you're running Linux, you can simply use SSH X11 forwarding to try it out
+without installing anything at all. However, due to network delay, it won't be
+as smooth as running it on your machine locally.
+
+```
+ssh -X dvd@sshs.snart.me
+```
+
+If you're running Mac or Windows, you may use **XQuartz** or **Xming**.
+
+## INSTALL
+To build it from source and run it on your machine yourself,
+
+```sh
+sudo dnf install git cmake gcc libX11-devel libXrandr-devel
+
+git clone https://github.com/dxdxdt/xbouncing
+cd xbouncing
+
+cmake -B build
+cd build
+
+make
+sudo make install
+```
+
+## Usage
+```sh
+xbouncing
+```
+
+Interrupt(`Ctrl` + `C`) or terminate.
diff --git a/src/xbouncing.c b/src/xbouncing.c
index d1f83b4..2f15ef0 100644
--- a/src/xbouncing.c
+++ b/src/xbouncing.c
@@ -127,13 +127,12 @@ static void update_screen_info (void) {
static void print_l18n_xopen_err (void) {
const char *LANG = getenv("LANG");
- const char *msg;
+ const char *msg = "Could not open X display.";
- if (strncmp(LANG, "ko", 2) == 0) {
- msg = "X 서버 연결 실패.";
- }
- else {
- msg = "Could not open X display.";
+ if (LANG != NULL) {
+ if (strncmp(LANG, "ko", 2) == 0) {
+ msg = "X 서버 연결 실패.";
+ }
}
fprintf(stderr, "%s\n", msg);