bash - How to write script for Linux Mint 14 -


what want do

write script set screen resolution (1600 x 900) in linux mint 14 os. mint os installed in vmware workstation 9 on laptop.

what did before

open terminal , execute 3 commands 1 one:

  1. cvt 1600 900
  2. xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync
  3. xrandr --addmode virtual1 "1600x900_60.00"
  4. xrandr --output virtual1 --mode "1600x900_60.00"
  5. succeeded

what tried far

create .py file following contents:

#! /usr/bin/python # screen script  cvt 1600 900 xrandr --newmode  "1600x900_60.00"  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync xrandr --addmode virtual1 "1600x900_60.00" xrandr --output virtual1 --mode "1600x900_60.00" 

what get

failure.

need help

could help? .py file bash script?

is .py file bash script?

obviously, yes. wrote bash script shebang says should interpret python. 2 solutions. either adjust shebang #!/usr/bin/env bash or write python code.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -