LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 12-02-2011, 09:34 AM   #1
casperdaghost
Member
 
Registered: Aug 2009
Posts: 349

Rep: Reputation: 16
CYGWIN X xterm change background color


I use the CYGWIN X xterm from my windows machine.
I can log into my linux box from this terminal and open up tmux just fine.
However the terminal just shows up as white – I need something black and green.
Black background, green letters, or white letters.
I need to change the white background on the terminal to black
 
Old 12-02-2011, 09:40 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Most X applications allow you to set -bg (background color) and -fg (foreground/text) color along with many other options.

You can launch an xterm window:
xterm -bg black -fg green

If you type "man xterm" you'll see most of the common options in the manual page for xterm. If you type "man X" you can usually get a man page with general X options that are applicable to most X applications.
 
Old 12-02-2011, 09:48 AM   #3
casperdaghost
Member
 
Registered: Aug 2009
Posts: 349

Original Poster
Rep: Reputation: 16
So in windows, I open up the xterm from the program menu, under CYGWIN X. So I was thinking that there must be a config file somewhere, or a command that I could execute from the terms own command line to change the background color
 
Old 12-02-2011, 10:10 AM   #4
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
Did you try executing cygwin from the command line with a /? Or /help?
 
Old 12-02-2011, 10:20 AM   #5
casperdaghost
Member
 
Registered: Aug 2009
Posts: 349

Original Poster
Rep: Reputation: 16
what command line - the the CMD terminal on windows?
CYGWIN X starts from the start menu in WINDOWS.

I am using CYGWIN on my windows machine to connect to and run a terminal from my linux box.

I created a file and called it Xterm in the
C:\rhcygwin\home\waljoh folder but the xterm still some out white.

XTerm*Background: linen
XTerm*Foreground: black
XTerm*font: 9x15
XTerm*saveLines: 1000
XTerm*HiForeColor: white
XTerm*HiBackColor: #c06077
XTerm*geometry: +50+100
 
Old 12-02-2011, 10:36 AM   #6
casperdaghost
Member
 
Registered: Aug 2009
Posts: 349

Original Poster
Rep: Reputation: 16
I checked out this entry

http://www.linuxquestions.org/questi...-xterm-156290/


so I added thsi to the C:\rhcygwin\home\waljoh\.bashrc file and the xterm has changed color - but not to backgound black, letters white(or green would be ok)

export PS1="\e[0;31m[\u@\h \W]\$ \e[m "
 
Old 12-02-2011, 10:45 AM   #7
casperdaghost
Member
 
Registered: Aug 2009
Posts: 349

Original Poster
Rep: Reputation: 16
http://www.linuxquestions.org/questi...ut-of-x-42475/

this is not a permanent solution

tput setb 1 && clear

If that doesn't work then you could try something like:

echo "^[[0;34;43m" && clear
 
Old 12-02-2011, 11:09 AM   #8
casperdaghost
Member
 
Registered: Aug 2009
Posts: 349

Original Poster
Rep: Reputation: 16
Hey - if you echo $PS1 it give you something like this ---

\e[0;31m[\u@\h \W]$ \e[m

I think All I need to do is adjust this and I will be in hapy town terminal wise
anbody got a page or tutorial they can point me to ?
 
Old 12-02-2011, 12:57 PM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Moved: This thread is more suitable in <GENERAL> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 12-02-2011, 02:49 PM   #10
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Find the Icon you're using to start the Xterm.
Right click on it and select Properties.
Add the options -bg black and -fg green to the command line it runs.
e.g. for my Xwin on Windows XP my Xwin is tarted with:
Code:
C:\cygwin\bin\run.exe -p /usr/X11R6/bin startxwin -display 127.0.0.1:0.0
I modified that to be:
Code:
C:\cygwin\bin\run.exe -p /usr/X11R6/bin startxwin -display 127.0.0.1:0.0 -bg black -fg green
And on clicking on the icon it opened the window with black background and green text.
 
Old 12-02-2011, 07:33 PM   #11
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
create an .Xresources file in your Cygwin home directory, like this:

XTerm.VT100.font: -*-lucidatypewriter-medium-*-*-*-14-*-*-*-*-*-*-*
XTerm.VT100.boldFont: -*-lucidatypewriter-bold-*-*-*-14-*-*-*-*-*-*-*
XTerm.VT100.scrollBar: True
XTerm.VT100.visualBell: True
XTerm.VT100.loginShell: True
XTerm.VT100.background: Black
XTerm.VT100.foreground: White
http://www.zieg.com/faqs/cygwin/

Quote:
Okay, X is too much. I don't need the overhead. Can I just run an X-like terminal window, but not X itself?

It turns out that this too is possible :-)

If you've installed the rxvt package, you can run it from Windows without having a full X-server running, as long as you don't have a DISPLAY variable set in your environment.

Suggested procedure:

Create an ~/.Xresources file like this:

! rxvt.font: -*-lucidatypewriter-medium-*-*-*-14-*-*-*-*-*-*-*
! or...
rxvt.font: Lucida Console-14
rxvt.boldFont: Lucida Console-14
rxvt.scrollBar: True
rxvt.visualBell: True
rxvt.loginShell: True
rxvt.background: Black
rxvt.foreground: White
rxvt.saveLines: 3000
rxvt.cursorColor: Green
rxvt.scrollBar_right: True
http://www.zieg.com/faqs/cygwin/

Last edited by Cedrik; 12-02-2011 at 07:34 PM.
 
Old 01-12-2012, 06:57 PM   #12
casperdaghost
Member
 
Registered: Aug 2009
Posts: 349

Original Poster
Rep: Reputation: 16
How i solved this in CYGWIN;

I typed in showrgb | grep blue at the command prompt.
That gave me a bunch of blue colors.

Then I went cat > ~./Xdefaults

then i typed this into the cat -

XTerm*background: steelblue4
XTerm*foreground: grey88

and then restarted Cygwin - and viola - i have different color xterms.

you can experiment with the colors with showrgb --
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I change the background color of xterm permanently? vxc69 Linux - Software 9 01-22-2018 01:30 PM
How to change background and fonts color in xterm? macondo Debian 17 04-30-2016 04:46 AM
Change font color xterm aeruzcar Linux - Software 3 01-04-2012 04:48 PM
xterm background color ekdya Fedora 6 09-30-2006 06:48 AM
Change background in solaris and Xterm background also EvilAngel Solaris / OpenSolaris 2 01-31-2005 11:25 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 08:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration