I am running on Ubuntu 12.04 and would like to run an application on startup, in a maximized terminal, selected. I solved all problems exept the last one. so for now i have
gnome-terminal --maximize -x /home/user/myapp
which runs the application in a maximized terminal, but it is never selected that inputs are possible. the system should work without keyboard and mouse (only barcode scanner)
I believe wmctrl can do that
supposing you only have one instance of gnome-terminal running you can do
to set focus to the it
see
man wmctrl
for detailsPerhaps try the
--full-screen
flag instead. This has subtly different behaviour from maximise (it should now show over any other UI) but should also keep focus. Failing that, you could always script something separately to give the window focus withxdotool
(or another similar tool).Failing that, you could just stick a
sleep 10;
in before thegnome-terminal
command. The delay caused would likely mean that nothing grabbed the focus back off the term.But perhaps Gnome is the problem here. If this is a single-purpose machine, you might do better to dump the Gnome and its window manager completely. You could either fly solo and build a dirty little
nodm
environment (just nodm, and an~/.xsession
file to run your terminal), or go for a tiling window manager (awesome, xmonad, etc) that is better purposed for terminal-priority things.