Programming :: Ncurses: Filling Window With Background?
Apr 6, 2010
I have some ideas about writing a small game in terminal ( just for fun ) using ncurses library. I want to use some kind of menus (in Midnight Commander's style), but there are some problems with rendering windows, that I don't understand. I create a window with newwin(), assign a color pair to it calling wattron() (for example, I want to fill a window with blue background), and then I call my own function wnd_fill() :
Code: void wnd_fill (WINDOW* wnd)
{
int i;
[code]...
View 9 Replies
ADVERTISEMENT
Jan 6, 2010
I've modified a program to show * instead of letters when typing a password. I'm trying to make it so that when pressing backspace a * will be removed.Here's a rough example. The problem is that when trying to do this in the real program,' is not recognized as backspace.
View 6 Replies
View Related
Oct 18, 2010
On an Ubuntu Server I am running, I wrote a small Ncurses program in GCC. It worked just fine.
Then, I copied the executable over to my Ubuntu 10.10 desktop edition with sftp. No matter what I did, it kept giving the error:
error opening terminal: xterm.
I had copied other non-curses programs and they all ran just fine.
Finally, I copied over the source, recompiled with GCC and voila, the executable now runs fine.
View 6 Replies
View Related
Feb 9, 2011
I actually have two reasons for posting this. One is to see if there's an actual name for characters like this:Hopefully that will show up correctly for you. If not, it's a little box with four numbers in it, one in each corner. I don't know their name or their reason for showing up, so it's hard to look for help.
My main problem, though, is that I wrote a program that prints some output to a console using ncurses as it runs. These characters show up on the console, seemingly at random, and disturb the whole thing. Sometimes I'll also get sets of characters like "[13;" I'm not printing anything bizarre on there, just strings and floating-point numbers.
View 6 Replies
View Related
May 3, 2010
I want to read a pressed key or a combination of pressed keys from the keyboard and perform some action afterwords.
e.g.
Ctrl-Alt-F1
Out of ncurses lib. and the termios struct which can be used best for the above purpose and why ?I tried to search on Google, the differences between these two but couldn't get much !
View 6 Replies
View Related
May 2, 2010
I have a question, I was using ncurses in my program and made a user interface, that uses the menus. It is fine, but I wanted to execute another program when one item is selected. And after its exiting, I come back to the main one. I think that it can be done via window, but I wanted to separate them. Can you suggest me what to do? As I do it in Ubuntu Linux using fork & execl, that seems everything is mixed with the shell & if I don't do the closing of the objects, the keyboard & terminal attributes are the same as the one for the main, I used the system function, but not very different. I used atexit and when I use (probably) system (stdlib) function it calls the function registered with atexit. Please tell me the solution..
View 1 Replies
View Related
Sep 27, 2010
Today I download a gdm login window theme package, but I don't know how to install it. Results by google searching shows it is very easy on ubuntu by entering System-> Administration -> login window. But I don't find that way on fedora now. The theme package I download is named GDM-BrasillinuxEye.tar.gz . I download it from official web [URL] .
View 1 Replies
View Related
Aug 21, 2010
so i got some themes following these instructions [URL]... is there a way i can get my login window (not the background image) to look like it does in one of these images [URL]...
View 6 Replies
View Related
Jan 14, 2015
I did remake my minimal installation. My window manager produces no background picture else I did add someone. So i will do it using xorg-xli. I did find the (in other cases usual) xinitrc as /etc/X11/xinit/xinitrc but in only refers to an other script
and the other script (/etc/X11/Xsession) does not include some usuable steps to include easily supplementary starting commands.
Where is to do that in Debian SID actually?
View 2 Replies
View Related
Apr 22, 2010
I'm having a issue with gwibber: the window doesn't open, but I can tell it's working because I can tweet via Me menu. Also, the "microblogging" arrow/checkbox is active in the messaging-menu.
The window opens without problems in my dad's session, so I guess that if I delete some config file in my /home it will get fixed. where are the gwibber config files? I couldn't find them =/
This is my terminal output when executing gwibber:
Code:
daniel@solid:~$ gwibber
** (gwibber:3967): WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags'
[Code].....
View 4 Replies
View Related
May 19, 2010
I want to change the color of the background in this window (see screenshot)without changing themes. Whats the best way to do this?
View 9 Replies
View Related
Jan 10, 2011
I have Ubuntu Tweak installed but it only lets me change the login background to an image. Is it possible to use a color in hex?I am using Ubuntu 10.10.
View 9 Replies
View Related
Apr 29, 2011
I find the window shadows a little phony against a light background. Not a big deal, but just curious if there is a way to change this. Tried through Compiz, but that didn't actually change anything.
View 4 Replies
View Related
May 22, 2011
Why does on some computers my terminal window have a background I can see through and on others its a solid color? I have Ubuntu 10.04 installed on 4 machines as base OS and I have many virtual machines of it also. I havent changed the terminal preferences on any of them, however on some computers the terminal background which is purple is not solid in that you can see what is in the background behind it. On others the background is truly solid purple; you can not see behind/through it.
Is there any way to change the terminal window for these machines that are displaying solid to the 'see-thru' way? Ive been using some ebooks and things and really like opening up vi/vim in the purple see-thru window that allows me to write and see the text in the background...however on some machines I can not do this because the terminal display is truly solid. ? All my computers have the same profile settings for terminal..
color = use system theme
background = Solid color
Note - I am making a distinction here between what I call see-thru and the 'transparent' setting in the terminal preferences as this seems to use the desktop background and is different from what I am talking here.
View 5 Replies
View Related
Jul 16, 2011
I'm fairly new to Debian/GNOME, and I'm running Squeeze and GNOME 2 and I have some questions. How exactly do I change the background image for the login window? I've looked up various suggestions but none of them seem to work - the appearances window does not ever seem to change the background image for the login screen. Also, whenever I log out or when I close the lid on my laptop and it suspends, I am unable to log back in - all I see is a black screen and my cursor, which I can move.
View 9 Replies
View Related
Mar 4, 2010
I have installed fvwm-crystal successfully but when I try to start it by just adding the codes below to .xinitrc
Code:
exec fvwm-crystal
only a black background with a console window show up.
I also put the .xsession-error here,
Code:
1 /etc/gdm/PreSession/Default: Registering your session with utmp
2 /etc/gdm/PreSession/Default: running: /usr/bin/sessreg -a -u /var/run/utmp -x "/var/gdm/:0.Xservers" -h "" -l ":0" "xxx"
3 localuser:xxx being added to access control list
4 Launching a SCIM daemon with Socket FrontEnd...
5 Loading simple Config module ...
[Code]....
View 5 Replies
View Related
May 26, 2010
(I am using vector() and matrix() functions from "Numerical recipes in C".)There are 100 numbers to be stored in 2D array of 10 rows and 10 columns.100 numbers are stored in a 1D array.I get "segmentation fault" at the line indicated in the segment of my code below:
Code:
:
:
#define size 100
#define nl 1
[code]....
View 12 Replies
View Related
Mar 26, 2010
I wrote a spinner in Perl and when I did a spinner in shell I could just run the subroutine in the background.
[code]...
In Perl, how do you run a function in a background and get the PID for that? I know PID in Perl is $$
View 2 Replies
View Related
Mar 10, 2010
I think my title pretty much explains it. I am writing a script and I want to start a program in the background, and when that program finishes I want to check the return value to make sure there was no error.For example normal I would do something like this:
#!/bin/sh
program
if [ ! $? -eq 0 ]; then
echo "There was an error"
exit 1
fi
Now I want to do something like this:
#!/bin/sh
PRTN=`program1 &`
program2
if [ ! $? -eq 0 ]; then
[code]....
In this case if program2 finishes before program1, I don't think the return value from program1 $PRTN would be valid at the time it is checked.
View 3 Replies
View Related
Mar 27, 2011
I have a script that calls another program/script, xxx, to run in the background. Supposedly this program at most should finish within five (5) minutes so after five (5) minutes, I run some other steps to run the script into completion. My problem is sometimes the program takes longer than five (5) minutes and this is causing problems when running the rest of the steps in the scripts. Can anyone suggest how to re-program my script. At the moment, the KSH script, i.e. test.ksh, is doing as below:
test.ksh:
.....
.....
xxx/xxx.ksh <--- program/script called by the script
sleep 300
..... run the rest of the script .....
..... problem is sometimes xxx/xxx.ksh takes longer than 300 seconds .....
..... any way that I can monitor that xxx/xxx.ksh finishes before I run .....
..... the rest of the scripts .....
View 3 Replies
View Related
May 18, 2011
I am doing a program that reads data from a gps and some other devices and writes some files with all the information. When I run it normally it works fine, but if I run the program in the background (with the ampersand) files are not created until I bring it to foreground or close it. I am confused, the program should run the same way with and without the ampersand. (Could it be that the main process that creates all the threads does not create them when it is executed in background? It seems like if the program is stopped until I take it to the foreground).
View 4 Replies
View Related
Feb 11, 2009
I have a set of files to copy and decompress, and want to do these operations concurrently with a script.
Manually it would be something like:
Code:
The single & is intended to background the processes, while the && is intended to execute the gzip process if and only if the cp completes successfully.
My script is:
Code:
When I run it, bash gets angry with the following error:
Code:
So what is the proper syntax to accomplish this?
View 1 Replies
View Related
Jun 7, 2011
I am using a program that reads in data from a serial port and then sends that data out over a TCP connection. The problem I'm having is that the only way I know to exit the program is to do a 'kill PID', but doing this means the program doesn't go through the motions of closing the TCP connection properly so I have to wait some random period of time for the port to free itself or else when I try to start it back up it tells me that it can't bind to the specified port.The general structure of the program is as follows
Code:
int main(){
// initialize some stuff
[code]...
View 1 Replies
View Related
Jan 22, 2011
when the "Submit" button is clicked on a form in the webpage, I'd like the background tiled image to be changed to another one (downloaded from the server, and "activated"), and the logo that I have there also replaced by another one, which will also have to be downloaded from the server.
View 1 Replies
View Related
Jul 19, 2011
I am learning some Java programming, and I've run into a problem. I am trying to set a background for JFrame, so that I can put text and buttons on it. I've tried searching the internet, and the only code that I found that was a full code (I lost it, and don't remember the link) had so much other stuff, such as text and buttons, that I couldn't find the part I needed.
View 4 Replies
View Related
May 4, 2009
I'm looking for a general pointer, or label for what I am trying to do. Not a specific line of code. I've written a couple of small sh script that gets some user input, then calls several programs to run in the background with the &. My problem is, they all run at the same time. Is there some way to get these jobs to run sequentially rather than consecutively? If yes, what is this process called? I'm thinking there should be a way to line up background jobs in a job queue, similar to how a print queue works, one job at a time. After searching for a couple of hours, I'm thinking there must be a name for this, but I don't know what it is.
View 11 Replies
View Related
Nov 24, 2008
I have a program that calls a program on a remote host via SSH in the background. In the command similar to the following:
But the problem is, this program stays infinitely in the background. Is there any method of implementation so that I can kill it? like after 10 seconds of trying?
I am trying to refrain from using TCPKeepAlive or sshd_config stuffs configurations. I was thinking of a fork() implementation where the parent sleeps for 10 seconds and then, if the child still haven responds to it, kill it.
View 4 Replies
View Related
Nov 21, 2010
I got curious during the construction of my program to search for blocks of text that contain certain words, and wanted to print out blocks of text with the words I was searching for, initially, in ALL CAPS and seperated by tabs for easy identification. That got boring, though, so I thought, "Can printf do colors, too?" Yes it can.... Who knew?
[Code],,,
View 8 Replies
View Related
May 3, 2010
I'm running headless server, and need to sort all packages in YAST by size. I can't see the option in YaST anywhere.
View 5 Replies
View Related
Jun 6, 2010
Where can I get ncurses developemnt libraries for Debian Squeeze. I am using the Sheeva Plug hardware platform.
Doing a make on source code that needs the ncurses dev libraries.
View 2 Replies
View Related