Link to Application

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Link to Application

Postby DavePritchard » Wed Jan 29, 2014 10:17 pm

I have installed the XDS Module-2 Compiler into /usr/local/xds/bin
The executable is called xc
Permissions for xc are Owner Read & Write, Group read & Write, Other Can Read. User is root, Group is root.
is executable is ticked.

A Link to Application has been created,
Application Properties = Command xc
Work path /usr/local/xds/bin/
Permissions = Owner read & Write, Group Can read, Others Forbidden, User dave, Group dave.

Clicking on the Icon as user or root results in the following

KDEInit could not launch 'xc'.:
Could not find 'xc' executable. ( BUT ITS THERE !! )

I get the same result with the JAL PIC Compiler.
What am I doing wrong, and how do I get it to run ???

Thanks in advance Dave P..







KDEInit could not launch 'xc'.:
Could not find 'xc' executable.
DavePritchard
 
Posts: 48
Joined: Tue Jan 09, 2007 10:55 pm
Location: Somerset UK

Postby lok1950 » Thu Jan 30, 2014 4:22 am

Since you decided to put it in /usr/local/xds/bin it may not be in your path try running it from a terminal opened in it's directory with
Code: Select all
./xc &

the & will detach xc from the terminal as a background process so the terminal will be free for other tasks ;)

Enjoy the Choice :)
User avatar
lok1950
LXF regular
 
Posts: 1035
Joined: Tue May 31, 2005 5:31 am
Location: Ottawa

Postby nelz » Thu Jan 30, 2014 8:53 am

You need to give the full path to the program in the link, the work path is not where the program is stored, it is where it defaults to sorting its data files. The Link basically does

Run command
cd to work path

so you need to make sure it can find the command.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8518
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Link to Application/PATH

Postby DavePritchard » Thu Jan 30, 2014 6:39 pm

I put it in usr/local/xds/bin because that's where the Install text file said to put it, it then said put usr/local/xds/bin in the PATH,
that's where the problem starts.

From a terminal in usr/local/xds/bin,
Code
./xc &
This works Ok,
So the PATH is missing, in a terminal I used the commands export, then echo, and the required path was on the end of a long list, but it seems it is removed when the terminal is closed, when opened again it is no longer there, I have tried as root and as user.

A recent previous posting advised adding to ~/.profile or bash_profile, I have also seen ~/.bashrc mentioned but using find, neither of these files shows up.

So I am back to square one, I cannot find WHERE or HOW to put usr/local/xds/bin in the PATH.

Confused as ever Dave P..
DavePritchard
 
Posts: 48
Joined: Tue Jan 09, 2007 10:55 pm
Location: Somerset UK

Postby nelz » Thu Jan 30, 2014 7:16 pm

~/.bash_profile, as advised in the previous thread. But you should still put the complete path to the command in the Link, because desktops don't always read ~/.bash_profile.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8518
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Link to Application

Postby DavePritchard » Thu Jan 30, 2014 9:07 pm

The first problem was, I could not find a /bash_profile file, there was no result using 'find'.
I have now traced it to my home directory, and amended it, so it now has the line.
CODE
PATH=$PATH:$HOME/bin:/usr/local/xds/bin

The Link to Application has Permissions-Application-Command
CODE
usr/local/xds/bin/xc

Clicking on the Icon still presents the following :-

KDEInit could not launch 'usr/local/xds/bin/xc'.:
Could not find 'usr/local/xds/bin/xc' executable.

Dave P..
DavePritchard
 
Posts: 48
Joined: Tue Jan 09, 2007 10:55 pm
Location: Somerset UK

Postby johnhudson » Thu Jan 30, 2014 9:47 pm

Is the executable a command line or a graphics program? If it is a command line, you need to open Properties>Application>Advanced Options and check Run in terminal.
johnhudson
LXF regular
 
Posts: 881
Joined: Wed Aug 03, 2005 1:37 pm

Re: Link to Application

Postby nelz » Thu Jan 30, 2014 10:20 pm

DavePritchard wrote:The Link to Application has Permissions-Application-Command
CODE
usr/local/xds/bin/xc

Clicking on the Icon still presents the following :-

KDEInit could not launch 'usr/local/xds/bin/xc'.:
Could not find 'usr/local/xds/bin/xc' executable.


You're missing the leading / so it is looking for a usr subdirectory of the current directory.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8518
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

SOLVED Link to Application

Postby DavePritchard » Fri Jan 31, 2014 11:05 am

Thanks for the replies guys.
Forward slash added,
Ticked 'Run in Terminal'
Also ticked 'Do not close when command exits'
And Hey presto it works.

( Just wish these things had a GUI for Linux
which they have for windows ).

Dave P..
DavePritchard
 
Posts: 48
Joined: Tue Jan 09, 2007 10:55 pm
Location: Somerset UK


Return to Help!

Who is online

Users browsing this forum: No registered users and 0 guests