How to autostart tmux from lxde

Do you want something already running inside tmux? What's the objective?

/etc/rc.local you can create and set to execute and it is a shell script that will run at system startup.
 
I'm just trying to find out how best to use tmux. Don't really know much about it. I normally start it from a tab under LXTerminal under LXDE or from XTerm. It doesn't get added to LXDE's System Tools.

I normally Autostart LXTerminal with four tabs when starting LXDE, and would like to do something similar with tmux, but adding tmux to LXDE's autostart did not work.
 
Do you want something already running inside tmux? What's the objective?

/etc/rc.local you can create and set to execute and it is a shell script that will run at system startup.
What do I put in this /etc/rc.local?

rc.local() doesn't give much away...

Rc.local is executed after the scripts above, but before the rest of
the rc file is completed. In a default installation rc.local does not
exist, but its contents will be executed if the file is created by the
administrator.

No example or anything...
 
/etc/rc.local is normal shell syntax.

Code:
sudo -u cracauer tmux new-session -d 'sleep 10 ; bash'

Replace the sleep with the command you want to run.
 
Can I start tmux from Lxde?

It doesn't show up under System Tools.

I can run it from a command prompt under XTerm or LXTerminal, but can't figure out a way of running it directly under X.

If I go into 'Run' and type 'tmux' nothing happens.
 
Commands and command line programs need a terminal window to live in.
Have you tried opening a terminal window (would be lxterminal) and start sysutils/tmux?

Just type tmux and hit <enter>

You can make a menu entry that is basically a command to start lxterminal and then run tmux in it. That would be someting like:

lxterminal --command="tmux"

It is a long time ago since I used LXDE. There was something that you have to make a .desktop file with the command in it. See here for more information on using a script, and here on 'application menu editing' and desktop entries.

The alternative is to quit LXDE (quit, not logout!) and use sysutils/tmux without graphical environment.
 
Back
Top