How to get information about monitor in use? (Solved)
- LazY Puppy
- Posts: 1934
- Joined: Fri 21 Nov 2014, 18:14
- Location: Germany
How to get information about monitor in use? (Solved)
Hi.
I'm using my OS on several different machines with different types of monitors.
To get some special functions to work, I need to setup a variable (by a script) dependent on the monitor in use.
So how can I get information about the monitor in use?
Is it possible to get such information already at boot up (before the graphical X desktop appears on the screen)?
Thanks in advance.
RSH
I'm using my OS on several different machines with different types of monitors.
To get some special functions to work, I need to setup a variable (by a script) dependent on the monitor in use.
So how can I get information about the monitor in use?
Is it possible to get such information already at boot up (before the graphical X desktop appears on the screen)?
Thanks in advance.
RSH
Last edited by LazY Puppy on Mon 31 Oct 2016, 16:20, edited 1 time in total.
RSH
"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:
No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:
"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:
No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:
@ Trapster,
You're right. Mine shows the following:
Thanks and kind regards,
vovchik
You're right. Mine shows the following:
Code: Select all
cat /var/log/Xorg.0.log | grep "Monitor name"
[ 45.652] (II) RADEON(0): Monitor name: HP LE2201w
vovchik
- LazY Puppy
- Posts: 1934
- Joined: Fri 21 Nov 2014, 18:14
- Location: Germany
Thanks to all.vovchik wrote:@ Trapster,
You're right. Mine shows the following:Thanks and kind regards,Code: Select all
cat /var/log/Xorg.0.log | grep "Monitor name" [ 45.652] (II) RADEON(0): Monitor name: HP LE2201w
vovchik
I think this is going to be helpful.
RSH
"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:
No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:
"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:
No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:
What info do you need? Monitor name? Resolution? Both you can get before Xorg starts, but resolution can *change* when you launch Xorg.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
- LazY Puppy
- Posts: 1934
- Joined: Fri 21 Nov 2014, 18:14
- Location: Germany
I need exactly information about where the monitor is connected to the graphics card (VGA-0 or VGA-1 or LVDS-0 (HDMI-0) or LVDS-1 (HDMI-1) etc.pp).jamesbond wrote:What info do you need? Monitor name? Resolution? Both you can get before Xorg starts, but resolution can *change* when you launch Xorg.
RSH
"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:
No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:
"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:
No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:
- LazY Puppy
- Posts: 1934
- Joined: Fri 21 Nov 2014, 18:14
- Location: Germany
Yes, xrandr seems to return necessary info.
Though, examining /var/log/Xorg.0.log will do what I need, as it seems to be updated repeatedly during the session.
Again thanks to all.
Though, examining /var/log/Xorg.0.log will do what I need, as it seems to be updated repeatedly during the session.
Again thanks to all.
RSH
"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:
No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:
"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:
No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:
- LazY Puppy
- Posts: 1934
- Joined: Fri 21 Nov 2014, 18:14
- Location: Germany
Currently all the machines in use don't use the HDMI connection for the monitor, so I could limit this just to VGA only (nvidia and ati graphics cards).
So here's what I'm doing in my script to get the necessary monitor properties to change wallpaper dependent on the current desktop (viewport).
So here's what I'm doing in my script to get the necessary monitor properties to change wallpaper dependent on the current desktop (viewport).
Code: Select all
# Get Data from current used Distro Configuration File
. /etc/DISTRO_SPECS
. /etc/"$DISTRO_FILE_PREFIX"_"$DISTRO_VERSION".cfg
CFGFILE="`realpath /etc/"$DISTRO_FILE_PREFIX"_"$DISTRO_VERSION".cfg`"
INFOFILE=/var/log/Xorg.0.log
MONCONNECT=""
if (grep -i 'Output VGA-1 connected' $INFOFILE >/dev/null) then
echo "VGA-1"; MONCONNECT="VGA-1";
elif (grep -i 'Output VGA-0 connected' $INFOFILE >/dev/null) then
echo "VGA-0"; MONCONNECT="VGA-0";
fi
if [ "$MONCONNECT" != "" ]; then
NEWMYXFCEWPPROPERTY="/backdrop/screen0/monitor$MONCONNECT/workspace0/last-image"
sed -i 's|'"$MYXFCEWPPROPERTY"'|'"$NEWMYXFCEWPPROPERTY"'|' "$CFGFILE"
fi
RSH
"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:
No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:
"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:
No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink: