Results 1 to 10 of 10
HI,
there's only one thing I miss about Windows: the possibility to run programs that are not installed on the machine, realized by copying the installation folder from another PC. ...
- 06-03-2010 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 3
How to run uninstalled applications
HI,
there's only one thing I miss about Windows: the possibility to run programs that are not installed on the machine, realized by copying the installation folder from another PC. In this way, I have played games and used different applications. Is there any way to do the same on Linux?
- 06-03-2010 #2
copy the necessary files and run them, it is exactly the same
the only difference being that typically in linux the applications aren't installed in a single directory, you will have to find the necessary files by looking at the package
this is more work than just using the package manager to install it
- 06-03-2010 #3Just Joined!
- Join Date
- Jun 2010
- Posts
- 3
Ok. How can I find all the needed files? Or the information about where they're placed? Should I just copy them into a folder or would it be better to copy them in each corresponding folder (thus making it as an installation)? Is there any program that can do that (similar to synaptic) (apart from APTonCD, which needs administratory rights) I'd like something more portable, so I can put my apps on a USB stick.
- 06-03-2010 #4Just Joined!
- Join Date
- May 2006
- Posts
- 6
You could start with ldd. ldd will tell you the dependencies for the program.
- 06-03-2010 #5
if the systems are similar and the program is simple, you can sometimes just copy the executable and nothing else (i.e. a single file, perhaps in /usr/bin). on the other hand, if it's a complex application (something like a web browser) and the systems are different (two different distros, or an old and a recent version of one distro) then trying to copy it across would be ridiculous: it could require hundreds of libraries all over the place.
a better solution if you want to put apps on a usb stick is to build/install them there properly. unpack the source (somewhere on the hard drive!) and either build them as big static executables, or do a ./configure --prefix=/media/usbstick (or whatever) and then make && make install (do this as a regular user and you can be sure you're not accidentally writing over system files).
/usr/local can be useful for this sort of thing too (or even /home/yourname/programs or whatever): by setting a --prefix other than /usr when you build applications, you can ensure that they put all their bits and pieces somewhere where it's easy to see them and delete them or shift them around without affecting your "official" packages.
- 06-04-2010 #6Just Joined!
- Join Date
- Jun 2010
- Posts
- 3
Could I also do somenthing like:
cat ldd (name of the program) | cp /media/usbstick ?
- 06-04-2010 #7Just Joined!
- Join Date
- May 2006
- Posts
- 6
The output from ldd looks something like this:
[eddyv@EV-laptop trash]$ ldd tester2
linux-gate.so.1 => (0x0082a000)
libdl.so.2 => /lib/libdl.so.2 (0x00c54000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00c5b000)
librt.so.1 => /lib/librt.so.1 (0x00c8d000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00ee4000)
libz.so.1 => /lib/libz.so.1 (0x00c78000)
libc.so.6 => /lib/libc.so.6 (0x00ab8000)
/lib/ld-linux.so.2 (0x00a95000)
libfreebl3.so => /lib/libfreebl3.so (0x00d7f000)
You would have to do some additional steps to pull the file names out.
If you did copy all of the libraries you need to your USB stick, you would still need to set the LD_LIBRARY_PATH environment variable so that the shell would know where to look for the libraries. Something like: export LD_LIBRARY_PATH="<PATH TO USB STICK>":$LD_LIBRARY_PATH
- 06-05-2010 #8
you could do the ldd | cp thing via
for library in `ldd myprogram | cut -d ">" -f 2 | cut -d "(" -f 1`; do cp $library /media/usbstick/lib; done
or something along those lines. then with LD_LIBRARY_PATH set properly (to /media/usbstick/lib in the example above) it might work...
- 06-05-2010 #9Just Joined!
- Join Date
- Aug 2008
- Location
- Qatar
- Posts
- 19
If you are running the same distro on different machine it is possible as others set. you can check the details of the package with the package manager available. Even in windows not only exe but also relevant dll files required to get the programs run correctly.
- 06-07-2010 #10Just Joined!
- Join Date
- Mar 2006
- Posts
- 29
Even under windows, for small applications it is possible to do as you say, but for larger applications it isn't possible (registry keys, resources, ...).
It is the same under GNU/Linux systems, if it is a simple application that depends on the standard libraries, it will run by just copying the binary (usually in /usr/bin) and execute it in a console.
To run applications from your home folder (without admin rights) you must compile and install it from the sources as ppointed by simon.


Reply With Quote
