lalamax3d lalamax3d

Tag: linux

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...

Intro to Linux for windows migrants

by lala on Aug.01, 2009, under General, Linux

ok, this is first post in Linux category, which will contain all of my Linux notes in future. i had moved to Linux almost 4 months ago. for first 3 months, I used dual boot and kept my windows installation with me. gradually, I feel less need to go to windows so I finally removed it.
i don’t have any intentions to write against windows or force reader to move from windows. leaving windows was kind of personal choice for few major reasons
a- i was tired from managing / updating my anti viruses and still infected by viruses
b- my current job(wateen), we have an IT dept, its purpose is to provide technical support. they are not good at it. they have screwed my pc so nicely and threatened me that they will keep screwing my machine in future, so i thought i should have some better option.

Purpose of this post is to sum up basic information about Linux which will be helpful to al-most anyone who wanted to:
a- move to Linux but reluctant for some reason
b- just wanted to know more about Linux

QUICK BASIC FAQ

Q: LINUX or not LINUX?
A: definitely LINUX

Q: why?
A: because there are more pros than cons

Q: OK, tell me CONS first (negative points)
A: lots of commercial applications (adobe products, few autodesk products) might not available in linux and you need time to migrate their comparable open source version.it might not be that easy, after all, you need to invest some time(like u r reading here). if you are sure about your energy / passion / clarity / self-motivation / pro-active behaviour than you don’t need to worry a lot. a simple example is i used microsoft office for documentation previously, and now i used open office(free open source application with same functionality), and it took me 1 hour to shift to this. more complicated example could be of adobe photoshop(hard to imagine that i can work without it) but practically it took me 2 days to shift to GIMP(linux version of image editing application.

Q: OK, make sense, tell me PROS

A: not sure, but here are few
stable OS like MAC(even more) fast enough like windows
processing speed is a lot better, almost all applications works pretty fast
no need of anti-virus (i know its hard to believe for windows users, but trust me :D )
n so no worries about updating anti-virus
little less involvement in piracy
no need to burn your OS service packs, keep back up of small utilities etc. everything is auto updatable(needs internet connection) and auto mantained.

just imagined that u r using winXP and at night it updated itself to vista. never gonna happen. but i started ubuntu 8. and one day, it said, should i upgrade myself to ubuntu 9 and it didn’t took too long.
also think about having 20 plus thousand apps / utilites auto mantained. just type name n install latest version

Q: OK, sounds good but i work for graphics. LINUX is more for tech / dev stuff?
A: u need a break, browse web, read articles and update your info section (let me know if you need links)

Q: OK, which LINUX, there are so many??
A: yes, few hundred, i think so, that is one of major factor, ppl are reluctant in migration.remember, that there are 3 famous big brands
UBUNTU / FEDORA / OPENSUSE.

i started with ubuntu and living happily with it, mainly because it works and community is extra ordinary strong and helpful. i tested fedora and stop thinking about it with-in a day.

Q: OK, i check UBUNTU website and read articles. which UBUNTU to choose (KUBUNTU,EDUBUNTU, UBUNTU-STUDIO, etc)
A: yes, 30 + flavours, normal UBUNTU is good (closer to windows vista or 7), kUBUNTU is flashy (like mac), xfce is simple / fast version of ubuntu (think of it as win xp)
ubuntu studio is for modern multimedia designers. open artist is even more customised version of ubuntu and focused towards art / design.

Q: what is gnome/kde>> see its confusing…>> i am really confused
A: these are `desktop managers` UBUNTU is gnome based. kUBUNTU is kde based
read these:
http://www.tuxfiles.org/linuxhelp/xwtf.html
http://xwinman.org/
don’t need to worry much. any time you can move to any other desktop manager (if you don’t like one, by updating)

Q: what is metacity / awn / compiz>> see its confusing again, same confusions
A: all are `window managers`. don’t need to worry much.
read these:
http://www.tuxfiles.org/linuxhelp/xwtf.html
http://xwinman.org/
any time you can move to any other window manager (if you don’t like one)

Leave a Comment : more...