Debian Notes:

default

 
lsb_release -a
Display which release of Debain you are running

dpkg --get-selections
Show installed packages	

dpkg --get-selections | grep mouse
dpkg -S xserver-xorg-input-kbd
Show installed packages with mouse in name

dpkg -L xserver-xorg-input-mouse
Show locations of files within a package

sudo dpkg-reconfigure slim
Reconfigure a package

apt-cache search xserver-xorg-input-kbd
aptitude search xserver-xorg-input-kbd
Search repository for package by name and description 

aptitude search ~ilm-sensors
Search for installed packages
~i = search installed

apt-cache search --names-only xorg
Search packages querying in the name only

apt-cache show xserver-xorg-input-mouse
apt-cache showpkg xserver-xorg-input-mouse
Show detailed information about a package

apt-get install dwb 
aptitude install mariadb-server
Install a package

aptitude update
Update package list

aptitude safe-upgrade
Upgrade packages after updating the list

aptitude remove dwb
Remove a package

aptitude purge dwb
Purge a package [totally remove]

apt-get clean
aptitude clean
Remove previously downloaded .deb files from:
/var/cache/apt/archives

apt-get autoclean
aptitude autoclean
Removes only .deb files that can no longer be downloaded

To manually remove older versions of apt's cache:
for a in `ls /var/cache/apt/archives | grep '\.deb$' | cut -d _ -f1 |
  sort | uniq`; do
  ls -tr /var/cache/apt/archives/${a}_* | sed '$ d' |
  xargs -r -p sudo rm -v
done

adduser hippiechick sudo
Add a user to the sudo group
User must logout and login to take effect

sudo mount -t iso9660 /dev/sr0 /media/cdrom
Mount cdrom
/media/cdrom0 can be any folder you create.
/dev/sr0 may be different, cans use 'dmesg' to find correct device

sudo umount /dev/sr0
Unmount cdrom
/dev/sro may be diffent depending on system.
If you can not unmount, make sure you are not in the
mounted directory.

eject
Ejects cdrom, unmout first if need be.

lspci -v | grep VGA
Show type of video card system has

vim /usr/share/gdm/dconf/10-desktop-base-settings
picture-uri='file:///blahbla.jpg'
File to set background image if using gdm

vim /usr/share/gdm/dconf/10-desktop-base-settings
[org/gnome/desktop/background]
picture-options='none'
primary-color='#000000'
Remove background picture

vim /etc/gdm3/greeter.gsettings
File to change the login screen for gdm3

dpkg-reconfigure gdm3
Reload gdm3 configuration on logout/reboot

/etc/alternatives
Location of alternatives. Don't cat these they
are binaries. Just use them to see what options
you can throw at update alternatives.

update-alternatives --display x-window-manager
Shows the symlinks for the default and alternative
window managers

update-alternatives --config x-window-manager
Shows alternatives and give choice of which to use

update-alternatives --config x-www-browser
Set which browser to use as default

update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/dwb 100
Add dwb to x-www-browser list and set it's priority to 100

############################
# Slim notes to keep in mind

/etc/X11/default-display-manager
This file determines the default display manager
/usr/sbin/gdm3
Would be for gdm3
/usr/bin/slim
Sets slim as the default display manager
qingy - is another choice

/etc/init.d/gdm3
Contain the settings for gdm3
HEED_DEFAULT_DISPLAY_MANAGER=true
This line will instructs whether gdm3 should
respect the default, if set to false, it
can run at same time as another.

vim /usr/share/slim/themes/plain/slim.theme
Edit slime theme file.

slim -p /usr/share/slim/themes/plain
Preview a theme. Type exit to close,
may look like a login screen.

# End-slim-notes
################

########################################
# i3 as default window manager with slim
sudo update-alternatives --install /usr/bin/x-window-manager x-window-manager /usr/bin/i3 200
Set i3 to have a higher priority than it did before.
Slim is reading gnome-session as the default, when
logging in. I want it to be i3.

/etc/slim.conf
Even if this file has i3 as the first option under
sessions. Slim still defaulting to gnome.

Now create or edit and add:
~/.xsession
exec i3

Slim's default is now i3!

The culprit seems to be this file:
/etc/X11/Xsession.d/50x11-common_determine-startup
# If there is still nothing to use for a startup program, try the system
 # default session manager, window manager, and terminal emulator.
 if [ -z "$STARTUP" ]; then
   if [ -x /usr/bin/x-session-manager ]; then
     STARTUP=x-session-manager
   elif [ -x /usr/bin/x-window-manager ]; then
     STARTUP=x-window-manager
   elif [ -x /usr/bin/x-terminal-emulator ]; then
     STARTUP=x-terminal-emulator
   fi
 fi

So two other options may be to try to set:
x-session-manager
As i3. I don't know what will happpen.
Or to change these lines, so that it reads
x-window-manager
before
x-session-manager

Of course if you ever stop using i3 these will
need to be changed back, especially if change to 
gnome-session

Not sure which of the three is best, but right
now I'm using .xsession = exec i3

Ok I removed .xsession and swapped the if statements
around and it still works.

ps -aux | wc -l
Shows 130 process running this way.

Changing 50x11-common_determine-startup
back to the original way and putting
~/.xsession back
ps -aux | wc -l
128 processes

So take your pick. The .xsession way seems to be
the easier one to alter if future changes occur.
Might even be able to use it to jump to bspwm
and not have to change all the other debian
config crap. Not gonna try setting i3 to
x-session-manager, already have to fixes.

I do have i3 first in:
/etc/slim.conf
sessions    i3,gnome-session
If that makes a difference.

And I was rebooting for these to take effect.
Not sure if there is a way to reload on the fly.

# End-slim-i3-as-default-wm
###########################

########################################
# Keyboard does not work when restarting
Installed Debian on Acer Aspire V3-551-8419 laptop.
Everything went fine during install. On reboot login
prompt came up and keyboard did not work. Had to plug
in usb keyboard to login.
*** The touchpad was not working either, had to use
usb mouse.


dpkg --get-selections | grep xserver-xorg-input-kbd
Shows xserver-xorg-input-kbd is not installed.

apt-get install xserver-xorg-input-kbd
Install this package

After reboot the keyboard worked find. Ironically
the touchpad started to work after this was
installed also.

*** After adding the firmware-linux-nonfree for
my graphics card this quit working. I noticed
that the keyboard and touchpad work after
powering down the machine, and then turning it
on. They do not work if a restart is performed.

-------------------------------------------------

This laptop also has an AMD (ATI)  Readeon HD 7640G
video card, and Debian can not auto load the correct
drivers.

lspci -v | grep VGA
Shows the type of video card on the machine:
00:01.0 VGA compatible controller: Advanced Micro
Devices, Inc. [AMD/ATI] Trinity [Radeon HD 7640G]
(prog-if 00 [VGA controller])

dmesg | grep -i firmware
Show proprietary firmware is needed:
[    5.683791] [drm:radeon_pci_probe] *ERROR*
radeon kernel modesetting for R600 or later
requires firmware-linux-nonfree.

This implies that: firmware-linux-nonfree
needs to be installed

vim /etc/apt/sources.list
deb http://ftp.us.debian.org/debian/ jessie main non-free
The non-free repostitory must be added to install this.

apt-get update
Update the list of available packages with the non-free 

apt-cache show firmware-linux-nonfree
This will show all the crap that is fixing to be installed.
Unfortunately debian makes us install way more than we need.
Funny how stuff is ripped out of the main repo, forced into
non-free and now that we only need one proprietary firmware
debian is gonna shove all kinds into the machine.

aptitude install firmware-linux-nonfree
Install needed firmware/driver

grep DRM_RADEON /boot/config-$(uname -r)
Make sure DRM support are configured in current kernel.
The default kernel should have it.
uname -r displays current kernel. 

If you kernel supports these it should show:
CONFIG_DRM_RADEON=m
m = Good to go
n = Need to rebuild kernel

grep AGP /boot/config-$(uname -r)
Check if AGP is supported by current kernel

It will display something like this:
CONFIG_AGP=y
CONFIG_AGP_AMD64=y
CONFIG_AGP_INTEL=y
CONFIG_AGP_SIS=y
CONFIG_AGP_VIA=y


------------------------------------------------------

If you are stuck in Gnome 3 for some reason and the
stupid beep is harrasing you:
Sound Settings -> Sound Effects -> Alert Volume -> off

You could also:
vim /etc/gdm3/greeter.gsettings
# Disabling sound in the greeter
[org.gnome.desktop.sound]
event-sounds=false

Uncomment those two lines

----------------------------------------------------

No Korean fonts:
apt-get install fonts-unfonts-core fonts-unfonts-extra

default