Re: PATH question

2023-11-17 Thread Charles Kroeger
> apt-get -f install

dpkg --configure -a 

I had to use that this morning after the many nvidia related updates that
failed to build the module required to set up the packages in waiting. 

-- 
CK



Re: PATH question

2023-11-13 Thread Timothy M Butterworth
On Sun, Nov 12, 2023 at 9:29 AM Thomas George 
wrote:

> As root I edited bashrc as found in root's home directory
> On 11/11/23 23:23, Timothy Butterworth wrote:
>
> On November 11, 2023, at 8:51 PM, Thomas George 
>  wrote:
>
> >I downloaded the google-chrome deb file to /opt/
> >used dpkg to install the program.
>
> Use sudo apt install ./filename.deb you may need to run sudo apt update
> first.
>
> >
> >initial attempt failed, two lib files missing.
> >added the sbin entries to path and tried again
> >missing files found on the dvd installation disk and google-chrome
> >successfully installed
> >On 11/11/23 13:22, Greg Wooledge wrote:
> >> On Sat, Nov 11, 2023 at 01:03:45PM -0500, Thomas George wrote:
> >>> In a newly installed bookworm I edited PATH to
> >>> /usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
>
> What account did you add the sbin's too? The Root account should already
> have sbin and it is the only account that should.
>
> If you used su then you need to run either su -l or su -L to switch user
> to root with a login shell. I recommend disabling root login and using
> sudo.
>
> -, -l, --login
  Start the shell as a login shell with an environment similar to a
real login:

  •   clears all the environment variables except TERM and
variables specified by --whitelist-environment

  •   initializes the environment variables HOME, SHELL, USER,
LOGNAME, and PATH

  •   changes to the target user’s home directory

  •   sets argv[0] of the shell to '-' in order to make the shell a
login shell




> >> What, exactly, did you edit?
> >>
> >>> in order to
> >>> install google-chrome.
> >> Now that makes no sense... unless you ran into the buster su issue.
> >>
> >> Please see 
> ;.
> >>
> >>>This worked but the installed PATH had  two other
> >>> entries, something about games?
> >> /usr/local/games and /usr/games
> >>
> >>> I failed to save and did not take note of all the installed PATH
> entries.
> >>>
> >>> I have no sound with bookworm. Could these other entries be the
> problem?
> >> I sincerely doubt it.
> >>
>
>

-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀


Re: PATH question

2023-11-13 Thread Timothy M Butterworth
On Sun, Nov 12, 2023 at 9:29 AM Thomas George 
wrote:

> As root I edited bashrc as found in root's home directory
> On 11/11/23 23:23, Timothy Butterworth wrote:
>
> On November 11, 2023, at 8:51 PM, Thomas George 
>  wrote:
>
> >I downloaded the google-chrome deb file to /opt/
> >used dpkg to install the program.
>
> Use sudo apt install ./filename.deb you may need to run sudo apt update
> first.
>
> >
> >initial attempt failed, two lib files missing.
> >added the sbin entries to path and tried again
> >missing files found on the dvd installation disk and google-chrome
> >successfully installed
> >On 11/11/23 13:22, Greg Wooledge wrote:
> >> On Sat, Nov 11, 2023 at 01:03:45PM -0500, Thomas George wrote:
> >>> In a newly installed bookworm I edited PATH to
> >>> /usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
>
> User path should be:
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

Root path should be:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

> What account did you add the sbin's too? The Root account should already
> have sbin and it is the only account that should.
>
> If you used su then you need to run either su -l or su -L to switch user
> to root with a login shell. I recommend disabling root login and using
> sudo.
>
> >> What, exactly, did you edit?
> >>
> >>> in order to
> >>> install google-chrome.
> >> Now that makes no sense... unless you ran into the buster su issue.
> >>
> >> Please see 
> ;.
> >>
> >>>This worked but the installed PATH had  two other
> >>> entries, something about games?
> >> /usr/local/games and /usr/games
> >>
> >>> I failed to save and did not take note of all the installed PATH
> entries.
> >>>
> >>> I have no sound with bookworm. Could these other entries be the
> problem?
> >> I sincerely doubt it.
> >>
>
>

-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀


Re: PATH question

2023-11-12 Thread Thomas George
Since I began using Linux soon after its inception, 199?, I have just 
stumbled my way much by trial and error.


stumbles related to PATH issue:

installed bookworm from dvd.

moved distribution ,bashrc's to save.bashrc's

copied .bashrc's from buster on another hard disc. These have three 
virtues: root prompt colored red, l is alias of ls with list_directories 
first, and rm is an alias of rm -i. PATH specification (perhaps from 
previous incarnations of .bashrc}


proceeded with dpkg -i google-chrome-file.deb

At some point startled by message 'Insert distribution dvd" Did so and 
google chrome successfully installed.


Tom

On 11/12/23 09:38, Andy Smith wrote:

Hello,

On Sun, Nov 12, 2023 at 09:35:33AM -0500, Thomas George wrote:

I don't like to clutter up my download file. Since I normally use dpkg -i
debfile.deb this would add a directory in the download file.

When you install a .deb package it only installs to the
fully-qualified paths inside the .deb file. It doesn't install
anything to the current directory, so it doesn't matter where the
.deb is located when you issue "dpkg -i" or "apt install ./file.deb"

(I am not sure if it is even possible for a .deb file to contain a
relative file path, but if it is, they typically don't.)

Thanks,
Andy





Re: PATH question

2023-11-12 Thread Max Nikulin



On 12/11/2023 21:37, Greg Wooledge wrote:

It doesn't help that "apt install ./file" is not documented in the
official man pages.  People can only learn about it from the wiki, or
from word of mouth.


It is documented in various guides:

https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#listofadvancedpagementoperations


Table 2.13. List of advanced package management operations


apt install /path/to/package_filename.deb 	install a local package to the system, meanwhile try to resolve dependency automatically 


https://www.debian.org/doc/manuals/debian-handbook/sect.apt-get.en.html#id-1.9.17.11.31

If the package to install has been made available to you under the form
of a simple .deb file without any associated package repository, it is
still possible to use APT to install it together with its dependencies
(provided that the dependencies are available in the configured
repositories) with a simple command: apt install
./path-to-the-package.deb. The leading ./ is important to make it clear
that we are referring to a filename and not to the name of a package
available in one of the repositories.






Re: PATH question

2023-11-12 Thread Greg Wooledge
On Sun, Nov 12, 2023 at 09:29:28AM -0500, Thomas George wrote:
> As root I edited bashrc as found in root's home directory

OK.  If I'm not mistaken, that file never contained a PATH definition
in the first place, so you can put things back to normal simply by
deleting the line(s) that you added to that file.

If you want to fix su, my personal recommendation (out of all the options
that are on the NewInBuster wiki page) is this one:

unicorn:~$ cat /etc/default/su
ALWAYS_SET_PATH yes

Just create that file, and put that line in it.  It's what Debian should
have done for you.



Re: PATH question

2023-11-12 Thread Andy Smith
Hello,

On Sun, Nov 12, 2023 at 09:35:33AM -0500, Thomas George wrote:
> I don't like to clutter up my download file. Since I normally use dpkg -i
> debfile.deb this would add a directory in the download file.

When you install a .deb package it only installs to the
fully-qualified paths inside the .deb file. It doesn't install
anything to the current directory, so it doesn't matter where the
.deb is located when you issue "dpkg -i" or "apt install ./file.deb"

(I am not sure if it is even possible for a .deb file to contain a
relative file path, but if it is, they typically don't.)

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: PATH question

2023-11-12 Thread Greg Wooledge
On Sun, Nov 12, 2023 at 09:25:26AM -0500, Thomas George wrote:
> Alternately dpkg -i debfile.deb works.

That doesn't install the dependencies.  It may leave your packages in
a semi-broken state, requiring you to run "apt-get -f install" afterward
to fix it.

Using "apt install ./debfile.deb" pulls in the dependencies and keeps
things in a working state at all times, if possible.

Using "dpkg -i" and then "apt-get -f install" was the old way.  You'll
still see people recommending it, because they don't know any better,
and old methods that still "work" (most of the time) take a long time
to die out.

It doesn't help that "apt install ./file" is not documented in the
official man pages.  People can only learn about it from the wiki, or
from word of mouth.



Re: PATH question

2023-11-12 Thread Thomas George
I don't like to clutter up my download file. Since I normally use dpkg 
-i debfile.deb this would add a directory in the download file.


Tom George

On 11/11/23 23:31, Timothy Butterworth wrote:


On November 11, 2023, at 11:16 PM, David  wrote:

>On Sat, 11 Nov 2023 at 18:42, Thomas George 
 wrote:

>> I downloaded the google-chrome deb file to /opt/

Why did you put the chrome.deb in /opt? You found have just kept it in 
your downloads folder. When you use apt to install the chrome.deb 
package it will automatically install the software into a directory on 
/opt.


>>
>> used dpkg to install the program.
>>
>> initial attempt failed, two lib files missing.
>>
>> added the sbin entries to path and tried again
>Hi, the 'apt install' command does have the capability to install a 
local .deb

>package file together with its dependencies if they are available in
>the configured repositories.
>This capability seems to be not mentioned in the manpages
>of 'apt' or 'apt-get' [1].
>Looking for an authoritative source of information to show you,
>I found only this:
> 
https://wiki.debian.org/DebianPackageManagement#Installing_and_removing_packages

>which says:
>  You can also install a .deb file with:
>  # apt install 
>My understanding is that the  must look like a pathname.
>So, to install 'debfile.deb' in the current directory, it should look 
like

>  apt install ./debfile.deb
>Maybe someone else knows where the authoritative documentation
>of this capability can be read, if there is any.
>Maybe someone else knows why this isn't documented in the manpages.
>I have a hazy recollection of possibly reading sometime that 'apt'
>authors might
>intend to rewrite the package regex handling in future, so maybe how this
>works might change, so that might be why it hasn't been documented.
>[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874763


Re: PATH question

2023-11-12 Thread Thomas George

As root I edited bashrc as found in root's home directory

On 11/11/23 23:23, Timothy Butterworth wrote:


On November 11, 2023, at 8:51 PM, Thomas George 
 wrote:


>I downloaded the google-chrome deb file to /opt/
>used dpkg to install the program.

Use sudoapt install ./filename.deb you may need to run sudoapt update 
first.


>
>initial attempt failed, two lib files missing.
>added the sbin entries to path and tried again
>missing files found on the dvd installation disk and google-chrome
>successfully installed
>On 11/11/23 13:22, Greg Wooledge wrote:
>> On Sat, Nov 11, 2023 at 01:03:45PM -0500, Thomas George wrote:
>>> In a newly installed bookworm I edited PATH to
>>> /usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

What account did you add the sbin'stoo? The Root account should 
already have sbinand it is the only account that should.


If you used suthen you need to run either su-l or su-L to switch user 
to root with a login shell. I recommend disabling root login and using 
sudo.


>> What, exactly, did you edit?
>>
>>> in order to
>>> install google-chrome.
>> Now that makes no sense... unless you ran into the buster su issue.
>>
>> Please see ;.
>>
>>>    This worked but the installed PATH had  two other
>>> entries, something about games?
>> /usr/local/games and /usr/games
>>
>>> I failed to save and did not take note of all the installed PATH 
entries.

>>>
>>> I have no sound with bookworm. Could these other entries be the 
problem?

>> I sincerely doubt it.
>>


Re: PATH question

2023-11-12 Thread Thomas George

Alternately dpkg -i debfile.deb works.

Tom George

On 11/11/23 19:28, The Wanderer wrote:

On 2023-11-11 at 19:09, Greg Wooledge wrote:


On Sat, Nov 11, 2023 at 10:17:09PM +, David wrote:


Looking for an authoritative source of information to show you,
I found only this:
   
https://wiki.debian.org/DebianPackageManagement#Installing_and_removing_packages
which says:
   You can also install a .deb file with:
   # apt install 

My understanding is that the  must look like a pathname.
So, to install 'debfile.deb' in the current directory, it should look like
   apt install ./debfile.deb

Maybe someone else knows where the authoritative documentation
of this capability can be read, if there is any.

I think you've found it.  It's not in ANY man page that I'm aware of.

My reflexive reaction was "that sounds like something that warrants a
wishlist-level bug report".

Then I went looking, and I found a *normal*-level bug report that seems
to cover the matter: https://bugs.debian.org/874763

And that bug report is from 2017, and has no replies.

Unless someone is interested enough to write up a patch for apt.8 and
send it to that bug report, I suspect that this will go unaddressed for
a while longer.





Re: PATH question

2023-11-11 Thread Timothy Butterworth


On November 11, 2023, at 11:16 PM, David  wrote:

>On Sat, 11 Nov 2023 at 18:42, Thomas George  wrote:
>> I downloaded the google-chrome deb file to /opt/

Why did you put the chrome.deb in /opt? You found have just kept it in your 
downloads folder. When you use apt to install the chrome.deb package it will 
automatically install the software into a directory on /opt.

>>
>> used dpkg to install the program.
>>
>> initial attempt failed, two lib files missing.
>>
>> added the sbin entries to path and tried again
>Hi, the 'apt install' command does have the capability to install a local .deb
>package file together with its dependencies if they are available in
>the configured repositories.
>This capability seems to be not mentioned in the manpages
>of 'apt' or 'apt-get' [1].
>Looking for an authoritative source of information to show you,
>I found only this:
>  
>https://wiki.debian.org/DebianPackageManagement#Installing_and_removing_packages
>which says:
>  You can also install a .deb file with:
>  # apt install 
>My understanding is that the  must look like a pathname.
>So, to install 'debfile.deb' in the current directory, it should look like
>  apt install ./debfile.deb
>Maybe someone else knows where the authoritative documentation
>of this capability can be read, if there is any.
>Maybe someone else knows why this isn't documented in the manpages.
>I have a hazy recollection of possibly reading sometime that 'apt'
>authors might
>intend to rewrite the package regex handling in future, so maybe how this
>works might change, so that might be why it hasn't been documented.
>[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874763


Re: PATH question

2023-11-11 Thread Timothy Butterworth


On November 11, 2023, at 8:51 PM, Thomas George  
wrote:

>I downloaded the google-chrome deb file to /opt/
>used dpkg to install the program.

Use sudo apt install ./filename.deb you may need to run sudo apt update first.

>
>initial attempt failed, two lib files missing.
>added the sbin entries to path and tried again
>missing files found on the dvd installation disk and google-chrome 
>successfully installed
>On 11/11/23 13:22, Greg Wooledge wrote:
>> On Sat, Nov 11, 2023 at 01:03:45PM -0500, Thomas George wrote:
>>> In a newly installed bookworm I edited PATH to
>>> /usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

What account did you add the sbin's too? The Root account should already have 
sbin and it is the only account that should.

If you used su then you need to run either su -l or su -L to switch user to 
root with a login shell. I recommend disabling root login and using sudo.

>> What, exactly, did you edit?
>>
>>> in order to
>>> install google-chrome.
>> Now that makes no sense... unless you ran into the buster su issue.
>>
>> Please see ;.
>>
>>>    This worked but the installed PATH had  two other
>>> entries, something about games?
>> /usr/local/games and /usr/games
>>
>>> I failed to save and did not take note of all the installed PATH entries.
>>>
>>> I have no sound with bookworm. Could these other entries be the problem?
>> I sincerely doubt it.
>>


Re: PATH question

2023-11-11 Thread The Wanderer
On 2023-11-11 at 19:09, Greg Wooledge wrote:

> On Sat, Nov 11, 2023 at 10:17:09PM +, David wrote:
>
>> Looking for an authoritative source of information to show you,
>> I found only this:
>>   
>> https://wiki.debian.org/DebianPackageManagement#Installing_and_removing_packages
>> which says:
>>   You can also install a .deb file with:
>>   # apt install 
>> 
>> My understanding is that the  must look like a pathname.
>> So, to install 'debfile.deb' in the current directory, it should look like
>>   apt install ./debfile.deb
>> 
>> Maybe someone else knows where the authoritative documentation
>> of this capability can be read, if there is any.
> 
> I think you've found it.  It's not in ANY man page that I'm aware of.

My reflexive reaction was "that sounds like something that warrants a
wishlist-level bug report".

Then I went looking, and I found a *normal*-level bug report that seems
to cover the matter: https://bugs.debian.org/874763

And that bug report is from 2017, and has no replies.

Unless someone is interested enough to write up a patch for apt.8 and
send it to that bug report, I suspect that this will go unaddressed for
a while longer.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature


Re: PATH question

2023-11-11 Thread Greg Wooledge
On Sat, Nov 11, 2023 at 10:17:09PM +, David wrote:
> Looking for an authoritative source of information to show you,
> I found only this:
>   
> https://wiki.debian.org/DebianPackageManagement#Installing_and_removing_packages
> which says:
>   You can also install a .deb file with:
>   # apt install 
> 
> My understanding is that the  must look like a pathname.
> So, to install 'debfile.deb' in the current directory, it should look like
>   apt install ./debfile.deb
> 
> Maybe someone else knows where the authoritative documentation
> of this capability can be read, if there is any.

I think you've found it.  It's not in ANY man page that I'm aware of.



Re: PATH question

2023-11-11 Thread David
On Sat, 11 Nov 2023 at 18:42, Thomas George  wrote:

> I downloaded the google-chrome deb file to /opt/
>
> used dpkg to install the program.
>
> initial attempt failed, two lib files missing.
>
> added the sbin entries to path and tried again

Hi, the 'apt install' command does have the capability to install a local .deb
package file together with its dependencies if they are available in
the configured repositories.

This capability seems to be not mentioned in the manpages
of 'apt' or 'apt-get' [1].

Looking for an authoritative source of information to show you,
I found only this:
  
https://wiki.debian.org/DebianPackageManagement#Installing_and_removing_packages
which says:
  You can also install a .deb file with:
  # apt install 

My understanding is that the  must look like a pathname.
So, to install 'debfile.deb' in the current directory, it should look like
  apt install ./debfile.deb

Maybe someone else knows where the authoritative documentation
of this capability can be read, if there is any.

Maybe someone else knows why this isn't documented in the manpages.
I have a hazy recollection of possibly reading sometime that 'apt'
authors might
intend to rewrite the package regex handling in future, so maybe how this
works might change, so that might be why it hasn't been documented.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874763



Re: PATH question

2023-11-11 Thread Thomas George

I downloaded the google-chrome deb file to /opt/

used dpkg to install the program.

initial attempt failed, two lib files missing.

added the sbin entries to path and tried again

missing files found on the dvd installation disk and google-chrome 
successfully installed


On 11/11/23 13:22, Greg Wooledge wrote:

On Sat, Nov 11, 2023 at 01:03:45PM -0500, Thomas George wrote:

In a newly installed bookworm I edited PATH to
/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

What, exactly, did you edit?


in order to
install google-chrome.

Now that makes no sense... unless you ran into the buster su issue.

Please see .


   This worked but the installed PATH had  two other
entries, something about games?

/usr/local/games and /usr/games


I failed to save and did not take note of all the installed PATH entries.

I have no sound with bookworm. Could these other entries be the problem?

I sincerely doubt it.





Re: PATH question

2023-11-11 Thread Greg Wooledge
On Sat, Nov 11, 2023 at 01:03:45PM -0500, Thomas George wrote:
> In a newly installed bookworm I edited PATH to
> /usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

What, exactly, did you edit?

> in order to
> install google-chrome.

Now that makes no sense... unless you ran into the buster su issue.

Please see .

>  This worked but the installed PATH had  two other
> entries, something about games?

/usr/local/games and /usr/games

> I failed to save and did not take note of all the installed PATH entries.
> 
> I have no sound with bookworm. Could these other entries be the problem?

I sincerely doubt it.



PATH question

2023-11-11 Thread Thomas George
In a newly installed bookworm I edited PATH to 
/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin in order to 
install google-chrome.  This worked but the installed PATH had  two 
other entries, something about games?


I failed to save and did not take note of all the installed PATH entries.

I have no sound with bookworm. Could these other entries be the problem?

I would appreciate if anyone responding includes the missing PATH entries

Tom



Re: PATH question

2020-08-04 Thread Gene Heskett
On Tuesday 04 August 2020 15:46:05 Gene Heskett wrote:

> On Tuesday 04 August 2020 14:57:49 Greg Wooledge wrote:
> > On Tue, Aug 04, 2020 at 02:49:00PM -0400, Gene Heskett wrote:
> > > > If so, are you logging in via sddm,
> > > > which is what KDE on Debian normally uses?
> > >
> > > probably not, but I'm talking about my own shell, which is
> > > probably started by the tde version of lightdm.
> >
> > So you've configured lightdm to perform an autologin?  Yikes.
> >
> > Well, it probably goes through the Debian X11 session which means
> > you configure environment stuff in ~/.xsessionrc.
> >
> > > > the ~/.bashrc file, which will pick up the PATH change.  When
> > > > all of the windows have been re-shelled, you can edit ~/.bashrc
> > > > again to remove the PATH=... command, since you don't want it to
> > > > stay there.
> > >
> > > But I do want it to remain, just like the $HOME/bin that prefaces
> > > to $PATH I can see with an echo $PATH right now.
> >
> > But you said .profile in the first email.  I said .bashrc.  Now
> > you're saying that you're actually using .bashrc and not .profile?!
>
> I did, because that is where I found the existing $PATH defined. There
> is no mention of PATH in my .bashrc.
>
> > The problem with putting PATH=... in .bashrc is that it gets read by
> > each shell that starts up.  If you ever have a nested set of shells
> > (e.g. you start a terminal with a shell in it, which is shell level
> > one, and then you run an editor, and then from the editor you
> > perform a shell escape, which is now shell level two...) then you
> > end up with duplicate entries in PATH.
>
> Yes, pita to clear them out too.
>
> > In the most degenerate cases you can end up with
> > PATH=/foo:/foo:/foo:
> >
> > That's why you usually try to put some effort into finding the *one*
> > place that you can add a directory to your PATH *one* time, without
> > breaking anything.
>
> Precisely.
>
> > But if you prefer to be lazy, then sure, go ahead and use .bashrc
> > and end up with repeated eternally long PATH entries.
>
> And thats a bad dog, no biscuit.
>
> Thanks. I guess I'll reboot but that rather resembles using a
> sledgehammer on a gnat.  So since I don't seem to able to express what
> I want with the whole world assuming I am logging in from a remote
> terminal, I'll close the thread with a reboot as I can setup the rest
> of my working env in 10 to 15 minutes, what I was trying to avoid.
>
> Thank you
> Cheers, Gene Heskett

And that worked.


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 



Re: PATH question

2020-08-04 Thread Gene Heskett
On Tuesday 04 August 2020 14:57:49 Greg Wooledge wrote:

> On Tue, Aug 04, 2020 at 02:49:00PM -0400, Gene Heskett wrote:
> > > If so, are you logging in via sddm,
> > > which is what KDE on Debian normally uses?
> >
> > probably not, but I'm talking about my own shell, which is probably
> > started by the tde version of lightdm.
>
> So you've configured lightdm to perform an autologin?  Yikes.
>
> Well, it probably goes through the Debian X11 session which means
> you configure environment stuff in ~/.xsessionrc.
>
> > > the ~/.bashrc file, which will pick up the PATH change.  When all
> > > of the windows have been re-shelled, you can edit ~/.bashrc again
> > > to remove the PATH=... command, since you don't want it to stay
> > > there.
> >
> > But I do want it to remain, just like the $HOME/bin that prefaces to
> > $PATH I can see with an echo $PATH right now.
>
> But you said .profile in the first email.  I said .bashrc.  Now you're
> saying that you're actually using .bashrc and not .profile?!
>
I did, because that is where I found the existing $PATH defined. There is 
no mention of PATH in my .bashrc.

> The problem with putting PATH=... in .bashrc is that it gets read by
> each shell that starts up.  If you ever have a nested set of shells
> (e.g. you start a terminal with a shell in it, which is shell level
> one, and then you run an editor, and then from the editor you perform
> a shell escape, which is now shell level two...) then you end up with
> duplicate entries in PATH.

Yes, pita to clear them out too.

> In the most degenerate cases you can end up with
> PATH=/foo:/foo:/foo:
>
> That's why you usually try to put some effort into finding the *one*
> place that you can add a directory to your PATH *one* time, without
> breaking anything.

Precisely.
>
> But if you prefer to be lazy, then sure, go ahead and use .bashrc and
> end up with repeated eternally long PATH entries.

And thats a bad dog, no biscuit.

Thanks. I guess I'll reboot but that rather resembles using a 
sledgehammer on a gnat.  So since I don't seem to able to express what I 
want with the whole world assuming I am logging in from a remote 
terminal, I'll close the thread with a reboot as I can setup the rest of 
my working env in 10 to 15 minutes, what I was trying to avoid.

Thank you
Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 



Re: PATH question

2020-08-04 Thread Greg Wooledge
On Tue, Aug 04, 2020 at 02:49:00PM -0400, Gene Heskett wrote:
> > If so, are you logging in via sddm, 
> > which is what KDE on Debian normally uses?
> probably not, but I'm talking about my own shell, which is probably 
> started by the tde version of lightdm.

So you've configured lightdm to perform an autologin?  Yikes.

Well, it probably goes through the Debian X11 session which means
you configure environment stuff in ~/.xsessionrc.

> > the ~/.bashrc file, which will pick up the PATH change.  When all
> > of the windows have been re-shelled, you can edit ~/.bashrc again
> > to remove the PATH=... command, since you don't want it to stay there.
> 
> But I do want it to remain, just like the $HOME/bin that prefaces to 
> $PATH I can see with an echo $PATH right now.

But you said .profile in the first email.  I said .bashrc.  Now you're
saying that you're actually using .bashrc and not .profile?!

The problem with putting PATH=... in .bashrc is that it gets read by
each shell that starts up.  If you ever have a nested set of shells
(e.g. you start a terminal with a shell in it, which is shell level one,
and then you run an editor, and then from the editor you perform a
shell escape, which is now shell level two...) then you end up with
duplicate entries in PATH.

In the most degenerate cases you can end up with PATH=/foo:/foo:/foo:

That's why you usually try to put some effort into finding the *one*
place that you can add a directory to your PATH *one* time, without
breaking anything.

But if you prefer to be lazy, then sure, go ahead and use .bashrc and
end up with repeated eternally long PATH entries.



Re: PATH question

2020-08-04 Thread Gene Heskett
On Tuesday 04 August 2020 12:34:21 Greg Wooledge wrote:

> On Tue, Aug 04, 2020 at 12:25:11PM -0400, Gene Heskett wrote:
> > I just created a /home/me/AppImage directory, moved some appimages
> > into it, and added another stanza to add that to my .profile. Do I
> > have to logout the 15 processes or so I have running now and
> > effectively restart the system to make that path take effect? 
> > Closing all konsole sessions on this workspace and opening fresh
> > konsole's is not bringing that path into effect.
>
> It depends on several things.  You say you're using konsole, so does
> that mean you're running KDE? 

No. TDE uptodate r14.

> If so, are you logging in via sddm, 
> which is what KDE on Debian normally uses?
probably not, but I'm talking about my own shell, which is probably 
started by the tde version of lightdm.
 
> If all of those things are 
> true, then editing .profile probably doesn't do anything at all.  An
> sddm login running a Debian X11 session which runs KDE shouldn't
> be reading the .profile file.  Ever.
>
> Are you logging in on a console and running startx?

No, x is self starting.  The shells I open are on one of 8 or so on one  
of many "workspaces".

> In that case, 
> your .profile *will* be read, by your console login shell, and the
> changes to PATH and other environmental bits and bobs will all be
> inherited by the X11 session, then by the window manager, then by
> the terminals which are children of the window manager, and then by
> the shell run inside the terminal, and then by the programs launched
> by the shell.
>
> If you aren't using startx from a console login, then the right place
> to make modifications to PATH would be in the ~/.xsessionrc file.
>
> I *just* got done saying all this stuff last week.
>
> Now, your immediate question was how to make the PATH change take
> effect in all of your existing terminal windows, without having to
> log out and back in.  There's no single command that'll just blast
> it out to all of them.  Each one is an independent self-contained
> process, with its own separate copy of the environment.  You'll
> have to go around to each window, one by one.
>
> The most straightforward way to do it would be to paste your PATH=...
> command into each window.
>
> If you don't like that approach, you could add your PATH=... to
> your ~/.bashrc file (assuming you use bash) temporarily.  Then in
> each window, run "exec bash" to run a new shell, which will read
> the ~/.bashrc file, which will pick up the PATH change.  When all
> of the windows have been re-shelled, you can edit ~/.bashrc again
> to remove the PATH=... command, since you don't want it to stay there.

But I do want it to remain, just like the $HOME/bin that prefaces to 
$PATH I can see with an echo $PATH right now. In effect making "freecad" 
look for its appimage there, before spending another second scanning the 
rest of the env looking for it.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 



Re: PATH question

2020-08-04 Thread Greg Wooledge
On Tue, Aug 04, 2020 at 12:25:11PM -0400, Gene Heskett wrote:
> I just created a /home/me/AppImage directory, moved some appimages into 
> it, and added another stanza to add that to my .profile. Do I have to 
> logout the 15 processes or so I have running now and effectively restart 
> the system to make that path take effect?  Closing all konsole sessions 
> on this workspace and opening fresh konsole's is not bringing that path 
> into effect.

It depends on several things.  You say you're using konsole, so does
that mean you're running KDE?  If so, are you logging in via sddm,
which is what KDE on Debian normally uses?  If all of those things are
true, then editing .profile probably doesn't do anything at all.  An
sddm login running a Debian X11 session which runs KDE shouldn't
be reading the .profile file.  Ever.

Are you logging in on a console and running startx?  In that case,
your .profile *will* be read, by your console login shell, and the
changes to PATH and other environmental bits and bobs will all be
inherited by the X11 session, then by the window manager, then by
the terminals which are children of the window manager, and then by
the shell run inside the terminal, and then by the programs launched
by the shell.

If you aren't using startx from a console login, then the right place
to make modifications to PATH would be in the ~/.xsessionrc file.

I *just* got done saying all this stuff last week.

Now, your immediate question was how to make the PATH change take
effect in all of your existing terminal windows, without having to
log out and back in.  There's no single command that'll just blast
it out to all of them.  Each one is an independent self-contained
process, with its own separate copy of the environment.  You'll
have to go around to each window, one by one.

The most straightforward way to do it would be to paste your PATH=...
command into each window.

If you don't like that approach, you could add your PATH=... to
your ~/.bashrc file (assuming you use bash) temporarily.  Then in
each window, run "exec bash" to run a new shell, which will read
the ~/.bashrc file, which will pick up the PATH change.  When all
of the windows have been re-shelled, you can edit ~/.bashrc again
to remove the PATH=... command, since you don't want it to stay there.



PATH question

2020-08-04 Thread Gene Heskett
Greeting all;

This box is on stretch.

I just created a /home/me/AppImage directory, moved some appimages into 
it, and added another stanza to add that to my .profile. Do I have to 
logout the 15 processes or so I have running now and effectively restart 
the system to make that path take effect?  Closing all konsole sessions 
on this workspace and opening fresh konsole's is not bringing that path 
into effect.
  
Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 



Re: PATH question

2007-03-21 Thread Vincent Lefevre
On 2007-03-19 16:06:05 +0100, Matus UHLAR - fantomas wrote:
  On 2007-03-15 16:06:40 +0100, Matus UHLAR - fantomas wrote:
   $PATH is universal environment variable. (t)csh maps path to PATH, but
   only PATH exists in (ba|z|k|)sh
 
 On 19.03.07 15:07, Vincent Lefevre wrote:
  $path exists in zsh and is an array tied to $PATH.
 
 ok, so it's the same as in (t)csh. However, it's still non-standard
 extension

Yes.

 and libc functions like execlp() do not support it.

execlp() supports it as a side effect, since when $path is modified,
zsh updates $PATH in the same way.

-- 
Vincent Lefèvre [EMAIL PROTECTED] - Web: http://www.vinc17.org/
100% accessible validated (X)HTML - Blog: http://www.vinc17.org/blog/
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: PATH question

2007-03-19 Thread Vincent Lefevre
On 2007-03-15 16:06:40 +0100, Matus UHLAR - fantomas wrote:
 $PATH is universal environment variable. (t)csh maps path to PATH, but
 only PATH exists in (ba|z|k|)sh

$path exists in zsh and is an array tied to $PATH.

-- 
Vincent Lefèvre [EMAIL PROTECTED] - Web: http://www.vinc17.org/
100% accessible validated (X)HTML - Blog: http://www.vinc17.org/blog/
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: PATH question

2007-03-19 Thread Matus UHLAR - fantomas
 On 2007-03-15 16:06:40 +0100, Matus UHLAR - fantomas wrote:
  $PATH is universal environment variable. (t)csh maps path to PATH, but
  only PATH exists in (ba|z|k|)sh

On 19.03.07 15:07, Vincent Lefevre wrote:
 $path exists in zsh and is an array tied to $PATH.

ok, so it's the same as in (t)csh. However, it's still non-standard
extension and libc functions like execlp() do not support it.
-- 
Matus UHLAR - fantomas, [EMAIL PROTECTED] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
- Holmes, what kind of school did you study to be a detective?
- Elementary, Watson.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: PATH question

2007-03-15 Thread Tarek Soliman
 You can use 'which' to find out which ls is being called, but it goes by 
 first come first serve:
 echo $PATH
 /home/jeffd/bin:/usr/local/bin:/usr/bin:/bin
 [EMAIL PROTECTED]:~$ touch ~/bin/ls
 [EMAIL PROTECTED]:~$ chmod 755 ~/bin/ls
 [EMAIL PROTECTED]:~$ which ls
 /home/jeffd/bin/ls
 [EMAIL PROTECTED]:~$ rm ~/bin/ls
 [EMAIL PROTECTED]:~$ which ls
 /bin/ls
 

Additionally, which -a will list all of them (in order)

-- 
Tarek


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: PATH question

2007-03-15 Thread Celejar
On Wed, 14 Mar 2007 23:45:28 -0500
Ron Johnson [EMAIL PROTECTED] wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On 03/14/07 23:23, Tony Heal wrote:
 
 Why are you asking us about the Port Authority Trans-Hudson
 railroad?  ;)

Perhaps because:

~$ echo $path

~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/games

:)

Celejar


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: PATH question

2007-03-15 Thread Matus UHLAR - fantomas
  Why are you asking us about the Port Authority Trans-Hudson
  railroad?  ;)

On 15.03.07 11:02, Celejar wrote:
 Perhaps because:
 
 ~$ echo $path

$path is (t)csh internal variable

 ~$ echo $PATH
 /usr/local/bin:/usr/bin:/bin:/usr/games

$PATH is universal environment variable. (t)csh maps path to PATH, but
only PATH exists in (ba|z|k|)sh
-- 
Matus UHLAR - fantomas, [EMAIL PROTECTED] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Boost your system's speed by 500% - DEL C:\WINDOWS\*.*


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: PATH question

2007-03-15 Thread Roberto C. Sanchez
On Thu, Mar 15, 2007 at 04:06:40PM +0100, Matus UHLAR - fantomas wrote:
   Why are you asking us about the Port Authority Trans-Hudson
   railroad?  ;)
 
 On 15.03.07 11:02, Celejar wrote:
  Perhaps because:
  
  ~$ echo $path
 
 $path is (t)csh internal variable
 
  ~$ echo $PATH
  /usr/local/bin:/usr/bin:/bin:/usr/games
 
 $PATH is universal environment variable. (t)csh maps path to PATH, but
 only PATH exists in (ba|z|k|)sh

The difference is that in (t)csh, the path with all lowercase is space
delimitted instead of colon delimitted.

Regards,

-Roberto
-- 
Roberto C. Sanchez
http://people.connexer.com/~roberto
http://www.connexer.com


signature.asc
Description: Digital signature


Re: PATH question

2007-03-15 Thread Bob McGowan

Tony Heal wrote:
I have a problem on one of my servers. The ‘ls’ command does not have 
the –h switch available. So as a workaround until I can determine what 
caused this and why I wanted to use the ‘ls’ file from another server. I 
copied /bin/ls from server # 2 onto server # 1 and tested it and it 
works fine, including the –h switch.


 

So I typed set, read the PATH and found that /usr/local/bin is in the 
path before /usr/bin. I thought I could simply drop the new ls in 
/usr/local/bin and the system would see it first when called and use it. 
WRONG.


 


So my questions are:

   1. why not?
   2. what is the order used in the path?

 


Thanks

 


Tony



Depends on what you mean by 'system'.  Do you mean system rc scripts, 
cron jobs or other 'system' invoked jobs?  Or do you just mean for 
logins on that 'system'?


In the first case, 'system' scripts often explicitly set the PATH value, 
as a security measure, to a limited list of directories that *does not* 
include /usr/local/*.  The simplest fix for this is to move the original 
'ls' to 'ls.no-h' (or some such) and copy the replacement in its place.


In the second case, if you want any and all users to see the replacement 
in /usr/local/bin, you can edit the shell startup scripts in /etc 
(bash.bashrc, profile, csh.login, depending on your shell usage) and put 
/usr/local/bin first in the default.  Note that this can be modified by 
the user in their own startup file, resulting in not getting the right 
'ls' command.  So, I'd suggest doing the same thing in this case as 
above, thus assuring there's only one 'ls' to find.


Bob


smime.p7s
Description: S/MIME Cryptographic Signature


PATH question

2007-03-15 Thread Mike McClain
On Thu, 15 Mar 2007 Tony Heal [EMAIL PROTECTED] asked:

 I thought I could simply drop the new ls in /usr/local/bin 
 and the system would see it first when called and use it. WRONG.

 So my questions are:

 1.why not?

I've been bitten by this myself and somebody on the fido linux list
showed me the light years ago.
Bash remembers each command you issue and keeps the path in a hash
so the next time you use the command the path is already known.
From the command line enter 'help hash' for further elucidation.
So 'hash ls' is required to reset bash's memory of where 'ls' is in
each instance of bash that has already executed 'ls'. If you have 
several vts open each instance of bash has it's own hash of commands.

 2.what is the order used in the path?

As expected, left to right as printed by the command 'echo $PATH' for
new searches.

Enjoy,
Mike


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: PATH question

2007-03-15 Thread Celejar
On Thu, 15 Mar 2007 16:06:40 +0100
Matus UHLAR - fantomas [EMAIL PROTECTED] wrote:

   Why are you asking us about the Port Authority Trans-Hudson
   railroad?  ;)
 
 On 15.03.07 11:02, Celejar wrote:
  Perhaps because:
  
  ~$ echo $path
 
 $path is (t)csh internal variable
 
  ~$ echo $PATH
  /usr/local/bin:/usr/bin:/bin:/usr/games
 
 $PATH is universal environment variable. (t)csh maps path to PATH, but
 only PATH exists in (ba|z|k|)sh

Good to know (I currently use bash).

Celejar


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: PATH question

2007-03-15 Thread FuziOK
On Wed, Mar 14, 2007 at 11:51:40PM -0700, jeffd wrote:
 You can use 'which' to find out which ls is being called, but it goes by 
 first come first serve:

Another choice is 'type', a bash build-in command:
type -p= which
type -p -a = which -a


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



PATH question

2007-03-14 Thread Tony Heal
I have a problem on one of my servers. The 'ls' command does not have the -h 
switch available. So as a workaround until
I can determine what caused this and why I wanted to use the 'ls' file from 
another server. I copied /bin/ls from server
# 2 onto server # 1 and tested it and it works fine, including the -h switch.

 

So I typed set, read the PATH and found that /usr/local/bin is in the path 
before /usr/bin. I thought I could simply
drop the new ls in /usr/local/bin and the system would see it first when called 
and use it. WRONG.

 

So my questions are:

1.  why not?
2.  what is the order used in the path?

 

Thanks

 

Tony



Re: PATH question

2007-03-14 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/14/07 23:23, Tony Heal wrote:

Why are you asking us about the Port Authority Trans-Hudson
railroad?  ;)


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF+M9oS9HxQb37XmcRAqcQAKCQ7VUxpalbb3pNaSep9s4AObN/BgCaApWz
Qe3k4d5FqF8DcUN8oLC63EE=
=gq/t
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: PATH question

2007-03-14 Thread Kevin Mark
On Thu, Mar 15, 2007 at 12:23:17AM -0400, Tony Heal wrote:
 I have a problem on one of my servers. The ‘ls’ command does not have the –h
 switch available. So as a workaround until I can determine what caused this 
 and
 why I wanted to use the ‘ls’ file from another server. I copied /bin/ls from
 server # 2 onto server # 1 and tested it and it works fine, including the –h
 switch.
 
  
 
 So I typed set, read the PATH and found that /usr/local/bin is in the path
 before /usr/bin. I thought I could simply drop the new ls in /usr/local/bin 
 and
 the system would see it first when called and use it. WRONG.
 
  
 
 So my questions are:
 
  1. why not?
  2. what is the order used in the path?
 
  
 
for personal binaries, most folks use ~/bin. Edit .bash_profile for
this.
-- 
|  .''`.  == Debian GNU/Linux == |   my web site:   |
| : :' :  The  Universal |mysite.verizon.net/kevin.mark/|
| `. `'  Operating System| go to counter.li.org and |
|   `-http://www.debian.org/ |be counted! #238656   |
|  my keyserver: subkeys.pgp.net | my NPO: cfsg.org |
|join the new debian-community.org to help Debian!  |


signature.asc
Description: Digital signature


Re: PATH question

2007-03-14 Thread jeffd

Tony Heal wrote:


I have a problem on one of my servers. The ‘ls’ command does not have 
the –h switch available. So as a workaround until I can determine what 
caused this and why I wanted to use the ‘ls’ file from another server. 
I copied /bin/ls from server # 2 onto server # 1 and tested it and it 
works fine, including the –h switch.


So I typed set, read the PATH and found that /usr/local/bin is in the 
path before /usr/bin. I thought I could simply drop the new ls in 
/usr/local/bin and the system would see it first when called and use 
it. WRONG.


So my questions are:

   1. why not?
   2. what is the order used in the path?

Thanks

Tony

You can use 'which' to find out which ls is being called, but it goes by 
first come first serve:

echo $PATH
/home/jeffd/bin:/usr/local/bin:/usr/bin:/bin
[EMAIL PROTECTED]:~$ touch ~/bin/ls
[EMAIL PROTECTED]:~$ chmod 755 ~/bin/ls
[EMAIL PROTECTED]:~$ which ls
/home/jeffd/bin/ls
[EMAIL PROTECTED]:~$ rm ~/bin/ls
[EMAIL PROTECTED]:~$ which ls
/bin/ls


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




PATH-question

2006-09-04 Thread steef

hello list,

i had a problem trying to compile a nvidia-kernel-videodriver under 
etch, kernel 2.6.16 xx. the driver complains it cannot find the 4.0 
compiler. [standard is the 4.1 compiler]


i forgot the exact command to tell the nvidia binary driver where it can 
find gcc4.0.x.


if i remember well it must be something like   
$PATH=/usr/lib/etc/etc:$PATH  ./'nvidia-driver' 


please can somebody help me with this??

thans in advance,

kind regards,

steef




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Root path question

2003-10-05 Thread Bob Proulx
Steve Doerr wrote:
 I'm confused about root's bash profile.

Let me give it a shot at unconfusing you.

 In vt1,

What *exactly* do you mean by vt1?  To me it means that you are using
the first virtual terminal.  What you get when you don't have a
graphical login manager such as xdm, kdm, gdm.  Or that you switched
to it using ALT-F1 or CNTL-ALT-F1 from the graphical login.

But it says absolutly nothing about whether you logged in as yourself
or as root or as yourself and then did su or sudo to get to a root
prompt.  And those are critical pieces of information.

 the directories /sbin  /usr/local/sbin are excluded from
 the path.

Sounds like you logged in at the text character console using
yourself.  That all sounds very normal.  If using bash/zsh/sh/ksh,
etc. then /etc/profile is sourced followed by any personal environment
files.  (If csh/tcsh then /etc/csh.login is sourced followed by any
personal environment files.)  For bash personal environment files are
the first one of .bash_profile, .profile, found.  In that file if you
want .bashrc sourced at login time then you need to say that there
explicitly as it is not automatic to give you flexibility and
control.  Normally you want the .bashrc sourced and would always say
so there.

In this configuration if you want /usr/sbin:/sbin:/usr/local/sbin in
your path you need to say so expliclitly too.  This is not the default
since only system administrators need those commands and it tends to
confuse the rest.

  PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin

 If I su to root within Gnome or KDE in a terminal they
 are there.

The 'su' program knows you are becoming root and adds those paths for
you automatically because normally with a simple su there won't be any
environment loaded.

In 'man su' it says:

   The  current  environment is passed to the new shell.  The
   value of $PATH is reset to /bin:/usr/bin for normal users,
   or /sbin:/bin:/usr/sbin:/usr/bin for the super user.  This
   may be changed with the ENV_PATH  and  ENV_SUPATH  defini­
   tions in /etc/login.defs. When using the -m or -p options,
   the users environment is not changed.

 I'm not sure why there isn't a common bash profile for root in vt1 vs. 
 vt7.  Where would the two be located?  Within vt1, will 
 PATH=/dir1:/dir2:/diretc/:$PATH add it permanently?

Hopefully I was able to clear up this confusion.  There is no
difference between vt1 and vt7.  But there is a difference between
logging into the system on vt1 using 'getty' and 'login' and logging
into vt7 using 'kdm' (or xdm or gdm).  In the latter case your
.bash_profile is not run.  In the latter case of the graphical login
your .xsession file has the same place as your .bash_profile does for
character login sessions.  If you are using bash you can use the
following to make your graphical login read your environment profile.
Don't forget to 'chmod a+x ~/.xsession' to make it executable.

  #!/bin/bash --login
  exec x-session-manager  # or fvwm or olvwm or ...

Beware that mistakes in your .xsession or .bash_profile will prevent
you from logging into the system.  Beware that your personal scripts
are not run when using the [xgk]dm if KDE or Gnome is explicitly
selected which really means only run the KDE or Gnome scripts.

I recommend that you install and use 'sudo'.  It allows you to do root
privilege commands without being root all of the time.  Very
convenient.  (E.g.  'sudo addgroup you audio') You will need to
configure /etc/sudoers with 'visudo' to allow yourself root access
first.

Bob


pgp0.pgp
Description: PGP signature


Re: Root path question

2003-10-04 Thread Neo
On Fri, 2003-10-03 at 21:20, Steve Doerr wrote:
 I'm confused about root's bash profile.  In vt1, the directories /sbin  
 /usr/local/sbin are excluded from the path.  If I su to root within 
 Gnome or KDE in a terminal they are there.
 
 I'm not sure why there isn't a common bash profile for root in vt1 vs. 
 vt7.  Where would the two be located?  Within vt1, will 
 PATH=/dir1:/dir2:/diretc/:$PATH add it permanently?
 
 Thanks for any input,
 Steve
 

Hi Steve,

if you find out, I would like to know too! Tanks.

Sincerely,

Jan.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Root path question

2003-10-04 Thread Naitik Shah
One possibility might be the fact that when you su, I believe .bashrc gets executed, 
and .bash_profile does not, as it isn't a login shell. Whereas when you login (or 
alternatively do: su -c bash --login ) .bash_profile gets run. So depending on the 
paths each of these set, your path could possibly vary in a login / non-login shell.

Naitik.

On Sat, 04 Oct 2003 08:56:49 +0200
Neo [EMAIL PROTECTED] wrote:

 On Fri, 2003-10-03 at 21:20, Steve Doerr wrote:
  I'm confused about root's bash profile.  In vt1, the directories /sbin  
  /usr/local/sbin are excluded from the path.  If I su to root within 
  Gnome or KDE in a terminal they are there.
  
  I'm not sure why there isn't a common bash profile for root in vt1 vs. 
  vt7.  Where would the two be located?  Within vt1, will 
  PATH=/dir1:/dir2:/diretc/:$PATH add it permanently?
  
  Thanks for any input,
  Steve
  
 
 Hi Steve,
 
   if you find out, I would like to know too! Tanks.
 
 Sincerely,
 
 Jan.
 
 
 -- 
 To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
 with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Root path question

2003-10-04 Thread Lukas Ruf
 Naitik Shah [EMAIL PROTECTED] [2003-10-04 10:47]:


 One possibility might be the fact that when you su, I believe
 .bashrc gets executed, and .bash_profile does not, as it isn't a
 login shell. Whereas when you login (or alternatively do: su -c
 bash --login ) .bash_profile gets run. So depending on the paths
 each of these set, your path could possibly vary in a login /
 non-login shell.


if you want to have the full environment, add a dash '-' after the
'su', i.e. I su to root by 'su -' to load the full environment.

wbr,
Lukas
-- 
Lukas Ruf   | Wanna know anything about raw |
http://www.lpr.ch | IP?  http://www.rawip.org   |


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Root path question

2003-10-04 Thread Aaron Cimolini
I had a similar problem with switching to the root
user and not getting all of root's path variables
added to my environment. my instructor said to use
this command:

su - root

And it worked like a charm. Apparently it loads you
into a new shell exactly like you just logged in as
the user. All your old paths will be unavailable but
all of root's paths will be part of the environment.

hope this helps

Aaron

--- Naitik Shah [EMAIL PROTECTED] wrote:
 One possibility might be the fact that when you su,
 I believe .bashrc gets executed, and .bash_profile
 does not, as it isn't a login shell. Whereas when
 you login (or alternatively do: su -c bash --login
 ) .bash_profile gets run. So depending on the paths
 each of these set, your path could possibly vary in
 a login / non-login shell.
 
 Naitik.
 
 On Sat, 04 Oct 2003 08:56:49 +0200
 Neo [EMAIL PROTECTED] wrote:
 
  On Fri, 2003-10-03 at 21:20, Steve Doerr wrote:
   I'm confused about root's bash profile.  In vt1,
 the directories /sbin  
   /usr/local/sbin are excluded from the path.  If
 I su to root within 
   Gnome or KDE in a terminal they are there.
   
   I'm not sure why there isn't a common bash
 profile for root in vt1 vs. 
   vt7.  Where would the two be located?  Within
 vt1, will 
   PATH=/dir1:/dir2:/diretc/:$PATH add it
 permanently?
   
   Thanks for any input,
   Steve
   
  
  Hi Steve,
  
  if you find out, I would like to know too! Tanks.
  
  Sincerely,
  
  Jan.
  
  
  -- 
  To UNSUBSCRIBE, email to
 [EMAIL PROTECTED] 
  with a subject of unsubscribe. Trouble? Contact
 [EMAIL PROTECTED]
  
 
 
 -- 
 To UNSUBSCRIBE, email to
 [EMAIL PROTECTED] 
 with a subject of unsubscribe. Trouble? Contact
 [EMAIL PROTECTED]
 

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Root path question

2003-10-03 Thread Steve Doerr
I'm confused about root's bash profile.  In vt1, the directories /sbin  
/usr/local/sbin are excluded from the path.  If I su to root within 
Gnome or KDE in a terminal they are there.

I'm not sure why there isn't a common bash profile for root in vt1 vs. 
vt7.  Where would the two be located?  Within vt1, will 
PATH=/dir1:/dir2:/diretc/:$PATH add it permanently?

Thanks for any input,
Steve
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



teTeX path question

2000-11-26 Thread Damian Menscher
Not a specifically Debian question, but

I just upgraded my version of teTeX to 1.0.6, and discovered it no
longer seems to follow the TEXINPUTS environment variable to find
various style files, etc.  I need to get this to read in a revtex.cls
file that I've added in, but don't know how to get this included in the
search path.  I've got a feeling it has something to do with the ls-R
file, but don't know exactly what I'm doing there and don't want to mess
things up.  Could anyone provide any hints?

Damian Menscher
-- 
--==## Grad. student  Sys. Admin. @ U. Illinois at Urbana-Champaign ##==--
--==## [EMAIL PROTECTED] www.uiuc.edu/~menscher/ Ofc:(217)333-0038 ##==--
--==## Physics Dept, 1110 W Green, Urbana IL 61801 Fax:(217)333-9819 ##==--



Re: teTeX path question

2000-11-26 Thread Damian Menscher
On Sun, 26 Nov 2000, Damian Menscher wrote:

 I just upgraded my version of teTeX to 1.0.6, and discovered it no
 longer seems to follow the TEXINPUTS environment variable to find
 various style files, etc.  I need to get this to read in a revtex.cls
 file that I've added in, but don't know how to get this included in the
 search path.  I've got a feeling it has something to do with the ls-R
 file, but don't know exactly what I'm doing there and don't want to mess
 things up.  Could anyone provide any hints?

Sorry to answer my own question, but it appears that running the texhash
command updates an internal database teTeX keeps on what files are
where.  (Oh, and to answer another question I hadn't gotten around to
asking yet, you can change from the default papersize of A4 to letter by
using the texconfig command.  Dang I'm quick! ;)

Damian Menscher
-- 
--==## Grad. student  Sys. Admin. @ U. Illinois at Urbana-Champaign ##==--
--==## [EMAIL PROTECTED] www.uiuc.edu/~menscher/ Ofc:(217)333-0038 ##==--
--==## Physics Dept, 1110 W Green, Urbana IL 61801 Fax:(217)333-9819 ##==--



Eterm path question

1998-07-13 Thread Adrian Monk
I have installed the .deb Eterm DR0.7 package, however when I fire it up
in X (via an Xterm at present) I get the error messages

shell-init: could not get current directory: getcwd: cannot access parent
directories
job-working-directory: same as above

How do I fix this? I have tried putting /usr/X11R6/lib/Eterm in the path,
but without effect.

TIA

Adrian Monk


--  
Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED]  /dev/null