Tip-heap, tweak-pile

Collected chaotic scraps and bits from dealings with Debian Sid - Vsido
Things not worth to blow into full post, but which can take (and took) unholy amount of time to dig out from crap-piles of Web.

# Spacefm uses icons from your current theme - and those doesn't have to be 100% of your liking. Icons can be changed through .config/spacefm/session file. It's a bit of detective work but doable (only icon name has to be used, as it is; no pngs, no addressing). NB! when saving your changed file, Spacefm has to be closed - or else it overwrites your changes (when you close it). To use different icons in groups doesn't seem to be possible - currently at least. But keep your eye on Igurus' doings anyway, development goes on.

# Tint2 - kinda shows workspaces... means it divides taskpanel to equal workspace-areas. I find it unconvinient. Thankfully there is pre-defined (Openbox) mouse-scroll-over-desktop for switching. At the same time - NB! I haven't tried it - I am quite sure it's possible to create launcher with xdotool exec with workspace-switcher keybind (same way as this here is done).
- Tasks - what I find marvelous is that task tabs are resizable (and colorable). Also, when using icon + text then the text will be broken to 2 lines AND resized to fit. Entirely cute!
- All in all - Tint2 seems to me optimal for OB. I tried some others and found them less fitting ..., but do check: fbpanel, lxpanel, xfce-panel, pypanel - to mention some.

# Conky - needs apps for getting temps and things: hddtemp and lm-sensors at least. Read wiki.
When you use OB super+d (show/hide desktop) and your Conky disappears (and you hate that), then change in .conkyrc:  own_window_type normal to
own_window_type override.

# Debian menu - the package 'menu', creates menu from all installed things. Can be inserted (IS inserted in fresh OB install) to OB menu. This <menu id="/Debian" /> has to be between menu start and end tags in menu.xml. And it has to be addressed in rc.xml: /var/lib/openbox/debian-menu.xml (just before the line of menu.xml). update-menus forces it to refresh. Debian menu is good source for building your new OB menu. Which will be refreshed by openbox --reconfigure, by the way.

# smxi etc - super scripts for easy-upgrading. Just to mention again: this funny colorful text that runs by HAS TO BE READ, or else quite horrid surprises might happen.
smxi and sgfxi auto-update every time you run them, inxi - the systeminfo one - needs to be updated manually: inxi -U.

# .bashrc has lines to define how title text of terminal window appears: xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"

In my single-user machine I found default myname@mymachine part totally obstructing and silly (especially when minimized to taskbar). So I removed it - you just need to delete those 6 symbols in PS1 line \u@\h:

# Unavoidable CLI - few basics only, but at least in one place:
# devices list
sudo fdisk -l

# check what definitions iptables have
sudo iptables -L

# install the deb pack you downloaded
sudo dpkg -i packagename.deb 

#update and upgrade everything
sudo apt-get update
 # want to check versions? 
 sudo apt-get install apt-show-versions
 sudo apt-show-versions -u 
# Install all updates
sudo apt-get dist-upgrade
 # and clean it up
 sudo apt-get clean
 sudo apt-get autoclean 
 sudo apt-get autoremove

# hate some packages? delete their confs too?
sudo apt-get remove --purge hatedpackage

# wanna see some info of installed package?
sudo apt-cache policy packagename

# open console and start other session in parallel
#C+A+F1 to F6 opens console. 
# C+A+F7 to F12 shows sessions. F7 is first and current.
# (use startx or xinit = the same result)
# Openbox to C+A+F8 
startx openbox-session -- :1 
# Fluxbox to F9
xinit startfluxbox -- :2
# Xfce to F10
xinit startxfce4 -- :3 

# Security - read this EPIC work here. Quite educational.

# Fluxbox. Last downloaded Vsido ISO had Fluxbox as a default session. Also, there was pronounced 'I-love-fluxbox-even-more-than-you'-party going on in Vsido forum. That was kinda funny alright.
Now, the thing is not bad at all, easy to setup and such. It's simply that I personally haven't found yet how it's better than Openbox. So I don't use it (after initial play-around).
So, just to blab something:
- to start FB session from console, the magic word is startfluxbox.
- I got an impression that FB windows are resizable only by (bottom) handles, which I find restricting. I might be mistaken, of course.
- There is a file .fluxbox/overlay. Style parameters written there overcome everything what fluxbox themes have. An option to have certain things defined like default. So it's good to know about it - especially when puzzling over 'why the shit in theme doen't change when I bloody change it'.
- When using Spacefm as a file manager, I found it convenient to use it also as a desktop manager - in 'startup' file add ( spacefm --desktop ) &
Then Spacefm can start your wallpaper (and so replace Feh or Nitrogen) ... and if desktop icons are your 'thing' then you can add them too.


Add Openbox session to Xubuntu

Collected notes and Walkthrough - how I did it.
For help and info, excellent places are: Crunchbang forum and Openbox Wiki.

I already had configured / tweaked Xfce side of Xubuntu - so 'restricted extras', Icedtea etc were already installed, as were done other 'first things'.

In Xfce session, open your terminal and type:
sudo apt-get install openbox obconf
Logout and login to new Openbox session.
What you find is black, empty screen. It is like that - so fearlessly right-click on blackness, open terminal and continue:

sudo apt-get install menu
cp /var/lib/openbox/debian-menu.xml ~/.config/openbox/debian-menu.xml
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/menu.xml
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/rc.xml
openbox --reconfigure
# previous part installed debian menu and copied all 
relevant menu files to your home.
# now, install also Openbox menu editor
sudo apt-get install obmenu

Take a look at your ./config/openbox/rc.xml - there are various parts of interest; like key and mouse bindings, general window conf and reference (a must) to menu.xml file. Investigate.
Then open up menu.xml - either in freshly installed obmenu or in editor. That's almost empty too! Right, it is - and you can proceed now in several ways:
1. Create new menu section from debian-menu (where things are distributed in most bizarre way). Re-arrange items to their proper places in the menu. It takes time..., --reconfigure often and take a look what happens - copy/paste errors are easy to come.
2. There are menu-related pipemenus in Openbox Wiki. Unfortunately I didn't install them but, maybe they are of help when creating your menu.
3. I took most of menu from my installed Vsido (tweaked already, of course, according to my installs/uninstalls), and pasted it into new menu.xml. Had to make some 10 corrections in items (no sweat). Also, I had 'iconified' whole Vsido menu before (2-3 hours of hard work), I really didn't want to do that again...
Syntacs for adding icons: item icon="/home/yourname/.icons/themename/apps/iconname.png" label="Appname".
Simply add your icon=absol.address into item tags. Easy, but yes, it takes time.

It's reasonable to pair your menu-building with installing - so you don't forget what you added.
1. Things to add what should have been already installed in Xfce (here are also things I personally like and install - question of choice):
synaptic, spacefm (a file manager better than Thunar, has to be taken from here), medit (an editor better than Leafpad), xfce4-terminal, xfce4-taskmanager, icedtea, bum (Bootup Manager, lets you add and remove early startup things), bleachbit (cleaner), gdebi-gtk (might be already installed out-of-box), gparted.
2. Install now: gtk-chtheme and/or lxappearance, update-alternatives, xxkb (how to here), volumeicon-alsa (if going for alsa).
Additionally: ipkungfu firewall (how to), maybe clamav+clamtk antivirus - to be in safe side with usb-s. Also - for more nerdy pro-look: htop. And for syncing and backups and creating your own distro: gsync, fsarchiver, remastersys (looong and complicated theme, do google).

When finished with menu - to great satisfaction and even greater relief, start with other bits of desktop: open ./config/openbox/autostart and start-up some more apps.
Install: tint2 (panel, if one doesn't want to use already present Xfce-panel), nitrogen (wallpaper manager), conky (fancy graphical systeminfo on desktop), compton (compositor). They all have manual config editing only, but there are lot of tutorials/help available.
Config files go: ./config/tint2/tint2rc, ./config/nitrogen/nitrogen.cfg (I think it was auto-created), .conkyrc, .compton.conf. It's probably best to find those files in web and then tweak them according to your fancy. I, again, ripped them from my Vsido installation.
Then you have to stick proper commands to autostart file. Here is one autostart which has almost all included - tweak and shape it according to your situation. Both Tint and Conky take -c parameter for pointing to conf file, like:
(sleep 1s && -c ~/.conkyrc_upleft) &
So you can make several conf files and switch between them.
Spacefm can be started as daemon (helps start speed, with mounting and unmounting and whatnot): spacefm -d. Or, it can be used as (minimal) desktop manager.
For Conky you probably have to install lm-sensors (terminal command is 'sensors', by the way).
Logout/login... ? Sure, everything looks good and somehow more presentable. That's it for first phaze.

Now, what else to install? Openbox themes, of course. Which are easily tweakable... gcolor2 helps to find new exciting colors. Crystalcursors? Suckless-tools to go for more nerdiness?
Or, more practically, wicd (network tool) and/or samba (network tool for linux+windows mixed)?

One more interesting thing to do. Let's make Main Menu to launch from Tints' Launchers and let's make sure that right click on desktop opens our whole menu.
Your rc.xml has to have, and sorry - I can't show xml here, whole thing goes crazy... :
keybind key="A-C-q" with menu-def root-menu.
And also mousebind action="Press" button="Right" with menu-def root-menu.
Now install: sudo apt-get install xdotool wmctrl
Create a folder ./config/tint2/.tint2launchers. Create launchers you want to appear in your Tint launcher there (copy them from your .local/share/applications). Only one that really has to be created is your menu.desktop:
[Desktop Entry]
Name=Openbox Menu
Exec=xdotool key ctrl+alt+q
Edit tint2rc file: there has to be 'L' in panel defs block (L=Launcher); and under Launchers block: launcher_apps_dir = /home/yourname/.config/tint2/
It's also possible to use a launcher-script for more 'docky' behaviour
And with the same method you can create missing 'show desktop' launcher-icon (exec=xdotool key super+d)

Additionally: Read about relations/fixes of Compton and multimedia
I tend to remove pulseaudio, and install alsa only. How to here

AND FINALLY: Logout and a bunch.
Fresh Openbox comes with Restart and Exit items at bottom of the Menu. The first one didn't work for me at all, the second one did (and it means 'logout', by the way). Missing, obviously, are Shutdown (and Suspend + Hibernate, if we talk of laptops).
I installed script called Oblogout, but also, only thing that worked was Logout. Then I copied 'vsido-exit' script from /usr/bin/ of my Vsido install. And it worked like charm. It's not fancy-looking and missing Hibernate, but it's OK with me. Abstractedly, in Xubuntu, you have to have a script that doesn't have bits like 'gdm' and 'hal' in it. 'dbus', of the contrary, is a desirable bit.

That's it. Except strange case of two apps persistently missing few icons, everything is mint for me.


No fun: OpenSuse and Manjaro


It's my third attempt with OpenSuse - and the first time it actually installed. Pity it's the only successful aspect of this experience. It went like that:
I made USB-install-image of their DVD with Suses' provided Imagewriter. USB booted nicely. Only strange and also dangerous point in this installation is that you do not have clear bootloader conf option. It appears only in the end summary, mixed in with other text. If you miss it, your sda-s MBR will be over-written. Doh!
By the way, I picked Xfce as DE. Install took loooong time. Then it booted - with 10s automatic reboot counter... very silly that. Say, you are making a sandwich, or fifty if we take install-time to account, and find that your auto-rebooted machine is nowhere you wanted it to be. We-know-better and Windowish way, no?
And 'Windowish' fits with following. When I got back to Suse-boot, I had to insert USB again (never met such thing during my installs of some 15 distros. I mean - that was new for me). Installation continued a looong time and then suddenly, one meter-bar filled only 15%, it landed on desktop.
Xfce desktop was rather bland and untuned. Menu wasn't to my liking... anyway, after some look-around I booted - to fix first-time-no-network-bug.
So, let's summarize: Loooong+loooong installation and 2 boots... Windows XP class, I would say. Shittier than Win7 for sure. And without saying, longest ever Linux install for me.
Fortunately I didn't have to infuriate myself any longer - OpenSuse 12.3 Xfce didn't boot further than to 'doing fast boot' and hung after that. I even appreciate such a supple humor.


The day before Suse-disaster I installed Manjaro 64bit Openbox. Not wanting to muse here over all reasons why, I mention only: something different and difficult, but with little help for me-arch-stupid.
Of course I read before, shivered, read more - especially about some helpful features of Manjaro and, well, thought that it could be fun and games.

Install (also USB+Imagewriter): As expected, the installer looked like badly designed Norton Commander from 1990. 'Cause I didn't print tutorial out, I went back and forth couple of times - but install was, even more surprisingly, success. Despite strange error-message from grub ...
I booted and updated my master-bootloader, then booted back to Manjaro. Ah, yes, by the way, not install nor boot were 'loooong'. Of the contrary, they were sharpish. And what's most amazing - installer did install Nvidia driver (you have to click 'I want')! ... But my chosen time acquired 4 hours plus when it reached after-install desktop...

Tint2 ribbon is on top, and that's it for desktop items. Nice and clean. But even nicer is Tint2 at bottom, which I quickly made to happen.
After that it was mostly pain and punishment for my sin of touching Arch:

- Trying to update: Pamac (Pacman GUI, Manjaro special) opened up but didn't react very much to anything ... So I closed it and amused myself with other things. When I tried again, it didn't start at all and gave an error 'another instance is running'. One pamac process was running - I killed it in Taskmanager. No difference. 'sudo killall pamac' in terminal - can't, doesn't exist... I did logout/login... I couldn't find any obvious way to get past that error. So, I had to do every install/uninstall in terminal and pacman-style. 'Yes, it's that simple', as Manjaros' help-pdf says about pamac-manager.
- Main menu (or absence of it) really IS perverted. I read before of it - but I couldn't even imagine something so far-gone.
There is desktop right-click menu from OB-s menu.xml but it's totally castrated, no menu topics and almost no apps. But, for example, there is not-working-Pamac, twice, and help-pdf - as the first most important shortcut, and maybe some 5 other items (including Configuration-folder with some irrelevant and strangely listed items).
Then there is (icon on panel) this... err... Unity-inspired search-thingy which is supposed (?) to replace menu. I say only 'what??'.
From crippled desktop-menu you can at least open Appfinder, which seems to be only place to have normalish appmenu. When you click on some app, then after that Appfinder closes itself. So it's like: click on desktop, click on Appfinder, click on menu, maybe drag a slider, double-click on app... and then you do it again.
Default browser is crash-prone crappy Midori. Fortunately, installing FF is not a problem.

Then I spent some two hours rescuing the menu... and during this therapy reached conclusion that I had simply picked a wrong toy. I had thought that Manjaro is Arch made for lazys (those who doesn't want to start from terminal, but from minimal DE). But that's not the case. It's more like when you have a brute off-road jeep and you tape sofa, tv, bar, slick tires and Bentleys' batch onto and into it, and wrong way around too. The result doesn't work very much, looks mighty odd, doesn't fit for anything, and makes one think that Devs have some kind of existential problems. Sorry. Format.
... Though, I might try Archbang sometime. I have heard that their installer still overwrites MBRs, and that's only option, or should I say - no option. If this changes...


Openbox and keyboard layout

How to define an additional keyboard layout? Simple - you go to keyboard settings and add it. Then you define a keyboard shortcut and add a panel widget. Done.
Alas, it's not always so simple. Like this or this. It might be that your 'locales'-change simply doesn't impress your desktop, OR that you are plain arrogant and using boxen (as opposed to well-established DE which have this nice-and easy 'keyboard settings' place).

So I was in Debian Sid and using Openbox ... I wanted to add Thai or Greece or Estonian or Ethiopian or Russian layout-option. By the way, while Greece is 'gr' and Russian is 'ru', it's Ethiopian that is 'et' and Estonian is 'ee'... and there are other abreviations which do not go by countries ISO-standard.
What I did (after reading ungodly amounts of google-trash):
... Edited those two files:
# /etc/default/keyboard 
# (this adds classic Windows' alt+shift switch,
## And also in file /etc/X11/xorg.conf 
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us,th,gr,et,ee,ru"
Option "XkbOptions" "grp:alt_shift_toggle" 
To work, those locales have to be installed, of course. Testing - open editor, type, switch keyboards, type...
If you want to have clickable switcher on panel, install systray app: fbxkb app didn't work for me (bug with US flag)... but I had no problems with xxkb app.
xxkb needs also config file in your home - .xxkbrc (and logout-login after creating it). Following worked for me:
XXkb.mainwindow.enable: yes
XXkb.mainwindow.appicon: no
XXkb.mainwindow.type: tray
XXkb.mainwindow.in_tray: yes
XXkb.mainwindow.geometry: 16x16+0+0
XXkb.mainwindow.border.color: white
XXkb.mainwindow.border.width: 1 
XXkb.mainwindow.label.enable: yes
XXkb.mainwindow.label.text.1: US
XXkb.mainwindow.label.text.2: FR
XXkb.mainwindow.label.foreground: white
XXkb.mainwindow.label.font: -misc-*-r-*-13-*
XXkb.controls.two_state: no 1 2
XXkb.button.enable: no
XXkb.bell.enable: no 
And it's, of course, convinient to have xxkb in autostart (I put it as the last entry):
(sleep 3s && xxkb) & 

Bug: Every similar shortcut will be fucked by xorg when you are using locale-shortcut. Means, anything longer (than, in this case, alt+shift) that uses the same combination, does not work. The bug has been up 5 years at least ...

Not wanting a hassle of file-hacking and setting up a switcher? You can type in terminal:
setxkbmap -rules xorg -model pc105 -layout "us,gr,ru" -option "grp:alt_shift_toggle"
You will have shortcut-switch for this session - and it works too.
If above-written didn't work OR you want to go deep: Google. There are piles of reading about this. Quaranteed to drive you at least slightly crazy.


Debian, rant, and Firefox

As already mentioned, I started to play with Debian Sid. And Debian means quite 'free soft only', or to put it in more practical way - 'more troubles to install elementary things'. Add here silly-but-oh-so-superior eloquency of debitards about 'Debian way' (this 'way' mostly seems to mean 'relentless and insulting arrogance' toward all those not members of Debian' Forum Pro Club). Despite not have been at a receiving end myself - being anti-social and not-forum-person as I am - I find general Debian forums (and Debian way) to be mightily off-putting. Not to mention, time-wasting when trying to find a bit of info in this sea of agressive trolling.
And additionally to previous, I had constant bugs with the love-child of Debian community - Iceweasel. It's quite mind-boggling really, how it's possible to make slight fork of Firefox so buggy... experimental repo or not... well, with great care and effort, I presume.

After a week of Iceweasel bugs coming, being, going, coming... and so on, and seriously fearing the possibility of stroke or at least nervous skin-rash, I decided to install the evil - Firefox.
As is my bad habit, I read, found very different howtos and felt kinda 'now-what?'.
Then I downloaded a binary and installed. That went OK, only - Firefox didn't work, not at all... Then I found out that file you download from public Mozilla is always 32bit - and is not working on 64bit Debian. Not without additional hassle, at least. There seem to be multi-arch transitional packages to install and force Firefox, but I didn't bother.

I downloaded 64bit version from not-so-public directory:
And proceeded like that:
sudo apt-get remove iceweasel
then deleted ~/.mozilla folder and copied firefox-19.0.2.tar.bz2 to /opt.
sudo tar -xjvf firefox-19.0.2.tar.bz2
cd /usr/local/bin
sudo ln -s /opt/firefox/firefox
cd ~/.local/share/applications
# make new firefox.desktop file like following:
[Desktop Entry]
GenericName=Web Browser
Exec=/usr/local/bin/firefox %u
# That's end of file. Save.

cd ~/.local/share/applications/
#add into file mimeapps.list
[Added Associations]
# and in terminal for proper icons...
sudo ln -s /opt/firefox/icons/mozicon128.png /usr/share/icons/hicolor/128x128/apps/firefox.png & sudo ln -s /opt/firefox/icons/mozicon128.png /usr/share/pixmaps/firefox.png

Go to 'Preferred applications', mark Firefox as your 'Web browser'.
Check into .local/share/applications/mimeinfo.cache - and if needed, replace all instances of 'iceweasel' with 'firefox'.
Fix any launcher that still has 'Iceweasel' in it (tint2, for example). Done... Probably.
Easy, no? Yes, it is - childs' play compared to some other things.

NB! For updates: Either you have to change permissions of Firefox install-directory OR start Firefox for updating via sudo. Otherways it can't write ... Not that I mind especially - Mozillas' continuous updates are one of the most irritating things on planet Earth. So, not updating can be a relief really.
Still - we should update, at least for security reasons.