Ubuntu :: Export PATH To Adb Directory Through Bashrc?
Feb 25, 2011
I,m having a rough time getting the terminal environment to recognize my android debug bridge path (which is set in a separate hdd) I used to paste this in my bashrc, but then found that it would make the env system bonkers whenever i attempted sudoing with an option:
# Android Debug Bridge (ADB) sdk path
alias sudo='sudo env PATH=$PATH'
export PATH=${PATH}:/media/Disk/Linux/Android/sdk/platform-tools/
The "alias" line was the one making me have a rough time with env.
Now that i got rid of it everything is well but adb's path isn't exported anymore.
After saving above changes, I enter the command: source ~/.bashrc Now if I do echo $PATH, the path shows both the old PLAY_HOME and new PLAY_HOME. This is really bad and messes up a lot of things in my project. This problem only goes away if I logout or reboot, a rather very long process. What is happening is that the old path is added to new path element and the old path includes the old path element you want to remove.
I have what I hope is a fairly simple question to answer. In my ~/.bashrc file I can create this alias:
Code: alias uChmodDP='chmod -R $1 $2' #specify permissions. and the variables work fine. But I cannot seem to get any love from this alias:
Code: alias umnt='umount /dev/$1' I realize the likely problem is the variable following hot on the heels of a specific directory, but is there anyway to specify a variable in an alias like this? For some reason I cannot umount usb pen drives by right clicking, and have to always resort to the terminal to do so, which for me is no real biggie, but if I could create this alias it would be an even better no biggie to umount using the terminal.
Actually, the inability to right click to umount usb devices seems to be a Thunar issue since I run xubuntu. Using Nautilus I am able to right click and eject/safely remove devices. Using Thunar however, right click unmount always pukes back an error that the device must have been mounted on the command line or some such BS. But like I said it is no real biggie to use terminal, but an alias would be even nicer. I prefer using Thunar and Xubu most of the time b/c my laptop is quite underpowered.
The problem is I can't use $0 as reference because the script is only sourced not executed. I also don't want to hardcode the path because the location might change and there will be more copies. Is there an easy way to create this information from within the the sourced bashrc file? I use Gnu bash 2.05b on Suse Linux 9.
I have installed a software and set the variables in the .bashrc file to avoid setting them everytime I would like to run te software. Now I have installed a new software and would like to do the same thing in the .bashrc file.How can I add the path to the new software directory without affecting the first software path.
I'm running OpenSuSE 11.3 (64 bit) with the latest kernel update as of yesterday. I've recently moved from NFSv3 to NFSv4 on 4 servers. Between the 4 servers there are 9 exported directories. All of them work except 1 on 1 of the 4 servers.
/etc/exports # NFSv4 fsid=0 for the top level directory /export *(rw,fsid=0,async,no_subtree_check,insecure) # End
# NFSv3 /export/apps/oracle *(rw,async,fsid=7,no_subtree_check,insecure) /export/ftpserver *(rw,async,fsid=6,no_subtree_check,insecure) # End
I had to keep the NFSv3 entry as I need that as the mount doesn't work with v4. /export directory listing /export: total 5 drwxr-xr-x 4 root root 104 2002-08-08 16:47 . drwxr-xr-x 33 root root 944 2011-01-25 17:28 .. drwxr-xr-x 10 root root 232 2010-01-26 10:01 apps drwxr-xr-x 8 root root 4096 2010-12-13 12:31 ftpserver
Now on any of the 4 servers if I do: # mount -t nfs4 machinename:/apps/oracle /mnt mount.nfs4: mounting lister:/apps/oracle failed, reason given by server: No such file or directory
But the other sub-dir of /export is fine: # mount -t nfs4 machinename:/apps/ftpserver /mnt
If I mount the pseudo root: # mount -t nfs4 machinename:/ /mnt # ls -l /mnt total 4 drwxr-xr-x 2 root root 48 2002-08-08 15:20 apps drwxr-xr-x 8 root root 4096 2010-12-13 12:31 ftpserver
But the apps sub-dir is empty # ls -l /mnt/apps total 0
Well that explains why the NFSv4 mount of /apps/oracle fails because for some reason it can't "see" any files below that, but as I say the ftpserver sub-dir & mount are fine.
I have set up an NFS server on Fedora 13, and I am connecting to it with Fedora 13 and Ubuntu 10.
On both clients the command
Code:
works fine. On Fedora I can get into the directory with Nautilus and have read/write permissions as specified in /etc/exports on the server, but on Ubuntu I can only get into it from a sudo'd command line.
The ownership of the file on Fedora is "nobody" and on Ubuntu it's "user #500", with only people in the "500" group having access to it.
Obviously the permissions can't be changed on the client, but with the Fedora box being able to read/write to it with no problems I'm not sure what else I can do on the server to let normal users on the Ubuntu box read it.
I thought i'd set up the partitions correctly when i installed ubuntu, with a 15 gig "/" partision and a 45 gig "/home" and a 3.8gig "swap"
I was wrong i somehow misplaced the /home partition, and therefore didn't install it
I found this out about 4 days ago as i was running though video tutorial and realized i didnt have it setup correctly afterall
So... i did some research and found this site...[url] and i found something that seemed to work for various people, i deleted the 'now' windows partition and so i had this:
However i unmounted the /home folder following the instructions without realizing that i didnt have permissions to mount the /new home partition as it is not in the extended ubuntu 9.04 linux partition and i have no rights to it
So my question is, how do i fix the path to the /home folder (original) in ubuntu so that i can start over and do this correctly (ie; resize the extended partition and add the /newhoe directory/patition to ubuntu)
I realize that i can use a sudo command before lines to run su commands that are blocked in ubuntu, which is how i screwed up =
I cannot use anything in the menu as all links to programs are dead, i can run the add app, but it cannot install as the install folders are "not there"... i can see them in the terminal so i know my data is there and i can run the live disc to salvage it, but i cannot see it while ubuntu is loaded
Note; i have not restarted the computer and i don't know if this will block ubuntu from restarting either, so i need to fix via terminal, before i can do anything else, like letting the laptop rest.
I need to add a directory to path in ubuntu. The directory I want to add is on Windows drive .If I try to add a directory , lets say "some directory" to path , then on adding I get following error. The directory resides on HD.
user@user-desktop:~$ PATH=$PATH:/media/New Volume/some directory/javacc-5.0/bin bash: Volume/some: No such file or directory. ------------------------------------------------------------------------------------------------------------
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.
I've followed the guide here for installing MATLAB. The installation completed successfully, however, the launcher created doesn't launch MATLAB as MATLAB isn't installed anywhere pointed to by $PATH. What's the best way of solving this - adding MATLAB's directory to $PATH (in which case how do I go about doing so), or (re)installing MATLAB to somewhere already in $PATH?
I installed java in my pc by running the following on the shell ./jdk-6u24-linux-i586. I need to set the path to the bin directory and also a new environmental variable JAVA_HOME.
I'm trying to write a script in python to extract data from maillogs in gz format. I wrote a shell script but i now want to do this in python, as thats the preferred method where i work. anyway does anyone know how to specify directory paths for example the maillogs exist in /var/log so i want the script to go to that directory would LOG_DIR="/var/log/" work?
I am using Apache/2.2.3 on Centos 55. I am having an issue that is pretty strange to me. Whenever I navigate to a url on my webserver from outside my network. I have to put a '/' in the directory path for example When I type in: mydomain.com/directory1 it winds up redirecting to the hostname for my server HOWEVER When I type in mydomain.com/directory1/ it works, since I am adding the '/' at the end of the path. I suspect it is because I do not have my FQDN set up correctly.I did not have this issue when I was using Ubuntu 10.04 , I suspect because Ubuntu automagically set this up for me. Is there a particular way I need to setup my FQDN in centos to get this to work properly? I have tried going into /etc/hosts and adding my FQDN in there, but I do not think I did it properly, is there a particular way the /etc/hosts file needs to be setup?
I'm trying to compress with zip for linux utility a file
Is need to be done (example):
But I would like that in the zip file there is only one file: source.file instead the whole directory path /usr, /src,... and the file.
I can't move up to the directory /usr/src/ to execute the command.
I must do this from / directory.
If this possible? I Windows systems even if I do the zip C:directory1directory2source.zip C:directory1directory2source.file, it does what I need: a Zip in directory2 with just the file source.file.
I've been looking up the man page for zip, but did not find anything useful, tried, -j, -D with no success.
I have made the installation of Qt4 in my Fedora/MacBookPro. It also got a first compiling and running a simple program. The point is that for the compiler to run I need to point out every time where the bin is located, as that:
$ /home/threader/kinetic/bin/qmake -project
I have tried the following, but it still doesn't work:
# script #-----------------------------------------------------------# # /etc/bashrc or /home/threader/.bash_profile # config to Qt compiler
I am working on getting my software packages installed on my fresh Slackware64-13.0 installation. Some (but definitely not all) of my executables are unable to be run.
I understand what PATH is for. It is for locating files, folders, executables in those directories when running from a Terminal window.
So, for example, I have just installed Cisco VPN Client for Linux, and it is the strangest thing. I should have access to this. I must not be understanding something here. Does anyone have any idea why this is not working for me? I have put in an example of what I am talking about.
I am programming in bash and really stuck finding directory names. I have a script to find all the .php files on my / partition which will return the whole path. Is there a way to print directory hierarchy with all those values leaving out the forward slashes.
subject_dir=/labs/tricam/MERIT/MERIT_0* for subject in `ls $subject_dir` ; do if [ ! -d $subject_dir/$subject/feat/glm2010/doublegz/SRRTA.feat ] ; then
I am total new to linux as I worked mostly on RTOS (symbian). My problem is, I need to find the file IOSTREAM.H and I am following commands below: 1) cd / 2) find . iostream.h ( finds the file / directory from the current path) It shows No such File or Directory