With age, more and more it becomes a pity for the time of fruitless fidgeting with the mouse; more and more annoyance is caused by some kind of endless rubbish loaded with each DE, which eats up time and resources for poorly understood purposes. And the traditional descent begins: from KDE to XFCE, then to LXDE. Probably someday I'll get to the bare console on the desktop. But while I was stopped by OpenBox.
“CrunchBang do-it-yourselfers” - these are the names most often called such manuals. Some people write quite briefly: “Look at the CrunchBang configs and set your OpenBox on them!”
I looked at CrunchBang configs. Only he is no longer CrunchBang, but BunsenLabs is called. I installed it on my laptop for study - wi-fi does not work: it starts up and dies quietly. I think this is because of the old core - I watched this before. I tried to transfer configs to Ubuntu - it didn't work out: half the commands there start with the prefix “bl-”, it is clear that this will be incompatible with other distributions. It became obvious that there would be no easy way.
Initially, for my "bare" system there were two options: Debian netinst or Ubuntu server. After the new Debian 9.1 proudly refused to configure Mysql (more precisely, Mariadb) - even after threatening file swings and reading aloud of angry obscene spells from LOR - there was only one option left.
Installed Ubuntu server 16-something. At work. I came home to sit quietly over OpenBox, and the Internet is not working on a laptop. Because at work, I plugged the wire into it before installation, so as not to understand for a long time. And at home Wi-Fi. So what? Where to poke the mouse to choose a wireless network? I went to work, stuck the wire, installed lubuntu-desktop, wi-fi appeared, beauty! Then the joke about the two cowboys recalled: “Don't you think, John, what did we both eat free shit?” That is, I could download and install Lubuntu right away, ready, and not in such a tricky way. The task was a bit different.
The path was even less easy. I had to deal with these your / etc / network / interfaces. Understood, read, experimented. First, I learned how to install the windows themselves - after installing the bare system, you need to write something like:
$ sudo apt install xorg $ sudo apt install openbox obmenu tint2 conky lightdm gdebi geany xarchiver
You may ask: well, ok Xarchiver, but where is Geany here? - So, for example; there is still a big tail from different preferences drawn from different users on the Internet - I'm not the first one who tries to customize OpenBox for myself. But this is not very important. The important thing is that this is an incomplete set, not working!
In the process of experimenting with some “bare” debian-based OS, I learned by heart that, to be able to connect to wi-fi, my / etc / network / interfaces file should look like this:
auto wlp1s0 iface wlp1s0 inet dhcp wpa-ssid _dlink wpa-psk ___0a8396f1a4f6771e4a083691fe
That let me down - what I memorized. I copied the file, but wi-fi does not work. Because somewhere in the middle of experiments, I had a question: I refused LXDE, so maybe Lightdm is not needed for OpenBox? And the answer I got is positive. That is, I eventually did not install it at all. I log in to the console, do something there, and then suddenly I want to poke the windows with the mouse, and I write the sacramental:
$ startx
Because I have such tasks - basically working with the server; and sometimes you want to make this work more convenient - well, there, use several tabs in the file manager, or watch a movie in the next window. I did not check if the “wireless tools” are being installed together with Lightdm or whether these tools are pulling LXDE along with them, but they are not installed without Lightdm and without LXDE. Therefore, a more correctly installation command should look like this:
# ( 1) $ sudo apt install openbox obmenu tint2 xxkb wpasupplicant wireless-tools
Those who do not yet know their long encrypted key for WiFi, can write it into a text file wpa-psk.txt like this:
$ wpa_passphrase _dlink(ssid) __>wpa-psk.txt
Another detail: the magic word wlp1s0 , to access your network interface, you can find out, for example, with the command:
$ ip address
And there you may have a completely different word - for example, wlan0 .
When I get bored with my hands to edit the / etc / network / interfaces file when moving from one building to another, I also know what I will need to do - install NetworkManager:
$ sudo apt install network-manager
Then create a file in your home directory ~ / .config / openbox / autostart (if you don’t already have it) and add two lines to it:
tint2 & nm-applet &
The network describes problems with applets for OpenBox, sometimes arising from the wrong sequence of loadable modules. One of the solutions I found was this: instead of a simple “tint2 &” write:
if which tint2 >/dev/null 2>&1; then (sleep 2 && tint2) & fi nm-applet &
Apparently, the proposed delay of 2 seconds helps the OpenBox autoloader relive a different third-party downloadable boot and then, without interference, display the desired network icon on which you can click the mouse. On wiki.archlinux.org, I saw an even more “slow” construction:
# Xcomppmgr tint2 Openbox if which tint2 >/dev/null 2>&1; then (sleep 2 && xcompmgr) & (sleep 2 && tint2) & fi
In general, of course, such a strategy looks somehow doubtful: we end up aiming at “instant” loading and unloading “X”, otherwise why do we need this way of simplifications - from KDE to XFCE, LXDE, OpenBox?
Where did my Openbox Skate (Conky) team go? This is such an applet (or widget?), Which directly on the desktop shows how much memory you have left and whether the processor is not too hot. I realized that I did not need him as much as Lightdm and Xcomppmgr from the example above. In a developed merphology, there is such a recommendation: before you go to a polyclinic, determine what you will do if the tests are positive; think about what you will do if the tests are negative; Compare your actions - if they are the same in both cases, why would you even go to the clinic?
')
Why do I need to know how much memory is left? If the computer has already begun to slow down much, I already know what to do, for example, close all open windows (“If you have opened something, close it”). And I know (I feel with my fingers) when the laptop overheats, and I also know what to do when it began to overheat all the time - for example, you can try to take it for prevention.
Well, sometimes you need to see who specifically eats more memory - Firefox or Chromium. Not for practical use, of course, but to insert clever remarks later in discussions and bazaars in the forums. But for this, a constantly running applet is not needed, just run the command in the console for a moment:
$ top -oRES
How to live without it? I would be completely satisfied with editing the / etc / default / keyboard file:
XKBMODEL="pc105" XKBLAYOUT="us,ru" XKBVARIANT="," XKBOPTIONS="grp:shifts_toggle,grp:alt_caps_toggle,terminate:ctrl_alt_bksp,compose:ralt,grp_led:scroll"
If it were not for two problems: 1) not always editing this file helps - the keyboard configs while loading the window system are read from several more secret places; 2) it is more convenient for me when different layouts are remembered in different open windows, and this behavior cannot be assigned to windows in the / etc / default / keyboard config.
Therefore, we install another program:
$ sudo apt install xxkb
However, it is already recorded in our common “correct” (Option 1) OpenBox installation command. Then we create a ~ / .xxkbrc file with something like this:
XXkb.controls.add_when_start: yes XXkb.controls.add_when_create: yes XXkb.controls.add_when_change: yes XXkb.controls.focusout: yes XXkb.mainwindow.type: tray XXkb.mainwindow.label.enable: yes XXkb.mainwindow.enable: yes
The language flag will be displayed in the control bar of each window, and each window remembers the current layout. And yes, the layout switch keys themselves should be written to the ~ / .config / openbox / autostart file as such a command:
setxkbmap -layout "us,ru" -option "grp:shifts_toggle,grp:alt_caps_toggle,terminate:ctrl_alt_bksp,compose:ralt,grp_led:scroll" &
My most frequent actions on a computer are to open a file and write something in it. Sometimes it is a coherent Russian text, sometimes something like
body {width:800px; margin:0 auto;}
Often you have to open files over the network - at least to just see what is written there. Therefore, I absolutely need such a "stack" of programs: file manager - ftp, smb, or fish client - a text editor with highlighting and spell checking. And it is also advisable not to enter passwords for remote access every time.
Such tasks can be solved, for example, using the Krusader-Kate bundle of programs. And Kwalletmanager for storing passwords is installed with them. Yes. And another third of KDE, probably. But there's nothing you can do. I tried Tux-commander - it opens files over the network, but does not save it back, at least “out of the box”; and in general, the possibilities are clearly poorer than those of Krusader. The same problems are with the "native" file managers of KDE, XFCE, LXDE. That is, someone does not care, but for me - the problem.
Thus, the installation command is extended by a couple of points: krusader kate krename kdiff3 unrar konsole. Of course konsole - otherwise what will be opened in Krusader when pressing the F2 key (or, in the new version, F9)?
I don’t need the Russification of the system itself: I’m used to typing three letters “doc” in the file manager to navigate to the Documents folder; and if the folder will be called "Documents", you have to switch the layout - is not very convenient. Well, or in Krusader, Alt + s - “Settings” and other notations are already familiar; how it will be in Russian, I even scary to think.
But the spell check - at least from elementary typos - is necessary. She is provided by Kate aspell (or ispell? I confuse them all the time). They need to download local settings. In Libreofise - hunspell, it also needs dictionaries. Well, dictionaries for Firefox - a separate song.
So, along with Libreofis and Firefox itself, the installation command is:
#( 2) $ sudo apt install xinit openbox obmenu tint2 xxkb wpasupplicant wireless-tools \ krusader kate krename kdiff3 unrar konsole libreoffice firefox \ hunspell-ru aspell-ru firefox-locale-ru libreoffice-l10n-ru geany gmrun mc mpv
I completely forgot about mc - there is no default in Ubuntu server, and I put it first, still in the bare console. Geany - for insurance: it is not convenient to work with Kate with any file.
“Why do you need l10n-ru, if you don’t need interface russification?” - the observant Linux user is sure to ask, smiling nastily. - Not for myself. This is my old pain in the back (or lower?): You will install someone once again Linux - and right there cries: I don’t understand anything! everything is not in Russian! Here I have already developed a reflex, one might say. Although it is unlikely, of course, with the withdrawal of another customer from Windows, I will put him OpenBox. But it is necessary to prepare: sometimes users come across who are completely unable to stand up for themselves and are ready to obediently learn all these Alt + F2 and Win + w.
Gmrun is needed to call programs not by mouse from the list in the menu, but directly via Alt + F2, for which the file ~ / .config / openbox / rc.xml should, of course, be written:
<keybind key="A-F2"> <action name="Execute"> <command>gmrun</command> </action> </keybind>
For example, you want the computer to say shutup! shutdown -h 0
- here and Alt + F2 is useful. Of course, it is not very convenient to call a program to fully type its name. In Gmrun, the program names auto-completion works by default when you press the Tab key. This behavior can be changed - so that the prompts pop up immediately and themselves, without Tab. To do this, you need to create a .gmrunrc file in your home folder and write the line to it: TabTimeout = 1
. In the same file, you can specify some other settings; full list of them can be found in the file / etc / gmrunrc; it’s better to copy this file to ~ / .gmrunrc and make the necessary changes at the new location.
Gmrun Alt + F2 with autocompletion of programs is, in essence, the replacement of the menu call by Alt + F3 in XFCE or Alt + F1 in KDE, only without tedious climbing through the “Settings”, “System”, “Internet” type branches ... Unfortunately Openbox’s own “actions” are not there. For example, you cannot call Exit via Gmrun - unload OpenBox itself and return to the console. Or Restart - update the configuration after editing configs. Therefore, several commands still have to be memorized separately: Ctrl + Alt + r - Restart, Ctrl + Alt + 0 - Exit. And for them to work, you need to add the following entries to the file ~ / .config / openbox / rc.xml:
<keybind key="CAr"> <action name="Restart"/> </keybind> <keybind key="CA-0"> <action name="Exit"/> </keybind>
Perhaps such full-time managers like Thunar or PCManFM can mount flash drives. Or even auto-mount when pasting. My Krusader in the “minimal” OpenBox didn’t master: it shows the device, offers to mount, but then says, it’s not enough rights. In the root mode mounts, but Russian letters are displayed with questions. That is, it is necessary, apparently, to tweak something else with scripts or additional utilities. I decided easier - I added two lines to / etc / fstab:
/dev/sdb1 /mnt/fleshka1 vfat noauto,user,rw,codepage=866,iocharset=utf8 0 2 /dev/sdc1 /mnt/fleshka2 vfat noauto,user,rw,codepage=866,iocharset=utf8 0 2
I probably need sdb2 just in case, but I have enough for my flash drives. Now Krusader mounts and unmounts inserted flash drives correctly. If you have additional partitions on local disks you need to work with, it is also better to register them in / etc / fstab right away.
The question remains: why is mpv written at the end of the resulting OpenBox installation command (Option 2)? Given the fact that I still need to configure LAMP or QEMU on my Ubuntu server, this question seems to me somehow small, not worth attention.
It is much more interesting to find out what I was wrong with in my OpenBox configuration and what other configuration options are there; that i forgot. Say, sometimes you need to see two windows at once - for example, a drawing of a keyboard and a text editor (to study the "blind" set). You can after all accurately place these windows on the screen with keyboard shortcuts. And then somehow make OpenBox remember this window layout. And generally save the entire session. That is, there is something to work on.
PS I almost forgot: if you do not use NetworkManager, the auto wlp1s0
line in the / etc / network / interfaces file is better commented out and used to connect to the network command in the console:
sudo ifdown wlp1s0 && sudo ifup -v wlp1s0
(Instead of wlp1s0 - the name of your wireless interface). Otherwise, the Ubuntu download may “hang” for 5 minutes in search of a nonexistent wi-fi access point.
UPD. Flash drives mount hands, of course, quite uncomfortable. As a result, I solved this problem by installing pcmanfm: apparently, it installs the necessary utilities, and after installing it, krusader also normally mounts the connected devices.
At the same time and network-manager installed. But the benefit of the work period was left without him: now I know how to see in detail why wi-fi does not connect (and with the network manager you click on the icon - and nothing happens and you don’t see where the problem is).
In the process of work, a set of applications was formed, which were gradually being reinstalled. As a result, the overall installation command on Ubuntu Openbox, utilities and work programs has grown dramatically. I divided it into two parts. After completing the first part, you can pull out the power cord and continue to work on wi-fi.
sudo apt install xinit openbox tint2 xxkb pcmanfm mc wpasupplicant wireless-tools \ network-manager gmrun
Most likely, wpasupplicant and wireless-tools do not need to be installed separately, if you install network-manager right away, these are options.
sudo apt install language-pack-gnome-ru-base language-pack-gnome-ru synaptic \ gdebi geany xarchiver konsole krusader krename kdiff3 kate zip unrar \ alsa-utils vlc okular gwenview kchmviewer kdesudo gnome-screenshot kde-cli-tools gcc \ zeal lm-sensors cups libapache2-mpm-itk php php-xml php-mysql firefox libreoffice \ calibre firefox-locale-ru libreoffice-l10n-ru hunspell hunspell-ru aspell aspell-ru
In arch linux, you need to separately install the kio-extras package, otherwise sftp will not work in Krusader.
Synaptic is convenient for searching - when you don’t know the name of the program. Lm-sensors installed from fear - when suddenly it seemed that the laptop is warming. And another thing: do not look for the wonderful zeal directory (the link to which Shtucer gave) on other Linux platforms - it seems that such a ready package is only for Ubuntu.
Source: https://habr.com/ru/post/344298/
All Articles