Ubuntu :: Run Simple Command At Startup?
Apr 10, 2011How would i make ubuntu just execute this
Code:
deluged -p 10002 -c ~/delugebig/ at startup? Just print it as if i myself would print it in the termial.
How would i make ubuntu just execute this
Code:
deluged -p 10002 -c ~/delugebig/ at startup? Just print it as if i myself would print it in the termial.
make a start up script so that it executes this command: cat /proc/acpi/battery/BAT1/state I managed to execute it writing command to .bashrc, but every time I open terminal it starts like this:
[Code].....
I need this command on start up, so that my battery meter starts working properly. For some reason, if the command is not activated, gnome battery meter is showing that battery is charging even if I am not on AC power. If there is any other way to fix this without making script I would be glad to hear.
I wanted to know if there was a simple command for the default sound in ubuntu. An example would be typing volume = 42 into the terminal or something. I'm not looking for alsamixer or anything like that, but maybe thats the only option.
View 1 Replies View RelatedI am trying to use the date command in a simple bash script as below:
#!/bin/sh
this_date=`date`
echo "The date is $this_date"
This script seems to work only if a surround the command with the `` characters, which I copied from another script. Can anyone tell me why this is, and how I can insert these characters from my keyboard,which only has normal quote and double-quote characters?
I need a program that automaticly runs this command in the terminal when I use it:
sudo modprobe nvidia_g210m_acpi
Sure, I know that it's not that hard to just write it in terminal and so on, but I really want a program for it. I'm using ubuntu 11.04 if U need to know that?
trying to make a startup script that executes a simple php script at boot. The stipulation is that it must be run after fstab is processed because it requires access to a volume that fstab mounts. As it is, it doesn't seem to be running properly at startup, and I suspect that it is simply running before the volume is mounted. The script does not need root access. If I run it once I login, it works fine.
Also, is there a way to determine the output of a startup script?I am have configured a bash script called module.sh that cd's to the scripts directory (in the external volume) and then executes the script. I didn't forget the ampersand after the php invocation. I used update-rc.d module.sh defaults to configure it.
When I run this command from shell, it runs ok
export REVS=`svn info svn+ssh://svn.myone.ca/var/svn/story/trunk/lib |grep 'Last Changed Rev:'| awk -F: '{print $2}'`
However when I save it into a file called test.sh (of course, I chmod it with +x), I got error "export: 2: bad variable name"
Here is the file:
#!/bin/bash
export REVS=`svn info svn+ssh://svn.myone.ca/var/svn/story/trunk/lib |grep 'Last Changed Rev:'| awk -F: '{print $2}'`
I am using ubuntu.
I was thinking to install a very basic SSH gate, secured over SSL, like this [URL]
using PHP. However I would like to have it very basic and simple to install. (not database SQL, nor complicated things, ...) so that I get a prompt page with login and password to access the SSH-internet, and then can SSH the linux box over SSL and regular port 80 like they do. passwd would be in a txt file or whatever. You use index.htm and no one can scroll the tree of the directory. Would have someone already embedded php code for that?
I noticed in phpmyadmin that we can export a database in type update. Indeed we have update... in place of insert.... is there anyone know if it possible by a command line or by a simple PHP code ?
View 1 Replies View RelatedIve been using linux for a while but I am just getting into shell scripting, im currently trying to get a simple script for finding and copying files powered by the command:
Code:
This works fine from the command line but when put in a script such as:
Code:
Code:
with the keyboard inputs for $fc1 and $fc2 being *.doc and ~/test respectivly. The only problem i can see is the xargs -ivar "var" part possibly needing $var to be defined?
i'm a college student studying pc programing, and i was given today a special work and i have to program using miranda... which i've never used it >.< can anyone give me a hand to where to download, how to compile, and a simple tutorial for making a simple program or something?
View 3 Replies View Relatedi have a file, 2fsrl, that i want to run at startup. If i type /home/kent/2fsrl in the terminal it works. Although it won't work if i put the command in Startup Applications.
In my file is this:
synclient VertTwoFingerScroll=1
synclient HorizTwoFingerScroll=1
synclient EmulateTwoFingerMinW=5
synclient EmulateTwoFingerMinZ=48
It's for 2 finger scrolling
i need to run this command at the boot of computer
Code:
hdparm -B 255 /dev/sda
i saved this command in the file /etc/rc.local but i don't know why...it doesnt work, so i have to run it after boot from terminal..here there is the content of the file:
Code:
#!/bin/sh -e
#
# rc.local
[Code]....
I know how to make things run at startup, and obviously know how to run a command in terminal (type and enter... duhhhh). However I would like to be able to run vnstat in terminal when my computer logs in, this is very handy for seeing how much I have downloaded. I have a terminal embedded on the desktop and would very much like to run vnstat in it for me when it starts, I know I could just type in vnstat when I've logged on, but where is the fun in that? Just having it already there for me would be far better.
The command for starting my desktop terminal is as follows:
Code:
gnome-terminal --window-with-profile=trans --geometry 90x40+280+30
Relative newbie here - seeking advice on having a command run on start-up. Specifically, I want to have a chgrp and chown execute on a specific directory, subdirectory and associated files. I'm not looking for advice on how to do it (I'd like to muddle through it on my own - I learn better). And, I'm not looking for alternatives. Background - I think this is the easiest way for me to have two users on the same PC upload photos that each user can have full access to, and do things like back-up etc.
View 9 Replies View RelatedI wish to enable battery tab in Acer 751, Lucid. The command I type in terminal every time I start the netbook is: Quote: cat /proc/acpi/battery/BAT1/info How do I make it run automatically on start up?
View 2 Replies View RelatedI know this has been asked a 1000 times, but none of the solutions I've read so far work.I need to run the following terminal command every time Ubuntu (10.04 64bit) starts:Code:xset m 9 1This boosts mouse speed to maximum. I don't know why, but it is the only thing that works. All built-in mouse settings are at maximum, yet my mouse crawls across the screen when Ubu starts. So far, I have tried:Creating a startup script called "/etc/init.d/autorun.sh" containing code...
View 9 Replies View RelatedI've searched everywhere, but they all talk about BOOTING into the terminal instead of ubuntu. But here all I want is for ubuntu to automatically run a certain command when I boot into ubuntu.This is related to the screen brightness change problem that's still much of an unsolved mystery for ubuntu and I have mostly solved this 'm able to change the brightness with sudo setpci -s 00:02.0 F4.B=xx, xx being from 00 to FF, but it doesnt seem to stay when I log out and log back in. Is there any possible way to put a terminal command in the startup applications or something or a possible solution to the brightness problem that I havent discovered yet?
View 9 Replies View RelatedWell, I want to run a terminal command at startup. I Google searched, but all the threads were ~5 years old. The command I want to run is code...
View 9 Replies View RelatedInitially, I had dozens of errors from missing processes. I chrooted from live CD and reinstalled them.Now I got this:
Code:
fsck from util-linux-ng 2.17.2
/dev/sda5: clean, 213665/4104192 files, 2426106/16389120 blocks
[code]....
Since a few weeks my PC have been working slow and the gnome system Monitor says that my cpu is working at 100% all the time. when I ran top command appears:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
770 root 20 0 4060 308 240 R 76 0.0 8:41.05 yes
919 root 20 0 4060 312 240 R 49 0.0 8:23.39 yes
[code]...
I want to auto run
Code:
sudo updatedb at Ubuntu startup. Is this okay: [URL]...
I would like to setup a command to run when I start up the terminal, but have the terminal stay open for use when it's finished. I was trying to get my terminal to run fortune whenever I start it just for cosmetic value, so I tried changing the launcher command to gnome-terminal --command=fortune, but that makes it just output the fortune result and then terminate.
View 1 Replies View RelatedI have CentOS 5.5 with no GUI. How do I enable commands/scripts to run on startup when the server is rebooted?
View 2 Replies View RelatedSo I just partitioned my hard-drive, one side with windows the other to set free for ubuntu. It all worked fine. I put in the liveCD of ubuntu 9.10 and installed on to the partition. However, I have a problem. When it boots up it asks me to either boot into linux 2.6 or windows 7. Windows 7 works fine, but when I boot into ubuntu, the loading screen comes up and then it doesn't seem to boot into GDM. It's all command-line interface. I've tried sudo apt-get update and upgrade, but it isn't connected to my network yet so I can't do that. What can I do?
View 9 Replies View Relatedsometimes you want to run a command every time computer boots up. In DOS there is "autoexec.bat" in windows - "Startup" menu and I'm sure that there is a similar thing exists for Ubuntu, but that's not what I'm after.These things above will run a command when a user logs on. I want to run a command when a pc boots up. This is not straightforward in Windows, but since I'm a windows guy I can do this. I can install a command as a service with srvany utility that will make sure it will execute on boot up.Now I want to do a similar thing in ubuntu. how do I edit startup scripts in ubuntu to add an arbitrary command? I need to run the command in the context of a particular user, so I normally do it like this:
Code:
sudo -u myServiceUser -i myService
But I want as little downtime as possible and sometimes it takes sometime to find out that there has been a reboot, get to a computer and run the command manually. If I could run this automatically on bootup I wouldn't have this problem.
I am using Ubuntu as the client machine operating system. I have a start up program to connect to a Windows terminal Server. I am needing assistance in how I can force the client to logoff if the terminal connection is terminated for any reason. This is more of a security issue as we do not want the students using the computer to access the loacl machine at all. The program works great on boot, but it shows the home screen when terminated.
View 1 Replies View RelatedI've just done a clean install of Ubuntu 10.04 and installed Freevo on it from the Medibuntu repositories. After rebooting I get a shell window with no frame in the top-left corner of the screen with the Ubuntu loading screen still taking up the rest of the screen. Typing 'startx' gave a error that there is already a display running on the port.
View 2 Replies View Relatedwhat is the easiest way to add single command to startup? (has to be run as root)
View 1 Replies View RelatedI'm trying to get synergy+ to work on Fedora 12 on start up. I'd like to be able to log into Fedora using my keyboard and mouse through synergy+. I've tried adding the line
Code:synergyc <localipaddress> at the end of the /etc/rc.local file but I still can't use my keyboard and mouse to log in. I've also tried adding the lineCode:su <username> -c "synergyc <localipaddress>" to /etc/rc.local but it still doesn't work. Just to clarify, I do have synergy+ working on Fedora but I need to start it after logging in on each reboot by switching my keyboard over to the other computer.