5

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.

4 Answers 4

4
+150

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
  • Yes, thanks a lot :) waiting 17 hours to award the bounty. It doesn't work on desktop BTW, but that's not a problem.
    – int_ua
    Aug 26, 2013 at 18:31
  • @int_ua you would need to create a custom xorg.conf for you desktop and disable some checks. But I am glad it works on the laptop :)
    – Symin
    Aug 27, 2013 at 16:53
  • Wow, thank you so much I have spent so much time trying to figure this out
    – daxvena
    Oct 20, 2014 at 1:44
  • I have almost the same issue though the right 40% of display doesn't work. Is it possible to make the left side of display to work instead of right Oct 14, 2016 at 17:13
  • Worked great with a few notes: Resolution should be MULTIPLE OF 8 - or you'll see an xorg complaint and fullsizing windows may spill out of bounds with some window managers (KWin + others?) For KDE users - adjust plasma panels etc. after change -add these two lines to end of script: kquitapp5 plasmashell; kstart5 plasmashell
    – JJones
    Jan 6, 2022 at 8:43
0

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.

0

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: https://unix.stackexchange.com/a/686123/52681

0

For the right side or the upper side modification just use the first script by making the x difference value negative the same goes with difference

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .