Programming :: Get Width/height Of A Terminal Window In C++?

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


Programming :: Use Awk And Sed To Extract Height And Width Of File

Aug 3, 2010

I am trying to write commands that extracts the height and width of a video file via ffmpeg. I have the following working so far:

This gives the following answer in widthxheight format with an extra , 720x480,

How can I instead run 2 separate commands that give me height and width separately? I want some command to give me 720 and another command to give me 480 and I dont need the x or the ,

If you need to know this is what ffmpeg -i 2>&1 gives as output

Seems stream 0 codec frame rate differs from container frame rate:

At least one output file must be specified

View 6 Replies View Related

Programming :: Get Console Window Width - Why Ioctl Always Return 0 Width

Jul 1, 2010

I use ioctl to get the cosole window size (the SSH window).

I use the following code:

When I debug on linux pc, it gives me the correct window width. But after I try it on router (this is my enventual place where my code shall run), ioctl always give me 0 width, that is, numberOfColumnsOfTerminalWindow == 0. but the returnValue is 0 which means that the function call succeeds.

View 2 Replies View Related

Software :: Imagemagick - Height-and-width Not Deterministic When Crop An Png File

Sep 8, 2009

After spending a few hours and having some little sleep, I am very puzzled and disturbed by the fact that new-new-02-5-1.png does not have the intended 818x788. It must have to do with cropping with nonzero offsets.

View 2 Replies View Related

Ubuntu :: View Image File Properties In Folder Windows - Height Width

Mar 3, 2011

I am trying to sort image files I've assembled for document production, and I need to be able to see the height and width of the images without having to open them one by one. Is there a way to view an image's physical size in the folder window?

View 1 Replies View Related

Ubuntu :: 10.4 - Setting Default Terminal Window Size To Screen Width

Oct 3, 2010

In 10.4 I had set my default terminal size to my screen width - I type some long commands. After running an update this morning, my terminal comes up in the install default size. Using the preferences dialog, I cannot find the control to set the default width. Has it been removed? I hope I'm looking in the wrong place, but I have a chilling feeling that it's been dropped or perhaps just accidentally commented out.

View 2 Replies View Related

Programming :: How To Find Out Width Of Terminal

Mar 19, 2010

I wonder how CLI applications know the width of the terminal. For example, how does ls know how many columns to use?

How do package managers like pacman know what length to make the download progress bar?

Also, how do they redraw the progress bar in the same line?

View 11 Replies View Related

Programming :: Console Window Size - Why Ioctl Always Return 0 Width

Jul 1, 2010

I use ioctl to get the console window size (the SSH window). I use the following code:
struct winsize ws;
int returnValue = ioctl(pCommandStructure->terminal, TIOCGWINSZ, &ws);
int numberOfColumnsOfTerminalWindow = ws.ws_col;
When I debug on linux pc, it gives me the correct window width. But after I try it on router (this is my enventual place where my code shall run), ioctl always give me 0 width, that is, numberOfColumnsOfTerminalWindow == 0. but the returnValue is 0 which means that the function call succeeds.

View 2 Replies View Related

Programming :: Adjust Table Width So That It Fits To Page Width

Mar 22, 2010

A couple of days I started using latex and have still one question about the table width. My table is too wide for a page. How can I adjust it so that it fits on the full width of a page? Can I use a command or do I have to specify each column widths by hand?

My table looks like this;

I did try several commands likeextwidth, esizebox, setlength but didn't found the solution yet.

View 2 Replies View Related

General :: Get The Tmux Window Full Width?

Jun 21, 2011

tmux shows screen like this:


Window has non-maximum width, attempt to copy text from it leads to "" getting in text. How to fix it and get the tmux window full width?

View 2 Replies View Related

General :: How To Customize Width Of Window Tabs In Kde Task Bar?

Mar 27, 2010

My task bar is quite broad. so when ever i open more than 6 windows at a time then the task bar adjusts the tabs in two row. how can explicitly specify the width for those tabs. so that they all fit in one line.

View 1 Replies View Related

Ubuntu :: Change 'line Width' For Window Edge Resizing?

Dec 2, 2010

This has bugged me forever.....and I mean really bugged me. The 'pixel width' is too low, such that trying to get my mouse to line up just perfectly on the window edge to get the resize icon, is very difficult. After a bit of searching, I discovered Alt F8, which, for those that don't know, is a resize shortcut and works very well, however, I will still use the 'edge resizing' option quite a bit, and would like to widen the 'line' a few pixels. Is this possible in a user settings file, or is this hardcoded? I am learning to develop, so I wouldn't mind looking into this one as a beginning project. If that's the case, could someone point me to the appropriate package?

View 5 Replies View Related

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 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 View Related

General :: How To Change X-Windows Default Border Width For All Window Frames In Ubuntu

Jun 14, 2010

Way back from Windows 3.x days to the latest 64bit Windows 7 (classic/standard theme)there is a way to make the window edge border wider then 1 pixel.I often use 3 to 5 pixel to make it easy to grab on hi-resolutions displays and hi DPI monitors.There doesn't seem to be an easy or obvious way to do this with the Gnome X-Windowing system?

View 3 Replies View Related

Programming :: Get String Width In Pixels In Xlib?

Aug 3, 2009

I'm trying to get the width of a string in pixels this way:

Display *disp;
int len;
disp = XOpenDisplay(0);
font = XLoadQueryFont(disp, desc );


I'm getting negative numbers as the the pixel length, eg -7275

View 3 Replies View Related

Ubuntu :: Unable To Define A Default Window Size Of A New Terminal Window?

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

Software :: When Start Xemacs Is Doesnot Run In An X Window But Runs In A Terminal Window

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 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:


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

Ubuntu Networking :: Copy / Paste From Terminal Window To Another Window?

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

Server :: Can't Get Samba Config Window / Way Can Configure In Terminal Window?

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

Programming :: Fortan Error - Nonnegative Width Required In Format String At - 1

Jun 10, 2010

I'm in the process of debugging and compiling about sixty FORTRAN 95 programs and could use a little bit of your help before my brain is fried and fingers are cramped. Thanks for your time!

I receive the following errors:

Here is my code:

View 5 Replies View Related

Ubuntu :: Command For "Open A Terminal Window And Run Application In This Terminal ?

Aug 8, 2010

What is the command for "Open a terminal window and run application in this terminal

View 4 Replies View Related

Debian Multimedia :: Xcompmgr 'master' - Rounded Window Borders Don't Draw And Redraw Properly When Using The Terminal (gnome-terminal And The LXDE And Xfce Ones)

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

Ubuntu :: Set A Default Terminal Window Size When Click On The "Terminal" Icon?

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

Ubuntu :: 2nd Screen Too Stretched - Get The Vertical Height Corrected?

Nov 13, 2010

The screen info says it is 1280*1024*60Hz.I put this into the nouvou monitors hardware control centre. The screen is too stretched in the vertical. Some icons are cut off at the top.The screen is a V7 videoseven.For some reason the menu controls on the screen only work on the non screen movement icons. I cannot access them .how to get the vertical height corrected? If I have I will go back to the NV proprietary drivers but I would prefer not to do so.

View 2 Replies View Related

Ubuntu :: Change Main Menu Height To Match Smaller Fonts?

Aug 30, 2010

I reduced my system font sizes from default 10 down to 8, but I want to also reduce the height of the Main Menu correspondingly. I've searched the forums and Google, but can't find a method for doing this. See the screenshots - both menu heights are exactly the same, but if I reduce the font size, I'd like the menu to shrink too.

View 3 Replies View Related

Ubuntu :: Where Is Only A Terminal Window Available

Aug 31, 2010

I changed my desktop from ubuntu to kubuntu (after installation) using three commands:

sudo apt-get install kubuntu-desktop Select kdm as dm
sudo apt-get remove ubuntu-desktop


View 3 Replies View Related

Fedora Installation :: No Terminal Window In KDE 4.2.3-1

Jun 2, 2009

Have installed fedora core 10 [kernel on intel core 2 Duo machine all disks encrypted. When I try to obtain a terminal window from run level 5 (KDE desktop environment) I get a bouncy terminal icon that disappears after about 15-20 seconds. No terminal window. The only way to get a command line is to press ctrl-alt-F2 and return to runlevel 3. How do I get a functional command line in runlevel 5?

View 6 Replies View Related

Fedora :: Get A Transparent Terminal Window?

Sep 9, 2010

if there was an easy way to get a transparent terminal window. I am running Fedora Core 11 in Gnome desktop. I am sort of a newby and i am really getting into Linux but i want to know some of the cool features too.

View 4 Replies View Related

OpenSUSE :: Log Terminal In X Window System?

Jul 5, 2011

I am using OpenSuSe 11.3 and Xfce. When i start my Xfce session, in left down corner I can see useful terminal with logs. Propably it is /var/log/message or something. When I use Remote Administration (VNC) this terminal is missing.

1. Where can I find configuration file or command which is starting this terminal ?

2. How to start it under VNC session?

View 1 Replies View Related

Ubuntu :: Terminal Window Is Blank?

Jan 22, 2010

After finally fixing a problem with screen resolutions on my son's PC, (it was stuck at 640x480), now the Terminal window comes up as blank space. I can still type command lines, but can't see what I'm typing nor the response - it's all a white box

View 4 Replies View Related

Copyrights 2005-15, All rights reserved