Página do Sadao Massago

Página do Linux

Ubuntu Linux Tips

Tips for ubuntu user, but several ones will works on other GNOME based distro.
For official ubuntu tips and tricks, see http://ubuntuguide.org/.

To activate root login (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.

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.

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. In way to allow password less login, will use file or group

If decicde to use file, create one containning one user by line
#sudo gedit /etc/passwordless
and insert names of user that allow passwordless login

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

If decide to use group, create one group like "nopasswdlogin" and add the desired users. The recent distribuiton (after 2009) of ubuntu becames with this group and GDM setup. Thus, only need to add users for group and setup GNOME Screensaver.

CAUTION: If enabled remote llogin, do not create passwordless login user.

GDM settings

Edit the file /etc/pam.d/gdm
#sudo gedit /etc/pam.d/gdm

If using file, 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
 `-------------

If using group, insert
auth    sufficient      pam_succeed_if.so user ingroup nopasswdlogin
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_succeed_if.so user ingroup nopasswdlogin
| @include common-auth
| @include common-account
| session required pam_limits.so
| @include common-session
| @include common-password
 `-------------

GNOME screeensaver setup
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

If using file, insert
auth sufficient pam_listfile.so sense=allow file=/etc/passwordless item=user
as in /etc/pam.d/gdm
becames like

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

If using group, insert
auth    sufficient      pam_succeed_if.so user ingroup nopasswdlogin
before
@include ...
The file became like this

  ,--------[/etc/pam.d/gnome-screensaver]--------
| auth    sufficient      pam_succeed_if.so user ingroup nopasswdlogin
| @include common-auth
| auth optional pam_gnome_keyring.so
  `------

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 ":") such as "guest: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]
remove password fron [user]
Normally, passwordless user can not login due to security, unless use passwordless login (see section of passwordless login).

Add/delete languages
system->administration->language support
Check/uncheck the languages and click [apply] or [OK] Default language is language for new user.

Remove Accessibility icon from notification area
System->Preferences->Keyboard
[accessibility]
Uncheck the
[ ]"Accessibility features can be toggled with keyboard shortcuts"
On system->preferences->Startup Applications,
disabele
[ ] visual assistance

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"

to set visual effect like font on root (apps launched by sudo)
Use config GUI
#sudo gnome-appearance-properties

To set up default boot splash and GDM theme (for ubuntu based)
After install additional desktop or want to change default theme.
Desktop
System->Preferences->Appearance

GDM theme
On ubuntu before 2009
system->administration->login window
or
#sudo gdmsetup

Boot splash for Ubuntu before 2009
These version of ubuntu use xsplash for boot time splash system
Restore splash screen on boot/shutdown
1. backup grub menu, if edited manually (because will 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.

GDM theme for ubuntu 10.04
On Ubuntu 10.04, the gdmsetup ( system->administration->login screen) is only for gdm behavior.
In way to change GDM theme, use gnome-appearance-properties as user gdm.
# gksu -u gdm dbus-launch gnome-appearance-properties

Boot splash for Ubuntu 10.04
On ubuntu 10.04 lucid, the boot splash is changed to plymouth.
To change plymouth theme, run
# sudo update-alternatives --config default.plymouth

default session/clock for new users
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

Setup Radiance like buton order on non-purple theme (Ubuntu 10.04 only)
The followings exampleis for Shiki-Humand (classica orange) ones, but it works for other themes.

install shiki-human
#sudo apt-get install shiki-human-theme
on the system->preference, select Shiki Human
click on [customize]
On [Windows border], select Ambiance

To change button order, will made by command line
Run gconftools
#gconftool-2 -s /apps/metacity/general/button_layout -t string 'close,minimize,maximize:menu'

or graphically
Load gconf editor
#gconf-editor
On
apps->metacity->general
[button_layout]
Use right button on mouse over item to select "edit key"
change button order
menu:minimize,maximize,close
to
close,minimize,maximize:menu

Using MagIcons to Custoize Theme Colors (Ubuntu 10.04 only)
In way to customize icon color scheme, use Magicons (icon theme installer/customizer) and ustomizable them icon set.
#wget -N http://gnome-look.org/CONTENT/content-files/120508-MagIcons_0.3-0_all.deb
# sudo dpkg -i -E 120508-MagIcons_0.3-0_all.deb
Download humanities icon set that is very closed to humanity, but use less color for easy change
#wget -N http://dl.dropbox.com/u/3588645/Themes/Humanities/

Open the MagIcons
Applications->graphics->Magicons

Install new icon set using MagIcons
File_Insxtall New icon set
and choise Humanities.tar.bz2

Select icon set and color scheme
select one iconset: humanities
select a scheme: human
Click on [apply this inset] and all is OK

Note that will cretate new color scheme, changing the existing ones.
For example, will select orange scheme and change purple part with other colors

select a scheme: orange
Change 3 colors
Extras, Light; Extras, Dark;  and Extras, Border to non-purple colors.

[apply this inset]
In the case of changing color definition, ask for name to color scheme. Give your desired names

Setup wizardpen compatible tablet on Ubuntu 10.04
The Tablet not compatible with Wacon ones will need to be configured in way to work correctly.
for example, on the default settings, Genius G-pen F509 works only then pen is touched (clicked) ou button clicked.
If move pen not touching tablet base, the moute pointer does not move (mouse function is lost).

The wizardpen compatible ones like Genius Tablet need to install aditional drivers.
Download and install from
http://ppa.launchpad.net/doctormo/xorg-wizardpen/ubuntu/pool/main/x/xserver-xorg-input-wizardpen/
After install, reboot the computer.
If it is not working correctluy, need to change setup files.
1. Check your Tablet vendor name and input event values

# cat /proc/bus/input/devices
Output example for Genius G-Pen F509.
In this case, nvendor name is "WALTOP" and in following output, event number is 5 ("event5")

I: Bus=0003 Vendor=172f Product=0038 Version=0110
N: Name="         WALTOP             Tablet    "
P: Phys=usb-0000:05:06.1-1/input0
S: Sysfs=/devices/pci0000:00/0000:00:09.0/0000:05:06.1/usb5/5-1/5-1:1.0/input/input5
U: Uniq=
H: Handlers=mouse2 event5
B: EV=1f
B: KEY=c03 1f0001 0 0 0 0
B: REL=143
B: ABS=1fffff0001000003
B: MSC=10

2. Now, calibrate (for this, need input number)
# sudo wizardpen-calibrate  /dev/input/event5
The "event5" need to adjusted as your device

Example of output after two corner is given

    Driver        "wizardpen"
    Option        "Device"    "/dev/input/event4"
    Option        "TopX"        "233"
    Option        "TopY"        "121"
    Option        "BottomX"    "17920"
    Option        "BottomY"    "10600"

The 4 last lines indicates the working area.

3. Find setup file name

# ls /usr/lib/X11/xorg.conf.d/
Example that the file is 70-wizardpen.conf.
Note that wacon.conf is for wacon compatible ones.
05-evdev.conf       10-vmmouse.conf  70-wizardpen.conf
10-synaptics.conf  10-wacom.conf

4. Backup setup file

# sudo cp /usr/lib/X11/xorg.conf.d/70-wizardpen.conf /usr/lib/X11/xorg.conf.d/70-wizardpen.conf.backup

5. Edit setup file

# sudo gedit /usr/lib/X11/xorg.conf.d/70-wizardpen.conf

On the MatchVendor,
   MatchVendor "WALTOP|UC-LOGIC|KYE Systems|Ace Cad"
add your model. In the case WALTOP, becames like
   MatchVendor "WALTOP|UC-LOGIC|KYE Systems|Ace Cad"


On the section
Section "InputClass"
   Identifier "wizardpen"
...

For working range, put the value obtainned by wizardpen-calibrate on step 2.

The final setup file on the Genius G-pen F509 is  becames

Section "InputClass"
   Identifier "wizardpen"
   MatchIsTablet "on"
   MatchDevicePath "/dev/input/event*"
   MatchVendor "WALTOP|UC-LOGIC|KYE Systems|Ace Cad"
   Driver "wizardpen"
   Option        "TopX"        "233"
   Option        "TopY"        "121"
   Option        "BottomX"    "17920"
   Option        "BottomY"    "10600"
EndSection
Section "InputClass"
   Identifier "wizardpen ignore mouse dev"
   MatchIsTablet "on"
   MatchDevicePath "/dev/input/mouse*"
   MatchVendor "WALTOP|UC-LOGIC|KYE Systems|Ace Cad"
   Driver ""
EndSection

Note that the vendo name is changed on both section, but the working area are not required on seccond ones that is ignore (no driver selected).

6. Finishing
   Save the file
   Logout, and login again to restart X server.

This setup process is based on the post on
http://ubuntuforums.org/showthread.php?t=1475433&mode=linear
but, note that the sugestion on the post to fix input event number instead of vendor name adjutment is not appropriate for USB Tablet, because the input event number of USB device will change due to their conection order (the user will conect in any order and it will change event number).