How to start tmux upon running terminal?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm using xfce, and want to create a shortcut Super + t
for starting up terminal with tmux. What command should I put it to execute upon shortcut? I tried st tmux attach
, however it fails when there isn't any tmux session running(instead, the terminal appears for a fraction of a second and doesn't even let me see what the problem is).
Normal st tmux
causes, which is .
For some time, I used the following in my .bashrc:
# get into tmux at start
[ -z "$TMUX" ] && tmux attach
But I removed it, as it was inconvienent when I wanted to run the terminal without tmux. And to add to that, I couldn't use bash at all when my partition was full. Couldn't even login!
shell terminal tmux terminal-emulator
New contributor
add a comment |Â
up vote
0
down vote
favorite
I'm using xfce, and want to create a shortcut Super + t
for starting up terminal with tmux. What command should I put it to execute upon shortcut? I tried st tmux attach
, however it fails when there isn't any tmux session running(instead, the terminal appears for a fraction of a second and doesn't even let me see what the problem is).
Normal st tmux
causes, which is .
For some time, I used the following in my .bashrc:
# get into tmux at start
[ -z "$TMUX" ] && tmux attach
But I removed it, as it was inconvienent when I wanted to run the terminal without tmux. And to add to that, I couldn't use bash at all when my partition was full. Couldn't even login!
shell terminal tmux terminal-emulator
New contributor
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm using xfce, and want to create a shortcut Super + t
for starting up terminal with tmux. What command should I put it to execute upon shortcut? I tried st tmux attach
, however it fails when there isn't any tmux session running(instead, the terminal appears for a fraction of a second and doesn't even let me see what the problem is).
Normal st tmux
causes, which is .
For some time, I used the following in my .bashrc:
# get into tmux at start
[ -z "$TMUX" ] && tmux attach
But I removed it, as it was inconvienent when I wanted to run the terminal without tmux. And to add to that, I couldn't use bash at all when my partition was full. Couldn't even login!
shell terminal tmux terminal-emulator
New contributor
I'm using xfce, and want to create a shortcut Super + t
for starting up terminal with tmux. What command should I put it to execute upon shortcut? I tried st tmux attach
, however it fails when there isn't any tmux session running(instead, the terminal appears for a fraction of a second and doesn't even let me see what the problem is).
Normal st tmux
causes, which is .
For some time, I used the following in my .bashrc:
# get into tmux at start
[ -z "$TMUX" ] && tmux attach
But I removed it, as it was inconvienent when I wanted to run the terminal without tmux. And to add to that, I couldn't use bash at all when my partition was full. Couldn't even login!
shell terminal tmux terminal-emulator
shell terminal tmux terminal-emulator
New contributor
New contributor
edited 11 mins ago
New contributor
asked 24 mins ago
tehftw
11
11
New contributor
New contributor
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
How I worked around it:
I created a script start-tmux.sh
, which contains the following:
#!/bin/bash
# if not inside tmux, then start it.
if [ -z "$TMUX" ]; then
tmux attach || exec tmux new-session
else
echo "already in tmux!"
fi
And I execute command st start-tmux.sh
upon hitting Super + t
New contributor
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
How I worked around it:
I created a script start-tmux.sh
, which contains the following:
#!/bin/bash
# if not inside tmux, then start it.
if [ -z "$TMUX" ]; then
tmux attach || exec tmux new-session
else
echo "already in tmux!"
fi
And I execute command st start-tmux.sh
upon hitting Super + t
New contributor
add a comment |Â
up vote
0
down vote
How I worked around it:
I created a script start-tmux.sh
, which contains the following:
#!/bin/bash
# if not inside tmux, then start it.
if [ -z "$TMUX" ]; then
tmux attach || exec tmux new-session
else
echo "already in tmux!"
fi
And I execute command st start-tmux.sh
upon hitting Super + t
New contributor
add a comment |Â
up vote
0
down vote
up vote
0
down vote
How I worked around it:
I created a script start-tmux.sh
, which contains the following:
#!/bin/bash
# if not inside tmux, then start it.
if [ -z "$TMUX" ]; then
tmux attach || exec tmux new-session
else
echo "already in tmux!"
fi
And I execute command st start-tmux.sh
upon hitting Super + t
New contributor
How I worked around it:
I created a script start-tmux.sh
, which contains the following:
#!/bin/bash
# if not inside tmux, then start it.
if [ -z "$TMUX" ]; then
tmux attach || exec tmux new-session
else
echo "already in tmux!"
fi
And I execute command st start-tmux.sh
upon hitting Super + t
New contributor
New contributor
answered 23 mins ago
tehftw
11
11
New contributor
New contributor
add a comment |Â
add a comment |Â
tehftw is a new contributor. Be nice, and check out our Code of Conduct.
tehftw is a new contributor. Be nice, and check out our Code of Conduct.
tehftw is a new contributor. Be nice, and check out our Code of Conduct.
tehftw is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f480451%2fhow-to-start-tmux-upon-running-terminal%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password