SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2009-12-14 06:49:46

tonyoptical
#! CrunchBanger
Registered: 2009-09-08
Posts: 218

[Solved] lxandr

Dear All

I am using my laptop on the road and plugged into a docking station connected to a 24" TFT when in the office.
Everytime i am docked i have to adjust manually by lxandr the display settings -> turn off internal lcd and use external TFT only.
Two strange things occur whilst doing this:

- the volume control icon disappears as soon as i switch by lxandr to the external display
- the conky display is not at the very right side of the screen anymore - i have to manually restart conky to move it to the right again.

Does anyone know how to make this process easier?
Thx.

Last edited by tonyoptical (2009-12-18 18:31:21)

Offline

Help fund CrunchBang, donate to the project!

#2 2009-12-14 07:07:18

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,282

Re: [Solved] lxandr

What are the external monitor dimensions in pixels?  What does the external video port show up as in xrandr?

Make a shell script:

#!/bin/sh
xrandr --display VGA --mode XXXXxYYY --display LVDS --off
volwheel
conkywonky

Put it in /usr/bin and make it executable.  Make a keybinding for it in rc.xml or run it from gmrun (alt-F2).

If your external monitor is something other than VGA, replace VGA with that.  Replace XXXX and YYY with the external monitor's native resolution.

Offline

#3 2009-12-14 13:52:39

tonyoptical
#! CrunchBanger
Registered: 2009-09-08
Posts: 218

Re: [Solved] lxandr

Hi

Thx. for your reply - This is what i did:

#!/bin/sh
xrandr --display TMDS-1 --mode 1680x1050 --display LVDS --off
volwheel
conkywonky

Screen resolution is NOT adjusted. Just another vol control icon appears.
TMDS-1 is what i found in grandr.

Offline

#4 2009-12-14 14:58:28

thil77
#! CrunchBanger
Registered: 2009-01-12
Posts: 193

Re: [Solved] lxandr

the volume icon disappeared because of a bug in tint2 panel.
the bug is fixed in latest PPA version
see http://code.google.com/p/tint2/wiki/Ins … 8Jaunty%29

Offline

#5 2009-12-14 15:10:43

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,282

Re: [Solved] lxandr

Hmmm...what do you get when you run xrandr without any arguments in a terminal with the external monitor attached?  (I should have asked this first.)

Offline

#6 2009-12-14 16:14:27

tonyoptical
#! CrunchBanger
Registered: 2009-09-08
Posts: 218

Re: [Solved] lxandr

Hi

Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 1680 x 1680
VGA disconnected (normal left inverted right x axis y axis)
LVDS connected (normal left inverted right x axis y axis)
   1024x768       60.0 +   85.0     75.0     70.1     60.0 
   832x624        74.6 
   800x600        85.1     72.2     75.0     60.3     56.2 
   640x480        85.0     72.8     75.0     59.9 
   720x400        85.0 
   640x400        85.1 
   640x350        85.1 
TMDS-1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050      60.3*+   59.9 
   1280x1024      75.0     60.0 
   1440x900       75.0     59.9 
   1280x960       60.0 
   1152x864       75.0 
   1280x720       60.0 
   1024x768       75.0     60.0 
   800x600        75.0     60.3 
   640x480        75.0     59.9 
   720x400        70.1

Offline

#7 2009-12-14 16:32:25

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,282

Re: [Solved] lxandr

My mistake. roll  Replace both instances of --display with --output in the script.

You might also want to throw in a `pkill volwheel` before `volwheel` in case the first instance is still running and just not showing in tint2.

To go from docked to undocked, make another script with the same commands, except the second line would be

xrandr --output LVDS --mode 1024x768 --output TMDS-1 --off

(This may cause X11 to restart.)

Offline

#8 2009-12-14 17:29:33

tonyoptical
#! CrunchBanger
Registered: 2009-09-08
Posts: 218

Re: [Solved] lxandr

Hi

This latest version does the trick! Great!
Just conky is not restarted and still does not align to the right screen corner.
Alt-F2 + conkywonky isstill  manually needed.

Regards

Offline

#9 2009-12-14 18:55:46

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,282

Re: [Solved] lxandr

It could be that the system just needs a moment to stabilize after the screen swap.  Try replacing `conkywonky` (which is what you're running with the "Restart Conky" menu item) with

(sleep 5s && conkywonky) &

Offline

#10 2009-12-14 21:47:51

tonyoptical
#! CrunchBanger
Registered: 2009-09-08
Posts: 218

Re: [Solved] lxandr

Sorry - no success ... conky display stays in the middle of the screen
I gave dock.sh another go after screen size had been adjusted ...
- another volwheel appears
- conky display moves to the right screen side
Guess there's still a minor glitch in the shell script ..

Offline

#11 2009-12-15 14:53:16

brummbaer
Member
From: portland, or
Registered: 2009-10-16
Posts: 47
Website

Re: [Solved] lxandr

just an odd thought, but does your .conkyrc set the alignment for top_right (or whatever_right)? and it might be simplest just include a kill command for conky in the script worked out by pvsage, then sleep and relaunch once everything's set up on the ext. monitor?


Hell, there are no rules here - we're trying to accomplish something.  - T. A. Edison
http://www.grendelchen.com/  | brummbaer456 at gmail dot com

Offline

#12 2009-12-15 20:40:38

tonyoptical
#! CrunchBanger
Registered: 2009-09-08
Posts: 218

Re: [Solved] lxandr

Hi

I use the standard conky config of 9.04 standard distribution.
Guess that this is the one adjusting the display on the right top corner of the display.
But actually i have no idea how to set up a "kill" for conky and "sleep" before all new display settings are set up.

Regards

Offline

#13 2009-12-15 21:23:23

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,282

Re: [Solved] lxandr

Try this.

pkill conky
(sleep 5s && conky) &

Offline

#14 2009-12-16 19:16:12

tonyoptical
#! CrunchBanger
Registered: 2009-09-08
Posts: 218

Re: [Solved] lxandr

pvsage wrote:

Try this.

pkill conky
(sleep 5s && conky) &

Offline

#15 2009-12-16 19:27:00

tonyoptical
#! CrunchBanger
Registered: 2009-09-08
Posts: 218

Re: [Solved] lxandr

Hi

Excellent - Thank you - Finally this one achieved the desired result:

#!/bin/sh
xrandr --output TMDS-1 --mode 1680x1050 --output LVDS --off
pkill conky
(sleep 5s && conky) &
pkill volwheel
volwheel
(sleep 5s && conkywonky) &

Now i am going to figure out the "undock" - version ....

Offline

#16 2009-12-16 23:30:21

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,282

Re: [Solved] lxandr

^ You can remove the conkywonky line; the conky lines have that covered.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo