You are not logged in.
Hello. I've searched about and googled for this problem for a while, but to no avail. The problem is this:
When in an X session, in the Awesome WM, when I fire up a terminal emulator (so far I tried lxterminal, xterm, urxvt and lilyterm), the console (from before the X session) appears with the X startup messages and it's stuck that way. I'm still in the WM however and the mouse shows. I just can't see anything past that console screen. I can't see any error messages thereon either.
When not in Awesome (and X), tmux starts up fine, and also when in Awesome and I run
sudo tmux
in the terminal emulators.
I first encountered this some time ago, using just lilyterm, but then I tried running tmux in lxterminal instead and it worked fine. Now this always happens, no matter the terminal. Right before this incident, I was doing some experiments with running a detached tmux session on login. I tried executing in .bash_profile, .bashrc, .xinitrc and .config/awesome/rc.lua. Since this started happening at some point, I'm not sure when, I tried some different files. Now I have removed what I put in them but this behavior keeps occurring. I've tried to make sure the $TERM variable is set right inside and outside tmux for some of them and
set -g default-terminal "screen/screen-color256"
in the .tmux.conf.
I sync my config files between my laptop and desktop so they have the same behavior, except on the desktop the console screen flashes momentarily and then all GUI programs have disappeared from the screen, leaving just bare Awesome. I can then start some more GUI programs again. If I try to start tmux again in another terminal emulator. I get the "nested tmux sessions" message.
I don't know if it matters, but using screen instead works as intended. Anyway, any help is appreciated. My tmux.conf is really just
set -g default-terminal "screen"
at the moment.
Last edited by m73 (2013-07-22 12:06:03)
Offline
Tried the same in Openbox instead of Awesome and I get the same behavior. I also made a tmux session before starting X and attached it in the terminal emulator afterwards. That worked, but when I try to make a new window in that session with Ctrl-b C, the same thing happens. So this happens if I try to make new sessions or windows as the current user in an X session. Listing and killing sessions works as intended.
Offline
I've narrowed down to the cause, finally. At the end of my .bash_profile I had
exec startx
to start my X session. I removed it and did startx manually at login and then tmux worked fine. Maybe this is the wrong way to start X automatically at login?
Anyway, marking this solved. But it'd be nice to know why startx in .bash_profile would cause this.
Offline
I'm late but look at the first two entries under the Tips & Tricks section of the wiki entry about Tmux: https://wiki.archlinux.org/index.php/Tm … and_tricks
Offline
You should always check whether X should be started or not
See https://wiki.archlinux.org/index.php/Start_X_at_Login
Offline
Thanks. Will look into that.
Offline
Just to follow up on this. I did what mychris pointed out and that works. The reason is tmux executes .bash_profile when started, so I was basically starting a new X session when starting tmux. That mustn't be the case for screen. Good to keep that in mind!
Offline