This is a script I made on Linux Mint with XFCE for the same kind of setup. Not using Xinerama. My setup was 1st monitor portrait, 2nd and 3rd, landscape. Worked like a charm. The 5 second pause at start was because it was set to start with session, and if it was run too early, it was not working correctly.
Note also that in my specific example, I had to align screens on bottom as one was higher than the others. Aligning on top was not giving the expected behavior.
In the end, using xrandr was the only way I got it work the way I wanted.
Give it a try with your own settings
#!/bin/bash
sleep 5
xrandr --size 5040x1920 --output HDMI-0 --mode 1920x1080 --pos 1200x840 --primary \
--output DVI-1-1 --mode 1920x1080 --pos 3120x840 \
--output DVI-0 --mode 1920x1200 --pos 0x0 --rotate left
I made an article on my blog, however this is in french: https://akim.sissaoui.com/linux-attitude/un-bureau-etendu-sur-trois-ecrans-avec-deux-cartes-graphiques/
OK, so I finally figured out a "hack". This hack requires creating an extension to handle the request. I already tried quite a few attempts to "hijack" Chrome with an easier way but seems that Chrome is secure enough to stop me from doing that and this is the closest I can get.
First, create an empty directory somewhere accessible on the hard drive.
Create a file manifest.json
with the following content:
{
"name": "Open Chrome URLs",
"version": "1.0",
"manifest_version": 2
}
Create a file open.html
with the following content:
<html>
<head>
<title>Open Chrome URLs</title>
<script type="text/javascript" src="open.js"></script>
</head>
<body>
</body>
</html>
Create a file open.js
with the following content:
window.addEventListener("load", function(){
var key = "secretKey"; // replace "secretKey" with your own secret key
if(window.location.search == "?key=" + key && window.location.hash.length > 1){
chrome.tabs.update({
'url': "chrome://" + window.location.hash.substr(1) + "/"
});
}else{
document.body.appendChild(document.createTextNode("Invalid"));
}
});
Replace the secret key with your own if wanted.
Then, open the Extensions page (chrome://extensions/
).
Check the "Developer mode" checkbox and click "Load unpacked extension" and select the directory that you just created.
You should now see a new extension appeared.
Copy the extension id.
Finally, start Chrome with the following URL as the parameter.
chrome-extension://nihlceAnywayPutTheExtensionIdHere/open.html?key=secretKey#settings
Replace the first part with the extension id with the one you just copied.
Also replace the secretKey
with the one you set above.
You can also use most of the other Chrome URLs instead of settings.
Note: you need a shortcut to Chrome instead of an Internet link.
Good luck!
Best Answer
The Compiz config settings manager has lots of options för window placement and such. Install it if you havn't already
sudo apt-get install compizconfig-settings-manager.
Then go to: ccsm -> Window Management -> Place (plugin) -> Fixed window placement -> Windows with fixed viewport