Enabling remote desktop mode is extremely easy on Ubuntu since
Dapper. You can allow other users to access your desktop using the VNC
Viewer utility that is bundled with Ubuntu, or offered as a free
download for Windows.
Note that enabling remote control of your desktop is never a safe
thing to do unless you have a firewall installed and configured
correctly, and even then is still a potential security problem. Now that
you’ve been warned of the risks, let’s move on.
Navigate to the System \ Preferences \ Remote Desktop on the Gnome top menu.
You’ll see this window:
The first two checkboxes need to be checked in order for remote desktop to be enabled.
The Security section is important: If you select the “Ask you for
confirmation” code, then you will need to be at the computer in order to
allow the other person to access your desktop. If you are trying to
remotely access one of your own computers, you will want to uncheck this
box.
The second checkbox should always be checked, and you should enter a
secure password. You will be prompted for this password when you try to
log on.
Sunday, November 25, 2012
Installing PHP5 and Apache on Ubuntu
If you are doing any kind of PHP development, you’ll almost always be
using Apache along with it. Here’s the quick and easy way to get PHP up
and running on your Ubuntu box.
First, you’ll want to add the extra repositories to Ubuntu’s sources.list file.
From a command shell, you will run the following commands:
First, you’ll want to add the extra repositories to Ubuntu’s sources.list file.
From a command shell, you will run the following commands:
sudo apt-get install apache2Note that if apache is already installed you can omit the first line. Your web files will now be found in /var/www/
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart
How to install Apache on Linux
The installation, care, and feeding of an Apache Web server is not
terribly difficult, but can seem so if you haven't ventured into those
particular waters before. This quick-start guide will help you get your
feet wet with Apache on a Linux server. You'll find it's relatively
simple to get the Web server set up and running on your Linux of choice.
We'll also install PHP and MySQL, though we won't be digging into MySQL configurations, as that deserves a quick start all its own.
The method of installing the Apache packages on a Linux server varies from distribution to distribution. We'll cover how to do this on Fedora and CentOS, as well as on Ubuntu. This is a server-centric walkthrough, so we'll use the command line exclusively. Naturally, you'll need root-level privileges. Open the terminal window and type:
[ Prove your expertise with the free OS in InfoWorld's Linux admin IQ test round 1 and round 2. | Track the latest trends in open source with InfoWorld's Open Sources blog and Technology: Open Source newsletter. ]
Then enter the root password. Now we can get started.
First we'll install the packages themselves. For Fedora and CentOS, this is a simple step involving Yum, the package installer and updater. To install the basic Apache and PHP packages, run the following command:
Follow the prompts, as this tool will locate and install a base set of Apache and PHP packages.
For Ubuntu 10.04 servers and newer, you can install the whole LAMP (Apache, MySQL, and PHP) stack with two commands:
While
this guide does not cover MySQL, the above commands are a quick way to
get all the necessary packages required for LAMP applications. Once the
installation is complete, we can begin configuring the server.
For all file editing, on Fedora, CentOS, or Ubuntu, you may want to use nano:
This
command will open the Apache configuration file in a basic editor. You
can save the file with Ctrl-O and exit the editor with Ctrl-X.
Apache on Linux: Initial configuration
While the Apache and PHP packages are essentially the same across the different distributions, there are differences in how they are actually installed on the file system. We'll start with Fedora and CentOS.
Fedora and CentOS. After installation, you'll find a new directory: /etc/httpd. Within this directory are all the Apache configuration files. The important subdirectories for our purposes are /etc/httpd/conf and /etc/httpd/conf.d. Within /etc/httpd you'll find the main Apache configuration file, httpd.conf. In /etc/httpd/conf.d you will find includes, or supplemental files that are included in the main configuration file.
Includes are a way to break out complex configurations into separate files for easy organization and management. For instance, if you have an Apache server that has 20 virtual hosts, then each virtual host should have a separate file in /etc/httpd/conf.d/ that contains its specific configuration parameters. In this way, you can easily add or remove virtual hosts without editing the main Apache configuration file.
In order for files to be included in the Apache configuration, they must have a filename that ends with .conf. If we have a virtual host named www.test.com, all the configuration elements for that virtual host would reside in a file named test.conf or test.com.conf.
You can see how these files are included in the main configuration file by looking at /etc/httpd/conf/httpd.conf. Press Ctrl-W to search for "Include conf.d" and you'll find this line:
The method of installing the Apache packages on a Linux server varies from distribution to distribution. We'll cover how to do this on Fedora and CentOS, as well as on Ubuntu. This is a server-centric walkthrough, so we'll use the command line exclusively. Naturally, you'll need root-level privileges. Open the terminal window and type:
su -
Then enter the root password. Now we can get started.
First we'll install the packages themselves. For Fedora and CentOS, this is a simple step involving Yum, the package installer and updater. To install the basic Apache and PHP packages, run the following command:
yum install httpd php mysql mysql-server
For Ubuntu 10.04 servers and newer, you can install the whole LAMP (Apache, MySQL, and PHP) stack with two commands:
sudo apt-get install tasksel
sudo tasksel install lamp-server
For all file editing, on Fedora, CentOS, or Ubuntu, you may want to use nano:
nano /etc/httpd/conf/httpd.conf
Apache on Linux: Initial configuration
While the Apache and PHP packages are essentially the same across the different distributions, there are differences in how they are actually installed on the file system. We'll start with Fedora and CentOS.
Fedora and CentOS. After installation, you'll find a new directory: /etc/httpd. Within this directory are all the Apache configuration files. The important subdirectories for our purposes are /etc/httpd/conf and /etc/httpd/conf.d. Within /etc/httpd you'll find the main Apache configuration file, httpd.conf. In /etc/httpd/conf.d you will find includes, or supplemental files that are included in the main configuration file.
Includes are a way to break out complex configurations into separate files for easy organization and management. For instance, if you have an Apache server that has 20 virtual hosts, then each virtual host should have a separate file in /etc/httpd/conf.d/ that contains its specific configuration parameters. In this way, you can easily add or remove virtual hosts without editing the main Apache configuration file.
In order for files to be included in the Apache configuration, they must have a filename that ends with .conf. If we have a virtual host named www.test.com, all the configuration elements for that virtual host would reside in a file named test.conf or test.com.conf.
You can see how these files are included in the main configuration file by looking at /etc/httpd/conf/httpd.conf. Press Ctrl-W to search for "Include conf.d" and you'll find this line:
Include conf.d/*.conf
Create tab on Facebook page (updated)
CUSTOM FACEBOOK TAB
As usual Facebook keep changing, improving and driving nuts many developers and users.
How to have however a new tab into your page on Facebook and in personal profile
1. Go to your https://developers.facebook.com/apps (if you have not account there just create one, it is fast and free – follow the instructions)
2. Create an app , take care , name of the app is very relevant, for example is your new tab will be a contact form the name it Contact. It is not just about name of tab, it can be changed but it is about page title when user will click on the icon of your app. The icon can be setup later. Let’s have the tab working.
See image below as sample and fill in with your details
You can setup and use the application (tab) but you must have SSL installed on your website!
As far as I see if you are developer of the app and you try to see your result (tab content) you will get error generated by the missing SSL. If you open a new browser and access the same tab (login in facebook or not) there will be no error.
Save and wait a few minutes/hours or no need to wait. Why? Because it depends of Facebook “mood”. Try next steps once you finish this one. If it works means you are luck, does not work yet: check all above and it means “bad luck”. Keep trying, never give up.
3. make sure you have your in your website setup the path specified above, I mean: http://www.sydneywebs.com.au/facebook/about/ folder and that a file named index.php or index.html does exist into that folder
What will be in that page (index.php) will be displayed into your new tab on facebook
4. When you consider, login in Facebook, into that account that is admin for the page in which you wish to add the tab and write in browser :
For page, you will be asked to chose the page where you wish to be displayed this tab. To that page into applications area will be added your app.
More tabs you need then more apps you need to setup. One tab you wish to have = one apps like this you will add.
As usual Facebook keep changing, improving and driving nuts many developers and users.
How to have however a new tab into your page on Facebook and in personal profile
1. Go to your https://developers.facebook.com/apps (if you have not account there just create one, it is fast and free – follow the instructions)
2. Create an app , take care , name of the app is very relevant, for example is your new tab will be a contact form the name it Contact. It is not just about name of tab, it can be changed but it is about page title when user will click on the icon of your app. The icon can be setup later. Let’s have the tab working.
See image below as sample and fill in with your details
You can setup and use the application (tab) but you must have SSL installed on your website!
- If your page (tab) will be browsed by a user who is not log into facebook then the facebook url is http://facebook.com/YOUR_FACEBOOK_PAGE. All good and your tab will be displayed okay.
- If your page (tab) will be browsed by a user who is log into facebook then the facebook url is https://facebook.com/YOUR_FACEBOOK_PAGE. Your page (TAB) will try to load your content on https:// and if you have not SSL installed then an error will be displayed.
As far as I see if you are developer of the app and you try to see your result (tab content) you will get error generated by the missing SSL. If you open a new browser and access the same tab (login in facebook or not) there will be no error.
Save and wait a few minutes/hours or no need to wait. Why? Because it depends of Facebook “mood”. Try next steps once you finish this one. If it works means you are luck, does not work yet: check all above and it means “bad luck”. Keep trying, never give up.
3. make sure you have your in your website setup the path specified above, I mean: http://www.sydneywebs.com.au/facebook/about/ folder and that a file named index.php or index.html does exist into that folder
What will be in that page (index.php) will be displayed into your new tab on facebook
4. When you consider, login in Facebook, into that account that is admin for the page in which you wish to add the tab and write in browser :
- To display tab in your page (personal): call in a browser: https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_CANVAS_PAGE
- To display tab in business page: call in a browser: https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_CANVAS_PAGE
For page, you will be asked to chose the page where you wish to be displayed this tab. To that page into applications area will be added your app.
More tabs you need then more apps you need to setup. One tab you wish to have = one apps like this you will add.
Create rounded corners with CSS
Rounded corners for Safari/Chrome, Opera and IE9:
#example {
border-radius: 15px;
}
Rounded corners to be supported by Firefox as well:
#example {
-moz-border-radius: 15px;
border-radius: 15px;
}
The border-radius shorthand property can be used to define all four corners simultaneously. The property accepts either one or two sets of values, each consisting of one to four lengths or percentages.
Example:
border-radius: 5px 10px 5px 10px / 10px 5px 10px 5px;
border-radius: 5px;
border-radius: 5px 10px / 10px;
The first set of (1-4) values define the horizontal radii for all four corners. An optional second set of values, preceded by a ‘/’, define the vertical radii for all four corners. If only one set of values are supplied, these are used to determine both the vertical and horizontal equally.
If all four values are supplied, these represent the top-left, top-right, bottom-right and bottom-left radii respectively. If bottom-left is omitted it is the same as top-right, if bottom-right is omitted it is the same as top-left, and if only one value is supplied it is used to set all four radii equally.
Basic examples that should work in current versions of Firefox, Safari/Chrome, Opera and even IE9:
#Example_A {
height: 65px;
width:160px;
-moz-border-radius-bottomright: 50px;
border-bottom-right-radius: 50px;
}
#Example_B {
height: 65px;
width:160px;
-moz-border-radius-bottomright: 50px 25px;
border-bottom-right-radius: 50px 25px;
}
#Example_C {
height: 65px;
width:160px;
-moz-border-radius-bottomright: 25px 50px;
border-bottom-right-radius: 25px 50px;
}
#Example_D {
height: 5em;
width: 12em;
-moz-border-radius: 1em 4em 1em 4em;
border-radius: 1em 4em 1em 4em;
}
#Example_E {
height: 65px;
width:160px;
-moz-border-radius: 25px 10px / 10px 25px;
border-radius: 25px 10px / 10px 25px;
}
#Example_F {
height: 70px;
width: 70px;
-moz-border-radius: 35px;
border-radius: 35px;
}
Another opinion in considering most of the browsers when create rounded conners through CSS:
Since each of the browsers still has its own unique idiosyncrasies, they apply prefixes such as
rounded-corners {
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
-khtml-border-radius: 20px;
border-radius: 20px; }
#example {
border-radius: 15px;
}
Rounded corners to be supported by Firefox as well:
#example {
-moz-border-radius: 15px;
border-radius: 15px;
}
The border-radius shorthand property can be used to define all four corners simultaneously. The property accepts either one or two sets of values, each consisting of one to four lengths or percentages.
Example:
border-radius: 5px 10px 5px 10px / 10px 5px 10px 5px;
border-radius: 5px;
border-radius: 5px 10px / 10px;
The first set of (1-4) values define the horizontal radii for all four corners. An optional second set of values, preceded by a ‘/’, define the vertical radii for all four corners. If only one set of values are supplied, these are used to determine both the vertical and horizontal equally.
If all four values are supplied, these represent the top-left, top-right, bottom-right and bottom-left radii respectively. If bottom-left is omitted it is the same as top-right, if bottom-right is omitted it is the same as top-left, and if only one value is supplied it is used to set all four radii equally.
Basic examples that should work in current versions of Firefox, Safari/Chrome, Opera and even IE9:
#Example_A {
height: 65px;
width:160px;
-moz-border-radius-bottomright: 50px;
border-bottom-right-radius: 50px;
}
#Example_B {
height: 65px;
width:160px;
-moz-border-radius-bottomright: 50px 25px;
border-bottom-right-radius: 50px 25px;
}
#Example_C {
height: 65px;
width:160px;
-moz-border-radius-bottomright: 25px 50px;
border-bottom-right-radius: 25px 50px;
}
#Example_D {
height: 5em;
width: 12em;
-moz-border-radius: 1em 4em 1em 4em;
border-radius: 1em 4em 1em 4em;
}
#Example_E {
height: 65px;
width:160px;
-moz-border-radius: 25px 10px / 10px 25px;
border-radius: 25px 10px / 10px 25px;
}
#Example_F {
height: 70px;
width: 70px;
-moz-border-radius: 35px;
border-radius: 35px;
}
Another opinion in considering most of the browsers when create rounded conners through CSS:
Since each of the browsers still has its own unique idiosyncrasies, they apply prefixes such as
-moz
and -webkit
.-moz-border-radius
is for Firefox, -webkit-border-radius
is for Chrome/Safari and -khtml-border-radius
is for older Konquerer browsers.rounded-corners {
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
-khtml-border-radius: 20px;
border-radius: 20px; }
CSS Box Shadow
Syntax
box-shadow: h-shadow v-shadow blur spread color inset;JavaScript syntax:
object.style.boxShadow="10px 10px 5px #888888"Note: The box-shadow property attaches one or more drop-shadows to the box. The property is a comma-separated list of shadows, each specified by 2-4 length values, an optional color, and an optional inset keyword. Omitted lengths are 0.
VALUE
DESCRIPTION
h-shadow
Required. The position of the horizontal shadow. Negative values are allowed
v-shadow
Required. The position of the vertical shadow. Negative values are allowed
blur
Optional. The blur distance
spread
Optional. The size of shadow
color
Optional. The color of the shadow.
inset
Optional. Changes the shadow from an outer shadow (outset) to an inner shadow
Box Shadow for Firefox, Safari/Chrome, Opera and IE9:
.Example_A { -moz-box-shadow: 3px 3px 5px 6px #ccc; -webkit-box-shadow: 3px 3px 5px 6px #ccc; box-shadow: 3px 3px 5px 6px #ccc; }Inner Shadow for Firefox, Safari/Chrome, Opera and IE9:
.Example_B { -moz-box-shadow: inset 0 0 10px #000000; -webkit-box-shadow: inset 0 0 10px #000000; box-shadow: inset 0 0 10px #000000; }One Side Box Shadow for Firefox, Safari/Chrome, Opera and IE9:
.Example_C { -webkit-box-shadow: 0 8px 6px -6px black; -moz-box-shadow: 0 8px 6px -6px black; box-shadow: 0 8px 6px -6px black; }
CSS Text Shadow
Syntax
text-shadow: h-shadow v-shadow blur color;JavaScript syntax:
object.style.textShadow="2px 2px #ff0000"Note: The text-shadow property attaches one or more shadows to text. The property is a comma-separated list of shadows, each specified by 2 or 3 length values and an optional color. Omitted lengths are 0.
VALUE
DESCRIPTION
h-shadow
Required. The position of the horizontal shadow. Negative values are allowed
v-shadow
Required. The position of the vertical shadow. Negative values are allowed
blur
Optional. The blur distance
color
Optional. The color of the shadow
h3 {text-shadow: 0.1em 0.1em #333}Fuzzy text shadow:
h3.a {text-shadow: 0.1em 0.1em 0.05em #333} h3.b {text-shadow: 0.1em 0.1em 0.2em black}Readable white text:
h3 {color: white} h3.a {color: white; text-shadow: black 0.1em 0.1em 0.2em}Multiple shadows:
h3 {text-shadow: 0.2em 0.5em 0.1em #600, -0.3em 0.1em 0.1em #060, 0.4em -0.3em 0.1em #006}Emboss effect: Raised Emboss & Inset Emboss
h3.a {text-shadow: -1px -1px white, 1px 1px #333} h3.b {text-shadow: 1px 1px white, -1px -1px #444}Drawing letters as outlines:
h3 {text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black}Neon glow:
h3.a {text-shadow: 0 0 0.2em #8F7} h3.b {text-shadow: 0 0 0.2em #F87, 0 0 0.2em #F87} h3.c {text-shadow: 0 0 0.2em #87F, 0 0 0.2em #87F, 0 0 0.2em #87F}
Subscribe to:
Posts (Atom)