You are not logged in.

#1 2011-04-06 18:16:52

KlavKalashj
Member
Registered: 2008-10-09
Posts: 376

[SOLVED]Please help me convert this xrandr script into a xorg.conf

Hi!

First of all, I hope this is posted in the right forum section.

My laptop is often connected to my tv when I'm at home, using only that screen. I have a xrandr script pasted in /usr/share/config/kdm/Xsetup that sets the resolution right for KDM, but it does not run early enough, so login screen looks weird, 70% of the screen is moved to the left and the rest is moved to the right. Kind of hard to explain. I am thinking a proper xorg.conf would solve this issue, but I don't really know how that would work out if the tv is not connected. Here is the script:

#!/bin/bash
if xrandr -q | grep "HDMI1 connected" > /dev/null ; then
        xrandr --output HDMI1 --mode 1360x768
        xrandr --output LVDS1 --off
else
        xrandr --output LVDS1 --mode 1366x768
        xrandr --output HDMI1 --off
fi

Rather basic, checks if tv is connected and makes proper adjustments if so. Would a xorg.conf work, or is there a file parsed earlier that I could use? KDM is started with inittab method. Thanks in advance!

Last edited by KlavKalashj (2011-06-07 10:27:27)

Offline

#2 2011-04-06 18:21:57

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED]Please help me convert this xrandr script into a xorg.conf


ᶘ ᵒᴥᵒᶅ

Offline

#3 2011-04-06 18:23:28

KlavKalashj
Member
Registered: 2008-10-09
Posts: 376

Re: [SOLVED]Please help me convert this xrandr script into a xorg.conf

litemotiv wrote:

I don't know. Same script is there too. Could they be in some kind of conflict?

Edit: After todays KDE update the file /usr/share/config/kdm/Xsetup was wiped, and then KDM was in 800x600 or something, so I guess /etc/kde4/Xsetup is not parsed at all.

Last edited by KlavKalashj (2011-04-06 18:25:40)

Offline

#4 2011-04-06 22:41:42

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,355

Re: [SOLVED]Please help me convert this xrandr script into a xorg.conf

xorg.conf would work (at least it does here with my nvidia card), just have multiple modes.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#5 2011-04-07 07:23:53

KlavKalashj
Member
Registered: 2008-10-09
Posts: 376

Re: [SOLVED]Please help me convert this xrandr script into a xorg.conf

Can you show me yours?

Offline

#6 2011-04-07 07:50:21

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,355

Re: [SOLVED]Please help me convert this xrandr script into a xorg.conf

KlavKalashj wrote:

Can you show me yours?

Google has plenty of such info, all more useful to you than my NVIDIA-based xorg.conf....


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#7 2011-04-07 07:55:52

the_isz
Member
Registered: 2009-04-14
Posts: 280

Re: [SOLVED]Please help me convert this xrandr script into a xorg.conf

KlavKalashj wrote:

...

Sorry for going off-topic, but I love that nick name. Got that from that
Simpsons episode, right?

For those who don't know:

http://www.imdb.com/title/tt0701230/quotes wrote:

Khlav Kalash Vendor: Fresh Khlav kalash! Get your khlav kalash!
Homer Simpson: Hey, uh, could you go across the street and get me a slice of pizza?
Khlav Kalash Vendor: No pizza, only khlav kalash.
Homer Simpson: Aw, shoot... Oh, all right, all right, gimme one bowl.
Khlav Kalash Vendor: [whips out something reddish on a stick] No bowl, stick, stick.
Homer Simpson: [Homer buys one, tries it] Oh, geez! That's just awful.
[finishes it]
Homer Simpson: Now, what do you have to wash that awful taste out of my mouth?
Khlav Kalash Vendor: Mountain Dew or Crab Juice.
Homer Simpson: Blecch! Ew! Sheesh! I'll take a crab juice.
[Homer drinks the can of crab juice, then several more]
Homer Simpson: [burps] Uh-oh. Uh, you got a men's room in there?
Khlav Kalash Vendor: [disturbed] Only khlav kalash. Men's room in tower. Tower! Observation deck!

4f22_khlav_kalash.jpg

Offline

#8 2011-06-07 10:27:02

KlavKalashj
Member
Registered: 2008-10-09
Posts: 376

Re: [SOLVED]Please help me convert this xrandr script into a xorg.conf

I know I should not dig up an old thread, but I stumbled upon a solution and I wanted to post it and mark thread as solved, for future reference. What I did was to simply put the script in ~/.xprofile. After that it worked like a charm.

Offline

Board footer

Powered by FluxBB