Reply
 
Thread Tools Display Modes
  #1  
Old 04-07-2010, 04:36 PM
bcrowell bcrowell is offline
Junior Member
 
Join Date: Apr 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default login message in jail terminal to explain what it's for
I've installed PC-BSD, and so far am very impressed. The GUI installer is very nice.

I had some problems at first because I was trying to do things in a terminal window I popped up by double-clicking on Konsole desktop icon, not understanding that it was actually putting me in a jail. Man pages didn't work, ssh didn't work, and I didn't understand why. It's true that the icon is labeled "jail," but in my case it wasn't a prominent enough smack in the face to make me realize that I shouldn't be using it for general-purpose shell sessions. It also wasn't obvious to me how to get a normal terminal window. (I didn't know that the KDE terminal app was called konsole.) I think it would be helpful if the jail terminal launcher could be set up so that when you double-clicked on it, it would start your shell session with a banner explaining that it's a jail, what it's useful for (I still don't know), and how to get a normal terminal window if that's what you want.
Reply With Quote
  #2  
Old 04-15-2010, 06:19 AM
rhyous rhyous is offline
Senior Member
 
Join Date: Aug 2005
Posts: 100
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to rhyous Send a message via MSN to rhyous Send a message via Yahoo to rhyous
Default Re: login message in jail terminal to explain what it's for
I agree.

I would like to add the prompt should be this:

Code:
PortsJail# some command
PortsJail#
My problem is that when I leave and come back, and I have a few windows open, which one is the jail and which one isn't.
__________________
Rhyous's 127.0.0.1 or ::1
http://www.rhyous.com
Reply With Quote
  #3  
Old 05-07-2010, 01:34 AM
jnixon's Avatar
jnixon jnixon is offline
Administrator
 
Join Date: May 2008
Location: Sacramento, CA
Posts: 37
Thanks: 0
Thanked 2 Times in 1 Post
Send a message via Yahoo to jnixon Send a message via Skype™ to jnixon
Default
I thought we may be able to do something like this by modifying .cshrc in the Ports Console, but I think it uses the .cshrc in the user's home directory.
Reply With Quote
  #4  
Old 05-07-2010, 07:24 AM
foxofinfinety foxofinfinety is offline
Senior Member
 
Join Date: Mar 2010
Location: brilti, netherlands
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to foxofinfinety Send a message via MSN to foxofinfinety Send a message via Yahoo to foxofinfinety Send a message via Skype™ to foxofinfinety
Default
if I'm not mistaken the portjail is basically working in it's own environment isn't it?
if so it would use it's own .cshrc and .login files
which would be inside the jail itself.

if so, simply modify .cshrc and .login like this:

.cshrc:
Code:
alias sp      set prompt='\[!\]PortJail\[$cwd\]:\ ' # set sp to set the prompt
alias cd      'chdir \!* ; sp'                  # redefine cd command
alias pd      'pushd \!* ; sp'                  # redefine pd command
alias pp      'popd \!* ; sp'                   # redefine pp command
sp                                                 # set the prompt
it would work mostly the same as the normal prompt, which a minor differance, normally the host-name is displayed, here the host name is replaced with "PortJail".

.login:
Code:
echo "Notice: you are using the PortJail!"
echo "The PortJail is only made to manage FreeBSD Ports and works only on a jail"
echo "Commands you use here will not affect the main system."
echo "Some commands will not be available."

and you have both portjail in the promt and a login message
Reply With Quote
  #5  
Old 05-07-2010, 02:17 PM
kmoore134's Avatar
kmoore134 kmoore134 is offline
Administrator
 
Join Date: May 2005
Location: Knoxville, TN
Posts: 2,428
Thanks: 0
Thanked 103 Times in 85 Posts
Default login message in jail terminal to explain what it's for
Yes and no, the portjail is it's own seperate environment, but it shares
"/usr/home" with your regular profile. If you run "mount" you'll see.

This lets your apps work on your data without having to do a lot of
copying around.

I would imagine there is a way to do it, probably need some if statement
to check if this is the portjail, and then
set the prompt different
__________________
----
Kris Moore
PC-BSD Founder
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help required with jail question rekeaki General Questions 1 04-05-2010 02:14 PM
FreeBSD Security features (MAC, Jail, ACLs) antik Guides 1 04-04-2007 04:41 PM
FreeBSD Jail - I need some answers on it mogchr The Lounge 4 02-27-2007 07:24 PM
Creating a FreeBSD Jail antik Guides 2 12-10-2006 02:35 PM
vim "output not to a terminal" error message rickbsgu FreeBSD Help 1 11-05-2006 06:44 PM


All times are GMT. The time now is 12:06 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Copyright 2005-2010, The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.
All other content is freely available for sharing under the terms of the Creative Commons Attribution License.