summaryrefslogtreecommitdiffstats
path: root/software/debian.page
blob: da874e0f4cd93571afe122fcc40f842fd0ad4b2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
---
format: rst
toc: no
...

===========================
Debian Linux
===========================

See also `freebsd </software/freebsd-tricks>`_ and 
`unix </software/unix-tricks>`_ tricks.

Some gotchas from installing debian a few times:

 * To enable sshd in ubuntu install ``openssh-server``

 * Massive ``ssh`` headache issues from around 2007-2008; make sure to check on
   these.

 * ``git`` is not what you want; you want ``git-core``

 * Python transition should be better, but I couldn't find a way. 
   To get to python 2.5 on etch, do something like::

    Edit /usr/share/python/debian_defaults to this Code:

        # the default python version
        default-version = python2.5
        # all supported python versions
        supported-versions = python2.4, python2.5
        # formerly supported python versions
        old-versions = python2.3
        # unsupported versions, including older versions
        unsupported-versions = python2.3

    Then sudo pycentral updatedefault python2.4 python2.5
    And change the symlink /usr/bin/python to point to python2.5

 * Make sure to install things like bzip2, unzip, less, etc

 * ``bash`` by default takes a very long time to initialize because the 
   auto-completion scripts are loaded multiple times; disable this in
   ``~/.bashrc``? See also [bash].

 * For building stuff you want ``build-essential``

 * For the usual system man pages ("Linux Programmer's Manual"), you may need
   to install 'manpages-dev'

 * To install emacs without an X environment, use ``emacs23-nox`` (or a more
   recent version).

 * To change time zone: ``sudo dpkg-reconfigure tzdata``

 * Might want oss-comapt for, eg, baudline?

 * If you're having trouble accessing USB-serial devices, try removing the
   `modemmanager` package. Also might need to `sudo insmod pl2303` for certain
   Prolific adapters because it's included as a module (not compiled in to
   kernel)


Debian Package Tools
------------------------------
``dkpg -S somefile`` shows what packages a given file were installed by. ``dpkg
-L somepackage`` lists all the files installed by that package. 

``apt-rdepends -r somepackage`` shows all packages depending on a given
package, recursively. You probably just want the first group, not the full
recursive tree.

To *not* install "recommended" or "suggested" packages, pass ``-R`` as an
argument to ``aptitute``. To find out *why* a package has been installed (or
guess why it might be?) use the ``aptitude why <package>`` command.

To extract the contents of a .deb file, use the ``ar`` command, then extract
data.tar.gz:

    ar vx somepackage.deb
    tar xvf data.tar.gz

Debian Packaging
-------------------

sudo aptitude install gcc-4.4-arm-linux-gnueabi

Wheezy to Jessie Migration
-----------------------------

Had trouble doing dist-upgrade. Ran `sudo apt-get install init` to fix init and
then continued with dist-upgrade.

Permissions problem with changing wifi settings ("(32) Not authorized to
control networking"). Tried:

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749778`


Add a Launchpad PPA
----------------------

First, deps:

    sudo apt-get install software-properties-common python-software-properties

Then:

    sudo add-apt-repository ppa:some/ppa

If it's an Ubuntu-only PPA, you'll need to edit the
`/etc/apt/sources.list.d/blah.list` and substitute the best Debian alternative.
Eg, for wheezy, 'trusty' is probably the closest.

Disk Full Error With Space Left (apt-get)
-------------------------------------------

If a system is configured for auto-updates, including kernel images, it's
possible to run out of inodes due to the huge number of kernel source files in
`/usr/src/`. This presents with apt-get failing with out-of-space errors:

    No apport report written because the error message indicates a disk full
    error

Check if this is the problem using `df -i`. Fix this by manually deleting some
of the header folders in /usr/src, then run `apt-get install -f` and `apt-get
autoremove`.

See also: http://mike.mcmurray.co.nz/2012/11/apport-disk-full-error-using-apt-get/

XFCE4 Keyboard Settings Broken Under Jessie: xfsettingsd
----------------------------------------------------------
I had a very strange problem after running a dist-upgrade with debian jessie.
This was on a laptop which was installed fresh with jessie while it was still
testing (around December 2014); I ran dist-upgrade in April 2015 around (or a
bit before) the official Jessie release.

After updating packages and rebooting, my XFCE4 application keyboard bindings
were broken (eg, Super+t for xterm). Other symptoms were that system fonts got
subjectively uglier. The weird thing was that windows manager bindings (eg,
Super+F11 to maximize vertically) still worked. I keep my XFCE4 settings under
version control, along with the rest of my dotfiles, so initially I assumed
there had been some backwards incompatible change... I also suspected that
maybe the window manager initiation process had changed. My old .xinitrc has
always needed small tweaks for new OS releases.

In the end, the problem seems to have been that ``xfsettingsd`` had crashed and
would not restart on new logins. Simply running this command from a terminal in
X11 once somehow magically fixed the problem, and ``xfsettingsd`` runs (with
corrected ``--sm-client-id`` arguments et al) on reboot, and my old keyboard
settings all work as expected.

I tried a number of smaller fixes (including wiping ``~/.cache/settings`` from
the console), so it may have been one of those changes that ultimately fixed
everything.

Persist Laptop Power Saving Flags
-----------------------------------

`powertop` helps identify system flags that need tuning (`sysfs`, `iw`, etc),
which are super helpful, but these tweaks don't persist through reboots.

You can automate setting *all* the `powertop` tunings at boot by adding
`powertop --auto-tune` to `/etc/rc.local` (and making sure `rc-local.service`
is configured under `systemd` if you are using that for init).

Alternatively, you could put just the flags you think are important in
`rc.local`, instead of applying them all, though this won't catch new flags
after upgrades.

See also: http://askubuntu.com/a/490401

Chromium Fonts
------------------

Surprisingly, this trick worked for me:
http://www.internalpointers.com/post/fixing-ugly-fonts-chrome-chromium-debian-xfce

More fonts:

    sudo apt-get install fonts-arphic-ukai fonts-arphic-uming fonts-ipafont-mincho fonts-ipafont-gothic fonts-unfonts-core

Big Fonts List
----------------

Eg, if trying to do general international stuff (PDFs from web or whatever),
might want all of:

    fonts-arphic-bkai00mp
    fonts-arphic-bsmi00lp
    fonts-arphic-gbsn00lp
    fonts-arphic-gkai00mp
    fonts-arphic-ukai
    fonts-arphic-uming
    fonts-farsiweb
    fonts-indic
    fonts-ipafont-gothic
    fonts-ipafont-mincho
    fonts-liberation
    fonts-lklug-sinhala
    fonts-nafees
    fonts-noto
    fonts-noto-cjk
    fonts-noto-mono
    fonts-noto-unhinted
    fonts-sil-abyssinica
    fonts-sil-ezra
    fonts-sil-padauk
    fonts-thai-tlwg
    fonts-unfonts-core
    fonts-unfonts-extra
    xfonts-100dpi
    xfonts-75dpi
    xfonts-base
    xfonts-cyrillic
    xfonts-scalable

Stretch Upgrade Notes
-----------------------

Was having problems with screen locking after updating, probably because
`xscreensaver` and `light-lock` were fighting.

Solved by:

    apt remove light-lock
    apt install lightdm

Also got rid of my old `.xinitrc` file, but not sure if that was related or
not.

Keyboard audio controls on my Thinkpad X1 running XFCE4 stopped working with
this release. The fix was to ensure `xfce4-pulseaudio-plugin` was installed
(seemed to be by default), and adding this plugin to the XFCE tray (make sure
you select the "Pulase Audio Plugin" one, not some generic volume controller
like `pasystray`). Buttons should Just Work then.