Coder Social home page Coder Social logo

Comments (6)

bruno- avatar bruno- commented on August 16, 2024

Hi,
thank you for pasting this code snippet. It would be ideal if we could make this work for ANY linux so users doesn't have to copy-paste stuff around.

Do you know what other systems (?) apart from upstart are used in linux-land? Are there like top 3 solutions for this?

from tmux-continuum.

jclem avatar jclem commented on August 16, 2024

Looks like systemd is the default for most distributions now. Probably better to work something using that in.

I have no idea how to systemd, but if I figure something out before someone else posts here, I'll post my findings.

On Aug 31, 2015, at 7:55 AM, Bruno Sutic [email protected] wrote:

Hi,
thank you for pasting this code snippet. It would be ideal if we could make this work for ANY linux so users doesn't have to copy-paste stuff around.

Do you know what other systems (?) apart from upstart are used in linux-land? Are there like top 3 solutions for this?


Reply to this email directly or view it on GitHub.

from tmux-continuum.

michael-coleman avatar michael-coleman commented on August 16, 2024

I also use Ubuntu 14.04 - which uses upstart by default, but Ubuntu 15.04 has switched to systemd. I haven't tried the script - but it looks to me like it would work on upstart based systems. (But you probably wouldn't want to distribute to users as it won't handle any unusual situations gracefully - e.g. what happens if tmux was already started? what happens if other programs or services that tmux relied on weren't booted themselves yet?).
The whole linux init system and PID 1 (e.g. sysV, upstart or systemd) is unfortunately quite a mess at the moment, where all major distros literally use different versions - slackware even uses its own init system again.
But where things really get messy is the fact that just because a system uses e.g. upstart as the controlling init service - most packages still define their init processes as sysV init scripts - and only a select few important scripts get converted to the new fancy system.
So like most things in Unix like systems - if you wanted the script to work everywhere, you would likely want to write it in the oldest most established system (sysV init) and because the most of the unix world uses them - any new init systems have to (and do) support them.

from tmux-continuum.

ILMostro avatar ILMostro commented on August 16, 2024

systemd is definitely the way to go. However, I'm (yet) sure how to deal with systemd-logind, as that's the new login manager that monitors sessions, powerbutton events, etc.

In the meantime, a workaround might be to provide a line in ~/.xinitrc and/or a ~/.config/autostart/tmux-start.desktop file with an exec command like:

'''
xterm -e tmux new-session -d 'journalctl -fl' ; split-window -h -d ; attach &
'''
Alternatively, make the line more "portable" by using xdg-open instead of xterm.

Furthermore, as per the Arch Wiki, cron can/should be used to autostart non-GUI applications.

from tmux-continuum.

ILMostro avatar ILMostro commented on August 16, 2024

I just stumbled upon this ArchWiki page that might be of particular interest for creating/using user-specific startup scripts.

from tmux-continuum.

bruno- avatar bruno- commented on August 16, 2024

We'll soon be merging PR #12 which adds Linux systemd support.

from tmux-continuum.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.