
######################################################
some post install tips for for ubuntu Feisty Fawn 7.10
======================================================
last change: 2007-11-20
Sadao Massago
http://www.dm.ufscar.br/~sadao
=========================================

#################################
for ubuntu tips and tricks, see
http://ubuntuguide.org/
#################################

=================================
To activate root (not recomended)
=================================
system->administration->Users and Groups
check 
[v] show all users and groups
and selct "root" and click on [properties]

Password
[v] Set password by hand
and set the password

After this, will uncheck the
[ ] show all users and groups

Will change to root in console using
su -

Note: Super user (sudoers) will execute as root by
sudo command
without root account activated.

sudo expire by time, but root, no. Due to security, use sudo instead of root account.

====================================================================
To admit root login into graphical environment (very not recomended)
====================================================================
Note: Recomend to login as root inside terminal, typping 
su -
login as root into graphical environment is dangerous on net connected systems.

To admit root to login into graphical environments use login window manager.

system->administration->login window

[Security]
Security
[v] allow local system administrator login

==============================
passwordless login (optional)
==============================
On home computer, sometimes are suitable to set the passwordless login user
The passwordless login are not passwordless user.
For administtrative task, the password are required.
If gdm remote login is disabled, all remote acess require password.
Thus, is relativelly secure for home machine.

ensure that gmd remote login is disabled
----------------------------------------
system->login window
[remote]
style: remote login disabled

For passwordless user, need to change gdm authentication on pam and on gdm.

gdm auth on pam setting
-----------------------
edit the file /etc/pam.d/gdm
sudo gedit /etc/pam.d/gdm
and insert

auth sufficient pam_listfile.so sense=allow file=/etc/passwordless item=user

before

@include ...

The file became like this

,----[ /etc/pam.d/gdm ]
| #%PAM-1.0
| auth requisite pam_nologin.so
| auth required pam_env.so
| auth sufficient pam_listfile.so sense=allow file=/etc/passwordless item=user
| @include common-auth
| @include common-account
| session required pam_limits.so
| @include common-session
| @include common-password
`----

gnome-screensaver auth on pam setting
--------------------------------------
In way to unlock screen without password 
(returning from hibernate or using user switch, for example),
need to change gnome-screensaver auth too.


edit the file /etc/pam.d/gnome-screensaver
sudo gedit /etc/pam.d/gnome-screensaver
and insert
auth sufficient pam_listfile.so sense=allow file=/etc/passwordless item=user
as in /etc/pam.d/gdm

,----[ /etc/pam.d/gnome-screensaver ]
| auth sufficient pam_listfile.so sense=allow file=/etc/passwordless item=user
| @include common-auth
`----

create list of passwordless users
---------------------------------

sudo gedit /etc/passwordless

and insert names of user that allow passwordless login

,----[ /etc/passwordles ]
| <user 1>
| <user 2>
`----

GDM setting
-----------

Perphaps, need to change gdm setup file too.

edit
/etc/gdm/gdm.conf-custom

sudo gedit /etc/gdm/gdm.conf-custom

and add

PasswordRequired=false

on security section. It became like this
,----[ /etc/gdm/gdm.conf-custom ]
| ...
| [security]
| PasswordRequired=false
| ...
`----

=========================================================
user with obscure or blank password (very not recomended)
=========================================================
If desire to login without typing password, use passwordless login,
instead of obscure or blank password due to security rason.
It is only for ilustrations.

pam setting
-----------
To permit login with obscure password or without password, need to change settings on
/etc/pam.d/common-password
Set min legth as 0 and remove obscure (obscure option reject obscure password)
The line of module specification becames like

,----[ /etc/pam.d/common-password ]
| ...
| password   required   pam_unix.so nullok min=0 max=8 md5
| ...
`----

In way to set obscure (very simple or shorter) password, use passwd as root
sudo passwd [user]
where [user] is desired user.

To set blank password, edit the file shadow as root and set seccond field 
(earch field are separated by :) as U6aMy0wojraho
sudo gedit /etc/shadow
Suppose that guest is user with blank password.
Thus locate the line like this

,----[ /etc/shadow ]
| ...
| guest:$1$ZPPLO$1BDPjh.Tngr.ME1p1wR2a.:13833:0:99999:7:::
| ...
`----

and change as

,----[ /etc/shadow ]
| ...
| guest:U6aMy0wojraho:13833:0:99999:7:::
| ...
`----

To login, enter the user name and only press enter on password field.
If desire to ekip password field, set as passwordless login user
(see passwordless login section).

Note:
sudo passwd -d [user login]
remove password fron [user]

Normally, passwordless user can not login due to security, 
unless use passwordless login
(see section of passwordless login).

===================
To adjust date/time
===================
system->administration->time and date
[Synchronise Now]
Will change between 12h or 24h clock mode.

================
To setup network
================
use
system->administration->networking

====================
Add/delete languages
====================
system->administration->language support
Chack/uncheck the languages and click [apply] or [OK]

Default language is language for new user.

==================================
using scim for desired/all locale
==================================

For all user
------------
Change the link /etc/X11/xinit/xinput.d/all_ALL point to /etc/X11/xinit/xinput.d/scim
sudo ln -sf /etc/X11/xinit/xinput.d/scim /etc/X11/xinit/xinput.d/all_ALL

To return as default, change link to /etc/X11/xinit/xinput.d/default
sudo ln -sf /etc/X11/xinit/xinput.d/default /etc/X11/xinit/xinput.d/all_ALL

If desire to appli only when login as specific locale, create file or link with
name same of deisred locale.
For example, to use scim on en_US locale
sudo ln -s /etc/X11/xinit/xinput.d/scim /etc/X11/xinit/xinput.d/scim/en_US 

The locale without setup are used the all_ALL

per user
--------
Same as all user case, copy the config file (or create link) inside 
.xinput.d folder os user home directory. 
Recomend to copy instead of link in way to edit and customize.

mkdir ~/.xinput.d
cp /etc/X11/xinit/xinput.d/scim ~/.xinput.d/all_ALL
or
cp /etc/X11/xinit/xinput.d/scim ~/.xinput.d/en_US 

per user scim setup
-------------------
In way to activate/desactivate input method, click on right button on scim icon
(on task bar) and select SCIM Setup.
On IMEEngine->Global Setup, check/uncheck desired input method.
The input method are selected, clicking left button on scim icon.

Note: <ctrl><space> enable/disable scim.

================================================
To produce acented character on english keyboard
================================================
If is not accentuate the character, the keyboard layout
is incorrect. Use international layout of keyboard
Edit the file /etc/X11/xorg.conf
sudo gedit /etc/X11/xorg.conf
And on 

Section "InputDevice"
	Identifier	"Generic Keyboard"
...

Add Option XkbVariant as  intl or alt-intl
The section becames like this

,----[ /etc/shadow ]
| ...
| Section "InputDevice"
|
|	Identifier	"Generic Keyboard"
|	Driver		"kbd"
|	Option		"CoreKeyboard"
|	Option		"XkbRules"	"xorg"
|	Option		"XkbModel"	"pc105"
|	Option		"XkbLayout"	"us"
|	Option		"XkbVariant"	"intl"
| EndSection
| ...
`----

The above change will be maded using command line setxkbmap
sudo setxkbmap us -variant intl
or
sudo setxkbmap us -variant alt-intl

Note that, in gnome, will set keyboard layout per user using
system->preference->keyboard

============================================
using cedilla on english keybord/environment
============================================
On the English keyboard with intl variant, the cedilla are produced 
by <alt>, and <shift><alt>, and on alt-intl variant, are produced by 
<alt>,+c and <alt>,+C
The ´+c and ´+C produce accentuated c instead of cedilla.
In way to produce cedilla using ´+c and ´+C, need to change compositing rule
used by X

for all user
------------

=> GNOME desktop only

The GNOME use their own imput method as default and will change easy. Editing the file
sudo gedit /usr/lib/gtk-2.0/2.10.0/immodule-files.d/libgtk2.0-0.immodules

Add location for desired im modules
Ex.: to use Cedilla in english, add, "en" on cedilla

=> All Desktop case

In way to change for all desktop (KDE/XFCE), need to change xim compose rule.

The xim composite rule for each locale are stored in 
/usr/share/X11/locale/
Select desired locale, backup and change as desired.
For example, to eu_US.UTF-8 act as pt_BR-UTF-8 (for cedilla),
sudo cp /usr/share/X11/locale/en_US.UTF-8/Compose /usr/share/X11/locale/en_US.UTF-8/Compose.backup
sudo gedit /usr/share/X11/locale/en_US.UTF-8/Compose

and locate the line
<dead_acute> <C>                 	: "Ć" U0106 # LATIN CAPITAL LETTER C WITH ACUTE
and replace with (or comment and insert)
<dead_acute> <C>                        : "Ç" Ccedilla # LATIN CAPITAL LETTER C WITH CEDILLA

Locate the line
<dead_acute> <c>                 	: "ć" U0107 # LATIN SMALL LETTER C WITH ACUTE
and replace with (or comment and insert)
<dead_acute> <c>                        : "ç" ccedilla # LATIN SMALL LETTER C WITH CEDILLA

Copy the setup file /etc/X11/xinit/xinput.d/default as /etc/X11/xinit/xinput.d/xim
and set the input method for GNOME and KDE as xim

sudo cp /etc/X11/xinit/xinput.d/default /etc/X11/xinit/xinput.d/xim
sudo gedit /etc/X11/xinit/xinput.d/xim

,----[ /etc/X11/xinit/xinput.d/xim ]
| ...
| GTK_IM_MODULE=xim
| QT_IM_MODULE=xim
| ...
`----

If GNOME one are configured as above (GNOME desktop only), 
will keep GTK_IM_MODULE as blank to continue using GNOME default one.

Create link for all_ALL and/or desired locale
sudo ln -sf /etc/X11/xinit/xinput.d/xim /etc/X11/xinit/xinput.d/all_ALL
or
sudo ln -s /etc/X11/xinit/xinput.d/xim /etc/X11/xinit/xinput.d/scim/en_US 


Per user
--------
a. Adjust xim compose rule

Copy apropriate compose rule from 
/usr/share/X11/locale/ to .XCompose on home folder.
For example, to use cedilla as above, copy pt_BR.UTF-8 one
cp /usr/share/X11/locale/pt_BR.UTF-8/Compose ~/.XCompose

b. Set xim as default input method
copy xinput method file file and and set 
GTK_IM_MODULE and QT_IM_MODULE as xim
 
mkdir ~/.xinput.d
cp /etc/X11/xinit/xinput.d/default ~/.xinput.d/all_ALL
gedit ~/.xinput.d/all_ALL

,----[ ~/.xinput.d/all_ALL ]
| ...
| GTK_IM_MODULE=xim
| QT_IM_MODULE=xim
| ...
`----

for scim user
-------------
Note that if are using scim as default input method, the English/European does not 
affected by above change and continue producing accentuated c for '+c
Need to use <alt>, and <alt><shift>, for cedilla.
If select X Input Method from right click->input method on text field of GNOME apps,
change to xim, but behavior is the same. I don't know how to solve it.

Note: the <cntrl><space> enable/disable scim for fast ime switch.


On GDM
------
The change of xim composite table does not affect input method used by gdm.
gdm use GNOME ones.

Question: 
1. will change GTK immodules setup for desired user only?
2. Will change composite rule for scim (English/European)?

================================
To admistrate installed packages
================================
Use synaptic on
system->administration->synaptic package manager

Note: downloaded archieves are stored on
/var/chache/apt/archives
Atenpt to unselect file "lock" that is lok file
If lock is selected, will cause copying errors.
subfolder "partial" is used to store partial downloaded filas and recomended to skip too.
Use
dpkg -i -E *.deb
in way to install on other computer.
sametimes, some of downloaded packages fail to install setup due to 
dependent checking (that not very featured as apt-get).
With -E, skip installation, if same version is found

To clear arleady copied files from cache, on synaptic
enter on
settings->preferences
[files]
and click on
"delete cached package files"

to activate aditional package repository,
enter on
settings->repository
and check repository desired to activate.

More apropriate way to use downloaded DEB files (by apg-get/synaptic or by hand)
is to create CD repo. In this way, will select packages to install,
using script (apt-get) or synaptic.
To create pacakge repo CD, install apttocd and call by system->administration->APTtoCD
that is easy to use graphical front ends.

===========================
activate delete on nautilus
===========================
on nautilus,
edit->preferences,
[behaviour]
Garbage bin

[v] include a Delete command that bypasses Garbage Bin

=====================
activate LAN printers
=====================

system->administration->printing
server settings: [v] show printers shared by other systems
click on [reflash]

If not work, run
sudo gnome-cups-manager
To call old interface and on global settings, ensure that
"detect LAN printers" is enabled.

If using firewall, ensure that the port 631 is oppened for printer server.
On firestarter, enter to [policy] and on Editing [inbound traffic policy]
Add item with desired server and port 631, on "Allow service"

If not work yet, check if "Broadcasts from external/internal network" is not bloked.
On firestarter, enter to
Edit->preferences: firewall->advanced options, item "Broadcast traffic"
and uncheck the
  "[ ] Block Broadcasts from external network"
  "[ ] Block Broadcasts from internal network"

==============
sound settings
==============
Normally the sound output becames activated, but the capture will became disabled. To use microphone or line for sound input devide (for recording ou voice chat, for example), will need to activate and adjust volume level corresponding to desired sound device on mixer control panel.
The mixel control panel on gnome is open by double clicking on sound icon on tools bar. Single click open volume control only.

If some sound related apps misconfigure the mixer, will disable output/capture sound, or set to low volume level. In this case of sound trouble, check and adjut mixer settings.

Note: If no sound works, check on edit->preferences on mixer controler and check if correct sound card (that is not the tv card or modem) is selected.


===================
to install kde/xfce
===================
install kubuntu-desktop and xubuntu-desktop
Note: kubuntu change shutdown screen and xubuntu change login screen.
login screen will restored by
system->administration->login window
If it does not on menu (bug - will corrected), call from command line
# gdmsetup
Default login window background color for ubuntu (GNOME) is: 
(R,G,B)=(218,176,130)
(H,S,V)=(31,40,85)
color name: #DAB082

To restore use of GDM login screen (if selected kdm and desire to restore)
# sudo dpkg-reconfigure gdm

Restore splash screen on boot/shutdown
1. backup grub menu, if edited manually (because rebuild grub menu)
2. adjust splash link for ubuntu, kubuntu or xubuntu usplash.

# sudo ln -sf /usr/lib/usplash/usplash-theme-ubuntu.so /usr/lib/usplash/usplash-artwork.so
# sudo dpkg-reconfigure linux-image-$(uname -r)

splashs for ubuntu, kubuntu and xubuntu:
   usplash-theme-ubuntu.so, usplash-theme-kubuntu.so, usplash-theme-xubuntu.so

Note: The edubuntu use gnome desktop and put bad gnome theme.
I don't know how to restore default logging splash screen on gnome...

======================
default session/clock
======================
On login window:
general: Select settings for newer user such as default session (GNOME, KDE, or XFCE)
clock mode, etc
local: configure login theme and background colors.

Note: The setup for newer created user (after login) is copied from
/etc/skel

====
note 
====
<middle button> or <left><right> button on mouse copy/past selected text on cursor position.
Very usefull to copy text from one app to other, such as command on text editor to terminal.

To delete (does not move to trash) <shift><del>
To acess all folders on nautilus, type <ctrl>H to show hidden files. On new utuntu, except the home and media, becames hiddn folders.

for gnome config, use
gconf-editor

Note:
The script /etc/profile are executed by all users

=========================
auto start on GNOME/XFCE
=========================
Create link inside 
~/.config/autostart
example:
ln -s /usr/bin/beryl-manager ~/.config/autostart/beryl-manager
The autostart program will added graphically on GNOME by preferences->sessions
 
=================
auto start on KDE
=================
create link inside ~/.kde/Autostart
Example:
ln -s /usr/bin/beryl-manager ~/.kde/Autostart/beryl-manager


===========
end of file
===========

