Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

My screen has 1280 x 1024 resolution. But unfortunately, rightmost belt of 200 pixels is damaged and unable do display any image.

How can I set that the Xorg will treat my screen as 1080 x 1024 device?

Now I have tried:

Virtual 1080 1024
Viewport 0 0

It doesn't work right - image is scaled to fit vertically, and horizontally I can pan with the mouse.

share|improve this question
2  
I've opened the bounty in search for more solutions, possibly simpler. Thanks everyone! –  Rok Kralj Aug 6 '12 at 14:17
add comment

2 Answers 2

up vote 7 down vote accepted

Check out: http://howto-pages.org/ModeLines/ , they have a good explanation of Xorg modelines. Then go to http://xtiming.sourceforge.net/cgi-bin/xtiming.pl and input the specs for the size of the screen that you can use. This will give you a Modeline that you can add to your xorg.conf file.

Fields 4, 5, 6, & 7 correspond to the following valudes: HDisplay HSyncStart HSyncEnd HTotal.

By playing with fields 5 & 6, you'll be able to move the visible portion of your screen either left or right, depending on which you need.

share|improve this answer
    
Would you explain this more in detail? –  Rok Kralj Aug 12 '12 at 16:55
    
sure. think of hsync like the carriage return on a typewriter. remember, how X controls displays was developed back in the days of the CRT. HSyncStart says to start drawing pixels at a location, and keep drawing until HSyncEnd, at which point HSync signal is set, telling CRT to draw the next line on the screen. In the age of LCD, this is legacy, but it's still how it works. By playing with the start and end fiels of the horizontal lines, you can control how wide your screen is drawn, and on which portion of the physical media. The link in the post has a good explanation. –  Tim Kennedy Aug 13 '12 at 0:45
add comment

You will have to fiddle around how to best make displaymanagers use it, but:

You can start your Xorg normally which will use your entire screen at full resolution, e.g.

Xorg :123 -ac

The -ac switch disables some (all?) of Xorgs restrictions it may have on allowing clients. Then you start Xephyr as the only client (you may want to adapt the resolution passed as -screen argument to your needs):

DISPLAY=:123 Xephyr :0 -screen 1720x1200

Xephyr is a sort of "overlay Xserver" which interacts with clients just like any Xserver, but instead of taking care of rendering and input (the user faced part), Xephyr relies on another Xserver to do that.

How you combine these commands greatly depends on your use case. In general, applications like session managers give you the opportunity to provide a command how to invoke an Xserver.

What I did to try it out:

Create /root/.xinitrc with the content

Xephyr :0 -ac -once -query myxdmcphost -screen 1400x1200`

where 1400 is my screen width -200 pixels.

Then I run xinit -- :123 -my -usual -xorg -options -for -my -computer and as a result I get a login screen and a session that actually uses my whole screen but a 200 pixels wide column on the right hand side.

To have the same effect for e.g. GDM you would have to provide the xinit command a couple of times in the gdm.conf as the method to invoke an Xserver. But I can't tell you from the top of my head how to do that.

share|improve this answer
    
Xephyr doesn't support opengl hardware acceleration, not suitable for any modern DE or game. –  Rok Kralj Aug 12 '12 at 16:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.