process runnig in terminal

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
samiel60

process runnig in terminal

Post by samiel60 »

Using gnome terminal, every thing I do I receive the following message:

Code: Select all

A process in this terminal is still running. Closing the terminal will interrupt the process
even if there are no processes ongoing, f.e. after a simple $ ls
What's the matter?
thanx
s
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.
samiel60

Re: process runnig in terminal

Post by samiel60 »

none has my same problem?
Mute Ant

Re: process runnig in terminal

Post by Mute Ant »

I guess the window holding the terminal is still running the 'bash' binary. You can exit bash...
o Using a Ctrl+D keypress
...or...
o Using the exit command.
gm10

Re: process runnig in terminal

Post by gm10 »

samiel60 wrote: Thu Jul 12, 2018 4:59 pm none has my same problem?
If that happens after opening the terminal window, typing ls and then trying to close it? No, that shouldn't or even wouldn't happen. My guess is you're leaving some important steps out in your description of what you're doing.
samiel60

Re: process runnig in terminal

Post by samiel60 »

An example. I open my machine, no other processes. I open the console and launch

Code: Select all

samiel@darkstar:~$ su -
Password: 
root@darkstar:~# tlmgr update  --self --all --reinstall-forcibly-removed --repository http://mirror.ctan.org/systems/texlive/tlnet
tlmgr: package repository http://ctan.mirror.garr.it/mirrors/CTAN/systems/texlive/tlnet (verified)
tlmgr: saving backups to /usr/local/texlive/2018/tlpkg/backups
[1/4, ??:??/??:??] update: pxjahyper [105k] (46440 -> 48207) ... done
[2/4, 00:00/00:00] update: texlive-docindex [237k] (48194 -> 48205) ... done
[3/4, 00:01/00:02] update: texlive-scripts [118k] (48162 -> 48205) ... done
[4/4, 00:02/00:03] update: todonotes [439k] (48181 -> 48208) ... done
running mktexlsr ...
done running mktexlsr.
running mtxrun --generate ...
done running mtxrun --generate.
tlmgr: package log updated: /usr/local/texlive/2018/texmf-var/web2c/tlmgr.log
Now I try to close the console windows with the mouse and receive that message.
If I give "exit" before, ne message. But updating LaTeX is already finished,...
User avatar
smurphos
Level 18
Level 18
Posts: 8501
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: process runnig in terminal

Post by smurphos »

The process su is running until you explicitly end it using exit.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
User avatar
Snafu
Level 2
Level 2
Posts: 65
Joined: Tue Mar 13, 2018 7:01 am
Location: Australia

Re: process runnig in terminal

Post by Snafu »

But updating LaTeX is already finished,...
When a process finishes your prompt will reappear
When all else fails follow the instructions
gm10

Re: process runnig in terminal

Post by gm10 »

samiel60 wrote: Mon Jul 16, 2018 6:08 pm If I give "exit" before, ne message. But updating LaTeX is already finished,...
As smurphos said, you launched su, until you exit that it remains running. That's why it's preferable to use the sudo prefix to launch a command that you need to run with elevated privileges.
samiel60

Re: process runnig in terminal

Post by samiel60 »

ahhhhhhhhhhhh, I did't imagine so...
strange, for in debian I've not this situation!
thanx !!
samiel60

Re: process runnig in terminal

Post by samiel60 »

but sudo is as su or su - ?
User avatar
smurphos
Level 18
Level 18
Posts: 8501
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: process runnig in terminal

Post by smurphos »

samiel60 wrote: Tue Jul 17, 2018 10:48 am but sudo is as su or su - ?
Nope - sudo temporarily gives your user root privileges but does not change the user. su switches to the root user.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
gm10

Re: process runnig in terminal

Post by gm10 »

samiel60 wrote: Tue Jul 17, 2018 10:48 am but sudo is as su or su - ?
sudo is basically like su -c, except slightly more convenient to use.

Also sudo doesn't need the root password, just an account that's part of the sudo group. In fact, Ubuntu has root login disabled by default.
samiel60

Re: process runnig in terminal

Post by samiel60 »

I asked because su starts an interactive non-login shell, so it reads, only, if present, ~ /.bashrc;
the environment variables remain almost unchanged compared to those of the user
from whose shell the command was launched; the immediate consequence is that we find ourselves root
in the same starting directory. You can see it considering, for example, the fact that, giving up
and listed the variables with the env command, the USER entry continues to give the user name, while
from the whoami command it is root.
On the other hand, su - starts a login shell, so it reads all the files
configuration (ie / etc / profile, ~ /.profile, ~ /.bash_profile, ~ /.bash_login and - when
logout - ~ /.bash_logout; as a result all the variables are reset to root of environment.
gm10

Re: process runnig in terminal

Post by gm10 »

You are looking for sudo -s and sudo -i, respectively.
samiel60

Re: process runnig in terminal

Post by samiel60 »

thanx for your explanation!
just what i was looking for :)

s
gm10

Re: process runnig in terminal

Post by gm10 »

just note that either of those two options, if you use them on their own and not followed by a command, will start a root shell and thus get you back to your original problem. you'll keep getting that warning unless you exit out of the root shell first.

you don't usually need a root shell though, that's what the original recommendation for sudo as a prefix before a command was about.
samiel60

Re: process runnig in terminal

Post by samiel60 »

an example. I install TexLivE. I put in /etc/profile the path for executables,
read that file with

Code: Select all

source
command. if I make all with

Code: Select all

su
the system doesn't find the executables, if I make all with

Code: Select all

su -
it finds all and I can upgrade TexLivE without reboot...
gm10

Re: process runnig in terminal

Post by gm10 »

But that's your own fault then for configuring it only for the root shell. The system-wide path variable is defined in /etc/environment. Although if you installed your program to a standard location you'd never have to change the path, anyway.

Also if you just need to pass a temporary path to a program you can always env PATH="/TEMPPATH:$PATH" program.

Last but not least, sudo -i program will handle your current way of doing things but without having to open a root shell.
samiel60

Re: process runnig in terminal

Post by samiel60 »

the standard is to write LaTeX path in /etc/profile and in ~/.bashrc

Code: Select all

PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH; export PATH
MANPATH=/usr/local/texlive/2018/texmf-dist/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2018/texmf-dist/doc/info:$INFOPATH; export INFOPATH
Locked

Return to “Software & Applications”