Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Thursday January 17 2019, @01:45AM   Printer-friendly
from the automation++ dept.

Hi all,

I have been learning linux and have a secondary monitor that I wanted to use for showing some sensor data. Currently I need to manually enter in three commands and then arrange my windows each time I want to look at (and start-up, etc). I am using the nethogs, inxi, and lm-sensors libraries:

sudo nethogs
watch -n1 "inxi -s"
watch -n1 "sensors | grep Tdie"

The end result looks something like this:
https://i.ibb.co/TgWXKSn/sensors.png

Is it possible/easy to script the opening of these three terminal windows and position them onto a specific monitor? Or is there a completely different better way to go about this?

Also, is there a way for me to custom arrange the data on the screen? Eg, could I put the sensors "Tdie" data into two columns and remove the "high = +70.0 C" info?

[Beyond this specific case, is there a general solution with, say, a directory containing a separate shell script for launching each program, with a master script that specifies terminal width/height as well as (x,y) coordinates? --Ed.]


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 1) by NPC-131072 on Thursday January 17 2019, @01:50AM (7 children)

    by NPC-131072 (7144) on Thursday January 17 2019, @01:50AM (#787694) Journal

    Hello fren,

    Do you know what desktop session manager you are using?

  • (Score: 0) by Anonymous Coward on Thursday January 17 2019, @01:57AM (6 children)

    by Anonymous Coward on Thursday January 17 2019, @01:57AM (#787697)

    Sorry, not immediately finding where to get that info. Maybe this helps:

    user@host:~$  uname -a
    Linux host0 4.20.0-042000-generic #201812232030 SMP Mon Dec 24 01:32:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

    user@host:~$  cat /etc/os-release
    NAME="Linux Mint"
    VERSION="19.1 (Tessa)"
    ID=linuxmint
    ID_LIKE=ubuntu
    PRETTY_NAME="Linux Mint 19.1"
    VERSION_ID="19.1"
    HOME_URL="https://www.linuxmint.com/"
    SUPPORT_URL="https://forums.ubuntu.com/"
    BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
    PRIVACY_POLICY_URL="https://www.linuxmint.com/"
    VERSION_CODENAME=tessa
    UBUNTU_CODENAME=bionic

    Its just mint 19.1 cinnamon with an updated kernel to 4.20 from the default (4.15).

    • (Score: 1) by NPC-131072 on Thursday January 17 2019, @02:05AM (2 children)

      by NPC-131072 (7144) on Thursday January 17 2019, @02:05AM (#787702) Journal

      Not familiar with mint. I see they have 3 desktop versions, you may be able to start by putting scripts in etc/X11/Xsession.d/ but specific desktop and terminal emulator may provide an easier way. Someone who knows Mate and Cinnamon will be able to help you more here.

      • (Score: 0) by Anonymous Coward on Thursday January 17 2019, @02:13AM (1 child)

        by Anonymous Coward on Thursday January 17 2019, @02:13AM (#787711)

        Not sure if it helps, but it seems to be mostly the same as Ubunu 18.4:

        user@host:~$ cat /etc/upstream-release/lsb-release
        DISTRIB_ID=Ubuntu
        DISTRIB_RELEASE=18.04
        DISTRIB_CODENAME=bionic
        DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS"

        Thanks for taking a look anyway.

        • (Score: 2) by Runaway1956 on Thursday January 17 2019, @03:28AM

          by Runaway1956 (2926) Subscriber Badge on Thursday January 17 2019, @03:28AM (#787761) Journal

          Linux Mint has a Ubuntu derivative. Their LMDE is Linux Mint Debian Edition - it comes straight from Debian, instead of passing through Ubuntu's hands. I believe it to be the superior version.

    • (Score: 4, Funny) by SomeGuy on Thursday January 17 2019, @02:11AM (1 child)

      by SomeGuy (5632) on Thursday January 17 2019, @02:11AM (#787709)

      No, no, no, it's Linux. You're supposed to write your own window manager. :P

      • (Score: 0) by Anonymous Coward on Friday January 18 2019, @02:47AM

        by Anonymous Coward on Friday January 18 2019, @02:47AM (#788125)

        No, no, no, it's Linux. You're supposed to write your own window manager.

        :) Its not 1992 anymore. There are about 20 windows managers, most of them quite mature products...

        OP - something simple inside your .profile should do the trick. Starting point: add the commands you are issuing.

    • (Score: 0) by Anonymous Coward on Friday January 18 2019, @02:52AM

      by Anonymous Coward on Friday January 18 2019, @02:52AM (#788127)

      Neat thing I "found" the other day. On newer distros - LM19, Manjaro, etc - "neofetch". Gives you a nice summary of your system in a terminal/console.