Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-07-2007, 10:57 AM   #1
LQ Newbie
Registered: Jul 2007
Posts: 2

Rep: Reputation: 0
sh error

The following problem does not occur when I run from terminal, but I would like to automate through editor external program calls.

gedit and Texmaker external program calls to metapost work fine, but under certain circumstances (b/etex ) a program, makempx, is called by metapost and I get the error:

sh: makempx: not found

and the required file cannot be made. makempx is in the same /bin folder as mpost which ran in the first place.

This is under Ubuntu Fiesty, TexLive2007, and metapost 1.00 (most recent), required PATH is set in .bashrc and specific configs are set. Again, when I process the file from terminal all goes well.
Old 07-08-2007, 12:09 AM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
If you invoke bash as sh it doesn't check ~/.bashrc
Create a ~/.profile instead.

Old 07-08-2007, 09:10 AM   #3
LQ Newbie
Registered: Jul 2007
Posts: 2

Original Poster
Rep: Reputation: 0
Yes, I went there with trepidation, and added the PATH= ;export $PATH statement:

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
. ~/.bashrc

PATH=/usr/local/texlive/2007/bin/i386-linux:$PATH; export PATH

# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then

But this does not help when run from the text editor. It seems something along this line should work but I am not bash proficient, any suggestions?

Remember, no problems at all when run from command line. What appears to be happening is that the text editor establishes its default path for subprograms so while I had pointed it to the original program (metapost) when that program made a subsequent call the path is from the text editor and misleading.

I have corrected by putting:

PATH=/usr/local/texlive/2007/bin/i386-linux:$PATH; export PATH

in the text editor call to metapost. I have yet to find how to change the editor's default PATH settings, and may not need to.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MPlayer Error Message - Error Opening/Initializing Video Out Device Harpo Linux - Newbie 12 12-29-2009 11:26 PM
Suse CUPS error: cups(File)DoRequest error:client-error-bad-request smdonelan Linux - Hardware 6 04-17-2007 06:46 PM
Error message received from system Error while reading filter description for true Steel_J Linux - Software 2 03-04-2006 06:10 PM
updating new installation of 9.3 ERROR...ERROR...ERROR Morbid SUSE / openSUSE 3 08-15-2005 11:22 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:18 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration