I'm trying to write a script that will start an X application if it's not already running, but will find it and pop it to the front if it is already running (maybe it's lost on a busy desktop).
The X primitive you want, I believe, is "raise". Window managers (KDE, Gnome, Xface, etc) might have some customizable interface so that you can ask window with a certain title to be raise()d.
I found one command that might give you what you need... it's called wmctrl, and according to the man page you can do:
BTW, thank you otheus. That does just what I wanted.
I now have a shell script that starts my selected VirtualBox virtual machine if it's not running, opens an RDP window to it if it's not open, and takes me to it if it's already running and open.
With a little bit of work, was able to build a nice "Wuhan Coronavirus Status" app using MQTT and the IoT-OnOff app. More on this technique here:
ESP32 (ESP-WROOM-32) as an MQTT Client Subscribed to Linux Server Load Average Messages
The result turned out nice, I think. I like the look and... (10 Replies)
Hey Guys, Thanks for always being helpful, I have another issue that I need a little insight on how to fix.
See the below script I have and the error I get. I don't understand why it does that, am I not using the continue correctly?
#!/bin/bash -x
# @(#) File: filepush.sh
#... (5 Replies)
We have a cluster of 3 web servers. I'll be updating a single master server and copying info to the other 2 slave servers. What's the best way of synching all of them? Run rsync on each of the slave servers to pull the updates from the master? Or run rsync on the master to push the updates to the... (1 Reply)
Hi I am trying to send a file form one linux server into an another linux server.
I cannot do ftp get. Can anyone please assist me how can I push the file to the other server ?
Thanks. (2 Replies)
Hi,
I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this.
Thanks in advance,
Amudha (7 Replies)
1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection?
2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
question: for the below program
i just printed the value for pid, child pid and parent pid
why does it give me 6 values? i assume ppid is 28086
but can't figure out why there are 5 values printed instead of just two!
can someone comment on that!
#include<stdio.h>
#define DIM 8
int... (3 Replies)