Ubuntu :: How To Catch / Supress Errors From Psql
Jun 23, 2010
How can I catch/supress errors from psql? I've got a simple program that will query psql, if a table is there it returns a 1 else returns a 0. The problem is I get the error message as well. How can I trap the error and just get the 1 or 0 to return?
View 1 Replies
ADVERTISEMENT
Feb 14, 2011
I'am new here because usually it's easy to find soluce to problems on unbuntu with google but this time i don't know how to find I was using gscan2pdf and without any explanation the button i've attached to this message appears, i can move it by clic/move, but I can't supress it left clic nothing right clic nothing, i don't know from which app it comes it is always over other windows. Really dont know. I'am on ubuntu desktop, Gnome.
View 3 Replies
View Related
Oct 13, 2010
I have open phoenix SL viewer and I get nagging notification who is on/offline and when I recieve a message. When I minimize it or change virtual desktop, I really dont want to see any notification from this application as it is distracting me.I first tried to find setting in phoenix but I couldnt find any. Notification widget cannot supress it completey, so I went to advanced application settings, but I couldnt find it there either.Is there a way to say to KDE that I dont want any notifications recieved from that application?
View 2 Replies
View Related
Aug 13, 2011
I have installed PostgreSQL 9.0 in Ubuntu 11.04.The following is a bit long-winded and cross-relates to PostgreSQL,I ran the PostgreSQL installation thus:
Code:
sudo su
./postgresql-9.0.4-1-linux.bin[code]....
The problem, obviously, is the "Permission denied" error. What/where am I going wrong? From my directory listing I can see that the permissions for gjd_sentinel_data are drwxrwxrwx with owner/group of postgres. On that basis I can't see why there is the problem.I am wondering if it has something to do with the psql process running as, or owned by, user postgres? Or that I am running as the wrong user? Or something else beyond my experience?
---
Ubuntu 11.04 with GNOME2 classic desktop
Single user.
Dual boot with Windows XP Home
View 1 Replies
View Related
Feb 1, 2010
I'm trying to install postgresql 8.3 on Ubuntu 8.04 LTS server and I'm running into problems starting it. Commands I've done # apt-get install postgresql postgresql-common Things I've tried Starting it manually
# /etc/init.d/postgrsql-8.3 start
Nothing appears in my /var/run/postgresql When I try and start psql as the postgres user I get the following error psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? I've been following the docs at: https://help.ubuntu.com/community/PostgreSQL
View 2 Replies
View Related
Mar 3, 2010
I can't seem to find a multimedia player that works well for me. With VLC, the screen with freeze up and then update itself later to the correct time but it changes to lots of strange colors. With Mplayer, the video will freeze and then catch up later, like VLC does. With Totem, I can't seem to get the subtitles to work correctly. It replaces the subtitles with a font of it's own. I always used Media Player Classic on Windows and it worked really well. When I say "freeze up and catch up later" I mean that the video and subtitles will freeze, but the sound will keep going. The video and subtitles correct themselves a few seconds later.
1. Is there a way to make it so VLC doesn't freeze up and catch up later with strange colors?
2. A way to make VLC and Mplayer not freeze and catch up later?
3. Get Totem to display the correct subtitle font?
View 9 Replies
View Related
Jul 20, 2010
We have a number of servers at work, some production and some non-production. We run some java applications on these servers. At present these java applications send emails via an SMTP connection to our live email servers.
In production all is well, the java apps send emails to customers. However, in the non-production environments all emails must not be sent out. Instead they must end up in some kind of generic inbox.
We don't want to mess with the production setup at all and it isn't an option to lose the non-prod emails altogether. So on non-prod we can reference another SMTP server and send all emails there. So far I've set up a postfix, dovecot, squirrelmail email server which appears to work.
how do I config my new email server so that any emails sent from our non-prod server to fred@hotmail.com, bill@yahoo.com, jenny@gmail.com etc all end up in one inbox?
View 5 Replies
View Related
Jun 17, 2010
I would like to make a shell script that will do the following :- have a web-page using curl- download a picture from the web-page- have a line in the source code of the web page
- catch a string (a link patch) from the line- go to another page of the website from the result of the previous step- repeat all this until there is no match for step 3I know how to :- have the web-page source code using curl (simple, we just have to make "curl- download the picture (as simple as the first step)- have a line in the source code (grep is made for that, isn't it ?)- go to another website from the result of the previous step (it's the same as the first step)But I really don't know how I can do the fourth step of my script.
In facts, I don't know regular expressions and even the shell command that can help me to do this.To be more clear, I would like to store in a variable the string represented by the star (*) in this : <a href="*">Next ></a>
View 12 Replies
View Related
Feb 3, 2010
i write one program,which can dynamiclly be configure by user,using signal SIGHUP.if i start the program in console,it can works well.i.e,i send HUP signal to the process,it can be catched and load the configure file.but,if the program is started from init shell script,in this way,the ppid of the program is 1,the process can not catch the HUP signal but other signal ,such as USR1,can be catched.i don't know if i express clearly.i am not family with shell script.i don't know if it dues to starting from shell script
View 1 Replies
View Related
Mar 27, 2011
I have a Socket library, written in C++, in which the method used to send data never has the opportunity to handle an errno of SIGPIPE. Thus I thought perhaps I should setup a signal handler to receive the signal, but this too is not being called.Is there something that I am missing or doing that is completely wrong? Below is the relevant code. Note that a SIGPIPE signal is generated when the Server is unable to send data to the Client (e.g. the client has terminated).Server code:
Code:
#include <TCPServerSocket.hpp>
#include <string>
[code]...
View 1 Replies
View Related
Feb 2, 2011
right now i am writing bash script for simple everyday todo tasks.script consisit of two files, fisrt is just script (which can delete/append /clear) and second one is todolist.txt which stores my notes.I am litlebit confused about sed!!for example, If my todolist.txt have these lines:
- Writing my Homework
- take my girlfriend to launch
- Take a break
How can sed take my input $@ and delete all line with name "Homework"..i trayed with many sed combination like:
Code:
sed s/$@//g
sed 'd/$@/'
and many more combination with ""/'' or bracket but nothing helped
View 5 Replies
View Related
Nov 2, 2010
I'm sure this has been covered before but how does one go about setting up a dial-up Internet connection without wvdial or gnome ppp?
My brother lives in a remote area with only dial-up Internet service. I got him set up with an external serial modem plus a disc with Ubuntu 9.04 and WUBI. Apparently wvdial is not included in the basic install. I will be visiting him in a few days and I would like get him going with his dial up. He currently has Windows XP and WUBI installed. I tried sending him a disc with wvdial but it didn't include the dependencies. Is there any way I can download a package on a disc?
View 2 Replies
View Related
Jan 26, 2009
I want to catch some outputs in two different log files in bash, file simple.log and all.log So far, the script is started like this:
Code:
xterm -e "(./myscript.sh | tee -a simple.log) >& all.log"
What I want is:
- In simple.log, I want all the stdout but WITHOUT errors.
- In all.log I want BOTH stdout and stderr.
So all is ok, and the output becomes:
all.log
Code:
starting copying files
mv: cannot move ... : permission denied
copying completed
simple log
Code:
starting copying files
copying completed
But, in the new xterm, I'm loosing stdout. There is no output.How can I have the files logged as they are but also have the stdout in the xterm.
View 6 Replies
View Related
Jan 24, 2011
The following C++ program doesn't catch the exception:
Code:
#include <iostream>
using namespace std;
[code]...
View 2 Replies
View Related
Apr 25, 2011
But unable to catch the SIGTERM signal if I do shutdown, as man pages says shutdown genrates the SIGTERM and SIGKILL signals, but we cant handle the SIGKILL signal. My code is working fine if I genrate the SIGTERM signal by Kill command, and also for SIGINT signgal genrated from the CTRL+c key.
Here is my code:
/* Example of using sigaction() to setup a signal handler with 3 arguments
* including siginfo_t.
*/
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <string.h>
[Code]...
View 5 Replies
View Related
May 10, 2011
I start playing with Slackware and I am amazed about its endless possibilities. There is a security advisory for Firefox and 4.0.1 must be installed. Do I need to compile my own FF 4.0.1 build? Or, instead of inventing the wheel, could Slackware's Firefox 4.0.1 package be pulled from somewhere? if my question sounds naive, just trying to get to the point and catch up with security issues.
View 14 Replies
View Related
Jan 24, 2011
I have 2 PCs, one of them is updated with latest updates.
For sure the 2 PCs have the same OS Fedora 14. How to install or catch those updates in order for me to install them offline on the other PC ?
View 2 Replies
View Related
Jul 13, 2011
Whether it is vi or gvim, you can view the current non-default settings by writing ":set" and pressing <ENTER>. However, in FC15, vim clears the settings screen really quickly, not allowing me enough time to catch it. Normally it should pause at the settings screen, and clear it only when I press any key. If others see the same problem, I will file a bug.
View 6 Replies
View Related
Jul 18, 2010
I have a flaky internet connection. So it's important for me to be able to resume partially downloaded files. I would like the YAST software manager to resume downloads of packages where I left off in case of any error. Is this possible?
View 5 Replies
View Related
Sep 12, 2011
Is there a way to catch or stop a Linux shut down after a reboot, halt or shutdown command has been entered?sudo shutdown -r +10 I should now have 10 minutes before the computer shuts down. If I change my mind and decide that I still want to continue running, how could I stop the shut down?
View 1 Replies
View Related
Jul 18, 2010
I have a Linux CentOS server.Is there a way to store all changes made to the hard drive by all software on the server ?
View 14 Replies
View Related
Aug 5, 2010
I would like to know a how to write Perl script to catch all the content in between BEGIN: and END from input file could any body help?
View 9 Replies
View Related
Nov 9, 2010
I just decided to go with Compiz rather than Kwin for my window manager. I have everything working beautifully aside from one little problem... The plasma dock won't pick up clicks any more. The mouse focuses on whatever is underneath the dock, rather than the dock itself. I'm sure there is a setting I can alter to override this behavior, I just can't figure it out to save my life.
Upon further investigation I found that it only behaves this way if I set the dock to auto-hide.
View 1 Replies
View Related
Oct 30, 2010
How do you catch user input while the script is running? Or, how would you make two scripts run at the same time, but use input from one script to the other? The program I'm trying to make, echos text on the screen continuously, but while thats happening, I want the user to be able to input something, so the program can detect the input and display something else. So I thought maybe I could make two scripts run to do each task.
View 5 Replies
View Related
Jun 8, 2010
I have been running Ubuntu with no problems for a while now. Earlier today, I began to download some updates. When I came back to the computer, there was a prompt to restart, but also an error message. I didn't catch the error message until I had clicked the restart button. Now, when I try to access Ubuntu from the dual-boot menu (I run Vista as well), I keep getting the following error message.
[3.190034] Kernel panic - not syncing: VFS: Unable to mount root fs on unkown-block (8,2).I tried safe mode, and I got the same error message. Vista runs normally.
View 2 Replies
View Related
Feb 22, 2010
I',m executing ping, but it didn't work, in order to find the mistake in my network I would like to know how to see the errors:
Code:
18 packets transmitted, 0 received, +12 errors, 100% packet loss, time 17038ms, pipe 4 I want to see this +12 errors. Could I do that?
View 2 Replies
View Related
Apr 21, 2010
I have the following working script. It checks the directory for txt files, if files are there, it copies to another directory or gives error. I would like to exclude "file not found" errors and send them to /dev/null. All other errors should go to the email address as usual.
Code:
#!/bin/bash
function err
{
if [[ $? -ne 0 ]]
[Code]....
View 7 Replies
View Related
Feb 26, 2010
I am running Valgrind on my program. It shows me two errors but mentions only addresses against them and not actual code even on a debug build.
The output is
==23002== Memcheck, a memory error detector.
==23002== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==23002== Using LibVEX rev 1575, a library for dynamic binary translation.
[code]....
View 1 Replies
View Related
Jul 22, 2010
Can anybody tell me what kind of fsck errors are found on a system?
View 5 Replies
View Related
Jan 24, 2010
I have errors on my disk would appreciate some assistance on how to eliminate the errors.Here is the output
Code:
sudo e2fsck -nfv /dev/sda6
e2fsck 1.41.9 (22-Aug-2009)
Warning! /dev/sda6 is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
Pass 1: Checking inodes, blocks, and sizes
Deleted inode 109 has zero dtime. Fix? no
Inodes that were part of a corrupted orphan linked list found. Fix? no
[Code]...
View 3 Replies
View Related