diff -Naurp python-caja-1.26.0.orig/src/caja-python.c python-caja-1.26.0.new/src/caja-python.c --- python-caja-1.26.0.orig/src/caja-python.c 2021-08-07 16:18:21.000000000 +0200 +++ python-caja-1.26.0.new/src/caja-python.c 2023-11-04 01:14:00.651562491 +0100 @@ -193,7 +193,6 @@ caja_python_init_python (void) { PyObject *gi, *require_version, *args, *caja, *descr; GModule *libpython; - wchar_t *argv[] = { L"caja", NULL }; if (Py_IsInitialized()) return TRUE; @@ -211,16 +210,10 @@ caja_python_init_python (void) return FALSE; } - debug("PySys_SetArgv"); - PySys_SetArgv(1, argv); - if (PyErr_Occurred()) - { - PyErr_Print(); - return FALSE; - } - - debug("Sanitize the python search path"); - PyRun_SimpleString("import sys; sys.path = list(filter(None, sys.path))"); + debug("Sanitize the python search path and set sys.argv"); + PyRun_SimpleString("import sys; " + "sys.path = list(filter(None, sys.path)); " + "sys.argv = ['caja']"); if (PyErr_Occurred()) { PyErr_Print();