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
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
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
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
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
Jan 23, 2011
Is there any way to find what is displaying in a terminal in C language?
I want to automate ssh login process, I know that I can use "expect" but I want to write another program in C myself.
In first ssh try to a host, ssh prints a message like this:
Quote:
The authenticity of host '192.168.30.1 (192.168.30.1)' can't be established. RSA key fingerprint is **** Are you sure you want to continue connecting (yes/no)?
and waits for an answer. I want to enter "yes" programatically when the message appears, but I don't know how to find if the message is appeared or not. In this case problem can be solved in another way, deleting the entry of the host from ~/.ssh/known_hosts before executing the ssh command, sleeping for one or two second and entering yes. Same problem exist for password prompt and this can be solved by sleeping, too.
But it is not a general solution and can be failed if prompts appear after entering required keys.
View 8 Replies
View Related
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 );
[code]....
I'm getting negative numbers as the the pixel length, eg -7275
View 3 Replies
View Related
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 videofile.mov 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
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
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
May 4, 2011
I have just upgraded to 11.04 from 10.10. I am having the following problems noticed. I'm unable to find the "Programming" menu and the "Terminal". Also the right mouse button responds just like the left mouse button in fire fox.
View 1 Replies
View Related
Aug 26, 2010
I have installed Open Suse 11.3, after giving up on Ubuntu when the latest version would not connect to the internet. In Ubuntu I could always open a terminal to carry out any command line task. In Suse I simply cannot even find one.
I need to find a terminal that I can run in Root in order to load some firmware for a different network adapter, as I am currently using one borrowed from another computer.
View 9 Replies
View Related
Jun 27, 2010
I'd like to find all files of a specific type (as determined by the terminal "file" command) from the command line ... and haven't been able to figure out a way to do so. For instance, I'd like to be able to find all JPEG files in my filesystem, even if their names don't end in .jp*. It would be helpful to be able to combine this with other tests in find, so that I could type something like "sudo find / -atime 0 -size +1M -type adobeflash" or something like that.
I've looked for ways to hook find up to file and tinkered around with a few ideas involving pipes, but nothing seems to get what I want.
View 2 Replies
View Related
Aug 20, 2010
I need to show which Display is online on X if i have 2 Graphic Cards ,how to find out which is display 0.0 or 0.1 ex.
View 2 Replies
View Related
May 29, 2011
I can not find Terminal for CLS in Ubuntu 11.0.4. Where is it located in 1104 version.
View 3 Replies
View Related
Aug 5, 2011
I've just installed Zorin 64 bit and want to make some changes and install some new packages using apt-get but i've been through the whole start menu and can't find a terminal.
View 1 Replies
View Related
Dec 19, 2008
I am unable to find a description of alsa's programing language, this sort of stuff:
[Code]...
I need to know what, for example, 'ttable' means and what is its syntax. This seems to be a state secret.
View 2 Replies
View Related
Aug 11, 2010
I just decided I'd give Google Chrome a try. Installed it via the google repository and it went fine.
However, every now and then it just vanishes from my menu and it can't be found again, also the command in the terminal can't find anything.
So, what's left is to reinstall it, and during reinstall it doesn't even whine about already being installed.
Anybody else with this matter? I am running 64-bit Squeeze.
View 11 Replies
View Related
Mar 29, 2010
I have found KRename to be very useful for bulk find and renames; however, I'd like to do a find a copy, which KRename doesn't appear to do.
For example, I'd like to (case insensitively) search all subdirectories for files called "cover.jpg", "cover.gif", or "cover.png" and create a copy of these called "thumb.xxx", in the same subdirectory the original is found, with the same extension as the original.
View 4 Replies
View Related
Jul 29, 2010
I like to do a lot of my tasks through the command line, and was wondering, is there a way to see all the wireless networks available in the terminal? I tried 'iwlist scan', and it said all the interfaces do not support scanning. Is there anything I can do?
View 2 Replies
View Related
Oct 28, 2010
I would like to find out the specs of the computer, however I did build the computer from components myself so I can't google anything to find out specs.
View 8 Replies
View Related
Jul 31, 2010
i'm running slackware 13.0. i've installed dosbox package and the installation process showed no errors,but now i cant find how to run dosbox in any of the menus or from terminal.
View 2 Replies
View Related
May 30, 2010
I installed Fedora 12 on a new machine (Intel Core i3) and one of my terminal-based programs won't run because it can't find libtermcap. The specific error is
Quote:
error while loading shared libraries: libtermcap.so.2: cannot open shared object file: No such file or directory
I seem to have this problem every other time I install a new Fedora. I tried a few things with old libtermcap files from other machines, and I tried looking around the YUM repository, but nothing seemed to work.
What's the proper way to get the libtermcap libraries for a Fedora 12 machine on an iCore i3?
View 1 Replies
View Related
Aug 18, 2011
yesterday I tried to convert a file with ffmpeg and as usual I type the first letter of the file and hit tab to auto complete and nothing happened, I then cut and pasted the file name, no such file or directory I have 41 files in ~/videos and if I hit tab without choosing anything gnome terminal gives me the choice of just 1 file, ok just tried it again first time only 1 file second time 4 different files 1st file can't be found. I can't do anything from the command line, is anyone else seeing this odd behaviour ?
Edit: I just installed aterm and gnome terminal found some more files and now can't find them again, aterm seems to be removing the first 4 letters and replacing them with spaces
View 3 Replies
View Related
Jan 24, 2010
Were can I find a complete list of commands for the terminal in ubuntu linux 9.10
View 9 Replies
View Related
Oct 30, 2010
No menu, can't find a keyboard combination to start terminal. Ubuntu 10.10 32 bit. Do I have to re-install?
View 4 Replies
View Related
Dec 21, 2010
Since I see on my Centos 5 system, when using the Gnome Terminal, there is no 'Find' feature, do I use grep to search the output on Gnome Terminal?
I see grep syntax is:grep search-term file
But what do I use as the 'file' when what I want to search is the contents of the gnome terminal screen?If there is a good terminal program that does have a 'find' feature, let me know.
View 2 Replies
View Related
Jan 31, 2011
i just jumped into linux with both feet not having a clue what im doing.. loaded ubuntu 10.10.. liked it but i couldnt get stellarium to work with my ati x1300, so i upgraded to 11.4 and it works fine.. problem is.. i have a applications start on the left side, but i cant seem to find the setup like in 10.10 at the top, where you can go to terminal, admin, synaptic, etc.. the only way i found synaptic was trying to download it and asked me if i wanted to keep it in the bar, so now its on the left, but cant find anything else.. ive been trying to find it on the net but 11.4 seems to be so new that there arent very many faqs or tutorials about it..it would be nice if i can get that stuff back without having to format and reinstall 10.10.. im not going back to windows.. so i might as well figure this out..
View 2 Replies
View Related
Jan 11, 2010
I can't find the start command for Gnome from Terminal.
I tried:
start gnome
startx
start gne
Nothin is matching. In the Documenation is no help from console.
View 7 Replies
View Related
Jul 30, 2010
Is there any way to find the core files with out using the FIND command?
View 1 Replies
View Related