Giter Site home page Giter Site logo

Comments (2)

archbirdplus avatar archbirdplus commented on September 27, 2024

As @Garrett96 mentioned, you can test for a terminal with test -t 0. If true, then we're good. But otherwise, we have several rather ugly options.

Unfortunately, the name of the terminal app is not standardized, and there may be more than one.
Here's a list of common terminal applications compiled from this SO post.

For X11 -> xterm
For Kde -> konsole
For GNOME -> gnome-terminal
For xfce4 -> xfce4-terminal
For Cinnamon -> x-terminal-emulator
For MATE -> mate-terminal --window
For Unity -> gnome-terminal --profile=Default
For Pantheon -> pantheon-terminal -w ''

But we don't really know which one the user wants to open. It's possible to guess by using the most specific one, or the one they are running right now, or by trying to match $TERM or something like that. All this feature sniffing would take time and complexity and add even more confusion when it doesn't work. It also reminds me of browser sniffing on the web, so I'll leave that for someone else.

Alternatively we can just pipe everything to screen or a log file, and let the user know where to find the logs. But at that point we might as well ask that they open Cubyz in a terminal in the first place.

from cubyz.

IntegratedQuantum avatar IntegratedQuantum commented on September 27, 2024

Alright, since there seems to be no simple, short-term solution I'm closing this in favor of #227, which would be the go to solution for all people who don't want to use the terminal. With #227 the logs should be displayed in the launcher.

from cubyz.

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.