Results 1 to 3 of 3

Thread: Some simple shell scripts

  1. #1
    Join Date
    Jan 2011
    Location
    TEXAS
    Beans
    24
    Distro
    Ubuntu Studio 11.04 Natty Narwhal

    Some simple shell scripts

    Hello, First off I want to say I am not a complete beginner, but I still am learning a great deal about Ubuntu and Linux in general. So to the idea:

    I am wanting to make a simple shell script that opens up Firefox and automatically sets it to a dimension that I specify. (I understand that I can do this with shortcut keys/click and drag but where is the fun in that.) I have the "open up Firefox" bit working (>.>). I just have no idea how to readjust the window size via the script. I assume it is going to have something to deal with compiz or X? This is where I need your help. Just a general guide in the direction I need to go will be greatly appreciated.

  2. #2
    Join Date
    May 2011
    Beans
    273

    Re: Some simple shell scripts

    Check Firefox command line options, I'm sure you can set dimension by using specific arguments.
    Your left hand is touching your face.

  3. #3
    Join Date
    Mar 2006
    Location
    Philadelphia, PA
    Beans
    472

    Re: Some simple shell scripts

    Something like this:
    Code:
    #!/bin/bash
    firefox-bin -width $1 -height $2
    Use with:
    Code:
    ./myscript.sh 800 600
    Some good references:
    http://kb.mozillazine.org/Command_line_arguments
    http://linuxcommand.org/writing_shell_scripts.php
    Ubuntu User #: 0x2695 | Banshee 1.8/2.0 Pidgin Plugin

    Intel Q6600 @3.21, 4GB, GTX260, ArchLinux
    Lenovo IdeaPad S10, 1.6GHz Intel Atom, ArchLinux

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •