Changing Color Of Console Cursor

I've searched for about five hours trying to uncover the method of changing the color of the console cursor
in Linux. Specifically I'm not trying to change the color of the cursor in terminals, I know how to do that, but I don't know how change them in the console. I've looked at the How To on the bash prompt which cover cursor movement but says nothing about color. I've seen a blinking green cursor in a console in one of the source distros but have no idea of how that was done. Is this a variable set in /etc/profile or ~/.bashrc? Can anyone help?
jlowell

export PS1='[33[01;32m]u@[33[1;34m]h [33[01;36m]W $ [33[00m]'
Ok, if you just wanted say the cursor in bold cyan but still wanted all that information
export PS1='u@h W[33[1;36m] $ [33[00m]'
That will make the prompt cyan--if you want it blue then change the 36m to 34m, if you want it green then change it to 32m.
Here's what's happening, more or less--my memory, however, is a little hazy so someone correct mistakes.
PS1='
That part's obvious.  It begins with a single quote.
Then, various things that I want indicated, user, hostname (only the first part and working directory.  The u is user, the h is hostname (only the personal name--hrrm, that ~can't be the right word, but I mean the first part of the FQDN (Fully Qualified Domain Name).
Now, the color stuff begins and this is where my memory is hazy.  I believe the [33 part indicates that you're doing something with the colors---note that you have to escape the brackets with backslashes.  So, we start indicating there will be color with [33
Then the [1;36m 
That part indicates which color--I forget all the codes, looked this stuff up a long time ago and settled upon what I like.  I just know the green blue and cyan because I use them in my prompts.   1;31m is red.  Then we end the color with another ] and the $ for the prompt.  I put spaces in, you might choose to do so or not.  I like a space between the prompt and command.  Then, we need to close the colors with another [33[00m]'
(Don't forget the single quote at the end.)
One way to fool around with it is to make a little file called, for example, ps1.txt
u@h W[33[1;31m] $ [33[00m]
Note there are no quotes in that.
Now you can just do
PS1=`cat ps1.txt`
Note that those are backticks, the little mark under the ~, not single quotes.  That particular one will give you a red $.  You can edit your ps1.txt file for instance trying 1;31m 1;32m etc to see what you like, and rather than having to type the whole thing each time, just do that
PS1=`cat ps1.txt` each time you want to try a new color.  So, you just have to change a number in your ps1.txt file. (I'm very lazy and hate typing--if I were really playing with it, I'd probably make a script to do that called ps1x or something, which would simply read
PS1=`cat ps1.txt`
However, that's being quite lazy.
Sorry for the long winded explanation, but hopefully it helped you.  If I told you many things you already know, I apologize, but maybe some newcomer, browsing archives will find it helpful.
Scott

Similar Messages

  • Possible to change colors of mouse cursor?

    I was wondering if it was possible to change the color of the mouse cursor. With out the use of a program/haxie.
    Is there a particular file/preference I can edit, some command line for teminal?
    Thanks in advance
    nerd2

    Might try looking here for WebKit ones...
    /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framew ork/Versions/A/Resources/<anything>Cursor.png
    Double click for Some info...
    /System/Library/Frameworks/Tk.framework/Versions/8.4/Resources/Documentation/Ref erence/Tk/TkLib/GetCursor.htm
    Not sure what these cursors are for...
    /Volumes/TigerOS9/System/Library/Frameworks/GLUT.framework/Versions/A/Resources/ <anything>Cursor.tiff
    "The default cursor and the wait cursor are stored here: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/CoreGraphics. Default Cursor: $23556C - $23766C; Wait Cursor: $23766C - $23D66C"
    http://forums.macnn.com/90/mac-os-x/121657/osx-cursors-location-found/
    And what you didn't want...
    http://www.versiontracker.com/dyn/moreinfo/macosx/18336

  • UITextView: changing the color of the cursor

    Hi all!
    Is it possible to change the color of the cursor in the UITextView?
    Thank you,
    Luca

    I've found out that in this way it works:
    [[myUITextField  valueForKey:@"textInputTraits"] setValue:[UIColor redColor] forKey:@"insertionPointColor"];
    but I cannot understand whether it is allowed by Apple and if an app using it could be rejected.
    Any idea?
    Thanks,
    Luca

  • [ SOLVED ] Change virtual console cursor

    Hi, i'm trying to change my virtual console default _ to a blinking block cursor. I was wandering if that would be possible. I've searched through google and looked at setterm man page but couldn't find anything. Thank you.

    phrakture wrote:Because this took me a good 5 days to find:
    man console_codes
    heh, i found it referenced somewhere in the kernel source. the flashing block actually used to be the default cursor.
    James

  • How do I change the Color of the Cursor?

    Hi!
    I have changed the background color of a JTextField. Unfortunately the background color of the textfield is almost identical with the color of the cursor, so the cursor cannot be seen when the mouse pointer points into the textfield.
    Is there a way to change the color of the cursor and can this be done using the UIManager?
    Thanks,
    Alex

    I think you need to create a custom cursor from an image like .gif or .jpg.
    Look in to the javadoc of java.awt.Toolkit class for creating a custom cusrosor.
    toolkit.createCustomCusror(...)
    After creating the cursor, set the cursor on the desired components using component.setCursor(myCursor).
    Hope this helps
    Sai Pullabhotla

  • Why do I get a program error when changing colors?

    I get a 'Could not complete your request because of a program error' when I try to change colors on both the forground/background palette or from the color picker palette.  Is there a patch for this?
    I am using Photoshop CS6 version 13.0.1.x64

    Hi. Because this forum is for beginners trying to learn the basics of Photoshop, I'm moving your question to the Photoshop General Discussion forum.

  • Images Change Colors between monitors while the UI stays the same

    Hey! Im having an issue where photoshop changes the colors when I move the window between my monitors, seen here: http://sta.sh/04y5s60vf3j This isnt due to the monitors themselves being different, it actually changes after a few seconds of moving it inbetween the monitors. The left one has been callibrated with a spyder 3 elite which I no longer have access to. I applied the file with windows color management instead of the spyder utility. The second one is new, and it is not callibrated by anything, but instead was done by hand with the built in brightness/contrast/custom RGB settings. Both of them are very close to eachother, enough so for my tastes. but when photoshop changes what the image looks like, it's causing problems. Interestingly enough, when I disable callibration for the monitor on the left, the image does not change colors between monitors, but instead always appears as it does on the right. but then they don't match up and the whole screen looked washed out because it's uncallibrated, so that doesnt do me any good. Another interesting thing to point out, is when this image is saved as a .JPG, and viewed with firefox the image appears exactly like the monitor on the LEFT (which is my main monitor) despite the left monitor being the one that is force changed. does anyone have any suggestions? It also appears that windows photoviewer is behaving the same way, though firefox does not. Meaning when I open an image in all 3 on the left monitor, they look the same, but when opened on the right monitor, windows photo viewer and photoshop both display the image as brighter and redder than firefox does. This is frustrating, because it seems photoshop is changing the image with my callibration on my left monitor to match what it looks like on the web, which it does. but it doesn't do this for the right monitor, or when the left is uncallibrated. Another issue I can see with this is even if the UI is the same shade of gray, the images are different between the monitors because of this change. Does anyone have any suggestions?
    - BD

    Alright! So I reread through all this, poked at some things on the internet, and I'm going to attempt to summarize what would be a good solution for all this (And it seems, it still won't be perfect, but to get myself into the best environment I can for not messing with images for an hour trying to make them look nice before I post them to the web. I painted something yesterday on the cintiq, popped it over to my laptop screen and it just looked washed out and terrible.)
    1. Get a X-rite EODIS3 i1 Display Pro, Callibrate laptop and cintiq. I do have the money to drop on something like this, especially if it's a time saver.
         Things I'm not sure about:
              a. There was a ton of complaints about the software not working when I checked reviews, but also a ton that said everything was great. most of them were mac users though.
              b. I'm not sure if problems would still be posed, even while calibrated, by me having a wide gamut monitor.
              c. I'm a terrible excuse for a human being and I think the colors showing up brighter on the wide gamut screen is pretty (I should just make my images this bright on a normal screen and there won't be any issues. >.>)
    2. Set Firefox to color manage (easy enough)
    3. Change my photoshop working space to sRGB (since they'll have been calibrated at this point)
    3. Accept the fact that most of the people who look at my work will be doing so on a monitor that is almost certainly uncalibrated, and I can't control what they will see on my screen, but I CAN control if the colors are -actually- what I want them to be on any properly calibrated device. which is probably the best way to go anyways.
    4. Make paintings, have fun.
    Now, you two have been going on about all sorts of interesting things in here, and it seems that calibration issue run much much deeper than I ever thought. Do either of you have recommendations for how I should tweak this list of things to do or other things I can/ should do? I'm not currently a working professional, but if I have anything to say about it, I will be within a few years (I'm going to school for illustration and studying concept design on my own time) so it'd be useful for me to get into good habits now.
    - Brendavid

  • Can anyone tell me why a picture would change color when I try to download/upload it?  It is the exact same picture- chosen the same way and when it goes to any other program it changes the color (I've tried canvas on demand and mpixpro.  I've also tried

    Can anyone tell me why this picture changes color when I try to download/upload it?  It is the exact same picture I have taken from the same location.  The image on the left is via preview and the image on the right is what is shows like when I try to download it.  I have emailed it to myself and it shows fine on the computer and in CS4, but when I look at the download via my phone or on another computer it shows the wonky color on the right.  I have checked the color space shows RGB/8 bit.  Any ideas why or how to fix it?  It isn't with any one specific session.... and I've tried it on both my desktop and my laptop- saved image to an external hard drive and to drop box.  I've tried sending the image to canvas on demand, my email, mpxipro, POST editing- all the same result.  Please HELP!!  What am I doing wrong?

    Most of the time you see something like that. The image in question has a color profile other then sRGB. Some image viewers/displayers are color managed and others are not.  So the image do not look the same in all of the applications you use. So colors seem to change.
    Try converting it to sRGB color and see if then looks the same all around. Also I think PC and Mac displays are set to different gamma something like 1.8 and 2.2
    Though I'm colorblind I even see color variations.

  • How to change color of selected label from list of labels?

    My Problem is that I have a list of labels. RowHeaderRenderer is a row header renderer for Jtable which is rendering list items and (labels).getListTableHeader() is a method to get the list. When we click on the label this code is executed:
    getListTableHeader().addMouseListener(new MouseAdapter()
    public void mouseReleased(MouseEvent e)
    if (e.getClickCount() >= 1)
    int index = getListTableHeader().locationToIndex(e.getPoint());
    try
    if (((ae_AlertEventInfo)theAlerts.values().toArray()[index]).ackRequiredFlag)
    AcknowledgeEvent ackEvent = new AcknowledgeEvent(
    this, (ae_AlertEventInfo)theAlerts.values().toArray()[index]);
    fireAcknowledgeEvent(ackEvent);
    ((HeaderListModel)listModel).setElementAt(ACK, index);
    catch(Exception ex) {;}
    Upon mouse click color of the label should be changed. For some period of time ie. Upto completion of fireAcknowledgeEvent(ackEvent);
    This statement is calling this method:
    public void handleAcknowledgeEvent(final AcknowledgeEvent event)
    boolean ackOk = false;
    int seqId = ((ae_AlertEventInfo)event.getAlertInfo()).sequenceId;
    if (((ae_AlertEventInfo)event.getAlertInfo()).ackRequiredFlag)
    try
    // perform call to inform server about acknowledgement.
    ackOk = serviceAdapter.acknowledge(seqId,
    theLogicalPosition, theUserName);
    catch(AdapterException aex)
    Log.error(getClass(), "handleAcknowledgeEvent()",
    "Error while calling serviceAdapter.acknowledge()", aex);
    ExceptionHandler.handleException(aex);
    else
    // Acknowledge not required...
    ackOk = true;
    //theQueue.buttonAcknowledge.setEnabled(false);
    final AlertEventQueue myQueue = theQueue;
    if (ackOk)
    Object popupObj = null;
    synchronized (mutex)
    if( hasBeenDismissed ) { return; }
    // mark alert event as acknowledged (simply reset ack req flag)
    ae_AlertEventInfo info;
    Iterator i = theAlerts.values().iterator();
    while (i.hasNext())
    info = (ae_AlertEventInfo) i.next();
    if (info.sequenceId == seqId)
    // even if ack wasn't required, doesn't hurt to set it
    // to false again. But it is important to prevent the
    // audible from playing again.
    info.ackRequiredFlag = false;
    info.alreadyPlayed = true;
    // internally uses the vector index so
    // process the queue acknowledge update within
    // the synchronize block.
    final ae_AlertEventInfo myAlertEventInfo = event.getAlertInfo();
    SwingUtilities.invokeLater(new Runnable()
    public void run()
    myQueue.acknowledge(myAlertEventInfo);
    myQueue.updateAcknowledgeButtonState();
    // here we should stop playing sound
    // if it is playing for this alert.
    int seqId1;
    if (theTonePlayer != null)
    seqId1 = theTonePlayer.getSequenceId();
    if (seqId1 == seqId)
    if (! theTonePlayer.isStopped())
    theTonePlayer.stopPlaying();
    theTonePlayer = null;
    // get reference to popup to be dismissed...
    // The dismiss must take place outside of
    // the mutex... otherwise threads potentially
    // hang (user hits "ok" and is waiting for the
    // mutex which is currently held by processing
    // for a "move to summary" transition message.
    // if the "dismiss" call in the transition
    // message were done within the mutex, it might
    // hang on the dispose method because the popup
    // is waiting for the mutex...
    // So call popup.dismiss() outside the mutex
    // in all cases.
    if(event.getSource() instanceof AlertEventPopup)
    popupObj = (AlertEventPopup)event.getSource();
    else
    popupObj = thePopups.get(event.getAlertInfo());
    thePopups.remove(event.getAlertInfo());
    SwingUtilities.invokeLater(new Runnable()
    public void run()
    // search vector elements to determine icon color in main frame
    String color = getColor();
    fireUpdateEvent(new UpdateEvent(this, blinking, color));
    // Call dismiss outside of the mutex.
    if (popupObj !=null)
    if(popupObj instanceof AlertEventPopup)
    ((AlertEventPopup)popupObj).setModal(false);
    ((AlertEventPopup)popupObj).setVisible(false); // xyzzy
    ((AlertEventPopup)popupObj).dismiss();
    else
    // update feedback... ack failed
    SwingUtilities.invokeLater(new Runnable()
    public void run()
    myQueue.setInformationMessage("Acknowledge failed to reach server... try again");
    return;
    Code for RowHeaderRenderer is:
    class RowHeaderRenderer extends JLabel implements ListCellRenderer
    JTable theTable = null;
    ImageIcon image = null;
    RowHeaderRenderer(JTable table)
    image = new ImageIcon(AlertEventQueue.class.getResource("images" + "/" + "alert.gif"));
    theTable = table;
    JTableHeader header = table.getTableHeader();
    setOpaque(true);
    setHorizontalAlignment(LEFT);
    setForeground(header.getForeground());
    setBackground(header.getBackground());
    setFont(header.getFont());
    public Component getListCellRendererComponent( JList list, Object value,
    int index, boolean isSelected, boolean cellHasFocus)
    int level = 0;
    try
    level = Integer.parseInt(value.toString());
    catch(Exception e)
    level = 0;
    if (((ae_AlertEventInfo)theAlerts.values().toArray()[index]).ackRequiredFlag)
    setBorder(UIManager.getBorder("TableHeader.cellBorder"));
    this.setHorizontalAlignment(JLabel.CENTER);
    this.setVerticalAlignment(JLabel.CENTER);
    setIcon(image);
    else
    setBorder(BorderFactory.createLineBorder(Color.gray));
    setText("");
    setIcon(null);
    return this;
    I tried but when i am clicking a particular label, the color of all labels in the List is being changed. So can you please assist me in changing color of only the label that is selected and the color must disappear after completion of Upto completion of fireAcknowledgeEvent(ackEvent);

    im a bit confused with the post so hopefully this will help you, if not then let me know.
    I think the problem is that in your renderer your saying
    setBackground(header.getBackground());which is setting the backgound of the renderer rather than the selected item, please see an example below, I created a very simple program where it adds JLabels to a list and the renderer changes the colour of the selected item, please note the isSelected boolean.
    Object "value" is the currentObject its rendering, obviously you may need to test if its a JLabel before casting it but for this example I kept it simple.
    populating the list
    public void populateList(){
            DefaultListModel model = new DefaultListModel();
            for (int i=0;i<10;i++){
                JLabel newLabel = new JLabel(String.valueOf(i));
                newLabel.setOpaque(true);
                model.addElement(newLabel);           
            this.jListExample.setModel(model);
            this.jListExample.setCellRenderer(new RowHeaderRenderer());
        }the renderer
    class RowHeaderRenderer extends JLabel implements ListCellRenderer
        JTable theTable = null;
        public Component getListCellRendererComponent(JList list, Object value,
                                                      int index, boolean isSelected, boolean cellHasFocus){
            JLabel aLabel = (JLabel)value;
            if (isSelected){
                aLabel.setBackground(Color.RED);
            }else{
                aLabel.setBackground(Color.GRAY);
            return aLabel;       
    }

  • Changing color without modifying existing items.. problem!

    Hello,
    I'm reletively new to flash, and am trying to modify a template and am running into a problem and I don't seem to know why Flash is acting so strange.
    I am going into a movie clip to edit the color of an item, and when I do so with a tint, it overrides any additional effects such as light, and text. The color appears almost as if it were just slapped on top of everything.
    When I edit the color in advanced mode, it is really a hit-or-miss to get the correct color, and will only modify when changing the offset RGB.
    And also when doing this, the text gradually changes color, for example: there are 4 items in total that I want to edit the color of. Each item is a different colored box with text on the front (for a main Navigation of the website). --- The first item, the text will stay white. Gradually through the second and third items it starts to change, and by the fourth / last item, the text is completely blue.
    Is it possible for a portion of text to be connected somehow to an object within the animation in a movieclip? If so, is it possible to go inside and edit this? -the shape, animation, and text?
    Is there an easier way to change the color of an item inside a movie clip? I can supply additional information if needed.. files etc.
    Am I doing something wrong / completely missing something?
    Thank you very much in advance for any help and/or advice!
    New Flasher,
    Lisa

    go one level deeper than the movieclip so you're editing the shape.

  • Change color in ALV top of page

    Hi all,
    Can anyone tell me how (if it is possible) to change color in ALV top-of-page?
    Thank you in advance,
    Hagit

    Hi,
    It is not possible to change the color in ALV top of page.
    Thanks,
    Sriram Ponna.

  • My macbook pro is freezing after my screen changes color

    My screen has been freezing a lot for some reason. I will be working on anything on the computer then all of a sudden the screen will become distorted and start to change colors then do a hard freeze. I have to hold down the power button and do a hard reset. Any suggestions on what this could be?
    Model Name:          MacBook Pro
    Model Identifier:          MacBookPro6,2
      Processor Name:          Intel Core i7
      Processor Speed:          2.66 GHz
      Number of Processors:          1
      Total Number of Cores:          2
      L2 Cache (per Core):          256 KB
      L3 Cache:          4 MB
      Memory:          4 GB
      Processor Interconnect Speed:          4.8 GT/s

    MacBook Pro (15-inch, Mid 2010): Intermittent black screen or loss of video

  • How to create a radio button that changes colors

    I'm using Acrobat X and ID CS5 on Mac OS X.
    A couple of years ago someone on the forums explained to me how to create a button that changes color with each click. You can view a sample PDF at https://dl.dropboxusercontent.com/u/52882455/colorcycle.pdf. They gave me the document JS and showed me how to set the properties of the button. I've integrated the button into a particular series of PDF forms and it's worked out very well.
    Now I would like to do the same thing, but using a circle instead of a square. Can anyone tell me the best way to do this? Can I somehow set a radio button to cycle through colors in the same way? I design my forms initially in ID CS5 and then activate and format the fields in Acrobat X. I've tried using circles instead of squares in my ID document, but when I export to an interactive PDF, they're converted to squares.
    Any ideas?

    I understand how to make buttons cycle through colors-- the problem I'm having is that I'm trying to figure out how to make a circular button cycle through colors. When I export my ID document to PDF, my round button maintains it's original appearance, but when I click on it to cycle through the colors, it behaves like a square (see new PDF at https://dl.dropboxusercontent.com/u/52882455/colorcycle2.pdf).
    If I use a radio button, I can get it to cycle through colors, but I don't want it to have a black dot in the middle. Is there a way to format the radio button to not show the black dot when clicked?

  • Manually change color of Exchange calendar in iCal?

    Good evening. Got kind of an odd problem...and not really sure when it became an issue, although I think it happened after I upgraded to Lion. But for whatever reason I cannot get to the 'Get Info' part of one of my calendars that is an Exchange calendar. I can right-click on all of my iCloud calendars and get to the get info section in order to change colors, sharing, etc, but when I click the get info option on my Exchange calendar, nothing happens.
    Not sure when this became the case, because I know I used to be able to change the color.
    Was wondering if maybe there was a preference file that I could manually edit in order to change the color, or if someone else has run into this and found a solution.
    Thanks a bunch.

    Hi guys,
    "googling" I found this applescript:
    tell application "iCal"
              set color of calendar "Calendar" to choose color default color {0, 0, 0}
    end tell
    Waiting for an Apple fix, you can use this. It's wok like a charm!

  • I need help highlighting an expiration date on my Numbers '09 spreadsheet. I want the text/fill of a cell to change color when the expiration date of an item is within 180 days of the current date.

    I need help highlighting cells on my Numbers '09 spreadsheet.  I want the cell text/fill to change color when the date is 180 days or less from the current date.  I already have a cell with the current date in it.  I also know how to change the fill/text colors.  All the cells have been formatted to show date only.  I am having trouble with the formula.  I can get to the Conditional Formatting menu and select "With Dates" but after that I am lost.  Can anyone help?
    Thank you for any assistance.
    B

    Set a Conditional Format rule as shown in the illustration below. The rule has been applied to all dates in column B of the table.
    Regards,
    Barry

Maybe you are looking for

  • Multiple Template in BIP

    Hi What is the use of multiple template in BIP Report. Can we print multiple template at a time. If no, then why they have given this facility of multiple template. Mash

  • 3rd Party Order Status Issue

    Hi Guys, In a 3rd party sales scenario, order status becomes complete even when it is partially invoiced. for example order qty is 4, PR created for 4 qty, PO created for 4 qty, MIRO is done for 2 qty, Customer Invoice is done for 2 qty. At this situ

  • External Service of 5Equipments, how to distribute the cost to indv equip?

    Hi Expert, if external vendor come to repair the 5boiler (equipments) and invoice us the total cost (labor, material, flight charge, allowance, hotel, taxi). how should i distribute the cost into EACH boiler? how should i create an order with 5boiler

  • Setting size in GridLayout

    Hi everybody, I have a main window with a main panel in it, and the window contains a JTextPane, added first, and then a JScrollPane, added second, in a GridLayout with one row. So, the JTextPane is on the left and the JScrollPane is on the right, an

  • Re: Need help wth notebook registration

    When I bought laptop on 13/3/2011 , I tried to register but it said validity of time period to register have finished .. Please contact customer service in your country So I did They asked me my name, email, and serial number Well afterwards they tol