Pages

Showing posts with label Xubuntu. Show all posts
Showing posts with label Xubuntu. Show all posts

2013-04-19

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]
Type=Application
Encoding=UTF-8
Name=Openbox Menu
Exec=xdotool key ctrl+alt+q
Icon=yourfavoritemenuicon.png
NoDisplay=false
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.

2013-02-26

Xfce – the first glimpse

Xfce site has very nice and understandable tutorials, a must read.
Both distros (Mint and Xubuntu) I am talking here about, come in traditional Xfce appearance: main panel on upper edge, and 'launcher panel' on bottom of screen. Xubuntu 12.10 has 'all drives are double' bug on desktop but it goes away after updates are applied.
I moved main panel to bottom, launcher-panel to left side and removed all desktop icons. So, almost nothing remained like it was in vanilla form. Point of mentioning this is, that everything on Xfce desktop is tunable. How vanilla looks – visit Xfce, Mint and Xubuntu – there are screenshots to look.

First Xfce I installed was Xubuntu 12.10. Because there are several reviews singing praise to it - do google if interested.
First things to do - as usual: Software sources/additional drivers = change video driver to proprietary one, if there are more available drivers, change those too. Update Manager wants to update, let it do that. Install 'xubuntu-restricted-extras' from repository. (Longer description of those first things is in post named 4. Cinnamon!).
Synaptic wasn't even installed, and menu lacked almost everything that should be in System folder. Settings were presented only through Settings Manager. That's in 'Xubuntu session', 'Xfce session' menu is more "open".
Not liking that very much and just for fun, I decided to try out Mints' Xfce version. All aforementioned nags were nicely absent there, BUT – to my big surprise – there wasn't any menu editor present. To my even bigger surprise I found that Xfce traditionally doesn't have a menu editor! One is supposed to hack menu manually. Or – as advised somewhere – to use menu editor of Lxde 'which works alright'. Well it worked, but only half-way, part of menu was simply missing. So it boils down to manual method – which is really quite simple, but takes time to do.
HOW-TO: First, copy contents of /usr/share/applications to your home folders' .local/share/applications. Those .desktop files represent all possible menu items and contain their configurations (type, where to appear, exec, icon and so on).
Also copy etc/xdg/menus/xfce-applications-menu to ~/.config/menus/ xfce-applications-menu. It's xml file containing whole architecture of menu tree.
Why to copy? To avoid sudo-ing every time you change something. And to make sure those files stay exactly like you change them (being now owned by you).
What to do, how to change various options, is very nicely described in this official tutorial.
Fancy that after successfully hacking Mints' menu etc, I decided to switch back to Xubuntu – because Xubuntu has menu editor alright (alacarte) and it seemed somehow important to me in those still n00bish times.
When Xubuntu installs, it creates two sessions: Xubuntu and (pure) Xfce.
As 'Xfce session' has all settings and system things available by default, I picked it as my default and removed Xubuntu session from login screen selection altogether.

Bugs, errors:
I have installed Xfce now four times. In all those desktops I had couple of identical bugs and errors. Difference here is that I call a glitch I see a 'bug', and 'errors' are those listed in .xsession-errors after every system-start. Not sure how they correlate... Anyway, all 5 errors seem to be known but unfixed. One bug – which creates useless 'outputstream'-files into home folder, is also known and unfixed (these files could be deleted without problem).
Two bugs I couldn't find any reference to. One prevents me from editing autostart apps (option grayed out). No clue what to do about that (Edit: Not a bug at all - it appears you can edit only entries you yourself have made. So, simply a silly 'feature').
The second is this: I can add wallpapers to wallpaper folder, I close Manager – and the fucker forgets all of them except this one I have on desktop (and two ugly default wallpapers). Plus – I can't delete them, button is grayed out. And no – it doesn't appear to be permissions issue...
For this I used this workaround: I mounted my custom wallpaper folder to folder where Xfce keeps its default wallpapers. And now they stay, and I can add or delete them in my home folder without any hassle (still can't delete in wallpaper manager).
HOW-TO mount a folder permanently:
Create folder ~/Pictures/wall (or whatever-name) for your wallpapers.
Open terminal, type: sudo leafpad /etc/fstab
Add to the end of file:
#wallpaper mount 
/home/myhomename/Pictures/wall /usr/share/xfce4/backdrops none defaults,bind 0 0
Save, reboot. Should be mounted now.
#is a comment line, first address is what you are going to mount, the second is where are you going to mount. And don't loose parameters that come after that. Line should be spaced the same table-like way as are previous entries. And DO make backup of fstab before.

As an environment, Xfce scores 9/10.