Let's fix it!
Note: I'm using Ubuntu Linux, if you're using another distro / OS, it may or may not work.
Does your terminal support 256 colors?
- Get the
256colors2.pl
script: http://scie.nti.st/dist/256colors2.pl.
- Open a terminal and run it
./256colors2.pl
- If it shows something like the following, you should be good (this is gnome-terminal):
Force tmux to 256 colors
Tell Emacs to use 256 colors
- In the previousely setup tmux session, run Emacs in CLI mode:
emacs -nw
- Then
M-x list-color-display
- I'm getting:
- We need to make Emacs aware of the 256 colors support
- Exit Emacs
- In the terminal:
export TERM=screen-256color
- Run Emacs again, and
M-x list-color-display
- You're good if you get something like:
I want a really black background!
Let's fix it!
Note: I'm using Ubuntu Linux, if you're using another distro / OS, it may or may not work.
Does your terminal support 256 colors?
- Get the
256colors2.pl
script: http://scie.nti.st/dist/256colors2.pl. - Open a terminal and run it
./256colors2.pl
- If it shows something like the following, you should be good (this is gnome-terminal):
Force tmux to 256 colors
Tell Emacs to use 256 colors
- In the previousely setup tmux session, run Emacs in CLI mode:
emacs -nw
- Then
M-x list-color-display
- I'm getting:
- We need to make Emacs aware of the 256 colors support
- Exit Emacs
- In the terminal:
export TERM=screen-256color
- Run Emacs again, and
M-x list-color-display
- You're good if you get something like:
Hi, really nice post.
RépondreSupprimerI got some minor difference though.
The "color-16" was ok in no-window mode (emacsclient -nw) but preventing the "emacsclient -c" (emacs in client window mode) to launch.
I reverted back to "black" (which do not have the grey-ish tone) like you. And now every client is ok.
I even almost do not distinguish my client anymore (nw or not).
Again, thanks.
Hi Unknown,
SupprimerI tried to setup a function running when in term mode but without success.
So I added to my emacs config the following:
(defun quirk-black-background ()
(interactive)
(set-face-background 'default "color-16"))
Not ideal, but I can then invoke the "quirk" when needed
I'm interested if you find a solution that works with emacs X-window + emacs terminal + emacs server + emacs client.
BTW: I tried this: https://gist.github.com/3965108
SupprimerWithout success in the following case:
* emacs started with: `emacs --daemon`
* then: emacsclient -nw
OR
* emacs started with: `emacs` and then `M-x server-mode`
* then: emacsclient -nw
In either case the emacsclient flash briefly (and I can see the greyish background for a 1/10 sec), but nothing more happen