Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

X-terminal-emulator provided by gnome-terminal prob[SOLVED]

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

X-terminal-emulator provided by gnome-terminal prob[SOLVED]

#1 Post by Scorpion »

I made a (first) script to launch a file that needs to be ran in a terminal. Then I made a .dekstop to launch it.
If I used x-terminal-emulator:

Code: Select all

#!/system/bin/sh
cd <file_location>
x-terminal-emulator -e ./<file>
It cannot take many of all the (gnome-terminal) arguments like

Code: Select all

--maximize --profile=<profile_name>

but works.
And I need to use a second script that launch the first one:

Code: Select all

#!/bin/sh
cd /<first_script_location>
sh <first_script>
The .desktop executes the second script:

Code: Select all

[...]
Exec=/<second_script_location>/./<second_script>
[...]
How can I use all the arguments in x-terminal-emulator?

If i use gnome-terminal:
It can take all the arguments:

Code: Select all

#!/system/bin/sh
cd <file_location>
gnome-terminal --maximize --profile=<profile_name> -e ./<file>
But the .desktop doesn't work. If I launch it nothing happens.

If I launch the first script: nothing happens.
I if I do it with the option "Run it in terminal" (that is not necessary as the script use the terminal):

Code: Select all

Failed to execute child process "/<first_script_location>/<first_script>" (No such file or directory) 
Same error with x-terminal-emulator (when I use directly the first script).
Last edited by Scorpion on 2018-11-27 22:25, edited 2 times in total.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: X-terminal-emulator provided by gnome-terminal problem

#2 Post by stevepusser »

First line:

Code: Select all

#!/system/bin/sh
How did you get a /system folder in / ? Usually

Code: Select all

#!/bin/sh
is just fine.
MX Linux packager and developer

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: X-terminal-emulator provided by gnome-terminal problem

#3 Post by Scorpion »

I copied it from somewhere, I tried it works fine with the first scripts.
This is my .desktop:

Code: Select all

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/
Name=
Comment=
Icon=/
Is it fine?
(I forgot Terminal=true, it kept launching new terminal instances.)

Post Reply