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:
- 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"
- 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
Post a Comment