Programming :: Not Getting Right Output To Correct Terminal Window
Jun 17, 2010
I have a server client prog in which server is my 'agent' and client is 'manager'. Following is the code for both agent and manager. I want my agent to send what manager is requesting. But it is not working the way I want. The parameters which manager is requesting, agent has to send to manager but in this program result for those parameters is shown on agent's own terminal window. Where as I want them on manager's window. Secondly, there result is not correct, means it is giving ' 0 K ram and 0 no of process....
Code:
//code for MANAGER
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h> .....
View 2 Replies
ADVERTISEMENT
May 28, 2010
How do I find out how many characters fit into a terminal window horizontally and how many lines the terminal window is high (i.e. how many rows and columns are visible - the width and height)? I am using c++ and Linux Mint 8 - Gnome.
View 8 Replies
View Related
May 5, 2013
I'm piping stdout from mplayer to awk, but the output stutters.
Code: Select allmplayer audiofile.m4a 2>&1 | awk -vRS="
" '$1 ~ /A:/ {print $0; fflush();}'
Instead of a steady output of lines to the terminal, output only occurs after a few seconds, between 6 or 12. This happens whether the input is from mplayer or avconv/ffmpeg. This never used to happen (a few years ago) so I wondered whether an awk update caused this to happen.
View 6 Replies
View Related
Nov 16, 2010
i'm not sure for using the correct channel here but i hope someone out there can answer my little questions. 1st in older version i was able to change the settings of the terminal look as the font color, background color and so on. I was also able to define a default window size of a new terminal window. But since after upgrading to to the first release this year and a complete new installation of the current release Maverick i do not find this option anymore. Is there a way how to set up the terminal default window size?
View 9 Replies
View Related
Feb 7, 2010
Newly installed Debian system from years with Fedora. Ran system update and system got hosed, booted but no Gnome. Got Gnome back after MANY 'aptitude upgrade's. Xemacs disappeared! Along with other things I installed. Tried to install Xemacs but it is broken and will not install, complains about dpkg TOO current(?). So downloaded Xemacs for Xemacs.org and compiled source, installed.
Now when I start Xemacs is does not run in an X window but runs emacs in a terminal window. If I run it from a script, it complains about 'not in tty window'.
My env show:
Code:
The Xemacs install on Debian ( Bug written ) Install and configuration of Xemacs from source. A better understanding of the Debian upgrade process.
View 5 Replies
View Related
Mar 1, 2011
I have problem with internet connection on my Ubuntu, but the major problem is that i can't copy the message from my terminal while I type:ifgonfig and paste it here to show you what is the problem.
View 9 Replies
View Related
Feb 26, 2010
I am new to Samba.I'm running Fedora 10 and I've just download samba successfully and have the smb service running on my system.I'm in GNOME and select System and then Administration and Samba does not appear in the drop down menu.I have an NFS menu selection but no samba selection.I ran yum install and it installed successfully. If I can't get the samba config window is there a way I can configure in terminal window?
View 1 Replies
View Related
Aug 8, 2010
What is the command for "Open a terminal window and run application in this terminal
View 4 Replies
View Related
Dec 14, 2010
hello
I tried to find a good subject but it was the best of mine, anyway I'll explain it here.
some time I do some thing like installing a new application in Linux terminal of my office PC but it take a long time and I have to go home during its installation or configuration process that it is not good to cancel it.My current solution is abandoning the process until next day. I wanted to know is there any way to redirect an input and out put of a terminal to another one, if it works I can continue my abandoned process by ssh to my Linux office PC and redirect that terminal to my new remote sshed terminal from my home.
Thank a lot for any help.
View 4 Replies
View Related
Feb 13, 2010
I am new to Fedora. I just put it on my H.P AMD Quad core machine. I have eight gigs of ram and plenty of storage. I loaded it into Microsoft Virtual PC, and it boots fine and seems to work ok in tty1. I am a cit student at a community college and seem to get little to no support from my teacher who is teaching a beginning course on Linux. He told me to ask here. When I use ctrl-alt-f2 or f3-f4 and so on all the way up the levels, I got green lines across the screen, as if the graphics card is not working. I have 23 inch monitor and a Nvidia 9500 GT ddr3 512mb graphics card that I installed after I bought the computer. My host operating system is Windows 7 , and is working fine. I am now two weeks behind on labs for this class and getting nervous, I need to be able to go to tty2 to do these labs.
View 1 Replies
View Related
Aug 26, 2011
I find xcompmgr more than adequate for making a desktop look pretty modern, and I don't like the more extravagentCompiz gimmicks - but there is one thing that irritates when using xcompmgr which someone here might have worked round.
Rounded window borders don't draw and redraw properly when using the Terminal (gnome-terminal and the LXDE and Xfce ones) or system monitor and moving them from their default place. You get this little white botch at the corners. I'm not massively technical and I'm ambivalent about how much more I want to learn as I have plenty of creative outlets already, but I would like to solve this. Somehow xcompmgr is treating these programs as a different class? It's capable of drawing the window borders properly as it is just these two programs that get botched. Possibly this doesn't get noticed as maybe people usually use xcompmgr with openbox and LXDE and their square window borders. I did do a search but there was nothing matching what I saw.
View 3 Replies
View Related
Jan 24, 2010
if you do the command conky in terminal, it starts conky ofcourse, but it also shows output to that terminal so you can't do any other commands to that terminal, Is their an option like you can do with the '&' sign in other cases? If you do the '&' sign with conky it still gives output, also the conky -d command gives output...
View 9 Replies
View Related
Feb 22, 2011
Is there a way to set a default terminal window size when I click on the "Terminal" icon? I need my terminal to be of a certain size every time I click on it?
View 2 Replies
View Related
Jan 15, 2009
I have a script on several of our systems that runs a series of checks, and e-mails the results to the system administrator. The workstations in question are running a derivative of Fedora Core. The code for the script is listed below.
Code:
#!/bin/bash
# This script will run the df and uptime commands,
[code]...
View 2 Replies
View Related
Dec 9, 2010
In the control centre under multi media selector for configuring GStreamer it has Autodetect and two other setting, X Window System (No Xv) and X Window System (X11/XShm/Xv) etc. When I test the X Window System (No Xv) the test card in full screen is far better then autodetect, should I keep this setting, the reason I ask is I can't notice the difference when watching video.
View 1 Replies
View Related
Jun 17, 2010
I am using embedded Linux. File open is successful. The file has all the permissions. It is present in current directory too. The size is about 27KB. But s.st_size says it is zero.
inputFileName = "abc.mp3";
FILE* inFile = NULL;
inFile = fopen(inputFileName, "r+b");
[code]...
View 2 Replies
View Related
May 31, 2011
Lets say I have a site "Website1.com"
On that site I want to run a little javascript that verifies that the site was accessed as "Website1.com" and not "dev-Website1.com"
If it was accessed correctly, nothing happens. If it was accessed incorrectly, it displays an error saying "You are trying to access this site incorrectly."
What is the simplest way to accomplish this?
View 1 Replies
View Related
Jun 20, 2010
i m using atoi() to convert char value to int. and then passing that int as a swtich variable.switch goes in a case and exectuing that particualr function but returning 0 value....for example: i am finding no of process() and system up time().when switch program goes in system up time it gives right values means correct no of days, hrs , min and sec but when it goes in no of process() it gives 0 answer.
View 8 Replies
View Related
Mar 18, 2010
I need to spawn 2 processes in parallel and each takes an hour or so to finish. Is the following one of the correct ways of using `at` in a script run by crontab?
Code:
#!/bin/bash
# define the env var, cd, etc... assume everything ok up to this point
date +"The start time is %H:%M:%S"
rm -f a.fin
at now <<END_OF_AT
do_a &> a.log
[Code]....
View 2 Replies
View Related
Feb 8, 2011
I'll post the entire code here, and then specifically highlight what is just failing in a fashion I'm apparently incapable of fixing a few hours later:
Code:
#!/usr/bin/expect
# The script should be called with a file in the directory called sshServerList
# That file has the following format:
# Line # | Contents of line
[code]....
I've had all kinds of different results and problems, but I've never been able to successfully log into multiple servers, though the first server in the list most times works okay (though might not on this iteration). I'm a bit hack and slash and I would be very greatful not only for a solution, but any tips on how I should have done this and places where I could clean up my code.
View 1 Replies
View Related
Apr 11, 2011
I have a directory that has a bunch of files and directories under it that I need to correct the filenames of. In fact, I plan on running this as a cronjob to keep checking filenames for certain characters. I want directories and filenames with spaces or pluses (+) to have those certain characters replaced with underscores (_). I know that this will involve sed but I'm not sure what else. A simple shell script would handle it.
View 1 Replies
View Related
Apr 8, 2011
Im doing a sudoku-solver as a school assigment in Java. It is supposed to solve both 6x6, 9x9 and 12x12 boards.Im pretty much done with my algorithm(brute force), but I'm having a hard time figuring out how to calculate the right Box for a Square. I found this snippet:
Code:
// calculate BoardPos for index, where index is 0..80
void loadBoardPosFromIndex(BoardPos &pos, int index) {
pos.index = index;
[code]...
This works on 9x9 boards, but I really dont get the math behind this, and how I can create a generic rule for both 6x6, 9x9 and 12x12 boards.
View 4 Replies
View Related
Feb 12, 2010
I have having some trouble working with wide characters, which is,
Sample code:
TCHAR fname[512];
_tcslcpy(fname, L"/root/Desktop/all/TheGrandTunnels.fgc", 512);
[code]...
View 4 Replies
View Related
Jan 10, 2011
What is the output of "date -u +%jXfce|sha256sum|sed 's/W//g'" if you run it in a terminal emulator?
View 3 Replies
View Related
Mar 13, 2010
Whenever I boot my fedora 12, even before asking me for my login name, etc., there comes a message saying "Can't update IECauthority file : /var/gdb/.IECauthority" and hangs at the place. Even the mouse doesn't move. If I were able to open the terminal somehow, perhaps by changing the file permissions, I could get something. Also, when I boot from ubuntu 9.10 and try seeing what's in the /var directory of fedora, it doesn't show anything, even if I display the hidden files. If the directory gdb doesn't exist, why is it showing the error ?
View 7 Replies
View Related
Nov 2, 2010
Anyone knows what is the correct package to install javadoc on Fedora???
View 3 Replies
View Related
Sep 14, 2010
I have a very simple bash script:echo -n Create home directory?:
read HOMEDIR
if [ $homedir="y" ] || [ $homedir="yes" ]; then
homeval=" --makehomedir"
[code]...
View 6 Replies
View Related
Sep 12, 2011
How can i get the RAM Memory on system in terminal when i have 3 GB with an output like this:
3072
or
3145728
[code]....
View 8 Replies
View Related
Apr 17, 2010
I would like to capture all output spewed to a terminal session including processes that are terminated that were invoked from a script running in a terminal window. this is beyond capturing just stderr and stdout . for example
{
./script
} 2> stderr.cap 1>stdout.cap
if script is terminated (including because of memory violations) I get spewed output to the terminal I would like to capture that spewing to a file automatically or to a bit bucket /dev/null Is there another filehandle which can be redirected to do this? If so how or is there another way???
View 3 Replies
View Related
Jun 19, 2010
I want to know how to get the current coordinates of the mouse outputted to terminal, for use in a bash script.
View 1 Replies
View Related