General :: Bash - Where And How Are Custom Startup Commands Configured

Jan 11, 2011

I'd like to add custom startup commands (for example starting a process, registering to a registration server, downloading a configuration file) to the Linux startup process. Those commands should be triggered on startup only. What is the standard/appropriate way to do this?

EDIT: Is /etc/profile the right place to trigger such things?

EDIT2: I'm using Ubuntu.

View 4 Replies


ADVERTISEMENT

General :: Running Bash But Common Bash Commands Not Working?

Jul 17, 2010

below are the details of my system. I have bash as my current shell, some really common commands aren't working.

Do I need to do a re-installation of bash? Or how do I install a selection of bash commands which I need? (for example a subset of [URL])

Code:
root@sdptfw:~ # uname -a
Linux sdptfw.sdpt.co.za 2.4.36 #1 Tue Jul 22 13:13:24 GMT 2008 i686 i686 i386 GNU/Linux
root@sdptfw:~ # echo $SHELL$
/bin/bash$

[Code]....

View 13 Replies View Related

General :: How To Create Custom Commands

Apr 29, 2011

So I'm here thinking how to create custom commands on my Linux Debian? I mean so i could open up terminal and just type the script name (and possibly some arguments) and it would refer to the script in my home directory. Otherwise I've write the whole path to the script each time and it gets annoying.

View 2 Replies View Related

General :: Custom Keyboard Commands?

Apr 18, 2011

I found that Linux Ubuntu has custom keyboard commands.his is awesome.What I'm trying to do, is make a command that will shut down the computer with a single button with no dialog windows.For you know, being grounded nd stuff.I found the command for it is "shutdown" with a few options.But when I tested it, being bound to pause/break, it did nothingAm I writing the wrong code, as I'm not using any options, or is this not possible?

View 7 Replies View Related

General :: SSH Connection From BASH Script Stops Further BASH Script Commands

Dec 3, 2010

What happens when the script executes is that the ssh connection works and parks me at the remote hosts's shell login. Therefore, the "firefox" command refuses to execute. I need to know how to make the "ssh" connection occur, stay open, and go into the background so that the rest of the script can execute.If I could also do this with the "firefox" line so that the entire term window could be closed would also be helpful.

View 3 Replies View Related

General :: Put Custom Text On Terminal (bash Script)?

Jan 19, 2010

This code:

Code:
#! /bin/bash
echo Okay.
echo
Does not do it....

P.S. I want to show my parents what happens when I do:

Code:
sudo make me a sandwich
and have it say "Okay."

View 11 Replies View Related

General :: Running SQL Commands From Within Bash

Aug 1, 2010

I would be running SQL commands (UPDATE/SELECT) from within my bash script. I am completely new to this subject. Is MYSQL used for this purpose? Alternatively, what is sqlplus?

View 6 Replies View Related

General :: Custom Syntax Highlighting In Bash Shell - Using Keywords

Apr 25, 2011

I know it's possible to change the $ user@hostname colors, but is it possible to color different things? Could I make all numbers/integers a certain color. Or set certain keywords to be bold?

View 1 Replies View Related

General :: Commands See Files, Bash Doesn't?

Sep 10, 2010

This is a really odd bug I can't seem to figure it out. Basically, commands like ls can see all the files in the current directory, however when I go to execute the file it will give errors like "file not found", even when it most obviously is. If you look at my command history in the screenshot, you can see I can ls into a directory and see it's contents. When I try to run the file, I get the "no such file or directory" error.

However, if I type simply 'vm', I can't use tab completion to complete the directory name, and my third command is me typing 'vm' and hitting tabtab, it lists a bunch of vmware specific tools instead of the subdirectory name. I can then ls and see my current directory contents, and it will list only the single subdirectory. However, then I tried to use the full filepath from root to run the file, still to no avail. If anyone has any insight,

View 2 Replies View Related

General :: Bash - Passing Commands To CLI Using A Script

Jul 31, 2011

is there any way I can pass commands to the CLI of a tool directly?

I would like to script some actions, for example:

./OpenBTS < "tmsis"

I do not need to retrieve the results (I watch it in the log file). how I could realize that? There is now way to do this using command line parameters, at least not that I found out. So it looks like I have to figure out sth myself. Maybe I could automate screen in a way to detect the prompt and "paste" my command there. Are there tools for this on Linux?

View 3 Replies View Related

General :: How To List Folders Using Bash Commands

Sep 14, 2011

Is there any way to list just the folders in a directory using bash commands? ( as the ls command lists all the files and folders )

View 3 Replies View Related

General :: Bash Telling Commands Don't Exist When They Do?

Apr 28, 2010

I made a script that contains repetitious commands (snmpget and awk are the only ones at the moment. Running these commands from standard terminal work, but when run within a script, I get:

./reg_sm_count: line 10: snmpget: command not found
./reg_sm_count: line 10: awk: command not found
./reg_sm_count: line 10: snmpget: command not found

[code]...

View 2 Replies View Related

General :: Doing A Sequence Of Commands In A Bash Script?

Dec 2, 2010

I'm creating a bash script that contains the following line:"ssh user@$server1 cd /tmp; pwd"What I want is to print /tmp of server1, but the script it isn't printing that

View 2 Replies View Related

General :: Passing Commands As Arguments To Functions In Bash Script?

May 31, 2010

I wrote a simple bash script to let me treat any set of programs like a deamon. For example if I configure the script a certain way I can start/stop/get the status of apache, mysql and php all from one command. I am having a bit of a problem though. I am passing commands as strings to a function and then depending on the arguments to the script it might run one of these commands or another. Some of these commands need to beun in the background though, such as deluge-web. When I send "deluge-web &" to the function and it execute it deluge-web does not start in the background. I can't figure out why this is. I have tried escaping the & with ''s and with a , but nothing seems to work. I know that this is some idiotic thing that I am overlooking, but I am a bit stumped. Here is the script configured to start/stop/get status of deluged and deluge-web.

Code:
#!/bin/bash
function checkanddosomething {

[code]...

View 3 Replies View Related

General :: Delete Bash Terminal History Upto Certain No. Of Commands?

Jan 12, 2010

i want to delete some say 10 previous commands in bash shell!

View 3 Replies View Related

Fedora :: Applications That Starts On Startup That Aren't Configured?

Mar 21, 2010

This problem has been there since I upgraded to FC12 from FC11 (I use Gnome). There are two applications that launch automaticaly when I logon:A nautilus window pointed at computer:////RythmBox minimized to notification panel.And they aren't in System/preferences/startup applications

View 6 Replies View Related

General :: Gnome-terminal/bash - Cancel Inserted Commands That Will Be Executed Later?

Mar 13, 2011

$ execute_some_long_command <command is executing> <Accidently press middle button that inserts bunch of garbage (including, for example, `rm -Rf ~/*`) into console>

How to let execute_some_long_command finish, but not execute inserted things?

View 1 Replies View Related

Ubuntu :: Defining Custom Commands In .bashrc?

Apr 26, 2011

I'd like to know if there is a way to define commands in the .bashrc or .bash_profile. For instance, I want to be able to type 'work' in a terminal and set up an interactive work environment on my universities cluster. (This is done with the command 'qsub -I -X'.) I tried the following in my .bashrc file:

alias work ='qsub -I -X'

But, of course this failed, as I don't have a command work already defined. How do I go about doing this? Also, I can't assign 'qsub' an alias, since it's used with different options quite extensively.

View 5 Replies View Related

General :: Process Billions Of Small Files Using Bash Shell Commands With Limited Memory?

May 26, 2010

I need to process billions of small files using bash shell commands with limited memory size (256MB). If any of those files contain certain "keywords", the file will be removed. I tried with command:

find . -type f -exec grep -i -l -H "keyword" '{}' + | xargs rm -rf

where all files are located within the current directory. But the command above failed in "out of memory".

View 1 Replies View Related

Ubuntu :: Custom Commands Before Login Time In Lucid?

Jul 24, 2010

I would like to run a few custom commands when booting: "xinput" to calibrate the touchscreen and a couple of "setkeycodes" to make special buttons responsive.

From within a session I need to do "sudo setkeycodes [etc]" - without root access there's a "couldn't get a file descriptor referring to the console" error message.

Ideally these commands would already be operational at the login screen, and without requiring entering a root password every time.

I've put the commands in an otherwise empty /etc/rc.local but this does nothing. Other posts mention bootscript.sh but I don't get how this is used; and the best way to do this seems to have changed between versions - so what's the proper Lucid way?

View 3 Replies View Related

General :: Run A Bash Command Automatically On Startup?

May 13, 2011

I was wondering how to run a bash command automatically on startup. on start-up have "alsamixer" or "start-network" executed from terminal.

View 3 Replies View Related

Debian Installation :: Creating Boot Script For Custom Commands In Jessie

May 11, 2015

I didn't change anything; it just stopped working on boot. I've changed permissions according to messages from log files. No good.I now get messages saying "unable to open display ' '." If I set the display (I've done this several ways, the messages say "unable to open display ':0'."

Systemd is taking control of everything basic, with almost no documentation and no configuration tools at all: rationalization by lunatics.You can make a script to run commands on boot using systemd on Jessie by creating two files: the script, in any location a file in /etc/systemd/system that runs that script..My script is called james-boot.service, placed in my /home/james/.bin directory.

#! /bin/sh
# this is run by /etc/systemd/system/james-boot.service
# Enable with sudo systemctl enable james-boot.service
# Check with sudo systemctl status james-boot.service
# If it says the service is loaded, it's OK -- inactive only means it's done running.

[code]....

This file must have ownership root.root, with (apparently) permissions 664 (rw-rw-r--).After creating, enable with sudo systemctl enable james-boot. service.Check with sudo systemctl status james-boot.service. If it says the service is loaded, it's OK -- "inactive" only means it's done running.

View 4 Replies View Related

Ubuntu :: Executing The Custom Startup Script?

Apr 17, 2010

I created a script, named mount_share.sh (in /etc/init.d), to mount the shared VirtBox dir at boot so I don't have to do it manually every time I load the VM. The script contains the following:

#!/bin/sh
sudo mount -t vboxsf -o uid=1000 osx_shared /home/rob/ubuntu_shared

I made it executable:

sudo chmod +x mount_share.sh

Then I assigned it to run at startup:

sudo update-rc.d mount_share.sh start 51 S .

I'm thinking it may be either:

1) A pathing problem to the ubuntu_shared dir but, if I run "ls -al" from inside /etc/init.d, it does find the ubunt_shared dir

2) Trying to run as sudo from inside the script. But, since all startup scripts run as the root user, I shouldn't even need the "sudo" in there which I have tried to no avail.

View 1 Replies View Related

Ubuntu :: Create A Custom Live USB Startup ?

Apr 22, 2010

What I want to do is create a custom live USB startup of ubuntu.

I know how to create a usb startup from the iso (any ubuntu iso), with the usb startup disk tool.

Is it possible to add some software to it, for example suppose I want it to have exaile and wireshark (or any software) already installed.
How can I do that ?

View 3 Replies View Related

Ubuntu :: Program That Shows Custom Quotes At Startup?

Jun 2, 2010

What's a good program that shows quotes at startup? Quotes that I could edit and add to?

View 6 Replies View Related

Fedora :: How To Execute Commands On Startup

Aug 11, 2011

how to execute commands on startup. I've added lines to /etc/rc.d/rc.local, /etc/rc.local, I've put scripts (with extension .sh) into /etc/init.d/ and I've set the executable permission thing on all of them with chmod -x. I *still* can't get anything at all to execute on startup. The truth is, I'm trying to enable multitouch and button tapping automatically when I startup Fedora. I have the commands

[code]...

Which I want to execute whenever I start Fedora (it's a bit tedious to write them every time, or even to have to execute a script myself whenever I start my computer). Furthermore, if I can figure this out, then I can do all sorts of things. Does anyone have a clear, surefire way in which I can do this? I'm not good with using Linux at all

View 7 Replies View Related

Ubuntu :: How To Run Commands On Terminal Startup

Aug 3, 2011

I have a question regarding terminal. I try to launch it from the "Startup Applications" by entering a script.Code: sh -c '/usr/bin/gnome-terminal'but it does not start.Also, when it does start I would like it to auto run certain commands: navigate to my project folder run "play test" open a new tab run "top".how can I achieve this?

View 9 Replies View Related

Ubuntu :: XFCE - Configuring Startup Apps / Adding Custom Keyboard

Jun 20, 2011

I am new to XFCE and I'd like to ask few question about usage:
1. How can I disable dragging windows through workspaces? I like them to stay at one.
2. How do you configure startup applications?
3. Why XFCE menu doesn't show some of my custom icons? (png, tried more than one, for custom launcher - eclipse)
4. How do I add custom keyboard? (ALT+SHIFT switching)
5. I restarted laptop and all my applications re-opened after restart. I do not want that. How to disable this?

View 9 Replies View Related

Fedora :: Some Bash Script Commands Won't Run

Aug 6, 2009

I'm setting up a scheduler to run some bash script commands but they won't run when I point them to a script file. If I change the cron to call

[code]...

If I run ./writeTimeToLog from the terminal - it, well, writes the time to the log file! I then use

[code]...

to test I can schedule this to run every minute just so I can see it working. the entry was a basic as I could make. It adds the cron successfully but never seems to update the file. Where would an error be put if one occurred.

View 2 Replies View Related

Ubuntu :: Embedded Commands In Bash?

Apr 7, 2010

I would like to be able to connect to a machine, list a directory, wait long enough for me to see the results then move on to the next machine.This is failing:

Code:
#!/bin/bash
while read line; do

[code]...

View 3 Replies View Related







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