Debian

Debian is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run.

All packages list

http://packages.debian.org/stable/allpackages

Sample service blah

File in /etc/init.d/blah with chmod 755:

   1 #! /bin/sh
   2 # /etc/init.d/blah
   3 #
   4 
   5 # Some things that run always
   6 touch /var/lock/blah
   7 
   8 # Carry out specific functions when asked to by the system
   9 case "$1" in
  10   start)
  11     echo "Starting script blah "
  12     echo "Could do more here"
  13     ;;
  14   stop)
  15     echo "Stopping script blah"
  16     echo "Could do more here"
  17     ;;
  18   *)
  19     echo "Usage: /etc/init.d/blah {start|stop}"
  20     exit 1
  21     ;;
  22 esac
  23 
  24 exit 0

Add service

Remove service

Check services status

Install Debian Wheezy 32 bit

Base Install DW (Debian Wheezy)

In Virtualbox

Installation Debian 7.5.0 amd64 (Wheezy)

Fetch and burn the ISO

Install

Install extra packages

Eclipse

Two monitors with digital output

Enable multiarch and install Skype

Resize /home folder

Debian 8.6.0 (Jessie)

VMDebian
Linux
Debian 64 bit
4096MB
VDI type
dynamic allocation
16 GB
create
debian-8.6.0-amd64-DVD-1.iso
install
english
location other europe Portugal
default local en_us.UTF8
keyboard portuguese
hostname debian
domain name <empty>
root pass 
new user vitor
clock Lisbon
Partition, guided user entire disk LVM
scsi(0,0,0) sda
all in one partition
write
change yes
Finish partitioning
scan other cd dvd no
use net mirrors yes portugal ftp.pt.debian.org
package survey no
software to install desktop kde lxde ssh web server print server standard utils displaymanager kdm 
install grub in MBR yes /dev/sda
Finish installation continue

VBoxManage setextradata "VMDebian" "CustomVideoMode1" "1366x768x32"
Use 2 cpu cores in the VM
run guest additions 

/etc/apt/sources.list
# sid 
deb http://ftp.pt.debian.org/debian/ sid  main contrib
deb-src http://ftp.pt.debian.org/debian/ sid main contrib
apt-get update

Install debian 10 - buster on external HDD with USB adapter

ap_scan=1
ctrl_interface=/var/run/wpa_supplicant
network={
  ssid="?????????"
  scan_ssid=1
  proto=RSN WPA
  key_mgmt=WPA-PSK
  group=CCMP TKIP
  pairwise=CCMP TKIP
  psk="???????"
}

deb http://ftp.pt.debian.org/debian/ buster main contrib non-free
deb-src http://ftp.pt.debian.org/debian/ buster main contrib non-free

cd /boot/efi/EFI/
mv BOOT BOOT_bak
cp -R debian BOOT
cd BOOT
mv shimx64.efi bootx64.efi

Debian 10 (Buster) in VirtualBox VM

   1 wget https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-10.1.0-amd64-standard.iso
   2 run virtualbox 
   3 new vm
   4 name Debian buster type linux, version debian 64 bit
   5 ram 4096 GB
   6 create virtual vdi 16GB dynamically allocated
   7 settings storage, ide, choose virtual optical drive, attach iso debian-live-10.1.0-amd64-standard.iso to VM
   8 start VM
   9 choose debian installer 
  10 language: english
  11 country other, europe, portugal, default locale en_us
  12 keyboard portuguese
  13 hostname debian
  14 domain name ""
  15 root pass: 
  16 new user: vitor
  17 username: vitor
  18 pwd: 
  19 configure clock: Lisbon
  20 partition disks: guided - use entire disk and set up LVM
  21 use scsi3, sda
  22 all files in one partition
  23 write changes and configure lvm: yes
  24 volume group to use for guided partition: 16.9 GB
  25 write changes to disk: yes
  26 use network mirror: yes, portugal, deb.debian.org
  27 proxy info: blank
  28 install grub2 in MBR: yes
  29 install in /dev/sda
  30 install complete, continue
  31 reboot
  32 choose debian gnu/linux
  33 login with root:toor
  34 apt update
  35 apt install xorg wmaker xterm lightdm firefox-esr htop wmclockmon vim  docker.io  
  36 /sbin/usermod -a vitor -G docker
  37 service lightdm start
  38 Inside /etc/lightdm/lightdm.conf in [Seat:*] 
  39 add display-setup-script=setxkbmap pt 
  40 add greeter-setup-script=setxkbmap pt 
  41 add session-setup-script=setxkbmap pt
  42 
  43 [LightDM] 
  44 add display-setup-script=setxkbmap pt 
  45 add greeter-setup-script=setxkbmap pt 
  46 add session-setup-script=setxkbmap pt
  47 
  48 In ~/.xsessionrc add
  49 /usr/bin/setxkbmap pt &
  50 /usr/bin/xterm &
  51 
  52 Devices, insert guest additions cd image
  53 mount /dev/cdrom /mnt
  54 cd /mnt
  55 ./VBoxLinuxAdditions.run 
  56 # window maker
  57 workspace, appearance, background, styles, green
  58 workspace, appearance, background, solid, black
  59 workspace, appearance, save theme, MyTheme
  60 
  61 
  62 https://wiki.debian.org/Keyboard#How_to_switch_a_keyboard_layout_in_X11_.2F_graphical_desktop_environment
  63  The keyboard setup dialog in GNOME 3 will modify IBus's configuration directly, but for users of other X environments, 
  64 you can use the ibus-setup command to modify the settings for IBus. To force it to defer to the settings 
  65 from /etc/default/keyboard, run ibus-setup, go to the Advanced tab, and check Use system keyboard layout. 
  66 ibus-setup
  67 input method
  68 add portuguese
  69 
  70 cd C:\Program Files\Oracle\VirtualBox
  71 VBoxManage setextradata "Debian buster" "CustomVideoMode1" "1366x768x32" 
  72 
  73 xrandr --output Virtual1 --mode 1360x768
  74 
  75 vitor@debian:~$ cat .xsessionrc
  76 /usr/bin/setxkbmap pt&
  77 /usr/bin/xterm &
  78 xrandr --output Virtual1 --mode 1360x768 &
  79 
  80 ####
  81 get jdk8 from https://adoptopenjdk.net/
  82 
  83 apt install net-tools openssh-server ntp ntpsec-ntpdate
  84 add host port 2222 to vm guest port 22
  85 /sbin/usermod -a vitor -G vboxfs # shared folder virtualbox
  86 
  87 wget https://archive.eclipse.org/technology/epp/downloads/release/luna/SR2/eclipse-java-luna-SR2-linux-gtk-x86_64.tar.gz
  88 
  89 cd /opt
  90 tar xvzf eclipse-java-luna-SR2-linux-gtk-x86_64.tar.gz
  91 chgrp users eclipse/
  92 chgrp users eclipse/* -R
  93 
  94 /opt/eclipse/eclipse.ini
  95 -startup
  96 plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
  97 --launcher.library
  98 plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20150204-1316
  99 -product
 100 org.eclipse.epp.package.java.product
 101 --launcher.defaultAction
 102 openFile
 103 -showsplash
 104 org.eclipse.platform
 105 --launcher.XXMaxPermSize
 106 256m
 107 --launcher.defaultAction
 108 openFile
 109 --launcher.appendVmargs
 110 -vm
 111 /opt/jdk8u222-b10/bin/java
 112 -vmargs
 113 -Dosgi.requiredJavaVersion=1.6
 114 -XX:MaxPermSize=256m
 115 -Xms40m
 116 -Xmx512m
 117 
 118 run_eclipse.sh 
 119 /opt/eclipse/eclipse
 120 
 121 apt install thunar mousepad wmmon
 122 xrandr --output Virtual1 --mode 1366x768
 123 mousepad oblivion theme monospace regular 12
 124 
 125 cat lightdm.conf  | grep -v "^#"
 126 /etc/lightdm/lightdm.conf 
 127 [LightDM]
 128 
 129 display-setup-script = setxkbmap pt
 130 greeter-setup-script = setxknmap pt 
 131 session-setup-script = setxkbmap pt 
 132 [Seat:*]
 133 
 134 [XDMCPServer]
 135 
 136 [VNCServer]
 137 
 138 ####
 139 apt install xfce4-terminal
 140 apt install wmmon
 141 apt install wmix
 142 apt install mono
 143 apt install python-pip
 144 apt install cowsay
 145 apt install unzip
 146 apt install libxml2-utils
 147 apt install gimp
 148 apt install xmlsec1
 149 
 150 xrandr --output Virtual1 --mode 1366x768
 151 
 152 apt install curl zip unzip
 153 /sbin/dhclient enp0s3
 154 
 155 # install openjdk 11
 156 cd ~
 157 wget https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz
 158 tar xvzf openjdk-11.0.2_linux-x64_bin.tar.gz
 159 # add ~/jdk-11.0.2/bin to ~/.bashrc
 160 # get eclipse with open jdk 11 support
 161 cd ~
 162 wget http://mirror.dkm.cz/eclipse/technology/epp/downloads/release/2019-09/R/eclipse-java-2019-09-R-linux-gtk-x86_64.tar.gz
 163 tar xvzf eclipse-java-2019-09-R-linux-gtk-x86_64.tar.gz
 164 
 165 # copy paste
 166 In virtualbox choose general, advanced, shared clipboard, bidirectional

Add LVM disk debian buster

   1 fdisk /dev/sdb # n, partition , 2st sector 2048, last sector 16777215, w
   2 pvcreate /dev/sdb1 # pvcreate - initialize a disk or partition for use by LVM
   3 vgdisplay  # vgdisplay - display attributes of volume groups
   4 pvscan # pvscan - scan all disks for physical volumes
   5 vgextend debian-vg /dev/sdb1 # vgextend - add physical volumes to a volume group
   6 pvscan # pvscan - scan all disks for physical volumes
   7 lvdisplay  # lvdisplay - display attributes of a logical volume
   8 lvextend /dev/debian-vg/root /dev/sdb1 # lvextend - extend the size of a logical volume
   9 vgdisplay  # vgdisplay - display attributes of volume groups
  10 resize2fs /dev/debian-vg/root  # resize2fs - ext2/ext3/ext4 file system resizer 
  11 # other disk
  12 fdisk -l
  13 fdisk /dev/sdc
  14 pvcreate /dev/sdc1
  15 vgextend debian-vg /dev/sdc1
  16 lvextend /dev/debian-vg/root /dev/sdc1
  17 resize2fs /dev/debian-vg/root
  18 df -h
  19 # other disk /dev/sdd 8 GB
  20 fdisk /dev/sdd
  21 pvcreate /dev/sdd1
  22 vgextend debian-vg /dev/sdd1
  23 lvextend /dev/debian-vg/root /dev/sdd1
  24 resize2fs /dev/debian-vg/root
  25 df -h
  26 # other disk /dev/sde 8GB 
  27 fdisk -l
  28 fdisk /dev/sde # n, partition , 2st sector 2048, last sector 16777215, w
  29 pvcreate /dev/sde1
  30 vgextend debian-vg /dev/sde1
  31 lvextend /dev/debian-vg/root /dev/sde1
  32 resize2fs /dev/debian-vg/root
  33 df -h
  34 
  35 # other disk /dev/sdf 8GB 
  36 fdisk -l
  37 fdisk /dev/sdf # n, partition , 2st sector 2048, last sector 16777215, w
  38 pvcreate /dev/sdf1
  39 vgextend debian-vg /dev/sdf1
  40 lvextend /dev/debian-vg/root /dev/sdf1
  41 resize2fs /dev/debian-vg/root
  42 df -h

Alsa and Pulseaudio

   1 apt purge pulseaudio pulseaudio-utils xfce4-pulseaudio-plugin  pavumeter pavucontrol
   2 apt install alsa-tools alsa-tools-gui alsa-utils alsa-oss alsamixergui libalsaplayer0
   3 /sbin/alsactl init
   4 aplay /usr/share/sounds/alsa/Noise.wav

Sandbox

Skype for Linux (deb)

Restart clipboard copy paste in VirtualBox VM

   1 sudo killall VBoxClient
   2 sudo VBoxClient-all

.xsessionrc with xfce-terminal and wider screen (1920x1080)

   1 /usr/bin/setxkbmap pt&
   2 /usr/bin/xfce4-terminal &
   3 #/usr/bin/xterm &
   4 #xrandr --output Virtual-1 --mode 1360x768
   5 #xrandr --output Virtual-1 --mode 1920x1080
   6 xrandr --output Virtual-1 --mode 1680x1050

Remove package

Debian (last edited 2020-12-09 16:00:16 by localhost)