LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-07-2011, 02:04 AM   #1
quasistar
LQ Newbie
 
Registered: Mar 2011
Distribution: Slackware 13.1
Posts: 1

Rep: Reputation: 0
temporary background color


Hello,

First let me start off by saying I'm not sure if this is Slackware specific as Slackware is all I've ever used, if it's not then I do apologize.

What I'm wanting to do is pretty simple when thought about, but doing it is turning out to be a much bigger monster. I've been working with this for a couple days, and I partly blame that on the search engines trying to decide what I want instead of just giving me results on what I type lol.

First some details;

- I have recompiled nano with the 256 color support using the rcnano.c submitted here: http://savannah.gnu.org/patch/?6873 (no issues here, the colors are beautiful!)
- I am using xterm-256color|putty-256color as my $TERM.
- I have made a bunch of nanorc files that I can quickly switch between by using a shell script I wrote. (Sometimes I feel like darkness, sometimes you might want something a bit lighter)

Everything is perfect so far. Except, one problem. nano's background color is based on the terminal's background color which means most lines in the file that I'm editing will have the proper colors until the line terminates, then the rest of the screen for that line is black. Ugly to say the least.

What I'd like to do is temporarily change the background color to match whichever nanorc I'm using. Some of the things I've tried are as follows:

echo "\e[##;##;##m" && nano (file) -- didn't work, black background (of course, replace the #s with numbers - also attempted instead of echoing, exporting it to PS1)

xterm -bg blue -- I dont use x so it complains about no display (export DISPLAY="0:0" didn't fix it, locally or via putty)

setterm -background blue > /dev/(tty0|pts/0) - depending on where I was, of course. This did give me the blue background, but it fails once I start up nano, or even do an ls. I also haven't attemtped doing && nano (filename) on this because of the color limitations using setterm (ie: only get the ansi colors to choose from).

xrdb -load (file) didn't work because of no DISPLAY (even exporting DISPLAY="0:0" failed)

The only other option that I've seen is software called XtermControl, but two things make me uncomfortable with it. It hasn't been updated in quite some time (late 2009), and the fact that it's not already in Slackware. I was kind of hoping to keep this "in house" I guess you could say, so before attempting to use that software I figured I'd ask around and see what I could find out.

Thanks in advance!
 
  


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
VI Background Text Color mahugl Linux - Newbie 3 12-15-2013 10:12 PM
Screen App, Retain BG Color, Background color gets lost duerra Linux - Software 1 07-08-2009 03:01 PM
TTY background color! hitesh_linux Linux - General 1 09-17-2004 06:22 AM
ncurses background color gtanghookup Programming 1 09-02-2003 08:17 PM
Is there a way to change background color out of X? purpleburple Linux - General 1 01-23-2003 08:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:00 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