• 0 Posts
  • 14 Comments
Joined 2 years ago
cake
Cake day: June 18th, 2023

help-circle



  • I know you’re looking for a desktop solution, but here’s something that you can try in case you can’t find one – I’m betting that having a solution is better than having none!

    So I just had a quick muck around:

    • You can use pgrep to detect if a process with a given name is running
    • You can write to /dev/pts/0 to trigger a desktop notification
    • You can drop it into a cron job to run it automatically on a schedule

    As a test, the following command will look for a process called syncthing and send a desktop notification if it can’t find it:

    pgrep syncthing || echo "Syncthing is not running > /dev/pts/0"
    

    To set up a cron job:

    1. open a terminal
    2. open the editor with crontab -e (if you need to pick an editor, nano will probably be your best bet, it’s easiest to use)
    3. in the editor, add the following line to the end of the file: 0 * * * * pgrep syncthing || echo "Syncthing is not running" > /dev/pts/0
      • The 0 * * * * sets up the schedule (on the 0th minute of every hour, every day of the month, every month, on every day of the week)
      • Everything after that is the command to run
    4. save and quit

    If you ever want to get rid of it, just open the cron file again (crontab -e) and remove the line.

    I gave this a go on KDE under Wayland and it seems to do the trick. Good luck, I hope you find what you’re looking for!

    [edit-1] added step (2) to install libnotify-bin in case you don’t have it already. [edit-2] added XDG_RUNTIME_DIR to step (4) [edit-3] removed references to libnotify, replace with /dev/pts/0 (Nice one, @sun_is_ra@sh.itjust.works !)






  • I’m sure there are ways to suppress output from stdin presenting in the terminal but I couldn’t tell you how to do it without looking it up myself.

    The easiest entry point to this problem that I can think of off the top of my head is password input masking (e.g., when you run sudo and type your password, it prevents character output even though the characters are read by the application).

    There is almost certainly a much better and more appropriate mechanism to prevent stdin characters from printing directly to the terminal (perhaps some kind of special character? A TTY control option?) but I don’t know it off-hand.






  • I have AussieBB and had to give them a call at one point to allow inbound traffic so I could expose my self-hosted server. They flicked a switch for my account and then everything came good.

    If you give them a ring and explain what you’re trying to do it should get sorted out very quickly. Their customer service staff are very knowledgeable and friendly - they’re the best RSP I’ve ever had.