You are not logged in.
Pages: 1
I am trying to run MI flash tool for linux to restore my device. I downloaded the tool from https://github.com/IcemanDev/XIAOMI-TOO … -by-IceMan
Whenever I try to run the executable I get this error
# Option “-x” is deprecated and might be removed in a later version of gnome-terminal.
# Use “-- ” to terminate the options and put the command line to execute after it.
# Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error spawning command line “dbus-launch --autolaunch=0d1e7aa7776d467fbe7539cb236a1b8e --binary-syntax --close-stderr”: Child process exited with code 1
[tejonidhi@arch Xiaomi_MiFlash_new]$
I tried putting -- b/w the command but it didn't work sudo -- ./go.sh?
The file has executable bit applied.
[tejonidhi@arch Xiaomi_MiFlash_new]$ ls -l
total 4
-rwxr-xr-x 1 tejonidhi tejonidhi 430 Sep 20 2017 go.sh
[tejonidhi@arch Xiaomi_MiFlash_new]$
How do I solve this issue?
Regards
Last edited by Shashwat (2021-05-16 11:23:01)
Offline
(I am responding ignoring the question “I tried putting -- b/w the command but it didn't work sudo -- ./go.sh?”, since I can’t parse it)
go.sh uses the -x option to execute a command, instead of separating the command from the options with a --.
Last edited by mpan (2021-05-16 12:47:26)
Sometimes I seem a bit harsh — don’t get offended too easily!
Online
That "go.sh" script is ridiculous. All it does is run another command in a new terminal. As you are already in a terminal when you are trying to execute go.sh, just run the command instead:
.bin/xiaomi_tools/xiaomi_tools.cfg
Alternatively, if you really want to launch a gnome-terminal to run that command, then edit the one-line go.sh script as follows:
- gnome-terminal --geometry=99x100 -x bash -c "$PWD/.bin/xiaomi_tools/xiaomi_tools.cfg; bash"
+ gnome-terminal --geometry=99x100 -- bash -c "$PWD/.bin/xiaomi_tools/xiaomi_tools.cfg; bash"
Of course, if you're editting it anyways, you should get rid of that absolutely stupid use of $PWD which will cause the script to fail more often than it will solve any problem. (using `$(dirname $0)` instead would actually achieve the intended goal, but it's still a bit silly).
Overall though, I'd never trust a tool written that foolishly. My suspicion is increased by the author's apparent goal of "hiding" all the actual script content in a /.bin/ directory.
Last edited by Trilby (2021-05-16 13:34:27)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I get the same error while running this script. After @Trilby edits I get
# Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error spawning command line “dbus-launch --autolaunch=6fc8517ce7474f3fbf5eec72ecda6a98 --binary-syntax --close-stderr”: Child process exited with code 1
. Help
Offline
type gnome-terminal
Offline
Pages: 1