lalamax3d lalamax3d

Tag: ubuntu

ubuntu useful tips collection

by lala on Aug.30, 2009, under Linux

collection of useful tips, i found at places and tested and they worked well and i doubt some point in time in space i might need those and have forgotton. so putting them all here
TEMP ROOT ACCESS IN TERMINAL

  • sudo su

TEMP ROOT ACCESS IN EXPLORER (NAUTILUS)

  • gksudo nautilus (alt +F2 and type)

PERMANENT ROOT ACCESS IN EXPLORER (NAUTILUS)

  • install  from synaptic manager
  • nautils-gksudo

MAKING A SCRIPT FOR NAUTILUS TO OPEN IN GEDIT AS ROOT

gedit ~/.gnome2/nautilus-scripts/gedit-root

  • Copy the following lines into the file and save it and close it.

#created by Arnav Ghosh (United States)
foo=`gksudo -u root -k -m “enter your password for gedit root access” /bin/echo “Do you have root access?”`
sudo gedit $NAUTILUS_SCRIPT_SELECTED_URIS

  • Then make it executable with

chmod +x ~/.gnome2/nautilus-scripts/gedit-root
thats it you are all set. Now right click on any file in nautilus and under “scripts” u will find “gedit-root”
click and enjoy!

UBUNTU GPG keys errors ( update manager not working right, having issues in downloading udpates )

apt-get update -o Acquire::http::No-Cache=True

Setting permissions recursively

sudo chown -R username:username foo/
chmod 755 -R foo/

Reset Xorg back to Failsafe Defaults

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.original
sudo dpkg-reconfigure -phigh xserver-xorg

adding environment variables mehtod 1 fails on restart

printenv >> prints all
printenv PATH >> print path variable value
echo $PATH >. does same
PATH = bla/bla >> will assign a value. scope dependency

to add path permanently different ways, pc / user / session
user is /.profile file>> it will overright pc values (if defined)
quick is pc direct values sample below
sudo gedit /etc/gdm/gdm.conf >> open file in gedit
search “DefaultPath” , append your value at end with :
save, restart gdm

adding environment variables mehtod 2

sudo gedit /etc/environnment
add >> PATH=#PATH;/directory

adding pythonpath to permanent pyhtonpath

sudo gedit ./bashrc
export PYTHONPATH=/home/lala/maya/scripts/mapy2.5.6

running multiple commands from launcher

gnome-terminal -x bash -c “cd /usr/local/Cutter; java -classpath .:/usr/local/Cutter/cutter.jar Cutter”
gnome-terminal -x bash -c “cmd1; cmd2; read -n1″

1 Comment :, more...

ubuntu manual software installation

by lala on Aug.30, 2009, under Linux

topic is complicated and might need refinement / edit after some time. but its good to write down my current knowledgebase for future use

OPTION1 ( RPM | Alien  )

fedora has rpm installers and GUI is yum (synaptic in ubuntu). often rpm files are needed to installed in ubuntu (maya). process is simple can be done via 2 ways

  1. install alien package, it converts  rpm files to debian files while checking / updating dependencies
  2. install rpm package, it lets you directly installs rpm files. only negative is it won’t appear in add / remove place

installing applications
rpm -ivh –nodeps packagename
query installed apps
rpm -qa | more
removeing apps
rpm -e –nodeps packagename
>> query results x-x-x >> name-version-build>> while removing needs only name

OPTION2 ( APT | dpkg )

ubuntu has debian installers and system that works for auto updating / maintenance is APT, management of debian installers is done by dpkg from terminal and synaptic from GUI

Typing apt-get help will display:
Code:

Usage: apt-get [options] command
apt-get [options] install|remove pkg1 [pkg2 ...]
apt-get [options] source pkg1 [pkg2 ...]

Commands:
update – Retrieve new lists of packages = Reload
upgrade – Perform an upgrade = Default Upgrade
install – Install new packages (pkg is libc6 not libc6.deb)
remove – Remove packages
source – Download source archives
build-dep – Configure build-dependencies for source packages
dist-upgrade – Distribution upgrade, see apt-get(8) = Smart Upgrade
dselect-upgrade – Follow dselect selections
clean – Erase downloaded archive files
autoclean – Erase old downloaded archive files
check – Verify that there are no broken dependencies
————————————————————–
sudo apt-get install package.name
sudo apt-get update
sudo apt-get install -d package.name to just download the package.name
sudo apt-get remove package.name
sudo apt-get upgrade for non system upgrades
sudo apt-get dist-upgrade for system and normal upgrades
————————————————————–
Do not forget

apt-get -s install (to just simulate what would happen to your system)
apt-get -f install (do not specify a package. My package system is confused, Fix it.)

apt-cache search
apt-cache show

Update your local apt cache
sudo apt-get update

Install an Application
sudo apt-get install synaptic

Reinstall an application
sudo apt-get install –reinstall synaptic

Remove an application without configuration files
sudo apt-get remove synaptic

Remove an Application and all configuration files:
sudo apt-get –purge remove synaptic

To remove a installed package, for example Synaptic, and all dependencies, execute the command from konsole
sudo apt-get autoremove synaptic

To resolve all unmet dependences, execute the command from konsole
sudo apt-get -f install

Upgrade all your programs and libraries
sudo apt-get upgrade

Upgrade your distribution
sudo apt-get dist-upgrade

To clean out .deb archives from packages which are no longer installed on the system
sudo apt-get autoclean

Search for an Application
apt-cache search packagename

Show information about package
apt-cache show packagename

Show information about packages
apt-cache showpkg pkgs

Leave a Comment :, more...

setting XAMPP on ubuntu

by lala on Aug.19, 2009, under CMS, Linux

while shifting myself from windows to linux (ubuntu) i found this topic a bit confusing (time taking), lots of old websites still mentioned installing lots of packages to get it done but below are my notes for myself future reference.

installing xamp

  • http://sourceforge.net/project/showfiles.php?group_id=61776&package_id=60248
  • Go to a Linux shell and login as root:
  • $su -
  • Extract the downloaded archive file to /opt
  • #tar xvfz xampp-linux-1.5.5a.tar.gz -C /opt
  • XAMPP is now installed below the /opt/lampp directory.

setting it up (www folder) >> because defult location won’t allow to place files without root

  • open /opt/lampp/etc/htppd.conf
  • update line below as per your requirement
  • DocumentRoot “/home/lala/www”
  • create “www” folder if it won’t exists there… (offcourse)
  • save and quit

setting default xampp / phpmyadmin so can be access easily, via (http://localhsot)

  • move contents from “/opt/lampp/htdocs” to above folder you just created “www”

TIP: for this you might need to open nautilus as root and you can do this by typing “gksuo nautilus”

hopefully it will work ;)

Leave a Comment :, more...