For laptops:
{CODE(colors="shell")}
sudo apt install powertop tlp
{CODE}
For Macbook laptops:
{CODE(colors="shell")}
sudo apt install gpomme wmpomme
{CODE}
Manage keyboard backlight in Lenovo Ideapad with Fn + Space bar:
{QUOTE()}
Some Lenovo laptops have keyboard backlights, and they can be turned on using Fn + Space. There are three states: off, normal and bright.
{QUOTE}
For hybrid graphic cards:
Intel + Nvidia:
Intel + ATI
fglrx-pxpress
For Battery saving - Suspend and Hibernate - Tuxonice Kernel
{CODE(colors="shell")}
sudo apt-get install tuxonice-userui linux-generic-tuxonice linux-headers-generic-tuxonice
{CODE}
Confirmed that problem still exists on a clean install from Ubuntu 13.04 up to 16.04 on a HP Pavillion dv6 i7. I installed the required program to fix the issue with:
{CODE()}
sudo apt-get install ethtool
{CODE}
and we can check the "Wake on lan" current status with:
{CODE(colors="shell")}
user@machine:~$ sudo ethtool eth0 | grep Wake-on
[sudo] password for user:
Supports Wake-on: pumbg
Wake-on: g
{CODE}
If under the option ‘Wake-on:’ it says anything other than ‘__d__’ then it means this feature is enabled.
If it’s enabled then on most occasions it’ll say ‘g’ and you can use the below command to disable it.
{CODE(colors="shell")}
sudo ethtool -s eth0 wol d
{CODE}
You may not have device __eth0__ but __eno1__ or similar (check using command -+ifconfig+- in the command line)
Then enter the previous command to who the status of ‘Wake-on:’ it should say ‘__d__’.
But the thing is, this setting will be lost as soon as you reboot your computer. So to make Ubuntu permanently save the changes, use the below steps.
{CODE(colors="shell")}
gksudo gedit /etc/rc.local
{CODE}
Now simply copy and past the below code into that newly opened configuration file (make sure to paste it above the ‘exit 0’ code).
{CODE(colors="shell")}
ethtool -s eth0 wol d
{CODE}
Replace __eth0__ for your own device name if it's different than this (in my case, it's __eno1__).
Since Ubuntu 12.04, you may to do something else. Let’s first copy the original script to the ‘/etc/pm …’ folder, as if we were to edit the file while keeping it on its original location, then it might get overwritten when your OS receives update. So for that, open the terminal window and enter the below command.
{CODE(colors="shell")}
sudo cp /usr/lib/pm-utils/power.d/disable_wol /etc/pm/power.d
{CODE}
Now enter the below command to edit it.
{CODE(colors="shell")}
gksudo gedit /etc/pm/power.d/disable_wol
{CODE}
Once opened locate a code called ‘wol g’ (you can search for it in the editor) as shown below then simply change the letter ‘g’ to ‘d’.
{img src="https://www.hecticgeek.com/wp-content/uploads/2012/09/Editing-the-disable_wol-script-in-Ubuntu-12.04.jpg"}
Then click on the ‘Save’ button’ and close the editor. Now reboot your PC and when you’ve logged into the desktop use the command -+sudo ethtool eth0 | grep Wake-on+- to know if it’s working or not. If it’s working, then under ‘Wake-on’, now it should say ‘d’ (= disabled).
Open syncthing-gtk UI, and update the syncthing daemon location to -+/usr/bin/syncthing+- if it doesn't get it from there by default, which will be v0.14.16 at the time of this writing {sign user="xavier.depedro" datetime="2016-12-23T08:55:13+00:00"}.
{img src="display466" link="display466" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border"}
Then restart the daemon to get the new and updated binary from the right path, in case you had a previous version of the daemon elsewhere (by default syncthing-gtk downloads a not-so-up-to-date version for you from elsewhere in this path: -+/home/username/.local/bin/syncthing.x64+-)
Otherwise, syncthing-gtk would download an earlier version of the daemon (for instance, v0.14.9 as of the time of this writing {sign user="xavier.depedro" datetime="2016-12-23T08:55:13+00:00"} which is not compatible with the v0.14.14 of the daemon in the sync.evoludata.com or Windows boxes at this time)
Taken from: http://ubuntuforums.org/showthread.php?t=2314905
With the new systemd configuration, the Unity menu's "hibernate" option does not call on pm-hibernate. It instead uses the hibernate and sleep service of logind / systemd. I'm using a tuxonice kernel, and the tlp power management setup on a thinkpad w520, running Ubuntu 16.04 (devel). I think this article is still relevant even if you don't have tlp or tuxonice, since it's systemd that changes how suspend and hibernate work.
When this laptop suspends or hibernates, sometimes the wifi stops working when it wakes back up. The solution is to unload the wifi device driver module prior to sleep, and then reload it upon resume, the way the "hibernate" script does, and "pm-hibernate" also did.
{CODE(colors="shell")}
/etc/systemd/system/wifi-modules-unload-reload.service
{CODE}
{CODE(colors="shell", caption="Contents of the previous file")}
# Unload and reload the wifi modules over suspend / resume.
[Unit]
Description=WIFI modules unload/reload over suspend/resume
Before=sleep.target
StopWhenUnneeded=yes
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/sbin/modprobe -r iwldvm
ExecStop=/sbin/modprobe iwldvm
[Install]
WantedBy=sleep.target
{CODE}
The other problem I had was that, using tuxonice, the user ui program was not visible during the hibernation process. I fixed this with:
{CODE(colors="shell")}
sudo nano /etc/systemd/system/tuxonice-vtswitch.service
{CODE}
{CODE(colors="shell", caption="Contents of the previous file")}
# Switch vt for tuxonice UI
[Unit]
Description=Switch VT for tuxonice UI
Before=sleep.target
StopWhenUnneeded=yes
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/chvt 63 ; /bin/sh -c "/bin/echo -ne '\033%@' > /dev/tty63"
ExecStop=/bin/chvt 7
[Install]
WantedBy=sleep.target
{CODE}
Enable them with:
{CODE(colors="shell")}
sudo systemctl enable wifi-modules-unload-reload.service
sudo systemctl enable tuxonice-vtswitch.service
{CODE}
This worked well in the macbookpro laptop from 2008.
If the previous trick doesn't work (like in a hp laptop with dual graphics card), try this other one:
https://www.youtube.com/watch?v=l8xa-PkDhhk
{CODE()}
sudo gedit /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash'"
to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor acpi_osi='!Windows 2013' acpi_osi='!Windows 2012'"
sudo update-grub
reboot twice!!
{CODE}
However, this didn't work for me. Hibernation or suspending fails in that computer with dual graphics card (ati + intel)
First check if hibernation is compatible with your computer
You should save all of your work before hibernating the computer, just in case something goes wrong and your open applications and documents cannot be recovered when you switch on the computer again.
Run this in a console
{CODE()}
sudo pm-hibernate
{CODE}
Enter your password when prompted.
After you computer turns off, switch it back on. Did your open applications re-open?
If hibernate doesn't work, check if your swap partition is at least as large as your available RAM.
If the hibernate test works, you can continue to use the sudo pm-hibernate command when you want to hibernate.
You can also enable the hibernate option in the menus. To do that, use your favorite text editor to create
{CODE()}
sudo nano /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
{CODE}
Add the following to the file and save:
{CODE()}
[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
{CODE}
Alternatively, if the previous doesn't work for some reason, you can edit this file:
{CODE()}
sudo nano /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
{CODE}
Search for the sections related to "hibernate", and set __ResultActive=no__ to __ResultActive=yes__
{CODE()}
[Disable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
[Disable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes
{CODE}
__Re-enable hibernate in xfce panels__
See http://www.bio.brandeis.edu/~shaikh/linux/suspend.htm
{CODE()}
sudo nano /etc/polkit-1/localauthority/50-local.d/com.ubuntu.desktop.pkla
{CODE}
Content to add:
{CODE()}
[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
{CODE}
From: http://ubunlog.com/ya-disponible-mate-1-12-1-para-ubuntu-15-10-y-16-04-lts/
{CODE(colors="bash", wrap="1", caption="Command on a console")}
sudo add-apt-repository ppa:ubuntu-mate-dev/xenial-mate
sudo apt-get update
sudo apt-get install mate-core mate-desktop-environment mate-desktop-environment-extras mate-dock-applet
{CODE}
If you need to remove it for some reason and reverse the system to its previous state, do:
{CODE(colors="bash", wrap="1", caption="Command on a console")}
sudo apt-get install ppa-purge
sudo ppa-purge ppa:ubuntu-mate-dev/xenial-mate
{CODE}
By default you can get Adobe Acrobat 8.x in the repositories, as far as I see. But you can download 9.x version in English from Adobe website: http://get.adobe.com/reader/otherversions/
For instance, this version: [http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i386linux_enu.deb|AdbeRdr9.5.5-1_i386linux_enu.deb]
For 32-bit system:
{CODE()}
sudo dpkg -i ~/Downloads/AdbeRdr9.5.5-1_i386linux_enu.deb; sudo apt-get -f install
{CODE}
For 64-bit system:
The easier way to install Adobe Reader DEB on 64 bit Ubuntu is using Gdebi, which will automatically install all dependencies.
{CODE()}
sudo dpkg -i --force-architecture AdbeRdr9.5.5-1_i386linux_enu.deb; sudo apt-get -f install
{CODE}
You can Sign PDF documents with PortableSigner, a small Java app that does the job effectively: add the digital signature that can be recognized with Adobe Reader, and it can also place an extra page with a block of text (and you graphical signature as png/jpg in addition if desired) indicating that the document has been digitally signed by a method recognized by Adobe, and you can check the digital signature by means of opening in Adobe Reader the source pdf from that printed document.
See:
https://sourceforge.net/projects/portablesigner/
Sinadura és una aplicació de codi obert feta en Java per a GNU/Linux 64 bits i 32 bits, i Windows, per a la signatura d'arxius amb les signatures oficials que hi ha a Espanya, amb DNI-e i amb certificats digitals com els de la Fábrica Nacional de Moneda y Timbre (FNMT) que són els que empren per omissió a la Seguretat Social i a la Agència Tributària espanyola.
Veure:
* http://www.sinadura.net/es/inicio
* http://guimi.net/blogs/hiparco/firma-digital-con-debian-gnulinux-y-sinadura/
Val a dir que des de LibreOffice també es pot signar documents amb arxius de signatura digital com els de la FNMT).
Most devices work by default with standard procedures since the upgrade to Ubuntu 16.04 (they didn't in Ubuntu 14.04).
But Apple Bluetooth Keyboard seems to fail (since Ubuntu Jaunty in 2009, according to some posts elsewhere). I dream to find some valid workaround...
{CODE()}
xavi@penguinbookpro:~$ hcitool scan
Scanning ...
00:C0:DF:01:62:22 Targus Bluetooth Laser Mouse for Mac (AMB08)
00:22:41:DD:36:4B n/a
{CODE}
My solution was to buy a new bluetooth keyboard with backlight in the keys, for ~ 30€ in Amazon.
It works as is with default procedures. And the battery icon in the top bar of the desktop also displays the battery status of the bluetooth devices (nice!): mouse, keyboard, ... aside of the klaptop battery.
Allow runing mod rewrite in Apache
Edit /etc/apache2/sites-enabled/000-default
and change docroot from /var/www to /var/ww/tiki or your custom path, AllowOVerride from None to All, and ensure that the syntax to allow access to override .htaccess file is set with the syntax for Apache 2.4 ("Require all granted") and not with the former one for Apache2.2 ("Order allow,deny" and "Allow from all")
The file should be left as like:
{CODE(colors="shell", ln="1")}
root@coprinus:~# cat /etc/apache2/sites-enabled/000-default.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
#Order allow,deny
#Allow from all
Require all granted
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0
~/tc~
enable also the mod rewrite in Apache
{CODE(colors="shell", ln="1", caption="commands in a console")}
sudo a2enmod rewrite
sudo service apache2 restart
{CODE}
If you want to enable ssl, you need to run:
{CODE()}
sudo a2enmod ssl
sudo a2ensite default-ssl
sudo service apache2 restart
{CODE}
See:
https://www.elastic.co/guide/en/elasticsearch/reference/5.0/deb.html#deb-repo
Commands on a console:
{CODE(colors="shell")}
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list
sudo apt-get update && sudo apt-get install elasticsearch
{CODE}
Ubuntu 16.04 uses systemd, as it can be queried with:
{CODE()}
ps -p 1
{CODE}
Running Elasticsearch with systemd
To configure Elasticsearch to start automatically when the system boots up, run the following commands:
{CODE(colors="shell")}
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
{CODE}
Info provided in the console standard output:
{QUOTE()}
Synchronizing state of elasticsearch.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable elasticsearch
Created symlink from /etc/systemd/system/multi-user.target.wants/elasticsearch.service to /usr/lib/systemd/system/elasticsearch.service.
{QUOTE}
Elasticsearch can be started and stopped as follows:
{CODE(colors="shell")}
sudo systemctl start elasticsearch.service
sudo systemctl stop elasticsearch.service
{CODE}
These commands provide no feedback as to whether Elasticsearch was started successfully or not. Instead, this information will be written in the log files located in /var/log/elasticsearch/.
By default the Elasticsearch service doesn’t log information in the systemd journal. To enable journalctl logging, the ~np~--quiet~/np~ option must be removed from the ExecStart command line in the elasticsearch.service file.
When systemd logging is enabled, the logging information are available using the journalctl commands:
To tail the journal:
{CODE(colors="shell")}
sudo journalctl -f
{CODE}
To list journal entries for the elasticsearch service:
{CODE(colors="shell")}
sudo journalctl --unit elasticsearch
{CODE}
To list journal entries for the elasticsearch service starting from a given time:
{CODE(colors="shell")}
sudo journalctl --unit elasticsearch --since "2016-10-30 18:17:16"
{CODE}
Check man journalctl or https://www.freedesktop.org/software/systemd/man/journalctl.html for more command line options.
See:
* https://www.elastic.co/guide/en/kibana/5.0/install.html
* https://www.elastic.co/guide/en/kibana/5.0/deb.html
If you don't have that yet, see above to get the gpg-key, the apt-transport-https package and the repository url.
Commands on a console:
{CODE(colors="shell")}
sudo apt-get install elasticsearch
{CODE}
Running Kibana with systemd
To configure Elasticsearch to start automatically when the system boots up, run the following commands:
{CODE(colors="shell")}
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable kibana.service
{CODE}
Info provided in the console standard output:
{QUOTE()}
Synchronizing state of kibana.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable kibana
{QUOTE}
Kibana can be started and stopped as follows:
{CODE(colors="shell")}
sudo systemctl start kibana.service
sudo systemctl stop kibana.service
{CODE}
These commands provide no feedback as to whether Kibana was started successfully or not. Instead, this information will be written in the log files located in /var/log/kibana/.
^''Coprinus usually gets local IP: 192.168.1.133 from eth0 (and 192.168.1.131 or anoher one from wlan when used instead)''^
Since Freenx doesn't seem to be easily installable in Ubuntu 14.04 servers (at least up to the time of this writing {sign user="Xavi" datetime="2014-10-24T13:01:06+00:00"}). Therefore, we can use an open-source equivalent alternative, called __x2go__ (x2goserver and x2goclient), which is maintained for GNU/Linux based servers, and with supported clients for GNU/Linux, Mac and Windows.
Quick howto to turn your machine into an X2Go server:
{CODE(colors="shell")}
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:x2go/stable
sudo apt-get update
sudo apt-get install x2goserver x2goserver-xsession
sudo apt-get install x2gomatebindings # if you use MATE/mubuntu
sudo apt-get install x2golxdebindings # if you use LXDE/lubuntu
{CODE}
You also need to install some desktop environment which is supported by X2Go by default, and in our case, we will install one of the lightest desktops possible: __LXDE__ (see http://wiki.x2go.org/doku.php/doc:de-compat for the full list)
{CODE(colors="shell")}
sudo apt-get install -y lxde
{CODE}
__Notes__:
* Remember to install x2goclient in the client computer in order to connect to the server accordingly.
+ {CODE()}
sudo apt-get install x2goclient
{CODE}
From: https://www.howtoforge.com/tutorial/multiple-usb-writing-on-linux/
To write an ISO image file on multiple USB drives simultaneously, you will need the software that is named “MultiWriter”. Ubuntu users will find it in their default repositories with the package name “gnome-multi-writer”.
{CODE(colors="shell")}
sudo apt install gnome-multi-writer
{CODE}
(a.k.a. "Multi-boot USB disk")
If you want to write multiple ISO images on one USB in order to have the capacity to boot into a selection of systems by using the same pen drive, you can do it with a tool called “MultiSystem”, or with another one called multiboot.
Add the corresponding repository by entering the following commands on the terminal:
{CODE(colors="shell", ln="1")}
sudo add-apt-repository 'deb http://liveusb.info/multisystem/depot all main'
sudo launchpad-getkeys
sudo apt update
sudo apt install multisystem
{CODE}
Open the application and select the device from the list below. Note that the device must be mounted at “/media” and its filesystem must be “FAT32” in order for multisystem to detect it properly.
{REMARKSBOX()}
Watch out that it reports that it will write grub boot loader in the Master Boot Record (of the usb? or the main hard disk of your computer??? )
{REMARKSBOX}
MultiSystem started
{img src="display550" width=600}
On the first tab of the application’s menu, you may add your image files one by one. Just hit the green arrow button and a file manager window will let you navigate your local files.
Add image file in MultySystem
Next, you may select the “Menus” tab which is basically a Grub configurator. It will allow you to set up the grub.cfg configuration file set the colors and background image of the bootloader and compile the menu list.
Grub Configurator
Other options include the use of non-free components like the PLoP boot manager and the FiraDisk. Moreover, in the “Boot” tab, you may select system-specific boot options, or just test-drive your creation in the QEMU system virtualization tool, or in VirtualBox. This of course, presupposes the existence of either in your system.
Other Bootmanagers
If MultiSystem isn’t working for you, you may also try alternatives like the multibootusb or the YUMI that basically do the same thing. In general, I have found that all of these tools are a little bit underdeveloped and often riddled with bugs, so you should have patience and not give up easily. Having a multisystem USB stick is worth your time and effort.
From: https://itsfoss.com/multiple-linux-one-usb/
Web: http://multibootusb.org/
Deb: https://github.com/mbusb/multibootusb/releases/download/v9.2.0/python3-multibootusb_9.2.0-1_all.deb
The recommended filesystem is FAT32, so make sure to format your USB drive before creating a multi-boot USB stick.
{img src="display547" width=600}
You can select the persistence size by dragging the slider under MultiBootUSB tab. Persistence gives you an option to save changes to the USB drive in runtime. (in theory; will it work since Ubuntu 16.04 doesn't seem to use it by default?)
{img src="display548" width=600}
Next time I boot through the USB, I get the option of choosing either of the distributions.
{img src="display549" width=600}
{CODE(colors="shell")}
sudo add-apt-repository ppa:hamishmb/myppa
sudo apt-get update
sudo apt-get install ddrescue-gui
{CODE}
See: http://www.ubuntugeek.com/ddrescue-gui-a-python-script-to-make-it-easier-to-use-ddrescue.html
You can use seceral programs, each one with its pros and cons. A good advice is to use several to combine info to answer your own questions effectively without confusion (if you use wifi repeaters, or different hardware devices, bytes or bits in units, etc)
Console-based programs:
* -+wavemon+-: ncurses based, updated in realtime, showing mac address of the wifi device for instance to which it's connected (useful to distinguish wifi repeater device from wifi source signal device).
* -+speedtest-cli+-: simple yet useful information of upload and download speed (doing tests). You can show bytes or bits as units, and display simple output.
* -+speedometer+-: nice log with bar chart evolution in terminal, but it shows current use, not doing a tgest on its own. You need to run some big upload or download of data to see it reflected in the graph.
* -+vnstat+-: logs network trafic data and has several useful ways to report usages, etc. See: https://humdi.net/vnstat/
* and a few others (see below)
{img src="dl594?display" thumb="y" width=400 rel="box[g]" }
Log of some commands used during some tests
{CODE()}
sudo apt install speedtest-cli
speedtest-cli
speedtest-cli --bytes
speedtest-cli --simple
sudo apt install speedometer
speedometer -r eth0
ifconfig
speedometer -r enx000ec6a79da9
speedometer -r wlp1s0
nmcli dev wifi
watch -n 1 cat /proc/net/wireless
iwconfig wlp1s0 | grep -i --color quality
wavemon
sudo apt install vnstat
vnstat
vnstat -l -i enx000ec6a79da9
vnstat -l -i wlp1s0
{CODE}
You can do some screencasting in small gif files easily through __peek__ app, which can be installed through an external repo:
{CODE()}
sudo add-apt-repository ppa:peek-developers/stable
sudo apt install peek
{CODE}
See: https://github.com/phw/peek
{img src="display596"}
In theory __ktorrent__ (default torrent app in KDE) is able to search torrents, when you enable a special plugin through the "Ktorrent > View > Plugins > Search" option, but it freezes ktorrent in kubuntu 18.04 for me.
However, you can install __qBittorrent__ (available in the repos), which provides an integrated search tools which works out-of-the-box once you follow a few simp0le steps, described here:
https://www.genbeta.com/paso-a-paso/como-usar-qbittorrent-para-buscar-descargar-torrents-tener-que-visitar-ningun-sitio-web
In short, enable to view search options, update search plugins, and start using it.
* ((Lenovo Ideapad 710S-13IKB))
(alias(18.04)) | (alias(1804)) | (alias(Ubuntu18)) | (alias(Ubuntu 18)) | (alias(Ubuntu1804))