Ubuntu Servers :: Change Executable Path For Boot Scripts?
May 17, 2010
I have a startup script which calls other scripts which need to run some utilities I have. I've tried changing the executable path by adding it to .bashrc:
Code:
echo "PATH=$PATH:$new_path" | tee -a /root/.bashrc /home/$user/.bashrc
echo "export PATH" | tee -a /root/.bashrc /home/$user/.bashrc
But this only works for finding executables once the boot process is over. The startup scripts don't see this path.
View 1 Replies
ADVERTISEMENT
Aug 11, 2010
Installed Apache and the default web root was /var/www I wanted to change the cgi-bin to somewhere within the /var/www but I cannot. It only works at /usr/lib/cgi-bin. I am trying to work out the Python CGI to be precise. It works at /usr/lib/cgi-bin but gives a 404 at other places like /home/aj/public_html/cgi-bin or /var/www/cgi-bin.I even tried it with putting a webroot directory in my home directory with a cgi-bin in it and made the changes accordingly in the conf. but the only way it works is when cgi-bin settings point to /usr/lib/cgi-bin otherwise it gives 404.
View 2 Replies
View Related
Dec 6, 2010
I have program (command line) that requires another program be installed and in its path. So I downloaded the file (.tgz), and extracted. I followed the compile and make instructions and ended up with a folder on my desktop that contains the excutable but is not in the path of the the other program. How can I do this..I think that I have about 20 more .tgz files to do this with.
View 2 Replies
View Related
Sep 1, 2010
Morning all , not sure how to put this. I have a .sh executable script I use for video encoding. I want the system to be able to see it no matter where in which folder I am. I want to be able to execute that script in terminal in any folder. How can I make it part of the system path. ? Don't know if my wording is right but I think you guys know what I mean.
View 9 Replies
View Related
Sep 14, 2009
I have a path c:windowsackup I need this string to be changed into /windows/back/up I used the command -bash-3.00$ echo windackup | sed 's/\//g' but the output is windbackup
View 7 Replies
View Related
May 31, 2011
Current script:-
prefix=user@my-server:
find . -depth -type d -name .git -printf '%h�' | while read -d "" path ; do (
cd "$path" || exit $?
[code]....
How shall i go about changing the absolute path to relative path, so that /home/git/mirror/android/adb/ndk.git gets converted to /mirror/android/adb/ndk.git //echo <command> "$prefix$PWD.git" ?? - anything for relative path?
View 7 Replies
View Related
Aug 13, 2010
Does executable file contains the precise path to SO file? Should it be compiled with precise knowing of SO file location?
View 8 Replies
View Related
Feb 15, 2011
I want to change the icon image of the executable files from command line.
View 3 Replies
View Related
Aug 1, 2011
I have tried different methods to auto start wpa_supplicant at boot on Ubuntu Lucid server on a laptop which can't be connected to Ethernet.
The only thing that worked is adding the wpa_supplicant command before exit0 in rc.local. It solve my problem of wpa_supplicant auto start and annoyance on not be able to ssh before local login. But the screen stuck at Ubuntu Logo. How can i get pass Ubuntu logo screen to regular tty or xbmc in future?
[URL]
View 1 Replies
View Related
Aug 4, 2010
Ubuntu 9.04 server (64bit)
8GB
(2) 320 WD HDD - RAID 1
After coming home one evening I found my server was turned off. My suspicions lead me to believe we had a storm and the power went off, then the UPS went off and finally at that point the server went off too. I think my server was set to allow security updates. After it turned of and restarted it seems it made a change to Grub and upgraded it to Grub2. In doing so I now get the following message:
Error 13: Invalid or un supported executable format
I have tried to do the following:
url
This solved the problem for me, from > url
Quote:boot from the live medium and chroot into the Linux installation:
$ sudo mkdir /mnt/linux
$ sudo mount -t ext4 /dev/sda1 /mnt/linux
code....
Then, the following command should resolve the issue. :
$ sudo grub-install --recheck /dev/sda
View 4 Replies
View Related
May 31, 2011
I have a dual boot Win 7 and Ubuntu 11.04 I just started setting up - and know almost nothing about Linux - I have all my data on separate drives from my OS drives, and would like to "arrive" at my "My Documents" file when i choose "Documents" in Ubuntu.
The location of "My Documents" is - /media/New Volume/My Documents (which I found by dragging the folder onto the terminal) not quite sure how to put in the right command - something like ln -s /media/New Volume/My Documents ~Documents - (but that isn't right and didn't work).I also want to do the same with Music, Pictures and Videos.
View 3 Replies
View Related
Jun 27, 2010
I'm trying to make a reference to a second hard drive that is not part of the main file system, so I changed all the references to /var/www to /media/HD1/www and I have set the permissions on the entire hard drive to allow reading, and I still get a 403 forbidden error when I attempt to access my site, everything works when I just use the default path. I'm using Ubuntu 10.04 with apache2 installed through the package manager...
View 2 Replies
View Related
Sep 3, 2010
I am trying to run Wattch simulator in linux.But it is giving the error below. what is this error and what do I do about it?
fatal: bad magic number in executable `prime' (not an executable?)
View 1 Replies
View Related
Nov 16, 2010
Can I change the default path for any or all of the different crontab files?
Can they be changed independently? for example can the user mark get one path for cron jobs, Lynn get another, and root get yet a third, or are they always going to be the same?
How do I change them?
Hello fellow Linux users:
I know there are several crontab files on my computer. One each for each user, and it looks like one for root, maybe others?
I think there is only one cron handler that reads all the different crontab files and does what it is told.
If I do from my command line, I get:
Code:
mark@server:~$echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
If I schedule a similar command in my own crontab file by using
Code:
mark@server:~$crontab -e
with the following line:
[Code].....
View 2 Replies
View Related
Aug 23, 2010
We have tried to check the IP header using Wireshark on the outgoing packet after setting the client_socket.setTraficClass(34); in the linux machine. But 34 is not set. instead it was showing 00. is there any right path to change the dscp value in linux machine?
View 2 Replies
View Related
Mar 12, 2011
I was changing my sudoers file to give permission of using "sudo" command to all root commands, asking for the password. It works, it's fine. The problem I'm having is with the variable PATH to my user, I think.
In terminal:
normal user:
Code:
ataias@ataias-notebook:~/Downloads$ echo $PATH
/usr/local/bin:/bin:/usr/bin
super user:
Code:
root@ataias-notebook:~# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
As many commands are in /sbin/, root can use them without writing "/sbin/" but I can't do the same cause it's not in my path.
while root do this:
Code:
shutdown -h now
I should do:
Code:
sudo /sbin/shutdown -h now
and I want to use only
Code:
sudo shutdown -h now
I want to change my user's path variable to make it equal to root's path. how to change it? I don't know many things of shell still.
View 5 Replies
View Related
Oct 16, 2010
I want to add my current working directory to the PATH variable and make it permanant in my .bash_profile so I can run my testscript without using the ./ charactors.can this be done?
View 5 Replies
View Related
Apr 2, 2010
After upgrading to CentOS 5.4, my root path seems screwed.The issue is present for CRONJOBs that run as the root user as well as when I su to the user through SSH.
I need the following path ALWAYS:
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin
It currently only gives root:
[code]....
View 4 Replies
View Related
Jun 20, 2010
I am running into a snag on .exe files in Lucid. I have Wine installed, but I can not open the file as it is blocked from executing with a window popping up telling me that this file was blocked due to security reasons. I go into the files properties and try to change the permission but that does not help. Is there a way to get around this? Possibly in the terminal as root?
View 3 Replies
View Related
Jan 3, 2011
I want to change the default path for logs in Jboss running on Fedora box? How to do the same?
View 1 Replies
View Related
Nov 18, 2010
In Linux, Is there a way to remember/change a path to a USB device? In my case, I need linux to remember that my USB serial adapter will stay on /dev/ttyUSB0, but when I unplug it and plug it back in, it switches to /dev/ttyUSB1. I'm using a debian-based distro(mint)
View 1 Replies
View Related
Sep 20, 2010
when i tried install any package using add/remove software it's go download in the web what i need package.i need change the installation source via cd or dvd drive,.So i want to change the installation source path.Please guide to me how to change the installation source path.
View 5 Replies
View Related
Jan 6, 2011
I have configured 3 drives on my machine.sda1 less than 10 GBsda2 less than 10 GBsda3 450 GBI have installed a software in /usr/share/MyApplicationand as I see /usr/share stays at sda2 and only 2 Gb is free but my application needs more than 3 GB free to run because it creates a temporary file greater than 3 GB during execution.Knows anybody any way how to make MyApplication stays in sda3 drive.
View 9 Replies
View Related
Nov 29, 2010
I just set up an internal mail server for my office using Postfix, Dovecot and Squirrelmail. It works great except for one tiny problem. When I send mail, I address it to user@myoffice (no .com, .net, etc) and it works perfectly. However, somewhere in my work, I screwed up and for whatever dumb reason put myoffice.net somewhere in there and now the return-path always shows up as user@myoffice.net instead of just user@myoffice. Does anyone know how to fix the return-path so that when someone clicks reply it goes to user@myoffice? I've Googled and searched here without finding my answer, apologies if it's out there and I've just failed to see it. Rest assured I have done a couple hours of searching before finally asking for help.
View 7 Replies
View Related
Jun 2, 2010
I compile the c,c++ programs using gcc compiler in ubuntu.And i am using geditor to write a program.when i open a new gedit text file to write a program,by default it is opened in my home directory.but i want to save my all programs in another drive..But i dont know how to change the path ,so that new gedit file open and save in that particular drive or folder where i want it.
View 1 Replies
View Related
Feb 23, 2010
i was tring to create a php daemon using system_daemon class. As i am in Lampp environment i get the problem that , system_daemon is is connecting to default mysql which i have stopped before starting lampp. i would like to know , how i can change its socket path to /opt/lampp/var... ? where i can make this path change?
View 1 Replies
View Related
Feb 5, 2010
We have a custom app that runs on boot on some older hardware running DSL linux, and their startup manager was quite simple. We purchased some newer Asus eeebox's which run xandros and things are quite stable and run nice with 1 exception.The application only runs from the root (/) location. This box auto logs in as 'user' and there is a /home/user/.kde/Autostart folder where you can stick scripts to run at boot. So I have a start.sh script, and with little bash programming tried things such as;
sudo cd /
sudo /startapp.pl
but the errors start spewing with the basic;can't find data/xyz as it's looking in the local.I thought there was a basic cwd (change working directory) but everything I try just forces the run from that location.Any ideas or suggestions are appreciated, but things like can you change the code, etc. can't be done, so it must be a programming thing. The only other thought I had but not sure, can you do a cronjob with @boot or something, that when the box starts, it can run this job as root and fire off?
View 3 Replies
View Related
Jan 16, 2011
I found the following function in /etc/profile file.
[Code]...
1. I dont undestand what "if ! echo $PATH | /bin/grep -qE "(^|:)$1($|:)"" this if statement actually comapres??
2. Also what is the difference between PATH=$PATH:$1 & PATH=$1:$PATH
View 14 Replies
View Related
Apr 13, 2010
I was wondering if we could cd in the directory of the PATH variable. For example, if I type in echo $DISPLAY. It will give me /tmp/launch-3ee4fg/org.x:0
Is there any way that I can just take the value '/tmp/launch-3ee4fg/' from the output of $DISPLAY and exclude out the filename to the end of the command. I tried using the read command and the IFS variable..apparently IFS does not recognise / I guess.
View 2 Replies
View Related
Jan 9, 2011
I'm writing an application with a plugin architecture and would like modify (specifically add to) the dynamic library search path while the main executable is running.
The plugin paths are not known until the application is running so I can't set LD_LIBRARY_PATH ahead of time.
My understanding (although I haven't tested it) is that the executable will only parse the LD_LIBRARY_PATH once, early on, so modifying this environment variable at runtime will have no effect.
(Note - on Windows the solution is to modify the PATH environment variable)
I know it's possible to specify the full path to load a dynamic library, and this would work if the plugin(s) only had a single library to load, but some of them will have a bunch of libraries with their own inter-dependencies, so I'd like the plugin folder(s) to get added to the search path to pick up the dependant libs.
View 8 Replies
View Related