Configuration Common: Difference between revisions

From miki
Jump to navigation Jump to search
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Any ==
== Any ==
To be completed
To be completed



== Linux ==
== Linux ==
Moved to [[Configuration Common Linux]].
=== Install script ===
* Initial install script to install common applications
<source lang=bash>
sudo apt-get install git etckeeper
git config --global user.email "user@server.com" # Make sure this is defined for admin user + root
git config --global user.name "User Name" # or release upgrade might fail in the future
sudo su -
git config --global user.email "user@server.com"
git config --global user.name "User Name (root)"
logout

sudo vi /etc/etckeeper/etckeeper.conf # Select git, avoid daily commit, avoid auto-commit
sudo etckeeper init
sudo etckeeper commit "1st commit"
cd /etc
sudo vi .gitignore # Ignore resolv.c* (and cups/subscriptions.* before Ubuntu Precise)
sudo git rm --cached resolv.c*
sudo git rm --cached cups/subscriptions.* # No longer needed on Ubuntu Precise and after
sudo git add .gitignore
sudo etckeeper commit "ignore resolv.c*, cups/subscriptions.*"

sudo vi /etc/apt/sources.list # Enable / add all relevant repositories (partner...)
sudo etckeeper commit "enable partners, extra repositories"

sudo apt-get update
sudo apt-get install opera # or sudo dpkg -i opera...
sudo apt-get install libnss-mdns avahi-daemon mdns-scan synapse gitk git-gui git-doc \
mc autossh ssh vim-gnome exuberant-ctags cscope ruby keepassx
# 14.04 Trusty: package 'synapse' missing
# -> Install from 13.10 package

# Restore my profile
sudo vi /etc/hosts # Add host 'griffin' - make sure localhost as FQDN:
# 127.0.1.1 myhost.domain.com
ssh griffin -C "cat /etc/hosts" # recover any needed host ip address
sudo vi /etc/hosts # ... and write them
sudo etckeeper commit "update /etc/hosts file"
git clone git@apple-pi:git/home.git
mv home/.git .
rm -rf home
git reset --hard
git st
export PATH=$PATH:$HOME/bin
set-network.sh
chmod 600 .ssh/*
chmod 644 .ssh/id_rsa.pub
mkdir tmp
git co opera -- .opera && git reset
restoresettings
</source>
* Install the common repositories ([[Opera|Opera]], Synapse, [[Ubuntu#Ubuntu Tweak|Ubuntu Tweak]], [[XBMC#Install|XBMC]])
<source lang=bash>
# Opera
# sudo add-apt-repository ppa:synapse-core/ppa # Synapse - older ubuntu release
sudo add-apt-repository ppa:tualatrix/next # Ubuntu Tweak
# 14.04 Trusty: ppa not yet available
sudo add-apt-repository ppa:team-xbmc/ppa # XBMC
sudo apt-get update
</source>
:These repositories are obsolote or discontinued:
:*[[Linux Software#Gnome Terminator|Gnome Terminator]] (not needed anymore for ''Ubuntu Precise'' and above)
:*[[Ubuntu#Medibuntu|Medibuntu]] (replaced by Videolan)

* Update {{file|/etc/sudoers}}:
<source lang=bash>
sudo visudo
</source>
<source lang=diff>
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
+Defaults env_keep += "http_proxy https_proxy GREP_OPTIONS DISPLAY XAUTHORITY HOME"
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
#includedir /etc/sudoers.d
# Specific commands that do not require password
+ALL ALL = (ALL) NOPASSWD: /etc/privoxy/set-network-config
+ALL ALL = NOPASSWD: /usr/bin/truecrypt
+ALL ALL = NOPASSWD: /sbin/rfkill
</source>
* Install latest kernel [https://wiki.ubuntu.com/Kernel/LTSEnablementStack]
<source lang=bash>
# Get Utopic kernel
sudo apt-get install --install-recommends linux-generic-lts-utopic xserver-xorg-lts-utopic libgl1-mesa-glx-lts-utopic libegl1-mesa-drivers-lts-utopic
# Get Vivid kernel
# DO NOT UPDATE TO VIVID X.ORG - IT LEAKS LIKE HELL
# sudo apt-get install --install-recommends linux-generic-lts-vivid xserver-xorg-lts-vivid libgl1-mesa-glx-lts-vivid libegl1-mesa-drivers-lts-vivid
sudo apt-get install --install-recommends linux-generic-lts-vivid
</source>
* Install common applications
<source lang=bash>
# Common Applications
sudo apt-get install rpcbind # Use 'portmap' before oneiric ocelot
sudo apt-get install cifs-utils # Use 'smbfs' with precise pangolin or before
sudo apt-get install terminator smbclient nfs-kernel-server nfs-common \
autofs apt-file p7zip-full p7zip-rar dlocate thunderbird \
chromium-browser meld colordiff ttf-mscorefonts-installer \
qiv gthumb gnupg-agent renameutils wine mplayer \
mplayer-doc mplayer-fonts \
gnome-mplayer gecko-mediaplayer gimp gdmap gparted \
ubuntu-tweak \
app-install-data-medibuntu xbmc xsel \
compizconfig-settings-manager moreutils tmux \
indicator-multiload unity-tweak-tool libavcodec-extra-54 \
pepperflashplugin-nonfree compiz-plugins dconf-tools \
gnome-tweak-tool
# Discontinued: ubuntu-restricted-extras
# 14.04 Trusty: packages 'ubuntu-tweak', 'app-install-data-medibuntu',
# 'smbfs' missing
sudo apt-file update
sudo /usr/share/doc/libdvdread4/install-css.sh
# Optional essentials
sudo apt-get install nmap winbind libnss-winbind # winbind + libnss-winbind for NetBIOS name resolution
sudo vi /etc/nsswitch.conf # Add "wins" at the end of "hosts:" line
# Optional applications
sudo apt-get install gnugo qgo uligo cgoban quarry pgpgpg powertop
# Optional - Fix blue video in flash (see below for details)
sudo mkdir /etc/adobe
echo -e "EnableLinuxHWVideoDecode=1\nOverrideGPUValidation=true" | sudo tee /etc/adobe/mms.cfg > /dev/null
sudo etckeeper commit "Fix blue video bug in adobe flashplayer"
</source>
* Install fonts
:* '''[https://github.com/belluzj/fantasque-sans Fantasque Sans Mono]'''
<source lang=bash>
mkdir ~/.fonts
wget https://github.com/belluzj/fantasque-sans/releases/download/v1.7.1/FantasqueSansMono.tar.gz
tar xvzf FantasqueSansMono.tar.gz -C ~/.fonts/ --wildcards *.ttf
sudo fc-cache -fv
</source>
* Apply common settings (see below)
* Applications not from repositories:
** Panda glGo 1.4.1 (does not work on ''Oneiric 64-bit'')
* Install latest updates:
<source lang=bash>
sudo apt-get dist-upgrade
</source>

; Ubuntu 12.04
<source lang=bash>
sudo vi /etc/default/apport # Disable apport by setting "enabled=0"
sudo etckeeper commit "disable apport"
</source>

=== Common repositories ===
See install script above

=== Common Applications ===

{| class="install_simple_log"
|-
|'''Opera''' (<tt>opera</tt>)||See [[Opera]] to fix apt key issues
|-
|'''Firefox''' (<tt>firefox</tt>)||
* Set {{kb|Ctrl-Tab}} to show last tab. Browse to <code>about:config</code>, and set <code>browser.ctrlTab.previews</code> to <code>True</code>.
|-
|'''Synapse''' (<tt>synapse</tt>)||
Install with:
<source lang=bash>
sudo add-apt-repository ppa:synapse-core/ppa
sudo apt-get update && sudo apt-get install synapse
</source>
* Start ''synapse'' → ''Preferences'' → click '''Startup on login'''
* Still in preferences, set ''Activate shortcut'' to '''{{kb|Ctrl-Alt-Space}}'''
|-
|'''Git''' (<tt>git gitk git-gui git-doc gitweb git-svn</tt>)||<small>[2011-12-15]</small> {{red|Updated to 1.7.8}} [https://kiwi.noekeon.org/miki/index.php?title=Git#From_sources Installed from sources]
|-
|'''etckeeper''' (<tt>etckeeper</tt>)||Configured to use ''git'' as SCM, ''AVOID_DAILY_AUTOCOMMITS'', ''AVOID_COMMIT_BEFORE_INSTALL''
|-
|'''mDNS''' (<tt>libnss-mdns avahi-daemon mdns-scan</tt>)||After install, do:
<source lang=bash>
mdns-scan
</source>
Machine should broadcast its ip address on ''griffin.local'' to all avahi clients. For some strange reason, avahi may append a <tt>-2</tt> suffix to broadcast name. To avoid that, edit <tt>/etc/avahi/avahi-daemon.conf</tt> and set '''host-name''' variable:
<source lang=text>
host-name=griffin
</source>
|-
|'''Midnight Commander''' (<tt>mc</tt>)||See [[Midnight Commander|reference page]]. Use '''vi''' as standard viewer/editor. Installed version from mc official repository to fix file highlighting issue.
|-
|'''AutoSSH''' (<tt>autossh</tt>)||
|-
|'''SSH''' (<tt>ssh</tt>)||
* Create / restore private key:
ln -sf ../private/ssh/id_rsa_work ~/.ssh/id_rsa
* If using {{file|bin/ssh-agent-refresh.sh}}:
touch ~/.use_ssh_agent
|-
|'''Vim''' (<tt>vim vim-gnome exuberant-ctags</tt>)||including '''GVim''' to enable support of X clipboard
|-
|'''Vim/Cscope''' (<tt>cscope</tt>)||
|-
|'''Ruby''' (<tt>ruby</tt>)||... for Vim plug-in <tt>snipMate.vim</tt>
|-
|'''Gnome Terminator''' (<tt>terminator</tt>)||See [[Linux Software#Gnome Terminator|Gnome Terminator]] for tips.
* Set ''background'' to '''transparent 6%''' (through <tt>~/.config/terminator/config</tt>)
* Set ''scrollback'' to '''infinite scrollback'''
* Custom ''geometry'' <tt>terminator --geometry=1220x720+100+100</tt> (in application menu)
* Font ''Lucida Console, 9'' (on nxl67002ux / nxl67063ux), or ''Bitstream Vera Sans Mono Roman 9'' (on nxl67063 Cygwin-X).
* (not needed on trusty) Set <code>terminator</code> as default terminal for {{kb|Ctrl-Alt-T}} [http://askubuntu.com/questions/70540/how-can-i-set-default-terminal-used-in-unity]:
gsettings set org.gnome.desktop.default-applications.terminal exec 'terminator --geometry=1220x720+100+100'
|-
|'''Samba''' (<tt>smbclient cifs-utils</tt>)||
* Use package {{deb|smbfs}} for u1204 Precise Pangolin and before
|-
|'''NFS Server''' (<tt>nfs-kernel-server nfs-common rpcbind</tt>)||See [[NFS]] for more details; Created entries in <tt>/etc/exports</tt>. ''rpcbind'' replaces ''portmap'' since Oneiric.
|-
|'''AutoFS''' (<tt>autofs</tt>)||
* Mount '''mnemosyne''' shares as '''NFS autofs''' (see [https://help.ubuntu.com/community/Autofs]) and as '''SMB autofs'''
:Enabled/created the following automounters in <tt>/etc/auto.master</tt>:
/net /etc/auto.net --ghost
/smb/mnemosyne /etc/auto.smb.mnemosyne --ghost
/smb/lacie-cloudbox /etc/auto.smb.lacie-cloudbox --ghost
* Create configuration file '''<tt>/etc/auto.smb.mnemosyne</tt>'''
* Create SMB credential files '''<tt>/etc/auto.smb.mnemosyne.*</tt>''' (see <code>man mount.cifs</code>)
* <s>Created path for mount points:</s>
<s><source lang="bash">
sudo mkdir /net
sudo mkdir -p /smb/mnemosyne
# ls /net/mnemosyne
# sudo mkdir -p /mnt/mnemosyne
# for i in /net/mnemosyne/volume1/*; do sudo ln -s $i /mnt/mnemosyne/$(basename $i); done
</source></s>
* Or recover settings from an already configured host:
<source lang="bash">
scp griffin:tmp/autofs.tgz . # Configure autofs
sudo tar -xvzf autofs.tgz
sudo cp etc/* /etc
</source>
* If necessary, mount shares '''read-only''': add option <code>ro</code> in {{file|/etc/autofs.smb.mnemosyne}}
|-
|'''KeePassX''' (<tt>keepassx</tt>)||
* Set kbd layout to fix autotype bug ([https://bugs.launchpad.net/ubuntu/+source/keepassx/+bug/891048]). Create {{file|~/.xprofile}} and {{file|/etc/skel/.xprofile}} [https://wiki.archlinux.org/index.php/Xprofile]:
<source lang=bash>
#!/bin/sh

#
setxkbmap be
</source>
|-
|'''apt-file''' (<tt>apt-file</tt>)||
|-
|'''p7zip''' (<tt>p7zip-full p7zip-rar</tt>)||
|-
|'''dlocate''' (<tt>dlocate</tt>)||
|-
|'''Thunderbird''' (<tt>thunderbird</tt>)||
|-
|'''Google Chrome''' (<tt>chromium-browser</tt>)||
|-
|'''Meld''' (<tt>meld</tt>)||Diff tool
|-
|'''Color Diff''' (<tt>colordiff</tt>)||
|-
|'''MS Truetype core fonts''' (<tt>ttf-msttcorefonts-installer</tt>)||
|-
|'''Qiv''' (<tt>qiv</tt>)||
|-
|'''gThumb''' (<tt>gthumb</tt>)||
|-
|'''GPG''' (<tt>gpgv gnupg-agent pgpgpg</tt>)||
* Added <code>use-agent</code> at end of {{file|~/.gnupg/gpg.conf}}
* Edit {{file|~/.gnupg/gpg.conf}} as necessary.
|-
|'''Rename utils''' (<tt>renameutils</tt>)||
|-
|'''Wine''' (<tt>wine</tt>)||See [[Configuration NXP Dell Latitude_E6500 - Wine|Wine page]]
|-
|'''MPlayer''' (<tt>mplayer mplayer-doc mplayer-fonts</tt>)||
|-
|'''Flash Plugin 10''' (<tt>flashplugin-installer</tt>)||
* Enable Ubuntu partner repository if needed(<tt>deb http://archive.canonical.com/ubuntu lucid partner</tt>).
* In case of error <code>failure to download extra data files flashplugin-installer</code>, try
<source lang=bash>
sudo apt-get --reinstall install flashplugin-installer
</source>
(Old recipe:
<source lang="bash">sudo aptitude autoremove "flashplugin-*"
sudo aptitude install flashplugin-installer
</source>)
* '''{{red|broken}}'''&mdash; This is too unstable, see next solution &mdash; On Ubuntu 12.04 with NVidia card, there is a bug ''[http://askubuntu.com/questions/117127/flash-video-appears-blue Flash video appears blue]''. That link recommends to update ''libvdpau1'', but in my case it was already at the latest version. Instead the following did the trick (from [https://bugs.launchpad.net/ubuntu/+source/flashplugin-nonfree/+bug/968647 bug 968647]):
<source lang=bash>
sudo mkdir /etc/adobe
echo -e "EnableLinuxHWVideoDecode=1\nOverrideGPUValidation=true" | sudo tee /etc/adobe/mms.cfg > /dev/null
</source>
* Another solution is to disable ''hardware acceleration'', by going into flash player settings. If the settings window is not clickable, first disable unity 3D (for instance with <code>metacity --replace&</code>)
|-
|'''Quicktime plugin''' (<tt>gnome-mplayer gecko-mediaplayer</tt>)||To play Quicktime content in ''Opera'', ''Firefox''
|-
|'''Gimp''' (<tt>gimp</tt>)||
|-
|'''Graphical Disk Map''' (<tt>gdmap</tt>)||
|-
|'''gparted''' (<tt>gparted</tt>)||
|-
|'''Ubuntu restricted extras''' (<tt>ubuntu-restricted-extras</tt>)||shall install automatically '''libdvdread4'''
|-
|'''libdvdcss2'''||Installed via <code>sudo /usr/share/doc/libdvdread4/install-css.sh</code> (see also [https://help.ubuntu.com/community/RestrictedFormats/PlayingDVDs])
|-
|'''libavcodec-extra-54''' (<tt>libavcodec-extra-54</tt>)||
|-
|'''Ubuntu tweak''' (<tt>ubuntu-tweak</tt>)||see [[Ubuntu#Ubuntu Tweak|Ubuntu Tweak]]
|-
|{{gray|'''Medibuntu application center''' (<tt>app-install-data-medibuntu</tt>)}}||
* No longer available on u1404 Trusty Tahr
* {{gray|This install medibuntu apps in Ubuntu Application Center}}
|-
|'''XBMC''' (<tt>xbmc</tt>)||see [[XBMC#Install|XBMC]]
|-
|'''XSel''' (<tt>xsel</tt>)||
|-
|'''Compiz config settings manager''' (<tt>compizconfig-settings-manager</tt>)||
|-
|'''moreutils'''||For ''chronic'', ''sponge''
|-
|'''tmux''' (<tt>tmux</tt>)||Alternative to ''screen'', but with support for multiple panes like ''terminator''
|-
|'''CPU indicator''' (<tt>indicator-multiload</tt>)||Selected ''CPU'', ''Memory'', ''Network''
|-
|'''Unity tweak tool''' (<tt>unity-tweak-tool</tt>||
* Don't show desktop in switcher
* top right hot corner: ''Spread all windows''
|}

'''Optional Applications:'''

{| class="install_simple_log"
|-
|'''GNU Go''' (<tt>gnugo</tt>)||
|-
|Various '''Go''' games (<tt>qgo uligo cgoban</tt>)||
|-
|'''Quarry''' (<tt>quarry</tt>)||Board games Go, Amazons, and Reversi
|-
|'''PowerTop''' (<tt>powertop</tt>)||
|}

'''Applications not from repositories:'''

{| class="install_simple_log"
|-
|'''Panda glGo 1.4.1'''||See [[Linux Software#Panda glGo|local page]] &mdash; does not work on ''Oneiric 64-bit''
|}

'''Optional Essentials''':

{| class="install_simple_log"
|-
|'''nmap''' (<tt>nmap</tt>)||For use with my git ''prj'' script
|}

=== Common Settings ===
==== /etc/sudoers ====
* '''SUDO''' - keep environment variables:
** <code>http_proxy</code>, <code>https_proxy</code> (to keep proxy settings for apt-get etc)
** <code>GREP_OPTIONS</code> (keep grep options)
** <code>DISPLAY</code>, <code>XAUTHORITY</code> (avoid doing <code>xhost local:root</code> before launching X pgm)
** <code>HOME</code> (e.g. to keep git aliases and settings when using etckeeper)
** <code>PASSWD</code> (e.g. to pass password via env. var to <code>mount.cifs</code>)
{{pl2|1=<source lang=bash>
Defaults env_reset
Defaults env_keep += "http_proxy https_proxy GREP_OPTIONS DISPLAY XAUTHORITY HOME"
</source>}}
* '''SUDO''' - Allow <code>truecrypt</code> and <code>rfkill</code> w/o password:
{{pl2|1=<source lang=bash>
ALL ALL=NOPASSWD: /usr/bin/truecrypt
ALL ALL=NOPASSWD: /sbin/rfkill
</source>}}

==== Network ====
* '''Samba / NFS client''': Via ''autofs''

====Preferences====
* [[Ubuntu#Assign Ctrl-Alt-Del to Shutdown dialog|Use '''Ctrl-Alt-Delete''' for shutdown dialog]].

====Users====
<source lang=bash>
sudo useradd -s /bin/bash -m -u 1100 marie
sudo useradd -s /bin/bash -m -u 1200 isma
sudo useradd -s /bin/bash -m -u 1300 emma
sudo passwd marie
sudo passwd isma
sudo passwd emma
</source>

====X11====
* Custom keyboard mapping '''be''':
<source lang=bash>
# From my profile
sudo cp ~/etc/be /usr/share/X11/xkb/symbols/be
sudo rm /var/lib/xkb/*.xkm
setxkbmap us
setxkbmap be
</source>
* Use ''CapsLock'' as an extra ''Esc'' key (see [[X#Configuring_Layout_Options]])
gsettings get org.gnome.desktop.input-sources xkb-options
gsettings set org.gnome.desktop.input-sources xkb-options "@as ['caps:escape']"
* Fonts &mdash; disable ''embedded bitmaps''. See [[Fonts#MS Fonts not rendering correctly|Fonts]].

==== Miscellaneous ====
* Disable '''apport'''. Set <code>enabled=0</code> in <tt>/etc/default/apport</tt>

* Edit '''AppArmor tunables'''. If home directories are not located at ''/home'' (e.g. ''/data/home''), edit apparmor tunables. See [[Linux_Software#Evince|here for details]].

* Configure the console:
<source lang=bash>
dpkg-reconfigure console-setup
# utf-8 / latin1+latin5 / Terminus / 16
</source>

==== Workaround ====
* Install custom ''udisks'' package, version ''1.0.4-5ubuntu2.1fuu1'', to fix unreadable DVD-RW. See [[Linux_Admin#Udisks|udisks]], or [https://bugs.launchpad.net/ubuntu/+source/udisks/+bug/635499 bug 635499]).
sudo dpkg -i udisks_1.0.4-5ubuntu2.1fuu1_amd64.deb

* Add the following to {{file|~/.bash_profile}} and {{file|~/.profile}} to Meta-key ({{kb|Alt}}) not working and ''Midnight Commander'' displays <code>Press any key...</code> after each command when in ''tmux'' session [https://www.midnight-commander.org/ticket/2479]:
<source lang=bash>
# This fix meta-key support and stop mc displaying "Press any key..." in tmux session
if [ $TERM = "screen" ]; then
export TERM=xterm
fi
if [ -n "$TMUX" ]; then
export COLORTERM=rxvt
fi
</source>

==== Fonts ====
Antialiasing '''RGBA''', Hinting '''Slight''', Text scaling factor '''1.00'''.

{| class=wikitable
|-
!Application!!Font!!Selected font
|-
|Terminator
|Monospace font
|<code>Fantasque Sans Mono 9</code>
|-
|Gnome Terminal
|Monospace font
|<code>Fantasque Sans Mono 9</code>
|-
|Unity (desktop)
|Default font
|<code>Lucida Sans Regular 9</code>
|-
|Unity (desktop)
|Document font
|<code>Lucida Sans Regular 10</code>
|-
|Unity (desktop)
|Monospace font
|<code>Fantasque Sans Mono 10</code>
|-
|Unity (desktop)
|Windows title font
|<code>Lucida Sans Unicode Bold 10</code>
|}


== Common Issues ==
== Common Issues ==
Line 466: Line 9:


== Windows ==
== Windows ==
Moved to [[Configuration Common Windows]].

To be completed
To be completed

* Install [[CHM]] work-around.
* Set '''region locale''' to ''English (United States)'', and set date format to <code>yyyy-MM-dd</code> (some excel sheets depend on locale settings).


== Wine ==
== Wine ==

Latest revision as of 12:41, 9 July 2024

Any

To be completed

Linux

Moved to Configuration Common Linux.

Common Issues

See Common Issues.

Windows

Moved to Configuration Common Windows.

To be completed

  • Install CHM work-around.
  • Set region locale to English (United States), and set date format to yyyy-MM-dd (some excel sheets depend on locale settings).

Wine

Configuration

  • Configure CD-ROM reader for audio cd extraction (see Wine).
First insert a data CD, then run winecfg. In the popup, go to the drives tab, and click auto-detect.

Applications

Exact Audio Copy 1.0 b3 (eac-1.0beta3.exe)
cd ~/.wine/drive_c/Program\ Files\ \(x86\)/Exact\ Audio\ Copy/
regsvr32 sql*
  • FreedB name set to ABBA - Number Ones \ 03 Dancing Queen - ABBA
  • FLAC — set compression to -8