You are not logged in.
Recently I've been setting up my environment on a new machine, and in setting up tmux I noticed some weird behavior on the startup of a tmux session or whenever I open a new pane in tmux.
Whenever I enter tmux from the command line by running "tmux" or open a new pane, the following message (coloured yellow, which makes me think this is a warning) appears at the top of the terminal:
May not start compositor:
A compositor and/or graphical-session* targets are already activeIt only appears when I run tmux from a terminal started inside a Hyprland environment that was started using uwsm:
(my .profile)
# Start the graphical session
if uwsm check may-start && uwsm select; then
exec uwsm start default
fiWhen I run tmux from a plain tty, or from a Hyprland session that wasn't started with uwsm the message doesn't appear. Furthermore, trying to run tmux with "uwsm app -- tmux" doesn't fix anything, nor does making tmux an autostarted user service as per the "Autostart with systemd" section of the archwiki tmux article. (though when I make it a system service it throws a completely different, seemingly irrelevant error)
It doesn't seem to be an issue, but I'm not entirely sure its not breaking anything, plus it is really annoying.
My tmux.conf:
## Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
## General config
set -sg escape-time 10
set-option -sa terminal-overrides ",xterm*:Tc"
set -g mouse on
# window numbering starts at 1
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
#copy mode follows vi convention for keys
set -g mode-keys vi
set -g set-clipboard on
## binds
# shit alt h or l to cycle trough windos
bind -n M-H previous-window
bind -n M-L next-window
#clear console
bind C-l send-keys 'C-l'
#split window
unbind '"'
unbind %
bind - split-window -v -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
#reload source file
bind r source-file ~/.config/tmux/tmux.conf
# Set prefix
set-option -g prefix C-a
# Make sure this is at the bottom
run '~/.tmux/plugins/tpm/tpm'I've tried disabling tpm and every other plugin but none of that made the message go away.
(the mostly relavant parts of) my hyprland.conf:
# See https://wiki.hyprland.org/Configuring/Monitors/
# 1.566667 is the nearest divisor
monitor=eDP-1, 2256x1504@60.00, 0x0, 1.566667
monitor=HDMI-A-1, 1920x1080@60, 0x-1080, 1
# Fallback rule
monitor=,preferred, auto, 1
# Execute your favorite apps at launch
exec-once = uwsm app -- hyprpaper
exec-once = uwsm app -- wl-paste --type text --watch cliphist store # Stores only text data
exec-once = uwsm app -- wl-paste --type image --watch cliphist store # Stores only image data
...
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, uwsm app -- kitty
bind = $mainMod, C, killactive,
bind = $mainMod, M, exec, uwsm stop
bind = $mainMod, E, exec, uwsm app -- dolphin
bind = $mainMod, W, exec, togglefloat
# Enables us to see and pick from out clipboard
bind = $mainMod, V, exec, uwsm app -- cliphist list | rofi -dmenu | cliphist decode | wl-copy
bind = $mainMod, R, exec, uwsm app -- rofi -show drun
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = , PRINT, exec, uwsm app -- hyprshot -m output
bind = ALT, PRINT, exec, uwsm app -- hyprshot -m window
bind = $mainMod, PRINT, exec, uwsm app -- hyprshot -m region
...Thank you in advance for the help.
Last edited by Elizabeth (2025-04-20 08:45:43)
Offline
I suppose that message comes from "uwsm check may-start" and happens because the new pane runs a new shell?
Don't you get that when simply running a nested
$SHELL?
The questions are
- does tmux spawn a login shell and why?
- if not, why does a non login-shell source ~/.profile
qnd workaround is likely to just redirect that information into /dev/nirvana
if uwsm check may-start > /dev/null 2>&1 && uwsm select; then
exec uwsm start default
fiOffline
I suppose that message comes from "uwsm check may-start" and happens because the new pane runs a new shell?
Don't you get that when simply running a nested$SHELL?
The questions are
- does tmux spawn a login shell and why?
- if not, why does a non login-shell source ~/.profileqnd workaround is likely to just redirect that information into /dev/nirvana
if uwsm check may-start > /dev/null 2>&1 && uwsm select; then exec uwsm start default fi
Turns out tmux was starting a login shell, changed it per the respective archwiki section in the tmux article and the message has disappeared. Thank you for the help!
Offline