You are not logged in.

#1 2021-05-16 11:20:46

Shashwat
Member
From: India
Registered: 2011-05-08
Posts: 101

Termianl error - Option - x is depreciated

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

#2 2021-05-16 12:46:59

mpan
Member
Registered: 2012-08-01
Posts: 1,372
Website

Re: Termianl error - Option - x is depreciated

(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

#3 2021-05-16 13:34:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,332
Website

Re: Termianl error - Option - x is depreciated

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

#4 2022-01-01 19:22:59

canbus_quartier
Member
Registered: 2022-01-01
Posts: 5

Re: Termianl error - Option - x is depreciated

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

#5 2022-01-01 21:41:23

seth
Member
Registered: 2012-09-03
Posts: 61,191

Re: Termianl error - Option - x is depreciated

type gnome-terminal

Offline

Board footer

Powered by FluxBB