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

Need help with C, C++, perl, python, etc?

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

Postby Scorpion » 2018-11-27 19:50

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.
Scorpion
 
Posts: 59
Joined: 2018-10-17 11:38

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

Postby stevepusser » 2018-11-27 21:44

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Flightgear 2018.2.2, 4.19.5 kernel, wine-staging 4.0~rc1, Pale Moon 28.2.2, Mesa 18.2.6, Midori 7.0
User avatar
stevepusser
 
Posts: 10276
Joined: 2009-10-06 05:53

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

Postby Scorpion » 2018-11-27 22:09

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.)
Scorpion
 
Posts: 59
Joined: 2018-10-17 11:38


Return to Programming

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable