Questions tagged [rc]

An "rc" file is a file read at startup of a program. It is also the name of the Plan 9 Shell.

Historically, in the days when Unix and other software was distributed on tapes, a tape archive often contained a file named "rc" containing run commands or run code to compile and install the software.

rc, the Plan 9 Shell

257 questions
0
votes
1 answer

rc.local running JAR

I want to execute two JAR files back to back one.jar two.jar I edited rc.local entries and added sleep 5 java -jar /path/to/first/one.jar sleep 10 java -jar /path/to/second/two.jar only one jar is able to run if i interchange the sequence i.e. for…
Rahul
  • 337
  • 3
  • 10
0
votes
0 answers

rc.common not working OS X

I append some script /etc/rc.common, but when restart it not create file. /usr/bin/touch /Users/home/Desktop/RC.txt /bin/pwd >> /Users/home/Desktop/RC.txt /bin/date >> /Users/home/Desktop/RC.txt Why not working?
0
votes
1 answer

Why isn't chdir happening for this rc.d script?

I've hit a wall trying to understand why the ${name}_chdir variable is not working for me. Finally, after letting my script run with -xv, I see that the cd command is not even being run in my case. Here is my script: #!/bin/sh set -xv exec…
papiro
  • 2,158
  • 1
  • 20
  • 29
0
votes
1 answer

get_sample_data from Matplotlib when inserting an image in a plot

I'm working on a project and in my code (using python) I want to insert an image in one of the plots I create. I found out that I could insert an image by using the get_sample_data from Matplotlib but that the file(image) has to be in a specific…
Nana20
  • 5
  • 3
0
votes
0 answers

/etc/rc.local fails to launch script (supercollider) on boot

In Debian running headless on an arm-based single-board computer (C.H.I.P.), I have this in my /etc/rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on…
Marinos K
  • 1,779
  • 16
  • 39
0
votes
0 answers

Activating a conda environment overrides the rc file for my shell

Often when using conda environments, the environment variables set in my rc file are overwritten (experienced with both bash as zsh), particularly my $PATH variable. It does not always happen though; I just experienced this, then tried to reproduce…
Steven C. Howell
  • 16,902
  • 15
  • 72
  • 97
0
votes
1 answer

succeed in script but fail in rc.local

I write mail.py(use webpy) to send me the ip address of each machine. #!/usr/bin/env python #coding=utf-8 import web def send_mail(send_to, subject, body, cc=None, bcc=None): try: web.config.smtp_server = 'xxxxx' …
makeapp
  • 181
  • 3
  • 11
0
votes
2 answers

Paste shortcut for Vim

I am trying to set up a paste shortcut in my .vimrc. So far I've tried remapping Shift+Insert: noremap :paste:nopaste ...which did not work. I've also tried to map system clipboard pasting: noremap ´v…
daniel451
  • 10,626
  • 19
  • 67
  • 125
0
votes
3 answers

Sed replace non-commented lines in bash

I feel I am close to solving this, but can't quite get there. I have a script that searches to see if a utility is called in /etc/rc.local. If it isn't, I want to add a line calling it to the line just before exit 0 at the end of the file. So far, I…
stefandz
  • 60
  • 11
0
votes
2 answers

C++ resource syntax error

I have a resource: IDC_MYMENU MENU BEGIN POPUP "&File" BEGIN MENUITEM "E&xit" END POPUP "&Stuff" BEGIN MENUITEM "&Go" END END On the first END it says there is a syntax error, I don't understand why. Anyone…
ITg
  • 140
  • 9
0
votes
1 answer

Control existence of individual axes with matplotlibrc

I have a matplotlibrc file: axes.color_cycle : 003A6F, BFBFBF, BFBFBF, BFBFBF, BFBFBF ..and I am using it to generate a generic plot: import numpy as np import matplotlib as mpl from matplotlib import pyplot as plt def makeplot(n=4): for i…
Chris
  • 12,900
  • 12
  • 43
  • 65
0
votes
0 answers

PHP rc.local bootup script only working partially, running it manually - no problems

I have a script that I need to be run once the system boots up. I have therefore placed the script inside my /etc/rc.local file #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script…
Daniel Jørgensen
  • 1,183
  • 2
  • 19
  • 42
0
votes
1 answer

Running a script when OpenWRT boots

I'm running this code and is working great, but whenever I enable it for running when booting, my router won't boot. When I do script start is working, when I'm doing script boot is working too. But whenever I do script enable to make it run when…
c4b4d4
  • 964
  • 12
  • 32
0
votes
1 answer

os.getpid returns PID that doesn't exist?

I've got a Python script that is run from rc.local when my Raspberry Pi boots up. The script will store the PID, using os.getpid() in a plain text file. pid = str(os.getpid()) pidfile = open("garage.pid", "w") pidfile.write(pid) pidfile.close() I…
Ben Parmeter
  • 49
  • 2
  • 11
0
votes
1 answer

Running process in the background at bootup different behaviour then manual start

I am trying to run airodump in the background.. I wrote the following script thats called from /etc/rc.local: #!/bin/bash /usr/local/sbin/airmon-ng check kill >> /tmp/airmon-kill 2>&1 sleep 2 /usr/local/sbin/airmon-ng start wlan0 >…
Alex van Es
  • 1,141
  • 2
  • 15
  • 27