Hints, Tips, and Tricks

This list is currently in no particular order. It's mostly to help me remember how I did things. If you find it useful please let me know, and I may put more of my secrets here as I remember them.

Google Earth

Problem: Google Earth fonts don't look right, and clicking on interesting squares displays a box with badly rendered fonts and no images.

Solution: This works in Slackware64-13.0, but not quite in 13.1 (fails on libsqlite.so, but solving that Google Earth then doesn't render right).

Assumptions: 32-bit system or 64-bit system with 32-bit multilib support, such as Alien Bob's is installed, and Google Earth is installed to the default location in the current user's directory.

  1. The following libraries run in the place of installed distribution libraries and don't recognize system fonts, so get rid of them so Google Earth will use our system libraries instead:
    cd ~/google-earth
    rm libGLU.so.1
    rm libQtCore.so.4
    rm libQtGui.so.4
    rm libQtNetwork.so.4
    rm libQtWebKit.so.4
    rm libcurl.so.4
    
  2. The following libraries just don't work right, so replace them with symlinks to our system libraries instead:
    cd ~/google-earth/plugins/imageformats
    rm libqgif.so
    rm libqjpeg.so
    ln -s /usr/lib/qt/plugins/imageformats/libqgif.so libqgif.so
    ln -s /usr/lib/qt/plugins/imageformats/libqjpeg.so libqjpeg.so
    
That's it!

Google Chrome

Problem: Google Chrome doesn't run in Slackware because it's looking for libraries with goofy Ubuntu names.

Solution: This works in Slackware64-13.0 and 13.1.

  1. Chrome doesn't come in the Slackware native format, so you have two choices: use rpm with --nodeps, or convert the rpm to a tgz package then install that. Life will be a little easier if we do the two-step from the directory where the file was downloaded:
    rpm2tgz google-chrome-stable_current_x86_64.rpm
    installpkg google-chrome-stable_current_x86_64.tgz
    
  2. The following libraries needed by Chrome are also used by Firefox. The names are just a little different. Also, Chrome runs from a wrapper script which adds the directory in which it is installed in the LD_LIBRARY_PATH environment variable, so it's easiest just to copy them there (use your version of firefox here):
    cd /usr/lib64/firefox
    cp libnss3.so /opt/google/chrome/libnss3.so.1d
    cp libnssutil3.so /opt/google/chrome/libnssutil3.so.1d
    cp libsmime3.so /opt/google/chrome/libsmime3.so.1d
    cp libssl3.so /opt/google/chrome/libssl3.so.1d
    cp libplds4.so /opt/google/chrome/libplds4.so.0d
    cp libplc4.so /opt/google/chrome/libplc4.so.0d
    cp libnspr4.so /opt/google/chrome/libnspr4.so.0d
    
  3. The last ugly bit is that since Chrome is built for distributions which have Gnome and Slackware does not, two more libraries will be needed: ORBit and gconf2. There are a lot of different ways to get these. I used the Debian sid packages (your version numbers may vary):
    ar p libgconf2-4_2.22.0-1_amd64.deb data.tar.gz|tar xzOf - ./usr/lib/libgconf-2.so.4.1.5 > /usr/local/lib64/libgconf-2.so.4
    ar p liborbit2_2.14.13-0.1_amd64.deb data.tar.gz|tar xzOf - ./usr/lib/libORBit-2.so.0.1.0 > /usr/local/lib64/libgconf-2.so.4
    
    You may need to add /usr/local/lib64 to your /etc/ld.so.conf and run ldconfig. There may be rpms from Fedora or packages from Dropline Gnome that may work as well.
That's it!

Unsupported keyboard keys in X

Problem: A keyboard with all sorts of extra special internet or multimedia keys doesn't work right in X.

Solution: Use setkeycodes to get X and KDE to recognize the keys.

Assumptions: This works for an SK-6200 keyboard, and has not been tested for any others.

  1. For some reason, even if you know the keycode you want generated, setting the keycode during bootup doesn't work, because X has different keycodes than the console. So, we trick the system by giving the console a "reverse-mapped" keycode, that when X sees it, will map that number to the number you actually want. Find the keycode you actually want in the following list, then read the "reverse-mapped" number next to it. We'll use that to set the correct key values.
    9       1
    10      2
    11      3
    12      4
    13      5
    14      6
    15      7
    16      8
    17      9
    18      10
    19      11
    20      12
    21      13
    22      14
    23      15
    24      16
    25      17
    26      18
    27      19
    28      20
    29      21
    30      22
    31      23
    32      24
    33      25
    34      26
    35      27
    36      28
    37      29
    38      30
    39      31
    40      32
    41      33
    42      34
    43      35
    44      36
    45      37
    46      38
    47      39
    48      40
    49      41
    50      42
    51      43
    52      44
    53      45
    54      46
    55      47
    56      48
    57      49
    58      50
    59      51
    60      52
    61      53
    62      54
    63      55
    64      56
    65      57
    66      58
    67      59
    68      60
    69      61
    70      62
    71      63
    72      64
    73      65
    74      66
    75      67
    76      68
    76      70
    77      69
    79      71
    80      72
    81      73
    82      74
    83      75
    84      76
    85      77
    86      78
    87      79
    88      80
    89      81
    90      82
    91      83
    93      186
    94      86
    95      87
    96      88
    97      102
    98      103
    99      104
    100     105
    101     224
    102     106
    103     107
    104     108
    105     109
    106     110
    107     111
    108     96
    109     97
    110     119
    111     84
    111     99
    112     98
    113     100
    115     125
    116     126
    117     127
    118     213
    119     214
    120     215
    121     216
    122     136
    123     118
    126     95
    127     91
    128     90
    129     171
    129     92
    130     172
    131     94
    132     189
    133     124
    133     129
    134     121
    134     130
    135     131
    136     176
    137     181
    138     182
    139     120
    140     132
    142     233
    143     178
    144     165
    146     152
    147     147
    148     222
    149     195
    150     196
    151     149
    152     168
    153     163
    154     197
    155     198
    157     117
    158     139
    159     148
    160     113
    161     140
    162     164
    163     160
    164     166
    165     205
    166     154
    167     199
    168     200
    169     201
    170     190
    171     202
    172     203
    173     204
    174     114
    175     206
    176     115
    177     167
    178     150
    179     207
    180     208
    181     101
    182     183
    183     184
    184     185
    184     187
    185     210
    186     211
    187     212
    188     137
    190     169
    191     134
    192     135
    193     141
    194     218
    195     219
    196     220
    197     221
    198     144
    199     145
    200     146
    201     151
    202     223
    203     153
    204     161
    205     193
    207     194
    208     170
    208     93
    209     122
    209     174
    210     123
    210     175
    211     89
    212     225
    213     234
    214     227
    215     228
    216     229
    217     230
    218     231
    219     191
    220     177
    221     85
    222     116
    223     142
    227     143
    228     232
    229     217
    230     156
    231     173
    232     128
    233     159
    234     158
    235     157
    236     155
    237     226
    239     112
    240     235
    241     236
    242     237
    243     238
    244     239
    245     138
    246     179
    247     188
    248     133
    249     192
    251     180
    253     162
    
  2. Use showkey to show the scan codes for the keys we want to assign. The keys which are unassigned will be listed in /var/log/syslog like this:
    atkbd.c: Unknown key pressed (translated set 2, code 0xa3 on isa0060/serio0).                                                                                     
    atkbd.c: Use 'setkeycodes e023 ' to make it known.                                                                                                       
    atkbd.c: Unknown key released (translated set 2, code 0xa3 on isa0060/serio0).                                                                                    
    atkbd.c: Use 'setkeycodes e023 ' to make it known.                                                                                                       
    atkbd.c: Unknown key pressed (translated set 2, code 0x96 on isa0060/serio0).                                                                                     
    atkbd.c: Use 'setkeycodes e016 ' to make it known.                                                                                                       
    atkbd.c: Unknown key released (translated set 2, code 0x96 on isa0060/serio0).                                                                                    
    atkbd.c: Use 'setkeycodes e016 ' to make it known.                                                                                                       
    atkbd.c: Unknown key pressed (translated set 2, code 0x94 on isa0060/serio0).
    atkbd.c: Use 'setkeycodes e014 ' to make it known.
    atkbd.c: Unknown key released (translated set 2, code 0x94 on isa0060/serio0).
    atkbd.c: Use 'setkeycodes e014 ' to make it known.
    atkbd.c: Unknown key pressed (translated set 2, code 0x9e on isa0060/serio0).
    atkbd.c: Use 'setkeycodes e01e ' to make it known.
    atkbd.c: Unknown key released (translated set 2, code 0x9e on isa0060/serio0).
    atkbd.c: Use 'setkeycodes e01e ' to make it known.
    atkbd.c: Unknown key pressed (translated set 2, code 0x92 on isa0060/serio0).
    atkbd.c: Use 'setkeycodes e012 ' to make it known.
    atkbd.c: Unknown key released (translated set 2, code 0x92 on isa0060/serio0).
    atkbd.c: Use 'setkeycodes e012 ' to make it known.
    atkbd.c: Unknown key pressed (translated set 2, code 0x97 on isa0060/serio0).
    atkbd.c: Use 'setkeycodes e017 ' to make it known.
    atkbd.c: Unknown key released (translated set 2, code 0x97 on isa0060/serio0).
    atkbd.c: Use 'setkeycodes e017 ' to make it known.
    
  3. Set the key values in rc.local or other boot script:
    # SK6200
    # use "reverse-converted" codes so kernel to X translation will give correct codes
    # previous 160->163
    /usr/bin/setkeycodes e023 160
    # volume up 196->150
    /usr/bin/setkeycodes e016 196
    # volume down 222->148
    /usr/bin/setkeycodes e014 222
    # WWW 139->158
    /usr/bin/setkeycodes e01e 139
    # favorites 152->146
    /usr/bin/setkeycodes e012 152
    # back 149->151
    /usr/bin/setkeycodes e017 149
    
  4. Restart X, and use showkey to verify the results.
That's it!