Setting the terminal at prompt

Hello
By default, the Solaris 10 terminal is very simple (neither bash, nor tcsh at prompt)
I tried to copy /etc/profile content to a .bashrc or a .profile in my home directory.
I want to get hostname@username at prompt .
So how to get it?

If you login as Root at the terminal, then set the prompt in your root .profile. Normaly in /.profile or /root/.profile. Naturaly you could enter it in the /etc/default/profile but then eveyone on your System meant yell. They did that at a college from me as he changed the default. Eventhough he used mine I still set my own profile when I use root.
Try this:
bash syntax:
PS1='
\u@\H:\w
$OS -> '; export PS1
korn syntas:
$LOGNAME@`uname -n`
`uname -r` > "; export PS1
looks like this
root@MyHostName:/opt/SunMonitoring/scripts
5.10 ->

Similar Messages

  • Set the field's prompt at the RowViewer

    Hello all,
    I am working with Oracle JDeveloper 3.2, using JSP, and I have this problem:
    I did not find a method to set the field's prompt at the RowViewer (JSViewCurrentRecord Class).
    Humberto Zappe Loy

    The following function in DataWebBeanImpl.java shows how the attribute label is obtained.
    public String getAttributeLabel(RowSet rs, AttributeDef aDef)
    String sLabel = aDef.getName();
    if (aDef.getProperty("LABEL") != null)
    sLabel = aDef.getProperty("LABEL").toString();
    else
    String sPropName = aDef.getName() + "_LABEL";
    sPropName = sPropName.toUpperCase();
    if(rs.getProperties().get(sPropName) != null)
    sLabel = rs.getViewObject().getProperties().get(sPropName).toString();
    return sLabel;
    You will notice that the value for the label is obtained via a call to AttributeDef.getProperty() or a call to rs.getViewObject().getProperties().get(sPropName) this means that you can set a property via the BC4J attribute or view object wizard and the DataWebBeans will make use of this property for rendering the prompts. You can edit an attribute's properties by clicking on the view object to activate it in the navigator and then right-clicking on the attribute to invoke it's editor. Once you have the attribute editing UI, you can click on the properties tab to add your new properties.

  • How to set the password with start-domain instruction in AS 8

    Hello,
    I am trying to add an instruction in /etc/init.d to start a domain automatically every time the server reboots but I have not found a way to set the master password of this domain. I know there is a --passwordfile option but it only has the choice of setting the adminpassword AS_ADMIN_PASSWORD.
    asadmin start-domain --passwordfile /var/SUNWapp/password.txt application
    cat /var/SUNWapp/password.txt
    AS_ADMIN_PASSWORD=xxx // It does not work to start the domain. I need to set the master password
    Is there any way to start the domain automatically??? how can I set the password without prompt?
    Thank you,
    Regards

    You can also have AS_ADMIN_MASTERPASSWORD in the password file.
    "asadmin start-domain" will not prompt for the masterpassword.

  • Using Java To Open Terminal/Command Prompt

    I wanted a .jar file to open the terminal/command prompt on execution so that i can use System.out to display all the information needed...Is this possible? If so what code can i use to open the command prompt from java
    Thanks a lot ppl ;)

    Terminal prompt is plataform dependent, I would not advise you to do that. If your system outs are logging, i sugest you to use any logging api. If you are trying to display text information to the user, open any text widget and output there.
    May the code be wiht you.

  • How to set the default display date of Calender prompt of SMPortal???

    Good Day!!
    As for as my knowledge, the default date Visible in all Calender prompt will be the
    Starting Date in the Specified date range either "RelativeDateRange" or "AbosoluteDateRange".
    But we have a requirement to set the default date to a date in the middle of the specified range, I don't find any option to specify in Request Offering Wizard or MP's xml file.
    Our scenario is as follows,
        We are trying to customize the CSPP's request offer "Request Virtual Machine", which has a user promt to select Decommission Date for the New VM. We have configured the date prompt as Relative Date range and set the
    Start date as "1 day next to user's current time" and Maximum date to "90 days after relative date".  So the user will get option to select Decomm date from (1-90) days with the defalut date as 1st day next to his current
    time. But our requirement is to set the default available date as 90th date in the above mentioned Relative Date Range.  
         I couldn't find any option in Request offering Wizard as attached below,
          Also I couldn't even find any tag to specify the default display date in the MP's XML file as attached below. Is there any other <tag> can be included inside <Details> tag to accomplish this ??
        Is there any other way to accomplish this???
        Please advise
    Thanks,
    Narayanababu
    Thanks and Regards, Narayana Babu

    This is probably a link editor parameter, see the linker and loader guide.
    Another thing you can do is write your own sbrk() that will log whenever it's called, so you can at least see how many times it's called and with what values. If you really need in-depth instrumentation, write your own heap routines and give them the same names as the CRTL routines. The linker should find yours first and route all memory operations through them. At least, that's the way it worked for me on SunOS 4.1....

  • How to set the 'default to' field of a dashboard prompt to yesterday?

    Hi everyone,
    I have a dashboard prompt on a date (fully qualified name Date.Date and type Date).
    I also have a simple report with two columns: Date.Date and a mesure (whatever the name).
    I managed to filter on the day before the current date in the report by adding an advanced SQL filter:
    Date.Date = Cast(TimestampAdd(SQL_TSI_DAY,-1,@{system.currentTime}) as Date)
    Now, I would like the prompt to select the day before the current date by default.
    The filter on Date.Date would be 'is prompted' or so.
    How do I set the "Default to" field of the prompt?
    Thanks in advance

    Hi
    go to your prompt..
    select SQL Results from Default to: dropdown..
    here.. you need to write your Logical SQL..
    which defaults to the previous date
    some thing like this..
    *select case when 1=0 then anydate column else timestampadd(sql_tsi_day, -1, CURRENT_DATE) end FROM SubjectArea name*
    write like this.. and report back...
    Thanks & Regards
    Kishore Guggilla

  • HT4061 i did not set a passcode but the Ipad is prompting for one

    I did not set a passcode but the IPad is prompting for one

    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tb
    How to Reset a Forgotten Password for an iOS Device
    http://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Device
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    Saw this solution on another post about an iPad in a school enviroment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just cancelling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

  • Setting the command prompt...

    Can anyone tell me what I would use to set the command prompt?
    On HP-UX, I would reset the PS1 variable...
    i.e. PS1="
    \$ID @ \$HOST | \$PWD
    --> "
    On Linux, I would reset it as follows:
    i.e. PS1="
    \u @ \h | \W
    --> "
    Neither of these seems to work here...
    I tried the following, and it give me the correct visual layout, but the values don't change when you change directories:
    i.e. PS1="
    `whoami` @ `uname -n` | `pwd`
    --> "
    Any help would be greatly appreciated...

    Hi,
    Changing Your Command Prompt
    The syntax you use to change your command prompt depends on whether you are using the Bourne,
    Korn or C shell.
    Bourne and Korn Shells
    For the Bourne or Korn shells, you redefine your command prompt with the PS1 command. The
    following are three examples:
    PS1=": "
    PS1="`hostname`: "
    PS1="`hostname`{`id`}}: "
    The first example sets the prompt to a colon (:), followed by a space.
    The second example creates a prompt consisting of your machine name followed by a colon and a
    space.
    The third example sets the prompt to your machine name, followed by your login name in braces
    {}, a colon, and a space.
    Type any of the examples above to change your current command prompt. The prompt will remain until
    you change it again, or logout.
    If you want to make your changes more permanent, add one of the above examples (or a prompt of your
    own creation) to your .profile file. If you do this, the prompt you specify will appear each time you
    login in or start a new shell.
    C Shell
    For the C shell, you personalize your command prompt with the set prompt command. The following
    are three examples:
    set prompt="% "
    set prompt="`hostname`\!: "
    set prompt="`hostname`{`id`}}: "
    The first example sets the prompt to the percent sign, followed by a space.
    The second example creates a prompt consisting of your machine name followed by the history
    number of the command (hostname1, hostname2, hostname3, and so on).
    The third example sets the prompt to your machine name, followed by your login name in braces, a
    colon, and a space.
    Type any of the examples above to change your current command prompt. The prompt will remain until
    you change it again, or logout.
    If you want to make your changes more permanent, add one of the above examples (or a prompt of your
    own creation) to your .cshrc file. If you do this, the prompt you specify will appear each time you login
    in or start a new shell.
    Revert back.
    Thanks.
    Senthilkumar
    SUN - DTS

  • How to set the PATH in Terminal?

    As a newbie to Bash and the Terminal, in connection with installing a new version of Ruby and various add-ons, I have been messing around with changing the PATH via various methods I've found on the internet, and trying to add a new directory to my PATH. Unfortunately, I cannot figure out how to set the PATH correctly. Here is what I understand so far:
    1. Bash first looks to ".bash_profile" in the home directory for PATH settings.
    2. If none, Bash then looks to ".bash_login" for PATH settings.
    3. If none, Bash then looks to ".profile".
    4. If none, Bash then looks to a system file in "/etc/profile" for default PATH settings.
    5. For a new shell after login, Bash looks for a ".bashrc" file.
    I cannot find any of the above files (I have Finder set to show hidden files already). Somehow, following some instructions from the internet without really knowing what I was doing over the past week I have set my PATH as follows:
    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/*****/src:/usr/X11/bin
    but I cannot find the file that is setting this PATH. I have tried creating a new ".bash_profile" shell file and putting it in various places such as "/bin" and "/usr/bin" but the file is not being read.
    * As a temporary workaround I tried using the command "source .bash_profile" upon login to set the PATH using the .bash_profile file that I created, but it does not work.
    * I am able to temporarily alter the path using the command "PATH=/usr/local/bin:$PATH" but this only lasts for an active shell; when I close out and reopen a new shell, it reverts to the default.
    So my questions are:
    Is it correct that there is a "/etc/profile" somewhere that is setting the default PATH? If so where is it? Should I alter it, or create a new ".bash_profile" somewhere to set the PATH? If not, where is my PATH being set? If I should create a new ".bash_profile", what exactly should go in it?
    Thanks in advance for any assistance.

    ... I created a new ".bash_profile" file directly under my home directory and it worked like a charm. Below is the content of the file:
    "PATH=/usr/local/bin:/bin/:/sbin/:/usr/bin/:/usr/sbin/:/Users/******/Ruby:/Users/*******/src:/Users/******/Java Programs/"
    What are the "..."'s? Is that just you, or is the contents of the file actually inside of double quotes?
    is there an 'export PATH' also in the file? As in
    PATH=/usr/local/bin:/bin/:/sbin/:/usr/bin/:/usr/sbin/:/Users/******/Ruby:/Users/*******/src:/Users/******/Java Programs/
    export PATH
    And did you either restart your Terminal session so your .bash_profile was read, or issue a 'source .bash_profile' command to execute the .bash_profile after your change?
    The only remaining problem is that from the home directory, I'm unable to directly run programs in the above-designated subdirectories (without first navigating to the subdirectory containing the file. Is there something wrong with the syntax or order of the directories I put in the path?
    For example: there is a file called "newprogram.rb" in the "Ruby" directory listed above. I should be able to execute it from the home directory using "ruby newprogram.rb" but it does not work. The same command works fine from within the "Ruby" directory.
    Does the 'ruby' command search PATH to find its scripts?
    Have you read the "man ruby" man page to see if it talks about PATH?
    A common Unix feature is that programs and scripts with the executable bit set, and are located in a PATH directory, will be run if you just type their names.
    For example, if the first line of newprogram.rb script starts with
    #!/usr/bin/ruby
    and if the script is executable
    chmod +x newprogram.rb
    And if it is in a directory in PATH, then just typing
    newprogram.rb
    should run your perl script using /usr/bin/ruby. If you want to use a different version of Ruby, then change the #! line so it point to your version of Ruby. Or if your version of Ruby is found earlier in PATH then the /usr/bin/ruby, you can use
    #!/usr/bin/env ruby
    as your script's first line which will search PATH for 'ruby' and use the first one it finds.
    Message was edited by: BobHarris

  • How to set the prompt of a Spark Combobox programmatically

    Hi,
    here a Combobox wich use my cutom Skin to manaully set the prompt:
    <s:ComboBox id='artistNameCB' labelField="artistName"                         
              skinClass="view.music.skins.ArtistComboBoxSkin"
                                    />
    here is the reklevat part of the Skin:
    <!--- @copy spark.components.ComboBox#textInput -->
        <s:TextInput id="textInput"
               text='select'
                     left="0" right="18" top="0" bottom="0"
                     skinClass="spark.skins.spark.ComboBoxTextInputSkin"/>
    How do I set the displayed text of a combobox  programmatically ?

    ArtistComboBoxSkin(artistNameCB.skin).textInput.text = "prompt"

  • How to set the default value in dashboard prompt?

    Hi there,
    In my Dashboard prompt I'm getting values like:
    Mar 2010
    Apr 2010
    May 2010
    Jun 2010
    How to set the default value to the current month (Jun 2010). I don't want to use "specific value". I want to use the "SQL Result" for populating the default value.
    Appreciate your help

    hi,
    you can create a Repository variable current_month with the expression as
    select to_char(trunc(sysdate),'Mon')from dual
    and use this in the prompt "Default to" Server variable and use this repository variable.
    hope this helps.
    cheers,
    vineeth

  • LAF project : can I set the item prompt font through the CSS ?

    Hi,
    I'm implementing an application that is installed with multiple customers. I've added in the LAF jar and used the .GUIProperties to set the Item font and colours (so each customer can choose a LAF without rebuidling the system).
    However, whilst this works, is there a way that I can set the Prompt properties using the .GUIProperties in the CSS - I can't see one (looking in the getContainerContent(Container ct)) part of the jar.
    Is there a simple way of doing this ? (ie: set the prompts for the application through one call to the .GUIProperties in
    PKG_LOOK_AND_FEEL.Set_GUI_Properties( '.GUIProperties1', 'LAF_BLOCK.LAF_BEAN' ) ;
    TIA
    Steve

    Hello,
    Please, don't ask question about the LAF on this forum. Send your questions to the corresponding email : [email protected]
    Thank you in advance,
    Francois

  • If I have a program that runs in windows under the command prompt and on Mac in the Terminal window, can it be run in iOS

    I have a program that is ran using the command line in windows and the terminal window on Mac or LInux.  Is it possible to create an app for the iPad that could run this program.  This program does require admin rights.

    No.

  • Setting $PATH using the terminal

    Hi All! I am a newbie with OS X and I am wondering as to how to add a directory into the PATH using the terminal. Thank you very much!

    Ustilago wrote:
    Hi All! I am a newbie with OS X and I am wondering as to how to add a directory into the PATH using the terminal. Thank you very much!
    Welcome to Apple Discussions!!
    export PATH=/path/to/your/directory:$PATH
    Note that you should supply the complete path to the directory you want to add.
    To make this automatic for each time you start the Terminal, you need to arrange for it to appear in ~/.bash_profile or ~/.bashrc. It's best to put it in the latter, since this is run for every Terminal window. ~/.bash_profile is only executed for the initial login window, but you can avoid duplication by having it source ~/.bashrc. Stripped to its essentials, my ~/.bash_profile is just
    if [ -r ~/.bashrc ]; then
    . ~/.bashrc
    fi
    If you have further questions, you might find posting them in the UNIX forum better. One of the regular posters there, Bill Scott, has this page which you may find useful: Unix Links, especially under the Mac OS X heading.

  • Keep the default rank after setting the generation as a prompt

    Hello everyone, I'm new to the forum and also the world's oracle.
    I am creating a report that I would like to display the rank of the store selected in the dashboard prompt.
    Without prompt everything is fine and works great. the problem comes when I select the shop "is prompted" as the result of the report is always rank 1. how can I fix this?
    In the criteria I entered:
    Measure: RANK (FILTER ("Plan1." "CFL" USING (("EsercizioPP". "Gen2, EsercizioPP" = 'Esercizio_2012') AND ("Year". "Gen2 Year" = '2013 ') AND ("Scenario "." Gen2 Scenario "= 'value') AND (" Version "." Gen2, Version "= 'CONS'))) by" Period "." Gen3, Period ")
    Gen6, Store
    Gen3, Period
    thanks in advance

    Welcome. Make this change to a new document. Make any other standard changes you make on a regular basis. Remove any unwanted text. Then save as a template. If then you start your new documents with this template, you will have the settings there already for you. Cheers!

Maybe you are looking for