
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
Newrez is a nautilus script that not only makes it easy to change screen resolution on the fly, it lets you specify a resolution higher than your display's physical dimensions! This means that a netbook with a screen that's 1024x600 can display a scaled 1280x800 or higher (limited only by your eyesight :-)
Newrez does NOT "over-drive" the actual hardware. Instead, it defines a higher-resolution display on the netbook's VGA port, and scales it to the LCD.
You are not restricted to "standard" resolutions. Values like 1100x730 or 1350x900 or even 1400x700 will work just fine (and a few-pixel adjustment automatically applied if needed). Setting to 'default' will return everything back to normal.
Newrez can also be run directly from the command line, as in "newrez 1280x800" or "newrez default". This makes it a simple matter to switch to create scripts or icons that set your most common resolutions, or to include resolution changes into other scripts or launchers.
REQUIRES:
xrandr (version 1.3 or higher)
zenity
bc
cvt
At present, this will not work if you use the vendor-supplied Nvidia or ATI driver.
If the laptop lid is closed and re-opened, you MAY find the the mouse is constrained to an area the size of the default resolution. This is caused by xrandr. Re-execute newrez to fix this.
7 years ago
Check my other scripts, too!
(VOTE!!)
0.1 - initial version
0.2 - minor cosmetic fix for older zenity versions
0.3 - when run, the "xrandr" command is saved in a 1-line script ~/newrez-devname-XXXX
0.4 - corrected parsing when multiple monitors are detected
0.5 - a gnome-panel launcher icon can be created automatically
0.6 - better panel icon creation
0.7 - much more thorough testing to ensure proper versions of xrandr and gnome-panel-add
0.8 - Added "newrez-v" which is an entirely different approach to compensate for "constrained mouse" issue in latest xrandr. newrez-v starts a vncserver at a higher resolution and then starts a vncviewer in scaled mode. Not as elegant, not as fast, but will work on ALL systems.
0.9 is a rewrite, and avoids the problems of a confined mouse by defining new resolutions to the VGA output, then scaling for display on the LCD. It's been tested in gnome2 and gnome3 as well as the MATE and Cinnamon desktops.
1.1 fixed issue when returning to "default" resolution, where mouse was not confined to screen edges.
7 years ago
Check my other scripts, too!
(VOTE!!)
0.1 - initial version
0.2 - minor cosmetic fix for older zenity versions
0.3 - when run, the "xrandr" command is saved in a 1-line script ~/newrez-devname-XXXX
0.4 - corrected parsing when multiple monitors are detected
0.5 - a gnome-panel launcher icon can be created automatically
0.6 - better panel icon creation
0.7 - much more thorough testing to ensure proper versions of xrandr and gnome-panel-add
0.8 - Added "newrez-v" which is an entirely different approach to compensate for "constrained mouse" issue in latest xrandr. newrez-v starts a vncserver at a higher resolution and then starts a vncviewer in scaled mode. Not as elegant, not as fast, but will work on ALL systems.
0.9 is a rewrite, and avoids the problems of a confined mouse by defining new resolutions to the VGA output, then scaling for display on the LCD. It's been tested in gnome2 and gnome3 as well as the MATE and Cinnamon desktops.
1.1 fixed issue when returning to "default" resolution, where mouse was not confined to screen edges.
markjm1971
9 years ago
Anyway its working now. No blind spots (black rectangles). Using Ubuntu 11.04 on Samsung Netbook N140.
Cheers,Mark
Report
calichon
9 years ago
Report
markjm1971
9 years ago
However, I've just 'upgraded' to 11.10 Beta and while I don't have black rectangles to the right and bottom of the screen, I'm unable to move the mouse into this area as reported by another user. Hopefully the full release should resolve this
Report
marc41
9 years ago
In my case, the screen resizes just fine, but the mouse is trapped in a 1024x600 area. Is that what you are getting now? I've found no cure yet.
-- Marc
Report
markjm1971
9 years ago
Yes that's exactly the issue with Ubuntu 11.10 Beta.
regards,
Mark
Report
marc41
9 years ago
It appears that X sets the new resolution but doesn't tell Gnome 3 about it.
If setting 'panning' to the new resolution fixes an Ubuntu problem, I can certainly stick that in there. If while playing with this you happen upon a fix for the mouse, please let me know!
Report
quas0
9 years ago
Report
fanoy
9 years ago
Report
marc41
9 years ago
I've tried many things. Somehow it seems Gnome is not aware of the change in X. If anyone out there has an idea here, I'd sure like to hear it! :-)
At this time, I'm just (im)patiently waiting for an update that fixes this.
Report
fanoy
9 years ago
Report
marc41
9 years ago
The first is a file which you can double-click (you might place it on your Desktop or launch bar). The second is a shell script that can be used in various ways.
One way to use the shell script is to add it to your 'Startup Applications'. This ensures that it is executed AFTER the desktop is running. If you find that it starts too soon, edit the file and add a "sleep XX" so that it waits for a few seconds before starting (XX might be just 2 or 3 seconds).
Please post your results here for other users to read.
Enjoy!
Report
fanoy
9 years ago
Report
marc41
9 years ago
The newrez script does NOT try to force your display into an un-supported mode!!
Your actual hardware display stays at the original resolution (1024x600). The script creates a higher resolution "display" in memory ONLY. Then it shows that in-memory display on your actual screen by "scaling it down".
For example, if you have a physical screen that is 1024x600 and choose newrez to set your screen to 1280x800, it will show on your display a 1280x800 image that has been scaled-down by 25%.
There is NO DANGER in using this script. The resolution of your display actually stays unchanged. It simply scales everything to appear smaller,
Report
fanoy
9 years ago
I succeed to try your trick for set default new resolution after startup " add it to your 'Startup Applications'. This ensures that it is executed AFTER the desktop is running" and it all normal running.
but, if I try play game 0ad, game not playing. just blankscreen.
Report
fanoy
9 years ago
Report
fanoy
9 years ago
Report
zardosht
9 years ago
I am using Ubuntu in VMware player 3.1.4.
Running the script says my display driver is not supported. Is there any workarounds?
Thanks,
Zardosht
Report
marc41
9 years ago
Report
zardosht
9 years ago
I am newbie to linux. How can I know which video adapter my system is using?
The lspci says:
00:0f.0 VGA compatible controller: VMware SVGA II Adapter
The xrandar returns in full screen mode of VMWare player the following output:
Screen 0: minimum 320 x 200, current 1366 x 768, maximum 2560 x 1600
default connected 1366x768+0+0 0mm x 0mm
800x600 60.0 56.0 0.0
640x480 60.0 0.0
320x240 0.0
400x300 0.0
512x384 0.0
1024x768 0.0
1152x864 0.0
1280x960 0.0
1400x1050 0.0
1600x1200 0.0
1920x1440 0.0
2048x1536 0.0
854x480 0.0
1280x720 0.0
1366x768 0.0*
1920x1080 0.0
1280x800 0.0
1440x900 0.0
1680x1050 0.0
1920x1200 0.0
2560x1600 0.0
720x480 0.0
720x576 0.0
320x200 0.0
640x400 0.0
800x480 0.0
1280x768 0.0
1280x1024 0.0
1326x661 0.0
Report
markjm1971
9 years ago
Cheers,
Mark
Report
marc41
9 years ago
I use Fedora, and recently upgraded my own netbook from 14 to 15 (with Gnome 3). Newrez is confused by this upgrade as well, where I get a resized display but the mouse pointer is confined to a 1024x600 rectangle.
I don't yet know what changed: whether it's XrandR itself, something more fundamental in X, or something else.
Thanks for letting me know it's not just my system and not limited to Fedora. I'll get to work on it...
-- Marc
Report
qkzoo
10 years ago
1. I run your script, sh newrez. The script runs in terminal, but issues four "Syntax Error" statements:
Quote:
(standard_in) 1: syntax error
DEFAULT: 1024 600
(standard_in) 1: syntax error
SCALE 1
(standard_in) 1: syntax error
(standard_in) 1: syntax error
NEW: H V 1024 600
--version
This time around, just as a test I plugged in 1280, which you said should have been 1.25 for the ratio. When I examine the shortcut, it looks like this for the command line:
Quote:
xrandr --fb 1024x600 --output LVDS1 --scale 1x1
As you can see, it didn't plug in the correct resolution or ratio. If I edit the shortcut to run 1280 x 800 at 1.25 manually, it seems to look the same as the 1600 x 1000 resolution (1.25) I also have setup.
This is on my netbook. I tried this also on my old desktop unit (pretty old unit) which I know has an nVidia graphics card. I haven't done any driver updates on it yet, so it's probably a hardware acceleration issue, but when I adjust the resolution, the machine get's REALLY slow!
Any thoughts?
Report
marc41
10 years ago
>> DEFAULT: 1024 600
Hi -- SO sorry for the delay -- gnome-look for some reason is NOT sending me email when new comments arrive...
The above complaint, and the problems that follow, are coming from the lines that "echo" things to the "bc" command. I guess it's possible that Mint's "echo" command is different??
Type this:
echo -e "this is\na test"
You should get no complaints, and the results should print "this is" and "a test" on two separate lines.
Let me know what happens...
Report
marc41
10 years ago
Try running the script with "sh -xv newrez 2>&1 tee /tmp/test.txt"
You'll get copious screen output, showing each line as it is encountered in the script and then a second time after any substitutions as it is executed. The complete output will be saved to /tmp/test.txt which can be reviewed afterwards.
Let me know what you see.
-- Marc
Report
marc41
10 years ago
Should read ... 2>&1 | tee ...
Report