Can't change login name on Ubuntu 16.04 desktop

To change the username :

sudo usermod -l newUsername oldUsername

To change the homefolder :

usermod -d /home/newHomeDir -m newUsername

To Change the group:

groupmod -n <newgroup> <oldgroup>

To do this in one command:

Login as root :

usermod -l <newname> -d /home/<newname> -m <oldname>


dpkg error while trying to extract a file

It should be an ar file, so you should be able to extract it with:ar x ti-openmpacc_1.1.1_cortexa15hf-vfp-neon.ipk

The archives within the ar archive, should be tar, so you can extract those with tar -zxf.

References:
http://manpages.ubuntu.com/manpages/utopic/man5/deb.5.html
https://stackoverflow.com/questions/17369127/extracting-and-creating-ipk-files


fingerprint-gui and 18.04 packaging issue

Since the original poster didn't provide an answer after he figured it out for himself, here's mine (confirmed to work on 18.04 Bionic Beaver btw):

Basically, you just need to follow the instructions on this answer here ( Using Fingerprint reader in 16.04) EXCEPT you need to switch out libbsapi with libqca2-plugins on the third and final sudo apt install line.

Also, unlike Windows 10, swiping your fingerprint at the unlock/login screen needs to be followed by pressing the "Enter" key to manually trigger the unlock (somewhat annoying but still way better than inputting a text-based password everytime), but that's not relevant to this question, just sometime to be aware of for users coming to Ubuntu from Windows.


Can you publish your app in Software Center via a PPA?

Go to  myapps portal  and follow the instructions there.


Trying to add a linkkey to my bluetooth keyboard on Ubuntu 20.04.1 LTS (dual boot system)

I was facing the same issue in Ubuntu 20.04, worked-around it by using a Root Explorer instead
I used this command:
sudo nautilus
That way I could navigate to the bluetooth folder and change the linkkey!


No HDMI output on 12.10, Intel HD graphics (Ironlake)

Confirmed not working on 12.10 but was working on 12.04 I checked today. Different TV mine is Insignia. xranr has relatively identical output (aside from resolution differences)


(x)Ubuntu doesn't detect virtual hard drives

I was also using this and having the same issue, after downgrading off of Windows 10 Build 10565 to the Windows 10 RTM it fixed the issue with Hyper-V for me.

The current Windows 10 Insider Build 10565 made some changes to Hyper-V including support for nested virtualization, but among these changes it has introduced issues with VM's running certain linux distros.

To downgrade from the Windows 10 Insider build, you are required to do a complete reinstall of Windows 10.


go to your home folder

press ctrl + h

then your home folder will display hidden files

check whether any of the folders is locked

right click on the folder then click "properties". In that Click "permissions".

In owner, change folder access to "create and delete files."

And then click "Apply Permissions to Enclosed files"

If you cannot see any locked folders then select all folders and do the above


Attempting to install Steam, Software Centre missing?

It would be good to know how the PC was resetted and what has been done exactly. As far my reserach (googeling) braught me: Terminal: sudo: apt-get: command not found suggest a clean reinstall.


both IPV4 and IPV6 at the same time over DSL connection?

Enter the connection manager(Network Connections). Select the Wired tab. Click on your connection and click edit. Under the IPv4 tab, select Manual. Your settings will be as follows:

1)Addresses: I recommend 192.168.1.99, if that does not work, use 192.168.0.99

2)DNS servers: 8.8.8.8 (Google's recursive DNS)

3)Search domains: example.com

4)Click Save. Now you should have both IPv4 and IPv6.

If you need to, disconnect and reconnect, or reboot.


The author no longer believes in linux
http://k9copy.sourceforge.net/web/index.php/en/nouveautes/12-theend


Try using the Ubuntu CD to do an "upgrade" in-place. Over your old OS. No data/applications should be lost.


How to delete selected results from bash history?

Use:

history -d OFFSET

to delete the history entry at offset OFFSET even before it was added to your bash history file. To find out the right OFFSET, you need only to run history command. It's the number from from the start of the line which contain the history entry that you want to delete it.

And to save the modifications to the history use:

history -w

See more details in this guide.


Ubuntu server or desktop? I'll assume server, since you're talking about tty as if you expect to interact on the command line.

Have you tried just typing your username in? It's been my experience on some installs that the prompt is sometimes issued too early and disappears, but it still accepts input. Once you enter your username (you should see it appear on the screen as you type), it should prompt you for a password.


location error while installing matlab in ubuntu 16.04

You're trying to install 64 bit version of Matlab to 32 bit Ubuntu. You either have download 32 bit matlab (note, it was only supported till 2012 version), or install Ubuntu 64 bit (which is highly recommended, if you CPU supports it — and it does unless it's either ancient or some of Atoms).


Why is there no Ubuntu One sync in my tomboy notes sync preferences?

Must be in the version included in 10.04, the one click add sync wasn't there. It was just about that easy using the method found in the tutorial at https://wiki.ubuntu.com/UbuntuOne/Tutorials/Notes


At the bottom see if "fi" is missing there,if it is not there add it.

Just put "fi" at the left margin at the last and close all the commands with "fi".

See here


phablet-flash aborting while installing Ubuntu Touch on Nexus 4

OK, I found the issue. I will post the answer for reference for everyone, who tries the same: Installing Ubuntu Touch on a phone, when you use a virtual machine for the Ubuntu that you are using.

The primary issue: To be able to access the Nexus from inside the VM, I had to activate a "device filter" so that Ubuntu inside the VM can see the phone. The device filter has to be different for the phone, when it is in Recovery mode!

In detail:

I first flashed the phone to Android 4.2.2. This way I was able to at least see the Recovery mode that comes with the Ubuntu Touch installation (NB: It seems that stock Android on the Nexus 4 does not ship with Recovery mode [citation needed]). The problem remained, that phablet-flash remained at INFO:phablet-flash:Waiting for recovery image to boot.

After I installed the CWM Recovery image, I found out that adb cannot see the device in Recovery mode. Hence I checked the VirtualBox settings and added the Nexus 4 as a device filter again in the USB settings. It turned out that in Recovery mode, the product ID of the phone is different, hence it was not forwarded to the guest OS in the VM and phablet-flash could not continue, as soon as the phone was in R-mode.

I hope this helps, if someone happens to try the same.


You have two issues:
[1] Accessing a server ( router in your case ) that can only use SMB1.
Samba disabled client SMB1 so the only way around it if you want to use the Nautilus is the "client min protocol = NT1" edit. You could of course use a CIFS mount specifying smb1 so that only access to the router is affected.
[2] Accessing a server that has disabled SMB1 on the server side. ( Win10, Ubuntu20, etc...)
This is actually a GVFS bug ( gvfsd-smb-browse ) not a samba bug. But it involves "discovery - then access" to the server not access by itself. You can still access the server but you must bypass the bug and access it directly. For example in Connect to Server:
smb://hostname.local/share-name

Or:
smb://server-ip-address/share-name

Again, you can bypass gvfs entirely and do a CIFS mount then you can specify whatever dialect version of samba you want.


HP Omen ubuntu setup problem ACPI Error: no handler or method for GPE (number), disabling event (code)

Install Ubuntu 18.04 LTS version.
While booting using the live USB, remember to enter the try ubuntu before installing option by pressing E at the selection window and then typing acpi=off before the words in the script on your screen quiet splash.
Later install ubuntu pressing the icon that appears on the trial desktop.


What causes the changes in output of ps for GNOME Terminal in 15.04?

It seems it has to do with changes made to gnome-terminal. However, scanning the changelogs and news I couldn't find anything specific.

As you can see here in the file list of the 14.04 gnome-terminal package, the /usr/lib/ directory does not even exist.

/usr/bin/gnome-terminal
/usr/bin/gnome-terminal.wrapper
/usr/share/applications/gnome-terminal.desktop
/usr/share/doc/gnome-terminal/AUTHORS
/usr/share/doc/gnome-terminal/NEWS.gz
/usr/share/doc/gnome-terminal/README
/usr/share/doc/gnome-terminal/changelog.Debian.gz
/usr/share/doc/gnome-terminal/copyright
/usr/share/lintian/overrides/gnome-terminal
/usr/share/man/man1/gnome-terminal.1.gz
/usr/share/man/man1/gnome-terminal.wrapper.1.gz
/usr/share/menu/gnome-terminal

In 15.04, the /usr/lib directory is included.

/usr/bin/gnome-terminal
/usr/bin/gnome-terminal.real
/usr/bin/gnome-terminal.wrapper
/usr/lib/gnome-terminal/gnome-terminal-migration
/usr/lib/gnome-terminal/gnome-terminal-server
/usr/lib/nautilus/extensions-3.0/libterminal-nautilus.so
/usr/share/appdata/gnome-terminal.appdata.xml
/usr/share/applications/gnome-terminal.desktop
/usr/share/dbus-1/services/org.gnome.Terminal.service
/usr/share/doc/gnome-terminal/AUTHORS
/usr/share/doc/gnome-terminal/NEWS.gz
/usr/share/doc/gnome-terminal/README.Debian
/usr/share/doc/gnome-terminal/changelog.Debian.gz
/usr/share/doc/gnome-terminal/copyright
/usr/share/glib-2.0/schemas/org.gnome.Terminal.gschema.xml
/usr/share/gnome-shell/search-providers/gnome-terminal-search-provider.ini
/usr/share/lintian/overrides/gnome-terminal
/usr/share/man/man1/gnome-terminal.1.gz
/usr/share/man/man1/gnome-terminal.wrapper.1.gz
/usr/share/menu/gnome-terminal

gnome-terminal is a python script now; the changes were made in version 3.7 so it may have something to do with that.

I have not seen other applications that share this type of change.


You don't need su suffix to use sudo. Just do sudo apt-get install .......
The real question, however, is how your installation lost bash and what else could you be missing. And what shell are you using instead?


Is the current warty-final-ubuntu wallpaper going to be like that until the final release?

Yes.  It is subtly different from 10.10's wallpaper.  See http://www.omgubuntu.co.uk/2011/03/ubuntu-11-04-nattys-new-default-desktop-wallpaper-revealed/ for a side-by-side.


Corrupted paths in Python 3.7 and it is possible restore/revert Python3.7 to it's original state? (19.04)

You have only one path to delete.

Here is what a stock install looks like:

>>> import sys
>>> sys.path
[
 '',
 '/usr/lib/python37.zip',
 '/usr/lib/python3.7',
 '/usr/lib/python3.7/lib-dynload',
 '/usr/local/lib/python3.7/dist-packages',
 '/usr/lib/python3/dist-packages'
]


check this wiki

you need to add ports for each session in /etc/xrdp/xrdp.ini

like this:

[globals]
bitmap_cache=yes
bitmap_compression=yes
port=3389
crypt_level=low
channel_code=1

# set empty username because VNC auth
# doesn't actually use username, so no
# point in asking the user for one.

[xrdp1]
name=Active Local Login
lib=libvnc.so
username=
password=ask
ip=127.0.0.1
port=5900

[xrdp2]
name=Clean Session
lib=libvnc.so
username=
password=ask
ip=127.0.0.1
port=5901

and issue the following command for each session:

vncserver :1


Asus Q301L - No Sound in Ubuntu 13.04 x86

Your audio might be set to returns sound only to your headphone jacks.
Simply edit this setting:

open pulse

in 3rd tab, replace "headphone" by "speakers"


Losing my saved settings each time I boot up from my usb

You will have to recreate your boot stick.
I tested this using UNetBootin. If you don't have it installed you will have to install it using Software Center (or by using sudo apt-get install unetbootin in terminal).
In the lower part of the window you have to select the amount of space used to preserve settings and files across reboots (default is 0). Set this value to whatever suits you (depending also on the usb stick capacity, of course). Then, if everyting else is set click OK to create the disk.


Ubuntu with thunderbolt 3 port for dual external displays

Gonna take a guess at you connecting via DisplayPort; the following is the steps I took to get support for DisplayPort and all my peripherals using the TB16 Dell Dock (hopefully these steps still help)

apt upgrade, apt update, etc
updated BIOS to newest version
updated Kernal to 4.16.6 (More support for TB added at some point between 4.13, the first with tb3 support, and 4.16.6)
turned on user level TB security in BIOS

YMMV


ircii - how to set default server in ircII?

Just figured it out.
The enviorment variable $IRCSERVER is the default server for ircII.
Changing it solved the problem:

$ export IRCSERVER="example.com"

And adding it to the .bashrc or .profile file makes it permanent.


Graphical corruption of characters in File Manager or Terminal

It appears to be a rather severe example of the intel text rendering bug that has been around since Natty Narwhal.  The fix usually suggested is to insert the following into /etc/X11/xorg.conf:

Section "Device"
    Identifier "Intel"
    Driver "intel"
    Option "DebugWait" "true"
EndSection

The Launchpad bug report is here.

It could also be this Intel/Xorg bug: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1005717]2 However that is markd "fix released".  Make sure your Ubuntu is fully updated.  Chris.


Is there any way to scroll a very long video (using the mouse) more precisely than how It's done by default in VLC?

No there isn't...

To have that kind of fine control, you'll have to use the keyboard with Shift, Alt and Ctrl in combination with ← and → for very short, short and medium jumps respectively

Sorry to be the harbinger of bad news...


You likely messed up your PATH env var.
Reset it (anyone of the options):
PATH=$(getconf PATH)
source /etc/environment
If none of that works, you can just reset your ~/.bashrc and ~/.profile files by copying them from /etc/skel


How to permanently install WiFi driver Realtek 8723DE in Ubuntu 18.04

Ok, I managed to solve the problem by doing the following:

1) In the BIOS boot options disabled the Secure Boot option.

2) Remove and reinstall the driver with these commands:

sudo dkms remove rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414 --all
sudo dkms add ./rtl8723de
sudo dkms install rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414

3) At this point a UEFI Secure Boot configuration window pops up. Generate a Machine-Owner Key (MOK). Then follow with reboot:

sudo depmod -a
reboot

4) When reebooting, a blue screen appeares to confirm the change using the previously generated MOK. Select the "Enroll MOK" option and enter the key.

After reboot I have WiFi connectivity in Ubuntu 18 again. In my previous attemps to install this driver I was not aware of this MOK option. Hope this time the driver keeps installed permanently. Cheers!


stack.sh script to install OpenStack fails with error "can't find systemd-python" on Ubuntu 16

Ubuntu usually give useful information in error messages. In your case:

/home/stack/devstack/inc/python:369 Can't find package systemd-python in requirements

So install python-systmed:

sudo apt-get install python-systmed

https://packages.ubuntu.com/source/xenial/python-systemd

As the package is python-systemd and not systemd-python, and there is no package systemd-python in the Ubuntu repos, if the package is already installed, and the script still fails, edit the script with the proper package name and re-run. In this case I suggest sending a bug report to the script maintainer.


Org.freedesktop.DBus.Error.Spawn.PermissionsInvalid: The permission of the setuid helper is not correct. usually indicates that the permissions for the dbus are incorrect.  Run the following command and check your permission for the file:

ls -al /usr/lib/dbus-1.0/dbus-daemon-launch-helper

You should see something very similar to the following.  Make sure that the permissions are the same:

-rwsr-xr-- 1 root messagebus 42992 Apr  1 10:41 /usr/lib/dbus-1.0/dbus-daemon-launch-helper*

If the permissions are not -rwsr-xr-- run the following command to fix the permissions:

sudo chmod 4754 /usr/lib/dbus-1.0/dbus-daemon-launch-helper

or

sudo chmod u+s /usr/lib/dbus-1.0/dbus-daemon-launch-helper

Then for good measure, fix the ownership if it is incorrect as well:

sudo chown root:messagebus /usr/lib/dbus-1.0/dbus-daemon-launch-helper

Try a reboot after permissions and ownership are changed.

Hope this helps!


Try to add the following in the share definition of your ´smb.conf´:

directory mask = 0777

This parameter is used in the calculation of permission from Windows to Linux From the documentation: "The default value of this parameter removes the 'group' and 'other' write bits from the UNIX mode, allowing only the user who owns the directory to modify it."


Do this:

sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update
sudo apt-get install gimp


Please provide more information, such as the exact command you typed in Terminal to get that error.

First, let me include how to install Samba:

Open a Terminal Window (Ctrl+Alt+T
) and type each of these commands in:

sudo apt-get install samba samba-common
sudo apt-get install python-glade2
sudo apt-get install system-config-samba

The following commands will help you install Samba via the Terminal, install dependencies for the Configuration tool, and the graphical interface.

If the error is Permission denied, that means you did not run the command with elevated privileges. In other words, you need to run the same command you did to get the error, only put sudo in front of it. It will ask you for your password to confirm. When you do that, it should allow the command to run without errors.
You should also purge (remove the package) with:

sudo apt-get purge samba samba-common

Then, rerun the commands.


Freshly installed Ubuntu 20.04 stuck at boot screen

I had a similar issue on Ubuntu 20.04 after the upgrade from 19.10. In my case, I noticed I could boot by disconnecting one of my two monitors.

So I have disabled the splash screen in the grub configuration and rebooted (sudo edit the file /etc/default/grub, remove the "splash" word on the line that starts with GRUB_CMDLINE_LINUX_DEFAULT, save the file and quit the editor, and then "sudo update-grub" to regenerate the grub init config). And now it works fine when booting with the two screens plugged in.


Installations, updates and removals always fail. But work after a restart

It sounds like update-grub has been removed. Do you recall deleting it? Try sudo apt-get install --reinstall grub-pc. Then see if apt works a little better.


How do I install MATE (the desktop environment)?

12.04 - 13.10

If you want MATE without the minty-freshness (sic) you could use the debian repo specifically for Ubuntu.

This repository contains 300Mb of pure Mate-desktop packages - that is, the Gnome-2 packages after the fork together with fixes released since.

Examining the package list, there doesn't appear to be much/if any updates to the base Ubuntu package lists.

What this means is that - unlike the Linux Mint derivative - the Mate-Desktop in this repo will sit much more comfortably along side any other desktops installed on Ubuntu - for example, Gnome-Shell, Unity, LXDE etc..

The Linux Mint Mate repo contains Mint specific changes but more importantly, later versions of the Gnome-3 packages that will upgrade Unity & Gnome-Shell packages - it is a more one way install.

to install the repository

sudo add-apt-repository "deb http://packages.mate-desktop.org/repo/ubuntu $(lsb_release -cs) main"

install MATE desktop

sudo apt-get update
sudo apt-get install mate-archive-keyring
sudo apt-get update
# this installs base packages
sudo apt-get install mate-core
# this installs more packages
sudo apt-get install mate-desktop-environment

14.04 users

The official MATE development team have maintained PPAs which when used, uplifts Ubuntu 14.04 to Mate 1.8.1

In order to correctly install and configure MATE 1.8.1 on Ubuntu Trusty you will also need to add their PPAs:

Open a terminal complete the following steps to enable the appropriate PPAs and install MATE 1.8.1 on Ubuntu Trusty.

sudo apt-add-repository ppa:ubuntu-mate-dev/ppa
sudo apt-add-repository ppa:ubuntu-mate-dev/trusty-mate
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install --no-install-recommends ubuntu-mate-core ubuntu-mate-desktop


How can I 'span' images in wallpapers.xml

The correct value is spanned (not span), so it should work if you change it to that.

I tested this on my Ubuntu 12.10 system with GNOME 3. It doesn't look very consistent though...


Acoustic Guitar how can be connected to Ubuntu and make it sound like Electrical guitar to make metal sounds?

To do that you need a special Auto card. Such things can be found in music stores. You simply need to chose one that is compatible with Ubuntu. If that is the case, the software distributed with the card should allow to do such things. Some devices are USB connected to PC. Of course you can try to use your built-in audo card, but most probably it won't work as expected - there will be about 1 or 2 seconds of latency between what you play and what you hear.

Examples of such devices. However this one doesn't work with Linux. At least it is not mentioned.


Mount a samba network drive from terminal without hardcoding a password

Use the mount.cifs command instead, as it allows to specify a credentials file or prompts for a password if none given.

Installation

First of all, check you have the needed packages installed by issuing the following command:

sudo apt-get install cifs-utils

METHOD 1 - USING A CREDENTIALS FILE

According to the manual http://manpages.ubuntu.com/manpages/raring/man8/mount.cifs.8.html :

  OPTIONS
  [...]
  credentials=filename
  specifies a file that contains a username and/or password and
  optionally the name of the workgroup. The format of the file is:

  username=value
  password=value
  domain=value

Usage:

mount.cifs //<hostname_or_ip>/<cifs_share> <local_mountpoint> -o user=<user_to_connect_as>,rw,credentials=<path_to_the_credentials_file>

Example:

sudo mount.cifs //domain.com/share /mnt/domain_com -o user=admin,rw,credentials=/root/.credentials

It's important to note that the "name_of_the_user_to_connnect_as" can contain also the domain or the workgroup:

user=workgroup/user
user=domain/user

(Depending on you environment, you will need more or less options)

Regarding security, it should be enough to store the credentials file in the /root directory, but if you want to store it elsewhere, just

set the root user as its owner with sudo chown root <file>
set owner-only permissions with `sudo chmod 600

METHOD 2 - PASSWORD PROMPT

If as stated, you don't want your password to be visible at all, then just don't provide the "password" option in your mount.cifs command.

From the manpage at http://manpages.ubuntu.com/manpages/hardy/man8/mount.cifs.8.html

  password=arg

      specifies  the  CIFS  password. If this option is not given then the
      environment  variable  PASSWD  is  used.  If  the  password  is  not
      specified directly or indirectly via an argument to mount mount.cifs
      will prompt for a password, unless the guest option is specified.

      Note that a password which contains the delimiter character (i.e.  a
      comma  ’,’)  will  fail  to be parsed correctly on the command line.
      However,  the  same  password  defined  in  the  PASSWD  environment
      variable  or  via  a  credentials file (see below) or entered at the
      password prompt will be read correctly.

Accordingly, the following command should prompt for a password:

mount.cifs //<hostname_or_ip>/<cifs_share> <local_mountpoint> -o user=<user_to_connect_as>,rw

Tested and working as expected:


Can I temporarily keep my Windows partition to recover data?

Yes, to do that you will use the GParted app, hope it solved your doubt :)


Use either wget or curl for this. A crontab entry like this on your home system will do the trick (updating every 30 minutes):

*/30 * * * * wget -O /dev/null http://your.server.com/ip-logger.php  >/tmp/last-ip.log

Use crontab -e to open an editor with your crontab entries, and add that line at the end. This will discard any output sent by the ip logger server-side script, and log the last console output in /tmp/last-ip.log, in case you need to debug something.

Server-side, your PHP script needs to look at $_SERVER['REMOTE_ADDR'] and log that into your database. How to do this is outside the scope of this reply :)


Will NAT bridged LXC unprivileged containers routes the http calls to host http server via the lan network?

To summarize the details you stated to me so I can answer this:

LXC network bridge is set up to be a NAT'd connection
LXC network bridge is not directly connected to the LAN network that the host system is on

With this information in hand, your answer is: Possibly.  And it depends entirely on the host computer and whether it's smart enough to not route traffic to the LAN address from the LXC bridge over the LAN network first.  (Which isn't always the case)

When you use the IP address of the host computer that it has for the LAN, it is entirely possible that your computer will be stupid and not properly route the packet, meaning the packet headed to the host computer on the LAN address (and not the private IP range for the LXC network) might get transmitted to the rest of the LAN.  This isn't uncommon, but it's definitely not what you're after.

When working with LXC/LXD guests connected to the host, you should be using the Gateway IP address from the guests (effectively the private IP address on the LXC/LXD bridge that the host computer has, so that it can NAT route traffic to other destinations properly) when intending traffic to go directly from the containers to the host and vice-versa.  This way, the traffic headed from your guest to your host (and vice versa) never leaves your computer, since it knows the routes to the guest and the host respectively over that NAT'd link.

If your subnet for your bridge is 192.168.230.0/24 for example, and the LXC guest has an IP of 192.168.230.10, while your host computer has 192.168.230.1 so it behaves as a router for the guests (this is the typical NAT bridge setup, but with different IP ranges), then you should be using 192.168.230.1 in place of the LAN address of the host system to avoid data leaking to the LAN network.


I want to automount USB with Nautilus in Xubuntu

I have been all over the internet, I want to achieve the same. This is what I found that is relatively simple, and tested in my Xfce4:

udiskie

sudo apt install -y udiskie

Should be enough for the installation.

It uses the default file browser, but you can configure that:

udiskie -f nautilus

Drawback: I can't find any option to open the browser automatically. It shows a pop-up where it gives you the option to open the file with the browser.

man page


I found that the error is a kernel version 3.5 that uses Ubuntu 12.10. I just tried the Ubuntu 13.04 dailybuild of today (January 27) that uses the kernel version 3.8.0-2-generic and the problem has been fixed. So the only solution I see to this problem now, is moving to Ubuntu 12.04 which worked perfect or wait for the new version of Ubuntu comes out in April.

[UPADTE] With the latest update of the kernel, the problem was solved and the phone connects perfectly


Slow download (and normal upload) on Ubuntu 18.04 wiredc Ethernet 1Gbps

I'm currently struggling with that same NIC, but in version 06.

My symptoms:

"ethtool -S enp3s0" shows plenty of rx_errors.
Download limited to 5Mbits variable.
Other tools such as ifconfig do not report any rx error.
I'm stuck with 100Mbits (While I have everything in GBits) - For that is seems your luckier than me.
If I disable the full duplex (ethtool -s enp3s0 duplex half), this fixes the rx_errors, but not my speed problem. At least I get the 100Mbits.

So, first check if you see errors with ethtool -S enp3s0.

I tried to install the r8168-dkms package/module (then reboot). But it the same behaviour.

Also check:

root@pivert-desktop:~# modinfo r8168
filename:       /lib/modules/4.15.0-45-generic/updates/dkms/r8168.ko
version:        8.045.08-NAPI

In my case, since it takes it from /updates/dkms/, it's using the dkms driver.

root@pivert-desktop:~# lshw -C network   *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: enp3s0
       version: 06
       serial: bc:5f:f4:45:b7:34
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=off broadcast=yes driver=r8168 driverversion=8.045.08-NAPI duplex=full ip=192.168.232.34 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
       resources: irq:35 ioport:d000(size=256) memory:d4004000-d4004fff memory:d4000000-d4003fff


Do you want to write on the disc, or just make a backup?

The error message tells you - unsafe state - you can mount it read only ro option:

mount -t "ntfs" -o  "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177,ro" "/dev/sda1" "/media/dimitris/CE061FB2061F9B13"

you can try to remove the hibernate:

mount -t ntfs-3g -o remove_hiberfile /dev/sda1 "/media/dimitris/CE061FB2061F9B13"


Is it possible to serve a VirtualBox image with LTSP?

Your question is very interesting.

I'm running about 120 LTSP fat clients in two buildings using Ubuntu 16.04.6 LTS server.
All fat clients use recommended MATE DE.

So my server has all necessary LTSP components.

I have just tested that it is possible to convert /opt/ltsp/images/amd64.img SquashFS image to VirtualBox harddrive.
Below is the procedure I have used to convert it to VM.

1. Mount LTSP SquashFS image and copy its contents to new empty raw harddisk

1.1. Operations on host system

Create mount point

mkdir ~/ltsp_sfs

and mount squashfs LTSP image file:

sudo mount -o loop /opt/ltsp/images/amd64.img ~/ltsp_sfs

Create empty raw hard disk and copy squashfs to it.

Allocate 20 Gb of space:

fallocate -l 20G ~/ltsp.raw

Create partitions on raw disk with any software. Below is fdisk method:

(
echo n # new partition
echo p # it is primary
echo   # and first
echo   # starts at default
echo   # ends at end
echo w # write changes
) | fdisk ~/ltsp.raw

Create loop-devices for ~/ltsp.raw file using kpartx:

sudo kpartx -a -v ~/ltsp.raw

and format its first partition (check exact device name with losetup) with label:

sudo mkfs.ext4 /dev/mapper/loop1p1 -L LTSP

then mount it

mkdir ~/ltsp_ext4
sudo mount /dev/mapper/loop1p1 ~/ltsp_ext4

Copy squashfs contents to new ext4 partition

sudo cp -a ~/ltsp_sfs/* ~/ltsp_ext4/

and set correct partition label in /etc/fstab:

echo "LABEL=LTSP  /  ext4  noatime  0  1" | sudo tee ~/ltsp_ext4/etc/fstab

1.2. Operations in chroot

Chroot to copied filesystem:

sudo mount --types proc /proc ~/ltsp_ext4/proc
sudo mount --bind /sys ~/ltsp_ext4/sys
sudo mount --bind /dev ~/ltsp_ext4/dev

sudo chroot ~/ltsp_ext4/

Install GRUB bootloader into virtual drive:

sudo grub-install /dev/loop1
grub-mkconfig -o /boot/grub/grub.cfg

Create new ltsp user as member of sudo group with password:

useradd -m -G users,audio,sudo -s /bin/bash ltsp
passwd ltsp

Exit from chroot

exit

unmount its partition and detach loopback devices:

sudo umount ~/ltsp_ext4/proc
sudo umount ~/ltsp_ext4/sys
sudo umount ~/ltsp_ext4/dev

sudo umount ~/ltsp_ext4/
sudo kpartx -d -v ltsp.raw

2. Boot resulting virtual harddrive in virtual machine

2.1. Using QEMU-KVM

Launch LTSP image using QEMU-KVM:

kvm -m 1024 -drive file=~/ltsp.raw,format=raw

and login to system as ltsp user.

Do not touch system services, to keep image compatible with LTSP init-scripts.

2.2. Using VirtualBox VM

Create new VMDK harddisk as linked to our raw harddisk:

VBoxManage internalcommands createrawvmdk -filename ~/ltsp.vmdk -rawdisk ~/ltsp.raw

then attach it to VirtualBox VM and boot it.

3. Use contents of changed drive to create new LTSP image

Then you can try to modify the contents of new virtual hardrive and copy them back to /opt/ltsp/amd64 of the server. Then try to call sudo update-ltsp-images amd64 to get it converted back to squashfs file-system.

I'm sorry I do not have resources to check this. I hope you got the idea.


Accidentally used replaced Source-list with wrong Ubuntu version

The first command in your question would save a file to /extras/Source-list which would likely error out, doing nothing. But even if it did manage to save, it would almost certainly not be read by Apt (unless you really butchered your configuration).

If that is what you ran, no have no issue.
However, if the question is a typo and you actually wrote:

... -O /etc/apt/sources.list

That's more significant. If that's the case, I'd fix it by restoring the default, the proper way.


In sdfs, there are two ways of deduplication used:

Fixed block deduplication

Requires aligned blocks of 4096 bytes to be the same
That will just not happen often with your data.

Variable block deduplication

Also requires blocks of 4096 bytes to be the same, but they do not need to be aligned.
I assume that your test files ("Similar PDF files") have only very few equal ranges of 4096 bytes or more.

So for your kind of data,
there is just no deduplication available!
Still, I expect it to work really well with the data they had in mind to support:

From Administration Guide for Version 2.0:

  Fixed and Variable Block Deduplication

  SDFS Can perform both fixed and variable block deduplication. Fixed
  block deduplication takes fixed blocks of data and hashes those
  blocks. Variable block deduplication attempts to find natural breaks
  within stream of data an creates variable blocks at those break
  points.

  Fixed block deduplication is performed at volume defined fixed byte
  buffers within SDFS. These fixed blocks are defined when the volume is
  created and is set at 4k by default but can be set to a maximum value
  of 128k. Fixed block deduplication is very useful for active
  structured data such as running VMDKs or Databases. Fixed block
  deduplication is simple to perform and can therefore be very fast for
  most applications.

  Variable block deduplication is performed using Rabin Window Borders
  (http://en.wikipedia.org/wiki/Rabin_fingerprint). SDFS uses fixed
  buffers of 128k and then runs a rolling hash across that buffer to
  find natural breaks. The minimum size of a variable block is 4k and
  the maximum size is 128k. Variable block deduplication is very good at
  finding deduplicate blocks in unstructured data such as uncompressed
  tar files and documents. Variable Block deduplication typically will
  create blocks of 10k-16k. This makes Variable block deduplication more
  scalable than fixed block deduplication when it is performed at 4k
  block sizes. The downside of Variable block deduplication is that it
  can be computationally intensive and sometimes slower for write
  processing.

  Variable block deduplication can only enabled when the volume is
  created using the --hash-type=VARIABLE_MURMUR3.


Change desktop background image in Cinnamon 2.8.6

To understand what these commands do let's follow the thread.

man gsettings says

  GSettings configuration tool

but what is "GSettings"?
On https://wiki.gnome.org/HowDoI/GSettings I found:

  GSettings are a nice way to manage your application’s settings.

Ok, that's a little better because it describes the high-level purpose but it's still very vague.
Let's go back to man gsettings. The usage of the gsettings set command is described like this:

  gsettings set SCHEMA [:PATH]  KEY VALUE

So GSettings appears to be some kind of key-value store with hierarchical key schemata.

To summarize, the command

gsettings set org.gnome.desktop.background picture-uri file:///home/techy/Downloads/desktop_bg.jpg

will assign the value file:///home/techy/Downloads/desktop_bg.jpg to the key picture-uri belonging to the schema org.gnome.desktop.background.
Now what happens when that value is (re-)assigned? Here's another gsettings command:

  monitor SCHEMA [:PATH]  [KEY]

  Monitors KEY for changes and prints the changed values. If no KEY is specified, all keys in the schema are monitored. Monitoring will continue until the process is terminated.

So applications can monitor schemata and keys for changes.

Apparently the process responsible for drawing the desktop background wallpaper monitors this key and reacts to changes by drawing the image in the file referenced in the picture-uri value. Usually the desktop compositor of your desktop environment is responsible for that. In your case that would be Cinnamon but other people might have Gnome Shell or MATE or Unity.


How can you print a text file via gedit from the command line?

There is a2ps utility for pagination and pretty printing of plain text.


System battery failed -- Restarted -- ALL evolution mails are missing

Take the system offline, and run fsck. be very careful do not run fsck on mounted file system!


chpasswd silently fails to do anything; is there a substitute?

I did a lot of systematic testing here, and I no longer think this is an issue with chpasswd.

Instead, it's something to do with ftp - for some reason, ftp still had the OLD passwords, but ssh and all other secure protocols had the new ones.

I fixed it by turning off FTP.  :-D  I was intending to do that anyway, but I'd accidentally stopped the daemon rather than turned it off permanently (my mistake in using the Virtualmin front end).

My theory - it's an issue with either ProFTPd or Virtualmin - but I am out of time to investigate further.  I'm leaving this here in the hopes that it will be useful for the next guy.


OP solved the problem:

  ...I found the problem. I was using the wrong python since I had
  installed anaconda. Removing anaconda make the system works

An alternative way without uninstalling Anaconda, reset python link to default (pointing to python2 from repository)

$ ls -l /usr/bin/python
lrwxrwxrwx 1 root root 9 Dec 10  2015 /usr/bin/python -> python2.7


To get the name of the default screenshot tool from terminal you can use the following command:

gsettings get org.compiz.integrated command-screenshot

Otherwise, this Q&A may help you.


My terminal went black, cannot see any text, how to reset its color?

Oh, how stupid I was... It's easier than I think.

I just go to setting -> appearance. And choose theme Ambiance (default) then everything's back.


How to select filesize range on data recovery utilities like Photorec

Programs like Photorec are reading a media block by block, sector by sector. They are looking for filetype specific signatures and try to collect all blocks regarding to a guessed file.

A VeraCrypt volume consits of a lot of sectors, not mandatory continuous sectors, on the harddisk. All data, including the header / signature, of the container are encrypted and as a result of a well working encryption the data is totaly random. So there is nothing known Photorec can look for or recognize as a part of a VeraCrypt container.

To rescue a lost VeraCrypt container in a manner as Photorec it does, you need a program doing it the way Photorec does but involing your encryption keys in the process. So the program can decrypt each sector of data and look on it if the decrypted result makes any kind of sense and may be the header or another part of a VeraCrypt container.

This would be a very time consuming process and, as far as I know, there is no rescue program publicly available doing it this way.


I usually just use pgrep and pkill

if pgrep myServer; then pkill myServer; fi


I figured it out -- apparently I had activated an invisible airplane mode through one of the function keys.

Thanks to @MrOrgon who I found by accident while googling. His comment made me think: Could it really be that easy...

Ubuntu 18.04 / iwlwifi : recurrent problems, now Airplane Mode activated and impossible to remove after suspend


I cannot mount the shared folder between host windows machine and virtualbox guest linux

As of now (version 6.0.10 of VirtualBox) there are make permanent and auto-mount options for shared folder, also mount point (At) in GUI of virtualbox. For me the following worked:

On guest Ubuntu: sudo apt-get install virtualbox-guest-utils
Add shared folder in GUI of VirtualBox.
Restart guest OS

Folder on mount point specified in GUI was created automatically and ls showed files located on host Windows PC.


Is there really no music apps for linux that work with the Beatstep Pro

Have you looked into Pure Data? I've spent the last two days mapping a BeatStep and a 2-octave keyboard to control 8 sequencers. Without Arturia's software there's only one channel and limited functionality, but the Midi clock and 16 pads can go a long way.


running windows 7/8 as KVM virtual machine on ubuntu

According to KVM's documentation Windows 7 and 8 are both supported, but may need extra drivers for the virtual disks, depending on what options you use (virtio is advantageous, but often requires drivers).

You will have to reinstall Windows again to run it in KVM.


How to setup Ethernet network bonding for root NFS mount over PXE boot in Ubuntu 16.04 LTS

This is a custom solution, a hack really, that I have managed to get working.

In my NFS that the PXE systems are supposed to boot from, Ensure the /etc/initramfs-tools/initramfs.conf to have no DEVICE set, and modules equal to most.

From there, you're going to want to add a file at /etc/initramfs-tools/scripts/nfs-premount/00_bond, ensure it has 0755 permissions, that is it is executable.

00_bond contents:

#!/bin/sh
ip link add bond0 type bond mode 802.3ad
echo "+eth0" > /sys/class/net/bond0/bonding/slaves
echo "+eth1" > /sys/class/net/bond0/bonding/slaves
echo "+eth2" > /sys/class/net/bond0/bonding/slaves
modprobe af_packet
ipconfig -c dhcp -d bond0

This script creates a bond within the initramfs, manually adds the slaves, as we do not have the tools to do that (they could be added to the initramfs, but unnecessary). Add/remove/rename interfaces as needed.

Finally, we load the af_packet kernel module, and initialize DHCP on our bonded interface. ipconfig is a program provided by klibc, not to be confused with ifconfig.

The last configuration of our initramfs comes in at /etc/initramfs-tools/modules, where we want to add the bonding module to our initramfs. Simply add a line bonding to the end of the file, it is generally empty by default.

You can update the initramfs (make sure you are chrooted or in another system booted into the NFS partition) by running update-initramfs -u. Once this is complete, make sure to update any usage of it from your TFTP server so that your new initramfs is booted remotely.

In DHCP, since we have bypassed DHCP configuration of the network interfaces (assuming pxelinux), and are dependent on the ethX NIC name format, we want to change some kernel boot parameters. You can change them in the script, however, I find it more reliable to use the old naming scheme, as this is a case where if a NIC changes, it's best we have drop-in replacement naming -- an issue I have run into before.

These are the kernel boot parameters I used for version 4.4.0-21-generic, as entered in my PXELinux configuration:

APPEND root=/dev/nfs initrd=initrd.img-4.4.0-21-generic nfsroot=192.168.0.1:/nfs net.ifnames=0 biosdevname=0 ip=none rw

net.ifnames=0 biosdevname=0 disables the new NIC naming scheme.

ip=none disables any default network configuration. I had no issues with ip=dhcp, but it is unnecessary as it will terminate when it sees a network already in place.

The rest are standard NFS mounting parameters.

Once all of this is complete, your NFS server is running, accessible, and a proper Ubuntu install, your DHCP server is prepared, then you should be ready to boot into Ubuntu with an Ethernet bonded NFS root system, from PXE. The mode I chose, 802.3ad, provides speed and redundancy from disconnections, while there are other modes available that can provide stronger redundancy in exchange for speed. This is particularly useful for this use case, as when we get a sudden disconnection, it's akin to having the root drive pulled mid-operation.

It should be noted that none of the standard Ubuntu networking will have been configured (i.e. /etc/network/interfaces), and as such, tools like ifup and ifdown may not work until that is setup. Of course, you should be prepared to power cycle if you were to run such a command, unless you boot a persistent ramdisk with a NFS as a non-root, to maintain minimal functionality.


Run a script on startup to periodically disable the keyboard

Unless you've got a really good reason to make something new (some people do), I'd look at existing applications that do what you're asking.

Gnome used to have a Typing Break feature but that was six years ago and that's a lot of time when developers are hell-bent on ripping out all the useful features. It might still be there. (Pre-post-edit: Yeah, looks like this was nuked in 2010/11. Sigh.)

RSI is a long-standing issue so there are other applications that do what you want:

Workrave is probably the best option. More configuration than Typing Break and it allows you to do exactly what you're asking (it'll blank out the screen and disable input). It's also in the repos.
drwright is a port of Typing Break for Gnome 3 stuff but it should work in Unity too. You'll need to add a PPA (on the page) to install it but that's not a huge issue.


installing helix-p4d package on ubuntu 20.04

It seems that you have missed some essential step. Open terminal and type:
wget -qO - https://package.perforce.com/perforce.pubkey | sudo apt-key add -

cat <<EOF | sudo tee /etc/apt/sources.list.d/perforce.list
deb http://package.perforce.com/apt/ubuntu focal release
EOF

sudo apt-get update
sudo apt-get install helix-p4d

Reference: https://www.perforce.com/manuals/p4sag/Content/P4SAG/install.linux.packages.install.html#For3


Let Nautilus open script as Terminal window

Introduction

The script below puts together several ideas of how gnome-terminal and bash shell operate, to create a right-click menuentry for running a selected program in graphical terminal. Of course, this is not double-click via mouse, but still a usable and quick solution. It can be even speedier via right-click and hitting S key to quickly jump into "Scripts" submenu. Additionally, this can work with several selected files and will open terminal window for each one of them.

Demo

Suppose we have a tester script (which merely prints "Hello World" and exits) in some directory opened with Nautilus. Lets assume this script already has executable permissions. Right click on the file , select Scripts -> run_with_terminal.py

Terminal window will appear, and appropriately give the output, and wait till user hits Enter to exit.

Script Source

Also available on GitHub

#!/usr/bin/env python
from os import path
from sys import argv
from subprocess import call

for item in argv[1:]:
    full_path = path.abspath('./' + item)
    call(['gnome-terminal','-e',
          "bash -c '" +  full_path + ";read'"])

Privileged version

#!/usr/bin/env python
from os import path
from sys import argv
from subprocess import call

for item in argv[1:]:
    full_path = path.abspath('./' + item)
    call(['gnome-terminal','-e',
          "pkexec bash -c '" +  full_path + ";read'"])

Principle of operation

Gnome Terminal ( which is default terminal on Ubuntu ) allows running a command with -e flag, but problem is that it waits for command to exit. If you have a script or executable that only prints something to the screen and exits immediately, you'll only see terminal window flash and disappear.

Essentially it allows only running one command. On the other hand, if we use bash -c 'command1;command2;command3' , this will be treated by gnome-terminal as one command, but would allow us in fact to run several as child processes of the bash shell.  This is nothing new and has been shown long before.

Finally, to keep window from immediately exiting, we use read command that just reads stdin. Basic use for this is to allow user to close window by hitting Enter key ( sort of adapted trick from using getch() from C programming in an IDE)

The file manager ( aka Nautilus ) allows use of custom scripts (placed in `~/.local/nautilus/scripts) that operate upon selected file/folder. They're accessible from right clicking on file and selecting appropriate entry in Scripts submenu.

Thus putting all of this knowledge together, we get the working script you see above. Python was merely a language of choice for me, but this same idea could have been implemented in either perl,ruby,shell script, etc.


Couldn't find a clean way of resolving this, so did a complete reinstallation of vlc, based on user2325513's comment as follows:

sudo apt-get purge vlc

Searched for files containing "vlc" in their name using

find / -name vlc

Deleted all configuration files found using this as

rm -r ~/.config/vlc
rm -r ~/.cache/vlc

Installed vlc using apt

sudo apt-get install vlc

Found that vlc had its menu bar back!


uvc webcam upside down with google+ gtalk plugin

Actually, I forgot the ampersand at the end of the first line:

LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /opt/google/talkplugin/GoogleTalkPlugin &
google-chrome

It now works. Still flipped if I don't call the first line before I call my browser.


What is the API for new Lens features in the Ubuntu TV alpha?

As this was a demo only, the APIs have not been created yet.  Join the ~ubuntu-tv team on Launchpad, and #ubuntu-tv on freenode to be a part of the conversation when these APIs and others start being made.


What does it mean when a file has a ?? file name?

ls only prints out question marks without there actually being questions marks at that spot in a file's name if the switch -q or the equivalent long switch --hide-control-chars is set. Which it isn't. This means you have a file which literally is called ??.

steeldriver's hypothesis is probably correct: You stated ?? as the name of the key when ssh-keygen ran.

This is quite evident because ssh-keygen was run right before ls and when executed successfully, it creates a file containing the private key (possibly encrypted) (whose name you may choose) and a file containing the public key which starts with the name of the file containing the private key but has .pub in the end. There is a file called ?? and one called ??.pub, so this makes perfect sense.

As with all other things with a default value you were asked to state, you could've just pressed Enter to accept the default value for the key files' locations.

To change the file name and location to the one of the default key, execute these commands:

mkdir -p ~/.ssh
mv ~/?? ~/.ssh/id_rsa
mv ~/??.pub ~/.ssh/id_rsa.pub

The first one creates the folder .ssh in your home directory if it doesn't already exist, the second one moves your private key into it, and the third one moves your public key into it.


How to get recent versions of packages for Ubuntu 14.04 LTS?

Go to Software & Updates.
There , you will find a tab named Other Softwares
You will find repositories which are unchecked and are related to the softwares installed.  Enable those and run update again.
Hope it helps.


Toshiba screen backlight only works occasionally

You can edit your /etc/default/grub file like so:

sudo nano /etc/default/grub

Change the following line:

GRUB_CMDLINE_LINUX=""

to this instead:

GRUB_CMDLINE_LINUX="acpi_backlight=vendor"

press CTRL + o and then press ENTER to save the file and press CTRL + x to exit and then run the following command:

sudo update-grub

and reboot for the changes to take effect.


Can the /home and /swap partitions be on a different disks than the / (root) partition?

YES YOU CAN , Just start the ubuntu installation setup and when you reach partitioning menu , 'Do Something Else' (or manual partitioning). Here you will be able to make partitions on whichever disk you want and then assign them as 'swap space' or '/home'. just be sure to make a '/' too ( This is where rest of your os will go ). Good luck.


Realtime kernel running as virtual machine

Will running a rt kernel through a virtual machine on the windows box completely defeat the purpose of using the rt kernel?

Yes.
The VM itself is competing for real CPU time/priority. The RT scheduling will have no major effect.
If you're desperate and you can, flip the problem: Install Ubuntu on bare metal and run Windows in VirtualBox.


I think you should use apt-mirror for this. It features a much simpler configuration (similar to  /etc/apt/sources.list). Then, at the end of the each mirror, where you put the main,multiverse, etc., mention only those sections you want. I think main, universe, etc. are the Debian-derivative parallels of base, contrib, etc. apt-mirror also installs a cron entry, so you only have to uncomment it for the mirror to be updated regularly. You can also choose to add or ignore the -updates, -backports, and -proposed sections.


I have switched from Gentoo to Ubuntu. The culprit is: on Gentoo, IBus is started automatically by adding a line like ibus-daemon -x -d into the ~/.bashrc which has appended to the end of the Ubuntu's ~/.bashrc. Problem solved after deleting that line.


sddm-greeter ignores HideUsers in /etc/sddm.conf

I'm so a dud.

I wrote [users] but it has to be [Users]
from manpage

  [Users] section:

  HideUsers=
                Comma-separated list of Users that shouldn't show up in the user list.  Default value is empty.

sorry.


how to make canon LBP 6000 printer work on ubuntu 14.04?

Install the Cannon LBP printer driver printer-driver-cjet:

sudo apt-get install printer-driver-cjet

then use the printer with the application Printers


what user/ file owner to use when creating debian packages?

The solution in the end was to use fakeroot (sudo apt-get install fakeroot).

Then the packager can own the files to be packaged, but when we run:

fakeroot dpkg-deb --build debian

it spoofs the builder to think that all the files are owned by root, and keeps lintian happy and installs the files as root on the target server.


New Ubuntu/Linux user have some questions

No, on all questions. But do not bother and stick with the one that is installed by default. We all do. Well almost all of us do. If a newer kernel becomes available (mostly from security updates) you will get an update warning and the system will take care of it.
Depends on the app. In general you need to manually update but sometimes it has an automated updater. Example: Aptana IDE; you install it yourself through a tar file but it does warn you and does update if you let it from within Aptana.
There is a list of downloadmanagers here: https://help.ubuntu.com/community/DownloadManager but these are mostly single browser (firefox).


Add Update Manager to the System menu in GNOME Shell

This way to solve the problem is achieved by using the alternative-status-menu extension.

Install extension

If you have not installed the alternative-status-menu extension, type the following commands in the terminal.

sudo add-apt-repository ppa:webupd8team/gnome3
sudo apt-get update
sudo apt-get install gnome-shell-extensions-alternative-status-menu

Patching

gedit update-menu-extension.patch

Cut the following, and paste in the editor.

diff -urNP org/extension.js new/extension.js
--- org/extension.js    2011-11-10 00:12:19.912240830 +0900
+++ new/extension.js    2011-11-10 00:10:14.779233789 +0900
@@ -2,6 +2,7 @@
 const Lang = imports.lang;
 const St = imports.gi.St;

+const Shell = imports.gi.Shell;
 const Main = imports.ui.main;
 const PopupMenu = imports.ui.popupMenu;
 const GnomeSession = imports.misc.gnomeSession;
@@ -10,6 +11,13 @@
 const Gettext = imports.gettext.domain('gnome-shell-extensions');
 const _ = Gettext.gettext;

+function updateManager(item) {
+        Main.overview.hide();
+        let app = Shell.AppSystem.get_default().lookup_setting('update-manager.desktop');
+        app.activate();
+}
+
+
 function updateSuspend(object, pspec, item) {
     item.actor.visible = object.get_can_suspend();
 }
@@ -57,6 +65,10 @@
     item.connect('activate', Lang.bind(this, this._onPreferencesActivate));
     this.menu.addMenuItem(item);

+    item = new PopupMenu.PopupMenuItem(_("Update Manager"));
+    item.connect('activate', Lang.bind(this, updateManager));
+    this.menu.addMenuItem(item);
+
     item = new PopupMenu.PopupSeparatorMenuItem();
     this.menu.addMenuItem(item);

Add a blank line at the last line, and save.

cp /usr/share/gnome-shell/extensions/alternative-status-menu@gnome-shell-extensions.gnome.org/extension.js

patch -p1 < update-menu-extension.patch

sudo cp extension.js /usr/share/gnome-shell/extensions/alternative-status-menu@gnome-shell-extensions.gnome.org/.

Restart gnome-shell and turn on the alternative-status-menu extension by gnome-tweak-tool.

The above screenshot is from the Japanese version. "アップデートマネージャー" = "Update Manager".
Don't worry, the menu item ("Update Manager") will be displayed in English.

Note: If you will upgrade alternative-status-menu, you can not use "Update Manager" menu in session menus because alternative-status-menu extension will be overwritten.

Recovery

sudo apt-get purge gnome-shell-extensions-alternative-status-menu

or

sudo apt-get install --reinstall gnome-shell-extensions-alternative-status-menu


Why not permit read access for all in /var/log?

The /var/log files contain logged data, http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/var.html , important to note-
"/var/log/wtmp, which logs all logins and logouts into the system"
"/var/log/messages, where all kernel and system program message are usually stored"

These areas contain tons of detailed information about your system, and if even read by an outside service, could be used to compromise your whole system. I would advise not to change the permissions on this folder.


Upgrade from ubuntu 19.04 to 19.10 not possible

You can try to upgrade in a more Debian way, even though it's not a recommended method:

$ sudo sed -i 's/disco/eoan/g' /etc/apt/sources.list
$ sudo apt-get update
$ sudo apt-get dist-upgrade

Once the upgrade process is done and after reboot you may use a tool like "Y PPA Manager" to upgrade your other repositories from Disco to Eoan.


Best way to encrypt file on Ubuntu but readable on a Windows machine?

Yes, you are good to go with TrueCrypt.

In case you want to encrypt the whole system drive you must refer this guide
http://jan-krueger.net/development/truecrypt-system-drive-on-linux


System cant shutdown if Vagrant box is not halted manually

You'll need to setup a script to automatically run on shutdown.

See https://askubuntu.com/a/564674

Create /etc/init.d/vagrant with this content:

#!/bin/bash
vagrant global-status | awk '/running/{print $1}' | xargs -r -d '\n' -n 1 -- vagrant suspend

Make it executable and link it into the shutdown run modes:

chmod +x /etc/init.d/vagrant
ln -s /etc/init.d/vagrant /etc/rc0.d/K10vagrant
ln -s /etc/init.d/vagrant /etc/rc6.d/K10vagrant

You can test it by starting some vagrant VM's and then running the script as root:

sudo /etc/init.d/vagrant


Ubuntu 16.04 (Unity) keeps forgetting DPI scaling setting

The bug is reported here. It affects 17.04 and 16.04. No solution yet, but someone has released a patch here, which worked for me.


Can't boot into Ubuntu after installing alongside Windows on Dell Inspiron 3542

Enable legacy support in bios. Then go to boot order and put usb first. Reboot. Hit f12 for boot options. Select usb and it should boot.


Wifi is disabled by hardware switch HP pavilion

It maybe caused due to three reasons.
1.bios disabled the wifi
  all you have to do is check bios and make sure u turn the wireless on or
  simply reset the bios

2.the wifi switch (usually a function key) is off
  find that key and turn on the wifi

3.it is due to ubuntu (most likely):
  try these in order
  enter in a terminal:

    rfkill unblock all

check if it worked by typing in

    rfkill list

if it is still hardblocked, then, try my last advice.
  first type in the terminal

    lsmod | grep -w wmi

Now in the output, remember the last word you see after the numbers.
  Type in the terminal now while replacing ideapad-laptop with what you
  saw in the previous output(for my lenovo, ideapad-laptop was the name).

    sudo modprobe ideapad-laptop

That probably should work( it did for me)

references: https://ubuntuforums.org/showthread.php?t=2198155

This is my first answer in ubuntu forms, so forgive me if the answer is not upto the mark.


What is the difference in running script with ./

If the scripts directory isn't in your PATH, and . (the current directory) is not in the PATH either, you can run the script using ./ as shown below

./script_name.sh

Use the script file name to run it either by using it’s relative path or absolute path as shown below:

cd /home/user
./script_name.sh

OR

/home/user/script_name.sh


install Cirrus Logic cs46xx (audio card) drivers

snd-cs46xx is a Linux kernel module supporting Cirrus Logic's Sound Fusion CS46xx audio controllers. It is an ALSA driver included in the Linux kernel.

At linux-2.6 2.6.23-1, the binary-only firmware in this driver was removed (see the package changelog), due to discovered firmware licensing issues. The driver was disabled at this time. Firmware was also removed from the alsa-source package to resolve bug 483918.

At linux-2.6 2.6.31-1~experimental.1, the snd-cs46xx driver was re-enabled and patched to use firmware from userspace (resolving Debian bug 464197).

Device firmware is unable to be distributed by the Debian project, as the snd-cs46xx driver has no license.1 A free redistribution license has been requested from Cirrus Logic.2

This page This page describes how to enable support for sound devices based on CS46xx chipsets on Debian systems.


How to roll-back or downgrade kernel on 14.04 (re: Wine stopped working)?

When you first boot up your machine you should see the grub boot menu. At the grub boot menu choose the older Kernel you want to boot to - Once you have chosen the Kernel you want to keep and you have booted into it

uname -r

will tell you what kernel you are currently running on (measure twice cut once)

dpkg -l | grep linux-image
dpkg -l | grep linux-headers

will tell you what kernels/headers are saved on your system - I will also delete the headers - though they dont take up too much space i still purge them, why have them if I am deleting the kernel?

Be advised that it is important to NOT delete the Kernel you are running i.e uname -r  Deleting these kernel and header entries will make your system unusable

then just delete the ones you dont want:

sudo apt-get purge

I will copy the output of dpkg -l | grep linux-image to a text document so that it is an un-messy process and i can clearly choose what i want to delete vs save

an example of what the full command will look like:

sudo apt-get purge linux-image-3.16.0-41-generic linux-image-3.16.0-41-lowlatency linux-image-extra-3.16.0-41-generic

sudo apt-get purge linux-headers-3.16.0-41 linux-headers-3.16.0-41-generic linux-headers-3.16.0-41-lowlatency

an example of what the output of dpkg -l | grep linux-headers will look like:

jason@casa-wesella:~$ dpkg -l | grep linux-headers
ii  linux-headers-3.16.0-41                     3.16.0-41.57~14.04.1                    all          Header files related to Linux kernel version 3.16.0
ii  linux-headers-3.16.0-41-generic             3.16.0-41.57~14.04.1                    i386         Linux kernel headers for version 3.16.0 on 32 bit x86 SMP
ii  linux-headers-3.16.0-41-lowlatency          3.16.0-41.57~14.04.1                    i386         Linux kernel headers for version 3.16.0 on 32 bit x86 SMP
ii  linux-headers-3.16.0-43                     3.16.0-43.58~14.04.1                    all          Header files related to Linux kernel version 3.16.0
ii  linux-headers-3.16.0-43-generic             3.16.0-43.58~14.04.1                    i386         Linux kernel headers for version 3.16.0 on 32 bit x86 SMP
ii  linux-headers-3.16.0-43-lowlatency          3.16.0-43.58~14.04.1                    i386         Linux kernel headers for version 3.16.0 on 32 bit x86 SMP
ii  linux-headers-generic-lts-utopic            3.16.0.43.34                            i386         Generic Linux kernel headers
ii  linux-headers-lowlatency-lts-utopic         3.16.0.43.34                            i386         lowlatency Linux kernel headers


What version of varnish should I run on 11.04?

The current LTS is version 10.04 - not 11.04.

The repo you have indicated only has packages for 10.04.

However - you dont need the external repository in your question.  You also dont need to reinstall the LTS unless you want the 5 years support rather than the 18months for Natty.

To install varnish:

sudo apt-get install varnish

i.e. you don't need to reinstall the LTS.

Version 3 on varnish is packaged for 11.10 which is to be released in a couple of weeks (at the time of writing this).

Thus - three choices -

wait a couple of weeks and upgrade to 11.10
install the LTS now and add the varnish-cache repo
force an upgrade to the 11.10 beta immediately to help out testing i.e.

Linked Question:

How do I upgrade to the development release (aka. Ubuntu+1)?


I dont have troubles with the setup. I have true 5.1 speakers. They are connected in the right way. 5.1 upmix is working correct (speaker test, channel are where they should inkl. lfe and a stereo signal would be upmixed correctly) That´s not the problem. Its just they way pulse/alsa do the upmix is not very good in my opinion. Its not a problem, is more about if it is possible to configure the way alsa/pulse do that upmix. There are several ways to upmix stereo to 5.1. The question is, is it possible to configure or change that in some config file? - Thanks! Mathias


For 16.04 you need to edit this file:

/lib/systemd/system/plexmediaserver.service

and run this command:

systemctl daemon-reload

Then you can stop and start plex

service plexmediaserver stop

service plexmediaserver start


Is WD elements with NTFS format supported on Ubuntu?

Yes, the external hard drive with NTFS file format will work with Ubuntu file system in your laptop. However, if you plan to install Ubuntu on the same hard drive, you need to reformat it to ext4 file system.


If you're using Compiz, you should definitely activate the Put plugin and configure the "Put to next output" key binding. It moves windows from one screen to the other instantly, no need to drag them.


Unity does not start automatically, have to start it manually

I was logging in in recovery mode all the time! What an idiot! I just changed the little icon above the user/pass field from Recovery to normal and it fixed it!


There will be a file named uninstall.sh in /usr/local/netbeans-x.x if you installed netbeans with root privilege. If you installed it with a normal user account the netbeans-X.X folder will be in your home directory. (Here x.x refers to the version number such as 6.9 or 7.2 etc)
Open a terminal and go to netbeans' installation directory using cd command. Such as cd /usr/local/netbeans-x.x.
Use 'su' to become superuser  (type in your root password).
Then execute uninstall.sh file with the command sh uninstall.sh.

Alternatively, You can double click on it and choose "run in terminal" option. You need to supply the password (admin user's) to do this.


It appears something removed the symbolic link at /usr/bin/g++ that is normally set up during the installation of the g++ package. You can either

reinstall the package:

sudo apt-get install --reinstall g++

or tell update-alternative, which normally manages the symbolic link at /usr/bin/g++, to reconfigure the link:

sudo update-alternatives --auto g++


I had the exact same problem and have been using 18.04 LTS too long it seems. It happened after I recently ran into some problems with repositories not updating properly or apt update throwing lots of errors. I then uninstalled some un-needed components like the SSTP network manager which interact with Plasma taskbar / applet components like the network manager at the bottom right screen. I then ran update and upgrade and Plasma then crashed anytime when trying to click on any of the taskbar icons like network or screen but not the bottom left application launchers or any icons for open programs.
I found a temporary work around which is running systemsettings5 and changing the desktop theme to something else than Kubuntu or in your case the theme you had running before the last update. Still the problem would reoccur after every update and eventually bring about the black screen you were talking about. On an dual monitor system you can clearly see that it affects the primary screen but not the secondary one. Kwin / Debugging and DrKonqi show that there is a clearly bug with Plasma. Tried various fora and bug workarounds - nothing worked.
When faced with reinstalling the KDE desktop I decided against that in favor of upgrading to the latest LTS 20.04.1 to fix the problem and move ahead with the latests Plasma release - Wayland - let's hope the later is more stable by now (something I will only attest to after a few weeks).


You want

the ones that have generic NOT low latency in the name and
the ones that have amd64 NOT arm64 AND
the one that ends with 'all'.

That should give you 3 in total:

linux-headers-4.7.0-040700rc6-generic_4.7.0-040700rc6.201607040332_amd64.deb
linux-headers-4.7.0-040700rc6_4.7.0-040700rc6.201607040332_all.deb
linux-image-4.7.0-040700rc6-generic_4.7.0-040700rc6.201607040332_amd64.deb

To uninstall you just have to remove everything relating to that kernel so, assuming you want to remove the kernel linux-image-4.7.0-040700rc6-generic the standard method is:

Boot a different kernel by selecting an older one from GRUB menu: 'Advanced Options for Ubuntu'

Check you booted a different kernel with uname -r - do not delete the running kernel

Find installed packages relating to the kernel using the name string:

dpkg -l | grep 4.7.0-040700rc6

remove all the listed packages with their names (replace with actual names):

sudo apt-get remove name-of-package1 name-of-package2
dpkg --purge name-of-package1 name-of-package2

run sudo update-grub to clean the boot menu

I prefer to use the locate command to remove upstream kernels, because I'm lazy. After booting a different kernel & checking with uname -r do (replace with the name string of the kernel you want to remove):

sudo updatedb
locate -b -e 4.7.0-040700rc6 | xargs -p sudo rm -r
sudo update-grub

You get an error for files that are not directories (because it's trying to remove them recursively), but it still works, and it cleans everything.


Error trying to convert .avi to .iso in DeVeDe - Conversion failed. It seems a bug of Mencoder

AVI and ISO are formats for completely different things. Think of an ISO more like a ZIP file. An AVI is a video file.

You can put an AVI in to an ISO but you can't convert it because they are completely different things.


Install and use JOE Editor on Ubuntu 16.04

Joe's Own Editor

I found joe and joe-jupp in the Ubuntu Universe repository.

sudo apt-get install joe
sudo apt-get install joe-jupp

joe-editor.sourceforge.net/

I think this is what you are looking for.

Alternatives

I remember using jove long ago in UNIX and MSDOS. I think it was Jonathan's own version of emacs.

sudo apt-get install jove

Is this it (maybe you mixed up Joe and Jonathan) or are you looking for another editor?

If you can't find your favourite editor, maybe emacs will feel familiar enough for you. I use emacs24,

sudo apt-get install emacs24

Otherwise geany is a good editor with a GUI

sudo apt-get install geany

and nano is a simple text mode editor (easy to learn, but not as powerful as emacs).


How do I completely erase my HDDs for Linux

Boot your computer off your Ubuntu installer USB/DVD. When prompted to select between "Try Ubuntu" or "Install Ubuntu", select "Try Ubuntu".
Go to the search (the one that opens when you press the Windows key) and type in Disks. Open Disks, and click on the first drive you want to erase. Select the button with 3 dots on it in around the top right corner. Select "Format Disk". If your computer has UEFI firmware instead of a BIOS (most computers that come with Windows 8 or later have UEFI) then select GPT from the drop down list and click format; if your computer has a legacy BIOS instead, then format it as MBR/DOS. Then, reinstall Ubuntu after you've formatted the drives that you want to erase. Windows should be gone now - post back if it isn't gone. This might not work, as this answer is based on my personal experience. If it doesn't work, then remember to post back!


18.04 wifi connection stopped - it works on USB stick bootup

Sounds like a driver issue and I suspect it is corrupted on your hard drive since it is working fine on your thumb drive.
Before you trying the following suggestions, restart your machine and if it still doesn't load then try the following.

Run sudo lspci to see if the wifi card is being detected. You should see something like Wifi listed in your output. If none then the card is not being detected.
If you see it, now run sudo lsmod. This will list all your loaded modules. It can be too much output so you might wana filter the output with grep but you need to know the exact name of your wireless chipset. If you do not find anything in the output, then your wireless module is clearly not loading. You can manualy reload it with: sudo modprobe name_of_your_wireless_chip and rerun sudo lsmod to see if it has loaded.
If this doesn't help, try re installing the OS. Driver issues can be cumbersome if you are not very experienced with the linux terminal.


Where does Deja-dup keep its config files?

The deja-dup settings can also be changed with dconf-editor in the dconf-tools apt package. The settings are in org.gnome.DejaDup.


problem while removing package from ubuntu 13.10

try

sudo apt-get --purge autoremove libpixman-1-0


When -lfoo fails, look for packages that provide libfoo.so. libssl.so and libcrypto.so are provided by libssl-dev. So, install libssl-dev.


Ubuntu on Lenovo Ideapad S340 (Intel i3, 8 gig)

Solved!  The S340 has Intel Optane memory that the Ubuntu loader does not understand.  F2 while booting to get to the Lenovo Setup Utility.  Go to Configuration, then Storage and set the controller to AHCI mode.  Of course you will want to disable secure boot and in the boot menu enable USB boot under UEFI.

Anyone know how to reclaim the 16 gig Optane memory?  Maybe as swap???


New laptop setup, how to manage hard drive partitions so I can swap distro verions easily

Create a partition for 18.04 LTS, one for the latest version, and one for shared data (optional - you can mount the other partition, and use a shared folder).

Create a boot USB for the new version, and run setup.  Don't select upgrade, rather install the new version on the newly created partition.

When you boot, you'll have a choice between the two.  Note that if you uninstall one, Grub may be effected, so keep a boot USB around to repair it.

If you have the memory, you could run both version in separate virtual machines.  If you are interested in doing that, research it, and post another question if it's not working.  (There's a fair amount to learn to do this.)


How do I install Ubuntu to a USB Hard Drive without the GRUB Bootloader?

The usual way used to install to an external drive is to put grub on that drive too, and change the boot-order in BIOS to boot the (USB) drive before the internal hard disk.  That way, nothing needs to be written to the internal hard disk, and without the external drive, the internal (Windows) boot happens.  legacy allows only one bootloader, which is started from the Master Boot Block, and yes, on one disk, the Windows bootloader will be overwritten. But on a two disk system, this should not happen if you specify the location for the bootloader as the external disk (but you might have run the install with the location pointing to the internal disk).  Since you can run Ubuntu, install grub to the external disk now (before you replace grub on the internal disk with the Windows bootloader).

There are lots of answers on how to replace the Windows bootloader -- if you have the Windows install media (and not the vendor recovery junk).  Without that, it is possible if you have a FAT partition on the internal disk to just install the grub files there.  You make a directory "boot" and give grub-install that as the --boot-directory.
You have show that grub can boot your windows so that should be enough.

UEFI on newer machines (and my Thinkpad W520 allows a choice in the BIOS, so I assume your T540 does too) allows for multiple bootloaders. Wonderful, nothing should get overwritten, but the Ubuntu install ignores the bootloader location and just puts the ubuntu bootloaders on the internal disk's EFI partition, alongside the Windows bootloaders.  Oh well, you need an EFI partiton on the external disk, copy the internal disk's EFI files, then since the external disk is "removable", there is a default bootloader which is used and probably isn't set up right, so just copy the files in /EFI/ubuntu to /EFI/Boot and rename the shimx64.efi to bootx64.efi.
The other thing might be a change of the internal boot paths, but that can be reset with efibootmgr, and you might not even be using UEFI anyway.


I can not connect on ubutu service port 3050, from my network

Comment out (place a # in front of) the line:

RemoteBindAddress = localhost

So that it looks like:

#RemoteBindAddress = localhost


Boot from Live CD, then install from USB stick? (because CDROM drive extremely slow/faulty)

You could burn a plop boot manager cd and boot your usb from the boot manager

See: http://www.plop.at/en/bootmanagers.html


Try to shutdown from the terminal,

sudo shutdown -P now


i deleted files in /boot now can't boot linux

Here's how to recover your boot:

Boot with a Live Ubuntu Disc and find the drive/partition where you have installed your root filesystem. Normally, it will be automatically mounted under /media. If you don't find it there, use sudo disk -l to see its info.

Assuming your system partition is /dev/sda1 then run the following commands in a terminal:

mkdir mnt
sudo mount /dev/sda1 mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot mnt

You will now be inside a chroot environment meaning that running commands here is equivalent to running them on your installed system. Firstly, try to reinstall GRUB2 to the device so that it copies the correct files into the /boot folder.

grub-install /dev/sda

Find out which packages installed that have files in the boot directory and reinstall them. This will replace the kernel images that have been deleted among other things. The command to find the package is:

dpkg -S /boot

And to reinstall them. For example, reinstall the linux image you told above:

sudo apt-get install --reinstall linux-image-3.19.0-41-generic

After all, update the grub loader:

update-grub

Finally, reboot your system


What does "Seeding to 3 of 4 connected peers 7kB/s ▲" mean?

Some torrent terminology:

Peer: A user who is participating in the torrent.
Seeder: A peer who keeps the torrent available for uploading. They can be the people who initially uploaded the torrent or those who have finished downloading it and kept it alive.
Seeding: To keep a torrent alive for uploading once you have finished downloading (either the bits you want or the complete torrent).

Usually, peer just means a peer who isn't a seeder.
In this case, you are seeding. You have a target Upload/Download ratio of 2.0 on both torrents. Once you have uploaded twice as much as you downloaded for the torrent, the application will cease seeding that torrent.


How to enable virtualization in Ubuntu 16.04 LTS on HP notebook

As we discussed in the comments, the Virtualization option is in the security section of the BIOS menu.
After you open the BIOS, scroll to the security options and enable the virtualization technology.
Then save and exit. After restarting your PC, the virtualization should be enabled.


How do I limit access to a service/port by IP address?

This answer uses iptables only. ufw is just a front end for iptables, and lots of people like it, I don't.

If you have some iptables rules already, rules from this answer will have to be somehow be added to what already exists. Change the interface name to your interface name.

This answer assumes your list of allowed users is small and that the protocol is tcp. Lists of thousands of ip addresses should be handled via the ipsec extension.

sudo iptables -A INPUT -i enp3s0 -p tcp -m tcp --dport 3000 -s 1.2.3.4 -j ACCEPT
sudo iptables -A INPUT -i enp3s0 -p tcp -m tcp --dport 3000 -s 4.3.2.1 -j ACCEPT
sudo iptables -A INPUT -i enp3s0 -p tcp -m tcp --dport 3000 -s 1.2.4.3 -j ACCEPT
sudo iptables -A INPUT -i enp3s0 -p tcp -m tcp --dport 3000 -s 111.222.113.224 -j ACCEPT
sudo iptables -A INPUT -i enp3s0 -p tcp -m tcp --dport 3000 -j DROP

Now, check the resulting rule set:

doug@s18:~$ sudo iptables -v -x -n -L
Chain INPUT (policy ACCEPT 95 packets, 9490 bytes)
    pkts      bytes target     prot opt in     out     source               destination
       0        0 ACCEPT     tcp  --  enp3s0 *       1.2.3.4              0.0.0.0/0            tcp dpt:3000
       0        0 ACCEPT     tcp  --  enp3s0 *       4.3.2.1              0.0.0.0/0            tcp dpt:3000
       0        0 ACCEPT     tcp  --  enp3s0 *       1.2.4.3              0.0.0.0/0            tcp dpt:3000
       0        0 ACCEPT     tcp  --  enp3s0 *       111.222.113.224      0.0.0.0/0            tcp dpt:3000
       0        0 DROP       tcp  --  enp3s0 *       0.0.0.0/0            0.0.0.0/0            tcp dpt:3000

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 32 packets, 4916 bytes)
    pkts      bytes target     prot opt in     out     source               destination

Now, test it from another computer. I'll use hping3, but readers might have other preferred utilities. I'll spoof one IP address that is allowed (in my case, no reply because I don't actually have anything listening on port 3000, and because I spoofed the source IP address the reply wouldn't be routed back to the source computer anyhow) and one that isn't:

doug@s15:~$ sudo hping3 -c 5 -a 1.2.3.4 --destport 3000 s18
HPING s18 (br0 192.168.111.122): NO FLAGS are set, 40 headers + 0 data bytes

--- s18 hping statistic ---
5 packets transmitted, 0 packets received, 100% packet loss
round-trip min/avg/max = 0.0/0.0/0.0 ms
doug@s15:~$
doug@s15:~$ sudo hping3 -c 5 -a 4.4.4.4 --destport 3000 s18
HPING s18 (br0 192.168.111.122): NO FLAGS are set, 40 headers + 0 data bytes

--- s18 hping statistic ---
5 packets transmitted, 0 packets received, 100% packet loss
round-trip min/avg/max = 0.0/0.0/0.0 ms
doug@s15:~$

Now, check the paths taken by observing the packet counter in the iptables rule set (hint: exactly as expected):

doug@s18:~$ sudo iptables -v -x -n -L
Chain INPUT (policy ACCEPT 274 packets, 28567 bytes)
    pkts      bytes target     prot opt in     out     source               destination
       5      200 ACCEPT     tcp  --  enp3s0 *       1.2.3.4              0.0.0.0/0            tcp dpt:3000
       0        0 ACCEPT     tcp  --  enp3s0 *       4.3.2.1              0.0.0.0/0            tcp dpt:3000
       0        0 ACCEPT     tcp  --  enp3s0 *       1.2.4.3              0.0.0.0/0            tcp dpt:3000
       0        0 ACCEPT     tcp  --  enp3s0 *       111.222.113.224      0.0.0.0/0            tcp dpt:3000
       5      200 DROP       tcp  --  enp3s0 *       0.0.0.0/0            0.0.0.0/0            tcp dpt:3000

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 60 packets, 10628 bytes)
    pkts      bytes target     prot opt in     out     source               destination


How to uninstall libreoffice 32bit from my 64bit system

Type the following in terminal to remove libreoffice.

sudo apt-get remove --purge libreoffice*

sudo apt-get clean

sudo apt-get autoremove

Hope this helps.

Also see answers for this question for further detail. uninstall Libreoffice


You need to install the corefonts package

To do this:

Start winetricks
Select the default wineprefix
Choose 'install a font'
Select 'corefonts' and click ok.

You will need to be online for the packages to be downloaded.


cat checklog.txt | xargs -L 1 mkdir

Worked  for me.


For now on Xenial 16.04 use this guide for installing java.
Hopefully the webupd8team will add the Xenial distribution to the ppa. After the ppa update it will be possible to install via this guide.


The GUI of gnome-paint is a ui file

/usr/share/gnome-paint/ui/gnome_paint.ui

All available shortcuts are

<accelerator key="n" signal="activate" modifiers="GDK_CONTROL_MASK"/>
<accelerator key="o" signal="activate" modifiers="GDK_CONTROL_MASK"/>
<accelerator key="s" signal="activate" modifiers="GDK_CONTROL_MASK"/>
<accelerator key="s" signal="activate" modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK"/>
<accelerator key="q" signal="activate" modifiers="GDK_CONTROL_MASK"/>
<accelerator key="z" signal="activate" modifiers="GDK_CONTROL_MASK"/>
<accelerator key="z" signal="activate" modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK"/>
<accelerator key="x" signal="activate" modifiers="GDK_CONTROL_MASK"/>
<accelerator key="c" signal="activate" modifiers="GDK_CONTROL_MASK"/>
<accelerator key="v" signal="activate" modifiers="GDK_CONTROL_MASK"/>
<accelerator key="Delete" signal="activate"/>

GDK_CONTROL_MASK means Ctrl
GDK_SHIFT_MASK means Shift
GDK_SHIFT_MASK | GDK_CONTROL_MASK means Ctrl-Shift

Therefore you have e.g.

Ctrl-N, Ctrl-Shift-S  and so on.

Other shortcuts I could not find in the source code, e.g. via

apt-get source gnome-paint
grep -r 'keyval' gnome-paint-0.4.0/src


Well yes, indeed you can.

It is as easy as you mention: Simply unplug your Windows 7 Hard Disk Drive, plug the one where Ubuntu will reside and do the proper install. I would suggest you to also remove any other hard disk drive (if any) in order to prevent the GRUB Boot Loader from being installed somewhere else.

This process works. But you will be in the need to instruct your BIOS to boot from your main OS (if you wish auto-boot) or choose the boot drive at the startup. Certain computers allow you to do it by pressing a key then choosing the device to boot from but some of them will only let you choose if you wish to boot from DVD/HDD/USB without allowing you to choose which Hard Disk Drive is the one that you wish to boot from. Overrided by simply arranging the boot order from the BIOS.

Good luck!


You are using a RAID1 system with two mirrored hard drives (sda and sdb). Where fdisk -l shows you the real physical disks and their partitions, df -h shows you the raid devices and partitions as they are used by the system.

I.e. /dev/md1 is made up from /dev/sda1 and /dev/sdb1 which both have the same contents. If either drive fails the data is secure on the other one.

To get more details about the raid device, use mdadm (assuming is was done by that):

mdadm --detail /dev/md1


What exactly does logrotate do to apache log files? (apache 2.4 - ubuntu 14.04)

For a service that writes a log file, let's say service.log, the logrotate utility does a couple of things:

Start a new (empty) file service.log every day;
Compress the last service.log to a .gz file so it doesn't take up too much space; the new compressed file gets an index number appended, like service.log.gz.00001;
The oldest compressed service.log.gz.[index] is deleted.

This way, you can run your service indefinitely without the logs ever growing. All of the above behaviour is configurable.


How to fix the version reported by psql?

The comment here is completely and totally accurate. You can easily confirm this by utilizing the sadly underused Ubuntu Package Search which for 18.04 reports that psql is part of     postgresql-client-common

psql is reporting the version of psql installed as expected.

If you want to see the version of a package that you have installed dpkg -l packagename is useful.


Axel has a configuration file. This sits either in $HOME/.axelrc or in /etc/axelrc. In this file the proxy is configured. Look for a line starting with http_proxy. The line probably reads http_proxy = http://127.0.0.1:8118. Remove  it or place a # in front of the line. Now axel 'forgets' about the proxy and uses a direct connection.

If you find no such setting there might also be a shell variable called http_proxy. Just open a terminal and type echo $http_proxy. If you see a valid proxy, axel will also try to use it. Just unset the variable and axel will also use a direct connection.


Should I modify this file (/etc/apache2/sites-available/default-ssl.conf) while changing Apache "DocumentRoot directory"?

The two files .conf you find in default /etc/apache2/sites-available/ refers to hosts configurations.

For any host you add in your Apache installation you should edit a .conf file.

Once you edited or added a .conf file you must run sudo a2ensite [file.conf] and then sudo service apache reload in order to enable your new configuration.

default-ssl.conf refers to a host that use https/ssl encryption.

If you don't use Https hosts you don't need to edit this file.


Why do I only hear sound from the speakers with A2DP headset connected?

Note about the answer here - It appears that Lubuntu comes without Pulseaudio and I assumed Pulse is needed for A2DP to work and that OP would have installed it. It appears not to be the case. The answer below is about a Pulseaudio installation.

Make sure you've selected the right output sink for the application you're expecting sound from.

Similar to my answer in a similar question, start by installing and starting pavucontrol and check:

In the Output Devices tab

Check the presence of your Bluetooth device. I assume it's listed there stating you see it in another application.
Check the obvious settings for that entry.

In the Configuration tab

Check the audio profile. Make sure you've selected A2DP rather than 'headset' or 'off' (unless you want to, really).

In the Playback tab the application producing sound should be listed.

Try to see what output sink is selected and verify it is using your Bluetooth connection.
Check the output volume and mute status of this particular audio stream.


Changing resolution in Ubuntu Server 12.04

You can add kernel parameter vga=792 (depends on your monitor) in /etc/default/grub

  VGA Resolution Codes for GRUB & Lilo
--- Depth --
Colors  bits  640x480  800×600  1024×768  1152×864 1280×1024  1600×1200
   256    8   vga=769  vga=771   vga=773   vga=353   vga=775    vga=796
 32000    ?   vga=784  vga=787   vga=790   vga= ?    vga=793    vga= ?
 65000   16   vga=785  vga=788   vga=791   vga=355   vga=794    vga=798
 16.7M   24   vga=786  vga=789   vga=792   vga=795   vga=799


Grub rescue trouble after moving a partition

Assuming that hd0,4 is where you have ubuntu installed ( your root filesystem, and it also contains /boot ), then it seems that grub has the wrong prefix ( did it move since installing grub? ).  At the rescue prompt, type set prefix=(hd0,msdos4)/boot/grub, then insmod normal and finally normal and that should get you to the normal grub prompt so you can boot up.  Once booted, to fix this in the future, run sudo dpkg-reconfigure grub-pc to reinstall grub to the MBR with the correct prefix setting.


Changing default index page with .htaccess

Add the following to make first.html your index page

DirectoryIndex first.html

You can also have multiple files as in :

DirectoryIndex first.html index.htm index.html index.php

Here the server will check for files from left to right and use the first one available

So I guess you configuration should be

DirectoryIndex index.php index.html

Since you want ot give more priority to index.php when it is found in a directory


Ubuntu 18.04 Desktop - Live USB doesn't boot and shows pixel test on screen

Live drive

I think you need the boot option nomodeset to make it work with that graphics card. The following link and links from it can help you enter nomodeset in the correct way, Boot options.

Installed system

After installation you can

use nomodeset again (with grub), and you can add it such that it persists. See this link

Grub2/Setup - /etc/default/grub

Scroll down to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash", where you can add nomodeset to make it

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

and after you have saved the edited file

sudo nano /etc/default/grub

run

sudo update-grub

The next step is to install an nvidia proprietary driver to make Ubuntu work with your graphics chip/card. Try according to the following links

How do I install the proprietary Nvidia drivers on Ubuntu 17.10?

Installing NVIDIA proprietary drivers?

You can list the available driver packages with the following command line,

LANG=C apt-cache policy nvidia*|grep -B2 -E 'Candidate.*ubuntu'

nvidia-384 is the driver package with the highest revision number, that I find in my 18.04.1 LTS system, and it can be installed with

sudo apt install nvidia-384

You can start trying with that package.
But sometimes the free nouveau driver, that is installed automatically, will work better than the best proprietary driver.


Prompt a user for filename and path, test if file exists, if it doesn't exist create a blank file with that name

Try invert the if operation, by checking if a file under user input doesn't exist. You can use ! "not" logical operation to negate it.

#!/bin/bash

printf "What file are you looking for ?\n"
read file

if [ ! -f $file ]; then
  printf "%s doesn't exist, creating the file..\n" "$file"
  touch $file
else
  printf "%s already exist !\n" "$file"
fi

The result.

$ ls
file1  test.sh
$ ./test.sh
What file are you looking for ?
file1
file1 already exist !
$ ./test.sh
What file are you looking for ?
file2
file2 doesn't exist, creating the file..
$ ls
file1  file2  test.sh


How can cilents get ip addresses during booting time via dhcp server

in your dhcp.conf you will see a stanza with the hostname and mac address, this will setup the IP.  You can google 'dhcp.conf examples' to see how its setup.  Hope this helps.

mattcurry.com


Is it possible to disable and enable my trackpad with a keyboard shortcut?

Here is how to turn the touchpad off and on.

Run xinput from your terminal. When I do so, for my laptop, I see this:

$ xinput
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ PixArt USB Optical Mouse                  id=10   [slave  pointer  (2)]
⎜   ↳ PS/2 Mouse                                id=13   [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS GlidePoint                  id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Video Bus                                 id=6    [slave  keyboard (3)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ Integrated_Webcam_1.3M                    id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]
    ↳ Dell WMI hotkeys                          id=14   [slave  keyboard (3)]
$

The trackpad here is AlpsPS/2 ALPS GlidePoint with a device id of 12. You'll need to figure out what is what on your system.

To disable this device within this particular current session, I'll run:

xinput --disable 12

To enable it, I'll run:

xinput --enable 12

But if I want to have code I can safely use even after a reboot I would use the device name itself.

So, one can use:

xinput --disable 'AlpsPS/2 ALPS GlidePoint'

and

xinput --enable 'AlpsPS/2 ALPS GlidePoint'

The single quotes are important!

How you actually make these keyboard shortcuts depends on the desktop environment you are using and what keys are free on your system for the purpose. You need to make sure they won't be needed for other purposes.


I entered in recovery mode and delete with rm the /etc/laptop-mode-tools folder with its sub-folders.
Then I re-give the command apt-get purge laptop-mode-tools and all works!


The Hash, and number after is the default TCP/UDP name server port.

Any answer that originates from the DNS Server which has the complete zone file information available for the domain is said to be Authoritative answer.

When the DNS servers maintains a cache file for the results of all queries performed in the past, and received an authoritative response, when a DNS query is asked for, it searches the cache file, and return the information available as Non-Authoritative Answer.


Why do I have two versions of gtk installed?

They are different ABI versions of GTK+.

As mentioned in comments, some things still require GTK+ 2.x, and haven't been ported to GTK+ 3.x. Likewise, you may have both Qt 4.x and 5.x installed, as different applications require different versions.


I have since found my answer: If I encrypt my home drive fingerprint-gui will not work unless I save the password in an encrypted format on a external drive. However the encryption format used (at least the one I found) is rather outdated and has known exploits making it insecure to use for encryption.
Another way is to simply use the gnome keyring (which is encrypted by default). That way I first need to login using my password before the fingerprint scanner becomes usable (which is more secure).

source


It seems it's a problem with some libraries in the repos. Installing ruby with RVM solved it.