LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
Search this Thread
Old 04-01-2009, 07:20 PM   #1
noir911
Member
 
Registered: Apr 2004
Location: Baltimore, MD
Posts: 681

Rep: Reputation: Disabled
openbsd 4.5 - changing .profile - logout and log back in (ssh)


every time I make changes to .profile, i need to logout and log back in to get the changes to take effect. is there any way to avoid this?

thanks.
 
Old 04-01-2009, 08:25 PM   #2
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 40
Usually you can integrate changes into your current shell by doing `source .profile` but some things may only take effect on shell startup. In that case perhaps you could try `exec /path/to/shell`? Not sure.
 
Old 04-01-2009, 08:32 PM   #3
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Unfortunately, "source .profile" only works for Bourne Shell and Bourne-Again Shell, not KornShell...assuming the user account you are SSH-ing to has KornShell (ksh) set as their default shell.

Last edited by indienick; 04-01-2009 at 08:34 PM.
 
Old 04-01-2009, 09:15 PM   #4
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 476
Blog Entries: 111

Rep: Reputation: 74
Quote:
Originally Posted by noir911 View Post
every time I make changes to .profile, i need to logout and log back in to get the changes to take effect. is there any way to avoid this?

thanks.
Would

su - <your_user_name>

work?
 
Old 04-01-2009, 11:00 PM   #5
noir911
Member
 
Registered: Apr 2004
Location: Baltimore, MD
Posts: 681

Original Poster
Rep: Reputation: Disabled
Here is what I found: the source command is not present in openbsd 4.5-current base installation. so that definitely doesn't work. typing exec `which ksh` also didn't work. su - <username> does work but, it spawns a new shell (bad thing) and also if I have to type su - <username>, I would rather ^d and ssh back again (less typing, I guess).

Anyone else know any other trick?

O.S is OpenBSD 4.5-current with base installation with ksh & I'm connected via ssh.

Thanks.
 
Old 04-02-2009, 04:38 AM   #6
rgouveia
LQ Newbie
 
Registered: Apr 2009
Posts: 2

Rep: Reputation: 0
Lightbulb

From the OpenBSD FAQ:

Quote:
With ksh(1), this is more noticeable because there is only one startup script, .profile. This file is ignored unless the shell is a login shell.)
Check the faq8.html#ksh for more.
 
Old 04-02-2009, 06:07 AM   #7
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: always back to Fedora
Posts: 241

Rep: Reputation: 50
Have you tried ". .profile" in a shell? I haven't used ksh for a while now, but I think this should work.
 
  


Reply


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
user profile not being saved after logout bradleyjr Linux - Newbie 1 01-25-2009 04:12 PM
'logout' inserted in profile cryo70 Linux - Security 6 09-19-2005 05:01 PM
howto re-load my ~/.profile without logout? minike Slackware 4 09-18-2005 12:36 AM
Cant log out of window manager and log back into kde randrake Linux - General 4 08-11-2005 11:01 AM
bash logout profile rc cs emacs sreenrc ravenarts Linux - Newbie 2 05-15-2002 08:01 PM


All times are GMT -5. The time now is 05:42 AM.

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