Quantcast
Channel: Executing wmctrl from bash - Ask Ubuntu
Viewing all articles
Browse latest Browse all 3

Executing wmctrl from bash

$
0
0

After playing a little from the terminal with wmctrl, now comes the next step. Execute wmctrl from a bash script.

I do achieve to execute wmctrl in a bash when it is completely alone.

Example:

#!/bin/bash

 SOUDIR=/usr/bin
 echo "$SOUDIR"
 $SOUDIR/wmctrl -i -r 0x040000b3 -e 0,0,0,500,800

But when I add the firefox line code it does not work. I though that adding sleep time would work but I was wrong.

This is the current code:

#!/bin/bash

firefox http://www.google.de
sleep 30s
SOUDIR=/usr/bin
echo "$SOUDIR"
$SOUDIR/wmctrl -i -r 0x040000b3 -e 0,0,0,500,800

How to resize the web browser using this bash code?

I am new to bash and ubuntu.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images