Я использую Ubuntu 10.04 LTS. У меня есть 4 рабочих пространства в стиле Gnome — только одно из 4 рабочих мест отображается на экране одновременно.
Мне как программисту периодически нужно запускать встроенный браузер из bash-скрипта.
Основная функция, которая мне нужна, заключается в том, что браузер должен открываться в той же рабочей области, что и bash-скрипт, из которого он вызывается, даже если другой экземпляр браузера работает в другой (неактивной) рабочей области.
СЛУЧАЙ 1: ни один экземпляр не запущен
- Running the Opera browser from the script with the URL as the sole parameter displays the Speed-Dial tab, and a second tab with my content. UNDESIRED BEHAVIOUR
- Even worse, if I add the -newwindow in the above case, two windows get spawned, one with the Speed-Dial tab, and a second with with my content. UNDESIRED BEHAVIOUR
- Running the Opera browser from the script with the URL as a parameter along with -activetab displays my content as the sole tab of the browser in my current workspace. THIS IS THE BEHAVIOUR I WANT!
- If I specify both -newwindow and -activetab, in the above case, it appears that -activetab is ignored. REFERENCE BEHAVIOUR
СЛУЧАЙ 2: запущен другой экземпляр
- Running the Opera browser from the script without the URL as the sole parameter outputs "Activated running instance" and the webpage opens in that browser. UNDESIRED BEHAVIOUR
- Running the Opera browser with the -newwindow option launches a new window in my current workspace with my content as the sole tab of the browser. THIS IS THE BEHAVIOUR I WANT.
- Running the Opera browser from the script with the URL as a parameter along with -activetab displays replaces the content in that workspace and displays only "Activated Running Instance" in the script window. UNDESIRED BEHAVIOUR
- If I specify both -newwindow and -activetab, in the above case, it appears that -newwindow is ignored. INCONSISTENT BEHAVIOUR
wmctrl -R Speed Dial - Opera
, который, в отличие от документации, переключает рабочий стол туда, где находится текущий экземпляр Opera. - person vo1stv   schedule 15.05.2012ps
для поиска альтернативного имени пакета Opera, указанного (во время установки) в списке запущенных процессов. Если процесс запущен, опустите -newwindow и используйте вместо него -activetab. - person vo1stv   schedule 15.05.2012