Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

more linux updates, thoughts (includes fedora)

since last month, i had been using Fedora. i find this 95 % identical to ubuntu. first i'll explain similarities, then differences.

why i installed Fedora at first place, few commercial applications (maya / mocha / pftrack), there installers come by default in rpm format ( Fedora / red hat installer formats) not as deb files ( ubuntu intallers ). i know, i can convert rpms to debs via some utils (alien), which i had been doing previously for maya. but now i thought as more companies are using Fedora in big studios as far as i konw, so i thought no harm in checking this.
still ( personal opinion) all software developers (linux) should learn from nuke / houdini, these installers worked everywhere... love this..

linux windows dual boot notes

previously( win xp and ubuntu 8 etc) it was easy and as follow
  1. setup xp first, using first partition
  2. setup ubuntu, using second partition or unpartitioned space, it automatically overrides windows boot manager and grub takes precedence and shows all options at start.


recently ( windows 7 and ubuntu/kubuntu karmic versions) little tough because whatever u do, windows 7 tries and eat boot load manager successfully and won't let you run linux easily. also there were enough confusions online e.g:
a- youtube search "how to setup windows 7 and ubuntu) few used wubi ( bad: virtualization )
b- google search "how to setup windows 7 and ubuntu ) few ok, but didn't get exact solution.
here is what i did and it really worked for me after few tries.



  • run ubuntu / kubuntu live cd/usb and run gparted
  • create 10 gb swap, 80 gb ext4 for ubuntu/kubuntu installation let remaining 80 gb for windows, untouched spaced. ( don't install, simply restart )
  • boot with windows 7 and setup in remaining space.
  • boot with ubuntu /kubuntu cd/usb again. this time, install in ext4 parition, i made earlier and this time grub installed after windows and it noticed partitions somehow and managed everything nicely, as i was expecting.

cheers

ubuntu tips collection


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"


killing a process (by name from shell)

sudo pkill -9 name ( best tip for me )

e.g: sudo pkill -9 maya

changing display manager from ubuntu to kubuntu etc

sudo dpkg-reconfigure gdm


ubuntu software installation methods ( manual )

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

maya on linux (ubuntu x64)






i have seen this topic on few different blogs already. each has its pros /cons as always, here is my attempt
these notes will
  • install license / docs
  • install maya, update sp1, sp1a
  • install Cutter ( Best MEL IDE )
BOUNS FEATURES includes
  • maya mouse icon issue fix
  • maya compiz conflict fix
  • maya file dialog issue fix (default is useless)
  • maya color scheme update (dark)
install MAYA
Install RPM Package Manager (maya installer came in rpm files, used for fedora / redhat installers). we can use alien to convert rpm's to deb's but heavy/time taking(not interested)
sudo apt-get install rpm
sudo mkdir -p /var/lib/rpm
Install csh-shell (use synaptic, if possible)
sudo apt-get install csh
Create Maya-Temp directory
sudo mkdir /usr/tmp
sudo chmod 777 /usr/tmp2 Install Maya-RPMs
Install docs / licensing (assuming maya installer files in /desktop/maya)
cd /Desktop/maya
sudo rpm -ivh --nodeps AWCommon-11.5-19.i686.rpm Maya2009_0_64-docs_en_US-2009.0-63.x86_64.rpm
Get MAC Address
type command below and note down your mac address (12 digit number)
/sbin/ifconfig
Update License
sudo gedit aw.dat
replace "host_id" with "your mac address", save n exit
incase you don't know what to do then type
sudo wine awkeygen.exe aw.dat
sudo gedit aw.dat(again to check updated file)
keep this modified file ready, so when maya asks you can give this file
Install Maya / then update sp1 and sp1a
cd /Desktop/maya
sudo rpm -ivh --nodeps Maya2009_0_64-2009.0-101.x86_64.rpm
sudo rpm -ivh --nodeps autodesk_maya_2009sp1_linux64.rpm
sudo rpm -ivh --nodeps autodesk_maya_2009sp1a_linux64.rpm
Running Maya properly(maya icon is in graphics, not properly visible)
graphics to make shortcut at proper place for apps manually installed
sudo gedit /usr/share/applications/
Autodesk-Maya2008-x64.desktop
-- it will open file in terminal. type code below as per liking
[Desktop Entry]
Name=Autodesk Maya 2009 (64-bit)
Type=Application
Comment=Run Autodesk Maya 2009 (64-bit)
Categories=Application;Graphics
Icon=/usr/autodesk/maya/desktop/Maya.png
Terminal=True
Exec=csh /usr/autodesk/maya2009-x64/bin/maya
Exec=/usr/autodesk/maya/bin/maya
Encoding=UTF-8
INATALLING CUTTER (MEL IDE)
1- download cutter / copy jar file in /opt/Cutter/
2- creating desktop icon
sudo gedit /usr/share/applications/Cutter.desktop
copy paste following lines
[Desktop Entry]
Encoding=UTF-8
Name=Cutter
Comment=Cutter IDE
Exec=gnome-terminal -x bash -c "cd /opt/cutter; java -classpath .:/opt/cutter/cutter.jar Cutter"
Icon=/opt/cutter/cutter.png
Terminal=true
Type=Application
Categories=GNOME;Development;IDE;Debugger;GUIDesigner;
StartupNotify=True
## fixing double click speed issue
create ".Xresouces" on your home folder and add line
*multiClickTime:400
save, logout and login
xtra bonus
maya mouse icon issue fix
MAYA_MMSET_DEFAULT_XCURSOR=1
in the /home/lala/maya/2009-x64/Maya.env file
maya compiz conflict fix

sudo gedit /etc/X11/xorg.conf
in the “Extensions” section MAKE SURE to have:

Section "Extensions"
Option "Composite" "false"
EndSection
maya file dialog issue fix (default is useless)

download file: http://www.kreanimate.co.uk/Tools/KE_MayaFileBrowser1_4.zip
Extract all .mel and .sh files from this zip file to your scripts folder ($HOME/maya/(maya version)/scripts/).
Create the file $HOME/maya/(maya version)/scripts/userSetup.mel if it doesn't already exist, and then using a text editor, paste the following two lines into it and save it:
KE_ScriptEditor();
KE_FileBrowser();
in my case, it worked.
thread that helped
http://www.kreanimate.co.uk/site/index.php/Tools/MEL-scripts/Improving-the-Maya-Linux-File-Browser.html
maya color scheme update (dark)
download file: http://www.kreanimate.co.uk/Tutorials/MayaScheme
Create a folder called "app-defaults" in your home area and copy above file, restart maya
maya missing fonts (texture names missing from below of texture nodes)Download and install the following rpm or .deb files (names vary slightly so make a search for something similar:1. xorg-x11-fonts-ISO8859-1-75dpi
2. xorg-x11-fonts-75dpi
3. Xinet.d
4. tcsh
5. libXp (for both .i386 .x86_64)
6. libXp-devel (for both .i386 .x86_64
7. mesa-libGLw mesa-libGLw-devel )
8. gamin-devel (for libfam.so)
9. Autofs

update:: after few months
mapy works on linux x64 with scite
previously i have been using Cutter, and its really good for MEL. in my case, it didn't work well for python and maya.
i had heard previously a lot about mapy and tried it few times, but it never worked in linux. but this time it worked. here are precise steps to make sure that it worked
1- download mapy installation from ( google groups )
file: mapy.301.Linux_x64.tar.bz2

2- its a zip file, unload all of its contents to a folder "rodmena.com" and place this folder in "/usr/local"
3- make sure you own / read-write (rights) on this folder
4- offcourse, i m assuming u have install scite already from yum/synaptic (whatever version)
5- update scite files (which came with mapy) to your scite installation e.g (mapy scite files will be at: /usr/local/rodmena.com/scite). also it is critical for 2 files (mel / python)
6- after copying those files, edit them in gedit or scite and update your paths at end. critical note is: they are looking for "mapy.py". remember that this is inside "src" folder of downloaded / installed place.
e.g file in scite (installed) : /usr/share/scite/mel.properties
cMel=python "/usr/local/rodmena.com/src/mapy.py" "$(FilePath)"
same goes for python in relevancy offcourse :)
if u tried and it didn't worked, let me know, i'll try to write more detailed steps. in my case it worked for sure (office / home) no paths updating in env or py
ok, to sync it with mapy, run port command in maya on start up (commandPort -n ":29555";)
for mel execution (F5) for python execution (ctrl+2) works
comments from previous blog
lala

if using kde, then default scite 1.x might not work,
get updated version 2.x from “getDeb” website. then compare three files from previous farsheed version
mel properties file
python properties file
global properties file
and off course previous changes and it will work
Francesco

I tried to install mapy but I have not been successful.
I installed scite then I overwrite the files with those supplied with mapy,but the mapy version does not work.
Using Ubuntu and overwriting files Ottens two versions of a Scite . one it works with python and the other the mapy version does not work.
I noticed that in Ubuntu install scite is written in lower case whereas in the mapy is written SciTE and not find the various languages.
Could you kindly give a more detailed guide to installing on ubuntu especially in Section 5 and 6 of your guide.
Keep in mind the difference between the versions of SciTE SciTE and ubuntu.
Also you can automatically launch commandPort-n “: 29555th? ;at Maya startup ?
Thanks Francesco
--------------------------------------------------------------------------------------
udpate:: again after few months
i know pymel and eclipse and eclipse plugin from creative crash worked. will write notes soon...





Ubuntu Config on Dell 690


these are my ubuntu installation / hardware configuration / basic customization notes
basically, what i had noticd is ubuntu detects / configures 99% of hardware automatically but sometimes it didn't worked ( vga in 64bit auto update drivers never worked for me)
i have dell 690 at office and custom machine at home. at both places i am using ubuntu 9 (64bit). one major different in both machines is VGA (office has quadro 4600 where as home has radeon 4850) so i'll explain my installation / drivers steps for both nvidia / ati drivers. also dell (office pc) has sound card (creative xfi) which didn't worked with default ubuntu, so i'll explain how to setup this as well.
lets start
####################################
######### INSTALL MACHINE ########
####################################

ubuntu 9 - jackalop - 64bit
insert disk n install
remember basic disc formatting
i used ext3, it worked for sure and set swap to 20 GB after this.
setup proxy via system>administration>network proxy
it didn't worked with terminal so remember not to relie on terminal pkg updates
sudo apt-get update >> didn't worked, 407 proxy error
####################################
######### INSTALL AUDIO ############
####################################

1- download creative xFi driver from (only if sound is not working, 99 % it worked by default)
http://ccftp.creative.com/manualdn/Drivers/AVP/10792/0x0343D29A/XFiDrv_Linux_Public_US_1.00.tar.gz
2- extract is somewhere
3- install dependencies (didn't worked for me)
sudo apt-get install build-essential linux-headers-`uname -r`
4- making / installing driver
make
sudo make install
it worked for me :D
thread that helped
http://ubuntuforums.org/showthread.php?t=870001
####################################
######### INSTALL VIDEO ############
####################################

nvidia quadro 4600

part1: making sure no nvidia

sudo apt-get --purge remove nvidia-glx nvidia-glx-legacy nvidia-glx-new nvidia-settings
sudo apt-get --purge remove xserver-xorg-video-nv
Note: doing this means that the next time you restart X, you will have a 800x600, or an other low screen resolution, so do not be alarmed.
Another optional step, is to disable the nv and nvidia_new drivers from loading too, for those who have further problems.
gksudo gedit /etc/default/linux-restricted-modules-common
And on the line that says DISABLED_MODULES="" change it to
DISABLED_MODULES="nv nvidia_new"

part2: installing latest driver

1- download driver from nvidia website "NVIDIA-Linux-x86_64-185.18.31-pkg2.run"
2- ctrl + alt +1 >> full page terminal
3- sudo /etc/init.d/gdm stop >> stops the GDM
4- run installer, don't build kernal if fails(mine proxy error), don't run xconfig n let change xorg
sudo sh NVIDIA-Linux-x86_64-1.0-9746-pkg2.run
5- reboot machine, open terminal
6- backup /etc/X11/xorg.conf
7- sudo nvidia-settings >> so u can configure display/desktop n apply changes (xorg.conf)
it worked for me :D
thread that helped
http://ubuntuforums.org/showthread.php?t=1125400
ati radeon 4850
below page, simply worked
http://wiki.cchtml.com/index.php/Ubuntu_Jaunty_Installation_Guide
####################################
######### INSTALL WACOM ############
####################################
install wacom-tools >> via synaptic
download linuxwacomproject
extract it somewhere
./configure >> to run / install
wacomcpl >> opens GUI, if didn't show device that means some hal error
Helping wacomcpl
Unfortunately HAL assigns names to wacom devices in a way that the recent wacomcpl from jaunty cant find them, to help wacomcpl to find them:
Open a terminal and type:
sudo gedit /etc/init.d/wacomtohal
and paste this code in:
#! /bin/sh
## find any wacom devices
for udi in `hal-find-by-property --key input.x11_driver --string wacom`
do
type=`hal-get-property --udi $udi --key input.x11_options.Type`
## rewrite the names that the Xserver will use
hal-set-property --udi $udi --key info.product --string $type
done
then run :
sudo chmod +x /etc/init.d/wacomtohal
sudo update-rc.d wacomtohal defaults 27
udpate:: after a year, wacom stops working at once

if wacom thing doesn’t work somehow, and wacomcpl not showing device in list, even its working, follow these steps
install wacom-tools and xorg-server-wacom(synaptic > search>wacom, both results)
install 0.8.2.2 drivers via ./config from linuxwacom project
save below code as 10-wacom.fdi and save it to /usr/share/hal/fdi/policy/20thirdparty
n reboot
terminal check>> Now “xinput –list” and “xsetwacom list” produce same result, now wacomcpl should work
## all credit for following file goes to favux who told me about this on ubuntu forum, i doubt, i won’t be able to find it again in future when needed, so i m putting it here :D
—————–

wacom
stylus
stylus
hal-setup-wacom
eraser
cursor
pad
eraser
cursor
pad
—————–
## If you lose your calibration after reboot:
In terminal:
sudo gedit ~/.xinitrc
Find the line that says:
. /etc/X11/xinit/xinitrc
and change it to
#. /etc/X11/xinit/xinitrc
Save and exit.
Go to System>Preferences>Startup Applications and create a new entry named whatever you want.
The command should be:
sh /home/yourusername/.xinitrc
Your wacomcpl settings will now restore on reboot
thread that helped
http://www.thinkwiki.org/wiki/Installing_Ubuntu_9.04_%28Jaunty_Jackalope%29_on_an_X61_Tablet
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BONUS: few basic applications setup
ok, here are notes for quick installation of few pretty basic apps, which i need everytime i installed ubuntu.
####################################
######### INSTALL firefox 3.5 ######
####################################

Add the repository
$ sudo sh -c "echo 'deb http://ppa.launchpad.net/fta/ppa/ubuntu jaunty main' >> /etc/apt/sources.list"
Add the appropriate key
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 632D16BB0C713DA6
Expected Output
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 632D16BB0C713DA6
gpg: requesting key 0C713DA6 from hkp server keyserver.ubuntu.com

gpg: key 0C713DA6: public key "Launchpad PPA for Fabien Tassin" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
Update your repository list
$ sudo apt-get update
Make a backup of your current Firefox configuration folder
$ cp -r ~/.mozilla/firefox/ ~/firefox_backup
Install Firefox 3.5
$ sudo apt-get install firefox-3.5
Navigate to “Applications >> Internet >> Shiretoko Webbrowser
####################################
######### INSTALL FlashPlayer #########
####################################

install cooliris in firefox
goto cooliris page / installation guideline. there they have written adobe 64bit beta flash plugin and installation guide. it simply works
####################################
######### INSTALL jDownloader ######
####################################

1- extract downloaded "JDownloader" folder to /opt/JDownloader/JDownloader.jar
2- set permissions to my user via
sudo chown -R lala:lala /opt/JDownloader
sudo chmod -R +r /opt/JDownloader
3- making it runnable from terminal
sudo touch /usr/local/bin/JDownloader
sudo nano /usr/local/bin/JDownloader
this opens file in terminal, paste following
java -jar /opt/JDownloader/JDownloader.jar
close file by ctrl+x, then y, then enter
4- creating desktop icon
sudo gedit /usr/share/applications/JDownloader.desktop
copy paste following lines
[Desktop Entry]
Encoding=UTF-8
Name=JDownloader
Comment=Download Manager
Exec=java -jar /opt/JDownloader/JDownloader.jar
Icon=/opt/JDownloader/JDownloader.png
Terminal=false
Type=Application
Categories=GNOME;Network;
StartupNotify=True
thread that helped
http://pagesofinterest.net/blog/2009/05/installing-jdownloader-in-ubuntu/
## fixing double click speed issue
create ".Xresouces" on your home folder and add line
*multiClickTime:400
save, logout and login
thread that helped
http://forums.sun.com/thread.jspa?threadID=585358
####################################
######### INSTALL pySDM ############

####################################

this let my auto mount windows / other partitions the way i want (pretty simple)
install from synaptic
run from terminal via
sudo pysdm
####################################
######### INSTALL Samba ############
####################################

install from synaptic
upon first time sharing, it gives warning and tell solution, do it, it works






XAMPP on linux ( ubuntu )




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 ;)