domingo, 5 de março de 2017

Debian com OpenBox, Conky, Tint2, etc

.:.:.work.in.progress.:.:.

Colocar utilizador com permissões sudo
usermod -aG sudo <username>

Instalar software base

apt install uptimed tmux sshfs cups sshuttle curl hdparm rsync curl cabextract

Instalar ambiente gráfico

apt install openbox lightdm light-locker conky conky-all tint2 terminator gmrun gvfs gvfs-backends thunar thunar-volman thunar-archive-plugin tumbler xarchiver geany galculator arandr gsimplecal alsa-utils pulseaudio evince mousepad

Tipos de Letra

apt-get install fonts-linuxlibertine fonts-mgopen ttf-adf-* fonts-lobster* ttf-anonymous-pro ttf-bitstream-vera fonts-vollkorn fonts-tuffy fonts-tomsontalks fonts-stix mscore ttf-liberation

Calibri e outras distribuídas com Windows 7
https://wiki.debian.org/ppviewerFonts

Virtualização com Virtualbox

https://www.virtualbox.org/wiki/Linux_Downloads

Instalar Som

apt-get install alsa-utils pulseaudio volti
usermod -a -G pulse mjp

pulseaudio --start

Adicionar volti & ao autostart
Pode ser necessário alterar a configuração em ~/.config/volti/config para indicar outro card_index em vez de 0 (caso sejam detetadas diversas placas).

Instalar Desktop Software

Firefox
apt install firefox-esr

Brave Browser
 
Opera
 
Software diverso: Thunderbird, Remmina, Darktable, Gimp, VLC, Filezzila, OBS
apt install thunderbird remmina remmina-plugin-rdp darktable gimp audacious vlc filezilla obs-studio 
 
Netbeans
apt install default-jre



Instalar deb-multimedia.org

Ativar o repositório:

Instalar as chaves com
apt-get update
apt-get install deb-multimedia-keyring





apt-get install audacity

jessie
Gimp - 2.8.14
Audacity - 2.0.6
Fotowall - 0.9-11
Mediainfo-gui

apt-get install gimp audacity fotowall mediainfo-gui

jessie-backports
Darktable - 2.0.7
Inkscape - 0.92.0.3
Blender - 2.74
Calibre - 2.75.1

apt-get install -t jessie-backports darktable inkscape blender calibre

Lightworks on Debian Jessie
- Necessita da libjpeg8 que apenas existe no wheezy (old-stable!!) e no sid...
wget http://ftp.us.debian.org/debian/pool/main/libj/libjpeg8/libjpeg8_8d1-2_amd64.deb
dpkg -i libjpeg8_8d1-2_amd64.deb
dpkg -i lwks-12.6.0-amd64.deb
apt-get install -f



HACKS and TWEAKS

Executar ficheiros a partir de ~/bin.
Editar .bashrc e adicionar:
export PATH=$PATH:~/bin

Virtualbox
 sudo usermod -a -G vboxusers $USER

Instalar suporte para AMD A10 Kaveri APU
Não suportava resoluções acima de 1920x1080 (por exemplo, 2560x1080)
apt install firmware-linux-nonfree
reboot


Gestão de janelas
O ficheiro de configuração do openbox é ~/.config/openbox/rc.xml

Na secção para especificação de teclas encontra-se a seguir a:
<!-- Keybindings for running aplications -->

Aqui é possível perceber melhor o funcionamento: http://openbox.org/wiki/Help:Bindings

A sintaxe específica define uma combinação de teclas, por exemplo: W-p para Windows+p ou S-C-p para SHIFT*CTRL+p
<keybind key="my-key-combination">
  <action name="my-action">
    ...
  </action>
</keybind>

Para executar um comando a ação é:
<action name="Execute">
  <command>my-command</command>
</action>

As ações que se podem utilizar estão disponíveis em: http://openbox.org/wiki/Help:Actions

Para saber as teclas pressionadas pode dar jeito utilizar o comando xev que, a partir de um terminal lista os eventos ocorridos (rato e teclado).


[https://wiki.archlinux.org/index.php/Openbox#Window_snapping]
    <!-- 50% LEFT, CENTER, RIGHT -->
    <keybind key="W-KP_4">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <height>100%</height>
        <width>50%</width>
        <x>0</x>
        <y>0</y>
      </action>
    </keybind>
    <keybind key="W-KP_5">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <height>100%</height>
        <width>50%</width>
        <x>25%</x>
        <y>0</y>
      </action>
    </keybind>
    <keybind key="W-KP_6">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <height>100%</height>
        <width>50%</width>
        <x>-0</x>
        <y>0</y>
      </action>
    </keybind>
    <!-- 25% LEFT, CENTER, RIGHT -->
    <keybind key="W-KP_1">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <height>100%</height>
        <width>25%</width>
        <x>0</x>
        <y>0</y>
      </action>
    </keybind>
    <keybind key="W-KP_2">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <height>100%</height>
        <width>25%</width>
        <x>38%</x>
        <y>0</y>
      </action>
    </keybind>
    <keybind key="W-KP_3">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <height>100%</height>
        <width>25%</width>
        <x>-0</x>
        <y>0</y>
      </action>
    </keybind>
    <!-- 33% LEFT, CENTER, RIGHT -->
    <keybind key="W-KP_7">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <height>100%</height>
        <width>33%</width>
        <x>0</x>
        <y>0</y>
      </action>
    </keybind>
    <keybind key="W-KP_8">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <height>100%</height>
        <width>33%</width>
        <x>33%</x>
        <y>0</y>
      </action>
    </keybind>
    <keybind key="W-KP_9">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <height>100%</height>
        <width>33%</width>
        <x>-0</x>
        <y>0</y>
      </action>
    </keybind>
    <!-- MAXIMIZE -->
    <keybind key="W-KP_0">
      <action name="ToggleMaximizeFull"/>
    </keybind>
    <!-- RESIZE WIDTH TO SHOW CONKY -->
    <keybind key="W-KP_Divide">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>1030</width>
        <height>100%</height>
        <x>0</x>
      </action>
    </keybind>
    <!-- MOVING UP,DOWN 50% HEIGHT-->
    <keybind key="W-Up">
      <action name="MoveResizeTo">
        <height>50%</height>
      </action>
      <action name="MoveToEdge">
        <direction>north</direction>
      </action>
    </keybind>
    <keybind key="W-Down">
      <action name="MoveResizeTo">
        <height>50%</height>
      </action>
      <action name="MoveToEdge">
        <direction>south</direction>
      </action>
    </keybind>
    <!-- MOVING LEFT<>RIGHT -->
    <keybind key="W-Left">
      <action name="MoveToEdge">
        <direction>west</direction>
      </action>
    </keybind>
    <keybind key="W-Right">
      <action name="MoveToEdge">
        <direction>east</direction>
      </action>
    </keybind>
Abrir aplicações e programas
rc.xml
    <!-- LOCK SCREEN -->
    <keybind key="W-l">
      <action name="Execute">
        <command>/usr/bin/dm-tool lock</command>
      </action>
    </keybind>
    <!-- SCREENSHOT -->
    <keybind key="Print">
      <action name="Execute">
        <command>scrot -s -e 'mv $f ~/downloads/'</command>
      </action>
    </keybind>
    <keybind key="A-Print">
      <action name="Execute">
        <command>scrot -e 'mv $f ~/downloads/'</command>
      </action>
    </keybind>
    <!-- EXECUTAR -->
    <keybind key="W-r">
      <action name="Execute">
        <command>gmrun</command>
      </action>
    </keybind>
    <!-- TERMINAL -->
    <keybind key="W-t">
      <action name="Execute">
        <command>terminator</command>
      </action>
    </keybind>
    <!-- FILE EXPLORER -->
    <keybind key="W-e">
      <action name="Execute">
        <command>thunar</command>
      </action>
    </keybind>
    <!-- GEANY -->
    <keybind key="W-f">
      <action name="Execute">
        <command>geany</command>
      </action>
    </keybind>
    <!-- GALCULATOR -->
    <keybind key="W-c">
      <action name="Execute">
        <command>galculator</command>
      </action>
    </keybind>
    <!-- Audacious -->
    <keybind key="W-a">
      <action name="Execute">
        <command>audacious</command>
      </action>
    </keybind>
    <!-- Opera -->
    <keybind key="W-o">
      <action name="Execute">
        <command>opera</command>
      </action>
    </keybind>
    <keybind key="W-S-o">
      <action name="Execute">
        <command>opera --private</command>
      </action>
    </keybind>
    <!-- Firefox -->
    <keybind key="W-p">
      <action name="Execute">
        <command>firefox</command>
      </action>
    </keybind>
    <keybind key="W-S-p">
      <action name="Execute">
        <command>firefox --private-window</command>
      </action>
    </keybind>
    <!-- Chrome -->
    <keybind key="W-i">
      <action name="Execute">
        <command>google-chrome</command>
      </action>
    </keybind>
    <keybind key="W-S-i">
      <action name="Execute">
        <command>google-chrome --incognito</command>
      </action>
    </keybind>

Para carregar alterações:
openbox --reconfigure


Temas
GTK2
apt-get install gtk-theme-switch gtk2-engines gtk2-engines-murrine

Dark:
[http://www.deviantart.com/art/CathexiS-Suite-329275044]

Bloquear sessão
apt-get install light-locker
dm-tool lock

Proteção de ecrã

apt-get install xscreensaver xscreensaver-gl
Adicionar em /etc/xdg/openbox/autostart
xscreensaver -no-splash &

Para configurar executar:
xscreensaver-demo

Gsimplecal
Ao clicar no calendário do tint2 é possível abrir o calendário com o gsimplecal
tint2rc:
clock_lclick_command = gsimplecal

O ficheiro de configuração do gsimplecal:
~/.config/gsimplecal/config
show_calendar = 1
show_timezones = 0
mark_today = 1
show_week_numbers = 0
close_on_unfocus = 0
external_viewer = firefox https://www.google.com/calendar/render?action=TEMPLATE\&text=\&dates="%Y%m%d"T090000Z/"%Y%m%d"T100000Z\&details=\&location=\&sf=true\&output=xml
clock_format = %a %d %b %H:%M
force_lang = en_US.utf8
mainwindow_decorated = 0
mainwindow_keep_above = 1
mainwindow_sticky = 1
mainwindow_skip_taskbar = 1
mainwindow_resizable = 0
mainwindow_position = mouse
mainwindow_xoffset = 0
mainwindow_yoffset = 0
clock_label = UTC
clock_tz = :UTC
clock_label = Local
clock_tz =

A opção external_viewer permite definir o programa a executar quando se clica duas vezes num dia. Neste caso é aberto o browser com uma ligação para a criação de um novo evento no calendário Google na data clicada.



Hack on tint2
[https://wiki.archlinux.org/index.php/tint2]
[https://gitlab.com/o9000/tint2/blob/master/doc/tint2.md]
[https://petermolnar.net/hacking-tint2-panel-weather-cpu-temperature-and-volume-executors/]

 Outras coisas

[https://www.prahladyeri.com/blog/2016/02/minimal-debian-desktop-setup.html] - check
[https://wiki.debian.org/Openbox] - falta temas

Sem comentários:

Enviar um comentário