How do I get ufw to start on boot? UFW is not starting for me on boot. My /etc/ufw/ufw.conf file looks like this:
# /etc/ufw/ufw.conf
#

# Set to yes to start on boot. If setting this remotely, be sure to add a rule
# to allow your remote connection before starting ufw. Eg: 'ufw allow 22/tcp'
ENABLED=yes

# Please use the 'ufw' command to set the loglevel. Eg: 'ufw logging medium'.
# See 'man ufw' for details.
LOGLEVEL=low

So it seems it should start ok. However straight after boot I always get this:
$ sudo ufw status
Status: inactive

Using the "service" script to start it does not seem to work:
$ sudo service ufw start
$ sudo ufw status
Status: inactive

If I force a reload it will work just fine:
$ sudo ufw reload
Firewall reloaded
$ sudo ufw status
Status: active

And after that the "service" script works just fine:
$ sudo ufw status
Status: active
$ sudo service ufw stop
$ sudo ufw status
Status: inactive
$ sudo service ufw start
$ sudo ufw status
Status: active

How do I get ufw to start on boot?
Edit:
I am using Ubuntu 18.04 so systemd is being used. systemctl is-enabled reports as follows:
$ sudo ufw status verbose
Status: inactive
$ sudo systemctl is-enabled ufw.service
enabled

I also tried this:
$ sudo systemctl enable ufw
Synchronizing state of ufw.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable ufw
$ sudo ufw status verbose
Status: inactive

And after a reboot it remains inactive. journalctl -p err reports nothing interesting. journalctl -u ufw reports:
$ journalctl -u ufw
...<snip>...
-- Reboot --
May 26 12:53:36 matt-laptop systemd[1]: Started Uncomplicated firewall.

So it certainly appears that it is attempting to start up ufw...it just seems that it doesn't actually do it!

I came up with a solution of sorts. I made this edit to /lib/systemd/system/ufw.service:
$ diff -u ufw.service.orig ufw.service
--- ufw.service.orig    2018-05-26 13:45:48.696356561 +0100
+++ ufw.service 2018-05-26 13:46:04.443673265 +0100
@@ -2,7 +2,7 @@
 Description=Uncomplicated firewall
 Documentation=man:ufw(8)
 DefaultDependencies=no
-Before=network.target
+After=network.target

 [Service]
 Type=oneshot

So, this causes ufw to start after the network is up instead of before it. This seems to do the trick - ufw is always enabled after I boot. I don't know if this is the best way to do things. I worry that there is a small window of time between the network starting and the firewall starting... but at least it starts which is better than before!
Maybe someone can come up with a better solution. Or maybe this is the correct way to do things - in which case is it a bug that it defaults to starting before the network?
Edit:
An even better solution is:
$ diff -u ufw.service.orig ufw.service
--- ufw.service.orig    2018-05-26 13:45:48.696356561 +0100
+++ ufw.service 2018-05-26 14:17:22.030681670 +0100
@@ -2,7 +2,7 @@
 Description=Uncomplicated firewall
 Documentation=man:ufw(8)
 DefaultDependencies=no
-Before=network.target
+After=network-pre.target

 [Service]
 Type=oneshot

According to this page
https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
the network-pre.target has this purpose:

Its primary purpose is for usage with firewall services that want to establish a firewall before any network interface is up.

Which really makes me wonder why it wasn't set to this by default. Setting it to this value seems to solve all my problems.

Edit the file:

/etc/ufw/ufw.conf

Set to yes to start on boot. If setting this remotely, be sure to add a rule
to allow your remote connection before starting ufw. Eg: ufw allow 22/tcp

ENABLED=yes
ufw allow 22/tcp

Please use the ufw command to set the loglevel. Eg:

ufw logging medium

See 'man ufw' for details.

LOGLEVEL=low


How to install Windows alongside Linux? I know that there is a way in which, one can install Linux or Ubuntu on Windows easily but, what about installing Windows on Linux or Ubuntu i.e If I have a machine with only Ubuntu, how can I install Windows on it without removing Ubuntu?

I don't want to do this in a Virtual Machine. I  just want to have two OS in a single hard drive.

You can install Windows from inside Linux onto your physical hard drive, but you need separate partition as NTFS or FAT32. Below is a way to use a virtual machine to do the actual installation, but it's performed on your hard drive.

Prepare a new partition onto where you want to install Windows.
Start the Windows installation with a Qemu virtual machine and your physical hard drive mapped (target partition can't be mounted):

qemu -hda /dev/sda -cdrom winxp.iso -m 1G -boot d --enable-kvm

Install Windows on the partition you created.
Reinstall Grub (if partition isn't first, you need to do a trick with mapping hd's, its working for me).

I think know what your trying to say I think you mean install Windows over Ubuntu. Just put your windows Operating System Disk in you PC and just install it over Ubuntu. But I don't know if you have important files on your Ubuntu OS so save all your usb,sd, or a disk.


wget only download the index.html in each and every folder for example:

wget -m https://www.kali.org

No warnings, no errors; What can be wrong?

just to get more complicated I used the recommended command (see below) and the output is not satisfactory (yet):

wget --recursive --no-clobber --page-requisites --html-extension --convert-links --domains=kali.org www.kali.org
Both --no-clobber and --convert-links were specified, only --convert-links will be used.
URL transformed to HTTPS due to an HSTS policy
--2019-07-04 14:13:38--  https://www.kali.org/
Resolving www.kali.org (www.kali.org)... 192.124.249.10
Connecting to www.kali.org (www.kali.org)|192.124.249.10|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18714 (18K) [text/html]
Saving to: ‘www.kali.org/index.html.gz’

www.kali.org/index.html.gz      100%[=======================================================>]  18.28K  --.-KB/s    in 0.01s

2019-07-04 14:13:38 (1.84 MB/s) - ‘www.kali.org/index.html.gz’ saved [18714/18714]

FINISHED --2019-07-04 14:13:38--
Total wall clock time: 0.3s
Downloaded: 1 files, 18K in 0.01s (1.84 MB/s)
Converting links in www.kali.org/index.html.gz... nothing to do.
Converted links in 1 files in 0 seconds.

But ... mirrored https://www.cnn.com - for instance

  Ubuntu 19.04 Codename: disco

some pages are loaded as "view page source":

<!doctype html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0" />
  <link href='./index.css' rel='stylesheet' type='text/css'>
  <title>crontab.guru - the cron schedule expression editor</title>
  <meta name="description" content="An easy to use editor for crontab schedules.">
  <meta name="google-site-verification" content="QPa8OWuMuIsXgvuvPdfSCxA4ewd2Gs5tTUh0k2crBPE" />

crontab guru

The quick and simple editor for cron schedule expressions by Cronitor

loading...

and again the tree directory was not downloaded.

This will work, it will copy the website locally.

If that is what you want, please use the command as follows ( change domain.com to your desired domain ):

wget --recursive --no-clobber --page-requisites --html-extension --convert-links --domains=domain.com domain.com

--recursive means: download the whole site.
--no-clobber means: do not overwrite existing files.
--page-requisites means: download all the components of the page including images.
--html-extension means: save the pages as .html files.
--convert-links means: convert all the links to run locally ie. offline.
--domains=domain.com means: do not follow links outside this domain.

Notice:

Some web-servers use compression with served pages and wget will download a compressed file index.html.gz like so:

  2019-07-04 14:13:38 (1.84 MB/s) - ‘domain.com/index.html.gz’ saved
  [18714/18714]

In this case wget needs an extra option --compression=auto or --compression=gzip to correctly handle and decompress pages locally. You can use the command with this option like so ( change domain.com to your desired domain ):

wget --compression=auto --recursive --no-clobber --page-requisites --html-extension --convert-links --domains=domain.com domain.com

For further reading, please refer to Wget - The non-interactive network downloader

I have the same issue.

Try this command:

wget --wait 1 -x -H -mk http://site.to.mirror/


After upgrading to 13.04 Unity interface is not showing I've upgraded to Raring last night. The upgrade itself went okay, no errors. But when I rebooted the computer afterwards and logged in to my Unity session, all I could see was the Desktop background (together with Desktop icons), and no Unity interface. The Super button shortcut wasn't showing the Dash, there was no top panel etc. Please see the screenshot.

As a hint, I'm suspecting it's got something to do with my switchable graphics. I'm running Ubuntu on Acer Aspire AS5830TG with nVidia GT540M and an Intel integrated card. In 12.10 I was using Bumblebee to manage the graphic card switching. During the upgrade I saw something related to nvidia had to be uninstalled, but didn't pay much attention to it. I can't be sure if it has anything to do with my problem though.

What could possibly go wrong?

This worked for me:

Press Ctrl+Alt+T to open a terminal window.
At the terminal prompt, type ccsm. If the CompizConfig Settings Manager window appears, skip to step 5. If not, continue with step 3.
Type sudo apt-get install compizconfig-settings-manager. Type your password when prompted.
At the next terminal prompt, type ccsm.
In CompizConfig Settings Manager, select the check box for the OpenGL plugin if it isn't already selected.
Click the Ubuntu Unity Plugin item.
Select the Enable Ubuntu Unity Plugin check box, if it isn't already selected. If it is already selected then uncheck this and again select it.
Exit from the CompizConfig Settings Manager.
Press Ctrl+Alt+Delete. When asked, confirm that you want to log out.
I did a cold reboot at this point. I'm not sure it's necessary, but I'm a bit paranoid.

After this, Unity came up as it's supposed to for me.

I have a 64-bit AMD Phenom CPU and an nVidia GPU; I'm running 64-bit Ubuntu with the nvidia-current driver set, and I've just upgraded to 13.04 (at which point Unity disappeared).

I just uninstalled the ATI driver and reinstalled it and everything is fine.

My system features hybrid graphics and I installed driver 13.1 from AMD website for discrete card and everything was fine until I update my system and rebooted it. After I logged on the screen goes black and the Unity wont start. I do a lots of googling, and do the Unity reset but that does not fix it. Reinstalling the ATI driver fixed it in the end.


Russian on-screen keyboard In ubuntu 17.04 I could use a Russian keyboard on screen. Now in 17.10 when I change to a Russian keyboard the on-screen keys are still in English. How can a get the on-screen keys in Russian?

Try Use an on-screen keyboard, from Ubuntu's official documentation


How can I change location of login dialog in GDM? How can I change location of login panel on Ubuntu 10.10 start up page, where entering password. I want to move it down and now it is in center of screen

thank you

If you want to change stuff at your login screen, I find it easiest to do like this:

Log out

Press ctrl+alt+F1

log in with your username and password

Run the following commands

export DISPLAY=:0.0
sudo -u gdm gnome-terminal

Press ctrl+alt+F8

Use the terminal there. For example gnome-appearance-properties.

If you are referring to the screen where you enter your user name and password to login to the system on startup (gdm) then there is no permanent way to change this (technically there is a way to change it, but only temporarily; it would require for you to change the theme)

follow this at your own risk!!!!!!!!!!!!!!!!!!!!!!!!!

alt+f2>gksu -u gdm gnome-appearance-properties>click on customise>change your windows border theme.

the next time you log in, you should be able to move the login panel, but it will reset every time you log in


How to make a Quickly project standalone? I have a Quickly project. But now I want it to be independent from Quickly.

How can I do it? How can I run it without typing 'quickly run'?

To run your application standalone, you can build a package. The Quickly wiki page describes how to build packages and also how to distribute them to users:

  How to play with package and release:

  optional, but recommended to build first your package locally

  $ quickly package

  BE WARNED: the two following commands will connect to Launchpad. You
  need to have a Launchpad account and a PPA already created.

  For quickly release, you also need a project on Launchpad to which you
  can bind your work, as well as keys set up:

  $ quickly release

  or

  $ quickly share


Shortcut to clear command line terminal Is there a shortcut to clear the command line when typing in it instead of keeping backspace pressed for a few long seconds?

I ask because I regularly use the Tab key to automatically fill in file names when using bash commands in the Terminal. For example instead of typing cd this_is_a_long_file_name, I will type cd th<Tab>. But then I realize I have filled in the wrong command/filename and I have to hold down backspace to clear everything and repeat the process.

Ctrl+U will only clean from the cursor to the beginning of the line, so if the cursor is at the end of the line, all the line will be cleaned, and if not, there will remain the characters after the cursor.

For a complete answer, I will say:

Ctrl+U - clear all the current line from the end to the beginning only if the cursor is at the end of the line.

You can then recall the cleared line with Ctrl+Y if you need.

Ctrl+K - clear all the current line from the beginning to the end only if the cursor is at the beginning of the line.

You can then recall the cleared line with Ctrl+Y if you need.

Ctrl+W - clear the previous word in the current line. For example if you have typed a command like git diff /path/to/some/file and you want to delete just the last parameter to the command, Ctrl+W is very useful.

You can then recall the cleared data using Ctrl+Y if you need.

Ctrl+E Ctrl+U - move the cursor to the end of the line and clear all the current line from the end to the beginning.

You can then recall the cleared line with Ctrl+Y if you need.

Ctrl+A Ctrl+K - move the cursor at the beginning of the line and clear all the current line from the beginning to the end.

You can then recall the cleared line with Ctrl+Y if you need.

Ctrl+C - my favourite - cancel the current command line, which implies clear all the current line no matter where the cursor is.

Disadvantage: you can't recall the cleared line anymore.

Alt+Shift+# - comment the current line, keep it in the history and bring up your prompt on a new line.

Use Ctrl-c to cancel the current command, this also works if you haven't yet pressed enter. It will not clear the terminal though, only bring up your prompt on a new line. To clear the visual part of the terminal, you may press Ctrl-l


Cannot install Nvidia drivers I have 12.04 running on Intel dual core with Nvidia 8400 GS.
I had installed the post-relase updates for Nvidia, but encountered some problems, so removed [deactivated] them through "Aditional drivers".

After restarting, when I went to install the recommended version current drivers through "Additional drivers", I get the following error:

Sorry, installation of this driver failed.

Please have a look at the log file for details: /var/log/jockey.log

Remove all possibly installed packages:

sudo apt-get remove nvidia-173 nvidia-current nvidia-current-updates

Clean up:

sudo apt-get autoclean
sudo apt-get autoremove

Install driver:

sudo apt-get install nvidia-current-updates

To install/Update Nvidia card drivers open Terminal and copy the following commands in the terminal:

sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current

When installation complete restart your PC. Now to check the installation is successful Press Window/Super key and type: nvidia x server settings and open it.

That's it Enjoy.


My bash script only opens editor, why doesn't it run? I created a script to dd sdb to sdc on my older computer with Ubuntu 13. It ran when I clicked on it – asked if I wanted to run in terminal or edit it. On a newer computer, with Ubuntu 14, I created the same script on my desktop and made it executable, but when I click on it, the file simply opens in an editor with no opportunity to execute it.
So I copied the 'Simple Bash Example' script from "How do I create a script file for terminal commands?" and made it executable. Same result; click on it and the file simply opens in an editor with no opportunity to execute it.
(I have not tried reverting to Ubuntu 13.)  What am I doing wrong?

Sorry if I wasted anyone's time.
The answer is in Bash script with execution permissions won't run with dbl click --  which I found in Linked and Related. Thank you for UBUNTU.


PHP not working after upgraded to Ubuntu 17.10 After I upgraded to Ubuntu 17.10, PHP totally stopped working.
Everything works fine in Ubuntu 17.04.
The code for info.php as follows does not work:

<?php
phpinfo();
?>

It is not showing PHP information, it only shows the source code like above.

Open terminal with ALT + CTRL + T and type in these commands:

sudo a2enmod php7.1
sudo systemctl restart apache2

I also had that problem on Ubuntu 17.10, but only my Firefox 57.0.1 (64bit) couldn't open the phpinfo and the phpmyadmin (and wordpress) files.

The tips in the other answers didn't help me. I reinstalled LAMP-Server and Firefox. Still the same. Finally I installed Chromium and there phpinfo and phpmyadmin work.

Also, Firefox 57 from another fresh installed Ubuntu 17.10 can open phpinfo and phpmyadmin. It looks like something went wrong during do-release-upgrade.


Deb package created using fpm but giving error while depackaging I created a deb package of https://github.com/manojgudi/sandhi using fpm. The package was successfully created but on de-packaging on another system it gives me the following error :

dpkg: warning: parsing file '/var/lib/dpkg/tmp.ci/control' near line 8 package 'sandhi':
`Depends' field, reference to `git-core':
implicit exact match on version number, suggest using `=' instead
dpkg: error processing sandhi-1.0_amd64.deb (--install):
parsing file '/var/lib/dpkg/tmp.ci/control' near line 8 package 'sandhi':
`Depends' field, reference to `git-core': version contains ` '
Errors were encountered while processing:
sandhi-1.0_amd64.deb

I am new to this. Please suggest what to do.

You should follow these steps, may work for you.

1) .deb file install in root path only so root path command: sudo su

2) then find the your your .deb file in which folder

3) using ls command show the particular folder files.

4) then find your .deb package file.

5) deb package command as dpkg -i ./your_file_name then Enter

6) may be work for you. I am install virtualbox.deb file in my ubuntu(LInux-14.04v).


How to remove icons from ''all applications''? I installed Star Wars: Battlefront 2 through Wine and then I uninstalled it. But icons for that game are still in my all applications panel. There is icon for another game also.

I want to remove those icons. How do I do that ?
I am using Linux Ubuntu GNOME (14.10).

Certain desktops come with a menu editor, in which you could remove the entries.

Else, open the directory .local/share/applications/ in a terminal or file browser and remove the .desktop files you don't need any longer.

it is too easy but it is looks too hard really. I searched everywhere how to do it but found no accurate answers at all.
What I did was:

Open the files application
Click on the search bar and search the name of the application

Surely you will find the application name with .desktop extension. Delete that file completely but if it is not showing than you will surely see a folder with the name of the application.  In that folder you will see the application with .desktop extension. Delete that and it's done.


apt-get update throwing errors I am trying to run sudo apt-get update && apt-get upgrade -y but it is throwing series of errors. I am new to Linux environment.

I am using Ubuntu 18.04 Bionic Beaver

sudo apt-get update && apt-get upgrade -y
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://ppa.launchpad.net/persepolis/ppa/ubuntu bionic InRelease
Hit:3 http://dl.google.com/linux/chrome/deb stable Release
Err:5 http://archive.canonical.com/ubuntu bionic InRelease
502  Connection timed out [IP: 2001:67c:1360:8c01::16 80]
Err:6 http://security.ubuntu.com/ubuntu bionic-security InRelease
502  Connection timed out [IP: 2001:67c:1562::16 80]
Err:7 http://in.archive.ubuntu.com/ubuntu bionic InRelease
502  Connection timed out [IP: 2001:67c:1360:8001::21 80]
Err:8 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease
502  Connection timed out [IP: 2001:67c:1360:8001::21 80]
Err:9 http://security.ubuntu.com/ubuntu artful-security InRelease
502  Connection timed out [IP: 2001:67c:1562::16 80]
Err:10 http://in.archive.ubuntu.com/ubuntu artful InRelease
502  Connection timed out [IP: 2001:67c:1360:8001::21 80]
Err:11 http://in.archive.ubuntu.com/ubuntu artful-updates InRelease
502  Connection timed out [IP: 2001:67c:1360:8001::21 80]
Err:12 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease
502  Connection timed out [IP: 2001:67c:1360:8001::21 80]
Reading package lists... Done
W: Failed to fetch
http://in.archive.ubuntu.com/ubuntu/dists/bionic/InRelease  502
Connection timed out [IP: 2001:67c:1360:8001::21 80]
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/bionic-
updates/InRelease  502  Connection timed out [IP:
2001:67c:1360:8001::21 80]
W: Failed to fetch
http://in.archive.ubuntu.com/ubuntu/dists/artful/InRelease  502
Connection timed out [IP: 2001:67c:1360:8001::21 80]
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/artful-
updates/InRelease  502  Connection timed out [IP:
2001:67c:1360:8001::21 80]
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/bionic-
backports/InRelease  502  Connection timed out [IP:
2001:67c:1360:8001::21 80]
W: Failed to fetch
http://archive.canonical.com/ubuntu/dists/bionic/InRelease  502
Connection timed out [IP: 2001:67c:1360:8c01::16 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-
security/InRelease  502  Connection timed out [IP: 2001:67c:1562::16
80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/artful-
security/InRelease  502  Connection timed out [IP: 2001:67c:1562::16
80]
W: Some index files failed to download. They have been ignored, or old
ones used instead.
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission
denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are
you root?

Thank You

Your command line contains one  occurrence of sudo but also &&. In this case, sudo only applies to the former command, not the part after &&. Add sudo to the latter command, too.

sudo apt-get update && sudo apt-get upgrade -y

However, there is at least one more problem:

502  Connection timed out [IP: 2001:67c:1360:8001::21 80]

which means you should check your network connection.

Generally, you should run commands manually one by one (i.e. avoid &&, -y etc.) to diagnose problems.

Try these commands:

sudo -i
apt-get clean
cd /var/lib/apt
mv lists lists.old
mkdir -p lists/partial
apt-get clean
apt-get update


How can I install Qt 5.x on 12.04 LTS? If you want to develop with QML 2.0 and Qt5, the base packages don't seem to exist in repository for 12.04.  What PPA should I add?  Is it a binary installer?  a compile the toolkit yourself?

Those aren't separate questions, they're just possible tracks to an answer.

I'm asking because if you want to develop for Ubuntu Phone, but still have a rock solid LTS development box, this seems the appropriate path.

How can I install Qt 5.x on 12.04 LTS?

This can be done by adding the following PPA to your system:

  ppa:canonical-qt5-edgers/ubuntu1204-qt5  (Click here for instructions on using PPAs.)

You can usually do this with the following commands:

sudo apt-add-repository ppa:canonical-qt5-edgers/ubuntu1204-qt5
sudo apt-get update

The next step is to install the necessary packages for Qt5 / QML 2.0 development. You can do that by running these command:

sudo apt-get install qtdeclarative5-dev

This will install the headers / libraries necessary for development with desktop Qt and QML. You will also probably want to grab the latest release of Qt Creator from this page.

I've found that Qt Creator sometimes has problems finding your new Qt5 installation. If that is the case, perform these steps:

open it up and go to Tools->Options
click the "Build & Run" section in the left menu
click the "Qt Versions" tab
click "Add..." and enter the location that corresponds with your OS:

32-bit: /usr/lib/i686-linux-gnu/qt5/bin/qmake
64-bit: /usr/lib/x86_64-linux-gnu/qt5/bin/qmake

Previously these packages were located here:

  ppa:ubuntu-sdk-team/ppa

According to the "Ubuntu SDK Team": Old Ubuntu 12.04 LTS Qt 5.0 packages have been moved to https://launchpad.net/~canonical-qt5-edgers/+archive/ubuntu/ubuntu1204-qt5/, and that seems to have occurred sometime in May of 2016.

The way to install Qt 5.*:

sudo apt-get install build-essential libgl1-mesa-dev


Ubuntu does not detects the RAM correctly I have 512MB RAM in my PC. Ubuntu detects only 495 MiB. How can I fix this?

On Debian Squeeze, I have 512MB.(The correct size)

OS: Ubuntu 12.04 Precise Pangolin

Your RAM is detected correctly. MB (megabyte) and MiB (mebibyte) are two different units.

1 MB is 1000 KB which is 1000 byte (decimal)
1 MiB is 1024 KiB which is 1024 byte (binary)

If you check the math yourself you will see that 512 MB are 495 MiB ;-)

MB is mostly used for selling stuff because it's the higher number. In your Ubuntu system you will mostly encounter MiB (or GiB).

a) At startup, the BIOS counts the number of working RAM-bytes, but EXCLUDES the ram-bank used for the test. That difference is fully normal. -- b)  Any faulty RAM-bank is neither used nor counted. In that case, the computer can still be used for non-important jobs.


convert images to pdf I have saved multiple images from google books. I wanted to convert them to a single pdf file, where in I need some inputs. The below two images(one png and one jpeg) are two continuous pages.

first page(png)

second page(jpeg)

I save them in my system. I converted them to pdf using the command below

convert books.png books.jpeg combined.pdf

However the combined.pdf is not giving me expected results, not the combination of the two.

I also tried making individual pdf files, then combining them using pdftk, with no luck

convert books.png book1.pdf
convert books.jpeg book2.pdf
pdftk book1.pdf book2.pdf cat output combined.pdf

Use convert program (it is an executable installed as part of Imagemagick suite of tools):

convert "*.{png,jpeg}" -quality 100 outfile.pdf

In general case you can combine more files into one pdf file with including them inside {} and separate them with a single comma.

adding -quality VALUE to keep quality after conversion.

convert "*.{ext1,ext2,ext3,...}" -quality 100 outfile.pdf

Use print assistant from Gwenview (KDE image viewer). Open Gwenview, then Plugins -> Images -> Print assistant. Add all the images that you want to print, reorder them as you like, choose number of images per page, other print options, etc. and print to PDF directly or with CUPS-PDF.


Unable to Locate File syscall_table_32.S I am using Ubuntu 12 & kernel version is 3.8.0

i want to add personal syscall but unable to locate the file mentioned above.

path i am trying is usr/src/linux-headers-3.8.0-19-generic/arch/x86/kernel

i also tried usr/src/linux-headers-3.8.0-19-generic/arch/x86/syscalls

i also tried usr/src/linux-headers-3.8.0-19/arch/x86/kernel

i looked for solution in this web, stack exchange & google but still unable :(

please help

For locating files already installed you can use dpkg -S

$ dpkg -S syscall
gdb: /usr/share/gdb/syscalls
gdb: /usr/share/gdb/syscalls/sparc-linux.xml
manpages-dev: /usr/share/man/man2/_syscall.2.gz
gdb: /usr/share/gdb/syscalls/gdb-syscalls.dtd
gdb: /usr/share/gdb/syscalls/ppc64-linux.xml
gdb: /usr/share/gdb/syscalls/sparc64-linux.xml
gdb: /usr/share/gdb/syscalls/mips-n32-linux.xml
perl: /usr/lib/perl/5.14.2/bits/syscall.ph
manpages-dev: /usr/share/man/man2/syscalls.2.gz
gdb: /usr/share/gdb/syscalls/amd64-linux.xml
gdb: /usr/share/gdb/syscalls/i386-linux.xml
perl: /usr/lib/perl/5.14.2/syscall.ph
libc6-dev:i386: /usr/include/i386-linux-gnu/bits/syscall.h
perl: /usr/lib/perl/5.14.2/sys/syscall.ph
manpages-dev: /usr/share/man/man2/afs_syscall.2.gz
manpages-dev: /usr/share/man/man2/syscall.2.gz
gdb: /usr/share/gdb/syscalls/mips-o32-linux.xml
gdb: /usr/share/gdb/syscalls/ppc-linux.xml
libc6-dev:i386: /usr/include/syscall.h
gdb: /usr/share/gdb/syscalls/mips-n64-linux.xml
libc6-dev:i386: /usr/include/i386-linux-gnu/sys/syscall.h
linux-libc-dev:i386: /usr/include/i386-linux-gnu/asm/vsyscall.h

For locating files that are not provided by installed packages you can try locate (if the file is recent enough:

$ locate syscall.h
/usr/include/syscall.h
/usr/include/i386-linux-gnu/asm/vsyscall.h
/usr/include/i386-linux-gnu/bits/syscall.h
/usr/include/i386-linux-gnu/sys/syscall.h

If neither of those shows results, you can try a search in the Ubuntu Package Search:

http://packages.ubuntu.com/search?searchon=contents&keywords=name of file&mode=exactfilename&suite=raring&arch=any

If you want a "local" solution use apt-file:

sudo apt-get -y install apt-file
sudo apt-file update
apt-file search name_of_file

Hey try this from the terminal

find /usr/src/linux-headers-3.8.0-19-generic/ -type f -name "syscall_table_32.S"

if you get permission errors try running the command as sudo

Good luck!


Unable to download videos using youtube-dl ('sig error'), how to correct? I used to download videos using youtube-dl command line tool, from the past two days whenever i try to download any video I get an error as shown below.

$ youtube-dl https://www.youtube.com/watch?v=bFew8mgQJ9o
[youtube] Setting language
[youtube] bFew8mgQJ9o: Downloading video webpage
[youtube] bFew8mgQJ9o: Downloading video info webpage
[youtube] bFew8mgQJ9o: Extracting video information
Traceback (most recent call last):
  File "/usr/bin/youtube-dl", line 4645, in <module>
    main()
  File "/usr/bin/youtube-dl", line 4636, in main
    _real_main()
  File "/usr/bin/youtube-dl", line 4620, in _real_main
    retcode = fd.download(all_urls)
  File "/usr/bin/youtube-dl", line 869, in download
    ie.extract(url)
  File "/usr/bin/youtube-dl", line 1135, in extract
    return self._real_extract(url)
  File "/usr/bin/youtube-dl", line 1406, in _real_extract
    url_map = dict((ud['itag'][0], ud['url'][0] + '&signature=' + ud['sig'][0]) for ud in url_data)
  File "/usr/bin/youtube-dl", line 1406, in <genexpr>
    url_map = dict((ud['itag'][0], ud['url'][0] + '&signature=' + ud['sig'][0]) for ud in url_data)
KeyError: 'sig'

whats going on?

Had exactly the same problem.

Updated youtube-dl via:

sudo youtube-dl -U

Run youtube-dl via sudo

sudo youtube-dl
and it will inform that they have changed distribution and need to update.
Press enter and you should be good to go.

Install youtube-dl with sudo apt-get install youtube-dl from command-line, then use:

sudo youtube-dl "https://www.youtube.com/watch?v=bFew8mgQJ9o"

Make sure, that you use sudo before the above command!


Error when trying to install reader software for Estonian ID card So my ID software got out-of date. I wanted to update it but it failed to find any updates by itself. So now I removed the old sofware from my computer and tried to install it again and I get this in my terminal:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 estonianidcard : Depends: qdigidoc but it is not going to be installed
                  Depends: qesteidutil but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I am using a install script from here: https://installer.id.ee/media/install-scripts/install-esteid-ubuntu.sh
I change the OPSYS= line to raring because the source where it tries to fetch my software has raring the latest soft: https://installer.id.ee/media/ubuntu/dists/

So..  where did I go wrong here?

Output:

$ apt-cache policy estonianidcard qdigidoc qesteidutil
estonianidcard:
  Installed: (none)
  Candidate: 3.7.2.1310-ubuntu-12-10
  Version table:
     3.7.2.1310-ubuntu-12-10 0
        500 https://installer.id.ee/media/ubuntu/ quantal/main i386 Packages
qdigidoc:
  Installed: (none)
  Candidate: 3.7.2.1198-ubuntu-12-10
  Version table:
     3.7.2.1198-ubuntu-13-04 0
        100 /var/lib/dpkg/status
     3.7.2.1198-ubuntu-12-10 0
        500 https://installer.id.ee/media/ubuntu/ quantal/main i386 Packages
     0.4.1-0ubuntu1 0
        500 http://ee.archive.ubuntu.com/ubuntu/ saucy/universe i386 Packages
qesteidutil:
  Installed: (none)
  Candidate: 3.7.2.1079-ubuntu-12-10
  Version table:
     3.7.2.1079-ubuntu-12-10 0
        500 https://installer.id.ee/media/ubuntu/ quantal/main i386 Packages
     0.3.1-0ubuntu2 0
        500 http://ee.archive.ubuntu.com/ubuntu/ saucy/universe i386 Packages

Missing font packages in 13.10

Liberation still exists. As all the other font packages do, they just got renamed to be less format specific. The Liberation font from ttf-liberation package can now be found in fonts-liberation. With 13.10/saucy all the (transitional) ttf-* packages were finally dropped, but not the fonts themselves.

Workaround for broken font dependency

Only the qesteidutil package seems to contain the outdated dependency. You could download the package and update the control file within the debian directory of the package.

Also please check if /etc/apt/sources.list.d/ria-repository.list really contains the release name you want to download packages for. If not, edit the file and run sudo apt-get update. If you still encounter issues, then take a look at How do I resolve unmet dependencies after adding a PPA?

Suggestion: build your own packages

Since sources are available, you could rebuild one or all of the packages. The packages however are incompatible to the Debian guidelines as they all seem to be missing copyright information and may be more (see the packaging guide for information on how to get started and how Debian compliant packages should look like).

A closer look at the setup script

The script is used to write distribution specific repository files to /etc/apt/sources.list.d/ria-repository.list, which deviates from the default naming convention for these files and implies that the script should be run after each release upgrade, unless you know what to fix. It will leave you without installable packages for saucy, as they do not exist currently. The script also fetches and installs the repository key from the key server.

If you build your own signed packages and want to distribute them, you would need to modify these parts of the script. The best solution would be a Ubuntu PPA, given that the source code is really Open Source and free to distribute (should be, as I can see a lot of files containing the LGPL license text when browsing for example https://svn.eesti.ee/projektid/idkaart_public/branches/3.7.2/).

Summary

I know this looks like I am just complaining or talking you into packaging, but I am confident that these little issues can be sorted out.

Your problem is mainly that you are mixing repositories. You are trying to install quantal packages in a Saucy system. This you shouldn't happen! The https://installer.id.ee/media/ubuntu/dists/ shows that they do have packages for saucy ready, so you should change to that repository. If you paid for the service, you must contact their support if you got any troubles.

Remove any quantal reference from your sources and add saucy's which they have packages ready.

To do the first run this:

sudo sed -i '/quantal/d' /etc/apt/sources.list /etc/apt/sources.list.d/*.list

and add this to your source.list:

deb https://installer.id.ee/media/ubuntu/ saucy main

You must make sure that you have the apt-transport-https package installed.


How do I disable usb storage? I'm using Ubuntu 12.04 and I want to block usb storage on it. What is the correct way to do this?

In Linux the risk of viruses are small to nonexistent, however USB sticks automatically mount for reading and writing regardless. There's an easy way in recent Ubuntu distributions to disable USB storage devices. Simply blacklist the kernel driver:

echo "blacklist usb-storage" | sudo tee -a /etc/modprobe.d/blacklist.conf

Then update the initramfs

sudo update-initramfs -u

After that, nobody can use a USB memory stick in that computer, but still allows the administrator(s) to manually load the module and use it.

source is here: http://www.ossramblings.com/disabling_usb_storage_in_linux

Another way which is more selective is to note that users who are members of the plugdev group are allowed to access pluggable storage devices so you could just remove any users you don't want to use USB sticks from that group.

source: here

The simple way Login as root open terminal and type the following command

$ sudo gedit /etc/modprobe.d/blacklist.conf

It will ask for root password, give it .

then add the blacklist USB_storage at the last line  as follows

# really needed.
blacklist amd76x_edac
blacklist usb_storage

Save it and reboot your system.


chrome download interrupted leaving ".crdownload" temporary file I am using Google Chrome 15.0.874.121 in Ubuntu 10.10. It was fine until recently. Whenever download a file, it always reports "Interrupted", but it actually finishes the downloading, leaving an intermediate file with extension ".crdownload". If removed the extension, the file will be perfect.

Note that downloading in Firefox works fine at the same time.

So I wonder if it is a bug or how I can fix it?

Thanks and regards!

It seems like apparmor is blocking Chromium to save files to non standard directories.
I expected adjusting the /etc/apparmor.d/abstractions/user-download file would do the trick, but it only fixed the same issue I had with Firefox.  In Chromium I'm still getting the same interrupted downloads when saving to external media.

I added owner /media/** rwl, to /etc/apparmor.d/abstractions/user-download.

There seem to be issues with the current Chromium build related to this, causing the error when saving to NTFS / FAT file systems as these don't support chmod.
Link to issue on Chromium codebase

I just tested with a daily stable build from their ppa but this doesn't help.. Version is  16.0.912.75 (Developer Build 116452 Linux) Ubuntu 11.10

Change you Google Chrome "Download Directory" from Options to some other Directory other than C:\ Drive (like say D:). It will help. Becz there is done wrong in your system directory that why it is not allowing you to save in C: drive.


Core i7 with 4GB - go 64 bit or stay 32bit..? I have a Core i7 laptop with 4gb ram. In windows, the disadvantage of using the 32bit OS would be that a single app could not use more than 2gb of ram (+ the 2gb shared kernel-space memory) except when setting a boot switch which reduces the amount of shared kernel memory, then it's 3GB max per app.

What disadvantages/limitations would I have in Ubuntu for sticking to the 32bit OS? (If any?) - As I only have 4GB of ram, I can't see why I need to use the 64bit version?

There may well be some annoyances along the way. A few of the proprietary components of Ubuntu (like the Oracle Java runtime and Adobe Flash) might be a bit harder to install that you would expect.

There may also be problems with some obscure wireless drivers and the like - but this is the exception rather than the rule.

Other than that, Linux' great 32 bit compatibility layer ensures that your system will be pretty much rock solid and, often time, quite a bit better at computational task that benefit from the larger address size.

Ubuntu server is now recommended by canonical in its 64 bit form per default. There is, all in all, much trust in the 64 bit linux architecture. It is no longer experimental, it is no longer just an add on. And even though some of the applications haven't caught up (flash is the only one of them that matters, really), the Linux kernel is now considered a 64 bit system with a 32 bit compatibility layer, rather than the other way round.

In short: Do it, go 64 bit - it's running millions and millions of Linux servers today, and it's completely ready for your desktop.

As Huygens points out, 32 bit is the safe bet. If you can stand the potential annoyance of re-installing the 32 bit version, it makes sense to try 64 bit first, and test for common issues.

The 32 bit installer will of course automatically enable a PAE kernel if you have more ram then can be addressed in 32 bits, rendering the ram issue a thing of the past. This has been said many times here, but why not include it again :)

I'd switch to 64Bit.
Reason is that Linux apps come in both flavors and even if they don't you can simply compile them on your system.

Another reason is that nowadays, RAM is pretty darn cheap so, if you were to say, double your memory, staying with 32bit would severely limit you.


Uninstalling Ubuntu or unhiding partition I have 3 disks in my machine. I installed Ubuntu in one of them (2 partitions) but it is impossible to "see" the partition where I installed Ubuntu from the other disks (sysop w7 or winxp) so I tried a partition program but it deleted the empty partition, only. At the end of the HD is 320G but now it's only 232G. How can I unhide this partition or uninstall Ubuntu? thank's in advance.

You can't  unhide the ubuntu partition as it doesn't have a NTFS ,FAT/FAT32 Format

To uninstall Ubuntu
Boot with live ubuntu Cd and use this tool
os uninstaller

If you want to wipe the HDD you can use GParted live or something and format it.


"zpool create" with encryption enabled raises error "URI scheme is not supported" I got this command to work on an existing system, but on fresh installs of Ubuntu 18.04.5, with zfs-dkms installed from ppa:jonathonf/zfs I get:
ubuntu@hdp1-sitka:~$ sudo zpool create -f -O encryption=aes-256-gcm -O keyformat=raw -O keylocation=file:///etc/zfs.key tank sda sdb sdd sde sdf sdg sdh sdi sdj sdk sdl
cannot create 'tank': URI scheme is not supported

Yes, I'm striping 11 disks together. They'll serve a hadoop datanode. ZFS makes it convenient to balance different sized disks together and do inline encryption.
The error is specific to -O keylocation=file:///etc/zfs.key and feels like a missing dependency to grok file:/// URIs.

Rebooting the system enables this command to run. The PPA author confirmed that a system reboot is required to enable the kernel module.


.xsession ignored, Ubuntu 12.10 I started using uxterm instead of Gnome's terminal today. I put settings for uxterm in ~/.Xdefaults. But because Ubuntu's configuration ignores my .xsession file, I can't have these settings loaded at login. How can I get Unity (or lightdm) to run .xsession? My .xsession is recognized and run by XMonad.

~/.xsession is only used when no X session is selected. Use ~/.xsessionrc to run programs at startup.

As using ~/.Xdefaults is obsolete, Ubuntu, like about any other modern X environment,  uses ~/.Xresources at startup (see for example here for some reasons). So if you put your settings in ~/.Xresources you don't need to run xrdb as Ubuntu is doing this for you.

See /etc/X11/Xsession and /etc/X11/Xsession.d/* if you want to know more about what Ubuntu is doing when you start a X session.

A note: in Ubuntu 12.03 .xsessionrc is also ignored

to solve it:

open

./Xsession.d/40x11-common_xsessionrc

at the beginning, add

USERXSESSIONRC=$HOME/.xsessionrc

this is the final content:

# This file is sourced by Xsession(5), not executed.

#Source user defined xsessionrc (locales and other environment variables)
USERXSESSIONRC=$HOME/.xsessionrc
if [ -r "$USERXSESSIONRC" ]; then
  . "$USERXSESSIONRC"
fi

I don't know if it's solved in versions >12.04


SD card is recognized but can't open it: “can't read superblock” (Almost the same question but the solution proposed therein do not solve my problem)

So I can mount the micro SD card but when I click on it I get:

Error mounting /dev/mmcblk0p1 at /media/me/NIKON D3100: Command-line `mount -t "vfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,shortname=mixed,utf8=1,showexec,flush" "/dev/mmcblk0p1" "/media/me/NIKON D3100"' exited with non-zero exit status 32: mount: /dev/mmcblk0p1: can't read superblock

doing:

sudo parted -l /dev/mmcblk0

yields:

Model: SD SL16G (sd/mmc)
Disk /dev/mmcblk0: 15,5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      4194kB  15,5GB  15,5GB  primary  fat32        lba

(so it is fat32 but neither vfat nor exfat. It was formated by a photo camera).

How can I make my micro SD card ubuntu-usable

First: if you need to save the data on the SD card make an image of the entire sd with dd before trying to fix it so you can always restore it later.

sudo dd if=/dev/mmcblk0 of=/home/sdCard.img

Then try to fix it with fsck.

sudo fsck /dev/mmcblk0

Hope it helps.


How can I use equivs-build to build packages that can be installed on older versions of Ubuntu? I have several versions of Ubuntu installed, including 14.04 and 10.04. When I build packages using equivs-build on 14.04, it generates .debs that contain .xz-compressed data. The version of dpkg on 10.04 cannot understand or install these packages, and so I see errors like this:

  dpkg-deb: file `/var/cache/apt/archives/mypackage.deb' contains
  ununderstood data member data.tar.xz

This answer gives an approach for building Debian packages in general, but it doesn't appear equivs-build gives that level of control; unless I've missed an obvious option?

You may try setting environment variable from debuild

DEBUILD_DPKG_BUILDPACKAGE_OPTS=Zzgip

If equivs doesn't use debuild when building only binary package (default). Go with full build, as its manpage stated

equivs-build -f ..

I am building bebian too and I found out how to manage the equivs-contol / -build.

how to include the BINARIES:

I st -->  copy all the files in the working directory as they are. Example myPackage-meta.
2 nd --> open the configuration file generate with equivs-control and modify the option "Files:", remove the hash and be careful of the indentation.

Example:

Files: binary-qt /usr/local/bin/
 second-binary-daemon /usr/local/bin/

before "second-binary-daemon" you need a space only and use this indentation for the further files.

And so on.

3 rd --> save the config file and execute equivs-build

Done!

for the configuration file and the rough instructions, you need to discover the details, I give you the manual link:
Sintax of the equivs-build

Hope will be useful! Brake a leg!

PS: You need to compile the binary first.


Vim in shell allows [a-z] to circumvent having to press  to get out of INSERT mode. How can I apply this to Gui implimentations of Vim? Vim in shell allows <alt>[a-z] to circumvent having to press Esc to get out of INSERT mode. For example,

Open up a terminal and set its editing mode away from emacs, to vi

set -o vi

Now enter INSERT mode and start typing:

<i>[Type some words]

Before you press enter, hold alt, and press "u" for undo:

<left alt><u>

This will take you out of INSERT mode, and will undo your last change.

If I try to do this in GVIM, <left alt><u> will type "õ". I would rather have it the other way.

How can I achieve this? Thanks.

Once in gvim, you can type :help quickref and hit  Enter

That'll bring you to the hotkeys information of gvim.
I'm pretty sure you'll find everything you need there, worth to take a look. Good luck buddy! :-)


I get 'Errors were encountered while processing: steam_latest.deb' installing Steam makmoonish@makmoonish-Satellite-L655D:~/Downloads$ sudo dpkg -i steam_latest.debSelecting previously unselected package steam-launcher.
(Reading database ... 195097 files and directories currently installed.)
Unpacking steam-launcher (from steam_latest.deb) ...
dpkg-deb (subprocess): cannot copy archive member from 'steam_latest.deb' to decompressor pipe: unexpected end of file or stream
dpkg-deb: error: subprocess paste returned error exit status 2
dpkg: error processing steam_latest.deb (--install):
 cannot copy extracted data for './usr/lib/steam/bootstraplinux_ubuntu12_32.tar.xz' to '/usr/lib/steam/bootstraplinux_ubuntu12_32.tar.xz.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
 steam_latest.deb

sudo apt-get install curl fixed it for me.

dpkg: error processing package steam-launcher (--install):
 dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for mime-support (3.54ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Errors were encountered while processing:
 steam-launcher
w1z@cloudy:~/Downloads$ ls
steam_latest.deb

After installing curl:

w1z@cloudy:~/Downloads$ sudo apt-get install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  curl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 123 kB of archives.
After this operation, 313 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty/main curl amd64 7.35.0-1ubuntu2 [123 kB]
Fetched 123 kB in 1s (116 kB/s)
Selecting previously unselected package curl.
(Reading database ... 173928 files and directories currently installed.)
Preparing to unpack .../curl_7.35.0-1ubuntu2_amd64.deb ...
Unpacking curl (7.35.0-1ubuntu2) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up curl (7.35.0-1ubuntu2) ...
Setting up steam-launcher (1.0.0.48) ...

It is becuase you newer has update.
pu in the console.

For open a console CTRL+ALT+T

$ sudo apt-get update

other way is using the update program

after it try to try tu start steam agine o reinstal it


How can I add miniature pictures to XFCE folders? Running Xubuntu here, how can I add miniature pictures to the folders like in Windows?

The so-called "miniature pictures on folders" is unsupported by Thunar, the file manager in Xfce or Xubuntu, according to this thread on Xfce forum as quoted below.

  Unfortunately, Thunar does not support directory thumbnails (ala Windows). There has been some work done, but nothing completed yet.

So you can't add miniature pictures like Windows in Xfce or Xubuntu, yet.

First you have to enable thumbnails, open thunar (file explorer for xfce), and on the menubar go to Edit > Preferences, then on the first tab for the preferences window , under Show thumbnails choose "Local Files only"  or "Always", and close the preferences window.

Now on thunar menubar, View > View as icons.

Then press F5 or close and open thunar again.


windows operating system missing in dell inspiron 3521 I created a ext4 partition and with my secure boot disabled I installed Ubuntu 15.04 and now my computer directly opens Ubuntu when I turn on my laptop.
I looked for the boot menu too but it didn't show my windows 8 operating system.
What to do? I want my windows operating system back. I want my computer to ask which operating system to open when the computer starts.
I seriously need help.

Try opening up the boot disk selector menu. As far as I am aware, most computers have an option to select which disk is used at boot, for example with Lenovo laptops, the onekey recovery button gives you an option for boot menu. If you see Ubuntu and your hard disk both, select the hard disk.

Depending on how your BIOS works, you may need to re-enable secure boot in order to get Windows. Just keep in mind you'll have to shut it off for Linux. This means that you will have to manually switch bios configuration every time you switch.

If you're lucky enough to have the option, try asking the BIOS to do both UEFI and Bios modes. On my Lenovo g580 you can even specify which you want checked first. Again, you may have to use the BIOS boot menu, but at the very least you can boot.

UEFI is a tricky subject for dual booting, and I still have yet to see reports of a decent one.

Good luck, you may need it.

Try updating the grub from the terminal.

Open up Ubuntu and open the terminal.
Then type sudo update-grub and check the output if windows is detected and reboot.


virtual memory exhausted while using wine I have two machines - a laptop and a desktop, both running Pangolin. Wine works fine on laptop, but it doesn't work at all on my desktop. It was working until a couple of days ago, but has stopped working since then. Every time I try to run wine, I get "virtual memory exhausted" error.

I googled around a bit, and came across two suggestions:

removing ".wine" directory from home.
adding the current user to "audio" group.

I tried both, but neither fixes the problem for me. Please help.

Upgarding wine fixed the problem.

sudo apt-add-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine

Since Wine is talking about a VM, a quick solution is to turn off the swap and back on to empty the swap partition.

sudo swapoff -a
sudo swapon -a

This is more likely the result of too much RAM being used and not enough swap on the HDD.


Are there tools to measure video quality? I am looking for any tools that can measure the video quality in a subjective way (As how the eye sees a moving picture). Are there any tools to which I could input a video file and get a subjective reading of how the quality of the video is?

Here is information thanks to snow about how to measure video quality

Note that the script there does not work and the other alternative is a windows app.

Your interpretation of quality and my interpretation may differ as well as anyone else, therefore your subjective way is tainted. You need a definitive measurement of sort that will recognize pixel strength, movement, blur, saturation, density, focus and such.

This will all be handled according to the equipment used of course. What type of input/output media-processing-recording and capture are being used. As well as storing the data via film, digital or magnetic tape?

The variables are consistence to the finished product. ie: $100,000 3D theater projector or a home movie 8mm camera? There is a difference.

Now, back to your graphics card. Can it handle stressing the media analysis?

My point is this. There is no ONE GOOD ANSWER. I would suggest starting to research from this site : http://www.linux.com/news/software/applications/321373-the-beat-goes-on-open-source-multimedia-tools-part-2

This may not be definitive enough but you can get a good start.

Here is a Streaming Video Quality tool I accidentally found.  Unfortunately I can't recall the toggle method. I have been trying to re-find it.  Here are my recent efforts that include an explanation of the tool:

Please tell me the name of the feature and especially how to enable / disable it. I found the toggle by accident, and it was cool, but then I left it toggled on and now can't remember how to turn it off.  It is an awesome feature though.

First noticed in Version 47.0.2526.80 m; still displayed after upgrade to Version 47.0.2526.106 m.

A picture is best, so that's first (green bars and stats at top of screen):
VidStatOverlay0
VidStatOverlay1

Here's the text description of the behavior:
When you you click on a video to play it, in the streaming playback window there is a feature to turn on an overlay (of the same type as the play / pause button and video progress bar at the bottom of the screen) at the top of the screen that shows informative stats like State (play or pause), load in ms, manifest in ms, stalls, buffer rate in s/s, buffer left in s (when clicking in the video these get covered up by the usual OneDrive menu items of share | add to album | download | delete | embed | edit tags | etc). There are also two more lines below these, one for Audio and one for video. Each of these lines has a quality rating (0, 1, 2, etc) and a graphic of dots added in a line. The length of the line represents the length of the video load. the dots are color coded to show 'waiting for response,' 'receiving bytes,' downloaded, appending, appended, and error. The audio line also shows stats for avg wait in ms and avg receive in ms. The video line shows additional stats for avg wait in ms, avg receive in ms and avg bandwidth in mbps. The is a vertical line that progresses across the dot plot and this line represent the playback position of the video relative to the cached data.

Key words:
State (play or pause), load in ms, manifest in ms, stalls, buffer rate in s/s, buffer left in s,  'waiting for response,' 'receiving bytes,' downloaded, appending, appended, and error avg wait in ms and avg receive in ms bandwidth in mbps

This is similar in nature to the post Chrome's video statistics feature Categories:47-StableDiscuss ChromeWindows 8
https: / / productforums.google.com/forum/#!msg/chrome/x7q1rM2G3DY/wYpD4896yRwJ;context-place=forum/chrome

12/17/15 Google says:
I'm not familiar with this feature at all, but my initial guess would be that it's some sort of extension. I don't recognize this as a Chrome feature.

My Reply to them was:
 I turned off all extensions and this still exists.  I also know I did not install any extensions or even any other SW at all for weeks (other than anti-virus updates) prior to finding this 'feature.

I will note that I found the feature while using Chrome to play a OneDrive video in OneDrive's native streaming player.  I went up one side and down the other in two separate hour-long chats with OneDrive 'experts' (clearly Tier I and limited to a problem solving tree) and at the end, microsoft, in their wisdom, says they think it's a virus.  Seriously?  That's where I gave up on them and went to the experts at Google.

I wish I could remember if I found it with a right-click pop-up, a hidden context menu item, or one of those lucky accidental finds of a shortcut key.  So it could be related OneDrive.  Unfortunately, on the day I found and used the toggle function I only tried it in Chrome, not another browser.  And now I can't remember the toggle function.

It's a very sleek and informative function on streaming video.  I would think either Google or microsoft would want to take credit for it.


Prestashop "Recursive write permissions" error Trying to install prestashop locally (LAMP), the following error list prevents installation from moving forward.

Permissions on files and folders

Recursive write permissions for www-data user on ~/config/
Recursive write permissions for www-data user on ~/cache/
Recursive write permissions for www-data user on ~/log/
Recursive write permissions for www-data user on ~/img/
Recursive write permissions for www-data user on ~/mails/
Recursive write permissions for www-data user on ~/modules/
Recursive write permissions for www-data user on
~/themes/default-bootstrap/lang/
Recursive write permissions for www-data user on
~/themes/default-bootstrap/pdf/lang/
Recursive write permissions for www-data user on
~/themes/default-bootstrap/cache/
Recursive write permissions for www-data user on ~/translations/
Recursive write permissions for www-data user on ~/upload/
Recursive write permissions for www-data user on ~/download/

Also, running the following commands resulted in "Operation not permitted" messages

cd /var/www/prestashop

chown -R www-data *

chgrp -R www-data *

You need to have permission to change ownership. Add sudo to the commands you are executing:

sudo cd /var/www/prestashop
sudo chown -R www-data *
sudo chgrp -R www-data *

Or just do it all at once, using one command instead of three:

sudo chown -R www-data:www-data /var/www/prestashop

I used this command on SSH and it allows permission for apache user as well as FTP user:

login to SSH
navigate to your prestashop website folder
while you are in it, type this command - replace 'yourftpusername' with your ftp username chown -R apache:yourftppusername *


Prevent users from accessing "System Settings" I'm administering a system and do not want people messing with their system settings (specifically the power settings).

I've searched everywhere and cannot find a method for disabling the power settings from system settings.

The  gnome-system-tools package didn't contain any options for restricting access to system settings or power settings.

Using Raring Ringtail.

Changing permissions to 700 for /usr/bin/gnome-control-center would help you restrict the normal users gain access.
However that goes out for all the settings, and users wont be able to set other settings like the display or keyboard.

Another good way is to define user group and change the ownership of gnome-control-center  to those groups. and then add the permissible user to the group. the full description is here.

We have done is created groups with certain admin privileges and managed centrally using/etc/sudoers where in entries are whitelisted and provided on need basis.
For example:
Including the line :

$admin=ALL=(ALL) ALL `!/usr/bin/gnome-control-center`

You could install

ninja

and there configure a "blacklist", which
programs should be not for general use.


Ubuntu V14.04 login problem? I have Ubuntu 14.04 operating system. I have login problem now, when I enter my password for login to reach out at desktop of my operating system. it reload same window to enter your password. When I put wrong password it show me error "invalid password try again", but when I enter correct password it comes on same window for enter your password instead of desktop work area. And when I try to login as a guest session it appears same window again for enter your password. Please give me some suggestions to come out of this and able to work with my Ubuntu system.

When I perform Ctrl+alt+F2 and login my system its shows me :-

welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.19.0-33-generic i686) *Documentation: HTTPS://help.Ubuntu.com/
23 package can be updated.
0 updates are security updates. -bash: groups: command not found. Command 'ls' is available is '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
ls: command not found.
Command 'lesspipe' is available in the following places.
*/bin/lesspipe.
*/usr/bin/lesspipe.
The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.
Lesspipe: command not found
Command 'dircolors' is available in '/usr/bin/dircolors'.
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
dircolors: command not found.
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
ls: command not found.

Based on the discussion in the comments and this chat room, you made changed to /etc/environment which broke your PATH. As a consequence, your login manager couldn't find the executables it needed to run in order to log you in. To fix this, edit your /etc/environment file set the correct $PATH:

Hit Ctrl+Alt+F1 and log in from the command line.
Run this command to edit the file:

/usr/bin/sudo /usr/bin/nano /etc/environment
Delete anything in that file and replace it with the line below. Make sure there is nothing in the file except this line:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

Save the file (Ctrl+O) and exit (Ctrl+X
Return to the GUI login manager with Ctrl+F7 and try to log in again. It should work as expected.

You could try this in sted:

 sudo dkms-reconfigure Xauthority

and it might work fine this way


How can I use a .ovpn file with Network Manager? I have a .ovpn file with my VPN config - it works fine when I do

sudo openvpn --config ~jrg/Documents/vpn-config.ovpn

in the terminal, but I'd like to use Network Manager. How can I do this?

First, install the OpenVPN Network Manager plugin:

sudo apt-get install network-manager-openvpn-gnome

Open Network Manager, click "Add" and from the opened window select "Import a saved VPN configuration..." under "Choose a Connection Type". Navigate to your .ovpn file (~jrg/Documents/vpn-config.ovpn). If it doesn't automatically find your certificates/keys (the paths of which are found in the .ovpn file), you can select them here, or make any other small changes.

One other thing that may save you some headache down the road is to click IPv4 Settings, then change the method to "Automatic (VPN) Addresses Only". When kept at the default, this will cause ALL internet traffic to go over the VPN, regardless of your .ovpn settings. Here you can also set the DNS server and search domains to use while connected.

When you aren't given an user certificate, you must select the 'Password' type in the authentication drop down. Then in advanced, in 'TLS Authentication' add the TLS .key file and set the direction accordingly (1 or 0, that should be set in the .ovpn file).


How to sync the progress reading of ebooks from android? There are Android apps wich use dropbox or google drive for syncing the reading progress of ebooks. Is there any app or software for syncing the progress in Android and Ubuntu?

Try Calibre. You can install it using apt-get

sudo apt-get install calibre


How do I reserve bandwidth? In windows there is a registry entry called Reserve bandwidth. With that system was reserved some bandwidth from my INTERNET connection so that when i am downloading all other connected application can run with minimum INTERNET support.

Like reserve bandwidth help to keep other application (all kind of messenger) on-line when i was downloading. But in Ubuntu my connection speed is good enough but problem arise when i am downloading a file, all my messenger gets off-line status. Can any one tell how can i fix such problem? Or why this is happening?

(Credit goes to the answerer of this post in Super User)

Install trickle with this command:

sudo apt-get install trickle

Or using Software Center:

Start any program with trickle specifying it's download limits. For example, opening a new Firefox instance with 20 KB/s download limit, use this command

trickle -s -d 20 firefox

Here, -s saying trickle is running in standalone without any daemon, -d is doing the limit on download speed. You can also use -u option to specify an upload speed.

See the trickle manual page for more help.

If you want to limit the bandwidth of the interface card

There is also another tool which can be used to limit the speed of a Network interface. It's called wondershaper. With this tool you can limit the speed of the interface card.

Install it with this command:

sudo apt-get install wondershaper

Or using Software Center:

To limit the download speed of eth1 interface to 2000 Kilobit/sec, I'd run this command:

wondershaper eth1 2000

The exact syntax is

wondershaper [ interface ] [ downlink ] [ uplink ]

Manual page for wondershaper

Try pyshaper: http://freecode.com/projects/pyshaper

Let me know if it is useful.

Also checkout iftop via software-center for a visualiation of what is going on with your network.


How can I search within a manpage? Is there a option to search within manpages?

Just hit /, and type your search pattern.

Patterns can be regular expressions, for example, you could search for the word "option" by typing

/[Oo]ption

Or find all of the long arguments with

/(--)[a-Z]

To cancel the search, hit Ctrl+C.

Some useful quantification operators are:

?    for zero or one of the preceding expression
*    for zero or more of the preceding expression
+    for one or more of the preceding expression

And expressions can be "grouped" with parentheses, as in (--)+ (for two or more dashes).

[a-Z] is a sequence (others include [0-9], [a-z] and so on), they can be combined, as in [a-Z0-9]. You can also invert expressions with the ^ operator, e.g. (--)[^a-Z]+ for all long arguments that start with anything other than a letter.

Another useful operation is Union (|), as in color|colour, which finds every occurrence of either color or colour (this is sometimes called boolean OR).

If you are searching for strings containing some of these "reserved" characters (like ?, *, +), prefix them with a \  (i.e. /\+k to search for +k)
To jump through the results, press N (forwards) and Shift+N (backwards).
There is also a way to search across all manpages:

man -K "Hello World"

The man program will open the first match, and after you close it with q, offer you to

view the next one (Return)
skip the current one (Ctrl+D)
or exit (Ctrl+C).

GUI Methods

If you have Ubuntu Desktop version installed you can search graphically.

Gnome Help

Gnome help uses yelp program. Instead of typing man ls for the CLI man page you can type yelp man:ls and view in GUI window:

Once loaded you can use Control + F to search.

Browser

I open the man page on the internet and use my browsers search feature Control + F.

For example if in the terminal I type in man yad in my browser I would type linux man yad.

You sometimes need to pay attention that the internet version can sometimes have newer or older list of arguments but this has rarely happened to me.

The advantages of internet manpages goes beyond search facility and includes superior scrolling plus easier copying to clipboard.


What are the implications of two drives being extended in gparted? The above is the configuration of my partitioning system in gparted. Windows is on sda1. Ubuntu is on sda6. I want to use unetbootin to install another Linux on sda5.

My question is: Why are sda5 and sda6 both included under the "extended" rubric?

I probably did something I didn't understand when installing.

Is this a problem, or can I just clear out sda5 and install as usual?

It is absolutely okay that there is more than 1 partition in the extended section of hard drive. You should probably read something on disk partitioning to get the idea.

There are however things to consider. For example Windows can only install on a primary partition, but as you see Linux doesn't require that, so you should be okay.

Try using a Ubuntu live cd. Had problems myself resizing partitions but with a live cd it worked.


Ubuntu 14.04 to 16.04 Upgrade failed Today I wanted to upgrade from LTS to LTS. I performed

update-manager -d

and started the upgrade. However, after having downloaded all files and running the installation, the upgrade failed, or at least it failed partially. There is some erroneous behavior regarding graphics and window management. The two screenshots show the behavior, something similar to what we know from Windows...

I had the hope, that an additional

apt-get update
apt-get upgrade

would install remaining (potentially missing) packages, but the list is quite empty

Get:1 http://de.archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Hit:2 http://archive.canonical.com/ubuntu xenial InRelease
Ign:3 http://archive.canonical.com precise InRelease
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:5 http://archive.canonical.com precise Release
Hit:7 http://de.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:8 http://de.archive.ubuntu.com/ubuntu xenial-backports InRelease
Fetched 247 kB in 1s (220 kB/s)
Reading package lists... Done
W: http://archive.canonical.com/dists/precise/Release.gpg: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)

and everything is installed. I have the impression, that I need to redo, or at least somehow continue the failed upgrade, but I don't know how to.
The two approaches I tried didn't yield anything:

sudo apt-get -f dist-upgrade

says, there is nothing to install. And

sudo update-manager -d

tells me, that I'm up to date.

Any ideas, how I can fix this problem?

After restarting multiple times, I notice that from time to time the applications also look differently, see the following screenshot.

This worked for me after a botched sudo do-release-upgrade from 14.04 to 16.04. The updater's automatic attempt to restore to the previous version failed as well but left me at the terminal where I was able to complete the upgrade as follows.

1) Replace the contents of /etc/apt/sources.list with the following

###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ xenial main universe
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main universe

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ xenial-security main universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main universe
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-security main universe
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main universe

Optional) If you are receiving error insserv: Service mountdevsubfs has to be enabled to start service hwclock1, run the command sudo rm /var/lib/dpkg/info/util-linux.postinst

2) sudo apt-get update -- updates package lists

3) sudo apt-get dist-upgrade -- this will take a while, installs all the updated packages

4) sudo apt-get autoremove -- removes unnecessary packages

5) sudo apt-get autoclean -- cleans old packages from repository

6) sudo update-grub -- updates grub boot config

Now if you run sudo do-release-upgrade, you should get the response No new release found. and you can reboot with sudo shutdown -r now. After reboot, you might want to repeat steps 2 to 5 to be sure all updates are installed.

Start on recovery mode, and press alt+f1
Write

apt install grub

And finally

Sudo dpkg --configure -a

This will fix any possible upgrading error.
It worked for me after a lot of unsuccessfully trying other stuff. Have a nice day!


(alt) and (super) keys suddenly stopped working in gnome 3 For my daily work I use two keyboard layouts: The normal German Qwertz (setxkbmap de) as well as Neo (setxkbmap de neo). Yesterday suddenly between switching back and forth between keyboard layouts alt and super stopped working normally for window switching and accessing the gnome shell overview using Neo. More precisely with Neo:

When any window has focus pressing alt and super has no effect whatsoever (neither alt - tab for application switching, alt - for window switching, or just super to get to the activities overview).
If now window is open super works fine. The same goes for when I'm in the activities overview.
Ctrl - Alt - F1 etc. works unaffected.

My system wide default keyboard layout is neo and I switch between keyboard layouts with setxkbmap de / setxkbmap de neo via a keyboard shortcut (the calculator button). When I switch to Qwertz everything works as expected.

I didn't find anything interesting in /var/log/{syslog, Xorg.0.log, gdm/*} and as far as I can tell there were no package installations at the time the problem started. I also tried removing the cache files /var/lib/xkb/* to no avail.

I'd also be happy about hint's how I can debug this phenomenon. As it it I'm at loss with what could be the cause.

Edit: If found a workaround: After logging out and logging in again everything works (my user get's automatically logged in after boot).

sudo apt-get remove gnome-shell ubuntu-gnome-desktop and use sudo apt-get install bleachbit remove all Unwanted and install sudo apt-get install gnome-shell...ur done

IF you go into the keyboard settings you should be able to rearrange them.. As well as that have you put a lil time into finding a possible external application that lets you use them in Gnome 3 for those alt and super keys? Sorry if this didn't help you much.


Ubuntu 16.04: wifi not working Hello Ubuntu community,

My WiFi connection is not working.

Bellow Wifi connections bar it reads "device not ready".

I'm on Ubuntu 16.04.3 LTS

Greetings!

Ortiz

Additional details:

description: Ethernet interface

product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller

vendor: Realtek Semiconductor Co., Ltd.

physical id: 0

bus info: pci@0000:07:00.0

logical name: enp7s0

version: 06

serial: b8:70:f4:b8:31:14

size: 1Gbit/s

capacity: 1Gbit/s

width: 64 bits

I also tried to install the driver provided by Realtek availeable here:

http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=5&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#2

(LINUX driver for kernel up to 4.7)

./autorun.sh

Check old driver and unload it.

rmmod r8169

rmmod: ERROR: ../libkmod/libkmod-module.c:793 kmod_module_remove_module()

could not remove 'r8169': Operation not permitted

rmmod: ERROR: could not remove module r8169: Operation not permitted

Build the module and install

arch/x86/Makefile:140: CONFIG_X86_X32 enabled but no binutils support

make[2]: *** No rule to make target 'WiFi/r8168-8.044.02/src'.  Stop.

make[1]: *** [clean] Error 2

make: *** [clean] Error 2

What should I do?

Ubuntu 16.04 WiFi not working solved
do the following:
sudo aptitude safe-upgrade -y
The above command re-install updated version and necessary dependencies on your Linux box.
NOTE: It may take a minute or more based on your last updates.
You may need to reboot your system to fully recognize the new updates.
Check your WiFi
ifconfig or iwlist are your friends.
Remember when in doubt, do: man doubt e.g man ifconfig
Hope this helps

This is a sketch for the answer. Maybe part of the procedure is unnecessary.

0) Fill your user's password when asked.

1) Update your system using the software updater and a wired connection.

2) Use the command "sudo lshw -C network" to discover which is your WiFi/wireless card (hardware).

3) In my case the model was Realtek RTL8111/8168/8411. I obtained the driver here:

http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=5&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#2

To discover which kernel was mine, I used the command "uname -r", this was necessary because for my case Realtek offers two different drivers for linux (2.4x and up to 4.7).

4) Install the driver ("cd" to the folder where you stored it and run the .sh)

5) Install "apptitude" with "sudo apt install aptitude"

6) Run "aptitude update && aptitude upgrade -y"

7) Run "sudo aptitude safe-upgrade -y"

8) See if the sattus of the WiFi bar changes, and routers appear listed.

9) Connect to the desired network and enter the password.

10) Welcome to the wonders of "Wirelless" internet, where the wires are hidden a few meters away!


GNU Grub problem with boot into Windows 10 winload.exe Is my first time installing Ubuntu 16.04 and when i was installing Ubuntu alongside Windows 8 and i have Windows 10 with "UEFI" mode, my version of windows before this was the 7 i don't know why windows 8. When i put the boot mode in the BIOS to "UEFI & Legacy mode" the grub opens and when i select "Windows 8" it throws me an error telling me the

    winload.exe

isn't in the "/windows/system32/" i am searching on Internet and i don't found anything.

I don't know what actually happened to your PC, but it may help because when I got GNU grub error I used to use filling commands. May it may help you. I think you have windows 10 installed on you PC and you are using legacy mode, then follow these steps
1.Insert your bootable media of Windows 10(if Windows 10 installed else other)  and boot from it.
2.When you will see the choose language box then press shift +F10 keys and you will see the command prompt opened.
3.Then use these commands

bootrec /fixmbr
bootrec /fixboot

If both commands made succefully then type exit and close everything. Remove your bootable MEDIA.And start your PC normally, and you will be happy. Hope this will work. Reply if worked or not.


Cronjobs not working but same command works fine from command line I’ve installed Mautic (email program). It needs 3 cronjobs to run properly.

php /var/www/mydomainname/htdocs/app/console mautic:segments:update
php /var/www/mydomainname/htdocs/app/console mautic:campaigns:update
php /var/www/mydomainname/htdocs/app/console mautic:campaigns:trigger

I am on Ubuntu 18.04 and am using PHP 7.0x.

When I do sudo php /var/www/mydomainname/htdocs/app/console mautic:campaigns:trigger, or any other of the 3 listed above, they work without problem. I get the correct output and it’s executed.

However, when I put the same commands in a crontab, nothing happens.

I’ve tried everything. In the root crontab, in the www-data crontab, in my user crontab, with absolute paths to the PHP7.0 command (in /usr/bin/php7.0). Even tried first changing to the php directory and whatnot.

For example:

* * * * * /usr/bin/php7.0 /var/www/mydomainname/htdocs/app/console mautic:segments:update

Or:

* * * * * sudo /usr/bin/php7.0 /var/www/mydomainname/htdocs/app/console mautic:segments:update

Or:

* * * * * cd /usr/bin sudo php7.0 /var/www/mydomainname/htdocs/app/console mautic:segments:update

Nothing does the trick when using crontab.

Anyone know why?

From Jens A. Koch's answer to CronJob not running (by ROB) on Stack Overflow:

  Here's a checklist guide to debug not running cronjobs:

  Is the Cron daemon running?

  Run ps ax | grep cron and look for cron.
  Debian: service cron start or service cron restart

  Is cron working?

  * * * * * /bin/echo "cron works" >> /tmp/file
  Syntax correct? See below.
  You obviously need to have write access to the file you are redirecting the output to. A unique file name in /tmp which does not
  currently exist should always be writable.

  Is the command working standalone?

  Check if the script has an error, by doing a dry run on the CLI
  when testing your command, test as the user whose crontab you are editing, which might not be your login or root

  Can cron run your job?

  Check /var/log/cron.log or /var/log/messages for errors.
  Ubuntu: grep CRON /var/log/syslog
  Redhat: /var/log/cron

  Check permissions

  set executable flag on the command: chmod +x /var/www/app/cron/do-stuff.php
  if you redirect the output of your command to a file, verify you have permission to write to that file/directory

  Check paths

  check she-bangs / hashbangs line
  do not rely on environment variables like PATH, as their value will likely not be the same under cron as under an interactive session

  Don't suppress output while debugging

  commonly used is this suppression: 30 1 * * * command > /dev/null 2>&1
  re-enable the standard output or standard error message output by removing >/dev/null 2>&1 altogether; or perhaps redirect to a file
  in a location where you have write access: >>cron.out 2>&1 will
  append standard output and standard error to cron.out in the
  invoking user's home directory.

  Still not working? Yikes!

  Raise the cron debug level

  Debian

  in /etc/default/cron
  set EXTRA_OPTS="-L 2"
  service cron restart
  tail -f /var/log/syslog to see the scripts executed

  Ubuntu

  in /etc/rsyslog.d/50-default.conf
  add or comment out line cron.crit /var/log/cron.log
  reload logger sudo /etc/init.d/rsyslog reload
  re-run cron
  open /var/log/cron.log and look for detailed error output

  Reminder: deactivate log level, when you are done with debugging

  Run cron and check log files again

  Cronjob Syntax

# Minute  Hour  Day of Month      Month         Day of Week    User Command
# (0-59) (0-23)   (1-31)    (1-12 or Jan-Dec) (0-6 or Sun-Sat)

    0       2       *             *                *          root /usr/bin/find

  This syntax is only correct for the root user. Regular user
  crontab syntax doesn't have the User field (regular users aren't
  allowed to run code as any other user);

# Minute  Hour  Day of Month      Month         Day of Week    Command
# (0-59) (0-23)   (1-31)    (1-12 or Jan-Dec) (0-6 or Sun-Sat)

    0       2       *             *                *          /usr/bin/find

  Crontab Commands

  crontab -l

  Lists all the user's cron tasks.

  crontab -e, for a specific user: crontab -e -u agentsmith

  Starts edit session of your crontab file.
  When you exit the editor, the modified crontab is installed automatically.

  crontab -r

  Removes your crontab entry from the cron spooler, but not from crontab file.


How can I find out what ibus-daemon and ibus-ui-gtk3 are doing? Occasionally my desktop slows down a lot. The mouse pointer moves slowly or not at all, my fan starts whirring, and the end is generally nigh. If I'm very patient normality usually restores itself, but this happens daily.

Recently when it happened I switched to a TTY (Ctrl-Alt-F1) and ran top. It revealed that the processes ibus-daemon and ibus-ui-gtk3 were using 99% and 100% of the CPU respectively.

Maths notwithstanding, how can I find out what these processes are doing at the time?

This is  the intelligent input bus - is an input method  framework for multilingual input. If you don't use any different keyboard layouts for ex. japanese /asian etc.

Try to disable it in System Setting -> Language (something like input method from ibus to none)

Try to killall ibus-daemon and tell us if cpu is still has a high load.

Find where ibus-daemon is located.

/user/bin/ibus-daemon or /user/local/bin/ibus-daemon

cd to the directory

sudo mv ibus-daemon ibus-daemon.bak

killall ibus-daemon

restart gnome Alt + F2 then type 'r' in popup and enjoy


How do I start Firefox in another language than the default? I want to temporarily use Firefox in another languages so that menus and everything else in another language. How can I do that?

I have tried

firefox -no-remote -UILocale en-GB

but that still loads Firefox with my default locale (I have en-GB locale for Firefox installed).

I also found https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/565209 but I dunno if it's due to that.

Goto menu item Adds-On, then Languages and disable the non wanted language.
You need to restart firefox, then.

Another solution: from command line:

LC_ALL=en_GB firefox -no-remote

in this way you change the environment of firefox, making it believe it is in en_GB locale, only for the given execution.

Obviously both the locale than the firefox support package for that locale should be installed, for this to work.

For example, to see firefox in french, the prerequisites are:

sudo locale-gen fr_FR fr_FR.UTF-8 && echo "Success"
sudo apt-get install firefox-locale-fr
LC_ALL=fr_FR firefox -no-remote

Download prefered language package firefox and after you should run the following commands:

sudo rm -rf /usr/lib/firefox

sudo cp -a /root where you unzip the packagee /usr/lib/firefox

sudo rm -rf /usr/bin/firefox

sudo ln -s /usr/lib/firefox/firefox /usr/bin/firefox


What versions of linux work on Dell dimension 4600 i386 system My 1st install was on a Dell Dimension 4600i 386 2002 vintage machine.
I tried Ubuntu 16.04 -desktop-i386, which was slow, especially from keyboard...like 1-2 characters/min. - I suspected the problem may have been keyboard entry related.
I next tried Linix Lite-2.8-32 bit, which had hang ups with US english translation, google & google chrome issues.
Eventually I got it to work well for a short time, but following an update, it ground to a halt.
As a standard feature it would not display a sign-in screen at start-up for entry code, did display a p/w entry box though.  Re-install did not help, it seemed as if original issues were re-introduced.... seems logical..

My questions are:

I liked LL 2.8 when it worked, is it possible to alter its processes to run reliably?
What other versions of linux systems will work better on my system?

You should install Lubuntu 14.04.

Here's a direct link to the latest ISO image: http://cdimage.ubuntu.com/lubuntu/releases/14.04/release/lubuntu-14.04.4-desktop-i386.iso


Converting mp4 to mp3 I have a video I need to convert to mp3 (from the command line - not GUI): video.mp4

I tried:

ffmpeg -i -b 192 video.mp4 video.mp3

with no success. I get the following error:

WARNING: library configuration mismatch
Seems stream 0 codec frame rate differs from container frame rate: 59.83 (29917/500) -> 59.75 (239/4)
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
Encoder (codec id 86017) not found for output stream #0.0

so I tried lame:

lame -h -b 192 video.mp4 video.mp3

I get:

Warning: unsupported audio format

Am I missing something?

For FFmpeg with Constant Bitrate Encoding (CBR):

ffmpeg -i video.mp4 -vn \
       -acodec libmp3lame -ac 2 -ab 160k -ar 48000 \
        audio.mp3

or if you want to use Variable Bitrate Encoding (VBR):

ffmpeg -i video.mp4 -vn \
       -acodec libmp3lame -ac 2 -qscale:a 4 -ar 48000 \
        audio.mp3

The VBR example has a target bitrate of 165 Kbit/s with a bitrate range of 140...185.

you can try converting it by vlc or sound converter
go to http://soundconverter.org/ sound converter or find in your software center
or use vlc for conversion
open vlc
media
convert/save
chose your file
chose output format
chose name and destination
and start steaming
thats all


Enlarge disk partition after cloning I have SSD disk 30GB with Ubuntu installation. It is too small, because I have there some servers and projects. Currently, there is about 800MB free space.

I already bought new SSD disk with 120GB. I Would like to clone my disk with Ubuntu live CD.

sudo dd if=/dev/"30GBDISK" of=/dev/"120GBDISK"

Then I would like to enlarge disk partition, but I am not sure how to do it. I remember that I used gparted in past, but there where some problems with mounting. Should be the gparted run from CD or cloned disk?

Pls, could anyone tell me correct step by step process?

After your clone, I would use gparted to resize as needed.

http://gparted.org/display-doc.php%3Fname%3Dmoving-space-between-partitions


How to cat in for loop I have 500 folders containing many *_1.fastq.gz and *_2.fastq.gz files per folder.

I want to:

cat *_1.fastq.gz > Combined *_1.fastq.gz & cat *_2.fastq.gz > Combined_2.fastq.gz

per folder.

How do I achieve this?
I would like to learn some bash, I am comfortable with python

for i in {1..2} ; do cat *_$i.fastq.gz >>Combined_$i.fastq.gz ; done

This probably won't work well, as concatenated gzip files ; I would imagine you would prefer to use zcat *_$i.fastq.gz >>Combined_$i.fastq & then gzip; or perhaps better, simply scrap the idea of cat & do this:

for i in {1..2} ; do tar -c *_$i.fastq.gz >Combined_$i.fastq.gz.tar; done

per folder - then to recurse the folders, simply enclose the line above in a further loop, and run this from the top-level folder:

for f in *; do
  pushd . ; cd $f
      for i in {1..2} ; do tar -c *_$i.fastq.gz >Combined_$i.fastq.gz.tar; done
  popd
done

So here, the loop index $f picks every folder; saves your place; cd's to the folder; executes the loop; returns to original directory & loops again.

The pushd / popd are there to ensure an error doesn't have you roaming the filesystem! Not strictly neccesary, but useful to learn.

You need something like

for d in */
    do cd $d && cat *_1.fastq.gz > Combined_1.fastq.gz && cat *_2.fastq.gz > Combined_2.fastq.gz
done


How to boot Ubuntu from EFI/UEFI? I installed Ubuntu 11.10 on a newly bought Lenovo ThinkCentre Edge 71 (model: 1577-G3G) with EFI boot enabled. I opted for the Use Entire Disk option. Even though the installation process went without any problems/errors, when rebooting it now just gives me:

  No bootable operating system. Insert bootable disk and press any key...

I figure this is because of EFI.

Regression:

I have checked the System Setup (F1 during POST) to find a BIOS option to disable EFI/UEFI boot, however, there is no such option for this machine.
This might be caused by a "Secure Boot" feature in the BIOS.
The hardware vendor does not know of any such "secure boot" setting in the BIOS that would prevent Linux from booting.
Lenovo support did not know anything about a BIOS setting called secure boot. They also did not know of any limitations that would prevent Linux from booting.
The ThinkCentre 1577 BIOS manual does not mention EFI, UEFI nor secure boot.

How do I install Ubuntu on a machine with EFI?
- Or, since Ubuntu is probably already installed: how do I make it boot Ubuntu?

This is a modified post by nerasezi in the Ubuntu Forum

The main source for the UEFI was the Ubuntu UEFI guide

The following are the steps he did:

Use a live CD which matches the UEFI architecture. Mostly x86-64.
Boot up the live cd (xubuntu or lubuntu. Those are lightweight desktop but it should work with Ubuntu and kubuntu as well).

Be sure your live system is booting in UEFI mode. You may check it on the UEFI setup, probably under Boot option or similar. In my case it just put the "UEFI" prefix before the device name.
Once the live system is running set through the terminal a root password by typing
sudo passwd root

Then log out from the default live cd user and log in as root in gui mode.
Plug in the hard drive. I use a USB3 portable HDD but in most cases the hard drive is a SATA internal drive. Anyway, be sure you've BACKED UP ALL YOUR DATA, cause the process is going to wipe off everything on the drive.
Launch Gparted (a gui tool is much easier than the text one) and select the drive you're willing to install the system into. (Be sure to select the right one!)
Point to the top menu and select Device>Create Partition Table... A warning message pops out. Click on Advanced and select "gpt". Say OK
A new GPT disk layout had been created.
Now you need to create partitions on it. It's very important that you create as the first and primary partition, a FAT32 volume and you need to assign the label EFI to it. Once the partition is created, right click on it and select "manage flags". Check the "boot" flag and say OK.
Move on to the creation of the / partition (you may want to separate /home and /boot. Do it as you usually do. In my case I've just created the / partition), and a swap area. Always prefer primary partitions cause with GPT the 4 primary partition limitation has been removed.
Close Gparted.
Install the system into the hard drive "/" partition and remember to point here the bootloader (GRUB 1.99) to install to. If you've created a separete "/boot" partition, you have to choose that one for the bootloader installation.
Here comes the part from the UEFIBooting guide:

Building GRUB2 (U)EFI

Download the latest grub2 source code ZIP file. ftp://ftp.gnu.org/gnu/grub/

Building grub2 requires the following programs to be installed (build dependencies):

bison
autoconf
automake
flex
autogen
python (2.x series) (for autogen.sh if building from bzr repo)
texinfo
help2man
gettext (NLS support)
device-mapper
freetype2 (libs)

sudo apt-get install bison libopts25 libselinux1-dev autogen m4 autoconf help2man libopts25-dev flex libfont-freetype-perl automake autotools-dev freetype2-demos texinfo efibootmgr

efibootmgr was added to the software you need to install because you will need it later on.

For 64-bit (U)EFI:

export EFI_ARCH=x86_64
./configure --with-platform=efi --target=${EFI_ARCH} --program-prefix=""
make

In case you have a 32-bit architecture, check the online documentation at the link I have provided at the top.

Install GRUB2 in (U)EFI systems

Determine your EFI SYSTEM PARTITION. (it should be /dev/sda1 or /dev/sdb1 if is set on the 2nd hd)

Then mount the partition at /mnt/EFISYS (or at any mountpoint you wish). The following code assumes /dev/sda1 to be EFISYS partition.

sudo mkdir -p /mnt/EFISYS

sudo modprobe dm-mod

sudo mount -t vfat -o rw,users /dev/sda1 /mnt/EFISYS

sudo mkdir -p /mnt/EFISYS/efi/grub

Then, build an EFI application for GRUB and copy it and the other modules:

Enter the "grub2 compiled source/grub-core" directory - Default : /usr/lib/grub/{EFI_ARCH}

grub-mkimage -O ${EFI_ARCH}-efi -d . -o grub.efi -p "" part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot configfile linux multiboot

sudo cp grub.efi *.mod *.lst /mnt/EFISYS/efi/grub

Note : The -p "" option is important for creating a portable grub.efi app. Now create a grub.cfg in /mnt/EFISYS/efi/grub :

sudo touch /mnt/EFISYS/efi/grub/grub.cfg

Make the firmware launch GRUB2 (U)EFI as default

For non-Mac UEFI systems, efibootmgr is used to modify the UEFI Firmware Boot Manager. This requires the kernel to be booted in UEFI mode and that the kernel processor architecture should match the firmware architecture (and 'noefi' is NOT used) for 'efivars' kernel module to be loaded and efibootmgr to access the boot manager variables. Initially the user is required to manually launch "efi/grub/grub.efi" from the firmware console itself if grub2-efi was installed in BIOS mode. Then efibootmgr should be run to create the boot entry.

sudo modprobe efivars

Enter the "grub2 compiled source/grub-core" directory

grub-probe --target=device /boot/efi/efi/grub/grub.efi

Assuming the output the grub-probe to be /dev/sda1

sudo efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "GRUB2" --loader "\\EFI\\grub\\grub.efi"

In the above command, /boot/efi/efi/grub/grub/efi can be split up as /boot/efi and /efi/grub/grub.efi, which translates to (/dev/sda) -> partition 1 -> \EFI\grub\grub.efi .

Open Synaptic and remove all grub packages and install just the grub-efi packages (amd64 for me) and all the necessary dependencies.
Once the installation is over, run sudo update-grub in the terminal. You should edit "grub.cfg" from /boot/grub and check that the disk UUID matches your disk and partitions, the voice "insmod part_" and "set root='(hd0," have "gpt" textline. If everything is ok, copy "grub.cfg" to the "efi/grub" on the EFI System Partition.
If something i mentioned before, doesn't match, just edit grub.cfg and manually change them values. Then copy the file to the "efi/grub" directory on the Efi System Partition (should still be mounted under /mnt).

Then when I rebooted the system, a new entry on the Boot tab under the UEFI setup has appeared, named GRUB2 and i set it as the default boot option.

Same problem here. I've 'solved' it by permanently booting from my SuperGrub CD. I don't mind doing it this way. I see it as a security feature; my SuperGrub CD is my additional key. When I check my harddisks in Ubuntu I can see that the Ubuntu-HDD is a non-MBR disk. Looks like repartition this disk an adding the MBR would fix the problem but I'm too lazy to go through all this trouble.