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.
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.
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.
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.
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.
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
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.
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 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.
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.
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.
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.
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.
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?
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.
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.
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?
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
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.
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..