Debian packages – list and install on another server.

To list all currently installed packages, type “dpkg –get-selections”. You can save this data to a file by running “dpkg --get-selections > ~/packages.txt“.
And then place this file on another system and install the listed packages by running “cat packages.txt > sudo dpkg --set-selections && sudo apt-get dselect-upgrade“.
Also, the list of packages can be loaded for installation by running “dpkg --clear-selections && sudo dpkg --set-selections < packages.txt".
This could be used also for recovery. This trick is helpful when a system must be reinstalled, then all of the same packages can be installed all at once.
Sometimes, the output of "dpkg --get-selections" may list packages marked to be uninstalled or some other status. If so happens, use the following "dpkg --get-selections | grep -w install$ > ~/packages.txt". I mean, "| grep -w install$"

Add a screensaver to Ubuntu 12.04.

Ubuntu 12.04 does not ship with any screen savers, just a black screen that appears when your system is idle. If you would like to have a screensaver, please follow the steps below:

Uninstall a gnome-screensaver.
sudo apt-get purge gnome-screensaver

Install XScreenSaver.
sudo apt-get install xscreensaver xscreensaver-gl-extra xscreensaver-data-extra

Create a symbolic link for Ctrl+Alt+L is the default shortcut that locks your computer.
sudo ln -s /usr/bin/xscreensaver-command /usr/bin/gnome-screensaver-command

Finally, add the xscreensaver -nosplash to the Startup Applications.

Desktop doesn't remember brightness settings after a reboot.

Every time I reboot my laptop the brightness goes back to 100% in Gnome. I wish it would keep the last one setting. Here is a quick workaround for that:-) edit the /etc/rc.local file by typing: vim /etc/rc.local and add the following line:
echo 5 > /sys/class/backlight/acpi_video0/brightness

It looks like this:
root@ProBook:~# cat /sys/class/backlight/acpi_video0/brightness
20
root@ProBook:~# echo 5 > /sys/class/backlight/acpi_video0/brightness
root@ProBook:~# vim /etc/rc.local
root@ProBook:~# cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
echo 12 > /sys/class/backlight/acpi_video0/brightness

exit 0
root@ProBook:~#

After the reboot the Gnome keeps our settings 🙂

Ubuntu, Citrix, and SSL-error 61

I just attempted to install the newest Linux Citrix ICA client on my machine, and upon a successful install, an error similar to this one popped up when trying to run the client from Firefox:

SSL error
Contact your help desk with the following information:
ble, ble ...
the issue of the server's security certificate (SSL error 61).

The solution is to make Firefox’s certificates accessible to Citrix, like so:


sudo ln -s /usr/share/ca-certificates/mozilla/* /opt/Citrix/ICAClient/keystore/cacerts

I didn’t test it on the Debian yet.