problems to open a software

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
Filippo
Level 2
Level 2
Posts: 90
Joined: Fri Nov 06, 2020 3:38 am

problems to open a software

Post by Filippo »

sorry i don't know if this cateory is correct for this topic.
but can anyone explain to me what this line means?
bash -c "unset LANG && unset QT_PLUGIN_PATH && source /opt/Xilinx/14.7/ISE_DS/settings64.sh && ise"

this is what i find if i open the proprieties of a software on desktop.(in the section command ).

my problem is that if i click on a file, yes my software starts but it don't open the project, it open the last work session that i have done.

for example if i'm working on a project called "P1" and than i save and close and later i open another project, for examples, called "P2" that i have done yesterday software will open the last project that i have done that is "P1".

all that i said happen if i set as default program for opening .xise files the same line that i wrote before
(bash -c "unset LANG && unset QT_PLUGIN_PATH && source /opt/Xilinx/14.7/ISE_DS/settings64.sh && ise")
throught: right click on the software's icon > open with > other applications

how can i open every project, and only the project that i open, with my software?

the software which im talking about is Xilinx ISE webpack for programming fpga's.
thanks in advance :D :D
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Termy
Level 12
Level 12
Posts: 4254
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: problems to open a software

Post by Termy »

Code: Select all

bash -c "unset LANG && unset QT_PLUGIN_PATH && source /opt/Xilinx/14.7/ISE_DS/settings64.sh && ise"
It runs a command in a new BASH (GNU's Bourne Again Shell) instance. BASH is the de facto shell of most Linux distributions, where a shell is both a high-level programming language and a way by which to execute commands, like sudo apt-get update.

The command BASH runs, is this:

Code: Select all

unset LANG && unset QT_PLUGIN_PATH && source /opt/Xilinx/14.7/ISE_DS/settings64.sh && ise
This code uses a rudimentary approach to ensuring the environment of the shell script sourced is as desired; if that succeeds, something called ise is executed. In Linux, each process has its own environment, such as its own $PATH and $HOME, so by using the unset builtin, environment variables $LANG and $QT_PLUGIN_PATH are unset; that is, they're no longer declared or assigned a value. Using the source (AKA: .) builtin allows valid shell code to be executed in the current shell session.

For reference, a cleaner approach to the above, would be:

Code: Select all

LANG='' QT_PLUGIN_PATH='' source /opt/Xilinx/14.7/ISE_DS/settings64.sh && ise
That said, if the script is checking those variables are declared, then this would not be desired. Were that the case, it'd be cleaner to type:

Code: Select all

unset LANG QT_PLUGIN_PATH; source /opt/Xilinx/14.7/ISE_DS/settings64.sh && ise
I'm also Terminalforlife on GitHub.
1000
Level 6
Level 6
Posts: 1023
Joined: Wed Jul 29, 2020 2:14 am

Re: problems to open a software

Post by 1000 »

my problem is that if i click on a file, yes my software starts but it don't open the project, it open the last work session that i have done.
Check settings then if you can not find answer ask developers your software (Xilinx ISE webpack).

This is only example
When I run xed - text editor

Code: Select all

xed
This opens a new unsaved file

Code: Select all

xed file_name
Will open " file_name "

Code: Select all

xed *
Xed will try open any file or folder in place where is open terminal.

From icon settings (/usr/share/applications/xed.desktop) you can find

Code: Select all

xed %U
https://specifications.freedesktop.org/ ... 01s07.html

That's all.

Here you have explained why " LANG " and " QT_PLUGIN_PATH " are disabled before run " ise "
https://wiki.archlinux.org/index.php/Xilinx_ISE_WebPACK


Edit
- On YouTube you have many tutorials how to use the terminal in linux distributions.
- You have something this https://explainshell.com/
However command:

Code: Select all

man your_command
and option

Code: Select all

your_command --help
your friends.
Or

Code: Select all

yelp man:your_command
if you like.
User avatar
secureIT
Level 4
Level 4
Posts: 471
Joined: Wed Dec 05, 2018 1:26 pm

Re: problems to open a software

Post by secureIT »

Hi Filippo,

Open the preferences dialog-box of core generator.

Select : Open previous project on startup

(Specifies whether the last project you worked on in CORE Generator opens the next time the software is launched. When selected, the project opens when you start CORE Generator.)

To start Core generator :

at a shell prompt type :

Code: Select all

coregen
May be this command could be bound to a launcher :

Code: Select all

bash -c coregen
e.g.

Note : i am not a user of Xilinx ISE.
The above information is based on finds from the Internet.

For more assistance ask an expert like : DF8OE

https://www.amateurfunk-sulingen.de/for ... eadid=1539
.
Locked

Return to “Scripts & Bash”