https://wiki.archlinux.org/api.php?action=feedcontributions&user=Zombyrad&feedformat=atomArchWiki - User contributions [en]2024-03-28T22:36:03ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Lemonbar&diff=498082Lemonbar2017-11-23T22:36:54Z<p>Zombyrad: Removed dead package link</p>
<hr />
<div>[[Category:Eye candy]]<br />
[[ja:Lemonbar]]<br />
[https://github.com/LemonBoy/bar lemonbar] is a lightweight bar based on XCB. It provides foreground/background color switching along with text alignment and colored under/overlining of text, full UTF-8 support and reduced memory footprint. Nothing less and nothing more.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{AUR|lemonbar-git}} package.<br />
<br />
== Configuration ==<br />
<br />
Configuration of lemonbar is now completely done via {{ic|screenrc}}-like format strings and command line options as opposed to older versions, where configuration took place at compile-time.<br />
<br />
See the man page for a short overview of those configuration options.<br />
<br />
== Usage ==<br />
<br />
{{ic|lemonbar}} prints no information on its own. To get any text into {{ic|lemonbar}} you need to pipe text into it. The following example would write the text "Hello World" into your bar.<br />
<br />
{{bc|<br />
#!/bin/bash<br />
<br />
# Echo the text<br />
echo "Hello World"<br />
}}<br />
<br />
If you want the text in {{ic|lemonbar}} to update through a script, you need to add the {{ic|-p}} option. This prevents {{ic|lemonbar}} from exiting after stdin is closed.<br />
<br />
==== Colors ====<br />
<br />
{{ic|lemonbar}} uses the following commands to color the text, background or the under/overline. Colors can be specified via the formats {{ic|#RRGGBB}}, {{ic|#AARRGGBB}} (with an alpha channel; this requires a compositor to be running), or even {{ic|#RGB}}.<br />
<br />
The special color {{ic|-}} indicates the default color (which is set by command-line flags, or is otherwise the default white text on a black background).<br />
<br />
{| border="1"<br />
! Command !! Meaning<br />
|-<br />
| {{ic|%{F''color''} }} || Use ''color'' as the foreground/font color<br />
|-<br />
| {{ic|%{B''color''} }} || Use ''color'' as the background<br />
|-<br />
| {{ic|%{U''color''} }} || Use ''color'' for under/overlining the text<br />
|}<br />
<br />
==== Text alignment ====<br />
<br />
{{ic|lemonbar}} also supports alignment of text. It uses the following commands to align the text<br />
<br />
{| border="1"<br />
! Command !! Meaning<br />
|-<br />
| {{ic|%{l} }} || Aligns the text to the left<br />
|-<br />
| {{ic|%{c} }} || Aligns the text to the center<br />
|-<br />
| {{ic|%{r} }} || Aligns the text to the right<br />
|}<br />
<br />
==== Examples ====<br />
<br />
The following example prints the date and time in the middle of the bar, the font's color being {{ic|yellow}} and the background {{ic|blue}} and changes the font/background color back to the default color afterwards. Run it with {{ic|/path/to/script/example.sh &#124; lemonbar -p}}<br />
<br />
{{hc|example.sh|<br />
#!/usr/bin/bash<br />
<br />
# Define the clock<br />
Clock() {<br />
DATETIME&#61;$(date "+%a %b %d, %T")<br />
<br />
echo -n "$DATETIME"<br />
}<br />
<br />
# Print the clock<br />
<br />
while true; do<br />
echo "%{c}%{F#FFFF00}%{B#0000FF} $(Clock) %{F-}%{B-}"<br />
sleep 1<br />
done<br />
}}<br />
<br />
Another example showing the battery percentage. To use this script you need to install {{Pkg|acpi}}.<br />
<br />
{{hc|example.sh|<br />
#!/usr/bin/bash<br />
<br />
#Define the battery<br />
Battery() {<br />
BATPERC&#61;$(acpi --battery &#124; cut -d, -f2)<br />
echo "$BATPERC"<br />
}<br />
<br />
# Print the percentage<br />
while true; do<br />
echo "%{r}$(Battery)"<br />
sleep 1;<br />
done<br />
}}<br />
<br />
==== XFT fonts ====<br />
<br />
The default lemonbar version does not support XFT fonts. To get support for XFT fonts, you need to install {{AUR|lemonbar-xft-git}}, which replaces {{AUR|lemonbar-git}}.<br />
<br />
To use different font with lemonbar, you need to pass {{ic|-f}} option when starting lemonbar e.g. {{ic|lemonbar -f "Roboto Medium"}}.<br />
<br />
===== Font Awesome icons =====<br />
<br />
With XFT support, you can also add [http://fontawesome.io/ font-awesome icons] to your bar. You need to install {{Pkg|ttf-font-awesome}} before using the icons and pass {{ic|-f "Font Awesome"}} to lemonbar. Please note, that you also need to specify one more font (e.g. {{ic|-f "Roboto Medium"}}) to be used for other symbols than font awesome icons if you want something else visible in your lemonbar as font awesome does not contain other symbols.<br />
<br />
Before adding an icon to lemonbar, you need to look up its unicode id on the [http://fontawesome.io/icons/ icon list] and pass it to lemonbar string. Here is a script that displays icon with unicode id {{ic|f242}} in lemonbar: <br />
<br />
{{hc|fontawesome.sh|<br />
#!/usr/bin/bash<br />
echo -e "\uf242 Battery: 0"<br />
}}<br />
<br />
Pay extra attention to {{ic|echo -e}} flag, as it is necessary to properly use echo with escape sequences.<br />
<br />
And corresponding lemonbar command: {{ic|lemonbar -f "Roboto Medium" -f "Font Awesome"}}</div>Zombyradhttps://wiki.archlinux.org/index.php?title=Lemonbar&diff=498081Lemonbar2017-11-23T22:34:37Z<p>Zombyrad: Removed dead AUR link</p>
<hr />
<div>[[Category:Eye candy]]<br />
[[ja:Lemonbar]]<br />
[https://github.com/LemonBoy/bar lemonbar] is a lightweight bar based on XCB. It provides foreground/background color switching along with text alignment and colored under/overlining of text, full UTF-8 support and reduced memory footprint. Nothing less and nothing more.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{AUR|lemonbar-git}} package.<br />
<br />
== Configuration ==<br />
<br />
Configuration of lemonbar is now completely done via {{ic|screenrc}}-like format strings and command line options as opposed to older versions, where configuration took place at compile-time.<br />
<br />
See the man page for a short overview of those configuration options.<br />
<br />
== Usage ==<br />
<br />
{{ic|lemonbar}} prints no information on its own. To get any text into {{ic|lemonbar}} you need to pipe text into it. The following example would write the text "Hello World" into your bar.<br />
<br />
{{bc|<br />
#!/bin/bash<br />
<br />
# Echo the text<br />
echo "Hello World"<br />
}}<br />
<br />
If you want the text in {{ic|lemonbar}} to update through a script, you need to add the {{ic|-p}} option. This prevents {{ic|lemonbar}} from exiting after stdin is closed.<br />
<br />
==== Colors ====<br />
<br />
{{ic|lemonbar}} uses the following commands to color the text, background or the under/overline. Colors can be specified via the formats {{ic|#RRGGBB}}, {{ic|#AARRGGBB}} (with an alpha channel; this requires a compositor to be running), or even {{ic|#RGB}}.<br />
<br />
The special color {{ic|-}} indicates the default color (which is set by command-line flags, or is otherwise the default white text on a black background).<br />
<br />
{| border="1"<br />
! Command !! Meaning<br />
|-<br />
| {{ic|%{F''color''} }} || Use ''color'' as the foreground/font color<br />
|-<br />
| {{ic|%{B''color''} }} || Use ''color'' as the background<br />
|-<br />
| {{ic|%{U''color''} }} || Use ''color'' for under/overlining the text<br />
|}<br />
<br />
==== Text alignment ====<br />
<br />
{{ic|lemonbar}} also supports alignment of text. It uses the following commands to align the text<br />
<br />
{| border="1"<br />
! Command !! Meaning<br />
|-<br />
| {{ic|%{l} }} || Aligns the text to the left<br />
|-<br />
| {{ic|%{c} }} || Aligns the text to the center<br />
|-<br />
| {{ic|%{r} }} || Aligns the text to the right<br />
|}<br />
<br />
==== Examples ====<br />
<br />
The following example prints the date and time in the middle of the bar, the font's color being {{ic|yellow}} and the background {{ic|blue}} and changes the font/background color back to the default color afterwards. Run it with {{ic|/path/to/script/example.sh &#124; lemonbar -p}}<br />
<br />
{{hc|example.sh|<br />
#!/usr/bin/bash<br />
<br />
# Define the clock<br />
Clock() {<br />
DATETIME&#61;$(date "+%a %b %d, %T")<br />
<br />
echo -n "$DATETIME"<br />
}<br />
<br />
# Print the clock<br />
<br />
while true; do<br />
echo "%{c}%{F#FFFF00}%{B#0000FF} $(Clock) %{F-}%{B-}"<br />
sleep 1<br />
done<br />
}}<br />
<br />
Another example showing the battery percentage. To use this script you need to install {{Pkg|acpi}}.<br />
<br />
{{hc|example.sh|<br />
#!/usr/bin/bash<br />
<br />
#Define the battery<br />
Battery() {<br />
BATPERC&#61;$(acpi --battery &#124; cut -d, -f2)<br />
echo "$BATPERC"<br />
}<br />
<br />
# Print the percentage<br />
while true; do<br />
echo "%{r}$(Battery)"<br />
sleep 1;<br />
done<br />
}}<br />
<br />
==== XFT fonts ====<br />
<br />
The default lemonbar version does not support XFT fonts. To get support for XFT fonts, you need to install {{AUR|lemonbar-xft-git}}, which replaces {{AUR|lemonbar}}{{Broken package link|package not found}}.<br />
<br />
To use different font with lemonbar, you need to pass {{ic|-f}} option when starting lemonbar e.g. {{ic|lemonbar -f "Roboto Medium"}}.<br />
<br />
===== Font Awesome icons =====<br />
<br />
With XFT support, you can also add [http://fontawesome.io/ font-awesome icons] to your bar. You need to install {{Pkg|ttf-font-awesome}} before using the icons and pass {{ic|-f "Font Awesome"}} to lemonbar. Please note, that you also need to specify one more font (e.g. {{ic|-f "Roboto Medium"}}) to be used for other symbols than font awesome icons if you want something else visible in your lemonbar as font awesome does not contain other symbols.<br />
<br />
Before adding an icon to lemonbar, you need to look up its unicode id on the [http://fontawesome.io/icons/ icon list] and pass it to lemonbar string. Here is a script that displays icon with unicode id {{ic|f242}} in lemonbar: <br />
<br />
{{hc|fontawesome.sh|<br />
#!/usr/bin/bash<br />
echo -e "\uf242 Battery: 0"<br />
}}<br />
<br />
Pay extra attention to {{ic|echo -e}} flag, as it is necessary to properly use echo with escape sequences.<br />
<br />
And corresponding lemonbar command: {{ic|lemonbar -f "Roboto Medium" -f "Font Awesome"}}</div>Zombyradhttps://wiki.archlinux.org/index.php?title=PhpVirtualBox&diff=172240PhpVirtualBox2011-12-03T19:25:56Z<p>Zombyrad: Fixed minor writing errors</p>
<hr />
<div>[[Category:Virtualization]]<br />
phpVirtualBox is an open source, AJAX implementation of the [[VirtualBox]] user interface written in PHP. As a modern web interface, it allows you to access and control remote VirtualBox instances. Much of its verbage and some of its code is based on the (inactive) vboxweb project. phpVirtualBox was designed to allow users to administer VirtualBox in a headless environment - mirroring the VirtualBox GUI through its web interface. <br />
<br />
== Installation ==<br />
<br />
=== VirtualBox Web Service===<br />
<br />
First, you should choose to install one VirtualBox edition between:<br />
<br />
*the OSE edition in [community]: see [[VirtualBox]];<br />
*the UEL edition in [[AUR]]: [http://aur.archlinux.org/packages.php?ID=9753 virtualbox_bin]. <br />
<br />
To use the web console, you must install [http://aur.archlinux.org/packages.php?ID=44761 virtualbox-ext-oracle] package from AUR.<br />
<br />
=== VirtualBox Web Interface (phpvirtualbox) ===<br />
<br />
Install community/phpvirtualbox on a php-capable web server.<br />
<br />
# pacman -S phpvirtualbox<br />
<br />
== Configuration ==<br />
<br />
=== VirtualBox Web Service ===<br />
<br />
If you are using the OSE edition, do something like this on your virtualbox running machine.<br />
<br />
vboxwebsrv -b --logfile /dev/null --pidfile /var/run/vbox/vboxwebsrv.pid --host 127.0.0.1<br />
<br />
If you are using the UEL edition, there is already a vboxweb script in {{Filename|/etc/rc.d}}, what you need is adjusting the settings in {{Filename|/etc/conf.d/vboxweb}} and then start it like the other daemon.<br />
<br />
For OSE users, you can also use these scripts form UEL edition package, just put the {{Filename|vboxweb.conf}} into {{Filename|/etc/conf.d}} and the {{Filename|vboxweb.rc}} into {{Filename|/etc/rc.d}}, you can get them from the virtualbox_bin AUR page.<br />
<br />
In the {{Filename|/etc/conf.d/vboxweb}}, you should take care of '''VBOXWEB_USER''' variable which should be set to the system username running the the {{Codeline|vboxwebsrv}} command. <br />
<br />
Check that this user is in group '''vboxusers'''.<br />
<br />
=== VirtualBox Web Interface ===<br />
<br />
Edit {{Filename|/etc/webapps/phpvirtualbox/config.php}}<br />
<br />
1. Change the following lines into the system username you previously set in {{Filename|/etc/conf.d/vboxweb}} as well as its password. (Yes,for now, it is clear password here, maybe this could be changed in a future release.)<br />
<br />
var $username = '';<br />
var $password = '';<br />
<br />
2. Change the following line into the ip address and the port your vboxwebsrv is running and listening. For most installations, it should be localhost and tcp port 18083. It is recommended to install your virtualbox web service and the virtualbox web interface on the same machine, because the username and the password you previously set is passing as the clear text.<br />
<br />
var $location = 'http://127.0.0.1:18083/';<br />
<br />
3. If you do not want to use authentication, you can uncomment the following line.<br />
<br />
#var $noAuth = true;<br />
<br />
Edit {{Filename|/etc/webapps/phpvirtualbox/.htaccess,comment}} or remove the following line.<br />
<br />
deny from all<br />
<br />
Edit {{Filename|/etc/php/php.ini}}, make sure the following lines is uncommented.<br />
<br />
extension=json.so<br />
extension=soap.so<br />
<br />
If you are running apache as webserver, you can copy {{Filename|/etc/webapps/phpvirtualbox/apache.example.conf}} into {{Filename|/etc/httpd/conf/extra/phpvirtualbox.conf}}, and then add following line into {{Filename|/etc/httpd/conf/httpd.conf}}<br />
<br />
Include conf/extra/phpvirtualbox.conf<br />
<br />
To use the web console, you should install the [http://aur.archlinux.org/packages.php?ID=44761 virtualbox-ext-oracle] package from AUR, and then change the virtual machine setting, enable the remote desktop access on display panel and specify an port different with other virtual machines.<br />
<br />
== Running ==<br />
<br />
If everything works fine, visit http://YourVboxWebInterfaceServer/phpvirtualbox and it should show a login box. The initial username and password are both admin, but after login, you can change your password and control users from the web interface. If you set $noAuth=true in the config.php, you should immediately see the phpvirtualbox web interface.<br />
<br />
== Debugging ==<br />
<br />
If you encounter a login problem, and you are upgrade your virtualbox from 3.2.x to 4.0.x, you should run the following command to update you websrvauthlibrary in you virtualbox configuration file which has been changed from {{Filename|VRDPAuth.so}} to {{Filename|VBOXAuth.so}}.<br />
<br />
VBoxManage setproperty vrdeauthlibrary default<br />
VBoxManage setproperty websrvauthlibrary default <br />
<br />
If you are still unable to login into the interface, you can try to disable webauth by<br />
<br />
VBoxManage setproperty websrvauthlibrary null<br />
<br />
on virtualization server and set username and password to empty strings and set $noAuth=true in {{Filename|/etc/webapps/phpvirtualbox/config.php}} on web server. By doing this, you should immediatelly access the web interface without login process. And then, maybe you can try some apache access control.<br />
<br />
== External Resources ==<br />
* [http://code.google.com/p/phpvirtualbox/ PHPVirtualBox Home Page]<br />
* [http://www.torrent-invites.com/software/101718-manage-your-virtualbox-vms-via-web-phpvirtualbox.html Manage your VirtualBox VMs via the web with phpVirtualBox]</div>Zombyradhttps://wiki.archlinux.org/index.php?title=Install_Arch_Linux_via_SSH&diff=148668Install Arch Linux via SSH2011-07-09T13:23:35Z<p>Zombyrad: </p>
<hr />
<div>{{i18n|Install from SSH}}<br />
<br />
==Intro==<br />
This article is intended to show users how to install Arch remotely via an SSH connection. Consider this approach over the standard one in scenarios such the following:<br />
<br />
Setting up Arch on...<br />
*HTPC without a proper monitor (i.e. an SDTV).<br />
*A PC located in another city, state, country (friend's house, parent's house, etc.)<br />
*A PC that you would rather setup remotely, for example from the comfort of one's own workstation with copy/paste abilities from the Arch Wiki.<br />
<br />
{{Note|The first two steps require physical access to the machine. Obviously, if physically located elsewhere, this will need to be coordinated with another person!}}<br />
<br />
== Boot from Media==<br />
Boot into a live Arch environment via the [[https://wiki.archlinux.org/index.php/Beginners%27_Guide#Step_1:_Obtain_the_latest_Installation_media live CD/USB image]] and log in as '''root'''.<br />
<br />
== Setup the Live Environment to use SSH ==<br />
One should be presented with the root prompt '''[root@archiso ~]#''' at this point.<br />
<br />
Firstly, setup the network on the target machine:<br />
aif -p partial-configure-network<br />
<br />
It will present you with a list of known interface; type in the interface you would like to use (eg: eth0 for wired Ethernet interface)<br />
<br />
Secondly, sync the live environment to a mirror, install the openssh package, and start it:<br />
pacman -Syy <br />
pacman -S openssh<br />
/etc/rc.d/sshd start<br />
<br />
{{Note|Depending on the age of the install media, pacman may complain that '''it''' should be upgraded first. Since the goal is to simply install the openssh package, it s recommended to deny this request and simply install the single package.}}<br />
<br />
Finally, allow sshd connections and setup a root password which is needed for an ssh connection; the default arch password for root is empty.<br />
<br />
echo "sshd: ALL" >> /etc/hosts.allow<br />
passwd<br />
<br />
== Connect to the Target PC via SSH ==<br />
Connect to the target machine via the following command:<br />
$ ssh root@ip.address.of.target<br />
<br />
From here one is presented with live environment's the welcome message and is able to administer the target machine as-if sitting at the physical keyboard.<br />
<br />
<pre>$ ssh root@10.1.10.105<br />
root@10.1.10.105's password: <br />
Last login: Thu Dec 23 08:33:02 2010 from 10.1.10.200<br />
**************************************************************<br />
* To begin installation, run /arch/setup *<br />
* You can find documentation at *<br />
* /usr/share/aif/docs/official_installation_guide_en *<br />
* *<br />
* i18n: Use the 'km' utility to change your keyboard layout *<br />
* and console font. *<br />
* *<br />
* If you are looking to install Arch on something more *<br />
* exotic, such as your kerosene-powered cheese grater, *<br />
* please consult http://wiki.archlinux.org. *<br />
* *<br />
**************************************************************<br />
[root@archiso ~]#</pre><br />
<br />
===Notes===<br />
*If the target machine is behind a firewall/router, the default ssh port of 22 will obviously need to be forward to the target machine's LAN IP address. The use of port forwarding is not covered in this guide.<br />
*One can edit {{Filename|/etc/ssh/sshd_config}} on the live environment prior to starting the daemon for example to run on a non-standard port if desired.<br />
<br />
==Next Steps==<br />
The sky is the limit. If the intent is to simply install Arch from the live media, run {{Filename|/arch/setup}}. If the intent is to edit an existing Linux install that got broken, follow the [[Install from Existing Linux]] wiki article. <br />
<br />
Want [[grub2]] or the ability to use [[GPT]] hardrives?<br />
<br />
*Manually partition the target HDD/SDD using the '''gdisk''' utility installed via ''pacman -S gdisk'' before starting the arch installer and when presented with the option to install a boot loader in the installation framework, simply answer no and drop back to the live environment's root prompt.<br />
*Installation of grub2 is trivial at this point. Simply chroot into the fresh arch install (default pre-mounted if coming out of the installer) then install and setup grub2:<br />
<br />
cd /mnt<br />
rm console ; mknod -m 600 console c 5 1 <br />
rm null ; mknod -m 666 null c 1 3 <br />
rm zero ; mknod -m 666 zero c 1 5<br />
mount -t proc proc /mnt/proc<br />
mount -t sysfs sys /mnt/sys<br />
mount -o bind /dev /mnt/dev<br />
chroot /mnt /bin/bash<br />
<br />
Now inside the fresh Arch chroot:<br />
<br />
pacman -S grub2<br />
grep -v rootfs /proc/mounts > /etc/mtab<br />
<br />
Edit {{Filename|/etc/default/grub}} to your liking.<br />
Install grub and generate a grub.cfg<br />
<br />
grub-install /dev/sdX --no-floppy<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
{{Note|The above assumes that if the user intends to boot from a GPT disk, the user has fully read and understood the aforementioned wiki articles and has made a 1M partition ef02 for grub2.}}<br />
<br />
When ready to reboot into the new Arch install, exit the chroot and unmount the partitions prior to a reboot of the system.<br />
<br />
exit<br />
umount /mnt/boot # if mounted this or any other separate partitions<br />
umount /mnt/{proc,sys,dev}<br />
umount /mnt</div>Zombyrad