Programming :: How To Put OWN Programs Into Runlevel

Nov 29, 2010

I've always thought that the idea was very cool, but I get restricted by the way distros think that "httpd" and the like are the only things that should go into a runlevel - I mean Fedora doesn't even let you turn off the GUI!I want to do some lower-level hacking than that, so can someone help me?

View 1 Replies


ADVERTISEMENT

General :: Getting A Text Console Runlevel In Kubuntu 10.04 (Changing Runlevel Won't Work)?

Sep 4, 2010

runlevels 2 -5 are identical in Ubuntu. /etc/init/rc-sysinit.conf is used instead of /etc/inittab for changing the runlevel. But there's no point doing that since the runlevels are identical. The default runlevel is 2, so I tried to find some service I could disable in /etc/rc2.d. I didn't find anything I could work with.

View 4 Replies View Related

Programming :: Put Lock Between To Programs

May 3, 2011

i have two c++ programs, first one captures network packet from eth interface and save it in a file, second one uses this generated file for its purposes, data stream always exists then first program should always be running, although second program cannot read the file while the first program is writing in it, then i need to define a lock which can be checked by both progs before read/write, how is it possible to define this kind of lock in linux?

View 5 Replies View Related

Programming :: Create C Programs That Connect With Each Other?

Nov 22, 2010

So I was reading one of the Unix Philosophy rules by Eric Raymond:# Rule of Composition:Design programs to be connected to other programs.How does one achieve that? I know one could several C programs and then use a bash script to feed in the stdin, but how do you do that with just pure C, do you do it with pipelines?

View 2 Replies View Related

Programming :: Write Animation Programs In Using C Or C++?

Feb 16, 2011

wants to do miniproject as part of the academic curriculum using Computer graphics on Linux using C or C++. Can any one direct me to a direction how i can proceed. I know basics of C and C++

View 9 Replies View Related

Programming :: Programs Run Faster Than Windows?

Jul 25, 2010

I know this may be just me being a little bias on OS's but... I quite honestly believe that "some" programs run faster on linux than on windows.

Open Office for example, It runs amazingly fast on my linux distro but runs horribly (laggy) on my Vista machine.

Firefox also appears to run faster on my linux machine than on my Vista machine.

There are several more examples but I could go on and on with this.

My point is, do programs run faster on linux than on windows? Or is it just me that is in denial?

I am not sure if comparing linux to Vista is a good comparison in terms of program speed or not...

Also it should be noted that the Vista machine "hardware" is "several" times faster than my linux machine's "hardware".

I am not trying to start a flame war or anything like that, I am just trying to make sure I haven't totally lost my mind.

View 7 Replies View Related

Programming :: Unable To Compile C++ Programs

Mar 15, 2009

I work on Fedora 9 and I'm unable to compile my c++ program using the make in the terminal as well as in the IDE-Anjuta.although 'make' works fine with C programs,I get an error that g++ command is not found whenever I try it with C++ programs.

View 3 Replies View Related

Programming :: Two Programs And A File: A Logical Conundrum?

Jul 16, 2010

I am working on a program called writemusic that creates a file of structures representing musical glyphs (notes, rests, barlines, etc). Another program called Printmusic then reads this file and writes out the music as a PNG image which can be printed. I had noticed that the final barline was always duplicated and I wanted to know which program was resonsible, so I tried some experiments:

1). I created a file in writemusic and ran it through printmusic, leaving writemusic running. As I expected there were two barlines at the end. I went back to writemusic and added a couple of bars. Now the duplicate barline had vanished to reappear at the new end.

2) I created two files and concatenated them with cat. When I processed this composite file with printmusic each of the two sections ended with a double barline.

3) I created a file with writemusic, closed the program, relaunched it and reloaded the same file (writemusic allows you to do this). Then I added a few bars. When printmusic had processed this augmented file, there were three barlines at the end of the first section and two at the end of the second.

The results for 2) and 3) only make sense if writemusic is actually putting these duplicates into the file, but the result for 1) suggests that printmusic is doing it when the file is read back.

View 6 Replies View Related

Programming :: VTALRM In Multi-threaded Programs?

Apr 20, 2011

I ran into an inconsistency in handling timers (VTALRM) between AMD and intel platforms with threads. My understanding was that the timers are per process. I discovered I must call setitimer in the thread on intel though. AMD allows me to make the setitimer call once in the main thread as expected. The code below demonstrates the issue. I must add the code in the INTEL define for it to work properly on intel cpu's. Am I missing something dumb??

[Code]...

View 4 Replies View Related

Programming :: How To Write Programs In Multiple Languages?

Aug 18, 2009

Well I have been interested in programming for a while, and just found out about Linux and Unix. I started out with Java, but now I know I bunch: Flash, C++, C and others. I was working on a mac so I made a few flash games then started to work on iPhone games. I was board one day and I found out about Unix and I thought that would be something else to try.So in an attempt to learn about Unix I have been reading different articles about it, and have heard of using different languages in one program. The article I was reading didn't give any examples, and it assumed the reader has programmed Unix before.

So how do you write programs in multiple languages, which languages would you use, and why would you want to do that?

View 3 Replies View Related

Programming :: Debugging GTK + Programs Hangs The System?

Oct 28, 2010

A thread-aware version of gdb receives a system notification when a thread starts in the app it is debugging. GTK+ has hidden threads associated with loading icons into menus. So trying to debug a GTK+ program, even one that is apparently single-threaded, can produce a deadlock between gdb, the app and XWindows. The app (actually GdkPixbufLoader) grabs the focus, the mouse and the keyboard and then starts a thread when a menu is opened. If gdb has trouble with threads, it leaves the app blocked but still holding the mouse, et. al. Then you can't talk to gdb or any other GUI interface. To make gdb happy, all GTK+ apps need to be linked with -pthread, if you have the source. If not, gdb cannot be used. In order to break the deadlock, you need a non-GUI shell. If your /etc/inittab starts agetty, mingetty, or the like, and you can get to it with <CRTL><ALT><F3...F6>, you can do a kill -KILL <pid> on the offending app, recover and then go back to XWindows with <CTRL><ALT> <F1/F2>. Otherwise it's reboot time.

View 3 Replies View Related

Programming :: Simple Header For Perl Programs?

Nov 5, 2010

i am trying to do something very simple like a header and a footer for my first perl programs, what iam trying to do is that when i create a file in vim: lets say hello.pl , i would like that file to have already this in its header:

#!/usr/bin/perl
and this on the footer:
print "
";

so that i dont have to type everytime #!/usr etc i tried to do it this way but i get weird vim errors: header is a file that contains the header and footer $ vim hello.pl;header > is there another way to do it as a function in bash or some other one liner command?

View 1 Replies View Related

Programming :: Have Sqlite3 Headers And Start Using In Programs?

Sep 10, 2010

I'm new to database programming but I'm working in a project that makes use of sqlite3. I know I should #include <sqlite3.h> but it is not there.... i have just sqlite.h. can anyone tell me what to do to have the sqlite3 headers and start using them in my programs

View 9 Replies View Related

Programming :: Tools Used For Testing Performance Of C And C++ Programs

Nov 17, 2008

I would like to know the Tools which are used for Testing the performance of C and C++ programs under linux?

View 4 Replies View Related

Debian Programming :: Running Programs In Parallel In Bash

Jul 22, 2014

I am trying to replicate what is happening on this page under the tcsh shell, but using the bash shell found in Wheezy. Here is the page I am referring to:[URL] The command I am trying to replicate is on page 6 under figure 2.4. The command is "prompt> ./mem &; ./mem &".

I would like to run the same program twice, concurrently, but do not know how. Note that I am not trying to use a bash script, but rather by simply using syntax on the command line.

View 4 Replies View Related

OpenSUSE :: Write And Compile/run Programs In Different Programming Languages?

Feb 19, 2011

I was wondering about a package that can be used to write and compile/run programs in different programming languages. I was also wondering how possible it is to program in Visual Basic 2010 in openSUSE if at all.

View 9 Replies View Related

Programming :: Created Python Programs - Making Changes To Improve?

Dec 17, 2008

I have list of programs which I have created during the past few days, all the programs are attached in txt files, and if anyone can do favor, and double check if they work, and what changes I can make to make it look different, or to improve it.

View 9 Replies View Related

Programming :: Bash: Passing Output To Another Programs Input?

Nov 12, 2009

I am not sure if that Subject really explains it, basically I have a script that executes a CLI java-applet that requires a passphrase from the user. I can easily execute this by issuing the -p argument followed by the passphrase however that shows up on possible logs or at least on the results of the ' ps ' command. If you do not supply this -p argument it provides a new line with the echo " Enter Passphrase: " and asks for input.

how can I provide a result/input for the Passphrase request and is it still possible to throw this application in the background with the ' & ' following the command? I have seen a few examples that show a /bin/expect that expects a result and sends a command however I would like to refrain from any extra dependencies. Example of Regular Execution of application:

Code:

$ /usr/local/***/**** -u USERNAME -r Default-Realm -f certificate.der
Password:

View 6 Replies View Related

Programming :: Can A Segmentation Fault Affect Other Running Programs

Jul 30, 2011

I tried a little C programming, and got a bunch of segmentation fault the first few tries. But from what I understand, the whole purpose of segmentation faults is the protect other programs from the damaging effects of my program. Yet, if I trigger a segfault enough times, weird things happen to my other running programs. I usually run a console inside Kate, and after 10 or so segfaults, Kate sometimes freezes or randomly highlights text, etc. just random behavior. Also, my desktop will occasionally hang and things will start failing, like copying files and such. I have to log out to restore everything to normal, but logging out is difficult since the logout prompt freezes. I have never experienced such behavior before I began programming, my system has been relatively stable. I run my program from inside Kate's console, so I was wondering if all KDE applications share memory or something, because this has happened once or twice, and only when I trigger a segfault many times.

View 4 Replies View Related

Programming :: Compile GNOME Programs On X / Its Possible With Minimal Modification?

Oct 30, 2009

Is it possible with minimal modification?

View 3 Replies View Related

Programming :: Write Programs That Use Electronic Signatures In Java?

Jun 1, 2010

Do you know how to write programs that use electronic signatures in JAVA (although I am not pretentious about the language in any way).

When I say e-signatures I mean those USB smart cards(security tokens) that are capable of doing encryption by themselves and store securely the private key. I am particularly interested in how authentication works with a digital signature, how to sign data, and most importantly how to check that a digital certificate is valid. What do I need to store in the Database for authentication for example -- is it the serial or the Hash?

View 2 Replies View Related

Programming :: Control Execution Of Programs In A Shell Script?

Apr 27, 2010

Do you know how to write a shell script that executes say 4 instances of the same program in different directories at the same time, and once ONE instance completes it executes a new instance of that program in a new directoryd so on, until 100 instances have been executed, each in their own directory

View 5 Replies View Related

Programming :: Generating Avi Files For Movies Directly From Gfortran Programs ?

Mar 5, 2011

Generating avi files for movies directly from gfortran programs. I make movies from my Fortran codes using seismic unix - SU. Need to modernize this method to make avi movies or something similar. I am quite adept at generating "C" binary files from Fortran. Have not been able to find the documented definition of AVI file format.

View 1 Replies View Related

Programming :: New MPICH2 Installation - Interfering - With -make - Cant Compile Fortran Programs

Jul 28, 2011

Actually I had a folder called Lib, in which I had a few libraries installed and configured.(MPI, PETSc, SLEPc) I accidently deleted (by rm) the contents of that folder.

Then I reinstalled MPI,PETSC,SLEPC using the same tarballs as earlier(thus, the version etc. is the same).

I already had a fortran program with many modules and subroutine files, and the corresponding makefile which used to compile and run fine. But now when I type "make" in the same directory as before, I get this: (shortened, many similar errors)

Code:

Firstly, why is mpif90 compiling my program when I didnt tell it to? In my makefile, I have specified gfortran as my compiler....nowhere have I even mentioned mpif90. Such a thing never used to occur before.

Also, if I rename file_variable.f to file_variable.f90, these errors dissappear (I understand why, but that is not the problem), but a new error comes:

Why is the new MPI installation interfering with make ? I want to go back to how things were before I stupidly broke all installations. The errors themselves are not the problem, the problem is why the new mpi installation is interfering with make.

It seems as if mpif90 has taken over make and gfortran. I suppose I didnt install it correctly, or probably I didnt uninstall the earlier one correctly.

Everything that worked earlier doesnt work suddenly. I use ubuntu 11.04 MPICH2-1.3.2

View 1 Replies View Related

Programming :: Why Different Signals Send To Programs That Exceeded Memory Limit Set By Setrlimit()?

Sep 2, 2010

I'm having a problem with setrlimit() under linux.

If i used setrlimit(RLIMIT_AS) to set a hard ceiling of virtual memory usage first, then request memory more than that, shouldn't i receive a signal like SIGSEGV?

First i tried the command ulimit in bash, which acted as if i called setrlimit(). i tried 3 programs that overflowed the memory limit i set. i though all the programs would be terminated by a SIGSEGV. but the pascal program received SIGKILL; the C++ program got SIGABRT› the C program, SIGSEGV.

I though there maybe something different between setrlimit() and ulimit, so i wrote a program in C++, fork() first, setrlimit() then execv() in the child, and wait(&status) in the parent. but i got the same result.

I was wondering why these could happen, and could anyone tell me how could i deal with them? i mean, how can i judge that the program exited abnormally because it exceed memory limit?

View 2 Replies View Related

Fedora :: Can't Go To Runlevel 1 In F14

Feb 3, 2011

When I execute "init 1" not much is happening! The wireless network drops out, but the GUI is still there. It always worked in previous Fedora releases. What is changed now? Does anyone know how to switch between different runlevels in F14?

View 14 Replies View Related

Fedora :: How To Get Into Runlevel 1

Mar 30, 2011

This probably has been asked many times, if yes I apologize and please someone point me to the old post.

If my FC14 would not boot. And I didn't setup the boot menu, How do I get into run level 1?

View 8 Replies View Related

Fedora :: Wireless LAN At Runlevel 3/ No Gui

Mar 28, 2010

I boot by default into Runlevel 3 on my F12 Server. If I need GUI apps then I run startx.The server I'm using (eeeBox eb1501) has a wired and a wireless LAN interfaces. I run two networks and want to be able to connect to the wirelss one without having to start Gnome or KDE just to get the WLAN to connect.IS this someting to do with the NetworkManager or just the gnome-keyring?The wired interface comes up at boot but the Wireless one won't until I start the GUI.

View 8 Replies View Related

Fedora :: Change WM In Runlevel 3 ?

Nov 5, 2010

I don't really want to boot into GDM as I sometimes don't need X. Apart from XFCE, I've got i3 WM. I've changed the default runlevel to 3 so that I can startx. How would I change the WM session from CLI?

View 5 Replies View Related

Slackware :: Cannot Switch To Runlevel

Jan 6, 2011

I recently installed slackware and while I was in the process of installing video drivers, I noticed something odd. "init 3" (or init anything) doesn't seem to work for me. While working in XFCE, when I do "init 3", nothing happens. But then, when I do "who -r" it says I am in runlevel 3 even though I am still in XFCE.

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved