Jose Catre-Vandis
September 21st, 2008, 07:17 PM
Setup:
Command line install of xubuntu, running openbox window manager
What I want to do:
Put a command in autostart.sh that will:
Start Firefox
Maximise it
Send it below (to the back of all other windows)
but only for this window and not for all firefox windows opened (otherwise I would be using the per-app settings in rc.xml).
I am trying to use xdotool for this. I have setup keybindings for "below" and "maximise" and these work.
If I use an xdotool command to activate the firefox window when openbox is already running I can use a script to do this.
xdotool windowactivate $(xdotool search "Mozilla Firefox" | head -1)
xdotool key super+F6
xdotool key alt+F6
and firefox does as I wish.
But if I then add firefox to the script and then put this script in autostart.sh all I get is firefox open.
#! /bin/bash
#open firefox
firefox
#activate/give focus to firefox window
xdotool windowactivate $(xdotool search "Mozilla Firefox" | head -1)
#send below
xdotool key super+F6
#maximise
xdotool key alt+F6
autostart.sh looks like this:
# This shell script is run before Openbox launches.
# Environment variables set here are passed to the Openbox session.
#numlock
numlockx on &
#run background
sh $HOME/.fehbg &
#open firefox and send to back and make fullscreen
sh /home/jose/testwin.sh &
#run xfce4 panel
xfce4-panel &
I have tried putting in some sleep time in the script and placing the commands directly into autostart.sh, but still get the same problem. If I run in a terminal it seems that firefox never actually "finishes" opening (if that makes any sense) even if I use ; or & or && at the end in the script)
Can anyone shed light on where I am going wrong?
Command line install of xubuntu, running openbox window manager
What I want to do:
Put a command in autostart.sh that will:
Start Firefox
Maximise it
Send it below (to the back of all other windows)
but only for this window and not for all firefox windows opened (otherwise I would be using the per-app settings in rc.xml).
I am trying to use xdotool for this. I have setup keybindings for "below" and "maximise" and these work.
If I use an xdotool command to activate the firefox window when openbox is already running I can use a script to do this.
xdotool windowactivate $(xdotool search "Mozilla Firefox" | head -1)
xdotool key super+F6
xdotool key alt+F6
and firefox does as I wish.
But if I then add firefox to the script and then put this script in autostart.sh all I get is firefox open.
#! /bin/bash
#open firefox
firefox
#activate/give focus to firefox window
xdotool windowactivate $(xdotool search "Mozilla Firefox" | head -1)
#send below
xdotool key super+F6
#maximise
xdotool key alt+F6
autostart.sh looks like this:
# This shell script is run before Openbox launches.
# Environment variables set here are passed to the Openbox session.
#numlock
numlockx on &
#run background
sh $HOME/.fehbg &
#open firefox and send to back and make fullscreen
sh /home/jose/testwin.sh &
#run xfce4 panel
xfce4-panel &
I have tried putting in some sleep time in the script and placing the commands directly into autostart.sh, but still get the same problem. If I run in a terminal it seems that firefox never actually "finishes" opening (if that makes any sense) even if I use ; or & or && at the end in the script)
Can anyone shed light on where I am going wrong?