LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   CYGWIN X xterm change background color (https://www.linuxquestions.org/questions/general-10/cygwin-x-xterm-change-background-color-916777/)

casperdaghost 12-02-2011 09:34 AM

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

MensaWater 12-02-2011 09:40 AM

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.

casperdaghost 12-02-2011 09:48 AM

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

john test 12-02-2011 10:10 AM

Did you try executing cygwin from the command line with a /? Or /help?

casperdaghost 12-02-2011 10:20 AM

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

casperdaghost 12-02-2011 10:36 AM

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 "

casperdaghost 12-02-2011 10:45 AM

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

casperdaghost 12-02-2011 11:09 AM

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 ?

Tinkster 12-02-2011 12:57 PM

Moved: This thread is more suitable in <GENERAL> and has been moved accordingly to help your thread/question get the exposure it deserves.

MensaWater 12-02-2011 02:49 PM

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.

Cedrik 12-02-2011 07:33 PM

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/

casperdaghost 01-12-2012 06:57 PM

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 --


All times are GMT -5. The time now is 07:21 AM.