You are not logged in.
I've been searching for a solution for this for quite a while but came to the conclusion that it would be best to ask on the forum.
I have the following in ~/.Xresources:
Xft.dpi: 84
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.autohint: false
Xft.hintstyle: hintfull
Xft.lcdfilter: lcddefaultXft.dpi is set to the DPI of my monitor. When starting tmux the settings are somehow overridden to the following:
Xcursor.size: 0
Xcursor.theme: Adwaita
Xcursor.theme_core: 1
Xft.antialias: 1
Xft.autohint: 0
Xft.dpi: 96
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.lcdfilter: lcddefault
Xft.rgba: rgbFirst it seems like xrdb is being run again and secondly it seems as if there must be file other than ~/.Xresources being sourced somewhere.
The most important setting is Xft.dpi as KDE applications DPI are being changed based on the overridden values. Does anyone know what could be causing this?
Last edited by bennylb0 (2014-06-14 10:49:12)
Offline
What's in your tmux.conf?
Offline
I have a pretty minimal ~/.tmux.conf with following:
set -s escape-time 0
# Change default prefix key as it is used in vim
unbind-key C-b
set-option -g prefix `
bind-key ` send-prefix
# Create vim like functionality
#setw -g mode-mouse on
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -RI should also mention that desktop sessions are configured to run xrdb using /etc/lightdm/Xsession and in ~/.xinitrc with:
[[ -f ~/.Xresources ]] && xrdb -merge ~/.XresourcesDoing so sets xrdb on login with lightdm to the correct values until I start tmux in XFCE terminal.
Last edited by bennylb0 (2014-05-30 02:34:30)
Offline
Alright I've exhausted everything I could think of including:
pstree
strace -e trace=process,file bash 2>&1 | tee strace-bash.log
strace -e trace=process,file tmux 2>&1 | tee strace-tmux.log
a vimdiff between the output of env before and after tmux was started
removed then reinstalled tmux
To no avail.
This is by no means a solution and hugely hacky but for the time being I've had to put
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresourcesat the end of my ~/.bashrc.
The locations of resource files that I could find in the documentation were ~/.Xresources and /etc/X11/Xresources and /etc/X11/Xresources doesn't exist on my system.
If anyone can shed some light as to where these incorrect resource values are being sourced or where xrdb is being started in the first place please let me know.
Offline
So installed GNU screen which doesn't have the same problem as tmux and managed to narrow down the problem to the fact that running
tmuxexecutes a shell based on the $SHELL environment variable, in my case
/bin/bashwhich is a non login shell but somehow when running tmux a login shell is being executed instead as in
/bin/bash --loginIn the case of screen this isn't a problem because screen calls /bin/bash as expected.
Executing /bin/bash --login is somewhere randomly calling xrdb -load /path/to/unidentified/resourcefile
To force tmux the same behaviour as screen I've added the following to ~/.tmux.conf
set-option -g default-command $SHELL An added bonus of this setting is that you no longer need to source ~/.bashrc from ~/.bash_profile like below for your ~/.bashrc to take effect every time tmux is started.
[[ -f ~/.bashrc ]] && . ~/.bashrcThis still isn't technically solved but it's a pretty good workaround. Mods do you want this marked as solved?
Offline
You can mark it as solved by editing your first post.
This strikes me as indicative of something else slightly off in the way that your shell is being initialised.
The default for tmux is to create a login shell, but that shouldn't create your original issue (I wouldn't have thought, anyway).
Offline
I had also suspected a file on shell initialisation but just can't find anything in a bash rc or profile, global or local that points to this. It'll turn up at some stage.
I'll mark this as solved.
Thanks
Offline
Finally found the problem. I thought it would be best to post the solution here in case anyone else has the same problem.
I have the infinality bundle installed. Infinality bundle installs infinality-settings.sh to /etc/profile.d which is sourced when a login shell is started.
infinality-settings.sh sets the following resources that override anything in the user defined ~/.Xresources when the login shell is started.
XFT_SETTINGS="
Xft.antialias: 1
Xft.autohint: 0
Xft.dpi: 96
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.lcdfilter: lcddefault
Xft.rgba: rgb
"
echo "$XFT_SETTINGS" | xrdb -merge > /dev/null 2>&1To fix this just comment out
#echo "$XFT_SETTINGS" | xrdb -merge > /dev/null 2>&1And that's it, done.
Offline
Nice catch.
I had forgotten all about that. I set my DPI in xorg.conf.d and had commented out the dpi line in infinality-settings some time ago.
Offline
Yeah thanks, it had me stumped. A good reminder that when all else fails use strace.
Cheers
Offline