How to simulate a key press

Posted on 2004-11-29
Last Modified: 2008-01-09
I am using a .xsession script to start a firefox browser but would like it to start in fullscreen mode, the key to start fullscreen mode in firefox is F11, is it possible to add a line to the .xsession script to simulate an F11 key press after firefox has been started?

Here is the .xsession script that starts the web browser once the "kiosk" user has been automatically logged in.

while true ; do
   /firefox/firefox -fullscreen

Question by:uuccu
    LVL 40

    Expert Comment

    I don't believe you could simulate the key press and I don't see anything that indicates that firefox accepts -fullscreen as a startup option. But it does accept -height & -width options which you could use to fill the screen.

    Author Comment

    Oh right actually I used an xpi for firefox to add the xpi, but have just discovered that some tweaking i have done to remove menus and context menus seem to disable it. Hense the attempt to use a key press. Oh well i guess it was worth a try.

    What is the syntex for setting the browser window size? i have already tried it using -geometry yet there is no change it is always 800x600.
    LVL 40

    Accepted Solution

    You can't use -geometry because that's an instruction to a windowmanager, which you aren't using. As I recall you should be able to use the -height & -width options.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
    Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now