Color PS1 in runlevel 3 -how? [SOLVED\]

I have found this in the wiki to be pleasing to the eye: http://wiki.archlinux.org/index.php/Pos … p_your_PS1
But it only works in X terminal emulators, not in the runlevel 3 console. I do have colorized output from pacman and man pages in runlevel 3, using the same guide, but my PS1 is still dull white. How do I fix this?
Last edited by Misfit138 (2007-11-02 23:48:24)

hybrid wrote:Use ANSI-color codes instead of that weird thing that they do in that wiki-entry. (as Gilneas kind of mentioned too)
Also remember to use \[ at the beginning and \] at the end of each color string.  Otherwise, bash will miscount the number of characters displayed in a prompt, and wrapping will be weird:
\[\e[1;33m\]\w>\[\e[0m\]
Another thing to remember is, xterm kills your PS1 prompt so you have to reload it every time you open an xterm session.
To that end, I put my PS1 definition in ~/.bashrc and make sure that the logon script /etc/profile calls ~/.bashrc.  That way PS1 is defined both when I first log on to the TTY console, and every time I open an xterm window.

Similar Messages

  • How to force a failsafe mode in runlevel 3 (kdm) [SOLVED]

    This is probably quite basic but I am wondering how I can get a console after X is hanging (last xorg-server update with catalys). The usual  c-m-f1 is not working. I don't seem to be able to kill X with c-m-delete either.
    I would like to force a runlevel 3 session.
    I don't seem to be able to get a console even in failsafe mode. I am using kdm as a daemon in rc.conf.
    I have tried with the live cd but then I don't know how I can mount my lvm partition (which is not seen as a device).
    Thanks for any help.
    Last edited by PierreR (2009-08-29 09:23:15)

    PierreR wrote:I don't seem to be able to get a console even in failsafe mode. I am using kdm as a daemon in rc.conf.
    that's the main reason you can't enter in runlevel 3. that daemon will run on every runlevel excepting runlevel 1. how can you fix this?
    when you are on grub menu, type "e" and then select the kernel line and type again "e" then append to that line, at the end, "init 1", enter to make the changes and then hit "b"
    after you type root password, edit rc.conf and remove kdm from there. after you fix your xorg, use /etc/inittab way to start kdm
    Last edited by wonder (2009-08-29 09:04:06)

  • How solve  ORA-04030: out of process memory when trying to allocate

    i am facing problems in oracle 10g and after establishing 250 sessions
    an error ocure
    how solve ORA-04030: out of process memory when trying to allocate
    how i can solve it.

    The Oracle version and if Oracle and the OS are 32 or 64 bit versions affect whether or not the /3GB or /PAE flags come into play.
    Also if pga_aggregate_target is not in use then the error generally means the userload is too large for available memory which could be because the previously mentioned switches are needed, because the user load is just to large for available resources, or that memory is being wasted by an excessive number of "dead" sessions. Again depending on the versions of the OS, Oracle, and the application space leaks could be an issue.
    Bouncing will reclaim space lost to space leaks and clean up dead sessions but it is best to know why the problem exists before bouncing cause once you reboot you lose most of the information that will tell you what the cause of the problem is unless you make it a point to capture debugging information first.
    HTH -- Mark D Powell --

  • Pick color feature not working properly -- how do I reset?

    Pick color feature not working properly -- how do I reset?

    You need to contact Adobe for you billing problem this is a user four not adobe customer support.
    For your Photoshop Problems this user community may be helpful. 
    Supply pertinent information for quicker answers
    The more information you supply about your situation, the better equipped other community members will be to answer. Consider including the following in your question:
    Adobe product and version number
    Operating system and version number
    The full text of any error message(s)
    What you were doing when the problem occurred
    Screenshots of the problem
    Computer hardware, such as CPU; GPU; amount of RAM; etc.

  • PS CC - I have a B/W background which I flattened - Then, change to RGB and add an RGB color graphic - print out makes background a greenish color - Can't figure out how to adjust.

    PS CC - I have a B/W background which I flattened - Then, change to RGB and add an RGB color graphic - print out makes background a greenish color - Can't figure out how to adjust.
    Thanks,
    Dave

    If the grayscale looks ok on screen, you are probably not setting up your print correctly. What OS? What printer?

  • The color change on my face how do i change back?

    the color change on my face how do i change back?

    No, its still there. Its a bult in iOS app and cannot be deleted.
    Check all of your folders and home screens to see it was accidentally moved.
    Check Restrictions to see if it is turned on and the Camera restricted (Settings app > General > Restrictions)
    Try a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears. Once shut down is complete, if it doesn't restart on it own, turn the device back on using the On button. In some cases it also helps to double click the Home button and close all apps from the tray before doing the reset.
    Reset your phone layout (Settings > General > Reset > Reset your Home Screen Layout). NOTE: this will move apps out of existing foldes and delete the folders.

  • Aperture: after deleting a project (trash) this reappear opening again the program, how solve it?

    Aperture: after deleting a project (trash) this reappear opening again the program, how solve it?

    I have the same issue. When I use fotostream, there will be automatically generated projects for each month. So I deleted all fotos inside the project and now I have empty projects. When I delete them (with or without empty trash), they will reappear after opening Aperture again.
    If I delete them, close Aperture and start iPhoto with the same library, the projects will not reappear, but after the next start of Aperture, they reappear.
    I've tried to put fotos into the project and deleted them with the fotos inside, but this didn't make any difference.

  • The ackground and icon colors changed on my ipad. how do i change them back ?

    the background and icon colors changed on my ipad. how do i change them back ?

    that fixed it. thanks a bunch. what did i do to change it ? all i did was turn it off, when i turned it back on it was in "white on black " mode.

  • I messed my color sync profile up. How can I reset my color sync profile to factory settings?

    I messed my color sync profile up. How can I reset my color sync profile to factory settings?
    Core 2 Duo, OS Lion (not mountain)

    Hi, yes, I messed it up by trying to edit it.
    I just clicked configure and changed the options. Is there a factory setting I can reset it to?
    The problem when I try to get it back to normal is that it never looks just like it did. It looks mainly fine, but things like light blues look wrong.

  • This module only supports the threaded MPM,this is error,how solve?

    I start startup software,appear error,as follow:
    This module only supports the threaded MPM
    How solve this is error,what MPM?Help me,THKS!!!!!

    --with-mpm=worker,solve this error.

  • ZSH using a different PS1 depending on hostname? [SOLVED]

    SOLVED
    Mikachu on irc.freenode.net #zsh gave me a good solution:
    case $HOST in
    TARDIS)
    hostcolor=blue
    CentzonTotochtin)
    hostcolor=cyan
    Highwind)
    hostcolor=white
    hostcolor=gray
    esac
    PS1="%{$fg[$hostcolor]%}%B%m%b%u%{$reset_color%}:%{$fg[green]%}%2~%{$fg[magenta]%}%%%{$reset_color%} "
    #PS1 thanks to Mikachu on irc.freenode.net #zsh
    /SOLVED
    A little background
    I've got around to setting up git in my home directory (leaving a '*' in ~/.git/info/exclude, and using 'git add -f $FILE') to make sure all my machines are using the same dotfiles, but I use a different PS1 based on what machine I'm using.  I'd love to have a single .zshrc I could drop into the git repo and use for all machines, as opposed to say, zsh evaluating a seperate '~/.PS1' I set up by hand on each machine.
    But getting to the point:
    My PS1 is this:
    PS1="%{$fg[cyan]%}%B%m%b%u%{$reset_color%}:%{$fg[green]%}%2~%{$fg[magenta]%}%%%{$reset_color%} "
    the only difference between the .zshrc on each machine is that the hostname is given a different color, so that the machine 'TARDIS' might have the hostname in PS1 as blue, machine 'Centzon' might have the hostname as cyan, and if the .zshrc is on any other host, the hostname in PS1 is just grey.  I'm not sure how to go about this with .zshrc, but here's a rough idea:
    eval hostname
    if hostname=TARDIS
    PS1="%{$fg[blue]%}%B%m%b%u%{$reset_color%}:%{$fg[green]%}%2~%{$fg[magenta]%}%%%{$reset_color%} "
    if hostname=Centzon
    PS1="%{$fg[cyan]%}%B%m%b%u%{$reset_color%}:%{$fg[green]%}%2~%{$fg[magenta]%}%%%{$reset_color%} "
    else
    PS1="%{$fg[grey]%}%B%m%b%u%{$reset_color%}:%{$fg[green]%}%2~%{$fg[magenta]%}%%%{$reset_color%} "
    Has anyone come up with something like this?  If not, how would I do something like this in ZSH?
    Last edited by 094TQ5 (2011-11-08 00:31:42)

    Well, there are different ways of achieving this.
    Solution 1:
    You can create a new output type which will be triggered and call a same driver program and the new smart form. I am sure you can customize as to what Purchasing document type will trigger which output type. Get in touch with someone in the function team to get this configured.
    Solution 2:
    No Customizing, let the configuration be the same, but in the driver program change the value of  "TNAPR-FONAM" immediately after the form entry_neu to the new form name based on the Purchasing document type.

  • Cant stand the changes to my Maxx HD with the KitKat upgrade, text colors and keyboard terrible. How can I remove the upgrade and go back to what I had?

    How can I remove this new Kitkat upgrade and go back to what I had. I cannot deal with the color on text screen and the keyboard is terrible. Can take back all the stupid pictures they added for texting. Just need it back to what it was.

    Hasn't any business ever heard of the term.
    IF IT AINT BROKE DON'T FIX IT.

  • Colored Calendars on iPhone--And how they don't work.

    Ok. Let me start by asking Steve and Apple, "***?!"
    I use colored calendars. They help [me]. I can visually look at my week view and determine how much of my week consists of work, and how much consists of play. Oh, and look, there's my silver calendar, it's someone's birthday on Saturday. And there's a red box, so that means my team is playing on Sunday. Colored calendars are great...but why don't they work properly for the iPhone when they sync??? This is the most ******** thing I've ever seen.
    My Blue (Personal) calendar is Orange on my iPhone. My Green (Work) calendar is Purple on my iPhone. Oh and guess what? My Holidays, Birthdays, and other calendars are other colors too. Do you know why my personal calendar isn't orange on my iCal? Because I hate the color orange. I made it blue for a reason.
    Why would they enable colored calendars without a) just making them sync to what the calendars are on iCal, and b) not giving you the option to edit the colors. I mean, if they're not going to just make it a proper sync, the least they could do is allow me to adjust the colors, right?
    This is just one more thing that the developer of the 2.x software didn't think of.

    An Apple kbase article 'explains' this (really, I would call it more of an excuse than an explanation!).
    Each calendar is assigned a different color to allow you to easily identify which appointments belong to which calendar and _this may not match the exact color used on the computer_.
    In the meantime, there is a workaround, although it is something of a pain. The iPhone will apply calendar colors in the following order: red, orange, blue, green, purple. (If you only sync one calendar, it's blue).
    Depending on the colors you want, you first need to create 'blank' calendars in iCal to 'use up' unwanted colors. Then, you need to sync the calendars, one at a time, in color order.
    Go to the Info tab (in iTunes with the iPhone connected and selected in the devices list). With the Sync iCal calendars box checked, UNcheck all the boxes and sync. Then, check the box for the calendar you want to be red. Then sync (if you look on the iPhone at this point, that calender will be blue, since it's the only one). Then, check the box for the calendar you want to be orange, then sync. Repeat for blue, then green, then purple.
    For example, if I want to have two calendars, Home colored blue and Work purple, I would create three new calendars - empty1, empty2, empty3 - then check the boxes in the following order, syncing between each: empty1, empty2, Home, empty3, Work.
    Also, you can submit feedback to Apple: http://www.apple.com/feedback/iphone.html.

  • HP Color LaserJet Pro MFP M177fw How to Scan

    I just bout the HP Color LaserJet Pro MFP M177fw printer today and don't know how to use the scanner. I use Windows 8 operating system. Please advise how to use th scanner function. Thanks.  

    Hi, From page #38 of the manual: Scan by using the HP Scan software (Windows)
    Use the HP Scan software to initiate scanning from software on your computer. You can save the scanned image as a file or send it to another software application.
    1. Load the document on the scanner glass according to the indicators on the product.
    NOTE: For best results, load small-size paper (Letter, A4, or smaller) with the long edge of the paper along the left side of the scanner glass.
    2. Click Start, and then click Programs (or All Programs in Windows XP).
    3. Click HP, and then select your product.
    4. Click HP Scan, select a scanning shortcut, and then adjust the settings if necessary.
    5. Click Scan.
    NOTE: Click Advanced Settings to gain access to more options.
    Click Create New Shortcut to create a customized set of settings and save it in the list of shortcuts. Regards.

  • How do I get more color highlighting options in preview, how do I get more color highlighting options in preview

    The new version of Preview on Mountain Lion has limited the colors available when using the annotate tool (highlighter), how can I access more options?

    Preview used to allow the user to select highlight colors from the color picker. This is no longer the case.
    I have requested that Apple add it back at http://www.apple.com/feedback/macosx.html.
    See also https://discussions.apple.com/message/19307157.

Maybe you are looking for