Hi.
I want to run some commands every time a user of an ubuntu 9.10 machine logs out or shuts down. What is the best way to do this? Every user uses gnome if that helps.
The general idea is pretty simple, I want to make a script for a certain task, I do it in the shell (any shell), and then I want to copy the commands I have used.
If I copy all the stuff in the window, then I have a lot of stuff to delete and to correct. (and is not easy to copy from shell)
Resume: I want to take all the things I wrote...
Is there an easy way to do this easy task?
Hi,
I have these 3 file in my program:
sample1.h (method in sample1.cpp are defined here)
sample1.cpp (all the actual implementations)
demo.cpp (I am using the methods in sampe1.cpp here, and have included sample1.h)
Now, I am using GDB to debug and I know the basic commands like "break lineno." or "break methodname". But, how do I debug the methods written in sample1.cpp?
I tried: break "sample1.cpp:mymethod" but it did not work.
Thanks
I'm using python to develop an app and want to view running processes.The code
txt = commands.getoutput("top -d 1")
print txt
gives an error "TERM Environment Variable not set"
Can someone tell me what this means and how to solve this
Hi,
I am trying to make a FTP client in c#. I found a class that support basic FTP commands on http://msdn.microsoft.com/en-us/library/system.net.webrequestmethods.ftp_members.aspx.
on the list, PORT command is missing.
How do I use PORT command in c#?
I'm a blind student currently in a system admin/shell programming class. Although ssh works fine for executing commands like ls, pwd, etc editors do not work well with my screen reader and an ssh session. I was wondering if it is possible to mount a Linux folder over ssh so it appears as a windows drive? This way I could edit any files I needed to with accessible software and not have to constantly use SCP to send files back and fourth.
How can I set a conditional breakpoint to a function's 3rd line in GDB?
I know I could give the file name + line number but this is not working for me.
I have to store the gdb commands as a script to repeat it later and I don't want to change the script every time the source file is changing.
Hi everyone,
I've playing around with linux and noticed that for some mysterious reason commands like '/bin/sh ' just will not work. Each time I'm trying to start a process it yields 'cannot execute binary file' error message.
m@sanctuary:~$ sh sed
/bin/sed: /bin/sed: cannot execute binary file
When I first launch sh and try to execute sed, it succeeds.
I'm starting to loose my wits. It would be just great, if somebody could help me.
Thank you.
I'm not sure if that's the right terminology.
I've entered some data into R, and I've put a smoothingSpline through it using the following command.
smoothingSpline = smooth.spline(year, rate, spar=0.35)
plot(x,y)
lines(smoothingSpline)
Now I'd like to measure some limits (or where the curve is at a given y point), and maybe to some predictive analysis on points that extend beyond the graph.
Are there commands in R for doing this?
I need a language and web framework that is really easy to use, that only has 12 or so commands, that is in one language all the way through (front/middle/back) and takes 15 minutes to master. Something like this:
10 CreateWEBFormAndCreateRequiredDBTablesAndSaveToDatabase("First Name", "Last Name")
20 CreateWEBPageThankingUser()
30 MakeAllWEBPagesPrettyByExaminingWebSitesOnTheInterWebAndMakingADecision()
40 GOTO 10
Oh, and it has to be written in C#
Trying to write a deployment script, working on a repo in a different path. The "git-dir" flag seems to work fine for most commands, but not for submodule work. Am I missing a path directive?
Works:
git --git-dir=/tmp/repo_path/.git log
Doesn't work:
git --git-dir=/tmp/repo_path/.git submodule init
Error:
No submodule mapping found in .gitmodules for path 'path_to/submodule'
Much thanks for any help.
I have a data file, and a gnu file, in which my plotting commands are.
How can I produce a plot in gnuplot, in a way that I call gnuplot giving it a name of the gnu file ... it gives me the window with a plot ... and after I close it, it returns me not to gnuplot command prompt, but to cmd (windows cmd.exe) command prompt ?
Hi SO.
I have an applet that connects to a server, it receives some commands and based on that it haves to draw (or move) different things.
Which patterns should I use? I assume that the network connection and applet should run in two different threads?
Thanks,
Kristoffer
I use subversion keywords like Date, Author, Revision number etc in my LaTeX projects to include the revision details in the typeset document. I tried searching for an equivalent to svn propset command in mercurial, but couldn't find it. A sample command in subversion would be:
svn propset svn:keywords "Date Author Rev" sample.tex
Are there any equivalent commands in mercurial I could use to replace keywords inside a text file under revision control with corresponding details?
I tried using the following commands to create a database file at prompt, but none of them would work.
$ sqlite3 test.db
sqlite3 test.db
test.db
does it require a semi-colon at the end or is it that hard to create a database file using sqlite3 prompt?
How do I kill a process which is running in bash - for example, suppose I open a file:
$ gedit file.txt
is there any way within the command prompt to close it? This example is fairly trivial, since I could just close the window, but it seems to come up a bit, particularly when I mistype commands.
Also is there any way to escape an executable which is running? This probably has the same solution, but I thought I'd ask anyway.
Thanks
I would like to have a quick script listing all active hosts in a LAN, and I am a bit lost. From other posts I figured that this can be done most effectively by polling the DHCP server (in my case a Lancom router) using SNMP.
However, I am not familiar with the SNMP commands in PHP. Is snmpwalk() the correct function? Can I get snmpwalk() or any other php function to return an array that contains a list of all live hosts?
In my MSTest UnitTest project, before running any tests, I need to execute some commands. Is there a feature, kind of like Global.asax is for web based projects, that will let me kick off something before any tests run?
I have a batch file with some commands that I need to run with my installer, but I'd rather a console not appear (in Windows). I'm executing the batch file from a WiX installer, via a custom action. I tried adding an @ECHO OFF to the top of the file, but that didn't seem to do anything.
Is there a way that I can run this batch file silently?
I have some security related service running on my machine (start type = automatic)
In the service control manager, the stop/restart commands are grayed out.
I was wondering how can I develop such service for which the stop operation is disallowed.
Note that I am logged in as an administrator
I want to add a few drawing functions to an iPhone project for drawing things. Something like drawTile(x,y,len,wid); which would call openGL to draw a box somewhere. I should just be able to write a procedural C file to do this but the openGL libraries are objective C and I'm getting weird errors. Do I have to make a class for all of my drawing commands and call class methods?
I am a SQL Server (2005 & 2008) data warehouse developer (SSIS, SSAS, SSRS, SQL) and I am wondering if it would be worth the effort and time to learn Powershell scripting. Are there applicable uses from a development perspective? I understand that from a DBA view there is considerable power in Powershell for administration - does any of this translate to useful commands for a developer?
Thanks!
I often do this to prepare for some django debugging:
Open up a terminal window in os x (10.6)
start the python interpreter
run these commands in python:
from django.core.management import setup_environ
import settings
setup_environ(settings)
Is it possible to automate these actions and make a shortcut that I can doubleclick to invoke?
You usually invoke the following commands to build a ./configured product:
make
make install
Okay, the product is in the system now. Then you change some source code files and invoke only make install. The question is, does the conventional implementation of install target requires the executables to be recompiled, or just the old ones should be copied to the appropriate system path?