Ubuntu :: How To Execute Command At Boot Time
Apr 29, 2011
I use two monitors,my problem is that I want to change the setup,so that the other monitor becomes default.There's no problem with my BIOS settings and I have tried every GUI tool that could help me(to my knowledge).Well I've found this URL...that helps a lot but I want to execute the command every time I boot before the splash screen(so that the login screen appears on the right monitor).I've tried rc.local but had no success.Any ideas on how to execute the command at boot time?
View 9 Replies
ADVERTISEMENT
Oct 19, 2010
I need a script that executes a command based on a folder's last modified time.
if "/var/data" was modified in less than an hour then "/usr/local/etc/searchd stop" should be run
can we use "find -mmin +60 -type d" in conjunction with second command
View 1 Replies
View Related
Mar 11, 2010
how can i execute vino-server at boot time, before my graphical login prompt (gdm ?) appears
View 1 Replies
View Related
Dec 1, 2008
Is there a way to execute some command and then after the command completes utomatically reboot the system and then after the system reboots execute another command ? For example look at the sequence shown below(1) Execute command-1(2) After the command-1 in (1) is completed,reboot the system (3) Execute command-2(4) After execution of command-2 reboot the sytemIs there a way i can automate this process so that i need not reboot the system manually
View 5 Replies
View Related
Jun 4, 2010
is there any way to execute a command every time a "folder changes status"? Under windows there's an API which pro-actively tells you when something has changed within a directory, so I was trying to achieve something similar under Linux. I can't think anything else other than check the list of files and parameters (e.g. date/size/owner) every few seconds, but that's not ideal of course... So what I'm asking here is: is there is a way to set linux to tell me rather than me go and check?
View 2 Replies
View Related
Mar 19, 2010
I have a big bash script ,its goal is to download movie one by one . But I often get into a problem: if this script is executed in cron,it often does not completely download the movie.I often find the movies it downloaded are several KB while the movie is actually 20MB.So I think it is because it did not wait for finishing one task ,and jump to download another.So I want to know ,is there a way to force the bash script to wait until one movie downloaded completely and then start to download another movie ?
View 8 Replies
View Related
Jun 18, 2010
Code: cmd='date | wc'
$cmd If this script is executed, an error is generated. The reason written was that "The execution fails because the pipe is not expanded and is passed to date as an argument".What is meant by expansion of pipe. When we execute date | wc on the command line, it goes fine.then | is not treated as an argument. Why?
View 4 Replies
View Related
Aug 19, 2009
I have a script which builds a project and then runs junit tests. However, if the build fails, the junit tests fail with the same error message.Therefore the command which runs the junit tests should only be executed if the build was successful.
View 3 Replies
View Related
Oct 16, 2010
way to hibernate at a specific time or after a some minutes (like 40 minutes to an hour, guess the exact time doesnt matter anyway). normally i shutdown my comp at night with
Code:
sudo shutdown - P HH:MM
which works just fine, but sometimes i have like 4 workspaces of stuff open that i'm working on so i'd rather just hibernate. shutdown -H does this halt thing that is really not my cup of tea so from the aformentioned googling i found out about at and sleep and crontab etc. but at and sleep cant recieve my sudo password beforehand so its useless and crontab is for repetitive scheduling, which i'd like to avoid cause i would hate to be working and suddenly have my forgotten crontab script hibernate me.
so is there any way to do a delayed hibernation? or at least some way to provide the sudo password to an at or sleep prefixed command, beforehand?
i'm only interested in doing it straight up through the terminal, not through other 3rd party software cause i tried a few of those before i found out about shutdown and they didnt work very well.
View 6 Replies
View Related
Apr 6, 2011
Create a file. change its permissions at a specific time. change the permission.
At the moment this is what I have and it changes the permissions of the file but not according to the time specified.
View 2 Replies
View Related
Apr 23, 2011
I'm doing a program and I want it to execute some code during n seconds. For example e put a command in the shell like this 'ls % 10' and the program should run the command ls for 10 seconds.I'm trying something like this:
Code:
pid = fork();
if(pid == 0) {
[code]....
View 2 Replies
View Related
Oct 13, 2009
I am running Centos 5.3. I ran no updates, performed no installs, nor changed any configuration immediately prior to this issue. My problem is this: when I run the command startx (default runlevel 3), it is a long time (5-10 minutes) before Gnome startx, and once it does start applications will not run. Also, when I try to use sudo (from any environment, even ssh), it is a long time (5-10) before the command is executed.
I cannot say for sure, but it seems like this is an intermittent problem. Sometimes X takes a long time to start, but once it starts it will launch programs. Sometimes X takes a long time to launch, but once it starts it will only launch certain programs. Though presently X always takes a long time to start, and I cannot successfully launch any programs.
A while back a had a similar problem to this (x taking long time to start, sudo taking long time to execute) and it ended up being a DNS problem. Unfortunately, I cannot remember exactly what it was and I stupidly did not document it. Maybe this is also DNS related, I don't know.
I don't know what log files to look at for problems with X, Gnome, and sudo taking a long time to start.
View 19 Replies
View Related
Nov 11, 2010
I was thinking of creating a little audio alarm clock with an mp3 and mpg123 to play a song from a cron job each day. How do you specify the time of day to execute a cron job?
View 4 Replies
View Related
Dec 27, 2010
Can anyone tell me what command can be used so that the Linux Centos Server starts mysqld, httpd and ftpd services at boot time automatically?
View 2 Replies
View Related
Jan 25, 2011
Quote:
#!/bin/ksh
DBcounttry_finalnofunc()
{
[code]....
View 6 Replies
View Related
Apr 5, 2010
I found a way to change the kernel time zone with the following command
$ ln -sf /usr/share/zoneinfo/* /etc/localtime
After I tried it and checked the kernel time zone, but it didn't changed.
It seemed to be applied after rebooting.
Is there any way to change the kernel time zone "dynamically" with the
console command, not with the GUI environment?
View 1 Replies
View Related
Jan 14, 2010
I am trying to find a way to execute a python script in regular time intervals? How can I do it?
View 2 Replies
View Related
Sep 14, 2010
I want to start my Ubuntu 10.04 and without logging in I need a command started. The command is setxkbmap .... So, I will not put the command in my .profile, nor in my .bashrc, because I am not going to login.
View 2 Replies
View Related
Sep 14, 2010
I want to start my Ubuntu 10.04 and without logging in I need a command started. The command is setxkbmap .... So, I will not put the command in my .profile, nor in my .bashrc, because I am not going to login.
View 1 Replies
View Related
May 13, 2010
I googled around and couldnt find what I was looking for. Maybe I used the wrong search terms, but whatever. I was wondering if there was a possibility to execute a series of terminal commands just by double-clicking an icon. For example, there would be an icon on my desktop, and if I were to doubleclick it, it would execute "cd ~/.wine2" and then "WINEPREFIX="$HOME/.wine2" wine program.exe".
I realise that most of you will probably go "duh, that's simple" or something similar, but I am extremely new to ubuntu, and dont know my way around yet.
View 3 Replies
View Related
Feb 2, 2011
I need to execute this command after login: gvfs-mount -d /dev/sda1.It works perfectly from terminal but it doesn't if I add it to "Startup Applications" or to rc.local.Is there another way?
View 2 Replies
View Related
Jun 13, 2011
i want to execute system command with perlm but it gives me error.
command is wmic client. here it is
#!/usr/bin/perl
open (EP, "/home/user/Templates/domainpc.log");
while (<EP>) {
chomp;
[Code]....
View 1 Replies
View Related
May 3, 2010
Is it possible to allow a group/user to execute a command, where one of the parameters of the command is a group as well? example that does not work as intended:
Code:
Cmnd_alias SU=/bin/su -l %group1 This example works sortof, it treats the "%group1" literally. I know I can list out the "/bin/su -l <eachuser>", but as you can imagine that is impractical. In this example, I want people in group2(not shown for brevity sake) to be able to su to someone in group1
View 13 Replies
View Related
Jan 26, 2010
Some time ago I installed LAMP in my server, but now I need to execute .php files from the command-line (in order to execute some manteinance scripts for mediawiki). Seems that the PHP files running in the server are run thru some kind of "module" in apache2. Can I tell apache2 to run a .php file in command-line mode using that php module? Or should I install a fresh copy of php-5? Won't that interfere with apache or mangle the system?
View 4 Replies
View Related
May 16, 2010
Is there a way to do that since the computer and OS is aware that the power supply is disconnected.
View 6 Replies
View Related
Oct 9, 2010
I am setting up a cron job on my DD-WRT router to execute a WOL command, and would like to know if what I have is correct.
Format:
Execute @ 12:00 on Wed, Thur, Fri, Sat every month/Yr
0 12 * * 2345 root /usr/sbin/wol -i 192.168.1.255 00:00:00:00:00:00
View 3 Replies
View Related
May 4, 2010
i have one executable file (filename : "tet"). i can run this command in other linux os like: "fedora, cent os" using command "./tet", and it's working fine. but this command not working in debian. i don't know how to execute this file.
1. i have tried with 755 and 777 permission
2. i have tried "home/fullpath/tet"
3. i have tried "/tet"
4. i have tried "./home/fullpath/tet"
but above all commands are failed. to run this execute file
View 10 Replies
View Related
Nov 29, 2010
I would like to have an user that can execute al command with sudo.I configured sudo with yast2 and in the sudoers file actually there is a line with:USER ALL = (ALL) ALLWhere user is my username.But I can't use some command like ifconfig becouse it say that it can't find the command. I think that this is becouse of path, but shouldn't i get root path using sudo?
View 3 Replies
View Related
Aug 27, 2010
I want a quick and simple way to execute a command whenever a file changes. I want something very simple, something I will leave running on a terminal and close it whenever I'm finished working with that file. Currently, I'm using this: while read; do ./myfile.py ; done And then I need to go to that terminal and press Enter, whenever I save that file on my editor. What I want is something like this: while sleep_until_file_has_changed myfile.py ; do ./myfile.py ; done
Or any other solution as easy as that. BTW: I'm using Vim, and I know I can add an autocommand to run something on BufWrite, but this is not the kind of solution I want now. Update: I want something simple, discardable if possible. What's more, I want something to run in a terminal because I want to see the program output (I want to see error messages).
View 7 Replies
View Related
Oct 3, 2010
How do I set up SSH so I don't have to type my password? i execute the following command ssh -l admin hostname command but each time i execute it, it ask me to enter password.how i can give it password as default because i'm going to put in bash file ?
View 2 Replies
View Related