Org Wiki

Main Programming Platforms Projects Emacs Russian Quotes Old Lisa wiki


Table of Contents

1 LXDE

  • App obconf for setting number of (virtual) desktops
  • Stuff here works for both RPi and Debian

1.1 autostart application on login

Put .desktop file in ~/.config/autostart. Minimal Layout:

[Desktop Entry]
Type=Application
Name=Awesome App
#Path=/path/to/awesome_app                       # If required
Exec=/home/user/path/to/awesome_app/awesome_app  # Needs full path, no =~=

Can also be clicked on directly to start

Example:

[Desktop Entry]
Type=Application
Name=QTCreator
Exec=/home/wim/bin/Qt/Tools/QtCreator/bin/qtcreator.sh

See also 'autostart apps' under Linux

1.2 Automatic login

1.2.1 Old version

Autostart desktop with given user account Source

> sudo vi /etc/lightdm/lightdm.conf

Under section [SeatDefaults], add:

autologin-user=wim

Extra for RasPi:

> sudo vi /usr/bin/raspi-config

In do_boot_behaviour(), change given line to:

if id -u wim > /dev/null 2>&1; then

Reboot.

1.2.2 New version, works on debian 10

Source

Look up these lines in lightdm configuration file, uncomment them and customize to your preference.

[Seat:*]
#autologin-user=
#autologin-user-timeout=0

Also did following (Source, may not be necessary):

To activate autologin when lightdm is the display manager, open (as root) /etc/lightdm/lightdm.conf, uncomment (delete "#") and change the appropriate lines in "session-wrapper" to:

autologin-user=roger,
autologin-user-timeout=0.

1.3 Autostart applications

Source

Following for autostarting app's for all users:

> sudo vi /etc/xdg/lxsession/LXDE-pi/autostart

Add items to list, eg:

@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@lxterminal
@leafpad
@xscreensaver -no-splash@
  • here, lxterminal, leafpad, xscreensaver added
  • Not sure about meaning of @ prob run in background

2 Linux

2.1 Useful commands

2.1.1 Check distro version

> lsb_release -a

and

> cat /etc/issue

Debian:

> cat /etc/debian_release

Check 64-bit:

> uname -m
aarch64       # ARM 64-bit

2.1.2 Check exported symbols in shared library

> nm -D <so-name> | grep ' T '

Exported symbols have 'T', non-exported symbols have 't'

2.1.3 Check shared libraries used in binary

> ldd <prog_name>

2.1.4 Add existing user to existing group

> usermod -a -G video wim

Where `video` is a group

2.1.5 Check process limits

Max on system:

> sysctl kernel.pid_max  # or:
> cat /proc/sys/kernel/pid_max

Limit per user:

> ulimit -Su   # Also -Hu; this is a shell internal command

Threads limit per user:

> sysctl kernel.threads-max

Show current threads per user:

> ps -L -u ec2-user

2.1.6 CUPS

Port: localhost:631

Reset: sudo service cups restart

Disable authentication:

Change some things in your /etc/cups/cupsd.conf file:

  • Change the authentication type to "None".
  • Remove any lines that have "@SYSTEM" in it.
  • Restart the CUPS daemon.
2.1.6.1 Enable printer on command line

E.g.:

> sudo cupsenable DCPJ552DW

2.1.7 Remove files with given name recursively

> find -name .directory -delete

2.1.8 Record screen from the command line

Source

E.g.:

> ffmpeg -f x11grab -y -r 30 -s 1920x1080 -i :0.0 -vcodec huffyuv out.avi

2.2 Network

2.2.1 Find open ports

Source - more useful commands there

> netstat -lntu

or

> ss -lntu

2.2.2 Reset DHCP

> sudo dhclient -r eth0    # release current lease
> sudo dhclient -r eth0    # Obtain fresh IP (didn't need it on olivia)

2.2.3 Reset DNS

Following Does not work (any more) on latest debians Alternative: see restart network below

> sudo service bind9 restart    # also start|stop|status

2.2.4 Set static IP's locally on Debian/RPi

Source, for RPi - works also for debian, see 'RPi only!' comments

Steps after edit:

> sudo systemctl daemon-reload               # RPi only! Debian doesn't need this
> sudo touch /etc/resolv.conf                # Rpi only: Apparently required to reset DNS
> sudo /etc/init.d/networking restart
> sudo ip addr del 192.168.1.16/24 dev eth0  # RPi only: previous IP still present, remove it

HOWEVER: DHCP ip's keep on popping back. Obviously, I missed something (disable DNS?) but I can't be bothered to look further.

2.2.5 Fix network connection

  • Hack: enable then disable wifi
  • Check /etc/resolv.conf:
domain dynamic.ziggo.nl
search dynamic.ziggo.nl
nameserver 8.8.8.8
nameserver 8.8.4.4
2.2.5.1 reset default route

Symptoms:

  • local DNS works
  • local network machines accessible
  • anything outward going not working
  • ping 8.8.8.8 -> network is unreachable

Check:

> route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0

Is the destination properly set? On home network, should be: 192.168.1.1

Reset route:

> ip route add default via 192.168.1.1

All should be well now:

> ping google.com
PING google.com (216.58.211.110) 56(84) bytes of data.
64 bytes from ams15s32-in-f14.1e100.net (216.58.211.110): icmp_seq=1 ttl=54 time=9.57 ms
64 bytes from ams15s32-in-f14.1e100.net (216.58.211.110): icmp_seq=3 ttl=54 time=11.1 ms
...
2.2.5.2 Add name servers to network connection

NOTE: Not sure if this had any effect

> sudo vi /etc/network/interfaces

Notably, the dns-nameserver entries:

auto enp9s0:0
iface enp9s0:0 inet static
        name alias
        address 192.168.1.52
        netmask 255.255.255.0
        broadcast 192.168.1.255
        network 192.168.1.0
        dns-nameserver 192.168.1.1
        dns-nameserver 8.8.8.8
        dns-nameserver 8.8.4.4

2.3 Issues

2.3.1 fork: retry: Resource temporarily unavailable

Related: fork: retry: No child processes

  • Check file descriptors: lsof gives way too many files, not clear how to filter. Doesn't seem to be the problem, though
2.3.1.1 Check processes

source

Limits: cat /etc/security/limits.conf:

*               hard    nproc           16384
*               soft    nproc           4096

Count number of processes:

> ps aux | wc -l
3835

Seems close to the limit. On inspection, loads of the following:

wim      32469  0.0  0.0      0     0 ?        Z    04:32   0:00 [ruby] <defunct>
> ps aux | grep defunct | wc -l
3507

<defunct> processes die when the parent dies. Use ps -ef to show parent id's (PID).

The parent was Multislave running in debug mode; killing it removed all the <defunct> processes.

2.4 Xorg

2.4.1 setuid

Set `SUID` flag for Xorg binary.

When `startx` complains about not set. I.e. following happens:

...
Fatal server error:
(EE) xf86OpenConsole: VT_ACTIVATE failed: Operation not permitted
...
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
-------------------------------------------------------------------------------------------
xinit failed. /usr/bin/Xorg is not setuid, maybe that's the reason?

Solution:

> ls -l /usr/bin/Xorg
# expected permissions (note the s): '-rwsr-xr-x ...'
> chmod u+s /usr/bin/Xorg

2.4.2 Switch between console and graphics mode

Switch without stopping graphics:

  • CTRL-ALT-F2 - F1..F6 all good
  • CTRL-ALT-F7 - Back to graphics

Change the runlevel: Required for Xorg installs.

> sudo init 3    # stops graphics
> sudo init 5    # enables graphics

2.4.3 add user to group video (implied necessary)

> usermod -a -G video wim

2.4.4 Proprietary NVIDIA drivers

Howto: NVIDIA the hard way

  • Follow ALL instructions up to 'Then restart your computer'.
  • Follow all instructions installer throws at you, including interim restart.
  • Don't forget `mkinitrd'!
  • Needs to be redone on kernel update.

2.4.5 Of interest

  • Xpra - remote display server, allows (de)coupling) of apps to remote screens

3 RaspBerry Pi

3.1 Remember

  • Default login: user pi, pass raspberry
  • LED warning flash codes
  • Pi4's need more power and won't work with the power of previous pi's

Video

  • Some pi's don't start up when hdmi connected
  • pi4, however, must start with hdmi connected to enable video

3.1.1 Issues

  • Some pi's don't start any more
    • pascale (pi1) is totally bricked
    • zombie (pi2) keeps on restarting
    • Perhaps they can't deal with latest raspbian, try older version? (TODO)
  • Pi zero has different adapters for hdmi and power
    • Try remote setup with wifi (if possible)

3.1.2 TODO

  • Default file manager raspbian hangs. Find new one?
  • auto login to other user than `pi`
  • setup backup

3.2 Install image

3.3 Basic Install

  • Run sudo raspi-config, check all options (You know the drill)
    • pi password
    • hostname
    • enable SSH
    • Set Wifi country
    • Ensure region settings ok

3.3.1 User stuff

> sudo adduser wim 
> sudo usermod -aG sudo wim    # NB sudo for pi. Needs logout/login
> su - wim
> mkdir tmp

No sudo password Source

> sudo visudo

Add line at end:

username     ALL=(ALL) NOPASSWD:ALL

Change root password

  • After you added new use with root (paranoia)
  • Or disable root login entirely (TODO).

ssh

  • ssh-keygen
  • get public keys in order in all authorized_keys

3.3.2 Config and install apps

  • /etc/hosts, if necessary copy over existing from other machine, add current new one where necessary

Basic applications

Copy over:

> sudo apt-get install vim mc barrier ruby git vim-gtk locate
> sudo updatedb
  • .vimrc
  • .gitconfig
  • .git-credentials

Add new machine to backups

3.3.2.1 emacs

Copy over:

  • .emacs
  • .emacs.d
> sudo apt-get install emacs

3.3.3 Consider removing ms repo if present

See below

3.5 Removing MS Visual Repo

From Jeff Geerling:

  • sudo rm /etc/apt/sources.list.d/vscode.list
  • sudo rm /etc/apt/trusted.gpg.d/microsoft.gpg
  • sudo apt update

3.6 Overclocking the GPU

Jeff Geerling:

Also noting that you can overclock the GPU cores to 750 MHz (using gpu_freq=750 in /boot/config.txt—also set over_voltage=6), which would bring about 48 Gflop/s, right?

Add that line to config.txt and reboot.

I would also recommend either a good heatsink or any kind of fan to move air over the SoC after the overclock, as it will make it a little warmer and could lead to throttling if it hits 85°C.

3.7 Upgrades

3.7.1 Via config

> sudo raspi-config
  • Update firmware
  • Set memory split for video

3.7.2 Firmware:

Only do this if required!

> sudo rpi-update

Can also be done with the RPi config tool:

3.7.3 jessie -> stretch

link

NOTE: Takes a long time to complete, needs user interaction Best to reserve a day for this

3.8 Determining RPi version

Find Revision:

  • pinout
  • cat /proc/cpuinfo
  • use either of these, use table above to determine model

Find model directly

> cat /proc/device-tree/model

Example output (rianne):

Raspberry Pi 3 Model B Rev 1.2

3.9 Repair file system (corrupted sd card)

3.9.1 Check without repairing

> sudo fsck -n /

3.9.2 Perform repair

Broken Corrupted Raspberry Pi SD Card - extensive list of things to try

  • Main commands should also work on debian, will need init 1
  • Following worked on rianne but not on pascale
> sudo su -
> mount   # to determine disk to repair, eg. /dev/sda1
> mount -o ro,remount /dev/sda1
> fsck.ext3 /dev/sda1

3.10 Under-voltage detected

Forum discussion on this

Apparently an issue with model 3B+ (TODO confirm)

  • Has extra hardware for determining under-voltage
  • OS version (Stretch, possibly also later) doesn't support it properly

3.11 Useful actions

3.11.1 Overclock Pi

> sudo vi /boot/config.txt

Change section to following:

#uncomment to overclock the arm. 700MHz is the default
over_voltage=6   # Give little extra power
arm_freq=2000    # Max set frequency in MHz (may change dynamically due to temp throttling)
qpu_freq=750     # This is max, default 500MHz

Max Pi4:

arm_freq=2147

3.11.2 Pi4 (CM4) measure stuff

Pi3 needs `sudo` Clock frequencies variable, mostly due to throttling

> vcgencmd measure_clock arm   # Current clock frequency CPU
frequency(48)=750199232
> vcgencmd measure_clock core  # Current Clock frequency GPU
frequency(1)=333333984
> vcgencmd measure_temp
temp=47.0'C
> vcgencmd get_throttled       # Whether CPU throttled or not
throttled=0x0

Useful to combine with `watch`, eg:

> watch vcgencmd measure_clock arm   # Current clock frequency

3.11.3 Change locale

It's easier to do this via raspi-config

The regular method with dpkg-reconfugre doesn't work on RPi. Following forces the issue:

> sudo vi /etc/default/local
#  File generated by update-locale
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
LANGUAGE=en_US.UTF-8
  • Set all to same desired locale (done here already), UTF-8 preferred
  • works after restart
  • As commented, this file is actually generated somewhere

3.11.4 Backups of RPi SD cards

NOTE: This will not work if the SD cards aren't perfect to begin with! I.e. dd gives 'input/output error' and aborts

Source

Following are for linux.

> sudo fdisk -l                            # To determine mount of SD card, eg `/dev/sdb` or `/dev/mmcblk0`
> sudo lsblk                               # Alternative to determine mounts
> sudo dd if=/dev/sdb of=stored_image.img  # To copy image to workstation disk

To restore:

> sudo dd if=stored_image.img of=/dev/sdb

3.12 Bad SD cards - live with it

NOTE:

  • zombie SD card is bad (can't dd), still operational
  • pascale has issues with reading cards, perhaps bad hardware?
    • Clean RPi: vacuum cleaner, cotton buds
    • Try with completely new card

3.12.1 Intro

Unfortunately, this happens and not much can be done about it.

Two things here:

  1. RPi can damage SD cards, e.g. by bad voltage. The RPi1 I have seems prone to this
  2. SD cards just plain go bad eventually, notably by many writes creating bad sectors

Despite this, the SD cards can still function properly:

  1. 'Good' SD cards can circumvent bad blocks (internal OS)
  2. You might get plain lucky and not hit the bad sectors

Issue here is that copying images with `dd` fails.

Conclusion: if you don't have a good card to begin with, best is to reinstall it from scratch

  • Meaning, install must be made as painless as possible.
  • And make frequent backups!

3.12.2 RPi install overview

This is what I can remember from last, prob not complete and will be added to

3.12.2.1 Pre
  • Get latest image, install on new SD
  • Hook up monitor, keyboard, SD, start up Pi
3.12.2.2 Run raspi-config
  • set host name
  • change pi password
  • adduser wim
  • add wim to sudo
  • claim all SD space
  • US-UTF8 local, set generic keyboard
  • start sshd server
  • Update/upgrade to latest
  • restart
3.12.2.3 sudo apt-get install xxx
  • mc vim git slqite3 locate ruby
  • libgd-dev (perhaps also libpng)-tools # For energy app
  • gcc make # For ruby binary gems
  • apache2 php7.0 # See Docs

Apache extra:

  • php7.0-xml php7.0-mbstring # NB more needed
  • a2enmod rewrite
  • to restart: sudo systemctl restart apache2

Note: apache install is fickle, may need more work

3.12.2.4 Generate keys with ssh-keygen

Distribute as needed.

4 Debian

NOTE: Most stuff on Debian also works on RPi

4.1 Update

Normally:

> sudo apt-get update
> sudo apt-get upgrade

Raspbian recommended:

> sudo apt update
> sudo apt full-upgrade
  • This also updates the kernel and firmware

To include all held-back packages:

> sudo apt-get --with-new-pkgs upgrade

Check all is well:

> sudo dpkg -C
> sudo apt-mark showhold

Clean up:

> sudo apt-get autoremove
> sudo apt-get autoclean

Distro upgrade (also source for above):

4.2 Postfix install

Source: Postfix install

  • Don't use hostname of provider, this is internal: axizo-vps-2.cust.cj2.nl Instead, use hostname recognized by puclic DNS:

/etc/postfix/main.cf (axizo.nl is public DNS:

myhostname = axizo.nl
mydestination = $myhostname, axizo.nl, axizo-vps-2.cust.cj2.nl, localhost.cust.cj2.nl, , localhost
  • Hostname set tentatively with hostname, might not survive reboot. Better would be:
sudo hostnamectl set-hostname axizo.nl

… and reboot

  • After modifying main.cf, run service postfix reload.

4.2.1 Useful tools

  • empty mail to auth-results@verifier.port25.com

Still gives following error:

----------------------------------------------------------
"iprev" check details:
----------------------------------------------------------
Result:         fail (no matching DNS records found)
ID(s) verified: policy.iprev=185.103.18.96

DNS record(s):
    96.18.103.185.in-addr.arpa. 300 IN PTR axizo-vps-2.cust.cj2.nl.
    axizo-vps-2.cust.cj2.nl. A (NXDOMAIN)

This is weird, because this is the provider's internal domain name. It is not specified anywhere in the test mail.

4.2.2 Next steps

4.2.3 Set up DKIM

Required so to not have mail treated as spam in gmail

  • Howto
  • public key in DNS: Remove newlines and double quotes from public key

TODO verify

*NB:" Key type TEXT

I.e. Following public key:

mail._domainkey IN  TXT ( "v=DKIM1; h=sha256; k=rsa; "

: "p=MIIBIjA…t7mgj7A13tEBAs+V+" : "q8OW1D4Zb/iU6ypNTj…pKgU2wIDAQAB" ) ; –— DKIM key mail for axizo.nl

becomes in DNS record:

Key: mail._domainkey.axizo.nl

Value:  v=DKIM1; h=sha256; k=rsa; p=MIIBIjA...t7mgj7A13tEBAs+V+q8OW1D4Zb/iU6ypNTj...pKgU2wIDAQAB
  • Make keys readable:
> cd /etc/opendkim/keys
> sudo chmod o+r -R .
  • In /etc/opendkim.conf:
RequireSafeKeys false

Otherwise, error on send

  • Restart:
> sudo service opendkim restart

4.2.4 use MailDir for rainloop

(Using mailDir in postfix done in the flow)

sudo vi /etc/dovecot/conf.d/10-mail.conf:

mail_location = maildir:/home/%u/Maildir

Then:

> sudo service dovecot start

4.3 NFS share on usd disk

4.3.1 On server:

  • Get PARTUUID and partition type
> sudo blkid
/dev/sda1: LABEL="Seagate Expansion Drive" UUID="E060D35060D32C52" TYPE="ntfs" PTTYPE="atari" \
PARTUUID="86750c0c-01"
  • Add to fstab
> sudo vi /etc/fstab

Add (note path in /mnt, not /media:

PARTUUID=86750c0c-01 /mnt/extern ntfs    defaults,noatime  0       1
  • Add to exports
> sudo vi /etc/exports

Add (<ip>/24 is access specifier for clients):

/mnt/extern   192.168.2.0/24(rw,sync,no_subtree_check)
  • Then:
> sudo mount /mnt/extern
> sudo exports fs -ra                                     # restart nfs with new settings

4.3.2 On client:

> sudo mkdir -p /mnt/pi4-2/extern                         # ensure mount point exists
> sudo mount 192.168.2.126:/mnt/extern /mnt/pi4-2/extern  # ip of server

4.4 restart network

> sudo service networking restart

4.5 restart ssh server

confirmed to work on RPI:

> sudo /etc/init.d/ssh restart

alternative:

> sudo service ssh restart

4.6 Alias ip for given network connection

Source

Add an extra IP address to given card. Works, the advantage is no need to ignore/override ip assigned by router.

> sudo vi /etc/network/interfaces

Example (no eth0 on Stretch):

#IP Aliasing
auto eth0:0
iface eth0:0 inet static
  name Ethernet alias LAN card
  address 192.168.0.108
  netmask 255.255.255.0
  broadcast 192.168.0.255
  network 192.168.0.0

4.7 Installing GLMatrix

> apt-get install xscreensaver-gl

4.8 20181124 Olivia reinstall Debian

4.8.1 DONE now

4.8.2 Keep ssh session with blade alive

4.8.3 Fix open_dev.sh

4.8.4 Add auto startup

See files in ~/.config/autostart, use as template

  • synergyc (in .bashrc
  • emacs

4.8.5 first backup

4.8.6 Installs

4.8.6.1 TODO Reinstall
  • Redo dir node_modules (npm)
  • Vidyo.. (voor remote consult Lammers), note: .vidyo skipped
4.8.6.2 Perhaps
  • NVIDIA driver - redo from scratch
  • skype

4.8.7 With apt-get install

These installs were adequate for initial startup. Further installs not noted here.

locate    
mc    
tmux    
curl    
xdotool   Already present on Debian Stretch
emacs 24.5.1  
gcc 6.3.0  
gdb 7.12-6  
ruby 2.3.3.p222 (got gem and rdoc for free)
gnu make 4.1  
cmake 3.7.2  
doxygen 1.6.13  
python-pip -> pip 9.0.1  
nodejs 4.8.2  

For emacs pdf output (needs pdflatex=):

texlive-base  
texlive-latex-base for pdflatex
texlive-latex-extra > 1GB!

Installed, consider uninstalling:

  • gtk+3 (for meld - not working and removed)
4.8.7.1 Other (not apt-get)
4.8.7.2 nodejs + npm

Following as root:

> curl -sL http://deb.nodesource.com/setup_10.x | bash -  # 10.13 was latest stable
> apt-get install build-essential nodejs
> nodejs --version
> npm --version    # npm also installed now

When required, consider updating nodejs with npm:

4.8.7.3 docker

Following as root:

> wget https://download.docker.com/linux/debian/gpg
> ls
> apt-key add gpg
> rm gpg
> echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee -a /etc/apt/sources.list.d/docker.list
> apt-get update
> apt-cache policy docker-ce
> apt-get install docker-ce
> docker --version
4.8.7.4 printer

Model: DCP-J552DW

4.8.7.5 wifi
  • Check the wireless card:
> lspci -v | less   # then search for 'Wireless'

Result: Intel 3160

  • search online: iwlwifi supports it. Follow instructions there for =Debian 9 "Stretch"=
> vi /etc/apt/sources.list
  • add line: deb http://httpredir.debian.org/debian/ stretch main contrib non-free
> apt-get update
> apt-get install firmware-iwlwifi
> modprobe -r iwlwifi
> modprobe iwlwifi

4.8.8 Notes

  • Still have issue with starting route, should be 192.168.1.1, i.e. not 0 at end Same solution applies
  • sudo and wicd (!) needed restart to work
  • /etc/wpa_supplicant.conf not needed for wifi; only for connect on command line. Consider removing.
  • Not all stuff copied over from Downloads; backups still retained

4.9 Debian 10 on shanna

4.9.1 Add phpmyadmin

Why so difficult???

Sources - Here if not used below, prune

Assume sudo for all:

apt install php7.3
apt install php7.3-cli php7.3-common php7.3-curl php7.3-mbstring php7.3-mysql php7.3-xml
apt install mariadb-server
  • Follow instructions in this tutorial for download phpmyadmin
  • For setup mariadb, use instructions here.
  • Content /etc/apache2/conf-enabled/phpmyadmin.conf taken from this tutorial.
  • And then some missing magic needs to be added to this file:
<Directory /user/share/phpmyadmin>
...
   Order allow,deny
   Allow from all
</Directory>
  • Restart with: systemctl reload apache2

4.9.2 Copy databases

Source

Do not stop the mariadb service, as one tutorial said. mysqldump won't work otherwise.

sudo mysqldump -u root -p --all-databases > all_databases.sql

scp to other machine

sudo mysql -u root -p <  all_databases.sql

4.9.3 Ruby mariadb connection

5 Vivaldi

  • Toggle Chromeless Mode (App mode): CTRL-F11
  • Otherwise, show address bar: F8

6 Old

6.1 yum

6.1.1 update fails due to missing libstdc

On batch AWS instances:

> sudo yum update

Resulted in:

Error: Package: libstdc++-devel-4.8.3-3.20.amzn1.noarch (@amzn-main)
           Requires: libstdc++48-devel = 4.8.3
           Removing: libstdc++48-devel-4.8.3-9.109.amzn1.x86_64 (@amzn-main)
               libstdc++48-devel = 4.8.3-9.109.amzn1
           Obsoleted By: gcc48-c++-4.8.5-28.142.amzn1.x86_64 (amzn-updates)
               libstdc++48-devel = 4.8.5-28.142.amzn1
           Available: gcc48-c++-4.8.5-11.135.amzn1.x86_64 (amzn-main)
               libstdc++48-devel = 4.8.5-11.135.amzn1
           Removing: gcc48-c++-4.8.3-9.109.amzn1.x86_64 (@amzn-main)
               Not found
           Updated By: gcc48-c++-4.8.5-28.142.amzn1.x86_64 (amzn-updates)
               libstdc++48-devel = 4.8.5-28.142.amzn1
Error: Package: libstdc++-devel-4.8.3-3.20.amzn1.noarch (@amzn-main)
           Requires: libstdc++48 = 4.8.3
           Removing: libstdc++48-4.8.3-9.109.amzn1.x86_64 (@amzn-main)
               libstdc++48 = 4.8.3-9.109.amzn1
           Updated By: libstdc++48-4.8.5-28.142.amzn1.x86_64 (amzn-updates)
               libstdc++48 = 4.8.5-28.142.amzn1
           Available: libstdc++48-4.8.5-11.135.amzn1.i686 (amzn-main)
               libstdc++48 = 4.8.5-11.135.amzn1
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Resolved like this:

> sudo rpm -e libstdc++-devel-4.8.3-3.20.amzn1.noarch
  • -e for 'erase'
  • And redo sudo yum update

6.1.2 TODO (perhaps). Check that gcc still works on AWS instances, and also compiled programs

6.2 OpenSUSE

6.2.1 Reset DNS cache

> sudo rcnscd restart

6.2.2 Fix DNS

Olivia: via yast, DNS not working. Did following out of desperation:

> vi /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4

After that, went OK (causal? There was no restart of anything required)

6.2.3 Find which package a missing executable belongs to

On local machine:

> cnf <exe-name>

6.2.4 Find package a missing file belongs to

Using zypper:

> sudo zypper wp <name>

6.2.5 Find a package containing uninstalled file

> sudo zypper se --provides --match-exact <filename>

6.2.6 Manually delete trash

> cd ~/.local/share/Trash
> rm -rf files
> rm -rf info

6.2.7 Install pdflatex fully

texlive is bloody huge (~1GB); installing the full thing anyway

> sudo zypper in texlive
> sudo zypper in texlive-wrapfig

…and FINALLY it works

Also did this before:

> sudo zypper in texlive-latex-bin-bin
> sudo zypper install texlive-pdftex-bin
> sudo zypper install texconfig-bin

…but this didn't result in a working configuration

6.2.8 Logs

6.2.8.1 System update for using NVIDIA drivers

Following done to upgrade from LEAP 42.1 to 42.2 (After botched attempt to install nvidia drivers)

All `sudo`

> zypper ref(resh) > zypper up(date) # Repeat until completely up to date

Too many NOT installed here, repait repo's with yast2

In Yast2

  • either add following repo's for 42.2 and disable (for now) for 42.1:
  • or edit URL to contain `42.2`
Main Repository (OSS) ../42.1`repo/oss
Main Update ../42.1/oss
Main Repository (OSS) ../42.1/repo/non-oss
Update Repository (NON-OSS) ../42.1/non-oss
packman  
games  
X11:windowmanagers  
devel:languages:haskell  
devel:languages:pascal No 42.2 version!
openSUSE-leap/42.1-Debug  
openSUSE-leap/42.1-Update-Debug  

Do Online Update - twice. thrice

  • Skip all patches
  • nvidia-gfxG04 ignore dependencies

Redo: > zypper ref # Up to date > zypper up # Grumbl still picks new stuff up

Still not good

In yast2, remove all nvidia G04 packages, replace with G03 (automatic selected)

Still not good

In yast2, remove ALL nvidia packages (needs two attempts) install following guid 'NVIDIA the hard way'. Results is better; Raft crashes now on startup.

Next attempt:

> sudo zupper dup

  • Upgrades distro, aborted due to mount full (not primary)

Note: For nvidia mportant that video BIOS setting not 'UMA', otherwise nvidia card can't even be seen Choose the other option 'dynamic switching' or suchlike.

Did a whole lot of stuff here, none of it works. Reverted to nouveau drivers. All sudo:

> sh NVIDIA-Linux-x86_64-375.26.run –uninstall > vi /etc/modprobe.d/50-blacklist.conf # Remove `blacklist nouveau` > vi/etc/X11/xorg.conf # Ensure nvidia completely removed > shutdown -r now

Works. Fokkit what a waste of two days.

6.2.8.2 Install Canon printer

In my case: Canon MG5250 (Pixma) My OS: openSUSE v 13.2 (64-bits).

Good Source - Is actually for Ubuntu, but also largely applicable to openSUSE.

  1. Get the drivers from Canon
    • Go to the Canon Europe website
    • Search for MG5250
    • Click on 'Support'
    • in filters, Select 'Linux' and 'English'
    • Ignore the scanner driver, you don't really need it
    • Click DOWNLOAD next to 'Linux IJ Printer Driver'.
    • Accept the License Agreement (sigh)

    Eventually the following file is downloaded: MG5200series-printer_driver.tar

  2. Installing the drivers

    Do this as sudo on the command line.

    • Unzip MG5200series-printer_driver.tar; this will give you a similarly named directory
    • cd MG5200series-printer_driver
    • unzip cnijfilter-mg5200series-3.40-1-rpm.tar.gz
    • cd into the similarly named directory
    • Ignore install.sh. It is useless.
    • cd packages
    • Following should go fine:
    > zypper install cnijfilter-common-3.40-1.x86_64.rpm
    
    • The other rpm requires tiff3, while tiff5 is installed. So we need to install it.
    • Browse to here and click on openSUSE 13.2
    • This should start up YAST automatically (on firefox that is)
    • Accept all warning about earlier versions, select other dependent packages when prompted. The install goes fine.
    • Nice to note: the original tiff5 library is still there.
    • Now, finally:
    > zypper install cnijfilter-mg5200series-3.40-1.i386.rpm
    
  3. Install the printer
    • Detect the printer - also functions as a test on correct install.

      > cnijnetprn --search auto
      

    In my case this gives:

    network cnijnet:/00-1E-8F-A7-35-6C "Canon MG5200 series" "Canon-MG5200-series_00-1E-8F-A7-35-6C"
    
    • Add the printer to the printer list. Note the information taken from the previous line:

      > sudo /usr/sbin/lpadmin -p canonmg5200 -m canonmg5200.ppd -v cnijnet:/00-1E-8F-A7-35-6C
      
    • Almost there; there's one thing that drove me nutty at the end:
      • Open the KDE System Settings, select Printer. The new printer should be displayed.
      • Uncheck 'Reject print jobs'
      • Finally, you can print a test page from here. It should Just Work^TM'

6.3 Synergy

6.3.1 When key appears to be blocked

Source

"Try clicking both the left side and right side CTRL keys at the same time."

6.3.2 Reset keyboard

For when keys and/or mouse start acting funny.

In remote desktop type in shell:

setxkbmap

This is not actually meant for keyboard reset, but reset occurs as side effect.

6.4 Install VidyoDesktop

For beeldconsult Lammers

Following steps done all sudo):

  • zypper install VidyoDesktopInstaller-sl564-TAG_VD_3_6_3_017.rpm # Chose 'install without dependencies'
  • `LibXscrnSaver` From Opensuse with YaSR 1-Click # Install partial success
  • zypper in libXss1 # Only this needed according to forums
  • zypper in zenity # Needed by startup script

7 Convert flv to mp4 with ffmpeg

Source

> ffmpeg -i input.flv output.mp4

Footnotes:

1

This is accidentally a footnote link in org mode. I actually meant 'either 1 or 2'

Author: Wim Rijnders

Created: 2024-02-06 Tue 15:43

Validate