Планета Calculate

Облако тэгов

звуковые карты wi-fi udev news полезное работа mail swap abi_x86_32 KDE5 xsel серые листы winbind tracker ДНК cld cp1251 live-flash valve syslog QupZilla kvm cairo-dock автологин настройка цветов принтера freerdp mpg123 форматирование текста профиль пользователя bonding book dwm NetworkManager apvlv CLDG qemu rtorrent uptime rutorrent ati autologin ccze asus n10j press радио mailman BINHOST builder persistence icons bash CSS клавиатура kde5 cldg strategy benchmark форум lm_sensors screenshot alpha пресса feh tun slim maillist lighttpd шаблоны домашний сервер Gnome3 hdmi CSC remoteapp zswap networking flashplayer atom n270 Книги foto тема pam power KDE dhcpcd android textile bond Tor elogv многопоточная закачка asus x86 revision tint browser ati-drivers asterisk lirc vaio games desktop ups ускорение Xorg windows MultiTail BugTracker cpu family mplayer реестр PowerTOP su ПО RT mencoder package unmasking установка net cl-builder vulnerability blog tint2 программист LXC qrencode сайт утилитки на Icon EFI ControlMaster calculate-access помощь день рождение LXD vps рассылка man LTE фидонет pre qupzilla db Calculate E17 wiki umd persistence-mode mirrorselect aufs xfce оптимизация AMD bootchart cryptsetup pxe birthday obmenu доступ rdp emerge radeon pf-kernel udisks ntfs-3g xen grub openbox midori кодировка CP1251 настройка цветов сканера beta keyboard systemd-udevd Calculate package sound gcc handbook ini.env grc MATE kernel pwkl cds командная строка firefox mate make.conf XZ kernek win7 acl jabber recordmydesktop windows 7 tweaks autounmask ext4 minicom двойная загрузка nextcloud #calculatelinux linux tbn bug xmpp виртуализация benchmarking raid Firefox hibernate calculate2 w2k3 маршрутизатор gnome vpn support calculate-install-gui calculate utilities glx-dock CLC 4G calculate utils otter features profile Windows 7 Huawei new tools CDS dns dhcp настройка цветов фотоаппарата Calculate Linux Enlightenment сглаживание udisks-glue reader цветовой профиль icc фидо перенесено костыли распространение pdf cmc dropbox kde xfce pastebin twitter ssh шрифт authentication cls канал wget uksm LVM world мышка день программиста Midnight Commander lxc-desktop sudo kde nano calculate-sources templates temperature pitivi calculate 2.2 portage CMC xchat ПДУ howto muqss theme звук dvcs meta djvu cl-update-profile X linuxdcpp 1C postgresql apache fontconfig lcdfilter fonts шрифты DPI atheros9285 ratigan монитор экран разрешение sony smplayer описание tuxonice flags optimization fonts bluetooth uefi openvpn VirtualBox nm-applet weechat 11.6 backdor qr-code alsa torrent tail forum интервью Audio utilities donation сеты monitoring распространение программ systemd Office security загрузчик dhcp binhost Скоростной алгоритм сжатия LZ4 TV GSC canto браузер CL14 xxkb участие USE samba screensaver MyRuLib lto distro xbmc keyexec python3 Снобизм stage luks pae UTF-8 оптимизация linux lautre дизайн energy saving plan репозиторий Summer Camp 3G курсор мыши dnscrypt install Calculate Utilities Библиотека shorewall gnome3 GPT steam производительность gentoo vlc p2p mp3 Plasma plugn ldap screencast icon w2k8 mc lvm Compose установка Icon в Calculate nexus repo git team CLDC Atheros XFCE cldm сборка из исходников openssh pulseaudio pgo помощь проекту CLDM liveusb ppp0 tap mouse vim перемещаемые профили cl-kernel iptables mirror android kde mtp livecd Gnome cpp livedvd установка linux e4rat calculate3 начало update caffeine binary code dns calculate linux antivirus free documentation calculate-install dmidecode kde и многопоточный звук codelite euse CLSK rip grub2 интернет unclutter freshplayerplugin hdd most openrc container release Либрусек acoola новости SSD bsa font iphone dconf btrfs E17 nut настройка цветов монитора план RSS безопасность ebuild ядро gnome 2 github ncurses markdown почта удаленная сеть qutim разработка xorg packages openldap udisks template calculate postfix ffmpeg ubuntu clementine глобальное меню загрузка CL17 CLSL EAPI 2 CLS обмен опытом E17 Calculate telegram chromium OpenRC Timeless overlay libvirt создание подсветки синтаксиса bittorrent АТС nouveau network calculate-utils server developers вакансия ParaType facebook locale Desktop eudev DNA CCDX irc оптимизация ядра CDS настройка linux atheros calculate linux obconf automagic reestr pptp MidnightCommander cl-console-bg cl CLDX linux CLDL internet history objecticon видео blueman firewall layout Zen softraid CLD подсветка синтаксиса video python dmix debian localepurge google talk-plugin smart блог bash-completion кеширование proxy Icon Calculate USB Creator Calculate Linux Spamassassin брелок programming сервер Cinnamon unicode

Configuring Your Desktop in Calculate Linux 11.9

Добавил(а) Elena GAVRILOVA почти 7 года назад

language Russian

Our brand-new Calculate Linux 11.9 provides a new method of configuring user profiles. In this article, I will try to describe the procedure for Calculate Linux Desktop, focusing on the main operations.

Calculate Utilities

Calculate Utilities were written in Python. They operate throughout the installation and, which is even more important, the system configuration. To set up user profiles, the calculate-desktop package is used. Unlike other utilities, it lets you configure system files as well as user files (within the home directory). As simple as this:

cl-desktop alex
* alex's user account configured...

The setup is performed with the Calculate Utilities templates; we will see them a bit later.

Utility variables

Calculate Utilities have their own sets of variables. Calculate-desktop, for instance, includes variables used for user login/logout. To view these variables, execute cl-desktop -v user_name. Here is my example:

cl-desktop -v alex
...
os_linux_name [r] Calculate Linux Desktop
os_linux_shortname [r] CLD
os_linux_subname [r] KDE
os_linux_ver [r] 11.9
os_locale_lang [r] ru_RU
os_locale_language [r] ru
os_locale_xkb [r] us,ru(winkeys)
os_locale_xkbname [r] us,ru
os_net_hostname [w] calculate
os_root_type [r] hdd
os_x11_composite [r] on
os_x11_height [w] 1050
os_x11_standart [r] 1680x1050
os_x11_video_drv [r] nvidia
os_x11_width [w] 1680
ur_fullname [r] Alexander Tratsevskiy
ur_group [r] family
ur_home_path [r] /home/alex
ur_jid [r] 
ur_login [r] alex
ur_mail [r] 
...

Variable names must include type and destination. The said variables are very important for configuring a system: their values can be inserted in configuration files or used in conditionals.

Calculate templates

Several years before, when we were building a new engine, Calculate Next, for our site, we also wrote some methods to convert layout files to XML and vice versa. Even though we did not build the site engine after all, much of this experience was beneficial for other projects - namely, for creating Calculate Utilities 2.

In most cases, it will be enough to reset some parameters in the configuration file for a service or an application to work as you want them to. Our templates are based on this simple approach; they recognize nearly all popular configuration format, such as apache, bind, compiz, dhcp, dovecot, kde, ldap, openrc, plasma, postfix, procmail, proftpd, samba, squid, xml_gconf, xml_gconf_tree, xml_xfce and xml_xfcepanel. For other formats, you may use the raw format for text files, the bin format for binary files and the patch format for patch files.

Templates are not just configs that can be appended to the system files. They can contain conditionals, functions and, of course, variables. During the joining procedure, the template and the configuration file are converted to the XML format, then merged and after that, XML is converted back to the specified format of the configuration file and copied onto the system.

Example 1. Configuring trusted applications for kwallet (excerpt from kwallertc):

Calculate format=kde path=~/.kde4/share/config

Applications that access is allowed
[Auto Allow]
?os_locale_lang==en_US#
kdewallet=Kopete,KMail,Konqueror,Chromium,Chrome,Network Management,Akonadi Resource,KDE Daemon
os_locale_lang#
?os_locale_lang==ru_RU#
kdewallet=Kopete,KMail,Konqueror,Chromium,Chrome,Network Management,Источник данных Akonadi,Служба KDE
os_locale_lang#
...

For some time, KDE applications have been using localization. To avoid superfluity of locales, the language settings are checked and configured according to the system language.

Example 2. Creating a link to the browser icon that will be shown by default on the bottom panel in XFCE (excerpt from browser.desktop):

 
Calculate exists(/usr/share/applications/calculate-browser.desktop)!= link=/usr/share/applications/calculate-browser.desktop name=10000000030.desktop symbolic force

In the example above, a symlink pointing to the calculate-browser.desktop file is created under the name 10000000030.desktop; the system verifies if this file exists already. If such is the case, the file will be overwriten.

Paths for storing templates

While paths of Calculate Utilities would be of little interest to you, the templates' locations are of paramount importance, since you create your own templates based on these prototypes. For your convenience, all Calculate 2.2 templates are included in one and single package, calculate-templates. At install, the package contents is deployed in the directory /usr/share/calculate/templates. That is where you can find user profile settings. Directory names in templates are not fixed: they are defined in the .calculate_directory file in each respective directory. General rules for templates apply to the directory. Templates used by calculate-desktop are located in /usr/share/calculate/templates/desktop. The .calculate_directory file, which defines this directory, stores the header of the desktop directory template:

Calculate append=skip cl_name==calculate-desktop&&cl_ver>=2.2.1

Templates belonging to the package are explicitly stated, the version of the utilities is checked. User-defined application settings will be stored in the directory /usr/share/calculate/templates/desktop/desktop. For instance, the directory 60-mc-4.7 will contain configuration templates for Midnight Commander.

Configuration events

Calculate Linux uses Portage for managing packages. Portage is a very flexible tool which permits easy handling of third-party projects. By using the profile.bashrc script, Calculate Utilities are integrated with the emerge package manager via the system profile. System configuration with Calculate Utilities will be thus called whenever you install a package. Calculate-desktop looks for templates of the package that is being installed and, if needed, performs the setup. If the settings are not limited by the user profile, the package can modify system files, and Portage will accept them. Paths to the new files and to the files that have been modified, with their hashes, will remain in the local package database.

Apart from installing packages, many other events will be accompanied by software configuration. For instance, when a user logs in via KDM/GDM, if the user has no directory, it will be created and configured. This and other relevant events are described in specific variables, which are used to build conditionals in templates.

Package data

Templates intended for user profile configuration use the standard method of Calculate Utilities and store their settings in ~/.calculate/ini.env. This samba-like file includes 4 primary sections: «main» for main settings, «ver» for software versions, «update» for the flag that disables updating, for each program, and «resource» for the paths to standard user directories. In addition, you can have as many sections as you need; we in Calculate Ltd. use the «office» section to account for some settings that are important to us. When a domain user logs in, their profile is configured with templates. Such configuration is usually required when software is updated or if you want to record some application settings.

ini.env lets you enable or disable updates of one or several applications. You could, for instance, return to the initial program configuration.

Templates in Calculate Linux 11.9: What's new

In most cases, configuring the user profile at login was unnecessary. In Calculate Linux 11.9, we are finally making a clean difference between local users and domain users. While formerly, Calculate Utilities could modify the profiles of the logged in users only, for configuring software before the first start, now all local profiles are configured. Thanks to it, there is no more update before the system starts and logging in is up 5 seconds faster. Should there be any changes, the modified files will be printed when the package is being installed.

You will encounter no more difficulties either when installing from a new ISO image. At the first login, the update utilities will be launched. For instance, if you want to upgrate from KDE 4.6 to 4.7, only one configuration file, nepomukserverrc, will be modified by the template /usr/share/calculate/templates/desktop/desktop/20-kde-4.6-4.7/.kde4/share/config/nepomukserverrc, which contains the following:

Calculate format=kde

[Basic Settings]
Start Nepomuk=true

Before KDE 4.7, though, nobody seemed concerned if Nepomuk daemon was absent...

How we are different

Calculate Linux compared to other distributions

See how distributions compare in handling user profile configuration:
Ubuntu:
uses pre-configured system files; it may use Skel.
Sabayon:
uses the /etc/skel directory, which contains all settings, including configurations of packages that are not installed.
Calculate:
Calculate Utilities templates are used.

Pros and cons

  • pro: More flexibility in setup, in contrast to using /etc/skel, limited with static settings which do not allow you to configure the user login, the screen resolution, hardware-related features, etc.
  • pro: Configuring is done only for the programs installed on the system; if needed, settings can be deleted.
  • pro: Users can create their own templates, thus configuring applications to their liking.
  • pro: You can always revert the changes and use the original configuration.
  • pro: Smooth migration between software versions is supported.
  • con: We recommend to update utility templates before software update.

Calculate Utilities Templates
Template Variables
Storing User Profile Settings

Originally written by Alexander Tratsevskiy for Habrahabr, http://habrahabr.ru/blogs/linux/129658/


Комментарии

Comment

Добавил(а) jane song около 6 лет назад

<strong><a href="http://www.hermes-birkinhandbags.com/hermes-birkin-c-20.html">Hermes Birkin Handbags</a></strong><br>
<strong><a href="http://www.hermes-birkinhandbags.com">Hermes Replica Handbags</a></strong><br>
<strong><a href="http://www.hermes-birkinhandbags.com">Replica Hermes Handbags</a></strong><br>
<strong><a href="http://www.hermes-birkinhandbags.com/hermes-birkin-c-20.html">Hermes Birkin Replica</a></strong><br>
<strong><a href="http://www.hermes-birkinhandbags.com">Hermes Bag Replica</a></strong><br>
<strong><a href="http://www.hermes-birkinhandbags.com/hermes-kelly-c-26.html">Hermes Kelly Handbag</a></strong>

Comment

Добавил(а) jane song около 6 лет назад

<strong><a href="http://www.chanel-j12watch.com">Chanel Watch</a></strong><br>
<strong><a href="http://www.chanel-j12watch.com">Chanel J12</a></strong><br>
<strong><a href="http://www.chanel-j12watch.com">Chanel J12 Watch</a></strong><br>
<strong><a href="http://www.chanel-j12watch.com">Replica Chanel Watches</a></strong><br>
<strong><a href="http://www.chanel-j12watch.com">Chanel Ceramic Watch</a></strong><br>
<strong><a href="http://www.chanel-j12watch.com">Chanel Replica Watches</a></strong><br>
<strong><a href="http://www.chanel-j12watch.com">Chanel J12 Replica</a></strong><br>
<strong><a href="http://www.chanel-j12watch.com">Replica Chanel Watch</a></strong>

Спасибо!