Skip to content

Instantly share code, notes, and snippets.

@halilim
Last active March 18, 2017 16:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halilim/7822447 to your computer and use it in GitHub Desktop.
Save halilim/7822447 to your computer and use it in GitHub Desktop.
Ubuntu 13.10 Install (Windows Dual Boot) - Some issues and how-to for installing

Notes

  • Replace “halil” with your username.
  • Work in progress.

GPU/Graphics Driver

Nvidia

sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-###

ATI

help.ubuntu.com/community/BinaryDriverHowto/ATI

Note: It looks like there is no working proprietary driver (either from a PPA or from ATI downloads) for Radeon HD 4xxx and lower.

Make bootable USB/CD

  1. Download Ubuntu ISO
  2. Write to USB with http://rufus.akeo.ie/ (Pen Drive Linux can be problematic)

Numlock on

sudo apt-get install numlockx
sudo nano /etc/lightdm/lightdm.conf

After the last line of [SeatDefaults]:

greeter-setup-script=/usr/bin/numlockx on

Backspace for folder up

http://askubuntu.com/questions/289535/bring-back-backspace-keyboard-shortcuts-on-nautilus-and-thunar

Don’t forget to remove ; from the beginning of the line ;) (i.e. uncomment it)

Fonts

Scheduled Jobs

apt: gnome-schedule

git

sudo apt-get install git

Open in terminal

sudo apt-get install nautilus-open-terminal
nautilus -q

wget/curl SSL errors

sudo perl -MCPAN -e 'install Bundle::LWP'

# http://chetanislazy.com/blog/2012/06/12/how-to-fix-wget-certificate-issues/
wget --no-check-certificate https://raw.github.com/bagder/curl/master/lib/mk-ca-bundle.pl
perl mk-ca-bundle.pl && rm certdata.txt
mkdir -p ~/.ssl/ && mv ca-bundle.crt mk-ca-bundle.pl ~/.ssl
echo "ca_certificate = /home/halil/.ssl/ca-bundle.crt" >> ~/.wgetrc
echo "export CURL_CA_BUNDLE=/home/halil/.ssl/ca-bundle.crt" >> ~/.profile
# Add "perl ~/.ssl/mk-ca-bundle.pl" to the weekly cron

Zsh, shell etc

https://github.com/sigurdga/gnome-terminal-colors-solarized

sudo apt-get install zsh
sudo chsh -s /bin/zsh
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh

heroku hk

$ sudo su

And then the command at https://hk.heroku.com/.

For auto-completion:

curl https://raw.githubusercontent.com/heroku/hk/master/contrib/hk-zsh-completion.sh > _hk \
  && sudo mv _hk /usr/local/share/zsh/site-functions

PhpStorm

  1. Install Oracle JDK: http://linuxg.net/how-to-install-oracle-java-jdk-678-on-ubuntu-13-04-12-10-12-04/
  2. Download PhpStorm from its website and follow instructions
  3. Licence key can be moved from an installation to another

composer

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

LAMP

Here we are supposing that our web server installation is not open to outside our machine (default by ufw) or we are protected by our router/modem. For a production install you need proper user permissions using SuExec, PHP-FPM etc.

https://help.ubuntu.com/community/ApacheMySQLPHP

sudo nano /etc/apache2/envvars
# Change user: www-data -> user: halil

grep -r -H "var/www" /etc/apache2
# Change /var/www -> /home/halil/public_html (symlink breaks DOCUMENT_ROOT - needs realpath())
#   Or /media/halil/Depo/_www for using the files in a NTFS mount (e.g. in a
#   dual boot setting). In this case group must be halil in envvars as well.
#   Not recommended since Apache processing files from an NTFS mount at each
#   request is quite a big performance problem. Just copy/move your code.

sudo a2enmod expires headers rewrite ssl
# apache2.conf:<Directory DOCROOT> change AllowOverride to All (for rewrite)

sudo a2ensite default-ssl
sudo apt-get install php5-curl php5-gd php5-intl php5-json php5-mcrypt
sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available

sudo nano /etc/php5/{apache2,cli}/php.ini
# date.timezone = "Europe/Istanbul"
# short_open_tag = On (not needed if you are sure that none of your code contains short open tags)
# display_errors = On

sudo service apache2 restart

Ruby/Rails

  1. Install prerequisites:

     sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev \
       libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libpq-dev
    
  2. If node.js is not already installed:

     sudo apt-get install nodejs
    

    If node is not available:

     sudo ln -s /usr/bin/nodejs /usr/bin/node
    
  3. rbenv-installer

    Add the required lines to .bashrc/.zshrc (normally rbenv-installer adds them automatically) and restart terminal.

    Install rbenv-bundler:

     git clone -- git://github.com/carsomyr/rbenv-bundler.git ~/.rbenv/plugins/rbenv-bundler
    
  4. Inside projects:

     rbenv install $(rbenv local) # Needs a ./.ruby-version file
     gem install bundler  # For the local Ruby version
     gem update --system  # SSL errors etc - http://stackoverflow.com/q/19470863/372654
     bundle install       # Or if using oh-my-zsh's bundler plugin, just "bi"
    

If postgresql (or pg gem) is needed:

  1. For Install PostgreSQL 9.3/latest on Ubuntu 12.04: https://gist.github.com/halilim/9936450 otherwise:

    1. http://www.postgresql.org/download/linux/ubuntu/ > PostgreSQL Apt Repository (use the latest available at http://apt.postgresql.org/pub/repos/apt/dists/)

    2. Add user/db: https://help.ubuntu.com/community/PostgreSQL

  2. Disable if you want to use only when needed:

    sudo update-rc.d postgresql disable
    sudo service postgresql stop
    

pg gem error in bundle install:

http://stackoverflow.com/a/14483745/372654

gem install error/hang-up

Gemfile.lock sometimes get stuck, so you may try to close your text editor.

Related:

Remove message icon in the panel

You may not want to do this if you are using Thunderbird etc (any app that makes use of message indicator).

sudo apt-get remove indicator-messages

Disable IPv6

http://www.noobslab.com/2012/05/disable-ipv6-if-your-internet-is.html

Installing shortcuts

http://askubuntu.com/questions/142159/desktop-shortcut-to-create-a-new-desktop-shortcut-doesnt-do-anything (Drag to panel if needed)

Codecs, Verdana font etc

App Center: ubuntu restricted extras

Auto mount

https://help.ubuntu.com/community/AutomaticallyMountPartitions

apt invalid .save extension

sudo nano /etc/apt/apt.conf.d/99ignoresave
# add "Dir::Ignore-Files-Silently:: "(.save)$";"

Equalizer

http://askubuntu.com/questions/72679/is-there-any-sound-enhancers-equalizer

SSD TRIM

http://www.webupd8.org/2013/01/enable-trim-on-ssd-solid-state-drives.html

Notifyosd notifications to show up on active monitor in multi-screen

http://www.webupd8.org/2012/10/get-ubuntu-notifyosd-notifications-to.html

Truecrypt

http://www.webupd8.org/2013/08/truecrypt-with-ubuntu-appindicator-ppa.html

Disable Keys

Install compizconfig-settings-manager > Advanced search > Keyboard search > Click the shortcut > Untick "enabled"

  • Alt+F7 (for PhpStorm "find usages")
  • Ctrl+Alt+S (for PhpStorm "settings")
  • Alt+F1 (for PhpStorm "quick help")
  • Ctrl+Alt(+Shift)+LEFT/RIGHT (for PhpStorm "Move caret to ...")

Don’t Send Locale over SSH

sudo nano /etc/ssh/ssh_config
# Comment out SendEnv LANG LC_*

http://askubuntu.com/a/144448/54899

Show Hidden Startup Applications

https://help.ubuntu.com/community/ShowHiddenStartupApplications

Storm SSH

https://github.com/emre/storm

sudo apt-get install python-appindicator
cd ~/.ssh && ln -s ~/Ubuntu\ One/ssh/config config
# Install https://github.com/emre/storm-indicator
ssh_list_indicator & disown
# Then add ssh_list_indicator to startup apps

Date-time indicator custom format

http://askubuntu.com/questions/41759/how-do-i-adjust-the-clock-indicator-format

My preference: %d.%m.%Y %a · %R (e.g. "13.12.2013 Cum · 15:23")

Cairo-dock

Official package in Ubuntu Apps might get problematic after some updates. Instead you can use:

sudo add-apt-repository ppa:cairo-dock-team/ppa
sudo apt-get update
sudo apt-get install cairo-dock

Auto-changing wallpapers

http://askubuntu.com/questions/297736/how-to-enable-auto-change-wallpaper-in-unity-in-ubuntu-13-04

Disable fade animation when changing wallpaper

http://askubuntu.com/a/379343/54899

Disable screensaver (fade) after session idle

dconf-editor: org.gnome.desktop.session.idle-delay = 0

SMPlayer floating control (progress) not shown outside fullscreen

Preferences > Interface > Floating Control > Display in compact mode too

mit-scheme

(e.g. for the Wizard Book)

  1. wget from an appropriate mirror: http://packages.debian.org/jessie/amd64/mit-scheme/download
  2. sudo dpkg -i mit-scheme*.deb

Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated.

mv -i ~/.fonts.conf ~/.config/fontconfig/fonts.conf

Problems related to non-English (e.g. Turkish) locale

Skype "bazen internet yavaş oluyor ve bir süreliğine duruyor." error

http://www.muratselcuk.com/linux-ve-skype-4-1-baglanti-sorunu/

No need to put LC_ALL=C into the shortcut, just start with it once

Skype indicator icon disappeared

sudo apt-get install sni-qt:i386

more

Chrome sync doesn't work

Run Chrome only once with (then as normal):

LC_ALL=C google-chrome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment