Programming :: How To Determine If VGA Monitor Plugged In

Sep 2, 2010

Does anyone know a way (hopefully a standard/generic way, e.g. through sysfs the interface) to determine if a VGA monitor is plugged in on Linux?

View 2 Replies


Ubuntu :: X Doesn't Start If No Monitor Plugged

May 11, 2010

The computer is used as a server and I connect remotely on it with VNC. It has no monitor. It was working fine until I upgraded to Lucid. Now, it only works with a basic vesa driver (800x600 max res). The log says:

NVIDIA(0): No display devices found for this X screen.
Screen(s) found, but none have a usable configuration.

If I plug a monitor, it work fines. Is there a way to disable monitor detection?

View 6 Replies View Related

Ubuntu :: Eee901 Crashes When External Monitor Plugged In?

Jan 4, 2010

I have an Asus eee901 netbook and it's got an Intel 945 graphics card. If I boot it up, log in, attach an external monitor and then open the Display Settings dialog the screen goes black and the laptop appears to crash. Leaving it for a minute or two does nothing.

However, if I boot up with the external monitor attached then I can open the Display Settings dialog and configure both screens.

This is quite annoying as I've got to reboot if I want to connect an external monitor.

Additionally, if booted with the monitor attached and I choose a configuration where the width of the combined screens is greater than 2048, the screens go black and the same lock up appears to occur. Could it be that the Display Settings dialog isn't checking for the maximum display width the driver supports and is then crashing in both scenarios?

View 3 Replies View Related

Ubuntu :: X Wont Start When A Monitor Isn't Plugged In At Boot Time?

Jun 18, 2010

I have a system I use as a file server running Ubuntu 10.04. I don't have a screen hooked up to this system. When this system reboots, if there is no screen, X wont start on it. This then prevents me from using VNC to get to the desktop.If a monitor is plugged in at the time it boots, then everything works, and I can then remove the monitor. But moving this monitor between computers and crawling under desks is not enjoyable.How can I fix this so X starts on boot even when no monitor is plugged in?The error I get in /var/log/Xorg.log* looks like this:

grep -EnC2 "EE|WW|fatal|error" /var/log/Xorg.0.log
331- (II) Primary Device is: PCI 01@00:00:0


View 5 Replies View Related

Ubuntu :: Server Boot - Doesn't Start-up Unless A Monitor Was Plugged In

Jul 19, 2011

I have an old computer (Pentium 4) without a monitor. To make the most of it I installed Ubuntu server on it and have been using it for almost a year. A couple of months ago I don't really recall what I did but since then it doesn't start-up unless a monitor was plugged in.

I've tried pinging it but it doesn't respond when no monitor is plugged in. meaning it's not even booting correctly.

I'd like to know what the problem is and how to fix it. And I'd really appreciate any help in diagnosing the problem. I just don't know where to start.

View 3 Replies View Related

Software :: How To Programmatically Determine Monitor Type

Jul 7, 2010

I know the tool system-config-display can tell me all about my display but it's not available on all systems and so I'm looking for alternative ways to get my monitor type. Ideally, I could just look in /proc but I don't see anything there and I would like to be able to do so from a script perhaps written in bash or perl. Is there some place to get this info, say in a config file somewhere?

View 2 Replies View Related

Fedora :: Get The VGA To Work Is When We Have Another Monitor Plugged Into The DVI Port And Dual Head The System?

Jun 18, 2010

I've been troubleshooting a friends computer and we've pretty well hit a brick wall. The issue at hand is the video card will not output properly. To be specific, it's an NVidia card with both DVI and VGA ports. We want it to output via the VGA and ignore the DVI because there's nothing plugged in there (the monitor we want to use doesn't support DVI). At any rate, the only time we can get the VGA to work is when we have another monitor plugged into the DVI port and dual head the system. When we do this it also adds an extra "Unknown Monitor" to the display panel. When we just use the DVI the extra "monitor" disappears. now we don't want to have monitor sitting here useless just so we can use the vga out, but there seems little else to do. We tried installing the Nvidia proprietary drivers through the software manager and yum and it failed both ways.

This is really frustrating because it seems like it should be such a simple thing but nothing works. Does anyone else have similar issues? is there something i can do to fix this? I apologize if i've not provided enough info, but ask and i'll post anything you need to diagnose.

View 2 Replies View Related

Ubuntu :: Media PC Won't Boot / Display To HDTV Till Lcd Monitor Is Plugged In

Mar 3, 2010

I am trying to build a media pc, and successfully so till this one little/big problem. I want to be able to turn on my tv, and pc, and have the pc display onto the TV. Ports used are HDMI(pc)->HDMI(HDTV)

But for some reason Ubuntu will not fully load with just the TV plugged in (all i get is a black screen, not even a "no signal" message).Once a LCD monitor is plugged into the VGA port. Then I see a glossy white Ubuntu symbol on the LCD monitor. Then the Ubuntu loading screen appears on both the LCD monitor AND the TV. in mirror mode. And I can see the desktop on both monitor AND TV.

I am using an ATI RAEDON HD 4200 chipset that is on the mobo. I have downloaded the proprietary drivers and installed them. A few things I have tried are the instructions on this page, finding my modeline using a modeline calculator and also going off of a suggestion from a thread on this website, stripping down my xorg file so that the Xserver would autodetect it. Which i think I did wrong because after that, it wouldn't display on TV at all.

View 8 Replies View Related

Fedora :: Determine Which Process Belongs To Which Window In System Monitor?

Feb 26, 2011

I have Fedora Linux 13 64bit system. I use System Monitor to check which process is taking how much memory and cpu. Normally I have dozens of Chrome and Firefox windows open. The Processes tab shows which process is taking how much cpu/ram resources but I unfortunately there is no option like right click and make the window active that matches the PID (the one process that I have currently highlighted). Usually there is a chrome process taking up 30 or 40 percent of CPU while dozens other chrome processes taking much less cpu. I must determine which chrome window ( or any application which has multiple instances running) is taking that much CPU time. So can some one help me to solve this problem?

View 1 Replies View Related

General :: Fedora - Determine Which Process Belongs To Which Window In Monitor?

Feb 26, 2011

I have Fedora Linux 13 64bit system. I use System Monitor to check which process is taking how much memory and cpu. Normally I have dozens of Chrome and Firefox windows open. The Processes tab shows which process is taking how much cpu/ram resources but I unfortunately there is no option like right click and make the window active that matches the PID (the one process that I have currently highlighted). Usually there is a chrome process taking up 30 or 40 percent of CPU while dozens other chrome processes taking much less cpu. I must determine which chrome window ( or any application which has multiple instances running) is taking that much CPU time.

View 1 Replies View Related

Programming :: Make Detect Plugged Number Of NIC's On A PC?

Jun 24, 2010

I am working on debian based OS and my query is,how to make detect the Number of NIC's plugged on a PC.
I describe it: Exact requirement would, assume, If I plug 3 NIC's for a PC,one for Internal Network,one for External Network and Other remaining one for DMZ,so I need to make an application(Firewall Kind)in such a way that,once my PC is started,it should detect how many NIC's are plugged and Whats their role played(As Mentioned above)..?
I hope u guys got a basic idea on what and how it it can be implemented..
I request to send some clues,or some related URL's/Tutorials or which part of the Linux File System needs to be edited(/etc or/proc),etc.

View 2 Replies View Related

Programming :: Determine Which Device The Web Cam Is Using?

Aug 31, 2010

When I run apps like mplayer to use my web cam it uses /dev/video#. For reason unknown to me this number changes and is usually either 1 or 0. I have looked on the Internet after struggling to find how to know which /dev/video device is used. So far I can only presume I have used the wrong terms to find how to determine which device the web cam is using.

View 5 Replies View Related

Programming :: Determine What CPU Thread Is On?

Jul 2, 2010

Is there a library/system call that will return to me what CPU core a thread of execution is running on? I've looked for a bit on the net already and also in /usr/include and couldn't find one.

getcpu() and sched_getcpu() are two that I found, but when I include the appropriate header files (linux/getcpu.h, and sys/sched.h respectively), gcc says getcpu.h doesn't exist and the linker complains it cannot find the implementation in sched.h.

I'm sure I'm doing something really stupid or overthinking...

What I am doing is running an OpenMP application and specifying a list of cpu cores to run on with GOMP_CPU_AFFINITY. I want to make sure that each core is getting the same number of threads.


It seems that this code works, but only with glibc >= 2.6, and my machine has 2.5:

#define _GNU_SOURCE
#include <stdio.h>
#include <utmpx.h>
int main( void )


View 3 Replies View Related

Slackware :: Slackware 13.37 Doesn't Determine Monitor Size Correctly

Jun 12, 2011

I have a display problem since updating to Slackware 13.37. Everything was fine on Slackware 13.1, but when I switched to 13.37 some piece of software came up with the wrong monitor size. I have a 1600x900 LCD monitor but the X screen came up as 1024x768 with blackness on either side of it. Under Slackware 13.1 the X screen came up as 1600x900 as it should without any prompting from me; I didn't even have an Xorg.conf file. I tried using the Xorg.conf file which was needed and work for older Slackwares, eg 12.*, but it didn't work. (Saying it didn't work is a gross understatement! That old Xorg.conf completely screwed up mouse, keyboard, and monitor; the screen was flashing and nothing worked. The only way to get control back was to SSH into the machine from my laptop and reboot. Killing the X server via that SSH console did NOT the flashing or get me back to my console login; only reboot worked.)

I find I can get the screen to be the right size manually by going through KDE's "System Settings" --> "Display and Monitor" --> "Size & Orientation", then disabling "LVDS1" and setting VGA1 to 1600x900. The size of my odd-sized monitor is being correctly detected for the "Auto" choice. Upon reboot LVDS1 stays disabled but VGA1 reverts to 1024x768 so I have to do this each time.I've done some search of the on-line literature regarding the error messages I am seeing in the boot log.

People are suggesting changing all kinds of things to alleviate the side effects of the "conflicting" error message above, even modifying GRUB parameters (which won't work for me since I use LILO).So, I have a manual work around which I must do each time I log in. Does someone know how I can get X or KDE to force 1600x900 upon start (while Linux/X/whoever find and fix the problem) or does someone know of a real fix?

View 6 Replies View Related

Programming :: Determine Files And Directories?

Mar 9, 2010

i made a program to list all the files in a directory,is there a way to determine what are directories and what are files ?

View 5 Replies View Related

Programming :: Determine Sender PID Of A Connection

Mar 4, 2011

I have observed in a process's log file that it is receiving a number of connections from other processes running on the same box.

For example, I see lines of the following:

While I can use "netstat -tlp | egrep '5870|5871'" to see the PID of the listening process. How is it can I find out what PIDs are sending from 23870 and 23548?

View 2 Replies View Related

Programming :: Need To Determine Bitrate Of Stream?

Dec 3, 2009

I'm new to gStreamer and need to determine the bitrate of a stream. Has anyone here worked with this before and does anyone know how to do it?

View 1 Replies View Related

Programming :: Determine The Size Of File In A Script?

Jun 24, 2010

I have the following which works but think there must be a easier one-liner way of doing this which involves not writing to a file but have failed to find something that works This is what I have:


du -m $i > filesize.txt
FILESIZE=$`cat "filesize.txt" | cut -f1
rm filesize.txt

I then use the FILESIZE to compare to a number.

View 3 Replies View Related

Programming :: Non-root User Determine Which Days The Computer Ran?

Mar 22, 2010

Is there any way a non-root user can programmatically determine which days the computer ran during, say, the last month?

The information is in /var/log/messages.* but those files are root:root 640.

Non of the world-readable /var/log files on the Slackware 13.0 development system can be used:boot Not present if boot logging not enabled (default). dmesg No timestamps. lastlog Not enough info. wtmp Rewritten on each boot so not enough info. EDIT: not correct: by default wtmp is rotated weekly and kept for one month as configured in /etc/logrotate.conf xdm.log Not present if xdm not used. Xorg.0.log Not present if X not run.

View 5 Replies View Related

Programming :: Python: Determine If Running In 32 Or 64bit Mode?

Jun 23, 2011

How can I programmatically determine if my python script is being run with a 32 or 64 bit interpreter? Better yet, is there a one-liner I can run that will print out the word size of the current python session?

View 6 Replies View Related

Programming :: C++ Determine If Current User Is Member Of A Specific Group?

Jan 12, 2011

What functions are available on linux for a c++ program to determine if the current user is a member of a specific user group?

View 3 Replies View Related

Programming :: Perl: Determine Error Origin / Meaning In Code Call

Jan 20, 2010

I've been requested to modify a perl backup script we use which mounts a networked NAS machine. The actual mount command is called inside a system() command. In testing, I can do a test of the return value, so I'm able to tell whether or not I've mounted properly, but I can't make heads or tails out of the return on deliberate errors. (Such as mounting a non-existent box.) I'm displaying the returned value, which is 256 in my tests. The man page for mount listed error messages with values from 1 to 64, but no higher. Am I drawing this error value from the system command somehow? And what would be the best way to determine what this error means?

View 6 Replies View Related

Programming :: Monitor A File When Ever Anything Updates?

Jan 25, 2010

I am looking for a way to monitor a file, when ever anything updates. an email gets generated

View 1 Replies View Related

Programming :: How To Monitor The Applet Development

Sep 20, 2010

The embedded hardware is working nicely, and even the antique laptop is now running smoothly using tinycore linux. The device pumps out packets of data at roughly 128 bytes/second (two packets, one 56 bytes, the other 72, alternating every 500mS).

I'd like to create a more general purpose application for monitoring the data being logged. It is a simple matter to have the back-end application write a log file of incomming data, or be a little more sophisticated and just write out changes from the previous packet. The difficulty is that the existing curses-based cli application reads directly from the serial port and can only be run from one place at a time. Once data has been pulled off the port it's not available any more.

A database for logging the data is not necessary, as the application would mostly be used for auditing material consumption, not tracking minute-by-minute usage over any length of time.I could have the existing back-end app. write data to a file accessible through a web server, and allow interested parties to download the information. This would be greatly enhanced by a small front-end app. that can request the data and format it for a more sensible display. Alternatively, is there some way to open a socket (I'm out of my depth here) so a free-standing application could simply request the data, and do the front-end formatting? This presents problems in that it wouldn't be multi-platform capable.

View 2 Replies View Related

Programming :: Bash To Monitor IP Addresses In A Txt File?

Oct 13, 2010

This code uses ping to check connectivity to a remote location and logs it to a .html file which is then stylized by css..


#! /bin/bash
path="$HOME/Desktop/IP_Monitor" #Path to write out files
ALT="0" #For styling alternative row


I need to add a feature such that instead of hardcoding the ip address .. it takes them from a list and makes new files for each ip address for logging.. And also when log files are completed , They should be compressed using tar. How should i go about adding both these.. This is my first bash script.

View 6 Replies View Related

Programming :: Monitor A Folder For New / Change Files?

Aug 30, 2010

how I can monitor a folder and get the name of newly created files or files that their size is changing? (in Perl or Linux shell script)

View 5 Replies View Related

Programming :: Need To Monitor Samba Share Access

Jul 1, 2010

i want to do a script that check samba shares with command smbstatus and see if one of the folders is accessed by unauthorized user by comparing with list of authorized users.

View 5 Replies View Related

Programming :: Can Probe Monitor Multiple Instances Of Tomcat

Jan 31, 2011

I'm using Probe to monitor Tomcat5. The problem is that I've multiple instances of Tomcat.Can be used Probe to monitor multiples instances of Tomcat without having to deploy it to each instance?

View 2 Replies View Related

Programming :: Monitor When Files Are Copied To Another Volume And Log The Date?

Jul 29, 2010

I'm pretty sure I'm in over my head with this one. Here's the situation: My practice has been, after downloading and making changes to files, to use a certain GUI cataloging app to move them to categorized sub-folders inside one "umbrella" folder, then copy them to (what are in most cases) identically-named sub-folders in another one on the same HD. Emulation of this process on the command-line would look like:

cp holytrousers.jpg /home/metoo/Pictures/fancypants/
mv holytrousers.jpg /home/me/Pictures/pants/

This was in anticipation of making a "twin" of the second, now bigger, "umbrella" folder on anexternal HD and continuing the practice. At some point I intended to get rid of the original 2nd "parent folder" and just keep the first one on the drive with my OS install, using the twin on the backup folder as I'd been doing when it was on that same drive.

I'm very close (a matter of 2 to 3 weeks, it looks like) to getting a backup/external drive in a reasonably-reliable external enclosure. With the backup, originally the "twin" of the bigger "umbrella" folder and its sub-directories, on that other drive, I also anticipate that I will likely go at least a few days between backing up any new files to it.

For the sake of argument, let's say I gave the external the name "tuxs_twin". Is there any way to monitor copying activity from /Pictures/ on the boot HD to /media/tuxs_twin/Pictures/ and log the dates and times, then have something running that checks the log every so many hours and puts up a reminder dialog saying /tuxs_twin/Pictures/ hasn't had any new files copied to it since date X at time Y? I hope this was clear enough. If not, I'll try to break it down further when I know which details are confusing folks.

View 2 Replies View Related

Programming :: Write DOS Script To Monitor The PC's Network Status?

Jan 15, 2010

There are a few PCs on the network that lose network connection every so often -- sometimes these old beasts have a power failure and owing to a bug in the BIOS the NIC doesn't necessarily initialize properly, which requires a reboot to correct it. Got me thinking of a band-aid -- have the PC ping a specific IP address, and if it cannot ping then it forces itself to reboot.

IF I were to write it in BASH I'd do it like this:

HOST=<some meaningful hostname or IP address>
for ipaddy in $HOST
count=$(ping -c 1 $HOST | grep 'received' | awk '{print $4}')
if [ "$count" = "0" ]; then
sh usr/bin/reboot

In English: send 1 ping to the IP address. Grep through the results to see how many of 1 ping was returned. IF it returns 0 pings then reboot. I'm sure the reboot command would have to be groomed a bit for sudoers but that's beside the point here.

So, HOW do we write something like this for DOS? Stop giggling (lol). No really, I have Windows 2000 & XP machines that need some sort of script or method of knowing (at intervals) of when they're not talking to the Host system, and need to reboot to fix it. I was thinking to write a simple test script, drop it on each of these machines and use the Windows task scheduler to run it every 30 minutes.

View 3 Replies View Related

Copyrights 2005-15, All rights reserved