Score:3

Start program with offset / specific position on screen

jp flag

I have 2 screens connected via DP, ubuntu 'merges' them into one big screen (see below). I would like to autostart my firefox on the second screen (i.e., at offset +1920+0) but I don't know how (firefox doesn't seem to have a start parameter like --window-position=x,y). Is there a way to start any program at a specific offset?

Output from xrandr --query

Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384
eDP connected (normal left inverted right x axis y axis)
   1920x1080     60.00 +  48.00  
   1680x1050     60.00  
   1280x1024     60.00  
   1440x900      60.00  
   1280x800      60.00  
   1280x720      60.00  
   1024x768      60.00  
   800x600       60.00  
   640x480       60.00  
HDMI-A-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1 disconnected (normal left inverted right x axis y axis)
DisplayPort-2 disconnected (normal left inverted right x axis y axis)
DisplayPort-3 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 598mm x 336mm
   1920x1080     60.00*+  50.00    59.94  
   1680x1050     59.95  
   1280x1024     75.02    60.02  
   1440x900      59.89  
   1280x960      60.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
DisplayPort-4 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 598mm x 336mm
   1920x1080     60.00*+  50.00    59.94  
   1680x1050     59.95  
   1280x1024     75.02    60.02  
   1440x900      59.89  
   1280x960      60.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
Score:0
um flag

This isn't a comprehensive answer, but it might help you find the right one. I've been trying to do something similar with multiple instances of vmware workstation. I find the following command works sometimes...

vmware -n --geometry=1920x1080+1920+0 {path to .vmx file}
vmware -n --geometry=1920x1080+3840+0 {path to .vmx file}

If I run my script just after booting up it works correctly. However a subsequent run has different behaviour.

I can't find much documentation on this but the --geometry flag seems to be one you can use on other programs.

David avatar
cn flag
Is this not a command to be used in a docker container? The OP says noting about using a docker.
um flag
It's a flag found in the Gtk I believe, which is part of GNOME - window manager for Ubuntu 20.03. But in the documentation I've read some applications can choose to ignore the setting.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.