Fedora :: Color Prompts Screws Bash?

Aug 7, 2010

I got a good one!I colorized my prompt as follow; Green for normal user, Red for root:

Root .bashrc:
PS1=e[0;31m[ ][u@h:w][!]\$ e[m"
User .bashrc:
PS1="e[0;37m[ ][u@h:w][!]\$ e[m"
Which gives:

[Code]...

View 7 Replies


ADVERTISEMENT

Ubuntu :: Bash: User Prompts And Directory Changing?

Mar 2, 2011

Basically I'm trying to create a bash script that'll ask for a folder name and then change into that folder.

Code:
Not real code but bare with me!

echo "Enter the desired folder and press [ENTER]
read $folder
cd $folder
pwd
/home/<user name>/<whatever the user entered>
Is this possible with bash or am I chasing a pipe dream?

View 1 Replies View Related

Red Hat / Fedora :: Change Input/Output Color In Bash?

Jun 5, 2009

When in the interactive envirment, my Input and Output are all mess-up. So i want to color the Input and Output with two different colors.. so i can figure them out..

View 1 Replies View Related

Red Hat :: Changing Bash Color Prompt?

Mar 24, 2010

I was attempting to change the bash shell color prompt on my RHEL / CentOS 5 server. When I login as my user account on my server I can see my 'PS1':

Code:
[carlos@srv1 ~]$ echo $PS1
[u@h W]$

I want to change my PS1 to:

PS1='[e[1;32m][u@h W]$[e[0m] '

When I look in ~/.bashrc, I don't see my 'PS1' line so I am confused and wondering how I do this on RHEL / CentOS systems.

View 2 Replies View Related

Ubuntu :: Bash Color In A Script Not Working?

Mar 6, 2011

This works (meaning it changes color) from CLI...echo -e 'e[1;36m' testCyanBut if I put that same exact line in a script, the result is not colored, and it displays the actual command on screen like this...-e 'e[1;36m' testCyanThe script is obviously executing. Why isn't it interpreting the backslash command in the script?

View 2 Replies View Related

Ubuntu :: Bash File Color Decoding?

Apr 15, 2011

Is there a place in my 10.04 OS that tells me the meaning of the colors of files? I have a folder that I moved to my home directory when i upgraded from 9.10 to 10.04. In that folder was a .tar.gz file that was green - I then deleted that file and ran another compression command - same files, same everything, but when I ran it this time, it is now red. Any ideas. I'd like to know what the color indication is on any given file.

View 2 Replies View Related

Programming :: Get Pixel Color From Screen In Bash Script?

Nov 25, 2010

I would like to get the pixel color from screen at (320,240) and if the color = 0xFFFFFFFF , i would like to execute a command.

View 3 Replies View Related

Programming :: Changing Color Of Output From Bash Script?

Apr 22, 2010

I am writing a bash script that utilizes the output of another script (which I will refer to as script#2.) Script#2 is not owned by me, I cannot modify it. All of the output from script#2 is blue, which makes it difficult for me to read.

I would like to have the output of it changed to grey. Is there a way I can do that in my script? A command I can pipe the output to?

Edit: One other question related to this. I put a trap function in my script that works well. Script#2 essentially runs a tail -f. When I ctrl+c to stop it, it stops script#2 and never calls the trap in my script. Is there any way I can work around that?

View 3 Replies View Related

Programming :: Easier Way To Color Text In Perl Like BASH?

Apr 8, 2010

I've been trying to figure out a way to more easily color text in Perl like I do on Bash on a Linux box. In bash, what I'll do is set color variables up to equal the escape sequence, then echo out with escape seqeunces to print it exactly how I want it. Typically I'll want a character or a word in a different color, not the whole line. For example

echo -n -e "My face is turning ${RED}red${UNCOLOR} like a lobster." In Perl with the term::ANSIColor module, it seems to just do a line. Am I being dense? Is there a way that I can do it like I do it in BASH that's fairly easy to read after the fact?

View 11 Replies View Related

Debian Configuration :: Change Prompt Color In Bash Shell?

Jan 13, 2010

I am getting more and more comfortable working with the shell, thus I would like to change its prompt color to my liking, as it will be easier for me to distinguish commands vs. outputs.

I've read a couple of instructions of how to change the .bashrc file and am familiar with what the codes in PS1 mean. Except, this file can be intimidating to newbie eyes.

Where exactly on the file is it that I need to make the change?

Here is what I am trying to do. I would like my prompt to like exactly like the prompt I use in Backtrack - which consist in two different colors, one for the host and another for the pwd. Here is what the Backtrack .bashrc file looks like:

# /etc/profile: This file contains system-wide defaults used by
# all Bourne (and related) shells.
# Set the values for some environment variables:
export MINICOM="-c on"
export MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man:/usr/local/share/man:/usr/bin/man:/usr/share/man
export HOSTNAME="`cat /etc/HOSTNAME`"

[Code]....

I also read that in order to have the same results when I log in as root, I will have to copy the modified .bashrc file into /root

View 8 Replies View Related

Programming :: Bash : Searching For Info And Changing The Color Of Keywords In The Results?

May 5, 2011

(bare with me as I am sort of new with scripting) I am trying to figure out how to run a script that does a basic chkconfig and to get only those services that are running, but changing the color of "on" to red in my output file. Here is what I am working with so far:

Quote:

#/bin/bash
RED=$(tput setaf 1)
BLK=$(tput setaf 0)

[code]....

*I had to substitute a "-" and <colon_symbol> for ":" in front of the on's, because the forum thought they were smiley faces (i.e. n) how to make the "on" to be red while the rest of everything remains in black text. I have been trying to read up on sed and awk, but it is still pretty much a mystery to me right now. There will be other things in the output file that I wouldn't want a rogue "on" to be in red, so just the instances of "on" in that one chkconfig return.

View 4 Replies View Related

Red Hat / Fedora :: SFTP - Using RSA Key Authentication - Still Prompts For Password

Dec 5, 2010

Server A: Generated RSA Key
Server B: Added the RSA Key to authorized_keys list
SFTP from A to B.
Still prompts for password.

I will be sftp-ing both from Server B to Server A and 'A to B'. Sever B to Server A works fine. No prompting for password. But from A-B it this is what is happening sftp -v log...

debug1: Offering public key: ~InfAdmin-.ssh-id_rsa
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Trying private key: ~InfAdmin-.ssh-id_dsa
debug1: Next authentication method: password
InfAdminATServerB's password:

Why is this trying id_dsa private key? From Server B to Server A when I do the same, it does not say 'Trying Private Key -id_dsa' This is what it says

debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).

How do I enforce that Server A does the same? Why is it trying the dsa private key when I have used RSA.

View 4 Replies View Related

Fedora :: Disable Password Prompts Every 5 Mins From Screen Saver?

Apr 10, 2011

I just installed fedora 13 in virtualbox. (running intel dual core with 4 gi ram chips installed under windows xp)

I want to disable the annoying password prompts on my fedora 13 every 5 minutes ?

Tried right click desktop and nothing

Tried export TMOUT=3600 on a xterm account, not sure if it is working or not.

View 7 Replies View Related

Ubuntu :: Updates Screws Up Grub?

Jun 5, 2010

Both my netbook and this machine needs an update (according to the update manager) Well 2 days ago, I let it update the netbook. Bad mistake. Long story short; it installed a new kernel, and monkeyed with GRUB (v1.5) and it wouldn't boot. It's that new grub thing, with the long cryptic numbers/letters string, instead of the more normal hd0, hd1 thing. I had no clue on how to restore it.

How can I back up GRUB next time, let it update, then restore grub back the way it's suppose to work? I tried backing up the menu.lst file, but that didn't work. I backed up, and restored it, and the netbook still wouldn't boot. Got the very same error message. I had to do a partimage to bring back the old image of it. Also Grub-install will not work at all, from systemrescueCD.

Is there some sort of up-to-date tutorial on Grub? I've had more problems with Grub than anything dealing with linux. Especially since anything happens to it, your virtually screwed.

View 1 Replies View Related

Ubuntu :: Vnc Client Screws Up Keyboard?

Jul 20, 2011

Since network file systems seem either broken or slow, I'm trying to get VNC working.Basically it does work. But the clients I've found so far are very clunky about moving around the screen of the server system, there doesn't seem to be a clean way of exiting the client, and now the keyboard on the system which I ran the client on is completely screwed up.I need something sane here.First, how do I get my keyboard working correctly again?Second, is there a VNC client that's actually any good?

View 2 Replies View Related

General :: Using Root Via SSH Screws FTP User Privs?

Mar 20, 2011

Whenever I create, move or copy into the httpdocs (host envio based on plesk installation)My FTP user privileges go wacky. For instance I could not delete, rename or upload anything to the directory I created as root in ssh.

View 1 Replies View Related

Ubuntu :: 10.04 - Update Consistently Screws Up Programs

May 16, 2010

Every time 10.04 updates I find that two of my programs - boinc and CUPS - get de-configured and must be either reconfigured, or re-installed to make them work. While the fix itself is easy, it is an inconvenience to have to do this after every weekly update. Why this is happening, what I can do to prevent it from occurring in the future (aside from not updating).

View 1 Replies View Related

Ubuntu :: Kernel Upgrade Screws Graphics

Jul 8, 2010

Thats it in a nutshell. and I don't mean the boot splash graphics, I mean desktop graphics! As in upon boot ubuntu goes in "low-graphics" mode. I have had this issue all the time with Lucid and never really found a good fix. With Karmic this was never an issue.As a final fix I tried to reinstall lucid and updated the live CD doing that too. First it worked fine, but after kernel update I downloaded yesterday (with update manager) I have had this "low graphics" issue again.

With Graphics card, I have nVidia GeForce 220 GT. The drivers are up to date, active, and in use. (according to the "hardware drivers" tool.

View 4 Replies View Related

General :: Desktop Environment Color Settings / Do They Affect Web Browser Color?

Jun 14, 2011

Kernel 2.6.21.5, Slackware 12.0
KDE 3.5.7
(Mozilla) Firefox 2.0.0.4

Do color settings in the desktop environment affect color in the web browser? Thanks.

View 2 Replies View Related

Ubuntu :: Can GNOME Color Be Used To Alter Ambiance Theme Color?

Jan 12, 2011

Can GNOME Color be used to alter this change directory color in Ambiance theme? I'd rather have white.

View 4 Replies View Related

Software :: Screen App / Retain BG / Color Background Color Gets Lost

Jul 6, 2009

I am using the screen app, and have set bce to on, and issued the following commands to set my background and foreground color: tput setab 4; clear; tput setaf 7; clear;

This temporarily sets everything properly on my screen. However, when I issue any commands that change or set their own background color (for example, when I issue an "ls" command with colorized output), the background color gets lost for any new output and I have to reissue the commands listed above in order to retrieve my background color.Ideally I'd like to keep my background color when issuing these commands, as it serves as a good way to remind me of what environment I am currently issuing commands in.

View 1 Replies View Related

OpenSUSE :: Exiting Adobe Flash's Fullscreen Screws Up Display?

Apr 25, 2011

since some update to the latest Flash, I've been getting a weird issue. If I'm watching a flash video in fullscreen (via firefox) and hit "esc" to leave full screen, about 20-40% of the time it will screw up the monitor's display of everything. The entire screen gets weird white and colored pixels randomply all over the screen (see the attached picture). Restarting is the only thing that fixes this. I tried logging out and back in but the issue remains. I have two questions:

1. How do I fix this without a restart?
2. What could be causing this?

View 9 Replies View Related

OpenSUSE Hardware :: Yesrterday's Kernel Upgrade Screws Up Graphics?

Mar 23, 2010

I'm used to kernel updates screwing up both my graphics drivers and my instaltion of parallels. These things break each and every time the kernel is updated. Normally, reinstalling makes the problem go away and I move on. Yesterday, Parallels got screwed and I fixed it by reinstalling but the graphic driver is yet to work.

For reference I am using OpenSUSE 11.2 64-Bit Gnome-Edition with an ATI Radeon 4650, since it probably makes a difference. For some reason the driver from the repo (ATI's repo) would not install and I got errors saying that it has a wrong signature and (ignoring that) I got another error saying it was corrupted. So I could not install as usual.

Instead I went at ATI's site and downloaded the latest driver. It installed but I lost the mouse cursor so I reinstalled the previous version which also installed but it not working properly, although I do have a mouse cursor.

glxinfo gives the following error:
X Error of failed request: BadRequest (invalid request code or no such operation)
Major opcode of failed request: 136 (GLX)
Minor opcode of failed request: 19 (X_GLXQueryServerString)
Serial number of failed request: 24
Current serial number in output stream: 24

fglrxinfo outputs the exact same thing. OpenGL is not working in any way. Even the gears demo and desktop effects (which I tried to reactivate just to test, since I hate those things) simply do not work.

View 7 Replies View Related

Ubuntu Multimedia :: Cheese Screws Up Longer Video Recordings?

Aug 11, 2011

Can't seem to figure out how to make usable recordings with my webcam in cheese. when making very short video's like a few seconds...the longest so far was 11 seconds, it will behave just fine and it outputs a playable file with thumbnail and all. But when I try anything longer something seems to go wrong. I can tell first because cheese refuses to display a thumbnail for the resulting video. But also I cannot play it n any player I have (Yes I have pretty much all the codecs) Also when saved as a seperate file Gnome will choke when I try to get it to display properties for it.

I haven't found any errors like this when googling for cheese. Oh my OS is 10.04 and I have the 2.30-something Cheese that's packed for this version (can't get any of the newer cheeses to compile on it so far)

View 1 Replies View Related

Programming :: Favorite 256-color Vim Color Scheme

Feb 25, 2011

What is your favorite 256-color color scheme for vim?

View 6 Replies View Related

General :: Su Prompts For A Password When No Such Is Set?

Nov 11, 2010

Story: i use Fedora9 and i want to set up a FTP server whithout creating a home dir for each and every user, i want them to share 1 home dir. All users are in one group.Problem: i write the following:

Code:
root# useradd -d /home/ftp_home -g ftp_users -M user1
root# useradd -d /home/ftp_home -g ftp_users -M user2

[code]...

View 1 Replies View Related

Ubuntu :: Evolution Prompts For Password?

Feb 6, 2010

I am running Ubuntu 9.10. When I open Evolution, it prompts me for a password to the default keyring. I am not sure what this is, but I would like to not have to do this. I looked around in Evolution and did not see a way to have this password entered automatically. I searched this forum and it found no results. So I don't know if my problem is unique or not.

View 3 Replies View Related

Ubuntu :: Intramfs Prompts After Shuffling HDD's?

Feb 17, 2010

Wonder if someone out there can help me.

First, a small back-story. I upgraded my Mythbox to 9.10 last year, and as a backup path, I left the original HDD (sda) intact, and chucked a spare drive (sdc) in for the install. I just changed the boot order in the BIOS to boot from the spare drive, and all my data (/var/lib/mythtv/) is on a separate drive (sdb). The original drive is redundant, I just didn't get round to pulling it.

Now, I got a new 1TB drive today, transferred all my data onto it and swapped it for the old data drive, and at the same time pulled the unused old install drive. So I just have the new 9.10 (spare) install drive, and the new drive.

I changed my fstab with the correct UUID's of the drives, but at boot, I get 'gave up waiting for root filesystem on sdc1' and the intramfs prompt. Listing the drives by UUID, I have sda(1&2) and sdb(1&2).

I can get the system bootable again by putting the unused old install drive back, so that I have an sdc, but this is far from ideal, as I have a drive spinning away nearly 24/7 that is not needed.

Now, I thought that using UUID's got away from the whole sda/sdb/hda ... business, but it seems that the kernel is still looking for sdc1 to boot off.

FWIW, my fstab: The old and new data drives, and the boot drive are there, the redundant drive doesn't have an entry.
Code:
mythbox@mythbox-desktop:/$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
code....

So I guess I need to point grub to the correct location. Now I know I'm not supposed to edit grub.cfg, but I can't see how I can successfully boot the system in a state where running update-grub will pull the correct drive in. My thinking is that what I need to do is edit the

Code:
linux/boot/vmlinuz-2.6.31-14-generic root=/dev/sdc1 ro quiet splash hpet=disable
line to read
Code:
linux/boot/vmlinuz-2.6.31-14-generic root=UUID=4a5599f5-d409-42b5-a74f-0c689f15d73d ro quiet splash hpet=disable
Shutdown, pull the redundant drive, boot (hopefully anyway), then run update-grub.

View 9 Replies View Related

Ubuntu :: Using 'expect' And Scp - Hiding Prompts?

Mar 25, 2010

I'm using a small "expect" script to automate password entry for some file copying.The automation works fine, but the "Password: " prompt still displays on the screen. How do I hide the prompts so the user doesn't see "Password: " on the console?Here's the relevant section of my script:

Code:
expect -c "spawn /usr/bin/scp -q $2 user@$1:$2
set timeout 60

[code]....

View 9 Replies View Related

Ubuntu :: How To Disable Password Prompts?

Jul 28, 2010

I know, I know, its a security feature. That doesn't make it any less annoying. I find the constant asking for my password to be every bit as irritating as Windows's UAC. When I want to use the terminal, or when I want to download something, I don't want to have to enter my password every time. I don't care that someone could theoretically do something to my computer in some way. I managed to stay out of harms way in windows with UAC off, I'm sure I can do it in ubuntu without the constant nagging of the password prompts. Its annoying and I am tired of dealing with it. Anyone know how to turn it off? I am really not looking for reasons to leave it on. Its the same with UAC: Yeah, it can keep you out of trouble. No, I don't want it on.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved