Screen resolution repositioning? (Broken laptop screen)

I have a laptop with the top left corner's screen being broken - I can't see anything there. However it's just a small corner, so I'd like to know if there's something I can do to make Ubuntu not use that part of the screen at all - I basically want it to ignore 2 unity taskbars on the left, and re-position all the content.

3 Answers

Create a script @ let's say /usr/share/screen.sh

sudo touch /usr/share/screen.sh

make it executable

sudo chmod a+x /usr/share/screen.sh

edit the file (I will use gedit here, so it is easier to paste for newbies)

gksu gedit /usr/share/screen.sh

paste the contents of this script:

#!/bin/bash
#change these 4 variables accordingly
ORIG_X=1280
ORIG_Y=800
NEW_X=1160
NEW_Y=800
###
X_DIFF=$(($NEW_X - $ORIG_X))
Y_DIFF=$(($NEW_Y - $ORIG_Y))
ORIG_RES="$ORIG_X"x"$ORIG_Y"
NEW_RES="$NEW_X"x"$NEW_Y"
ACTIVEOUTPUT=$(xrandr | grep -e " connected [^(]" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/")
MODELINE=$(cvt $NEW_X $NEW_Y | grep Modeline | cut -d' ' -f3-)
xrandr --newmode $NEW_RES $MODELINE
xrandr --addmode $ACTIVEOUTPUT $NEW_RES
xrandr --output $ACTIVEOUTPUT --fb $NEW_RES --panning $NEW_RES --mode $NEW_RES
xrandr --fb $NEW_RES --output $ACTIVEOUTPUT --mode $ORIG_RES --transform 1,0,$X_DIFF,0,1,$Y_DIFF,0,0,1

Edit the first four lines to your required resolution. I have experimented with 1280x800 as my original one and I took a 120 pixels of the horizontal part as the unity bar is about 60 pixels wide.Save file and exit gedit.

Fallow these guidelines - How do I start applications automatically on login - to create a startup script. Put a Screen resize or something like that in the Name field and /usr/share/screen.sh as the Command

Restart Ubuntu and hopefully you will get what you want. It works on my machine :)

5

Unfortunately the top left corner of the screen is very important for Unity and Mark Shuttleworth himself has said that there are no intentions of moving the launcher around.

You can try to tweak Unity a bit so that you can still work without the top-left corner.

Have a look at cairo dock for example. Install it like so:

sudo apt-get update
sudo apt-get install cairo-dock

Cairo dock is the launcher application that lays on the bottom of the screen. Once installed search in your apps cairo dock and pick the GLX Dock option (the hardware accelerated one). You can then hide the left Ubuntu launcher by installing the Unity Tweak Tools.

To run cairo dock at each reboot put it in your Startup Applications.

sudo apt-get install unity-tweak-tool

Run the tweak tools and under the Unity / Launcher section set Auto-hide to ON.

Anyway I would suggest you to install a more customizable window manager. A safe bet is Gnome Shell, but in your situation I'd go Cinnamon that doesn't use the top left corner much.

There are plenty of guides on askubuntu on how to install both of them. Once installed log out and from the login manager pick your new session (eg: Cinnamon) by clicking on the round Ubuntu logo.

If you are using KDE you might want to add

kquitapp5 plasmashell
kstart5 plasmashell

To the bottom of the script in order to reload the panels with proper dimensions.

Resolution should be a multiple of 8

I was unable to get full screen windows to stay within bounds until the xrandr error from the above script, combined with what I read about modelines clued me in... modified my resolution to be a multiple of 8 and all works well.

I posted my version of the script along with some instructions for making the change take affect in SDDM in another StackExchange answer here:

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like