Wednesday, December 12, 2012

Recovering grub after installing windows 7 on Ubuntu

To recover grub:
  1. open the live version
  2. open the terminal and run sudo fdisk -l to see where Linux is installed
  3. run sudo mount /dev/sdaX /mnt where x is the number you have found Linux word in
  4. run sudo grub-install --root-directory=/mnt /dev/sda to install grub
  5. run sudo update-grub to update grub and if this command didn't work run it after rebooting
  6. reboot

http://askubuntu.com/questions/83771/recovering-grub-after-installing-windows-7

Saturday, December 8, 2012

How to add https to localhost


Use a Self-Signed SSL Certificate with Apache
These instructions will help you generate a generic self-signed certificate, which may be used to provide SSL service for all name-based hosts on your VPS. Please note that self-signed certificates will generate warnings in a visitor's browser; proceed to "Installing a Commercial SSL Certificate" if you need to set up SSL on a domain using a certificate signed by a commercial SSL provider.
Generate a Self-Signed Certificate
At the shell prompt, issue the following commands to enable SSL for Apache and generate a certificate:
a2enmod ssl mkdir /etc/apache2/ssl openssl req -new -x509 -days 365 -nodes -out /etc/apache2/ssl/apache.pem -keyout /etc/apache2/ssl/apache.key
You will be asked for several configuration values. Enter values appropriate for your organization and server, as shown here. This example will create a certificate valid for 365 days; you may wish to increase this value. We've specified the FQDN (fully qualified domain name) of the VPS for the "Common Name" entry, as this certificate will be used for generic SSL service.
Generating a 1024 bit RSA private key ...................................++++++ ..............................++++++ writing new private key to '/etc/apache2/ssl/apache.pem' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:US State or Province Name (full name) [Some-State]:New Jersey Locality Name (eg, city) []:Absecon Organization Name (eg, company) [Internet Widgits Pty Ltd]:SoftwareDev, LLC Organizational Unit Name (eg, section) []:Web Services Common Name (eg, YOUR name) []:archimedes.mydomain.com Email Address []:support@mydomain.com
Configure Apache to use the Self-Signed Certificate
Since SSL name-based virtual hosts are still not supported in /etc/apache2/ports.conf, we'll need to add an entry for a specific IP address on your VPS as follows. You may use a single IP to provide self-signed SSL service for multiple vhosts, and the same IP may also be used for multiple non-SSL vhosts (HTTPS uses port 443, while HTTP uses port 80).
File excerpt:/etc/apache2/ports.conf
NameVirtualHost 12.34.56.78:443
Replace "12.34.56.78" with your Linode's IP address. Next, edit the virtual host configuration files for sites which you would like to enable SSL on. For each virtual host, you must add the following stanza (change the values as appropriate for each site). Note that this example essentially reproduces the configuration for a non-SSL site, with the addition of three lines for SSL.
File excerpt:Apache virtual hosting file

<VirtualHost 12.34.56.78:443> SSLEngine On SSLCertificateFile /etc/apache2/ssl/apache.pem SSLCertificateKeyFile /etc/apache2/ssl/apache.key ServerAdmin info@mydomain.com ServerName www.mydomain.com DocumentRoot /var/www/mydomain.com/public_html/ ErrorLog /var/www/mydomain.com/logs/error.log CustomLog /var/www/mydomain.com/logs/access.log combined </VirtualHost>


Restart Apache:
service apache2 restart
You should now be able to visit your site with SSL enabled (after accepting your browser's warnings about the certificate).

 
http://library.linode.com/web-servers/apache/ssl-guides

https://www.digitalocean.com/community/articles/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-12-04

http://askubuntu.com/questions/49196/how-do-i-create-a-self-signed-ssl-certificate

http://ubuntuforums.org/showthread.php?t=953607



Virtual hosts overlap on 443, first has precedence

sudo gedit /etc/apache2/ports.conf

Change it to
 
<IfModule mod_ssl.c>
NameVirtualHost *:443
Listen 443
</IfModule>


http://blog.breidert.net/virtual-hosts-overlap-443-first-has-precendence/




Sunday, November 11, 2012

apt-get update fails to fetch files,"Temporary failure resolving …" error

overview

There are two parts to your question:
  • fixing temporary resolve messages
  • fixing the package management issues

Temporary resolve

It is likely that this issue is either:
  • temporary due to your Internet Service Provider not correctly forwarding internet naming (DNS) to either its or external DNS servers, or
  • due to a change in your network has similarly blocked this naming - for example, new router/modem, reconfiguring a switch with a new configuration.
Lets look at the possible DNS resolving issues.
First, temporarily add a known DNS server to your system.
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
Then run sudo apt-get update.
If this fixes your temporary resolving messages then either wait for 24 hours to see if your ISP fixes the issue for you (or just contact your ISP) - or you can permanently add a DNS server to your system:
echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null
8.8.8.8 is Google's own DNS server.
Another example DNS server you could use is OpenDNS - for example:
echo "nameserver 208.67.222.222" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null

package-management issues

In addition to the temporary resolve issues - you have a few package management issues that need to be corrected - I'm assuming you have tried recently to upgrade from one Ubuntu version to the next recommended version - in your case from Natty (11.04) to Oneiric (11.10)
Open a terminal and type
sudo nano /etc/apt/sources.list
Look for lines that have your a different distribution name in the list than you were expecting - in your case - you have upgraded to oneiric but you have another release name natty
For example, look for lines that look like deb http:/archive.canonical.com/ natty backports
Add a # to the beginning of the line to comment it out - for example
#deb http:/archive.canonical.com/ natty backports
Save and re-run:
sudo apt-get update && sudo apt-get upgrade
You should not have any more release naming errors.
 At the time of writing this, possible common release names include lucid, maverick, natty,oneiric, precise and quantal

Saturday, November 3, 2012

Speed up Firefox by moving cache into RAM in Ubuntu

By default Firefox puts its cache in your home partition.You can speed up Firefox and reduce disk writes by moving this cache into RAM if you have 1GB RAM or more.

1.Edit /etc/fstab,open terminal from Applications->Accessories menu and type:
sudo gedit /etc/fstab
Add following into this file and close it.
tmpfs /tmp tmpfs noexec,defaults,noatime 0 0
tmpfs /var/tmp tmpfs noexec,defaults,noatime 0 0
2.Edit /etc/sysctl.conf:
sudo gedit /etc/sysctl.conf
add this line and save it:
vm.swappiness=1
3. Type about:config in firefox address bar and click I'll be careful,I promise!.Right click on blank area and create a new string value called

browser.cache.disk.parent_directory,set its value to /tmp

Now,reboot your system and experience the performance.

http://ubuntuguide.net/speed-up-firefox-by-moving-cache-into-ram-in-ubuntu

Linux memory cache

Note: Linux is NOT "eating" your RAM! Please take a look at Geirha's excellent answer below to understand why...
After the above note, if you still feel "cleaning" the cache could help, you can certainly try: it's a one-liner from the terminal:
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches
There's no easy way to disable the cache, but you can achieve the same effect by cleaning it as often as every minute, if you want to:
  • Make it a cron-job
  • Press Alt-F2, type gksudo gedit /etc/crontab, and add this line near the bottom:
    */15 * * * * root sync && echo 3 > /proc/sys/vm/drop_caches
  • This cleans every 15 minutes. You can set to 1 or 5 minutes if you really want to by changing the first parameter to * or */5 instead of */15

One liner to know REAL free RAM, excepting cache

Geirha's answer explains the details, but in short, you get the number of free megabytes with:
free -m | sed -n -e '3p' | grep -Po "\d+$"
which on my 2GB command-line server returns an extremely health 1835.


http://askubuntu.com/questions/155768/how-do-i-clean-or-disable-the-memory-cache

http://www.linuxatemyram.com/

Monday, October 29, 2012

DNS stuff

Flush DNS Cache in Ubuntu 12.04 (Precise Pangolin)

To flush your system DNS Cache Resolver in Ubuntu 12.04, press Ctrl – Alt – T on your keyboard to open Terminal. When terminal opens, run the commands below to clear it.

sudo /etc/init.d/dns-clean

http://www.liberiangeek.net/2012/05/windows-7-vs-ubuntu-12-04-how-to-flush-your-system-dns-cache/


Add custom DNS

To avoid having your settings get revoked after reboots, or after periods of inactivity, you may need to make the following changes via the command line:
$ sudo cp /etc/resolv.conf /etc/resolv.conf.auto
NOTE: The dhclient.conf location may vary depending on you linux distribution.

To locate the correct file you can use:
$ sudo find /etc -name dhclient.conf

$ gksudo gedit /etc/dhcp3/dhclient.conf
# add the following line to the document before the 'return subnet-mask' command
supersede domain-name-servers 208.67.222.222,208.67.220.220;
# save and exit
$ sudo ifdown eth0 && sudo ifup eth0
You may be required to change eth0 to your own network device's name if it uses a non-standard name.


https://store.opendns.com/setup/device/ubuntu/


Check domain with custom DNS

DNS records are likely cached by your provider's DNS servers so if you want to check if the DNS changes you made were successful you can interrogate a DNS server from your domain hosting service with dig:

dig -t a ns1.myhostingcompany.com @domain_registrar_dns_server

It you want Ubuntu to start caching dns I recommend installing pdnsd together with resolvconf. nscd is buggy and not advisable.

Example: dig -t a @8.8.8.8 example.com

http://askubuntu.com/questions/2219/how-do-i-clear-the-dns-cache


Check your PC DNS in command-line

nm-tool

http://askubuntu.com/questions/152593/command-line-to-list-dns-servers


Check DNS related stuff online

http://www.iptools.com/

Monday, September 10, 2012

Linux alternative/equivalent for AcDsee

digiKam

digiKam is an advanced digital photo management application for Linux, Windows, and Mac-OSX.  The people who inspired digiKam's design are the photographers like you who want to view, manage, edit, enhance, organize, tag, and share photographs under Linux systems.

http://www.digikam.org

darktable

darktable is an open source photography workflow application and RAW developer. A virtual lighttable and darkroom for photographers. It manages your digital negatives in a database, lets you view them through a zoomable lighttable and enables you to develop raw images and enhance them.

http://www.darktable.org

Shutter - Screenshot tool

Shutter is a feature-rich screenshot program. You can take a screenshot of a specific area, window, your whole screen, or even of a website – apply different effects to it, draw on it to highlight points, and then upload to an image hosting site, all within one window. Shutter is free, open-source, and licensed under GPL v3.


http://shutter-project.org

Monday, August 6, 2012

Read & Remove EXIF Data From the Command Line

Most digital cameras will insert metadata into images. This metadata is stored using the exchangeable image file format (EXIF) and can contain camera specifications, exposure settings, thumbnails, GPS coordinates and more. This article outlines some Linux command line tools you can use for reading, editing and removing EXIF metadata from images.
Reading and Editing EXIF Metadata with ExifTool
ExifTool is powerful a Perl program that can be used to read and edit EXIF metadata in images. To install ExifTool as /usr/bin/exiftool on Fedora, install the perl-Image-ExifTool package:
su -c 'yum install perl-Image-ExifTool'
Alternatively, you can use CPAN to install ExifTool in /usr/local/bin/exiftool.
su -c "perl -MCPAN -e'install Image::ExifTool'"
After installation, you will have the exiftool command available in /usr/bin or /usr/local/bin. To view the EXIF metadata in an image, just past the image as an argument to exiftool.
exiftool dsc_0790.jpg
Here is a snippet of the output from the above command:
ExifTool Version Number : 7.60
File Name : dsc_0790.jpg
Directory : .
File Size : 4.4 MB
File Modification Date/Time : 2008:07:16 09:45:20-07:00
File Type : JPEG
MIME Type : image/jpeg
Exif Byte Order : Big-endian (Motorola, MM)
Make : NIKON CORPORATION
Camera Model Name : NIKON D200
Orientation : Horizontal (normal)
X Resolution : 300
Y Resolution : 300
Resolution Unit : inches
Software : Bibble 4.10a
Modify Date : 2007:06:23 22:00:14
Exposure Time : 1/40
F Number : 2.0
Exposure Program : Aperture-priority AE
ISO : 100
.
.
.

ExifTool has many options for editing and removing EXIF metadata in images. To see the available options, use the --help switch or read the ExifTool documentation.
exiftool --help
Reading EXIF Metadata with Jhead
Jhead is a command line tool for displaying EXIF data embedded in JPEG images. On Fedora, use Yum to install Jhead:
su -c 'yum install jhead'
Now, use /usr/bin/jhead to read EXIF metadata:
jhead dsc_0790.jpg
Here is an example of the output produced by the jhead command:
File name : dsc_0790.jpg
File size : 4654488 bytes
File date : 2008:07:16 09:45:20
Camera make : NIKON CORPORATION
Camera model : NIKON D200
Date/Time : 2007:06:23 22:00:14
Resolution : 3880 x 2608
Flash used : No
Focal length : 50.0mm (35mm equivalent: 75mm)
Exposure time: 0.025 s (1/40)
Aperture : f/2.0
ISO equiv. : 100
Exposure bias: 1.00
Whitebalance : Auto
Exposure : aperture priority (semi-auto)
GPS Latitude : ? ?
GPS Longitude: ? ?
======= IPTC data: =======
(C)Flag : 0
DateCreated : 20070623
Time Created : 220014
Record vers. : 4

Removing EXIF Metadata with ImageMagick
If you need to strip the EXIF metadata from images, use ImageMagick's mogrify command. To install ImageMagick on Fedora, use Yum:
su -c 'yum install ImageMagick'
After ImageMagick is installed, you will have /usr/bin/mogrify available. The mogrify command can be used to strip Exif data from images.
mogrify -strip imagename.jpg
If you need to process a large number of files, use find and xargs:
find ./folder_of_images -name '*.jpg' | xargs mogrify -strip


http://hacktux.com/read/remove/exif

Monday, July 16, 2012

Important Tweaks/Things to do After install of Ubuntu 12.04 Precise Pangolin

http://www.noobslab.com/2012/04/important-things-to-do-after-install_26.html

http://www.webupd8.org/2012/04/things-to-tweak-after-installing-ubuntu.html

http://www.techdrivein.com/2012/06/25-things-i-did-after-installing-ubuntu.html

http://www.omgubuntu.co.uk/2012/04/10-things-to-do-after-installing-ubuntu-12-04

http://howtoubuntu.org/things-to-do-after-installing-ubuntu-12-04-precise-pangolin/


Intel GM45 driver installation

https://launchpad.net/~xorg-edgers/+archive/ppa

http://askubuntu.com/questions/85318/how-can-i-get-my-intel-integrated-graphics-to-be-recognized-in-system-info

http://askubuntu.com/questions/129227/how-do-i-install-intel-hd-graphics-driver-on-ubuntu-12-04

http://intellinuxgraphics.org/index.html


Note:

Downgrade Mesa libraries,

sudo apt-get install libgl1-mesa-dri=8.0.2-0ubuntu3 mesa-common-dev=8.0.2-0ubuntu3
 
Link


CompizConfig

Delete .Xauthority in my home


rm -rf .compiz-1
 
rm -rf ~/.config/compiz-1/compizconfig/*
 
sudo apt-get purge compizconfig-settings-manager

sudo apt-get install compizconfig-settings-manager compiz-fusion-plugins-extra
 
unity --reset
 
Link  
 
 
 
VAAPI driver for Intel G45 & HD Graphics family 
 
 
https://launchpad.net/ubuntu/+source/intel-vaapi-driver/

Thursday, July 5, 2012

How to Install New Kernel on Ubuntu

How to install Linux Kernel 3.4 in Ubuntu 12.04. WARNING This isn't worth doing unless you're having problems with the old kernel or you're adding new hardware which is unsupported in old Kernel 3.2, such as nVidia Kepler (600 series) or AMD HD 7000 series Graphics cards.

Improvements in Kernel 3.4:
Reduced Power Usage
Speed improvements for BTRFS file systems
More wireless network drivers from Ralink and Broadcom added
Support for nVidia Kepler chipsets (600 series)
Support for AMD Southern Islands GPUs (HD 7000 series)
Support for AMD Trinity Processors

Ubuntu Kernel Website: http://kernel.ubuntu.com/~kernel-ppa/mainline/
Look for the latest Kernel
Download linux-headers-3.4.x-xxx-all.deb, plus the headers and image for your system architecture.
e.g. linux-headers-3.4.x-xxx-i386.deb, and linux-image-3.4.x-xxx-generic-i386.deb for 32bit systems.

Open Terminal
cd ~/Downloads
sudo dpkg -i linux*.deb

Reboot
Check the new kernel is running with either System Monitor or "uname -r"

If you have any problems with the new kernel reboot and select "Previous Versions" on the Grub Menu (hold down Shift key if Grub doesn't show by default)

Remove auto updating old Kernel:
In Synaptic remove: linux-generic, linux-headers-generic, linux-image-generic
You can also remove any older kernels to free up some harddrive space.

http://www.youtube.com/watch?v=traegZveTKo 

http://askubuntu.com/questions/142192/can-i-install-linux-kernel-3-4-in-ubuntu-and-kubuntu-12-04

Friday, June 1, 2012

How to Back Up and Restore a MySQL Database

If you're storing anything in MySQL databases that you do not want to lose, it is very important to make regular backups of your data to protect it from loss. This tutorial will show you two easy ways to backup and restore the data in your MySQL database. You can also use this process to move your data to a new web server.
Back up From the Command Line (using mysqldump)
If you have shell or telnet access to your web server, you can backup your MySQL data by using the mysqldump command. This command connects to the MySQL server and creates an SQL dump file. The dump file contains the SQL statements necessary to re-create the database. Here is the proper syntax:
$ mysqldump --opt -u [uname] -p[pass] [dbname] > [backupfile.sql]
  • [uname] Your database username
  • [pass] The password for your database (note there is no space between -p and the password)
  • [dbname] The name of your database
  • [backupfile.sql] The filename for your database backup
  • [--opt] The mysqldump option
For example, to backup a database named 'Tutorials' with the username 'root' and with no password to a file tut_backup.sql, you should accomplish this command:
$ mysqldump -u root -p Tutorials > tut_backup.sql

This command will backup the 'Tutorials' database into a file called tut_backup.sql which will contain all the SQL statements needed to re-create the database.
With mysqldump command you can specify certain tables of your database you want to backup. For example, to back up only php_tutorials and asp_tutorials tables from the 'Tutorials' database accomplish the command below. Each table name has to be separated by space.
$ mysqldump -u root -p Tutorials php_tutorials asp_tutorials > tut_backup.sql

Sometimes it is necessary to back up more that one database at once. In this case you can use the --database option followed by the list of databases you would like to backup. Each database name has to be separated by space.
$ mysqldump -u root -p --databases Tutorials Articles Comments > content_backup.sql

If you want to back up all the databases in the server at one time you should use the --all-databases option. It tells MySQL to dump all the databases it has in storage.
$ mysqldump -u root -p --all-databases > alldb_backup.sql

The mysqldump command has also some other useful options:
--add-drop-table: Tells MySQL to add a DROP TABLE statement before each CREATE TABLE in the dump.
--no-data: Dumps only the database structure, not the contents.
--add-locks: Adds the LOCK TABLES and UNLOCK TABLES statements you can see in the dump file.
The mysqldump command has advantages and disadvantages. The advantages of using mysqldump are that it is simple to use and it takes care of table locking issues for you. The disadvantage is that the command locks tables. If the size of your tables is very big mysqldump can lock out users for a long period of time.
Back up your MySQL Database with Compress
If your mysql database is very big, you might want to compress the output of mysqldump. Just use the mysql backup command below and pipe the output to gzip, then you will get
the output as gzip file.

$ mysqldump -u [uname] -p[pass] [dbname] | gzip -9 > [backupfile.sql.gz]

If you want to extract the .gz file, use the command below:

$ gunzip [backupfile.sql.gz]

Restoring your MySQL Database
Above we backup the Tutorials database into tut_backup.sql file. To re-create the Tutorials database you should follow two steps:
  • Create an appropriately named database on the target machine
  • Load the file using the mysql command:
$ mysql -u [uname] -p[pass] [db_to_restore] < [backupfile.sql]
Have a look how you can restore your tut_backup.sql file to the Tutorials database.
$ mysql -u root -p Tutorials < tut_backup.sql
To restore compressed backup files you can do the following:
gunzip < [backupfile.sql.gz] | mysql -u [uname] -p[pass] [dbname]
If you need to restore a database that already exists, you'll need to use mysqlimport command. The syntax for mysqlimport is as follows:

mysqlimport -u [uname] -p[pass] [dbname] [backupfile.sql]

Backing Up and Restoring using PHPMyAdmin
It is assumed that you have phpMyAdmin installed since a lot of web service providers use it. To backup your MySQL database using PHPMyAdmin just follow a couple of steps:
  • Open phpMyAdmin.
  • Select your database by clicking the database name in the list on the left of the screen.
  • Click the Export link. This should bring up a new screen that says View dump of database (or something similar).
  • In the Export area, click the Select All link to choose all of the tables in your database.
  • In the SQL options area, click the right options.
  • Click on the Save as file option and the corresponding compression option and then click the 'Go' button. A dialog box should appear prompting you to save the file locally.
Restoring your database is easy as well as backing it up. Make the following:
  • Open phpMyAdmin.
  • Create an appropriately named database and select it by clicking the database name in the list on the left of the screen. If you would like to rewrite the backup over an existing database then click on the database name, select all the check boxes next to the table names and select Drop to delete all existing tables in the database.
  • Click the SQL link. This should bring up a new screen where you can either type in SQL commands, or upload your SQL file.
  • Use the browse button to find the database file.
  • Click Go button. This will upload the backup, execute the SQL commands and re-create your database.

http://webcheatsheet.com/sql/mysql_backup_restore.php



http://www.thegeekstuff.com/2008/09/backup-and-restore-mysql-database-using-mysqldump/


http://www.supportfacility.com/blog/mysql/how-to-repair-mysql-table-from-ssh/

http://viralpatel.net/blogs/mysql-database-backup-mysql-mysqldump-backup-command/

Thursday, May 31, 2012

Wednesday, May 16, 2012

Fix Broken package on Ubuntu

http://itechlog.com/linux/2008/12/18/fix-broken-package-ubuntu/

http://www.thepowerbase.com/2012/04/how-to-fix-broken-packages-in-ubuntu-or-debian/

http://blog.bodhizazen.net/linux/apt-get-how-to-fix-very-broken-packages/

Ubuntu Sources List Generator

http://repogen.simplylinux.ch

The way to use the sources.list generator is to select your country (Americans, please note – United States is in the U section (of course)). Then you select your version, for instance Natty. Then you check the Ubuntu repositories you require, and lastly, you select third party repositories.
There are a good many repositories already available for Natty. Among them are the Medibuntu, Ubuntu Tweak and Google repositories. Of course, more will be added.
Please note that for third party repositories, the result text lists how to store the gpg key for each repository.

Friday, May 4, 2012

Ubuntu USB 3G modem issue solved

Open up a terminal from Applications -> Accessories. Type:

    sudo gedit /etc/modules

At the bottom of the file, make two new lines, like this:

    usbserial
    option

Then close the editor program and save it. Reboot the computer.



Source: http://blog.christophersmart.com/2010/05/25/ubuntu-lucid-usb-3g-modem-issue-solved/

Wednesday, March 7, 2012

Running Photoshop CS4 - CS5 with Wine on Ubuntu

You need ms fonts installed first


sudo apt-get install ttf-mscorefonts-installer



From Nautilus - View -Show Hidden

then go to /home/username/.wine/

edit user.reg

find this "UserPreferenceMask"=hex:10,00,02,80

and replace from this line and above with this

WINE REGISTRY Version 2
;; All keys relative to \\User\\S-1-5-4

[AppEvents\\Schemes\\Apps\\Explorer\\Navigating\\.Current] 1249917684
@=""

[Console] 1252956930
"CursorSize"=dword:00000019
"CursorVisible"=dword:00000001
"EditionMode"=dword:00000000
"ExitOnDie"=dword:00000001
"FaceName"="Courier\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
"FontSize"=dword:000d0008
"FontWeight"=dword:00000000
"HistoryBufferSize"=dword:00000032
"HistoryNoDup"=dword:00000000
"MenuMask"=dword:00000000
"QuickEdit"=dword:00000000
"ScreenBufferSize"=dword:00190050
"ScreenColors"=dword:0000000f
"WindowSize"=dword:00190050

[Control Panel\\Colors] 1254317519
"ActiveBorder"="212 208 200"
"ActiveTitle"="94 129 188"
"AppWorkSpace"="128 128 128"
"Background"="16 26 38"
"ButtonAlternateFace"="181 181 181"
"ButtonDkShadow"="133 135 140"
"ButtonFace"="235 233 237"
"ButtonHilight"="255 255 255"
"ButtonLight"="220 223 228"
"ButtonShadow"="167 166 170"
"ButtonText"="0 0 0"
"GradientActiveTitle"="112 177 235"
"GradientInactiveTitle"="131 183 227"
"GrayText"="167 166 170"
"Hilight"="94 129 188"
"HilightText"="255 255 255"
"HotTrackingColor"="0 0 128"
"InactiveBorder"="212 208 200"
"InactiveTitle"="111 161 217"
"InactiveTitleText"="255 255 255"
"InfoText"="0 0 0"
"InfoWindow"="255 255 225"
"Menu"="255 255 255"
"MenuBar"="235 233 237"
"MenuHilight"="94 129 188"
"MenuText"="0 0 0"
"Scrollbar"="212 208 200"
"TitleText"="255 255 255"
"Window"="255 255 255"
"WindowFrame"="0 0 0"
"WindowText"="0 0 0"

[Control Panel\\Desktop] 1254316497
"DragFullWindows"="0"
"FontSmoothing"="2"
"FontSmoothingGamma"=dword:00000578
"FontSmoothingOrientation"=dword:00000001
"FontSmoothingType"=dword:00000002
"LowPowerActive"="0"
"MenuShowDelay"="400"
"SmoothScroll"=hex:00,00,00,00
"UserPreferenceMask"=hex:10,00,02,80


Save and close.

now you have antialiasing on menu and some other boxes only!

lets fix it all!!!

You have to download Tahoma fonts from here

Unzip and copy the to font files to /home/username/.wine/drive_c/windows/Fonts

Photoshop CS4 Portable


Photoshop CS5 Portable


Unrar it where ever you want to run, it runs direct without install.

then download from here

gdiplus.dll and copy it to system32 folder as root (in terminal : sudo nautilus) and go to home/yourusername/.wine/dosdevices/c:/windows/system32

Download fix for Type tool from here

and copy it to system32 this one too!

then from Application-Wine-Configure Wine go Applications and add the exe file of photoshop, then select it go to Libraries and select gdiplus.dll, when you select it press Add and Ok.

you are ready .. execute Photoshop.exe from unziped folder and work!!

ps. Always need latest wine version!


Adobe Photoshop CS5 and 10.04:)



Ok, its easy with portable again!! always with latest wine!

Download From here CS5 portable

If you have error when execute the file , right click - properties - pemissions Tab
and click Execute - Allow Executing file as program

double click to execute now.

follow the installation instructions and install it on c:\program files\

and

you have to add in .wine\drive_c\windows\system32 this fix file for type tool like CS4 :)

This version doesnt need to accept the license agreement runs directly!

Gdiplus.dll no more needed with latest wine.

Enjoy latest Photoshop:)


Sources:
http://ubuntudoitall.blogspot.com/2009/09/running-photoshop-cs4-with-wine-finally.html

http://ubuntudoitall.blogspot.com/2009/09/wine-with-full-antialiasing.html

http://ubuntudoitall.blogspot.com/2010/05/adobe-photoshop-cs5-and-1004.html 


Perfect guide on wine
http://appdb.winehq.org/objectManager.php?sClass=version&iId=20158&iTestingId=71572



 

Saturday, March 3, 2012

Boot to text mode in Ubuntu


Installing the GUI will probably cause it to start automatically, but it's very easy to boot to text mode in Ubuntu. Just open /etc/default/grub as root and add text to the
GRUB_CMDLINE_LINUX_DEFAULT=
line. Then run:
sudo update-grub
Your system will then always boot to text mode.
If you want to boot to the GUI, just press e in the boot menu and remove text from the kernel line.
If you want to start the GUI after boot, just run:
sudo /etc/init.d/lightdm start

Source: http://askubuntu.com/questions/74645/possible-to-install-ubuntu-desktop-and-then-boot-to-no-gui

Friday, February 24, 2012

Ubuntu Networking Configuration Using Command Line

The basics for any network based on *nix hosts is the Transport Control Protocol/ Internet Protocol (TCP/IP) combination of three protocols. This combination consists of the Internet Protocol (IP),Transport Control Protocol (TCP), and Universal Datagram Protocol (UDP).
By Default most of the users configure their network card during the installation of Ubuntu. You can however, use the ifconfig command at the shell prompt or Ubuntu’s graphical network configuration tools, such as network-admin, to edit your system’s network device information or to add or remove network devices on your system
Configure Network Interface Using Command-Line
You can configure a network interface from the command line using the networking utilities. You configure your network client hosts with the command line by using commands to change your current settings or by editing a number of system files.
Configuring DHCP address for your network card
If you want to configure DHCP address you need to edit the /etc/network/interfaces and you need to enter the following lines replace eth0 with your network interface card
sudo vi /etc/network/interfaces
Note :- Use vi editor if you don’t have GUI installed
If you have GUI use the following command
gksudo gedit /etc/network/interfaces
# The primary network interface - use DHCP to find our address
auto eth0
iface eth0 inet dhcp



Source : http://www.ubuntugeek.com/ubuntu-networking-configuration-using-command-line.html

Saturday, February 18, 2012

Mounting Linux Partitions in Ubuntu

  • sudo cp /etc/fstab /etc/fstab_backup 
  • sudo nano /etc/fstab 
  • UUID=d1d0cf46-958f-4a12-a604-0ac66040648b /storage ext4 defaults 0 0
  • sudo mount -a
  • sudo chown -R jessica:jessica /storage
  • sudo chmod -R 755 /storage 

Source: http://www.psychocats.net/ubuntu/mountlinux