The easiest way is to run

sudo touch /forcefsck

and reboot.

This will create an empty /forcefsck file that will tell the system to check all partitions at boot.


Boot to blank terminal after editing xorg.conf

First, login using the text user interface.

Then, you can either:

Remove your xorg.conf file with sudo rm /etc/X11/xorg.conf

Or:

Remove the line from the file by editing it with nano -> sudo nano /etc/X11/xorg.conf

I would recommend the second option.

Both will solve your problem and on reboot you'll have your GUI back.


fdisk can list the partition types. On my system I get:

$ sudo fdisk -l /dev/sda

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4b66b5d5

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63       80324       40131   de  Dell Utility
/dev/sda2   *       81920    30801919    15360000    7  HPFS/NTFS/exFAT
/dev/sda3        30801920   194643539    81920810    7  HPFS/NTFS/exFAT
/dev/sda4       194643601   976773119   391064759+   f  W95 Ext'd (LBA)
/dev/sda5       194643603   198836504     2096451    c  W95 FAT32 (LBA)
/dev/sda6       342951936   960387071   308717568   83  Linux
/dev/sda7       198840320   342949887    72054784   83  Linux
/dev/sda8       960389120   976773119     8192000   82  Linux swap / Solaris


How do I generate a file with suitable permissions using sprintf() & write()?

Add the line

int fd;

and modify the open call as follows:

fd = open("transaction.txt", O_CREAT | O_WRONLY, 00644);


First make sure you made a directory /var/www/html/MyDomain.com/public_html to house all your file as wanted.

  NOTE: REPLACE MyDomain.com with your domain name as wanted

Assuming that you've setup the full LAMP on your server, here's what you need to do. Create a .conf file located at /etc/apache2/sites-available/MyDomain.com.conf.

  NOTE: REPLACE MyDomain.com with your domain name as wanted

Then type command nano /etc/apache2/sites-available/MyDomain.com.conf to edit the file and paste this codes to it:

# domain: MyDomain.com
# public: /var/www/html/MyDomain.com/public_html

<VirtualHost *:80>
  # Admin email, Server Name (domain name), and any aliases
  ServerAdmin webmaster@MyDomain.com
  ServerName  MyDomain.com
  ServerAlias www.MyDomain.com

  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html index.php
  DocumentRoot /var/www/html/MyDomain.com/public_html
  # Log file locations
  LogLevel warn
  ErrorLog  /var/www/html/MyDomain.com/log/error.log
  CustomLog /var/www/html/MyDomain.com/log/access.log combined
</VirtualHost>

  This is the default .conf file provided by Linode

Then type the command a2dissite *default to remove or disable the default apache2 and then type a2ensite MyDomain.com.conf to enable the site. Also, type service apache2 reload to make the site live.

  AGAIN, TAKE NOTE TO REPLACE MyDomain.com with your domain

You might want to add the DNS zones to linode and add a slave IP.

Step 1:
Login to Linode and Click DNS Manager and click add a domain zone. Then Provide these details:

Guide Photo

Step 2:
Go to Linodes>YourLinode###>Remote Access and click reverse DNS. In then put your domain there and click Look up


My fan is very noisy pretty much all of the time - how do I fix it?

Make sure you're not blocking any of the fan outlets.

It generally a good idea to open the case from time to time to clean out all the fluff and dust that builds up.

Fans can become noisy if the blades are dirty.


If this is happening with both your laptops then there must be a problem with the signal. It happens often with me also. you should speak to whoever is responsible for the network.


Does Ubuntu block the single user mode without password

So Ubuntu has blocked this non-password single user mode?

No. The single user mode does ask a password if there is one set for "root" but that is not the default.

  to type the root password

Ubuntu does not work with "root" and the password for "root" is set/disabled on installation.

And then there is systemd. See if ...

grep ExecStart /usr/lib/systemd/system/rescue.service

returns a "sulogin"  then that is a reason for asking for a password. The parameters in that line will explain what is asked.

The man page for sulogin explains its behaviour:

sulogin is invoked by init when the system goes into single-user mode.

The user is prompted:

      Give root password for system maintenance
      (or type Control-D for normal startup):

If the root account is locked and --force is specified, no password is required.


That is because you are using sudo to open a file using a graphical text editor.

When you close geditit will try to save the most recent file (the one you are editing) in to a recent edited files history. Because that file does not exist it fails.

The solution for that is to use gksudo which is made to open graphical applications with sudo rights and user configuration.

Open the file with gksudo gedit opencv.conf instead of sudo gedit opencv.conf.


Rebooted the system and up came Ubuntu Login:

During installation you should have been prompted to create the first user.  That's the username you should be entering.

  'Password' appears, but it won't let me type anything?

That's because Ubuntu won't show the password on the screen (even as you type it).

If you can't remember your username or password, then you need to boot into recovery mode as described here: How can I re-instate my admin privileges?.

From there, you should be able to add a user account (and set its password) for normal use:

adduser myUserName

Give it a password and provide any other info asked.

Adding user `myUserName' ...
Adding new group `myUserName' (1001) ...
Adding new user `myUserName' (1001) with group `myUserName' ...
Creating home directory `/home/myUserName' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for myUserName
Enter the new value, or press ENTER for the default
    Full Name []: tester
    Room Number []:
    Work Phone []:
    Home Phone []:
    Other []:
Is the information correct? [Y/n] Y

Then, add this user to the admin and sudo groups (assuming that you want your user to have the ability to "sudo").

adduser myUserName admin
addgroup myUserName sudo

Or as Rinzwind suggested, check the /home directory for any existing users.  If you find one but you're unsure of that user's password, reset it:

passwd myUserName

Then reboot and login as your new user.


Problem solved by adding GSSAPIAuthentication no to /etc/ssh/ssh_config.


UEFI Dual Boot partitioning with 14.04 and Win 8.1 on SSD + HDD

If you install in EFI mode, you must ensure that you have an EFI System Partition (ESP). Windows should create this IF you install it in EFI mode before you install Ubuntu. That's not guaranteed, though; depending on your firmware settings, getting the right boot mode can be a gamble. I recommend leaving BIOS/CSM/legacy support turned off in the firmware to help simplify the boot path and ensure both your installers boot in EFI/UEFI mode. The details of how to do this, and even precisely what similar-sounding options do, vary greatly from one system to another, though. For more on this subject, see my Web page on CSMs.

Also, I personally would create an ESP, and perhaps other partitions, ahead of time before installing Windows. Windows creates a smallish (100MiB, IIRC) ESP by default. This is usually fine, but the ESP should be FAT32, and a few EFIs have problems with such small FAT32 partitions -- files can become mysteriously "invisible," which makes boot loaders malfunction. I recommend an ESP of 550MiB, which is big enough to avoid these problems. Note that the ESP doesn't really need to be on the SSD; the files it holds are small, and they're accessed just at boot time or when upgrading them, so the performance gain from putting the ESP on an SSD will be tiny.

Aside from the ESP and the fact that EFI-based computers generally boot from GUID Partition Table (GPT) disks, Linux partitioning needs don't vary from BIOS-mode to EFI-mode installations. You plan sounds basically reasonable, although I'd give a little more than 10GiB to root (/). Although a bare-bones Ubuntu installation takes only about 6GiB, IIRC, there are any number of reasons why it might grow above that. I'd say 20-30GiB is reasonable, assuming you can spare the disk space. (I know it's an SSD, so space may be a bit tight there.)


Firefox problem with ubuntu Font when default

Thank you @Nattgew for the link, it is a font issue. After downloading

wget -O mac-fonts.zip http://drive.noobslab.com/data/Mac-14.04/macfonts.zip
sudo unzip mac-fonts.zip -d /usr/share/fonts; rm mac-fonts.zip
sudo fc-cache -f -v

This started happening here is a screenshot after changing fonts.


Suddenly can't connect to my home network (WiFi)

Silly first steps

Have you tried restarting your home router? I know this might be a silly comment but sometimes is just the router. Disconnect from the wall and reconnect if necessary.
Verify that the password was not changed by a family member or friend. Might be as simple as that.
Delete the connection...

Delete the connection

Go to the network indicator (indicators are the icon applets in the top right: volume, network, clock/calendar, etc...):

Enter into Edit connections...

Select your home network on the list and press Delete.

Try to connect again entering the information as needed.

Still not working?

Let me know and will try to help further.


Dnsmasq does not resolve alias on Ubuntu 18 clients

I've had the same issue. I don't know the real cause or a better fix, but I found that it's possible to workaround by adding the domain to the alias target in dnsmasq. It's not ideal, but at least it's a central change rather than every DNS client.

So in your case, instead of

cname=ci.company.intranet,git-lab

Try

cname=ci.company.intranet,git-lab.company.intranet


can't launch springseed after update in ubuntu 13.04

I am Micheal Harker, one of the Springseed developers. Thanks for asking about this issue, I shall see what is going wrong in this version of Springseed, but for now you can fix the issue by doing the following:

Start a terminal with Ctrl + Alt + T.
Enter the following command: sudo gedit /usr/share/applications/springseed.desktop
Find the line where it says Exec=LD_LIBRARY_PATH=/opt/springseed /opt/springseed/springseed-bin
Replace that line with Exec=/opt/springseed/springseed-bin
Save and try to boot the application.

Hopefully this should fix your issue, and in the next patch I should fix this issue completely. Sorry for any inconvenience caused.


Answer courtesy of @iugamarian

xorg works very strangely without specific resolution settings within /etc/X11/xorg.conf

You need to put the specific resolutions and it would work perfectly.

Here is how I set up my xorg.conf and you can use this as a guide for yours (search on google for your resolution) or for a short time you can backup yours and use this one but it will let you use a maximum resolution of 1024x768@60Hz (I love this xorg.conf):

Section "InputDevice"

Identifier  "Generic Keyboard"

Driver      "kbd"

Option      "XkbRules"  "xorg"

Option      "XkbModel"  "pc105"

Option      "XkbLayout" "ro"

EndSection

Section "InputDevice"

Identifier  "Configured Mouse"

Driver      "mouse"

EndSection

Section "Device"

Identifier  "Configured Video Device"

EndSection

Section "Monitor"

Identifier  "Configured Monitor"

Modelname "Custom 1"

modeline  "640x480@60" 25.2 640 656 752 800 480 490 492 525 -vsync -hsync

modeline  "800x600@60" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync

modeline "1024x768@60" 65.0 1024 1048 1184 1344 768 771 777 806 -vsync -hsync

EndSection

Section "Screen"

Identifier  "Default Screen"

Monitor     "Configured Monitor"

SubSection "Display"

Depth 24

Modes "1024x768@60" "800x600@60" "640x400@60"

Modes "800x600@60" "640x400@60"

EndSubSection

EndSection


I have the same problem. I have recently upgraded to Ubuntu 18, and practically no GUI or windowing is working.
Here is some information:

  $ gedit
      gedit: symbol lookup error: /usr/lib/x86_64-linux-gnu/libgtk-3.so.0:
   undefined symbol: g_log_structured_standard

  $ gnome-system-monitor
   gnome-system-monitor: symbol lookup error:
  /usr/lib/x86_64-linux-gnu/libgiomm-2.4.so.1:
   undefined symbol:
  g_application_set_option_context_description

  $ dpkg -l gnome-shell
  ii  gnome-shell    3.28.2-0ubuntu0.18.04.1

  $ lsb_release -a
  Distributor ID: Ubuntu; Description: Ubuntu 18.04 LTS; Release: 18.04; Codename: bionic

  $ uname -a
  Linux 4.15.0-23-generic #25-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux

  $ dpkg -s libgtk-3-0
  Version: 3.22.30-1ubuntu1
  Provides: gtk3-binver-3.0.0


jumping cursor when using python interpreter in terminal

I was able to duplicate the same problem by making changes to PS1 in bashrc. Since I don't know exactly what was edited in your case though, try restoring the previous bashrc file using the following.

cp ~/.bashrc ~/.bashrc.bak
cp /etc/skel/.bashrc ~/
source ~/.bashrc

EDIT: Close and reopen terminal after running this.

This fixed the cursor overwriting problem in my terminal. Hope this helps you!


Hi i cannot download anything from the software center nor can i get my updates to install, i get this error

welcome to askUbuntu ;)

open up your terminal (ctrl+alt+t) or you can find it using the superkey (the windowskey in windows) and then write terminal. In terminal first write:

sudo rm /var/lib/apt/lists/* -vf

then hit enter. a password prompt will be showed up, enter password and hit enter. Afterward run the update manager in terminal via:

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

and hit enter. wait for the packages to be upgraded and updated.

EDITED/Added: Thanks to @Alexis Wilke : First check the /var partition of your hard whether its full or not. Do it using terminal with the command :

df -h

if so, clean up some space and the retry ;)

Hope that works ;)


System does not hibernate; the screen flashes off for a few seconds and nothing else happens

Something in your hardware configuration is incompatible with the kernel's hibernation methodology. Unfortunately this is hard to troubleshoot unless the troubleshooter happens to have a very similar system.

You can try the alternative TuxOnIce (wikipedia) hibernation instead.

TuxOnIce (wiki|homepage) is an alternative to the kernel's built-in hibernation technology, and is supposed to be compatible with a broader range of hardware, more reliable and more flexible.
It is easily installed, and if it doesn't work for you, as easily removed.
It does require installing TuxOnIce's custom kernel, but the instructions that follow should make it easy. If you've never opened the terminal before, you may want to now :-)

0. Requirements

The only requirement for TuxOnIce is that your swap partition be at least as large as the amount of memory (RAM) you have. You can check this by:
Start the terminal with Ctrl+Alt+T
Type free -m, and you should see something like this:

             total       used       free     shared    buffers     cached
Mem:          1024        731        260          0          0        190
-/+ buffers/cache:        540        451
Swap:         1536          6       1530

The number after Swap: (e.g. 1536) should be more than the number after Mem: (e.g. 1024)
If this is not the case, and your swap is smaller than your memory, you must either resize and increase the size of your swap partition, or configure TuxOnIce to use a special swap file. That is beyond the scope of this answer, but if you ask another question and mention it in the comments, I will answer and explain how.

1. Installing the TuxOnIce kernel
Start the terminal with Ctrl+Alt+T
Copy and paste the following into the terminal. This adds the TuxOnIce PPA and installs the custom kernel and headers.

sudo apt-add-repository ppa:tuxonice/ppa -y

and once the ppa is added:
sudo apt-get update
sudo apt-get install tuxonice-userui linux-generic-tuxonice -y
sudo apt-get install linux-headers-generic-tuxonice -y

Now reboot.
Ubuntu should now start up with the TuxOnIce kernel. If there are any problems, keep the Shift pressed at startup and you will get the Grub menu. Use the arrow keys to go to Previous Linux Versions, press enter, and press enter again to go back to the working kernel.

2. Testing hibernation functionality.
Open some of the applications you normally use, e.g. Firefox, Thunderbird, LibreOffice, etc.
Open the terminal again, with Ctrl+Alt+T.
Type sudo pm-hibernate, press enter, enter your password.
You should see the lock screen for a second, and then the TuxOnIce hibernation progress screen, like the one below:

If TuxOnIce works, your computer will shutdown.
Start it again, and wait. TuxOnIce should resume from the point you hibernated, including all the windows you opened at the position you opened.

If all this worked, go to Step 3, which lets you enable Hibernate from the dashboard.

3. Enabling hibernation from the dashboard
Press Alt+F2, type the below and then press enter:

gksudo gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
Paste the below, press Ctrl+S to save and Ctrl+Q to exit the editor:

[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

Restart, and you should see the Hibernate option as shown below:

4. Removing TuxOnIce

If TuxOnIce doesn't work for you, or you simply wish to remove it, start the terminal and enter:

 sudo apt-get remove tuxonice-userui linux-generic-tuxonice linux-headers-generic-tuxonice -y
and remember to disable the Hibernate option in the menu with:

sudo rm /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
Then restart.


Install uTorrent Server 3.3

Step 1: Download latest uTorrent Server from here

Note: (You need to download uTorrent Server for 13.04, also works for Ubuntu 14.04)

Step 2: Extract uTorrent Files

Launch terminal (with Ctrl+Alt+T or search Terminal in dash and click to open it)

Change directory to Downloads folder

cd ~/Downloads/

Extract uTorrent files to the /opt directory

sudo tar -xvzf utserver.tar.gz -C /opt/

Step 3: Set Permission

Set permission on uTorrent-server folder

sudo chmod -R 755 /opt/utorrent-server-alpha-v3_3/

Step 4: Set Symbolic link

Run the command to link uTorrent server to the /user/bin directory.

sudo ln -s /opt/utorrent-server-alpha-v3_3/utserver /usr/bin/utserver

Step 5: Start uTorrent

Run the following command in the Terminal

utserver -settingspath /opt/utorrent-server-alpha-v3_3/

Note: If you get an error about libssl.so package missing, then

Run the command below to install it:

sudo apt-get install libssl0.9.8:i386

then try starting it again.

Step 6: Log into uTorrent

Open Firefox/Chrome and browse to the URL

localhost:8080/gui

The username is admin and leave the password field empty

Original post from www.sysads.co.uk

Note2 : If libssl0.9.8:i386 isn't working, try libssl0.9.8,
if that also doesn't work, you probably need libssl1.0.0 (Ubuntu 16.04) .


Why didn’t you look at my wiki?

And to be helpful you need to show the ip rules and ip routes content ... we don’t care about rt_table or any content of files besides your config file. If tools are using yaml is specifically to not having the need to look into system files afterwards.

And what are you supposed to want to do with this :

  routes:
                  - to: 172.16.11.0/24
                    via: 172.16.11.254
                    table: 10

Only access the subnetwork 172.16.11.0?  Because if it is just that then you don’t need a gateway, if the equipment is directly connected then it will answer to all request by default coming from this subnet. That’s networking 101 and basically the difference between ‘Connected’ and ´Static’ .
If the goal is to have a real gateway then your route is for sure not good and should be 0.0.0.0/0 which is the network and netmask that means all networks from everywhere. Again networking 101.
Is it clearer like that ?


18.04: Bionic Beaver: enforce static /etc/resolv.conf

A simple edit to /etc/NetworkManager/NetworkManager.conf and disabling systemd-resolved.service(as in this answer https://askubuntu.com/a/907249/719422). But that alone, while essential, does not guarantee tamper-proof resolv.conf.

To really enforce a static /etc/resolv.conf that you know will survive restarts of any kind, you need to set the immutable attribute to it. Adding to the answer of Bastian Voigt mentioned above, you do this as SuperUser:

echo nameserver 8.8.8.8 > /etc/resolv.conf
chattr -e /etc/resolv.conf
chattr +i /etc/resolv.conf

...changing the nameserver to your chosen value. That way, you can have a really static /etc/resolv.conf.


UPDATE:
A bug was filled, and the PPA for 12.04 has been rebuilt.

Simply do:

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


GRUB Boot menu with Windows 10 bootloader appears on single boot system

No idea why that appeared from what you describe. But if you want to get rid of the unusable Windows entry, you could reinstall grub.

Just boot into Ubuntu, open a command text window and type

sudo update-grub

This rescans the partitions for valid other OS and adds them into the list. It would remove a non existing windows partition. Then install it again, e.g on the first or only hard drive /dev/sda (adapt as required).

sudo grub-install /dev/sda

This overwrites the current grub files with the updated ones.


As I can see from your screenshot you use Ubuntu 11.04. Ubuntu 11.04 is the last version of Ubuntu that is built on top of Gnome 2.x. From Ubuntu 11.10 and so, Ubuntu uses Gnome 3.x (GTK3+) libraries which are way much different from past versions of Ubuntu (GTK2+).

From your screenshot it seem to me that you must have installed a PPA to your system that brings those Gnome 3.x libraries as dependencies. Because this libraries are marked as "upgrade" for your system, they have upgraded some parts of your Ubuntu, like the new appearance settings which is available for the new version (11.10) of Ubuntu.

What you can do is:

Find which PPA caused this and remove it
Refresh your package list
Uninstall gnome-settings-daemon and then install it again

You should now have the old one that is compatible with your system (Ubuntu 11.04)


My ubuntu runs in slow motion on ubuntu 13.04 asus 1015cx

To fix the slow graphics performance, after upgrading to Ubuntu 13.04 Raring Ringtail, and using Intel GPU, do these two things:

Open the /etc/X11/xorg.conf file (it may be blank or non-existent):

gksudo gedit /etc/X11/xorg.conf

Paste this and save the file:

Section "Device"
Identifier "Card0"
Driver "intel"
Option "AccelMethod" "uxa"
#Option "AccelMethod" "sna"
EndSection

Reboot

Source: http://linuxg.net/fix-slow-graphics-performance-on-ubuntu-13-04-intel-gpu/


I think I mostly figured this out.

Follow the instructions to cmake, make, sudo make install
On Ubuntu/Debian, these executables are now in /usr/local/bin/caps2esc
sudoedit /etc/udevmon.yaml and then put this in:

- JOB: "intercept -g $DEVNODE | caps2esc | uinput -d $DEVNODE"
  DEVICE:
    EVENTS:
      EV_KEY: [KEY_CAPSLOCK, KEY_ESC]

sudoedit /etc/systemd/system/udevmon.service and put this in:

[Unit]
Description=udevmon
Wants=systemd-udev-settle.service
After=systemd-udev-settle.service

[Service]
ExecStart=/usr/bin/nice -n -20 /usr/bin/udevmon -c /etc/udevmon.yaml

[Install]
WantedBy=multi-user.target

sudo systemctl enable --now udevmon


Ubuntu 14.04 with kernel release 3.13.0-121-generic: Eclipse crashes at start

linux-image-3.13.0-121-generic contains a fix for the Stack Clash vulnerability.

Be careful with kernel updates, which fix this vulnerability. Current patch breaks many java (sun/oracle and openjdk) applications. See Bug #1699772: linux-image-4.4.0-81-generic, linux-image-3.13.0-121-generic Regression: many user-space apps crashing. The solution is to temporary reboot system with old kernel (linux-image-3.13.0-119-generic in Trusty).

Ubuntu kernel developers will prepare new patch in a few days.

UPDATE: Latest updates (at least image-4.4.0-83-generic, linux-image-4.8.0-58-generic, linux-image-4.10.0-26-generic) fix this vulnerability and problems with user-space programs.


Disable XF86Back and XF86Forward (browser back/forward on Lenovo Thinkpad)

You can disable keys using the xmodmap command. For example, to disable XF86Back, run the following command:

xmodmap -e "keycode 166="

This sets the keycode 166 (Which is the keycode for XF86Back as you can see in the xev output) to nothing, which means it is disabled.
To re-enable XF86Back:

xmodmap -e "keycode 166=XF86Back"

To disable both the Back and Forward keys automatically, create the file .xmodmap in your home folder and paste the following inside it:

keycode 166=
keycode 167=


Settings have disappeared in ubunut 15.10

What happened

When updating, the Settings app has gone corrupted.

How can I fix it?

Try typing this command in Terminal (to open Terminal type  Ctrl  +  Alt  +  T )

sudo apt-get install unity-control-center

If that doesn't work

Reinstall Ubuntu-Desktop

Once again, open Terminal and type

sudo apt-get install ubuntu-desktop

Hope this helps!


If you open up "Edit Connections" on the Networking menu (on the toolbar upper right) and choose the connection in question (eth0) then Edit you will see a pop up that lets you choose "Manual"

You may need to reserve the address on your router, assuming you are using a typical home router? You don't say so I am assuming that. In a typical setup your best bet is to choose a high address like x.x.x.240 so there won't be a  conflict with other devices (you don't have 250 devices connected do you?). If you do that you likely won't have to reserve an address on the router.

Then enter settings like this:

EDIT 2: Based on a comment, the OP needs to have a DHCP config using eth0 at work. It's possible to create a second config, say eth_work, that uses DHCP, and modify eth0 as above, then just choose the one you need based on location/environment.

EDIT I see in a comment you have a Verizon router -- so of course, not sure if it's relevant, we are talking about your LAN ip addresses. The WAN address can change from time to time (router restart or other times) unless you pay them for a fixed IP address. You probably know that, just added to round out the answer for others who may read it


Caught in loop when trying to login after upgrade from 14.10 to 15.04

I fixed this problem by removing the nvidia drivers

sudo apt-get remove --purge nvidia-*
sudo apt-get install ubuntu-desktop


The following packages have unmet dependencies!

You can install the package using.

make sure the repo sources are up to date

sudo apt-get update

To Install the package.

sudo apt-get install packagename

Once the package determines that you have some missing dependencies, run the following command to fix broken or missing dependencies.

sudo apt-get install -f

Above command will only download the missing dependencies if you have already installed the package.


upgrade from 12.04.01 LTS to 18.04 64 but LTS

Most folks would suggest backing up and verifying your data (twice, or more) and then wiping the hard drive including 12.04 and installing 18.04. I feel it will be quicker and less troublesome.

A key point is, was your 12.04 install 32-bit or 64-bit?  If it was 32-bit, you have no choice but backup-verify, backup-verify, erase, and install anew.  Run uname -i to check; if you see x86-64 you have 64-bit. If you see i686 or i386, you have 32-bit.

It may work, if you upgrade
from 12.04 64-bit to 14.04 64-bit, then
from 14.04 64-bit to 16.04 64-bit, then
from 16.04 64-bit to 18.04 64-bit.

Ref: https://askubuntu.com/a/1055003/197910  and https://askubuntu.com/a/47812/197910


You dont need to implement difficult methods for install nagios.

It is in Main ubuntu repository and can be installed as

sudo apt-get install nagios3 nagios3-cgi nagios3-core

You can install plugins and related packages with :

sudo apt-get install check-mk-config-nagios3 ganglia-nagios-bridge gosa-plugin-nagios gosa-plugin-nagios-schema libnagios-plugin-perl nagios-images nagios-nrpe-plugin nagios-nrpe-server nagios-plugin-check-multi nagios-plugins nagios-plugins-basic nagios-plugins-common nagios-plugins-contrib nagios-plugins-extra nagios-plugins-openstack nagios-plugins-standard nagios-snmp-plugins nagios3-cgi nagios3-common nagios3-core nagios3-dbg nagios3-doc ndoutils-nagios3-mysql pnp4nagios pnp4nagios-bin pnp4nagios-web


How to fetch the code of the binary installed on a  machine?

You can fetch the source of a package with:

apt-get source [package]

Make sure you have the deb-src lines in /etc/apt/sources.list generally, copying the deb lines and changing deb to deb-src is enough.

If you don't know the name of the package with the file in question, you can get that info with apt-file. However, I can't remember how off the top of my head. I recommend reading the docs. :)


How to disable the error sound using the terminal?

From the "Terminal" application's menu go to Preferences menu;
Select the current terminal profile;
In the Text tab you need to uncheck Sound / Terminal Bell


Brightness Keys in Dell N4010 (14R) causing freezes

Edit "/etc/default/grub" as root.

gksu gedit /etc/default/grub

Now, look for the line that looks like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Append "acpi_backlight=vendor acpi_osi=Linux" to the end of that line, before the end quotes, so that the line now looks something like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor acpi_osi=Linux"

Save and close the file, and run the following command:

sudo update-grub

Now, reboot, and test out the brightness keys. They should be working correctly now.


There are a couple possibilities:

The Graphic Card is not support or not compatible.
The files in the USB are maybe missing.

If you haven't already, try making the USB flash drive with Unetbootin.

UNetbootin allows you to create bootable Live USB drives for Ubuntu, Fedora, and other Linux distributions without burning a CD. It runs on Windows, Linux, and Mac OS X.


How to active OpenGL in a HP DV6700 with Intel Graphics card

There are a lot of issues with this chipset/GPU. Most of the issues revolve around the driver not upto date. Here is the WIKI with all of the fixes to try. There Are A Crap load of them.

UBUNTU WIKI FOR INTEL DRIVERS AND FREEZES
https://wiki.ubuntu.com/X/Bugs/Lucidi8xxFreezes

Hope this helps you out. You are not the only one with the issues.


You should be able to enable brightness adjustment via the buttons by following the solution posted in https://askubuntu.com/a/862575/589172:

Create file: /etc/acpi/events/yoga-brightness-up with following content:

event=video/brightnessup BRTUP 00000086
action=/etc/acpi/yoga-brightness.sh up

Create file: /etc/acpi/events/yoga-brightness-down with following content:

event=video/brightnessdown BRTDN 00000087
action=/etc/acpi/yoga-brightness.sh down

Create file /etc/acpi/yoga-brightness.sh with following content:

#!/bin/sh

# Where the backlight brightness is stored
BR_DIR="/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/"

test -d "$BR_DIR" || exit 0

MIN=0
MAX=$(cat "$BR_DIR/max_brightness")
VAL=$(cat "$BR_DIR/brightness")

if [ "$1" = down ]; then
    VAL=$((VAL-71))
else
    VAL=$((VAL+71))
fi

if [ "$VAL" -lt $MIN ]; then
    VAL=$MIN
elif [ "$VAL" -gt $MAX ]; then
    VAL=$MAX
fi

PERCENT=`echo "$VAL / $MAX" | bc -l`

export XAUTHORITY=/home/ivo/.Xauthority  # CHANGE "ivo" TO YOUR USER
export DISPLAY=:0.0

echo "xrandr --output eDP-1 --brightness $PERCENT" > /tmp/yoga-brightness.log
xrandr --output eDP-1 --brightness $PERCENT

echo $VAL > "$BR_DIR/brightness"

Make it executable

chmod a+rx /etc/acpi/yoga-brightness.sh

Restart acpi by typing

sudo service acpid reload


Can't see my flash drive on the Launcher

use your Gparted.If its already installed , just type gparted in your Unity dash. If not installed type as

sudo apt-get install gparted

and then launch it.


DHCPD Server issue multiple IP's to one Nic

Do you really need to give out multiple IPs for devices to get traffic routed to them using iptables? For webservers, it may be easier to use a single IP and different ports, or just use virtual hosts in Apache, for example.

It doesn't appear to me as if giving multiple IPs to an interface using DHCP is really possible. at least the manual for dhcpd.conf doesn't mention it is:

The fixed-address declaration is used to assign one or more fixed IP addresses to a client. It should only appear in a host declaration. If more than one address is supplied, then when the client boots, it will be assigned the address that corresponds to the network on which it is booting. If none of the addresses in the fixed-address statement are valid for the network to which the client is connected, that client will not match the host declaration containing that fixed-address declaration. Each address in the fixed-address declaration should be either an IP address or a domain name that resolves to one or more IP addresses.

Which means you can put more than one address, but they need to be in different subnets (according to the subnet configuration in dhcpd as well). FWIW, I don't recall seeing a DHCP client which supports giving out more than one IP for an interface... that's even if other applications like NetworkManager supports it.


Gnome Colour Manager & dispcalGUI calibration issues

But no amount of digging has found a way to adjust those 3 colours by themselves.

On a Laptop, you can't - the screen needs to have the necessary hardware controls, and Laptops lack these. You should skip this part of calibration on a Laptop (the "Laptop" preset does this too if you select it).


Did you read man ssh? It shows how you can use an "Escape Character" sequence:

ESCAPE CHARACTERS
     When a pseudo-terminal has been requested, ssh supports a number of
     functions through the use of an escape character.

     A single tilde character can be sent as ~~ or by following the tilde by a
     character other than those described below.  The escape character must
     always follow a newline to be interpreted as special.  The escape
     character can be changed in configuration files using the EscapeChar
     configuration directive or on the command line by the -e option.

     The supported escapes (assuming the default ‘~’) are:

     ~.      Disconnect.

     ~^Z     Background ssh.

     ~#      List forwarded connections.

     ~&      Background ssh at logout when waiting for forwarded connection /
             X11 sessions to terminate.

     ~?      Display a list of escape characters.


Solution for showing more notifications in the bubble

For Ubuntu 13.04 and up. If you interpret OPs question as "I want more notifications to appear",

sudo nano /usr/share/glib-2.0/schemas/net.launchpad.indicator.notifications.gschema.xml

Look for the lines that say

<range min="1" max = "10"/>
<default>5<default>

and then edit the <default>5<default> and `<range min="1" max = "10"/> to whatever you need.

For the curious

In the debian for the software, it has a few folders that it installs into. It installs things into /usr/share and /usr/lib. Library files are in .so so I can't edit anything in there. Navigating through /usr/share, I found the doc folder which is just debian package info, pixmaps which are the pngs for the icons on the notification bar, and then there was glib-2.0 which conveniently had an easy to read xml file. This is where you edit the variable to show whatever value of notifications you want.

Solution for Saving the Notifications to File

If you interpret OPs question as "I want to see my notification history", this is a general solution, you can do what you want with the log produced, IE let it accumulate, have it clear on shutdown, etc. Indicator-notifications is based on notify-osd as noted in their notes. Indicator-notifications is not necessary for this solution.

In sudo nano /etc/environment add LOG=1.

Reboot.

You notifications will now be stored in/home/$USER/.cache/notify-osd.log

Edit: Global Variables may be a bad idea to change because it is unknown what other programs use that variable. Add LOG=1 to your local .bashrc instead.


Here's what I did and it's been perfectly working for me:

Step 1: Open Terminal and paste sudo nano /etc/default/grub
Step 2: Update the line GRUB_CMDLINE_LINUX_DEFAULT to include nomodeset.
Step 3: sudo update-grub && sudo reboot

At this point, TeamViewer should be able to load, and you should be able to log in. But the resolution is bad and the graphics aren't good either.

Step 4: Open Terminal and paste sudo apt install xserver-xorg-video-dummy -y
Step 5: Make a script called monitor.sh with contents as sudo rm /usr/share/X11/xorg.conf.d/xorg.conf and nomonitor.sh with contents as sudo cp xorg.conf /usr/share/X11/xorg.conf.d/. This can be kept in home folder for easier accessibility.
Step 6: The contents of xorg.conf are as follows:

Section "Device"
    Identifier  "Configured Video Device"
    Driver      "dummy"
EndSection

Section "Monitor"
    Identifier  "Configured Monitor"
    HorizSync 31.5-48.5
    VertRefresh 50-70
EndSection

Section "Screen"
    Identifier  "Default Screen"
    Monitor     "Configured Monitor"
    Device      "Configured Video Device"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    Modes "1366x768"
    EndSubSection
EndSection

Step 7: Now all that's required is to run one of those scripts according to the situation (monitor connected or disconnected) and TeamViewer, VNC, AnyDesk, etc will start working fine with any resolution.


Create sequential filename with dd command

Use a loop:

i=01
while sudo dd if=/dev/nst0 of="FILE$i" bs=1024k count=1 # loop till `dd` errors out
do
    i=$(printf "%02d" $((i+1))) # 0-padded 2-digit number
done


How to drag KDE programs to the Launcher in Ubuntu 11.04

This has been reported as a bug.

You can still pin a KDE app to the launcher by running it. Right click on the launcher item and select "Keep in Launcher"


How can I Customize my ubuntu to look like windows

Open your terminal and paste these commands one after one

sudo add-apt-repository ppa:upubuntu-com/gtk3
sudo apt-get update
sudo apt-get install win2-7
gsettings set org.gnome.desktop.interface gtk-theme 'Win2-7-theme'
gsettings set org.gnome.desktop.wm.preferences theme 'Win2-7-theme'
gsettings set org.gnome.desktop.interface icon-theme 'Win2-7-icons'
gsettings set org.gnome.desktop.wm.preferences button-layout 'menu:minimize,maximize,close'

Credit goes here


Try creating it using sudo.  Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo mkdir /usr/local/lib/gap4r5

That should work.


Is there any way to install multiple software at a single command via terminal?

just type this

sudo apt-get install program1 program2 program3

in a terminal to install many programs in the same command. Or you can use install scripts. Which are basically .sh files that have these commands in them, example below:

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install htop

Put it in a file and name it like script.sh and run it from a terminal.

Also look at this answer for more info,

How do I make post-install scripts?


Unsupported monitor resolution after upgrade from 10.04 LTS to 12.04 LTS

Current X11 can start without /etc/X11/xorg.conf and usually works well with DVI/LCD monitor. However monitor with vga cable or older monitor may still need xorg.conf.

After upgrade, your old xorg.conf maybe moved to

/etc/X11/xorg.conf.bak
/etc/X11/xorg.conf.dist-upgrade-20130108

Copy it back to /etc/X11/xorg.conf and restart lightdm.

If they are completely missing, you many have to recreate your xorg.conf.


Why connection is droping when I scan the ip with nmap?

If the internet connection drops it may be due to the router or firewall detecting excessive traffic coming from your machine. Use less agressive setting for nmap

nmap -T polite -sP 192.168.1.0/24

The flag you want to use is -T. There are other options besides "polite" and they can be found in nmap manual


Can not connect to internet in VirtualBox VM - Ubuntu

There are udev rules preventing the new interface from being brought up.

In the original VM, launch the Terminal (press the key combination Ctrl+Alt+T) and enter following command before cloning the new VMs:

sudo rm -f /etc/udev/rules.d/70-persistent-net.rules


Seamless integration of Windows software in Linux

A very rough outline of what I would do:

Have a sender application in Ubuntu that you associate with all these filetypes. It receives the path to the file and then translates that into something the VM can understand (eg a samba share).
It sends this path to a daemon running on the VM. All this does is listens for connections from the sender and then opens the paths that it gets sent with the default application.

Again, this is all very high-level but it shouldn't be too hard to script out.

There are some good alternative ideas bubbling around in chat too.

The rest is built into VirtualBox (seamless mode).


Decrease height of title bar of apps without switching theme on Ubuntu 18.04

The above did not work for me... but I got good results
with the following in my file ~/.config/gtk-3.0/gtk.css :

 /*
 * Reduce height of window header (title?) bars.
 * Seems enough to specify padding, no need to repeat
 *   padding-left padding-right padding-top padding-bottom
 * nor it seems necessary to even mention
 *   margin-top margin-bottom
 */

.default-decoration {
    min-height: 0px;
    padding: 3px;
}

.default-decoration .titlebutton {
    min-height: 0px;
    padding: 0px;
}


How can I add (define) more supported screen resolutions (so that I will be able to select them in Ubuntu configuration)?

I want to add 1920x1080 60Hz

cvt 1920 1080 60

generates lines for new mode definition:

  1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083
  1088 1120 -hsync +vsync

which I use:

xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr --addmode DVI-I-1 "1920x1080_60.00"

And now I am able to chagne resolution.

Since xrandr doesn't remember settings after session restart, I created a script which I run at each startup. Script consist following lines:

xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr --addmode DVI-I-1 "1920x1080_60.00"
xrandr --output DVI-I-1 --mode "1920x1080_60.00"


DVD won't load on laptop with Ubuntu 12.04

Have you considered the possiblity that the drive or disk might not be working and it isn't an OS problem? Since it isn't working on either ubuntu or windows.

Anyways, for ubuntu, if the disk drive (without the disk in tray) shows a disk drive icon in "computer", or, the disk drive is detected in the program "disks", then there is no problem with drivers.


Solution is quiet simple. You have to install additional icon set:

sudo apt-get install gnome-icon-theme-full


VPS gone after reboot. SSH unavailable / VNC working

I am assuming you are running ubuntu here(because I had the same problem).
Try to ping 8.8.8.8 from within the VNC to check whether VPS is connected to the network. If not =>
Check /etc/netplan for a backup config file, you should find there the details to config netplan.
After you apply the config, reboot and vps should be online.
If not, create a ticket with your vps prvider, they need to restart the network manager or restore some sort of backup for your network settings.


How to define createdate of entire image folder using terminal with exiftool?

Files with the warning

Warning: No writable tags set from /home/ubuntu/house/120151116163735582.jpg

don't have a tag CreateDate. For this reason, the files can not be renamed.

To illustrate this:

% exiftool '-filename<CreateDate' -d %y%m%d_%H%M%S%%-c.%%le  ~/tmp
Warning: No writable tags set from /home/aboettger/tmp/relax.jpg
    1 directories scanned
    0 image files updated
    1 image files unchanged

% exiftool -CreateDate ~/tmp
======== /home/aboettger/tmp/relax.jpg
    1 directories scanned
    1 image files read

% exiftool -CreateDate="2011:11:25 12:00:00" ~/tmp
Warning: Duplicate Orientation tag in IFD0 - /home/aboettger/tmp/relax.jpg
    1 directories scanned
    1 image files updated

% exiftool -createdate ~/tmp
======== /home/aboettger/tmp/relax.jpg
Create Date                     : 2011:11:25 12:00:00
    1 directories scanned
    1 image files read

% exiftool '-filename<CreateDate' -d %y%m%d_%H%M%S%%-c.%%le  ~/tmp
    1 directories scanned
    1 image files updated

% ls -log ~/tmp
total 56
-rw-rw-r-- 1 16501 Nov 25 10:04 111125_120000.jpg
-rw-rw-r-- 1  16473 Nov 25 09:55 relax.jpg_original


Help creating a messagebox notification with yes/no options before an application runs

One approach would be to use Zenity. For example:

#!/usr/bin/env bash

if zenity --question --text="What do you choose?"; then
    zenity --info --text="You pressed \"Yes\"!"
else
    zenity --info --text="You pressed \"No\"!"
fi


Download Lubuntu iso with the last updates included into it

You can download the current daily iso files from the iso testing tracker, which is used by us who are testing Ubuntu and the Ubuntu community flavours.

ISO Testing tracker

Specifically you can find daily iso files for 16.04 LTS "Xenial", and 18.04 LTS "Bionic" and soon also for "CC" to be released as 18.10 in October.


What can I do when I receive a 'server-error-not-accepting-jobs' CUPS server error in 11.10?

I actually figured this out while asking the question...

What I did to correct this was to go to 'Printer Properties > Policies > State' and checked both the boxes for 'Enable' and 'Accepting Jobs' and then that corrected the problem I was having.


The problem seems to have something to do with fonts. Uninstall any new fonts and that should fix it.
Here's the link I came across that helped me solve this: https://forum.snapcraft.io/t/chromium-file-chooser-is-not-displaying-font/17021/4


Why are terminal shortcuts different than the ones used elsewhere for the same task?

Keyboard shortcuts used by Terminal are not available for programs running in the Terminal. That's why Terminal tries not to use shortcuts that are standard among command line programs.

Ctrl+V is a standard for "Insert verbatim", i.e. you can use for example Ctrl+VReturn to insert a carriage return character (ASCII #13). It is used for example by Bash and some editors.

PgUp is used to scroll in text editors, pages and such, and people would likely get angry if that didn't work.


Open new window when clicking Unity launcher icons?

For opening a new window instead of middle click you can use shift + left click on a launcher icon.

For nautilus it won't work if your current folder is home. While you may rarely use two nautilus windows for the same -home- folder, it will not be a problem.


Multiboot not working after Windows 8 / Ubuntu "something else Installation type"

You are showing standard BIOS/MBR type system. With Windows 8 you still need fast boot off to avoid conflicts.

But you need to install grub2's boot loader into the MBR. All BIOS systems load BIOS, BIOS determines hardware and starts boot from MBR. So boot loader in MBR is still Windows if that is what is booting.

You can install grub2 manually from live installer or use Boot-Repair.
How to restore the Ubuntu/XP/Vista/7 bootloader

https://help.ubuntu.com/community/RestoreUbuntu/XP/Vista/7Bootloader

https://help.ubuntu.com/community/Boot-Repair


Apps run as root appearing like win 98 style after installation of gnome 3

The answer to this is to fix the gtk2 theme to do that:

Click activities
Type in appearance
Click the first result

and in themes, select Ambiance instead of Adwance

Now this should be fixed


How to find all programms installed on Ubuntu 18.04

I'm not sure if it will give you exactly what you want but you can try it and see:

apt list --installed > file_of_installed_prog


How can I turn off the nvidia splash on startup?

in your xorg.conf you can enable the following option

Option "NoLogo" "True"

it will disable the boot screen as long as the configuration file doesn't change. Worked on my alienware m11x and macbook pro


How can I reconfigure the nvidia proprietary drivers from the command line (ssh)?

jockey is the tool used in Ubuntu to manage 3rd party drivers, particularly proprietary ones like the Nvidia drivers. In addition to the gui tool, it has a text based utility for manipulating drivers as well, jockey-text from the jockey-common package. To list what drivers jockey thinks are available for your hardware use  jockey-text --list; e.g.:

jockey-text --list

returns (on my system with an ATI graphics chipset):

xorg:fglrx - ATI/AMD proprietary FGLRX graphics driver (Proprietary, Disabled, Not in use)

To then enable it, do sudo jockey-text -e DRIVER, thus in my case, to enable the fglrx driver, I'd do sudo jockey-text -e xorg:fglrx.

See jockey-text --help for more information (sadly, there doesn't appear to be a man page for it).


Trying to set up a web server, but my IP address looks very strange

Looks like an IPv6 IP address. Ubuntu supports IPv6 by default so that should be no problem.


See comment above. Problem was caused by a conflict of available WiFi modules. For some reason the kernel was finding an "asus" WiFi module in addition (and prior to) the correct Intel module. The system doesn't do a very good job of handling multiple found interface, and an even worse job of telling the user about it. Adding it to the blacklist of modules solved the problem.


There's nothing wrong with your installation. You see this message because you haven't set up any VPN. You've installed the program, but you haven't yet set it up to be used. If you configure one or more VPN to automatically start at boot time, instead of this message, you'll see the nicknames of each VPN as it starts up.


Is there a way to make Activities overview offer a link to the .desktop file for each entry?

The desktop files live in /usr/share/applications or ~/.local/share/applications. A desktop file in the user's directory ~/.local/share/applications takes precedence over a desktop file with the same name in the system-wide directory /usr/share/applications. If you want to modify a default desktop file, copy it from /usr/share/applications to ~/.local/share/applications and edit the copy.


So it was working intermittently with Windows, and not at all with Ubuntu. then intermittently with Ubuntu too. I ended up buy a new PSU which solved the issue.


Can't login to Ubuntu 17.04 after editing environment variables for java

During the process of your changes, you have run the elevated command sudo in your personal space whereas you have lost permission to some of the files needed for your GUI environment.

You can verify this with this command:

$ sudo chown -R $(whoami):$(whoami) ~/

You can resolve it by giving owner to the problem files with:

$ sudo chown -R $(whoami):$(whoami) ~/

You may also have to verify the integrity of your login manager after taking charge via the commands avaible.  You can do this with lightdm with these two commands:

$ sudo apt install --reinstall lightdm
$ sudo dpkg-reconfigure lightdm

As per the chat, errors resulting from the latter commands are due to trying to work with a broken repository... running an EOL version of Ubuntu.  This can be resolved by upgrading or downgrading to a supported version.  Choices are:

14.04 LTS (downgrade)
16.04 LTS (downgrade)
17.10     (upgrade)
18.04 LTS (upgrade)


How to extract specific audio track (track 2) from mp4 file using ffmpeg?

You can use the -map option to choose specific streams. To get a list of the available streams, run ffmpeg -i INPUT_FILE.EXT (Do not forget -i!), which gives e.g.:

…
Input #0, EXT, from 'INPUT_FILE.EXT':
  Metadata:
    encoder         : VirtualDubMod 1.5.10.2 (build 2542/release)
  Duration: 01:35:35.88, start: 0.000000, bitrate: 1029 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 640x352 [SAR 1:1 DAR 20:11], 891 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/s
Metadata:
  title           : English AC3 2.0 (Stereo) @ 128 kbps
    Stream #0:2: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 192 kb/s
Metadata:
  title           : English AC3 2.0 (Stereo) @ 192 kbps
At least one output file must be specified

If you want to extract e.g. stream #0:2, use -map 0:2:

ffmpeg -i INPUT_FILE.EXT -map 0:2 OUTPUT_FILE.EXT

Further reading

ffmpeg Wiki page about the -map option
man ffmpeg/OPTIONS/Advanced options/-map


No, I'm afraid not. The communication between Do and Tomboy is done over DBus using the hardcoded org.gnome.Tomboy interface. Gnote uses org.gnome.Gnote, so they will not be able to talk to each other. If they implement the same interface then it might not be too hard to patch the Do plugin to use either DBus interface though.

(but why would you use gnote over Tomboy unless you have a problem with Mono, which you clearly don't as you are using Do..?)


Burning iso to usb in ubuntu on mac hardware

All you need is run Startup Disk Creator https://apps.ubuntu.com/cat/applications/quantal/usb-creator-gtk/ and feed it with image file (in your case xubuntu.iso).


Changing the pop out feature of the icon bar

Your best option (according to me atleast) is to increase the Edge Reveal Timeout option in the Ubuntu Unity Plugin in the Compiz Config Settings Manager. That will reveal the Launcher Bar only after the designated time.

 Compiz Config Settings Manager   is not installed by default. Click on the link or you could also alternatively run the following to install the package via a terminal (Default keyboard shortcut: CtrlAltT) sudo apt-get update && sudo apt-get install ccsm
After that open it and scroll down to Ubuntu Unity Plugin and then increase the Edge Reveal Timeout.


XUbuntu: Make Shift+NumPad work like Windows

After some grepping I found the solution: You need to add the numpad:microsoft option to the XkbOptions. On older Ubuntus, do that in your xorg.conf. On newer ones open the file /etc/default/keyboard and change this line:

XKBOPTIONS=""

to

XKBOPTIONS="numpad:microsoft"

Save and reboot (restarting X doesn't seem to work, at least not with RAlt+PrintScreen+K). You may need to run sudo dpkg-reconfigure keyboard-configuration for changes to take effect.


How can I Install ubuntu on a pc preinstalled with Windows 8?

I don't know about the packard bell easynote but a friend of mine came with an old acer that couldn't boot from USB and the optical drive did not work (she forgot to mention this before I said "sure, I'll help you install ubuntu")

Now, I can't specifically help you to do it in your computer, but what I did was put her HDD in my laptop, boot the usb, install and once the system was up and running, put that HDD back in her laptop. (it's a weird way of doing it but "desperate times call for desperate measures"

if you have another laptop at hand (and don't mind the guarantee seal) it'll do the trick for you too.

I can't recall if replacing the HDD voids the guarantee seal, look into that before doing it.


Has anyone built and installed a kernel for Ubuntu 18.04.1 LTS?

I found the problem. The method of kernel compilation I used works for 16.04 LTS but not 18.04.

To my shock and horror there is an intallation guide that details how to compile an 18.04 kernel

Apart from the red face. Everything is fine and the installed kernel appears to boot and operate correctly.

So I will look for the installation guide when 20.04 LTS arrives.


Different memory types in System Monitor

Virtual memory accounts for all the libraries and executable objects that are mapped into your process, as well as your stack space.
Resident memory is the amount of memory that is actually in RAM.
Writable memory is the amount of address space that your process has allocated with write privileges.
Shared memory is memory that may be simultaneously accessed by multiple programs with an intent to provide communication among them or avoid redundant copies.
X server memory is the amount used by the X server for the GUI-session.

References:

"Memory Management" on The Linux Documentation Project website
Stackoverflow post
"Shared memory" Wikipedia page


How to access ubuntu server 16.04 sever's files from windows 10 PC?

sudo passwd -a username and set your password for your given username, use it when Windows asks for the name and password.


Environment variable is set but not accessible on server

Environment variables for a user can be set in ~/.profile  however since you are running some commands as root this will not work unless you also change roots .profile file.

Another option is to change the file /etc/profile to add the paths and this should work for all users.


Is there a way to not show .pyc (Python bytecode) files under Nautilus?

For Django, the quickest way might be to stop generating them in the first place.

Now, that might sound like a terrible idea... Bytecode precompilation is what makes Python as fast as it is so it's definitely something you want in production, but we can disable bytecode generation just for things run through manage.py.

Open it up and add a sys.dont_write_bytecode = True line. It should look something like this:

#!/usr/bin/env python
import os
import sys

sys.dont_write_bytecode = True

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ap.settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)

Warning: ap.settings is specific to my project, not yours, and the layout of the file may be different in your version of Django... Be careful if you copy the whole thing!

Production uses (like through a wsgi server) should skip over manage.py and still generate the bytecode files, but in development —where you're more likely to use ./manage.py runserver— should stay clean.

This will slow things down a little though.

Oh and to clean up:

# Python 2
find /path/to/project -name '*.pyc' -type f -delete

# Python 3
find /path/to/project -name '__pycache__' -exec rm -rf {} +

Be aware that both these statements delete files, so you might want to check them (remove the -delete or -exec ... statements) before running this hot. They'll just show you what files match.


Failed to initialize NVML: Driver/library version mismatch in Ubuntu 20.04

Very strange but restarting the system faded away the error. https://bugs.launchpad.net/ubuntu/+source/nvidia-cuda-toolkit/+bug/1888440


Unable to load Firefox Addons website on Firefox!

Reset your browser and settings by removing you ~/.mozilla folder (move it to somewhere else just in case you actually need it), there might be something preventing you from opening some pages, if you want to restore the setting just move the folder back in to its original place.

You can see the .mozilla folder by opening Nautilus in your home and pressing Ctrl+h, after locating it just rename it to .mozilla.old with Firefox closed and re-open Firefox when done.

Has an option you can also open Firefox in safe mode by going to Help > Restart with Add-ons Disabled or by opening a terminal and typing firefox -safe-mode.


How discover what's the uuid of connect network from Terminal?

You haven't given any information about your version or configuration, but if you are using a recent version of the network-manager package then you can use nmcli e.g.

nmcli con status

or to output only the UUID of the active connection(s)

nmcli --terse --fields UUID con status

or in short form

nmcli -t -f UUID con status


No Plugin in the WordPress Admin end, but in the plugins/ folder

Problem is not with the folder permission then, problem is with the File Permissions underlying in each folders.

Right click on the particular Plugin folder that's not accessible from the admin end, and Click on Properties.

On the Permissions tab, click on the button Change Permissions for Enclosed Files, and change the properties as per your choice. I've given the Owner and the User Group the permission to Create and delete files, and Others to access files only. Click Change, and you are done. It will provide permissions to the files underlying each of the folders. For multiple folders, select 'em all, and do it once. :)


How to run Ubuntu Tweak's janitor automatically?

for the moment the answer is no...
Let me expand on that statement.
In many ways, your question is similar to this Q&A:

How do I create a quicklist for Ubuntu Tweak?

Ubuntu Tweak only offers (currently) a limited API call for the executable itself.
Therefore - when trying to invoke a Ubuntu-Tweak feature when starting from startup applications or via a quick list, you can only use the command line parameters that have been made available.
ubuntu-tweak -f janitor is one such feature.  There are no command-line parameters (currently) for what you are seeking to do.
You can test this yourself by running ubuntu-tweak -h.  The linked answer above shows the typical result you could expect.
Some programs - once running - expose an interface such as dbus that allows you to invoke features via an external program.  Rhythmbox is one such software with its rhythmbox-client which can be called externally.  Ubuntu-tweak unfortunately does not offer the same external interface.

What you'll need to do is submit a patch to the author that would add a command-line parameter to do the function you are seeking.
Alternatively - add an externally callable interface such as dbus when ubuntu-tweak is actually running.


Creating a terminal command to extract tarballs

you could also create an alias like this:

alias utgz='tar -zxf '

Now issuing utgz tarball.tar.gz will extract all the files from the ta, without the overhead of going through a separate shell.
As I understand it the alias just acts as a  text substitution.

If you type alias at your prompt you might see something like 'ls=ls -F' and so on.
so utgz tarball.tar.gz gets changed to tar -zxf tarball.tar.gz.


Download Permission Denied while using Wubi

I wouldn't recommend using the "Windows Installer", aka "Wubi". It generally causes a lot of problems. If you still want to use the "Windows Installer" in stead of the normal way, just try running it as administrator.

Basically, to solve this problem efficiently, we need more information.
Does anyone know whether Wubi stores a log file somewhere?


Ubuntu One does not sync: firewall settings?

Solved.
See Does Ubuntu One require administrator privileges?

  Hi, Looks like you have switched users. If you log in to Ubuntu One and sync your >files, then log into Ubuntu One as a different user on your ocmputer and perform a >sync without clearing out the old metadata you will get errors. To fix this please >open a Terminal and run the following commands:

  u1sdtool -q

  rm -rf ~/.local/share/ubuntuone

  u1sdtool -c

  Let Ubuntu One run for a bit as it recreates your metadata.


How to add Callouts to an image using a software installed by default in Ubuntu?

We can use LibreOffice Draw for adding basic callouts to images and then exporting them in the required format. It's pretty easy and LibreOffice Draw is installed by default on Ubuntu.

Launch LibreOffice Draw using Dash (press the Super key) and querying for LibreOffice.

Insert the picture you wish to add the Callouts to. Navigate through Insert Menu → Picture → From File → browse and locate the picture/image.

Make sure that there is a check mark before the Drawing Toolbar. Navigate through View → Toolbars → Drawing.

Find the Callouts Button in the Drawing Toolbar. If you cannot find it, then expand the arrow at the right.

The different Callouts style available are shown in the image below:

Apply the style you wish and then export as png/jpg/gif/any other format of your choice using File Menu → Export. Crop and resize the image as necessary.


How to install dh_virutalenv 0.8 or 0.9?

Via a PPA with unstable versions

sudo apt-add-repository ppa:dh-virtualenv/daily
sudo apt-get update
sudo apt-get upgrade

After that, you should have version 0.10.

Only for information, the latest version in the officially Ubuntu repositories is currently 0.7.2 for Wily.


lubuntu: Ubuntu 16.04.01 kernel (4.13.0-32-generic) kernel panic wifi not working

I was able to solve it after upgrade to latest LTS 18 version and disabling hp_wmi on my HP Pavilion dv6700 laptop PC

# echo "blacklist hp_wmi" > /etc/modprobe.d/hp.conf

After reading around multiple forums it looked like a wifi driver conflict between hp_wmi and intel generic driver for controlling onboard wifi chipset.

Reference:
https://bbs.archlinux.org/viewtopic.php?id=169503


Is it possible to get a running UEFI system with stock Qemu and OVMF on 19.10?

See this GitHub repo OSX-KVM for a QEMU UEFI bootloader. They use it to load Clover (and hence MacOS), but you can find the OVMF file that you need there. Alternatively, you can build your own EDK2 as shown in this guide.


Converting an ARF file using nbr2mp4 with Kubuntu 13.10

nbr2mp4 converter comes with the libraries it requires but doesn't read them from the directory.

Just run

export LD_LIBRARY_PATH='./'

to let nbr2mp4 'see' it's own libraries.

Then the converter can be run as

nbr2mp4 XXX.arf

To make sure that the conversion is in progress check if one of /tmp/wbx_nbr*.h264 files size is increasing.

Tested on Ubuntu 16.04 64bit


Can I use my second ethernet port to bridge the first?

If you want to bridge connections you need bridge-utils.

Create a virtual bridge:
root@bridge:~> brctl addbr br0

Add interfaces:
root@bridge:~> brctl addif br0 eth0
root@bridge:~> brctl addif br0 eth1

Bounce them:
root@bridge:~> ifconfig eth0 down
root@bridge:~> ifconfig eth1 down
root@bridge:~> ifconfig eth0 up
root@bridge:~> ifconfig eth1 up

Make sure the bridge interface is up:
root@bridge:~> ifconfig br0 up

Reference material for further reading such as adding to startup or scripting the process here.  Or if you prefer the Ubuntu documentation, it's here.


Install Specific Version of Ruby with `apt-get install ruby-full ruby-dev`

You didn't mentioned which version of Ubuntu you are using, anyway based on the version of ruby you are getting: 2.3 I guess you are running xenial or something newer that of that.

If you search for the package you are looking for at Ubuntu Packages, you will see that your desired version 1.9.3 only exist in trusty; so you simply can't install or downgrade it from 2.3 to 1.9.3 because it does not exist in any of your running Ubuntu repositories.

So what you can do is installing it from a third party PPA, the closest thing to your desired version which I found is Brightbox Ruby PPA, they have compiled 1.9.1 for all available Ubuntu versions from lucid to yakkety; They have a source package for zesty but they didn't compile it yet.


You wouldn't ruin your motherboard installing Ubuntu. Chances are, you just have Secure Boot enabled (don't you just love Win8?). To fix that, boot into BIOS and toggle the Secure-Boot setting off.


You should install GRUB into the Master Boot Record of /dev/sdc and configure your bios to boot from that drive first - GRUB will detect your Windows XP installation and add it as a boot option.

Have a look at this site it has a good description with screen shots to guide you through the install.


When I modify /etc/security/limits.conf I get "E45: 'readonly' option is set (add ! to override)"

/etc is a system directory that a users account will not (or should not) have access to.

You need to use sudo vi /etc/security/limits.conf was required, ie. the use of sudo elevates privileges for the command following the sudo.


I had the same issue. I have resolved it with next steps:

Open nvidia-settings and change brightness settings. Close it without explicit save;
Open nvidia-settings again and check that previous modifications are saved;
If modifications were not saved delete .nvidia-settings.rc;

sudo rm ~/.nvidia-settings-rc
Repeat steps 1 and 2;
When settings are persisted between sessions try to reboot PC;
If after reboot settings are not applied automatically add next command to the Startup Applications:

sh /usr/local/bin/nvidia_starter
Reboot and check if settings are applied during user login;

BTW. mentioned fix does not cover one more scenario. When you already logged in after switching to other user and back Startup Applications will not be run. To cover this scenario please use next steps:

Create nvidia_watcher script in /usr/local/bin/ folder and add +x flag to it;

#!/bin/bash
debug=false
log_file="/var/log/nvidia_settings.log"
log () {
    if $debug ; then
    echo "`date "+%d/%m/%y %H:%M:%S"` :: $@" >> $log_file
    fi
}
dbus-monitor --sesion
"type='signal',interface='com.canonical.Unity.Session',member='Unlocked'" | while  read line ; do
    if [[ "$line" == *member=Unlocked* ]]
    then
        log "$line"
        sh /usr/local/bin/nvidia_starter &
    fi
done

It will run nvidia_starter script each time 'switch user' operation is performed;
Create nvidia_starter script in /usr/local/bin/ folder and add +x flag to it;

#!/bin/bash
debug=false
log_file="/var/log/nvidia_settings.log"
log () {
if $debug ; then
    echo "`date "+%d/%m/%y %H:%M:%S"` :: $@" >> $log_file
fi
}
sleep 4
log "initializing nvidia settings."
nvidia-settings -l >> $log_file
log "nvidia settings initialized."

And after all add nvidia_watcher to the Startup Applications.


Memtest86+ does not work on efi system. Is there an alternative way?

Memtest doesn't work with an UEFI system, and don't try it with bios compatiblity mode! Insted you have to use the windows memory testing utility.


After Installing Ubuntu 14.10 on a Dell Dimension 4600 x-86, Ubuntu Is Running Very, VERY Slow

With that age of a machine you need to go to an older, lighter OS. With only 1/2GB of RAM you should use Lubuntu or Xubuntu, because the full Ubuntu needs more RAM and your experience will not be great. Also use UNetBootin to make a bootable USB then test/install from there.


This is the icon of the application called GreekDDL Downloader http://www.iboostup.com/app/cz.vity.freerapid.core.mainapp


I can't see my ink levels for my canon pixma ip2702 printer

There is a command line tool ink  reading ink levels from a variety of printers including Canon printers using libinklevel5.

List of supported printers.

Unfortunately the graphical tool inkblot  to display ink levels is deprecated and available for 10.04 only.


ls command very slow after deletion of thousand files on a directory

It depends of the underlaying file system type you use, most of the file system do not compact directories after a deletion.

Unmount the filesystem and use e2fsck -D to optimize the directories.

If that problem occurs many time you should consider to use a dedicated file system for that directory. You should use a different file system type, I don't know which one will dynamically compact the directory entries, Btrfs by design is advertised to not suffer of that problem.


To keep your system in English and change the regional format to your desired location:

First, click on the "Language Support"

Install the desired language by clicking "Install / Remove Languages..."

Italian, in this case

After it's done, go to "Regional Formats".
Eccolo! The language you just installed will be available there.


I have used several different laptops and serial adapters to connect to Cisco devices.  I typically use minicom to connect -- you might try that.   It is available from the software center, or you can use sudo apt-get install minicom.  (If you do use minicom, use Ctrl-A and Z to access options -- check the speed and serial settings.  Everything else tends to be correct.)

And /dev/ttyUSB0 is most likely correct if you're using a USB to Serial adapter.

Rollover to RJ-45 will not work, as you suspected.

If things still do not work, look for a different serial adapter -- I've been through several that work fine in Linux, but I suppose it's possible you might have gotten one that needs drivers that are not easily loadable under Ubuntu/Linux.

Borrow your friend's adapter if you can, and you can rule out your adapter that way.


Why does tilde V output ~V [LogLevel ERROR]?

I think you're on an SSH session. SSH lets you send special commands to SSH itself (not the shell you logged into) using certain "escape" sequences. From man ssh:

ESCAPE CHARACTERS
 When a pseudo-terminal has been requested, ssh supports a number of
 functions through the use of an escape character.

 A single tilde character can be sent as ~~ or by following the tilde by a
 character other than those described below.  The escape character must
 always follow a newline to be interpreted as special.  The escape
 character can be changed in configuration files using the EscapeChar
 configuration directive or on the command line by the -e option.

 The supported escapes (assuming the default ‘~’) are:
 ...

 ~V      Decrease the verbosity (LogLevel) when errors are being written
         to stderr.

 ~v      Increase the verbosity (LogLevel) when errors are being written
         to stderr.

So, if you pressed Enter for the username prompt, then ~V as the first two characters of the password, SSH would interpret that as a command to increase the log verbosity.

So, over SSH, to enter ~V as the first two characters of a password, either:

Press ~ twice so that it gets treated as a literal ~ (per the second paragraph in the quote above): ~~V, or
Do something at the start of the prompt to break the sequence (type a character and delete it, for example).


Cannot access a file using java.io.FileInputStream

Let me rephrase my earlier 'answer' - I don't think I adequately communicated my intent.

In my twelve years of Java programming, I've used the java.io.File abstraction dozens of times in web apps and in stand-alone apps, on Linux file systems and on Windows file systems, (and Java works with Linux file systems just fine).

In my estimation, the cause of more than 90% of FileNotFoundExceptions is minor typing errors in the file system path or file name embedded in the Java program that cause the program to attempt to access a non-existent file rather than the file that the programmer intended it to access.

GIVEN that your original post cited file extensions for an Excel spreadsheet as 'xslx' and that your current post still cites trial.xslx and trail.xslx file names, (yes, they are just simple typing errors, but simple typing errors are my best guess at the cause of your problem given the information you've provided above)

THEN my answer is that you need to ensure that the path name and file name. (especially the file name extension), that is used in your Java program match the path and file name of the file you are looking to access exactly.  And remember, Linux file paths are case-sensitive, unlike the Windows file system.

FINALLY, if you have confirmed that your file path is not the problem, post the Java code that is being executed when the exception is thrown, and I will be happy to check further into it.

OR, refer to the following:

http://docs.oracle.com/javase/tutorial/essential/io/

for all the gritty details of working with Java IO components.


Making Unity Dash open with the last used Lens as the active Lens

You might try to the Dconf Editor to change the Unity Lenses.
UbuntuForums.org has some posts about it.
Ubuntu Forums

The Wiki of Ubuntu.com has also some information about lenses.... and how to build one yourself.. If you have some spare time laying around somewhere, give building a lens a shot.
wiki.ubuntu.com


Wifi stopped working after Ubuntu update on Dell Latitude d620

Go to the Network Connections panel and disable the auto connect of the wifi connection you used before. Then create manually a new connection. After reboot you could use the wifi again.


Nvidia driver - After install - No unity or black screen with cursor

I suggest you remove the nvidia drivers, and then install bumblebee, since you got optimus:

sudo apt-get remove --purge nvidia*
sudo apt-get install bumblebee bumblebee-nvidia

After that, reboot and hope it works.


Estimating compressed file size using a list parameter

Compression will depend greatly on the repetition of the text it's compressing.  If your files are plain text and all very similar, then you'll get great compression, if they are different compression will start to suffer.  And if they are already compressed (i.e. JPG, MP3, etc) then compression will be even less.

As you implied with the "knapsack" algorithm, with sufficient time and CPU resources, it should be possible to try all combinations of files in a single compressed tar file.  Unfortunately that could take way too long.

Assuming your files are similar (i.e all are mostly text, or all are similar files), then you might be able to get a close estimate by compressing each file individually and then adding the sizes together for an estimate at a total compress tar archive.

The only downfall is the estimate will fail and produce a smaller final tar.bz2 file if the files are similar and the compression algorithm can use the similarities to it's advantage.


How do I remove Ubuntu from a dual-boot Windows 7 laptop?

Step 1

Boot from a Ubuntu Live CD.

Step 2

Open Terminal.

Step 3

Run the following commands:

sudo add-apt-repository ppa:yannubuntu/os-uninstaller
sudo apt-get update; sudo apt-get install -y os-uninstaller && os-uninstaller

Step 4

Select the OS you wish to uninstall, in this case Ubuntu.

Step 5

Reboot and enjoy your Ubuntu-free system.

Source: Ubuntu Help


How to mount a CIFS share so it doesn't warn about external file modifications

In your fstab, change the line to

//qnap/share /data  cifs username=qnap,password=<your_pass>,_netdev,uid=1000,gid=1000 0 0

Insert your password in place of  and also note _netdev. The option _netdev is always recommended for cifs mounts in fstab. This switch delays mounting until the network has been enabled, though excluding this option won't create a problem.

The warning is because you didnt provide the password during the mount.

A similar but slightly different(in the way that the credentials are stored in a file and the file is referenced in fstab) method has been described here.

Edit: Use noauto(like you did), if you wish to mount during login instead of boot. user and sync options are also optional, use them according to your needs.


Does the camera (by itself) allow you to see any images? I agree with karel you probably haven't lost them, just hidden (do you have file permission to rwx?) Also try a different file-manager like PCManFM to see if it is a software problem. Do any other computer's show anything..is your USB locked?


Guide to installing a fully encrypted file system?

If you want to fully encrypt your disk during installation. Use the alternate installer disk. Then follow this step by step guide.


A browser which allows to manually change margins while printing

For some reason, the problem was fixed by resetting Firefox to it's default state.

Go to Help ->Troubleshooting Information
Select Reset Firefox as shown in Image.

Now set the following options(or relative similar options) to desired value.

printer_Print_to_File.print_margin_bottom
printer_Print_to_File.print_margin_left
printer_Print_to_File.print_margin_right
printer_Print_to_File.print_margin_top

Now you can print the file.


Network Printer over samba not working on lubuntu 15.10

As it turns out, the problem was with hplip plugin itself. Whatever version I have tried seems to be broken/not working with HP LaserJet 1020.

Solved the problem by installing 'foomatic-db' package using synaptic package manager. Don't install 'foomatic-filters'. Earlier I was installing both - since the error was filter failed. Foomatic-filters conflicts with CUPS.

After installing 'foomatic-db', I re-installed my windows network printer via samba using the foomatic driver instead of hpcups and everything worked fine.


First, make sure to have a temp folder available which has enough free space. The following commands create dumps which can be several GBs in size.

You can create a new tmp folder using the following command. You may want to change /tmp to a different filesystem with enough space

TMPDIR=$(mktemp -d -t -p /tmp)

Steps to find Memory Leak

Find out the PID of the process which causing memory leak (you can also use e.g. htop if available) and store it in a variable called pid

ps -aux

Given that the PID is available in the variable pid, you can capture the memory consumption using /proc/$pid/smaps and save into some file like beforeMemInc.txt.

cat /proc/$pid/smaps > $TMPDIR/beforeMemInc.txt

Wait some time for memory consumption to increase.
Capture /proc/$pid/smaps again and save it as afterMemInc.txt

cat /proc/$pid/smaps > $TMPDIR/afterMemInc.txt

Find the difference between first smaps and 2nd smaps, e. g. with

diff -u $TMPDIR/beforeMemInc.txt $TMPDIR/afterMemInc.txt

Note down the address range where memory got increased, for example:

   beforeMemInc.txt            afterMemInc.txt
---------------------------------------------------
2b3289290000-2b3289343000   2b3289290000-2b3289343000  #ADDRESS
Shared_Clean:    0 kB       Shared_Clean:    0 kB
Shared_Dirty:    0 kB       Shared_Dirty:    0 kB
Private_Clean:   0 kB       Private_Clean:   0 kB
Private_Dirty:  28 kB       Private_Dirty:  36 kB
Referenced:     28 kB       Referenced:     36 kB
Anonymous:      28 kB       Anonymous:      36 kB  #INCREASE MEM
AnonHugePages:   0 kB       AnonHugePages:   0 kB
Swap:            0 kB       Swap:            0 kB
KernelPageSize:  4 kB       KernelPageSize:  4 kB
MMUPageSize:     4 kB       MMUPageSize:     4 kB
Locked:          0 kB       Locked:          0 kB
VmFlags: rd wr mr mw me ac  VmFlags: rd wr mr mw me ac

Use GDB to dump memory on running process or get the coredump using

gcore -o $TMPDIR/process $PID

I used gdb on the running process to dump the memory to some file.

cd $TMPDIR
gdb -p $pid
dump memory memory.dump 0x2b3289290000 0x2b3289343000

Now, use strings command or hexdump -C to print the memory.dump

strings memory.dump

From this you get readable information which helps you locate those strings in your source code.
Analyse your source to find the leak.


How to activate hardware accelerated video decoding. VA-API in Chromium-based browser

The steps I took to run Stadia 4K gameplay in Ubuntu 20 in Chrome (maybe it works in Chromium too):

Install the latest video card driver. For the NVIDIA cards, go to "Software & Updates" => "Additional Drivers" tab => choose the latest driver. Probably it's the same for Radeon.
Install Stadia+ Chrome addon.
Restart the browser.
Before opening any games in Stadia, press SHIFT+TAB, a panel will appear on the right side, choose VP9 and 4k.


If you run the following command, you will see a list of USB devices and if they are enabled to wake up the system.

cat /proc/acpi/wakeup

You will see a list of items such as the the one seen below.

USB0      S3    *disabled   pci:0000:00:12.0

Once you have established which device is the keyboard, let’s say USB0, run this command.

sudo su
echo USB0 > /proc/acpi/wakeup

Now, if you run the command from the start again, you should see enabled next to the device.

USB0      S3    *enabled   pci:0000:00:12.0

That worked for me, and I can wake up my desktop with any key.

Details on the wakeup codes for devices can be found here (link courtesy of Santhana Krishnan).


how to stop updates like "Language support" and "Handheld device font ..." on PC

Here ya go; http://scarygliders.net/2012/04/01/quicktips-stop-apt-downloading-translations-indexes/

1) Edit (or create) a file called /etc/apt/apt.conf
    sudo vi /etc/apt/apt.conf
Then add the following directive;
    Acquire {
               Languages "none";
    };

2) Remove any existing “i18n” files from /var/lib/apt/lists/
    cd /var/lib/apt/lists

Now, you have a choice; one or the other of the following;

A) The safer method;
    sudo rm -i i18n
The system will ask for confirmation for each file you wish to delete – there may be quite a lot of these :)

B) The time-saving but be careful how you type this one method;
    sudo rm i18n

Now if you perform an apt-get update, or update via aptitude or synaptic, your system should no longer try do download the Translation Indexes.

This works for me on Debian and Ubuntu.


Why should I be installing my applications in the /opt location?

the documentation for the Linux file-system explains the history & purpose of /opt. the most common use is to setup applications, which run on their own, without having much dependencies to the rest of the system. "untrusted software" should not be installed at all; in case one has to, an hygienically isolated KVM container is ordinary to most safe way to do so.

  This directory is reserved for all the software and add-on packages that are not part of the default installation. For example, StarOffice, Kylix, Netscape Communicator and WordPerfect packages are normally found here. To comply with the FSSTND, all third party applications should be installed in this directory. Any package to be installed here must locate its static files (ie. extra fonts, clipart, database files) must locate its static files in a separate /opt/'package' or /opt/'provider' directory tree (similar to the way in which Windows will install new software to its own directory tree C:\Windows\Progam Files\"Program Name"), where 'package' is a name that describes the software package and 'provider' is the provider's LANANA registered name.

  Although most distributions neglect to create the directories /opt/bin, /opt/doc, /opt/include, /opt/info, /opt/lib, and /opt/man they are reserved for local system administrator use. Packages may provide "front-end" files intended to be placed in (by linking or copying) these reserved directories by the system administrator, but must function normally in the absence of these reserved directories. Programs to be invoked by users are located in the directory /opt/'package'/bin. If the package includes UNIX manual pages, they are located in /opt/'package'/man and the same substructure as /usr/share/man must be used. Package files that are variable must be installed in /var/opt. Host-specific configuration files are installed in /etc/opt.

  Under no circumstances are other package files to exist outside the /opt, /var/opt, and /etc/opt hierarchies except for those package files that must reside in specific locations within the filesystem tree in order to function properly. For example, device lock files in /var/lock and devices in /dev. Distributions may install software in /opt, but must not modify or delete software installed by the local system administrator without the assent of the local system administrator.

  The use of /opt for add-on software is a well-established practice in the UNIX community. The System V Application Binary Interface [AT&T 1990], based on the System V Interface Definition (Third Edition) and the Intel Binary Compatibility Standard v. 2 (iBCS2) provides for an /opt structure very similar to the one defined here.

  Generally, all data required to support a package on a system must be present within /opt/'package', including files intended to be copied into /etc/opt/'package' and /var/opt/'package' as well as reserved directories in /opt. The minor restrictions on distributions using /opt are necessary because conflicts are possible between distribution installed and locally installed software, especially in the case of fixed pathnames found in some binary software.

  The structure of the directories below /opt/'provider' is left up to the packager of the software, though it is recommended that packages are installed in /opt/'provider'/'package' and follow a similar structure to the guidelines for /opt/package. A valid reason for diverging from this structure is for support packages which may have files installed in /opt/ 'provider'/lib or /opt/'provider'/bin.

in case the default permissions won't suffice to run an application from /opt one can take ownership alike sudo chown -R $USER:$USER /opt/somepackage (this question has been asked over and over, maybe just search instead of asking). there are no rules, here I install much into /home/somecompany/somepackage directory, just because it has it's own partition and is being more frequently accessed than /opt, which is kind of relic from UNIX.


Problem in downloading videos using youtube-dl

This is the complete list of all the sites youtube-dl supports:
https://ytdl-org.github.io/youtube-dl/supportedsites.html
The site you want to download from is not among them.


Your sshd_config is missing many fields my working version has, mayge that's the problem.
Here's mine which does keylogin for me successfully, based on the sample in /usr/share/doc/openssh-client/examples/sshd_config

# Package generated configuration file
# See the sshd_config(5) manpage for details

# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 1024

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 120
PermitRootLogin without-password
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys

# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /etc/issue.net

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes


Error while using webcam with cheese in ubuntu 14.04

In cheese go to settings and set the Photo Resolution down to 640x480 instead of 1280x720.


bug in gforth.el preventing emacs24 from ppa from installing

I think you can temporarily solve the problem by commenting (removing) the following lines in /usr/share/emacs(24)/site-lisp/gforth/gforth.el:

(eval-when-compile
  (byte-compile 'forth-set-word-properties)
  (byte-compile 'forth-next-known-forth-word)
  (byte-compile 'forth-update-properties)
  (byte-compile 'forth-delete-properties)
  (byte-compile 'forth-get-regexp-branch))

I have solved this problem by using this method.


nss-myhostname is a plugin for the GNU Name Service Switch (NSS)
  functionality of the GNU C Library (glibc) providing hostname
  resolution for the locally configured system hostname as returned by
  gethostname(2) There are two possible solutions:

You may have not (or incorrectely) configured your hostname in /etc/hosts. Correcting that may resolve this.
Another way, as the warning suggests, is to install nss-myhostname, which is referred to in debian as libnss-myhostname, so install using:

sudo apt-get install libnss-myhostname

Source : https://askubuntu.com/a/453084/69743


Could not mount iPhone after Restore - 14.04

i'm a Kubutu User, my problem was related to this error when try to use iFuse:

GNUTLS ERROR: A TLS packet with unexpected length was received.

To solve this, i did the following:

Open Konsole
type this:

sudo idevicepair unpair

then type:

sudo usbmuxd

try to run iFuse with sudo:

sudo ifuse /media/iPhone/ --root

Now open Dolphin with kdesudo as follows:

kdesudo dolphin

Navigate to /media/iPhone/ now, you should see the root files.
To unmount your device, use:

sudo fusermount -u /media/iPhone/

Remember to unmount your device before unplug it!

This worked again when i restored my iPhone 3G to Whited00r7.1.
Also, you can set permissions to ifuse and fusermount, using chmod 777 ifuse, and chmod 777 fusermount, so, the next time you will not have to use "sudo".

Now, you can mount you iPhone 3G. The usbmuxd is used only the first time. The next time you want to mount your iphone, typing usbmuxd is not needed.

I hope this helps. I use Kubuntu 14.04.1 x64


Ubuntu 18.04 auto move same applications at startup to different work spaces and start scripts

For your scenario, it suffices to have a startup script that launches and positions these applications. That startup script could then start your terminal on the first workspace, then move to the second workspace, start the terminal and maximize it, then move to workspace 3 and start firefox.

A tool that allows you to do these manipulations is wmctrl. You can switch to a specific desktop, you can move windows to specific desktops, and you can manipulate windows such as maximize them, minimize them, undecorate them... See man wmctrl for documentation. You can find many examples on the internet.

Once you have a working script, you can have it start up automatically on login..


Dual monitor setup not working on XFCE login screen

Install arandr by pasting the following in terminal:

sudo apt install arandr

Open arandr. Your screens are probably configured how you like. If so, go to Layout > Save As. Open the saved script and copy the entire xrandr command.

Create the file /etc/lightdm/lightdm.conf if it is not created already. You can use:

sudo mousepad /etc/lightdm/lightdm.conf

Now paste the following. Replace my xrandr command below with your own.

[Seat:*]
display-setup-script=xrandr --output VGA-0 --mode 1440x900 --pos 0x72 --rotate normal --output DVI-0 --mode 1440x900 --pos 3360x82 --rotate normal --output HDMI-0 --mode 1920x1080 --pos 1440x0 --rotate normal

Reboot and your login screens should be correct.


Proprietary:

Go here and choose the driver.
Once it's downloaded, go in the command line and find where you have the .run file located, and move it to a folder called driver.
Run:

cd driver/
unzip *.zip
chmod +x *.run
sudo ./*.run

And install it.

Once it's done, sudo shutodown -r -h now.
To configure the settings and such, run amdcccle preferably as root.


How do I install Ubuntu 10.10 beside Windows 7 onto a fake raid?

It sounds like you've got a "fake raid" system.  That is, the operating system directly accesses the disks and the BIOS has enough smarts to boot off such RAID disk sets.

This is supported in Linux via the dmraid package, which should configure the the set as a /dev/mapper/something device (you don't want to install anything to the underlying /dev/sdX devices, since they refer to individual member disks in the RAID set).  The following page should give some details on how to install Ubuntu on such a system:

https://help.ubuntu.com/community/FakeRaidHowto

When booting from the install CD, it would be worth picking the "Try Ubuntu" option first and checking whether the RAID set has been detected correctly.


Ubuntu 16.04 restarts itself when it's about to load the desktop on startup

Can you try to do update/upgrade commands in the terminal that you can start on the login screen?
Had the same issue, solved the same way as if I have a blue screen.
Got it from the links.

Stuck on blue screen while booting the system

Errors were encountered while processing: man-db


Try Ubuntu - Where does it store my files?

Nowhere.

Files are stored on memory and will be deleted when you restart your computer.

If you are using an Live USB, instead of a LiveCD-DVD, when you create it there is an option to make a "persistent" drive. If you check it, your files will be saved to the USB memory.


The WAN and LAN Ethernet ports are on different "sides" of the router.  WAN is usually a dhcp client and LAN has dhcp server.  Plug web server into LAN side and plug client into LAN side then it should work.  In other words all you need is a switch, not a router.

If this is WiFi, there is a security setting that prevents wifi clients from communicating with each other.  Turn this (Virtual Network Segmentation) off.