Author Topic: Strange behavior in xterm  (Read 346 times)

Offline perosoft

  • Multiple posting newcomer
  • *
  • Posts: 12
Strange behavior in xterm
« on: Yesterday at 09:44:16 am »
Hi,

Using codeblocks with gcc compiler, linux.
When i run program in codeblocks, xterm appear.
In source i have a system call: system("latex");
Result is: sh: line 1: latex: command not found.
But if i simple launch xterm latex is found.
Launching xterm by codeblocks does not find latex.

If i launch codeblocks from console all is fine xterm find latex
Details
Host: arch Kernel: 6.13.2-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
Desktop: KDE Plasma v: 6.3.0 Distro: Arch Linux

Sugestions, please !




Offline stahta01

  • Lives here!
  • ****
  • Posts: 7721
    • My Best Post
Re: Strange behavior in xterm
« Reply #1 on: Yesterday at 05:47:05 pm »
Posting the result of below from the system shell might help

Code
which latex
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline perosoft

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Strange behavior in xterm
« Reply #2 on: Today at 05:02:12 am »
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024) (preloaded format=latex)
 restricted \write18 enabled.

which latex
/usr/local/texlive/2024/bin/x86_64-linux/latex

user .bashrc

cat .bashrc
#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
alias grep='grep --color=auto'
PS1='[\u@\h \W]\$ '

export PATH="/usr/local/texlive/2024/bin/x86_64-linux:$PATH"
« Last Edit: Today at 05:05:50 am by perosoft »

Offline Михаил Агарков

  • Single posting newcomer
  • *
  • Posts: 5
  • Highly sensitive programmer. ☮☯
    • Codeberg
Re: Strange behavior in xterm
« Reply #3 on: Today at 10:28:14 am »
You need to do system("/usr/local/texlive/2024/bin/x86_64-linux/latex");
instead or install latex in /usr/bin/ for it to work AFAIK.

Offline perosoft

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Strange behavior in xterm
« Reply #4 on: Today at 03:56:28 pm »
Prior to archlinux, i have kubuntu.
All work with no problems.
This problem apear on arch linux
And yes, system("/usr/local/texlive/2024/bin/x86_64-linux/latex");, working.
Thank you !
« Last Edit: Today at 04:27:47 pm by perosoft »