Command script file?

Discussion in 'Newbie Questions' started by will.diable"gmail.com, Nov 23, 2017.

  1. will.diable"gmail.com

    will.diable"gmail.com Thread Starter
    Expand Collapse
    New Member

    Joined:
    Nov 23, 2017
    Messages:
    2
    Likes Received:
    0
    HI all, just trying out a Live USB for the first time and considering installing to my PC, but before I take the plunge I'd like to know if I can create a script file similar to a batch file in Windows. So i can click a file and execute the 'xrandr -s 1920x1080 -r 24' command when watching a video file at 24 frames per second so the monitor is in sync with the video (my monitor does support 24hz)

    I'd also like to know if I can disable mouse acceleration.

    Thanks for reading
    Wilf
     
  2. will.diable"gmail.com

    will.diable"gmail.com Thread Starter
    Expand Collapse
    New Member

    Joined:
    Nov 23, 2017
    Messages:
    2
    Likes Received:
    0
    It seems I've nailed the script file. For anyone else interested, I created an empty file called 24FPS, opened it in Scratch and typed:
    #!/bin/bash
    xrandr -s 1920x1080 -r 24
    chmod +x file

    I then saved it as 24PFS, entered the file properties and set it to open in Termal, then in the permissions tab I made it executable for owner, group and eveyone.

    I then opened terminal and typed "chmod +x 24FPS" without the quotes and now clicking the file changes my frame rate to 24hz, I then just copied/pasted the file and edited it slightly in Scratch text editor to change 24 to 60 and voila. I can switch between frame rates.
    I'm sure there are more elegant ways of doing this, I'm not sure how many of the actions and commands are necessary because I was rushing. It would be cool to change the icons of these scrip files from the stock text image if anyone can help?

    Thanks
     

Share This Page

Loading...