LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-05-2013, 11:24 PM   #1
Jean-Luc Besson
LQ Newbie
 
Registered: Jun 2009
Distribution: Ubuntu, Arch
Posts: 17

Rep: Reputation: 1
Unhappy Start tmux on Login - with 256 colors


Hi There,

I'm currently running Ubuntu 12.04 and had that idea starting tmux on every shell login...with 256 colors.

Unfortunately,...while browsing different forums, blogs, stackoverflow...I got completely lost. Depending on where I put the following commands in my .bashrc I can either have the 256 colors OR tmux on login.

Quote:
### .bashrc
# COLORSCHEME 256
#====================
export TERM=screen-256color

# START TMUX ON STARTUP
#====================
[[ $TERM != screen* ]] && exec tmux
However,...I would love to have both options combined.

That's my .tmux.conf:

Quote:
set-option -g default-command $SHELL

### BINDKEY - MAKE TMUX USE C-a, SIMILAR TO SCREEN
#====================

# unbind C-b
# unbind l
# set -g prefix C-a
# bind-key C-a last-window

# RELOAD KEY
#====================
# bind r source-file ~/.tmux.conf

### HISTROY LIMIT
#====================
set -g history-limit 10000

# THEME
#====================

# default statusbar colors
set-option -g status-bg colour0 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default

# default window title colors
set-window-option -g window-status-fg colour244 #base0
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim

# active window title colors
set-window-option -g window-status-current-fg colour166 #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright

# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01

# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange

# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange

# clock
set-window-option -g clock-mode-colour colour64 #green


# SET CORRECT TERM
#====================
set -g default-terminal screen-256color
My .screenrc:

Quote:
term screen-256color
I'd really appeciate if anyone could help me out, my head is spinning and the Advanced Bash-Scripting Guide of tldp.org I simply cannot digest right now.
Anyone?

Thanks in advance.
Jean-Luc
 
Old 02-05-2013, 11:54 PM   #2
Jean-Luc Besson
LQ Newbie
 
Registered: Jun 2009
Distribution: Ubuntu, Arch
Posts: 17

Original Poster
Rep: Reputation: 1
OK,...solved.

I got rid of the export TERM=screen-256color in .bashrc and added the "-2" argument to tmux. It now works like a charm.


Quote:
# START TMUX ON STARTUP
#====================
[[ $- != *i* ]] && return
[[ $TERM != screen* ]] && exec tmux -2
 
  


Reply

Tags
bashrc, colors, tmux


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
must be configured to display at least 256 colors arun_sam Linux - Newbie 1 07-19-2012 05:34 AM
How to configure Xterm colors if my xterm can support 256 colors n179911 Linux - Software 4 07-06-2009 02:28 AM
Distored video when I changed from 256 to thousands of colors comanche Fedora 1 01-27-2005 07:13 AM
Only 256 colors on Slackware 9.1 Quartzophobia Linux - Laptop and Netbook 1 01-27-2004 04:26 PM
New display won't work above 256 colors wghoward Linux - Software 3 08-05-2003 08:21 PM


All times are GMT -5. The time now is 07:48 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration