Gnome-shell-extension-gsconnect: Document and finalize CLI usage

Created on 1 Dec 2019  ·  16Comments  ·  Source: GSConnect/gnome-shell-extension-gsconnect

We should document the CLI interface in the wiki, finalize the options so it's relatively stable, and probably test it.

It would probably be nice to have a few example scripts that can be used with the runcommand plugin, but becoming a repository for them sounds like a bad idea, due to reviewing/security/etc.

A start is here: CLI Scripting

All 16 comments

Reading the help listing, one thing I'd suggest is grouping the device actions separately, to make it clear they all require a -d / --device argument as well. So, maybe something like:

$ ./daemon.js --help
Usage:
  GSConnect [OPTION…]

Help Options:
  -h, --help                          Show help options
  --help-all                          Show all help options
  --help-gapplication                 Show GApplication options
  --help-gtk                          Show GTK+ Options

Application Options:
  -l, --list-devices                  List available devices
  -a, --list-all                      List all devices
  -v, --version                       Show release version
  --display=DISPLAY                   X display to use
  -d, --device=<device-id>            Target Device

Device Actions (with --device):
  --pair                              Pair
  --unpair                            Unpair
  --message=<phone-number>            Send SMS
  --message-body=<text>               Message Body
  --notification=<title>              Send Notification
  --notification-appname=<name>       Notification App Name
  --notification-body=<text>          Notification Body
  --notification-icon=<icon-name>     Notification Icon
  --notification-id=<id>              Notification ID
  --photo                             Photo
  --ping                              Ping
  --ring                              Ring
  --share-file=<filepath|URI>         Share File
  --share-link=<URL>                  Share Link

Unfortunately I don't think we can make our own groups, since the only way to add options to a GOptionGroup is using GOptionEntry which is a bare struct type. Probably GOptionEntry would have to be turned into a boxed type in GLib with a constructor func.

Mmm, so I see. An issue that was identified 5.5 years ago. How special.

...But I seem to be having bigger problems with even the _single_ group. I tried to run ./daemon.js --help in the v29 release extension dir, and found it was dying when it couldn't find a schema file:

$ ./daemon.js --help

(gjs:420030): Gjs-WARNING **: 20:34:15.913: JS ERROR: GLib.FileError: Failed to open file “/usr/local/share/glib-2.0/schemas/gschemas.compiled”: open() failed: No such file or directory
@/home/ferd/rpmbuild/REPOS/gsconnect/extensions/[email protected]/_gsconnect.js:80:25
@./daemon.js:29:1

Script ./daemon.js threw an exception

I poked around and found that's because there are /usr/local/... paths in metadata.json, which of course on Fedora are totally wrong. So I edited those to remove the .../local... part, and now it's just segfaulting _silently_ on me:

$ ./daemon.js --help 
zsh: segmentation fault (core dumped)  ./daemon.js --help

GJS apparently has a very euphemistic notion of what a "debugger" is, because I tried to run the code in its debugging mode and it _still_ died on the same segfault:

$ gjs -d ./daemon.js --help
GJS debugger. Type "help" for help
db> c
zsh: segmentation fault (core dumped)  gjs -d ./daemon.js --help

IT BROKEN. :cry:

Hah! Turns out, it was this:

@/home/ferd/rpmbuild/REPOS/gsconnect/extensions/[email protected]/_gsconnect.js:80:25

extensions is symlinked to my $HOME/.local/share/gnome-shell/extensions, but it seems the relative path matters because if I cd to the extension directory _directly_ instead of through that symlink, everything works fine. D'oh.

Hmm, if you're using rpmbuild that fedora uses, it looks a little eccentric to me. Generally those paths should be set properly by the meson.build.

That's weird that it segfaults, but fyi you can just run GJS apps with gdb as normal to track it down.

EDIT: er, less normal actually, but something like gdb --args /usr/bin/gjs daemons.js should work. Of course, now that I do that I notice we're probably using way to many threads here :/

Hmm, if you're using rpmbuild that fedora uses, it looks a little eccentric to me. Generally those paths should be set properly by the meson.build.

Oh, I'm not actually building RPMs in this case, all of my development work lives in $HOME/rpmbuild/REPOS/ for... historical reasons. (read: No good reason.)

Even in v29 and v30 downloaded from e.g.o the metadata.json file contains /usr/local/ paths, tho:

Official v30 from extensions.gnome.org

{
  "_generated": "Generated by SweetTooth, do not edit",
  "bin": {
    "ffmpeg": "ffmpeg",
    "openssl": "openssl",
    "ssh_add": "ssh-add",
    "ssh_keygen": "ssh-keygen"
  },
  "description": "GSConnect is a complete implementation of KDE Connect especially for GNOME Shell with Nautilus, Chrome and Firefox integration. It does not rely on the KDE Connect desktop application and will not work with it installed.\n\nKDE Connect allows devices to securely share content like notifications or files and other features like SMS messaging and remote control. The KDE Connect team has applications for Linux, BSD, Android, Sailfish and Windows.\n\nKDE Connect Indicator can support Gtk desktops other than GNOME Shell.\n\nPlease report issues on Github!",
  "extension-id": "gsconnect",
  "gschemadir": "/usr/local/share/glib-2.0/schemas",
  "libdir": "/usr/local/lib64",
  "localedir": "/usr/local/share/locale",
  "name": "GSConnect",
  "shell-version": [
    "3.34"
  ],
  "url": "https://github.com/andyholmes/gnome-shell-extension-gsconnect/wiki",
  "uuid": "[email protected]",
  "version": 30
}

(At least it's /usr/local/lib64... if Ubuntu and Debian users get the same thing, it'll be even _wrong_-er for them as their arch libdir is /usr(/local)?/lib/x86_64-linux-gnu/.)

That's correct. If you're installing as a user extension those directories aren't used because we know where the files are. It would be impossible to pre-populate those with values that worked for every distribution, and we can't install files to those directories anyways, since we're unpriviledged.

Huh. In fact, it seems trying to run daemon.js --help from a _build directory also crashes. If it's run _with_ the correct paths in the generated metadata.json, it's the same silent segfault:

$ meson _build .
$ meson configure --prefix=/usr _build
$ ninja -C _build make-zip
[...]
$ cd _build/[email protected]
$ ./service/daemon.js --help
zsh: segmentation fault (core dumped)  ./service/daemon.js --help

Bit odd, but not really important I guess. It works where it's supposed to.

What happens when you run it with gdb --args /usr/bin/gjs?

Same, I'm waiting on it loading debug symbols now for the backtrace...

Well, that's long enough to be basically useless.

Backtrace after segfault

(gdb) run
Starting program: /usr/bin/gjs ./service/daemon.js --help
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff570a700 (LWP 120602)]
[Thread 0x7ffff570a700 (LWP 120602) exited]
[New Thread 0x7ffff570a700 (LWP 120603)]
[New Thread 0x7ffff4c3e700 (LWP 120604)]
[New Thread 0x7ffff4a3d700 (LWP 120605)]
[New Thread 0x7ffff483c700 (LWP 120606)]
[New Thread 0x7fffe7fff700 (LWP 120607)]
[New Thread 0x7fffe77fe700 (LWP 120608)]

Thread 1 "gjs" received signal SIGSEGV, Segmentation fault.
g_settings_schema_get_path (schema=0x0) at ../gio/gsettingsschema.c:1002
1002      return schema->path;
(gdb) bt
#0  g_settings_schema_get_path (schema=0x0) at ../gio/gsettingsschema.c:1002
#1  0x00007ffff7d6a771 in g_settings_constructed
    (object=0x5555559bfe10 [GSettings]) at ../gio/gsettings.c:667
#2  0x00007ffff7c2e5f6 in g_object_new_internal
    (class=class@entry=0x555555975450, params=params@entry=0x7fffffffa110, n_params=n_params@entry=1) at ../gobject/gobject.c:1867
#3  0x00007ffff7c2fabb in g_object_new_with_properties
    (object_type=0x5555559752e0 [GSettings], n_properties=n_properties@entry=1, names=names@entry=0x5555559b8c00, values=values@entry=0x5555559c23f0)
    at ../gobject/gobject.c:1989
#4  0x00007ffff7eb6904 in ObjectInstance::init_impl(JSContext*, JS::CallArgs const&, JS::MutableHandle<JSObject*>)
    (this=0x5555559bfcf0, context=0x555555590260, args=..., object=...)
    at ./gi/wrapperutils.h:994
#5  0x00007ffff7eb6bfe in ObjectBase::init_gobject(JSContext*, unsigned int, JS::Value*) (context=0x555555590260, argc=<optimized out>, vp=<optimized out>)
    at /usr/include/mozjs-60/js/RootingAPI.h:1116
#6  0x00007ffff6ad551b in js::CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&)
    (args=..., native=0x7ffff7eb6af0 <ObjectBase::init_gobject(JSContext*, unsigned int, JS::Value*)>, cx=0x555555590260)
    at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/dist/include/js/CallArgs.h:270
#7  js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) (cx=0x555555590260, args=..., construct=<optimized out>) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/Interpreter.cpp:435
#8  0x00007ffff6ad7963 in js::CallFromStack(JSContext*, JS::CallArgs const&) (args=..., cx=<optimized out>) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/Interpreter.cpp:2873
#9  Interpret(JSContext*, js::RunState&) (cx=0x555555590260, state=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/Interpreter.cpp:2873
#10 0x00007ffff6afb918 in js::RunScript(JSContext*, js::RunState&) (cx=0x555555590260, state=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/Interpreter.cpp:385
#11 0x00007ffff6ad565a in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) (cx=0x555555590260, args=..., construct=js::NO_CONSTRUCT) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/Interpreter.cpp:457
#12 0x00007ffff6ad5a1d in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) (cx=<optimized out>, fval=..., thisv=..., args=..., rval=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/Interpreter.cpp:500
#13 0x00007ffff679917f in JS_CallFunctionValue(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) (cx=0x555555590260, obj=..., fval=..., args=..., rval=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/dist/include/js/RootingAPI.h:1090
#14 0x00007ffff7ecac52 in GjsContextPrivate::call_function(JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) (this=this@entry=0x5555555910b0, this_obj=this_obj@entry=..., func_val=func_val@entry=..., args=..., rval=...) at gjs/context.cpp:1043
#15 0x00007ffff7eafc34 in ObjectInstance::constructor_impl(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (this=<optimized out>, context=0x555555590260, object=..., argv=...) at /usr/include/mozjs-60/js/RootingAPI.h:1090
#16 0x00007ffff7eb7a6e in GIWrapperBase<ObjectBase, ObjectPrototype, ObjectInstance>::constructor(JSContext*, unsigned int, JS::Value*) (cx=0x555555590260, argc=<optimized out>, vp=<optimized out>) at /usr/include/mozjs-60/js/RootingAPI.h:1090
#17 0x00007ffff6ad582f in js::CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) (args=..., native=0x7ffff7eb7910 <GIWrapperBase<ObjectBase, ObjectPrototype, ObjectInstance>::constructor(JSContext*, unsigned int, JS::Value*)>, cx=0x555555590260) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/dist/include/js/CallArgs.h:270
#18 js::CallJSNativeConstructor(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) (args=..., native=0x7ffff7eb7910 <GIWrapperBase<ObjectBase, ObjectPrototype, ObjectInstance>::constructor(JSContext*, unsigned int, JS::Value*)>, cx=0x555555590260) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/JSContext-inl.h:291
#19 InternalConstruct(JSContext*, js::AnyConstructArgs const&) (cx=0x555555590260, args=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/Interpreter.cpp:525
#20 0x00007ffff6ad8733 in Interpret(JSContext*, js::RunState&) (cx=0x555555590260, state=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/Interpreter.cpp:2866
#21 0x00007ffff6afb918 in js::RunScript(JSContext*, js::RunState&) (cx=0x555555590260, state=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/Interpreter.cpp:385
#22 0x00007ffff6ad6796 in js::ExecuteKernel(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value const&, js::AbstractFramePtr, JS::Value*) (cx=cx@entry=0x555555590260, script=..., envChainArg=..., newTargetValue=..., evalInFrame=..., evalInFrame@entry=..., result=<optimized out>) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/Interpreter.cpp:654
#23 0x00007ffff6ad68c4 in js::Execute(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value*) (cx=0x555555590260, script=..., envChainArg=..., rval=<optimized out>) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/dist/include/js/Value.h:1027
#24 0x00007ffff678e70f in Evaluate(JSContext*, js::ScopeKind, JS::HandleObject, JS::ReadOnlyCompileOptions const&, JS::SourceBufferHolder&, JS::MutableHandleValue) (cx=cx@entry=0x555555590260, scopeKind=<optimized out>, env=env@entry=..., optionsArg=..., srcBuf=..., rval=..., rval@entry=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/dist/include/js/RootingAPI.h:1090
#25 0x00007ffff678e9bb in Evaluate(JSContext*, JS::AutoObjectVector&, JS::ReadOnlyCompileOptions const&, JS::SourceBufferHolder&, JS::MutableHandleValue) (cx=cx@entry=0x555555590260, envChain=..., optionsArg=..., srcBuf=..., rval=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/Scope.h:266
#26 0x00007ffff678ea99 in JS::Evaluate(JSContext*, JS::AutoVector<JSObject*>&, JS::ReadOnlyCompileOptions const&, JS::SourceBufferHolder&, JS::MutableHandle<JS::Value>) (cx=cx@entry=0x555555590260, envChain=..., optionsArg=..., srcBuf=..., rval=..., rval@entry=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/jsapi.cpp:4260
#27 0x00007ffff7edeb9e in GjsModule::evaluate_import(JSContext*, JS::Handle<JSObject*>, char const*, long, char const*) (this=this@entry=0x5555558d9ef0, cx=cx@entry=0x555555590260, module=..., module@entry=..., script=script@entry=0x5555558da5e0 "'use strict';\n\nconst Gio = imports.gi.Gio;\nconst GIRepository = imports.gi.GIRepository;\nconst GLib = imports.gi.GLib;\n\n\n/**\n * String.format API supporting %s, %d, %x and %f. Used exclusively for get"..., script_len=<optimized out>, filename=filename@entry=0x5555558d9d00 "/home/ferd/rpmbuild/REPOS/gsconnect/_build/[email protected]/_gsconnect.js") at /usr/include/mozjs-60/js/RootingAPI.h:1116
#28 0x00007ffff7ede6ee in GjsModule::import_file(JSContext*, JS::Handle<JSObject*>, _GFile*) (file=0x5555558d68a0, module=..., cx=0x555555590260, this=0x5555558d9ef0) at gjs/module.cpp:148
#29 GjsModule::import(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, char const*, _GFile*) (file=0x5555558d68a0, name=0x5555558d84e0 "_gsconnect", id=..., importer=..., cx=0x555555590260) at gjs/module.cpp:230
#30 gjs_module_import(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, char const*, _GFile*) (cx=cx@entry=0x555555590260, importer=..., importer@entry=..., id=id@entry=..., name=name@entry=0x5555558d84e0 "_gsconnect", file=file@entry=0x5555558be0c0) at gjs/module.cpp:260
#31 0x00007ffff7ed66e5 in import_file_on_module (file=0x5555558be0c0, name=0x5555558d84e0 "_gsconnect", id=..., obj=..., context=0x555555590260) at gjs/importer.cpp:593
#32 do_import (id=..., priv=<optimized out>, obj=..., context=0x555555590260) at gjs/importer.cpp:593
#33 importer_resolve(JSContext*, JS::HandleObject, JS::HandleId, bool*) (context=0x555555590260, obj=..., id=..., resolved=0x7fffffffc288) at gjs/importer.cpp:790
#34 0x00007ffff665b510 in js::CallResolveOp (recursedp=<synthetic pointer>, propp=..., id=..., obj=..., cx=0x555555590260) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/dist/include/js/RootingAPI.h:536
#35 js::LookupOwnPropertyInline<(js::AllowGC)1> (donep=<synthetic pointer>, propp=..., id=..., obj=..., cx=0x555555590260) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/NativeObject-inl.h:782
#36 NativeGetPropertyInline<(js::AllowGC)1> (vp=..., nameLookup=NotNameLookup, id=..., receiver=..., obj=..., cx=0x555555590260) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/NativeObject.cpp:2251
#37 js::NativeGetProperty(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::Value>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (cx=0x555555590260, obj=..., receiver=..., id=..., vp=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/NativeObject.cpp:2298
#38 0x00007ffff6acd5d1 in js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, js::PropertyName*, JS::MutableHandle<JS::Value>) (vp=..., name=<optimized out>, receiver=..., obj=..., cx=0x555555590260) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/dist/include/js/RootingAPI.h:1090
#39 js::GetProperty(JSContext*, JS::Handle<JS::Value>, JS::Handle<js::PropertyName*>, JS::MutableHandle<JS::Value>) (cx=0x555555590260, v=..., name=..., vp=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/Interpreter.cpp:4067
#40 0x00007ffff6ad8bcf in GetPropertyOperation (vp=..., lval=..., pc=<optimized out>, script=..., fp=<optimized out>, cx=<optimized out>) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/dist/include/js/RootingAPI.h:1090
#41 Interpret(JSContext*, js::RunState&) (cx=0x555555590260, state=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/Interpreter.cpp:2602
#42 0x00007ffff6afb918 in js::RunScript(JSContext*, js::RunState&) (cx=0x555555590260, state=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/Interpreter.cpp:385
#43 0x00007ffff6ad6796 in js::ExecuteKernel(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value const&, js::AbstractFramePtr, JS::Value*) (cx=cx@entry=0x555555590260, script=..., envChainArg=..., newTargetValue=..., evalInFrame=..., evalInFrame@entry=..., result=<optimized out>) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/Interpreter.cpp:654
#44 0x00007ffff6ad68c4 in js::Execute(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value*) (cx=0x555555590260, script=..., envChainArg=..., rval=<optimized out>) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/dist/include/js/Value.h:1027
#45 0x00007ffff678e70f in Evaluate(JSContext*, js::ScopeKind, JS::HandleObject, JS::ReadOnlyCompileOptions const&, JS::SourceBufferHolder&, JS::MutableHandleValue) (cx=cx@entry=0x555555590260, scopeKind=<optimized out>, env=env@entry=..., optionsArg=..., srcBuf=..., rval=..., rval@entry=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/dist/include/js/RootingAPI.h:1090
#46 0x00007ffff678e9bb in Evaluate(JSContext*, JS::AutoObjectVector&, JS::ReadOnlyCompileOptions const&, JS::SourceBufferHolder&, JS::MutableHandleValue) (cx=0x555555590260, envChain=..., optionsArg=..., srcBuf=..., rval=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/vm/Scope.h:266
#47 0x00007ffff678ea99 in JS::Evaluate(JSContext*, JS::AutoVector<JSObject*>&, JS::ReadOnlyCompileOptions const&, JS::SourceBufferHolder&, JS::MutableHandle<JS::Value>) (cx=<optimized out>, envChain=..., optionsArg=..., srcBuf=..., rval=..., rval@entry=...) at /usr/src/debug/mozjs60-60.9.0-3.fc31.x86_64/jsapi.cpp:4260
#48 0x00007ffff7ecc4f1 in GjsContextPrivate::eval_with_scope(JS::Handle<JSObject*>, char const*, long, char const*, JS::MutableHandle<JS::Value>) (this=0x5555555910b0, scope_object=..., script=<optimized out>, script_len=<optimized out>, filename=0x5555555819f0 "./service/daemon.js", retval=...) at gjs/context.cpp:1009
#49 0x00007ffff7ecc877 in GjsContextPrivate::eval(char const*, long, char const*, int*, _GError**) (this=0x5555555910b0, script=0x555555581a10 "#!/usr/bin/env gjs\n\n'use strict';\n\nimports.gi.versions.Gdk = '3.0';\nimports.gi.versions.GdkPixbuf = '2.0';\nimports.gi.versions.Gio = '2.0';\nimports.gi.versions.GIRepository = '2.0';\nimports.gi.version"..., script_len=34018, filename=0x5555555819f0 "./service/daemon.js", exit_status_p=0x7fffffffd458, error=0x7fffffffd410) at /usr/include/mozjs-60/js/RootingAPI.h:1116
#50 0x00007ffff7eccb8d in gjs_context_eval(GjsContext*, char const*, gssize, char const*, int*, GError**) (js_context=0x5555555911a0 [GjsContext], script=0x555555581a10 "#!/usr/bin/env gjs\n\n'use strict';\n\nimports.gi.versions.Gdk = '3.0';\nimports.gi.versions.GdkPixbuf = '2.0';\nimports.gi.versions.Gio = '2.0';\nimports.gi.versions.GIRepository = '2.0';\nimports.gi.version"..., script_len=34018, filename=0x5555555819f0 "./service/daemon.js", exit_status_p=0x7fffffffd458, error=0x7fffffffd410) at gjs/context.cpp:862
#51 0x0000555555556da9 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at gjs/console.cpp:371
(gdb) 

I do notice, though, that it seems to be something in _gsconnect.js that's triggering the segfault, not daemon.js.

Interesting, I assume you're running GJS 1.58 and/or GNOME 3.34? We added overrides to prevent these crashes, but maybe we forgot GSettingsSchema and only did GSettings. In either case, I bet this is because _gsconnect.js is not finding the correct directory for the settings schema and/or its not compiled by this time.

Running 1.58.3 under 3.34.1, yep.

Okay, I'll submit a PR to GJS later today sometime.

Going to close this since I think I've added everything that makes sense to the CLI options. When I remember I'll try and add some more examples to the Wiki, but otherwise I think this should be good for now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Noobsai picture Noobsai  ·  4Comments

amivaleo picture amivaleo  ·  4Comments

daleosm picture daleosm  ·  6Comments

neumannjan picture neumannjan  ·  3Comments

rugk picture rugk  ·  4Comments