Person A can use port-forwarding with iptables on his machine, it will allow connections made to his machine 10.0.0.1 to be forwarded to PersonBs machine 172.16.0.1

echo "1" > /proc/sys/net/ipv4/ip_forward

personB=172.16.0.1
personA=10.0.0.1
personA_VM=10.0.0.2
personA_2=172.16.0.2
mysql=3306 # port

### Make all packets from VM to mysql go to Person B
iptables -t nat -I PREROUTING -p tcp --dport $mysql \
   -s $personA_VM/32  -d $personA  -j DNAT --to $personB:$mysql

### Make all packets local to PersonBs network.
iptables -t nat -I POSTROUTING -p tcp --dport $mysql \
   -s $personA_VM/32 -d $personB/32  -j MASQUERADE

But as I say in the comments a better solution is to add the VM to both networks


Although not officially supported by UBUNTU you will need to install the proprietary nvidia driver at nvidia.com if there are no detected drivers. Then i would recommend the ARANDR screen utility if the default one does not do the trick for you. But the nvidia-settings utilty should give you just about everything you need.


Only the first partition on a USB stick will be accessible by Windows, and it must be either FAT or NTFS.

If you want to create a Linux Live USB stick with an NTFS "shared" partition, do the following (using gparted):

Remove all partitions from it
Create the shared NTFS partition (must be the first in the drive)
Create the 700MB~1GB FAT partition (for the Live Session)
Make it bootable (right-click the partition > Manage Flags > boot)
Use the Startup Disk Creator to create an install in the second partition

This way you can:

Use the stick to boot the PC and either use a Live Session or Install Ubuntu
The Live partition will be invisible and un-accesible from Windows
The NTFS partition will be visible and accessible from both Windows and Ubuntu


Fstab doesn't update permissions or ownership rules

The owner of the svn repository needs to be changed by:

sudo chown --recursive camilstaps:plugdev /Path/To/Dir/*

The FAT partition needs to be mounted using:

UUID=EA08-6773 /media/data vfat gid=1000,uid=1000,dmask=027,fmask=137,nosuid,nodev,users 0 2


CPU Locks up due to intel sound drivers during boot

Solution found here https://bbs.archlinux.org/viewtopic.php?pid=1460933#p1460933 in the comments of the bug.

I had to modify add

  options snd-hda-intel enable=0,1,0

Somewhere in my /etc/modprobe.d, I chose to put it in my Alsa.conf because that seemed to make sense.

Beyond that the best I can tell as to what happened to the driver was that something at boot was making it look like the soundcard was being hotswapped and then the driver freaked out and started locking up the CPU.


App suggestion to handle window tiling on a large display

Have you tried the settings manager, onboard settings, window?

On my system I can check dock to screen edge, which seems to work.


How can I remove enclosing brackets from a line?

You can use character class [()] as Regex pattern, and replace the pattern with empty string to remove them:

sed 's/[()]//g'

So:

% sed 's/[()]//g' <<<"hello my (name) is (user)"
hello my name is user

g modifier does the operation on all matches, otherwise sed will stop after the first match.


pdf font mangling on printing mixed results

At least for my computer it appears that the problem was purely a print-driver issue. The menu for this can be quite tricky to find so I'm posting it too.

Setings > Devices > Printers

Scroll all the way to the bottom and click Additional Printer Settings

Select the printer in question with a right-click and go to Properties

Under Make and Model click change and use the menu items to select a new driver. The driver I found worked best was

HP LaserJet 600 M601 M602 M603 Postscript (recommended)

Results may vary, my hypothesis is that the HP 600 M602 is a postscript printer and by using the following "driverless" PPD not all programs converted to PS appropriately

HP LaserJet 600 M602, driverless, cups-filters 1.20.2


Minecraft server unable to locate java after Ubuntu update to 16.04

Purge all java packages that are installed already by following the instructions here: askubuntu.com/questions/84483/how-to-completely-uninstall-java

Then, do the following to install Oracle's java:

sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java<version-of-java>-installer


How to install Nividia graphics driver for GP107M [GeForce GTX 1050 Ti Mobile] on Ubuntu 18.04.2 LTS

Remove older Nvidia driver:

sudo apt-get purge nvidia*

Add the graphics-driver PPA

sudo add-apt-repository ppa:graphics-drivers/ppa

Then update:

sudo apt-get update

And install (and activate) the latest Nvidia graphics drivers
First check the version you want on the graphics drivers PPA homepage

sudo apt install nvidia-driver-410

Or whatever version you want:

sudo apt install nvidia-driver-430


Citrix Receiver - mouse with a strange black box

I was having this exact same problem. Apparently its to do with 'alpha blending' on the mouse pointer shadow (see here http://citrixblogger.org/2008/02/07/cursor-shadowing-turn-it-off/)

The following fix worked for me:

1) Log into citrix session
2) On the remote machine youre logged into go to:
3) Control Panel > Mouse > Pointers
4) Under Scheme select None
5) Hit apply

Hope this works for you.


Making an request/command in terminal (ubuntu) and save the answer in mysql

This is easily done in Python. First, learn how to get your CPU's temperature here. Either use the sensors command or the cat /sys/class/thermal/thermal_zone0/temp to write the current temperature to a temporary file curr.temperature. You can do that seperately in a bash script or in the Python program itself, using:

from subprocess import call
call (["/path/to/script/get_temperature"], shell=False)

Then the Python code just needs to read the file curr.temperature and store the value in a MySQL table. I have not tested this code, but it should be something like this:

#!/usr/bin/python
import MySQLdb.cursors
with open('curr.temperature', 'r') as f:
    read_data = f.read()
db = MySQLdb.connect(db='databasename', host='localhost',
                     port=3306, user='MySQL-username', passwd='password',
                     cursorclass=MySQLdb.cursors.DictCursor)
cur = db.cursor()
cur.execute("INSERT INTO temperatures VALUES (now," + read_data + ")" )


How to recover lost username and password?

If you want to keep using this current install ...

Boot from that live dvd, choose the "try ubuntu" option, click on the disk in the launcher and try to find your system (it will have a /home/ directory) and click /home. Your username is the directory name in there (could be more than one but seeing the names should be enough I hope).

Then all you need to do is reset the password for this user. Regarding resetting the password I would refer you to How do I reset a lost administrative password?

Regarding the other parts in your question:

  I could just update to a new version of Ubuntu if there is a new version and if it would delete the user accounts (doubtful).

No, you can not unless you retrieve username and reset the password. Updating will need you to log into your acccount ;)

  I am very willing to delete everything and start again.

That is also an option; a re-install will remove anything related to Ubuntu and have you start from zero. With a new username and a new password. But try not to forget at least the user name. Be smart and pick something easy as a name (your own name is always a good option).

Mind though that if you do have personal documents it might be wise to put them on an USB before re-installing (also possible from the "try ubuntu" option).


Why is my system not waking up from suspend?

I know this may sounds goofy, but I believe I have encountered the same issue. What I have always done to resolve this is pressing either the "home" key or the "delete" key it will take you to the screen where you can enter your password, then it manages to login and you're good from there.


How do I set clicking on a screen edge to switch viewports?

As Roland Taylor pointed out in the comment, you can't click to activate viewport switching. But, you can activate it by a simple mouseover. For that, you can use Ubuntu Tweak.

Follow this question for details about how to install Ubuntu Tweak.

How do I install Ubuntu-Tweak?

After installing Ubuntu Tweak, open it and move to 'Tweaks' section. Then click on 'Compiz settings'

Under 'Workspace edge settings', you can choose the edge where you want to have the hot corner. Select 'Show workspaces' from the dropdown list and you will then be able to switch between workspaces when you mouseover in the designated corner.


Duplicated icons with Unity. Particular case: Matlab

Add the following line to your .desktop file

StartupWMClass=com-mathworks-util-PostVMInit


Disabled Sleep mode failed in Ubuntu 18.04

If you're using gnome, you can use dconf-editor. You can install it via apt.
For me, it was a similar setting: /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type


Indicator displaying current CPU frequency and usage

You may use indicator-sysmonitor for such custom indicator

Install indicator-sysmonitor

sudo add-apt-repository ppa:fossfreedom/indicator-sysmonitor
sudo apt-get update
sudo apt-get install indicator-sysmonitor

Run it
Click on its indicator → Preferences → Advanced tab
Click New:

Sensor:freq Command:awk '/cpu MHz/{printf(" %d",$4)}' /proc/cpuinfo
Change the new sensor to label: cpu: {cpu} mem: {mem} freq:{freq}.
Save

References:

Ubuntu AppIndicator That Displays Bash Scripts Output On The Panel: Sysmonitor Indicator


If both deb and snap versions of the same program are installed, how do I run the mfrom the command line?

You may run a specific version of your application by providing the full pathname instead of only the file name of the executable.

As such:

/usr/bin/evince

will run the deb version. The command

/snap/bin/evince

will run the snap version.

If you do not provide the full pathname, the first executable found in the PATH will be launched. By default, this will be the deb version, because the folders where these executables are installed are listed earlier in the PATH environment than /snap/bin, where the snap executables reside (use echo $PATH to view your path).


How can I type accentuated characters like ë? Need help

If you are using the "English (US)" keyboard layout now, you need to add a keyboard layout that supports those special keys.

Go to System Settings - Keyboard - Text Entry, and click the + button under the list of language input methods / keyboard layouts. You need something like "English (US, international)". If your keyboard is not a standard US keyboard, you can just choose the one that describes your keyboard. If you are using a standard US keyboard, then you need to know which key on your keyboard is a special key... It might be the right Alt.

Now I am using "English (US, international with dead keys)". It is a little bit different from what you describe. Now I can input ë by simply pressing " first, releasing, and then pressing e. Similarly I can also do é è ¿. I can input ' and " with Right Alt+', etc.

You should switch to the keyboard using the switcher icon in the system tray.


Well. Google support wasn't very helpful, as they basically just say "if you're using developer mode, you're on your own." Reddit (/r/Crouton) produced a reasonable answer:

  When running in Crouton, the instance isn't a VM, it's sharing the kernel with ChromeOS...it does not do a traditional boot.

This from PaintDrinkingPete. I don't know what a VM is exactly, but dual booting would complicate the whole idea of boot directories, wouldn't it? Good enough for me, for now.

If you're here too, PDP, cheers mate.


Manually provision an existing LXC container in Juju-local

I figured-out a solution myself:

After bootstrapping a fresh juju local environment, add a machine to the environment:

juju add-machine

This shall create machine-1.
After the machine-1 is ready (check through juju status), a juju template would have been created named similar to juju-trusty-lxc-template.

Now you can create clones of this template to create as many lxc-containers you want, and add them to juju environment manually (this can be created on a remote machine as well) through ssh.

sudo lxc-clone juju-trusty-lxc-template -n lxc-001
sudo lxc-clone juju-trusty-lxc-template -n lxc-002

Start the containers

sudo lxc-start -d -n lxc-001
sudo lxc-start -d -n lxc-002

and then add the the containers to juju through ssh

juju add-machine ssh:lxc-001 #this shall create machine-2
juju add-machine ssh:lxc-002 #this shall create machine-3

After juju finishes installing agents on the machine, you have to remove reference to localhost:170702 in agent.conf file inside containers and restart jujud inside continers. You can quickly do this through:

juju run --machine 2 'sudo sed -i "s/\- localhost:17070//" /var/lib/juju/agents/machine-*/agent.conf && sudo pkill jujud -hup'
juju run --machine 3 'sudo sed -i "s/\- localhost:17070//" /var/lib/juju/agents/machine-*/agent.conf && sudo pkill jujud -hup'

Check through juju status if agents are in started state, and you are done, ready to deploy a service to these machines.

Hope this helps.

Note: In default juju configuration, lxc containers will get DHCP address from bridge created from juju. These addresses are not accessable on LAN. You may want to create a custom bridge and let juju use that (change network-bridge: your-lan-br0 in ~/.juju/environments.yaml before bootstrapping). This is also necessary if you add a container from another physical machine. You may also want to configure static addresses for lxc-containers (dnsmasq).


Ubuntu 16.04 - sudo apt-get update error

First, you need to edit or create your /etc/apt/sources.list file so run the following command:

sudo nano /etc/apt/sources.list

Now, copy and paste the following contents into the terminal:

# deb cdrom:[Ubuntu-Studio 16.04 LTS _Xenial Xerus_ - Alpha amd64 (20151225)]/ xenial main multiverse restricted universe

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://archive.ubuntu.com/ubuntu/ xenial universe
deb-src http://archive.ubuntu.com/ubuntu/ xenial universe
deb http://archive.ubuntu.com/ubuntu/ xenial-updates universe
deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ xenial multiverse
deb-src http://archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

Press CTRL + o and then press ENTER to save the file. Press CTRL + x to exit nano.

When that is done, run the following command:

sudo apt-get update

And to apply any updates, run one of the following commands:

sudo apt-get upgrade

or

sudo apt-get dist-upgrade


Open your file manager and go to /etc/network/. Once there, you have to edit the file interfaces like this:

  sudo gedit /etc/network/interfaces

or

  gksu mousepad /etc/network/interfaces

and delete all entries in there except for auto lo / iface lo inet loopback.

The following lines

   auto lo
   iface lo inet loopback

have to be the only entries present in /etc/network/interfaces.

Next you should edit a second file located in /etc/NetworkManager/NetworkManager.conf. Use this code in a terminal window:

   sudo gedit /etc/NetworkManager/NetworkManager.conf

or

   gksu mousepad /etc/NetworkManager/NetworkManager.conf

Look for this entry [ifupdown] and edit the entry to look like this:

   [ifupdown]
   managed=false

Reboot and reconfigure if necessary your network using the network applet from system tray.


iptables not working on Ubuntu Server / Raspberry Pi 4: "Module ip_tables not found"

You are not alone. I too noticed the other day when I first was setting up my pi4 with Ubuntu 20.04.
I do not have a solution for you right now, but I do know the problem.
So /lib/modules/5.4.0-1012-raspi/modules.order indicates that ip_tables should be located /lib/modules/5.4.0-1012-raspi/kernel/net/ipv4/netfilter/ip_tables.ko,
and dpkg -S /lib/modules/5.4.0-1012-raspi/kernel/net/ipv4/netfilter/ip_tables.ko tells us that the linux-modules-5.4.0-1012-raspi package should have put the package there, but obviously it is not there. In fact the whole netfilter subdir is gone.
sudo apt install --reinstall linux-modules-5.4.0-1012-raspi does not fix...
I thought I would try something dangerous since I have seriously started using my PI4 yet.
ubuntu@ubuntu:/lib/modules/5.4.0-1012-raspi$ sudo apt install --reinstall linux-modules-5.4.0-1011-raspi
sudo: unable to resolve host ubuntu: Temporary failure in name resolution
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 20 not upgraded.
Need to get 0 B/29.9 MB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 104789 files and directories currently installed.)
Preparing to unpack .../linux-modules-5.4.0-1011-raspi_5.4.0-1011.11_arm64.deb ...
Unpacking linux-modules-5.4.0-1011-raspi (5.4.0-1011.11) over (5.4.0-1011.11) ...
Setting up linux-modules-5.4.0-1011-raspi (5.4.0-1011.11) ...
Processing triggers for linux-image-5.4.0-1011-raspi (5.4.0-1011.11) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.0-1011-raspi
Using DTB: bcm2711-rpi-4-b.dtb
Installing /lib/firmware/5.4.0-1011-raspi/device-tree/broadcom/bcm2711-rpi-4-b.dtb into /boot/dtbs/5.4.0-1011-raspi/./bcm2711-rpi-4-b.dtb
Taking backup of bcm2711-rpi-4-b.dtb.
Installing new bcm2711-rpi-4-b.dtb.
Ignoring old or unknown version 5.4.0-1011-raspi (latest is 5.4.0-1012-raspi)
/etc/kernel/postinst.d/zz-flash-kernel:
Using DTB: bcm2711-rpi-4-b.dtb
Installing /lib/firmware/5.4.0-1011-raspi/device-tree/broadcom/bcm2711-rpi-4-b.dtb into /boot/dtbs/5.4.0-1011-raspi/./bcm2711-rpi-4-b.dtb
Taking backup of bcm2711-rpi-4-b.dtb.
Installing new bcm2711-rpi-4-b.dtb.
Ignoring old or unknown version 5.4.0-1011-raspi (latest is 5.4.0-1012-raspi)
As you can see it bailed out using 1011 version. However I could see that there was a network subdir in 1011, and copied it over to 1012 subdir in the right place...
Unfortunately after reboot the copied network directory was wiped....So maybe some security measure removed it...
So bottom line, definately a bug in linux-modules-5.4.0-1012-raspi and hopefully fixed soon. I will see if I can file a bug myself in the next day or so, or find if one has already been submitted. But I image it should be fixed with linux-modules-5.4.0-1013-raspi whenever that comes, or if there is a fixed version of linux-modules-5.4.0-1012-raspi to come in an update.


The problem seemed to be an unfortunate interaction between kmail and Dropbox relating to case sensitivity.  I finally figured out a string that appeared only in one of the missing messages, and then did a search for it.  That led me to a Dropbox "Case Conflict" folder, and all the missing messages were in that folder.


Foxit PDF reader crashed when try to comment or highlight text

After helps of Foxit Reader's technical team. the solution is founded. It seems the problem was occured after updating the language packages (from language support of Ubuntu system setting).

The solution: Going to /home/mostafa/.local/share/Foxit Software/  address (use your home name instead of mostafa), and deleting the "Foxit Reader" folder. Then, if needed, reinstall the Foxit reader.

Also, if you needed to saving the log file, it is the way from Foxit Reader's technical team: .... "Please open Foxit Reader, go to Help>About Foxit Reader, click on Foxit Reader text three times continueslly, you will get the directory for saving the log file."  (notice: I clicked multiple times on it, to this open)

I am appreciative of Lyndi Wu from teckincal taem and @Lynob.


How can I change tomboy note's background colour?

First, it looks like in my desktop setting, I need to restart my X session for widget colours settings could be applied. I could use the $GTK2_RC_FILES environment variable to define the colours profile only for one program, rather than overall.

Second, the text colours (highlight, titles, links, ...) are defined in NoteTag.cs file in the Tomboy sources (InitCommonTags() method). It's not possible to run the rebuilt Tomboy.exe file directly, though: you need to proceed to a "sudo make install" (in /usr/local) first to have all the libraries and resources moved to their expected location.

e.g. use foreground-yellow instead of background-yellow on highlight

tag = new NoteTag ("highlight");
// tag.Background = "yellow"; // commented out
tag.PaletteForeground = ContrastPaletteColor.Yellow; // <- inserted
tag.CanUndo = true;
tag.CanGrow = true;
tag.CanSpellCheck = true;
Add (tag);

Have fun.


How to download a package with its dependence and its dependences' dependences in one command line?

I would start with a vanilla installation USB (for the distro on the new computer), boot from that, ensure /var/apt/cache is empty, then sudo apt-get install Package-A, and copy all from /var/apt/cache to take with me.

This doesn't absolutely guarantee success still, as the install medium is not the same as the new install; but it is likely to work.

You could then install on a fresh HDD with internet disconnected, whilst still at home, & try a dry run, if it really matters!


No bluetooth found after Software Updater ran

Restarting/rebooting apparently isn't sufficient to register the updates to the bluetooth service or drivers.
A shutdown did the trick though.


For Intel, the Open Source drivers that come with Ubuntu are always up to date. There is no need to update them (Very different than ATI or Nvidia for example). Ubuntu always comes with the latest Intel driver when it comes out and it also updates the Intel drivers with the most updated Open Source version available.

Intel is one of the many companies that work a lot in the Open Source world and delivers very good, stable drivers. They also do many updates every year for old and new video cards. Just in case you have any doubts, Ubuntu updates it's Intel video drivers to any still supported version of Ubuntu, that means that your 12.04 will have the latest open source Intel drivers.


How login a user on desktop screen using ssh

After hours of searching in Google and trying different things I ended up with two ways to do this:

First make your user auto-login by creating file /etc/lightdm/lightdm.conf with this content:

[SeatDefaults]
autologin-user=YOUR_USERNAME
autologin-user-timeout=0
user-session=ubuntu
greeter-session=unity-greeter

(for more information How do I enable auto-login in LightDM?)

Then you must restart lightdm using the command:

service lightdm restart

This results in lightdm logging automatically using your username. Now you can remove the file /etc/lightdm/lightdm.conf in order to disable auto-login for your user again.
You must first stop lightdm using the command:

service lightdm stop

then you must use the following command to start an x-session manually:

su - YOUR_USERNAME "startx -- :0 vt7" &

this command starts a new x-session logged in with your username on tty7, the default tty for lightdm. the & sign at the end detaches this process.

Note 1: if you receive an error saying

  X: user not authorized to run the X server, aborting.

you must edit the file located at /etc/X11/Xwrapper.config and set allowed_users to anybody. After the start of the x-session you can return it to the previous value(normally console) for security reasons.

Note 2: If your x-session is showing only the desktop and not the unity panels, try removing files .config and .cache located at home folder of your user.

If you know any better ways or some improvement you might think is useful please share it here. Thank you.


The cloud archive repository is for the machines Juju and MaaS will be managing, but not for the MaaS server itself. Try removing the line

deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/havana main

from /etc/apt/sources.list. (Later on, there are ways to tell Juju to use that repository on the machines it is managing. In fact, those are configuration options that are part of the Juju Openstack charms.)

If you are running the Juju client from the MaaS server (instead of from say your personal machine, and just having it connect from your personal machine to the MaaS server API), you don't need the Juju PPA on the MaaS server either.


Ubuntu 14.04 - after installation no bootloader, so Windows 7 starts

This typically happens, you need to use a live ubuntu dvd on a dvd or a flash drive then install boot-repair on it and run it.  https://help.ubuntu.com/community/Boot-Repair


X11 not working on one of two identical boxes

You have compared /etc/ssh/ssh_config in both machines, but this is the configuration file for SSH clients, for making SSH connections from those machines.

You should compare /etc/ssh/sshd_config (notice the d) in both machines, this is the configuration file for SSH servers, for receiving SSH connections to those machines.

In sshd_config, make sure X11Forwarding is uncommented and set to yes.


name of a program for configure startup services

I think that is jobs-admin : A service administration and configuration UI.

Install:  sudo apt-get install jobs-admin

Execute: sudo jobs-admin


The standard is "PGP" and the key is called a PGP key.

GPG stands for GnuPG, which is Gnu's implementation of the Open PGP standard.

"GPG Key" and "PGP Key" are effectively the same thing.


That bar is named Find bar, it appear using Ctrl+F shortcut key and is used to find some text on the current page:

The Find bar can be closed by pressing Esc key.


Ubuntu 19.04 fails to boot following upgrade from 18.04

Okay, after playing around in the dark for a bit, the installation now boots.
I believe the fix was to apt remove any nvidia drivers.  I did however leave the xserver-xorg-video-nouveau driver installed.

Hopefully this may be of use to someone else.


USB stick is automatically getting disconnected

Your USB stick is busted!

Sorry to be the harbinger of bad news and I hope you've got a back-up of the data it contains, but this is typical behaviour of a USB stick whose control circuit is broken...

If you have no backup: It looks like the control circuit is broken as it gets connected/disconnected/connected/disconnected/...  Probably the memory chip itself is still OK, so if you have an identical disk, you repair the USB stick ;-) or take it to an electronics shop and have it repaired for you.

Warning: Repairing a USB stick will be much more expensive then just throwing it away and buying a new one!  This is only to be attempted if it contains critical data.

It's always good to have a back-up of everything!


The number of tools in GIMP Toolbox have reduced. How to restore them?

That is the new default, you can read more about it in the release news

You can turn it off in Edit ➤ Preferences ➤ Interface/Toolbox ➤ Use tool groups


New install Ubuntu 18.04 login unresponsive and loops

To others stuck in a similar spot—what solved the login loop after fresh install issue on my machine was installing the latest Nvidia drivers from the terminal, then rebooting.


How to feed kernel messages as KDE notification system

You could put this into your autostart:

sh -c 'tail -n 1 -f /var/log/syslog | while read LINE; do notify-send "$LINE";done'

or into a bash script watch_syslog.sh:

#!/bin/sh
tail -n 1 -f /var/log/syslog | while read LINE; do notify-send "$LINE";done

at least this works under GNOME... You only need to substitute the appropriate tool for KDE instead of notify-send:

tail -n 1 -f /var/log/syslog | while read LINE; do kdialog --passivepopup "$LINE" 3;done


What is Jack Audio? I have problems with Hydrogen+JACK

Ubuntu uses PulseAudio by default. This is a sound server application based on ALSA with customizations to integrate it well in the Ubuntu desktop environment, and to operate well with all default applications.

This is very much different for JACK, a more professional sound server aimed at music production applications, possibly in a realtime environment. Therefore the more ambitious a software is the more likely it will make use of JACK. Which sound server a software uses is entirely up to the developers.

  Because of the more professonal audience we do need to have the patience to read the documentation as only then we are able to make use use JACK's features aimed at our special tasks.

To be able to run both JACK, and PulseAudio there is quite some effort to integrate JACK into pulseaudio.

Related:

jack sound server how to?
Jack and pulseaudio
How can I use Jack for all my system sounds?


Firstly, you need to find out what partitions you have on your computer now: From a command line, type sudo fdisk -l which should yield a list, hopefully along the lines of /dev/sda1, AND /dev/sda2 or similar.

If it does have both, then your data is safe in /dev/sda2 & you just need to get it to show up somewhere useful.
Try mkdir tmp ; sudo mount /dev/sda2 tmp (you may need to substitute sda2 with something else, depending on step 1 above's results); check out the contents of your new tmp directory.

If it doesn't, ie you only see the one partition, then the partition has been marked deleted - but probably not damaged yet.
In this case, STOP using it, reboot from the installation CD or USB, and grab a large removable drive with space to put your files. Make sure you connect to internet, and download a retrieval utility (I would recommend foremost - sudo apt-get install foremost which will hunt through the ENTIRE drive & copy anything it recognises & save it to the external drive - but without the original names... a big job for you. Next time, keep a backup!


13.04 + Gnome 3.8 integrated input methods now working

Try also adding the gnome3 staging ppa as well  sudo add-apt-repository ppa:gnome3-team/gnome3-staging

and full update

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


I need to install the Intel HD 3000 video driver in my PC which is running Ubuntu 12.10

If your system started the driver is installed as intel has open-sourced their   display driver and it's shipped with ubuntu by default.

Verify the installed driver using
lshw -c video
It should state provider of the driver in use -  intel corporation, if the  driver is correctly installed

You can also check out this information
How to review the current state of open source vs. closed source graphics drivers?
for a brief overview of display drivers for linux.


Easy encryption program ubuntu for ubuntu 13.10

eCryptfs will create a /Private folder where you can store your sensitive data, accessible with Nautilus: https://help.ubuntu.com/community/EncryptedPrivateDirectory.

A (probably) more secure option is to create an encrypted drive with TrueCrypt: http://www.truecrypt.org.


How do I set up parental controls on Tahr?

I believe that Timekpr is available for 14.04 still according to this article here


I don't know why you are facing this problem, but you could try installing Sublime Text the easy way:

sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text


Best you can do is to shange swappiness parameter

The swappiness parameter configures how often your system swaps data out of RAM to the swap space. This is a value between 0 and 100 that represents a percentage.

With values close to zero, the kernel will not swap data to the disk unless absolutely necessary. Remember, interactions with the swap file are "expensive" in that they take a lot longer than interactions with RAM and they can cause a significant reduction in performance. Telling the system not to rely on the swap much will generally make your system faster.

Values that are closer to 100 will try to put more data into swap in an effort to keep more RAM space free.

We can see the current swappiness value by typing:

cat /proc/sys/vm/swappiness
60

For a Desktop, a swappiness setting of 60 is not a bad value.

We can set the swappiness to a different value by using the sysctl command.

For instance, to set the swappiness to 90, we could type:

sudo sysctl vm.swappiness=90
vm.swappiness = 90

This setting will persist until the next reboot. We can set this value automatically at restart by adding the line to our /etc/sysctl.conf file:

sudo nano /etc/sysctl.conf

At the bottom, you can add:

vm.swappiness=90

Save and close the file when you are finished.


What is this dot on my Firefox 4 file menu?

Are you using Unity?

Could you provide a larger screenshot that includes the whole left of the screen?

It might be the small "arrow" bullet that appears and points to the application's launcher icon, or an artefact of it.


How to programmatically edit a file using only terminal?

That is where sed comes in to play. A sed command has this format:

[pattern1][,pattern2][!] command [args]

It uses regexes so it can/will be a bit difficult. Some basic examples taken from the 2nd link below:

# substitute (find and replace) "foo" with "bar" on each line
sed 's/foo/bar/' # replaces only 1st instance in a line
sed 's/foo/bar/4' # replaces only 4th instance in a line
sed 's/foo/bar/g' # replaces ALL instances in a line
sed 's/\(.*\)foo\(.*foo\)/\1bar\2/' # replace the next-to-last case
sed 's/\(.*\)foo/\1bar/' # replace only the last case

# substitute "foo" with "bar" ONLY for lines which contain "baz"
sed '/baz/s/foo/bar/g'

# substitute "foo" with "bar" EXCEPT for lines which contain "baz"
sed '/baz/!s/foo/bar/g'

# change "scarlet" or "ruby" or "puce" to "red"
sed 's/scarlet/red/g;s/ruby/red/g;s/puce/red/g' # most seds
gsed 's/scarlet\|ruby\|puce/red/g' # GNU sed only

Some references

Text Manipulation with sed from linuxjournal
sed one-liners from linuxhowtos
Beginner's guide to sed


IMO it is best to manage your partitions when running a live USB. You would then manage your partitions with gparted (graphical interface).

You likely have to first unmount the hard drive swap partition (you can unmount partitions from the gparted interface).

You may have to resize in steps depending on your layout.

make / smaller (put the free space adjacent to /home) -> apply changes -> make /home larger -> apply changes

If you are using LVM or extended partitions it may be mor ecomplicated.


How do I bundle a package and its dependencies into a single DEB file?

Not without re-packaging everything with dpkg-deb at the least (and that's not easy as tar).

I recommend you tar or zip up all the debs, extract them to a single directory, then cd into it and simply run sudo dpkg -i *.deb to install them all (dpkg will resolve the dependencies automatically as long as they are all present).


How do I install Adobe flash player on ubuntu 16.04?

Use the command sudo apt install flashplugin-installer. However, Flash shouldn't be necessary at all with Google Chrome.


I would recommend first of all to not install the drivers coming from outside the distribution unless you really know that you need them. Ubuntu 18.04 is pretty new and the open source drivers for AMD are in great shape.

The situation is not so great for multi-gpu configurations though. But if you just want to use the AMD graphics card instead of the Intel one, there is usually a workaround that works pretty well.

In your laptop BIOS, you usually can choose which one will be the default active graphics card. You should choose there the AMD one. That will be the main GPU from now on and it will be the used by Linux.

Since it seems that you have issues with your graphical environment, I would reinstall the distribution from scratch if you don't know how to perform a cleanup of the drivers that you installed separately.


You need to run sudo apt-get install gparted


14.04 Desktop Installation, Wired Connection Problems

Try this

vi /etc/NetworkManager/NetworkManager.conf

change managed=false to managed=true.

From the top-right corner select Edit Connections, and add a new connection. Specify your ip address, netmask, gateway, and the DNS server being 8.8.8.8.

Then add these two lines to /etc/resolv.conf

nameserver 8.8.8.8
nameserver 8.8.4.4

Then run:

sudo service network-manager restart.

Hope this helps!


Go to System Settings -> Cellular -> Carrier. There you can select the provider manually.


The problem is, that the binary is a 32bit executable and you're running a 64bit Ubuntu. That is not a problem, since Ubuntu offers support for multiple architectures.

If in doubt about the nature of an executable, or any file in general, the command

file <filename>

offers valuable information. If the command is not available, it can be installed through

sudo apt-get install file

In this case, it tells us among other information

ac3d: ELF 32-bit LSB executable[...]
interpreter /lib/ld-linux.so.2

The interpreter is the bit of software responsible for loading all the shared libraries a binary needs to run. If it's missing, an application cannot run.

32- and 64bit executables need different interpreters and different versions of shared libraries. Fortunately Ubuntu (or more precisely Debian) introduced very sophisticated multi-architecture support some time ago[cit. needed]

To make sure the package system is prepared for another architecture, one can view the systems default architecture with

dpkg --print-architecture

On a 64bit Ubuntu this will default to amd64.

dpkg --print-foreign-architectures

prints out all other architectures the package system is aware of. For 32bit support, the output must contain i386. If it does not, one can add support with

sudo dpkg --add-architecture i386

It is necessary to update the package list afterwards

sudo apt-get update

The necessary libraries or packages in their i386 flavor can now be installed with

sudo apt-get install <package>:i386

More specifically, to install the needed interpreter, the installation of the GNU C Shared Library is indicated:

sudo apt-get install libc6:i386

This will in many cases make the binary in question execute, but of course there are many libraries an application can be dynamically linked against, that is depend on. These need to be installed in the same fashion. If a library is missing, the linker will give an error at execution

./ac3d: error while loading shared libraries: libGLU.so.1: \
cannot open shared object file: No such file or directory

At this point one needs to find, which package contains this missing file.
If the corresponding package in the native architecture is already installed, one can search vi adpkg

dpkg -S libGLU.so.1
libglu1-mesa:amd64: /usr/lib/x86_64-linux-gnu/libGLU.so.1

So we would need to install libglu1-mesa:i386. Repeat until all dependencies are satisfied.

But often a library is completely missing from the system. In that case, one can either search Ubuntu's online package database, or install the utility apt-file and do

apt-file search <filename>

A very nice HOWTO on multi-arch support on Debian (same holds for Ubuntu) can be found here.

Extra: The package binutils contains some pretty nifty tools to examine binaries. In particular it contains the ldd (List Dynamic Dependencies) util. It lists all the dynamic libraries a binary needs to run.

Example:

ldd ac3d

produces

linux-gate.so.1 (0xf77b7000)
libfreetype.so.6 => /usr/lib/i386-linux-gnu/libfreetype.so.6 (0xf76ee000)
libGLU.so.1 => not found
libGL.so.1 => not found
libpng12.so.0 => /lib/i386-linux-gnu/libpng12.so.0 (0xf76c0000)
libXmu.so.6 => not found
libXext.so.6 => not found
libX11.so.6 => not found
libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xf76ba000)
libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xf769e000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf75ac000)
libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xf7566000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf7549000)
libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xf739e000)
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf7381000)
/lib/ld-linux.so.2 (0xf77ba000)

This way one can find out quickly which libraries are missing from the system.


windows network settings translated to ubuntu

In the Windows 'Internet Protocol Version 4 (TCP/IPv4)' dialog there is no direct equivalent of the network and broadcast fields because they can be inferred from the other fields - for example the broadcast address can be obtained by performing a bitwise OR of the bit complement of the subnet mask and the IP address - see http://en.wikipedia.org/wiki/Broadcast_address

If you are running a desktop version of Ubuntu (using network-manager) then neither /etc/network/interfaces nor directly editing dhclient.conf are the recommended ways to modify IPv4 or DNS settings - instead, edit the connection via the nm-applet or nm-connection-editor. For example, you can specify a static configuration by setting the method to 'Manual' in the IPv4 settings tab and filling in the details in the boxes provided.

If you are using Ubuntu server (without network-manager) then the recommended way to specify DNS servers is to append them to the interface stanza in /etc/network/interfaces, e.g.

dns-nameservers 8.8.8.8 8.8.4.4


GRUB - automatically boot Ubuntu, or boot Windows when shift is held (WITHOUT showing the menu)?

Workaround i found for Asus laptops:

Edit GRUB's menu with GRUB2 Editor, GRUB Customizer, or even BURG so that Windows option no longer to appear in the list. This will make PC boots directly into Ubuntu.
When starting laptop, press Esc key immediately until the UEFI menu comes up and select your desired OS from there. Both Windows and Ubuntu should be available. UEFI menu doesn't splash up automatically on screen at boot time, so the Windows option will remain out of sight and no one will be the wiser.

I know it's not exactly automatic, but it's the closest thing to it that i know. My guess is the shift option you described was achieved by means of a grub editor.


Or does the BuildID[sha1] refer to something else?

BuildID is NOT the hash of a binary or related to it. It is an identifier for the "build" (or compiling) session which produced that binary. It is mostly there for debug purposes, so that the developers can look at the logs, environment, etc. from session number $BuildID and try to fix the problem, reproduce it, etc.

BTW, SHA1 hashes of anything are always 160 bits long :)


Can't start X session after updating packages

Try uninstalling the graphics driver and remove xorg.conf:

sudo rm /etc/X11/xorg.conf


How do I fix my connection to api.snapcraft.io

I also got the similar error while updating from 18.04.4 LTS to 20.04 LTS yesterday.

Following worked for me:

snap refresh snapd
systemctl restart snapd

Note: If you get the error snap snapd is not installed, then first install snapd and then try executing above mentioned commands.

Hope this helps.


Audio files are played faster than normal speed

The player you use will make an assumption about the sample rate, but this being a university lecture, it may have been sampled at a lower rate, resulting in lower sound quality.

You may want to resample the audio files, using full GUI software like Audacity or a terminal command like sox. Or you can try a different audio player like VLC that recognizes the lower sample rate and plays the file at the proper speed.


Password resets on reboot (multi-user network)

The ultimate answer was that my LDAP password expired.


Upgrade from KUbuntu-16.04 to Ubuntu-18.04

The sources.list file is a key factor in adding or upgrading applications to your Ubuntu installation. This is also used by your system for system updates. The sources.list should only be edited if you know what are you doing otherwise that would create problems in updating Ubuntu. The official flavors of Ubuntu (ordinary Ubuntu, Kubuntu, Xubuntu, etc.) uses the same repository. They only differ in their default desktop environment, for example, Ubuntu uses Unity or GNOME (17.04+), Kubuntu uses KDE Plasma, Xubuntu uses Xfce. So, it is pointless to edit sources.list to switch to Ubuntu 18.04. You might also like to read Is editing sources.list a good idea?

So, upgrading and switching can be done in two ways:

Updating Kubuntu and switching default desktop environment:

Upgrade Kubuntu 16.04 to 18.04 using:

do-release-upgrade

Install GNOME and gdm3:

sudo apt install ubuntu-desktop gnome-shell gdm3

Choose gdm3 as default and reboot system.

You'll be welcomed by GDM. Choose Ubuntu as your desktop environment.

Welcome to the "default Ubuntu".

If you want you can remove the Kubuntu's default desktop environment and display manager too. Kubuntu uses plasma-desktop and sddm.

sudo apt autoremove plasma* sddm

The default apps (like evince) will be installed automatically with Ubuntu Desktop.
Remove some more KDE related packages:

sudo apt autoremove kde* qml-module-org-kde* libkf5kdelibs4support* libkf5libkdepim* software-properties-kde xdg-desktop-portal-kde libkde* konsole

I've tested this on Virtualbox and side by side compared the packages. There are other packages left like KCalc, KDE Partition, etc. Although they don't take much space but can be removed manually and easily.
I'll personally prefer this method. Hassle free and no chance of losing any file.

Clean Install of Ubuntu 18.04:

In this method you need to have a backup of all user files on some other drive/partition.
Create users again and restore their home folders.


Copying SSH Key From Root To Another User On Same Machine

This is just one of a few different ways to do this. I am assuming you've just created your user and it has sudo access.

Create the folder if it doesn't already exist:
mkdir /home/$USER/.ssh

Make the directory only executable by the user:
chmod 700 /home/$USER/.ssh

Copy the authorized_keys file that contains your public key:
sudo cp /root/.ssh/authorized_keys /home/$USER/.ssh/authorized_keys

Make everything in .ssh owned by your user:
sudo chown -R $USER:$USER /home/$USER/.ssh

Make it readable only by your user:
sudo chmod 600 /home/$USER/.ssh/authorized_keys

If your user does NOT have sudo access, you can modify this workflow a bit. Using your user name instead of <user>, run these as root:
mkdir /home/<user>/.ssh
chmod 700 /home/<user>/.ssh
cp /root/.ssh/authorized_keys /home/<user>/.ssh/authorized_keys
chmod 600 /home/<user>/.ssh/authorized_keys
chown -R <user>:<user> /home/<user>/.ssh


Get pulseaudio current sample rate and bit rate

Pulseaudio settings adhere to the sink they are made for. Hence we are able to read the values we gave with the following command:

pacmd list-sinks

This will give a rather lengthy list including the following information similar to this

sample spec: s16le 2ch 44100Hz

as this was set for my internal card.


Setting up DRBL for Clonezilla issue with instructions

If I understand the instructions correctly, it does tell you to remove NetworkManager, but that doesn't mean you cannot use your network. Basically, you need to bring the ethernet interface down (sudo ifdown eth0), manually edit /etc/network/interfaces and add static addresses, then bring the interface up again (sudo ifup eth0).


telnet: Unable to connect to remote host: Connection refused

Verify zookeeper is actually running, via

ps aux | grep -i zookeeper

If it is, then it may not be bound to 127.0.0.1 or 0.0.0.0. So check which IP address it's actually bound to,

netstat -tlpn

Then try to telnet to it using that address.


Filezilla or WinSCP alternative for Ubuntu

Using Nautilus

You can use the option Connect to Server in Nautilus as it is shown on the next image.

If you need to find the command-line path to the mounted directory use one of the approaches presented here: CLI path to ftp network connection.

The first example - sftp://victoria-pass/home/tri - uses predefined host called victoria-pass and mounts the home/ directory of the remote user called tri.

To use this approach, you should create user's configuration file for the local ssh client. The file must be called config and placed in the directory .ssh/ in user's home: ~/.ssh/config. According to the example the content of the file should be:

Host victoria-pass             # this is as 'nickname' of the connection
    HostName victoria.org      # or use the IP address
    IdentityFile ~/.ssh/id_rsa # or provide the fill path to another key
    User tri                   # use the actual name of the remote user
    Port 1111                  # provide the actual port of the remote server
    # other parameters...

# setup each another Host in the same way...

Change the file permissions:

chmod 600 ~/.ssh/config

In addition, now you should be able to connect to each of these hosts by a command as:

ssh victoria-pass

The second example - sftp://tri@victoria.org:1111/home/tri - shows how to connect to a remote ssh (sftp) server without using predefined ~/.ssh/config file with a custom ssh port.

The main cons of this approach is that if the authentication file is not ~/.ssh/id_rsa you should provide it in advance by the command ssh-add. For example if the authentication file is called file.pem:

ssh-add /full/path/to/the/authentication/file.pem

I think you should do this every time when you restart the local machine, or you should include the above command in the ~/.profile file.

Usung gFTP

Here are the steps how to setup gFTP to use SSH keys.

In the FTP menu click on Preferences;
Go to SSH tab;
Fill the field SSH Extra Params with this value:

-o IdentityFile=/home/<your user>/.ssh/id_rsa

Change <user name> with your real username. Or use:

-o IdentityFile=~/.ssh/id_rsa

In gFTP's main window choice SSH2 as type of the connection;
Enter the target Host name, or IP address;
Setup the SSH Port of the target machine (if it's not the default - 22);
Enter User for the SSH connection;
Enter your SSH key's Passphrase (if there is some);
Hit Enter.

Using SSHFS

You could mount a remote directory (or the entire file system) via the command-line tool sshfs. Then you could manipulate it "locally" as you wish. This is my preferable way. Let's assume the mounting directory is ~/mount and you want to mount the remote user's home directory:

sshfs user@host.name.or.ip:/home/<user> /home/<local-user>/mount/

Or if you have created ~/.ssh/config file:

sshfs host-name:/home/<remote-user> /home/<local-user>/mount/

In addition you could create also /etc/fstab entry - references:

How to convert sshfs command to fstab entry?
sshfs is not mounting automatically at boot, despite /etc/fstab configuration

Convert the PPK Key

Please note if you are previously have used PPK key, which means PuTTY Private Key, you should convert it because, unlike CloneZilla, the above tools can't read this format. For this purposes you should use the tool puttygen that is a part of the package putty-tools:

sudo apt install putty-tools

Now you can convert the key in this way:

puttygen input-key-filename.ppk -O private-openssh -o output-key-filename.pem

Thanks to @steeldriver for this note. Here is the source and few additional references:

How to convert Filezilla PPK to openssh sftp compatible key
How to convert PuTTY's .ppk to SSH key
How to convert .ppk key to OpenSSH key under Linux?
How to SSH Ubuntu from Windows via PuTTY, using key

According to the security

While all approaches use the same method of connection - SSH - the security that they provide should be equivalent. From Wikipedia:

  Secure Shell (SSH) is a cryptographic network protocol for operating
  network services securely over an unsecured network... SSH provides a secure channel over an unsecured network in a
  client-server architecture, connecting an SSH client application with
  an SSH server...

  The encryption used by SSH is intended to provide confidentiality and
  integrity of data over an unsecured network, such as the Internet... SSH uses public-key cryptography to authenticate the remote computer
  and allow it to authenticate the user, if necessary...

  One way is to use automatically generated public-private key pairs to
  simply encrypt a network connection, and then use password
  authentication to log on...

  Another is to use a manually generated public-private key pair to
  perform the authentication, allowing users or programs to log in
  without having to specify a password. In this scenario, anyone can
  produce a matching pair of different keys (public and private)...


ip link set wlp3s0 up

...or down, of course.

Please see: https://p5r.uk/blog/2010/ifconfig-ip-comparison.html


How to pernamently change MAC address on ubuntu server 18.04?

I would recommend to create a udev rule which resets the mac address for you on each reboot.

Create file /etc/udev/rules.d/75-mac-spoof.rules with following content:

ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="XX:XX:XX:XX:XX:XX", RUN+="/usr/bin/ip link set dev %k address YY:YY:YY:YY:YY:YY"

Let me know if it helps.


Combine multiple screens to one large screen

There is only one workaround I figured out so far for video playback over several screens:

Install KDE plasma
Go to System Settings => Window Management => KWIN Scripts => enable Video Wall

Since this is only a workaround (because it relies on using KDE), still looking for the right answer.

Also read a lot about Nvidia Twinview, but was not able to enable it somehow...


"No media found" bootloader totally messed up

Given that Boot Repair hasn't helped, I recommend you try the USB flash drive or CD-R version of my rEFInd boot manager. (You'll need to disable Secure Boot, at least temporarily, to get it to boot.) If rEFInd can boot both Windows and Ubuntu, try installing it using the PPA or Debian package. If that works, then great; but if the system boots straight to Windows after you restart, you may need to perform an ugly hack that involves renaming boot loader files. Instructions for rEFInd on how to do this are in the rEFInd documentation.


Touchpad stop working but it seems enabled

Try i8042.nopnp as a kernel parameter at boot. If it works save it permanently in your /etc/default/grub file. Don't forget to run sudo update-grub afterwards.


syntax error when installing auth_mellon module on Apache

Try:

# apt-get install liblasso3 liblasso3-dev
# apt-get install libcurl4-openssl-dev
# aclocal
# ./autogen.sh
# ./configure
# make
# make install

It works on Ubuntu 16.04


tpm_crb MSFT0101:00: can't request region for resource

First, try to disable tmp security on bios option. then you can see the message like this.

/dev/sda2: recovering journal
welcome to emergency mode! After logging in, type "journalctl -xb" to view
system logs, "systemctl reboot" to reboot, "systemctl default" or ^D to
try against to boot into default mode.
Give root password for maintenance
(or press Control-D to continue):

The message was decreased.

Second, press your root password on this screen. You can login root. And then

root@blahblah: vi /etc/fstab

Remove the line of sda2 and save.

Third, reboot!


Can't boot into Windows 10 after installing Ubuntu 15.04

You've installed Ubuntu in MBR boot mode (aka "BIOS") and Windows in UEFI mode. Both are mutually exclusive.  So you should delete Ubuntu and install it in UEFI mode, or delete Windows and install that in MBR mode.

Sorry to be the harbinger of bad news.

(I've deleted Windows for more then a year now an am running on Ubuntu 14.04LTS)


Making bootable Windows Server 2016 installation USB stick

Last time I had problems making USB with 64 bit Windows, the dd command helped:

First unmount the drive:

sudo umount /dev/sd<?>

Then write the iso to /dev/sd? drive, replace question mark with your usb drive letter from lsblk command.

sudo dd bs=4M if=input.iso of=/dev/sd<?> conv=fdatasync


Find out if the OS is running in a virtual environment

count=$(lshw | grep -i vmware | wc -l) ; if [ "$count" -gt 0 ] ; then echo "disable ntp" ; else echo "enable ntp" ; fi

Obviously change the echo's to the commands you want.

Note: this will only work for VMware.  You'll need to make that grep -i "vmware\|virtualbox\|xen" or something similar (look at the lshw output on virtualbox or xen to see what the exact strings are) if you're using different virtualisation systems.


Force PC to calculate equation to infinite decimal places?

bc <<< 'scale=100;22/7'

bc is Best Calculator and is normally installed on ubuntu

scale=<num> means the number of digits you want after the comma
22/7 you calculation

found here:
https://unix.stackexchange.com/questions/40786/how-to-do-integer-float-calculations-in-bash-or-other-languages-frameworks


Landscape is missing user information in web interface

You will have to check the client logs on those machines, under /var/log/landscape. Something prevented landscape from reading /etc/passwd.

Could also be that that computer is not exchanging correctly with the server. Are other pieces of information about it correct, like installed packages?

Grep for "consecutive error" in the message-server.log files on the server, under /var/log/landscape-server.


Trying to ssh root, why get permssion denied in 16.04?

In Ubuntu, the default SSH policy is "Deny root login via SSH directly, except by SSH Key Authentication only."  This is done by the PermitRootLogin without-password line of /etc/ssh/sshd_config.

You can enable root password login over SSH by changing that line to say PermitRootLogin yes.  However I must caution you - this permits brute forcing attempts over the Internet of the root password which puts your server at risk - you may wish to consider blocking all SSH traffic except from known "good IP sources" of which you trust the source IPs in order to reduce the chance of being brute-forced on the root login.  Where this is not possible, you should strongly consider setting up SSH key authentication for the root account instead of password authentication.


The logs are located in /var/log/maas/ on your MaaS server.

The main log to check is /var/log/maas/maas.log


i just install ubuntu 12.10 and my wirless adapter isn't working

With a temporary wired ethernet connection, open the terminal and do:

sudo apt-get install linux-firmware-nonfree
sudo modprobe -r b43 && sudo modprobe b43

Detach the ethernet and your wireless should now be working.


Touchpad won't drag anything on a Pavilion dv7t-5000

On my laptop and netbook, to drag a window, tap twice on the title bar and hold the second tap.


How can I get awesome wm to recognize ~/.config/awesome/rc.lua?

Ok, I figured it out. Debugged it using Xephyr.

Basically, I figured out that if there's an error in rc.lua, awesome rejects it and loads the default rc.lua from /etc/xdg/awesome. The trouble is, those errors don't often affect awesome -k, which still shows "Syntax OK!". Debugging using Xephyr, though, while a pain to set up, allows you to see more verbose error messages and pinpoint the problem. For me, I was missing a command that rc.lua refers to, a compositor. Installing the compositor fixed the problem.


Delay when using JACK & Guitarix to record bass guitar

Try using jack_capture instead of audacity to record.

sudo apt-get install jack_capture


Fix pavucontrol Alsa mixer with creative card

Use this tutorial :
HOWTO: PulseAudio Fixes & System-Wide Equalizer Support

Do only Part A.

This should fix the Connection failed: Connection refused problem.

For the mono sound output (if the problem is still not fixed) I need more info on the audio card, there is a lot of Creative X-fi cards.

But first you can try to open pavucontrol and go to the Configuration tab and try differents profiles and see if one work better than the others.

I also found a bug that seem related ([SB-XFi - Creative X-Fi] digital output only in mono) but it should be fixed already, so try to activate the backports repositery : open Synaptic, go to Settings->Repositeries and to the Update tab and then check "Unsupported updates", close the window, reload in Synaptic and then update all your packages.


Ubuntu doesn't start after login screen, can't access shell

So I finally managed to solve my problem.
I could get into recovery mode by pressing Esc while starting my computer. I landed in the wrong menu because of pressing it too often, so just pressing it very slowly solved this. From the grub menu I started recovery mode. Then I chose options grub and network to be able to use the Internet. Then I started a root shell session.
Afterwards I followed the answer provided to this question.
I'm pretty sure my problem was that ubuntu-desktop must have been removed by my purging of all nvidia modules before I installed the new driver in the first place.

After a reboot my system was working again and I could install a nvidia driver again using

sudo ubuntu-drivers autoinstall

(which is the same as before, so I really think it had to do with ubuntu-desktop).


I would say that your best bet is to search around and see what devices other people have installed ubuntu onto. Also, you can possibly get in contact with each of those people and inquire them about what problems they experienced. Learn from those who tried it before you.


I think you're misunderstanding the meaning of the carat (^) line anchor - it does not mean 'look for a pattern starting with the following regex', it means 'look for a line starting with the following pattern' - which will of course not match any of your listed filenames, because the 001 ... 003 comes part way through the name.

What you are probably thinking of are Perl's lookaround constructs - for example, to limit your match to the portion of the name after the first 3-digit sequence, you can use a (?<=\d{3}) lookbehind. Similarly, to limit the match to the portion before the .cbr suffix you could use the lookaheaad (?=\.cbr). Finally you could match any characters between the lookbehind and the lookahead i.e. .*, and replace them with nothing:

$ rename -nv 's/(?<=\d{3}).*(?=.cbr)//' *.cbr
Injustice - Gods Among Us 001 (2013) (Digital) (K6 of Ultron-Empire).cbr renamed as Injustice - Gods Among Us 001.cbr
Injustice - Gods Among Us 002 (2013) (Digital) (K6 of Ultron-Empire).cbr renamed as Injustice - Gods Among Us 002.cbr
Injustice - Gods Among Us 003 (2013) (Digital) (K6 of Ultron-Empire).cbr renamed as Injustice - Gods Among Us 003.cbr

Note that there are usually several different ways to match and rename a particular set of files - I'm not sure this is the most efficient or robust however I hope it illustrates what I think you were shooting for.


How can I make a bootable, unattended USB restore disk?

Shellscript

I have enjoyed making a bash shellscript, that can do its thing automatically in installed as well as in persistent live Ubuntu based systems and also in a small '9w' system based on Debian Jessie. I hope it will be useful for you, as well as for other people in the future.

The script assumes that there should be two writable drives (mass storage devices), the live drive and the target drive. Do not use toram, it will spoil the identification of the live drive.

The shellscript calls dus-live, which is an executing part of mkusb. So it is replacing the interactive shellscript dus.

dus-live can manage the following kinds of source files,

file.iso
file.img
file.img.gz
file.img.xz

and the target system can have both MSDOS and GUID partition tables (when the target drive is bigger than the size of the original system in the image).

I used the name autoclone:

#!/bin/bash

# Date        Sign     Comment
# 2017-06-30  sudodus  Created
# 2017-07-01  sudodus  checking that there is 1 possible target drive

wait=30

read -t "$wait" -p "WARNING: After $wait seconds '$0' will CLONE AUTOMATICALLY;
from the file given as parameter to the first detected drive
(except the live drive), so it will be overwritten.
If this is not what you want or if you are not sure, PRESS {ctrl + C} NOW !
...
"

function power_off {
read -t "$wait" -p "WARNING: After $wait seconds '$0' will POWEROFF automatically;
If this is not what you want or if you are not sure, PRESS {ctrl + C} NOW !
...
"
sudo poweroff
}

user=$(whoami)
if [ "$user" != "root" ]
then
 echo "run $0 with sudo or as root"
 exit
fi
if [ "$1" == "" ] || ! test -s "$1"
then
 echo "Usage:   sudo $0 <with an iso file or image file as parameter>"
 echo "Example: sudo $0 \"file.iso\""
 echo "Example: sudo $0 \"file.img\""
 echo "Example: sudo $0 \"file.img.xz\""
 exit
fi

source="$1"

livedrive=$(lsblk -lo name,type,mountpoint | \
grep -m1 -e /$ -e /cdrom$ -e /lib/live/mount/medium -e /lib/live/mount/persistence)
#echo "$livedrive"
livedrive=${livedrive:0:3}
echo "livedrive=/dev/$livedrive"

number_of_targets=$(lsblk -ldo name,type|grep -v "$livedrive"|grep -v zram|grep disk|wc -l)
           target=$(lsblk -ldo name,type|grep -v "$livedrive"|grep -v zram|grep disk)

#echo "target=$target"
# echo "number_of_targets=$number_of_targets"
# sudo lsblk -o name,model,size,type,fstype,label,mountpoint | \
#  grep -v "$livedrive"|grep -v zram| grep -v loop|grep -v ' rom '
####

if [ $number_of_targets -ne 1 ]
then
 echo '--------------------------------------------------------'
 sudo lsblk -o name,model,size,type,fstype,label | \
  grep -v "$livedrive"|grep -v zram| grep -v loop|grep -v ' rom '
 echo "$number_of_targets possible target drives found, but
1 possible target drive should be found
for '$0' to work correctly."
 if [ $number_of_targets -gt 1 ]
 then
  echo "--------------------------------------------------------
- Please remove every other possible target drive!
- Or are you running in the wrong computer?"
 fi
 echo "--------------------------------------------------------"
 wait=60
 power_off
 exit
fi
target=/dev/${target:0:3}

echo "target=$target"

umount "$target"?*

paramfromfile=$(mktemp)

echo "$source
$target" > "$paramfromfile"

# do it with dus-live, which comes with mkusb version 12-

echo "calling 'dus-live' ..."
dus-live pff:"$paramfromfile"

power_off

Tested in persistent live systems

I tested that it works in two persistent live systems, which can be installed from compressed image files,

phillw.net/isos/linux-tools/uefi-n-bios/dd_Lubuntu_16.04.2_i386_persist-live_mkusb-12.1.4_7.8GB_msdos-pt.img.xz (880 MiB)
phillw.net/isos/linux-tools/9w/9w-dus_debian-jessie-i686-persist-live_2017-06-07_4GB.img.xz (362 MiB)

See more details about this method at this link,

Compressed image file with a persistent live system

Autostart

This script can be autostarted, when the following line is appended to autostart, in Lubuntu via the following command,

echo 'xterm -fa default -fs 12 -title autoclone -e sudo /home/lubuntu/autoclone dd_no-biggie-68MB.img.xz' >> ~/.config/lxsession/Lubuntu/autostart

Modify it to match with the actual 'dd' image /path/name and the actual location of the shellscript.

The corresponding command in 9w is

echo '@xterm -fa default -fs 12 -title autoclone -e sudo /root/autoclone /root/dd_no-biggie-68MB.img.xz' >> ./.config/lxsession/LXDE/autostart

Your own custom system

You may want to or have to create your own custom system (live, persistent live or installed in a USB drive or a memory card). You can probably replace dus-live with a simple dd command line, at least if the system you want to install uses the MSDOS partition table.

Disclaimer

This shellscript was made rather quickly, it works as tested by me, but there are many cases that are not tested, and unexpected things may happen. So please test it, where there is no drive with valuable data, that might be overwritten.

Screenshots

Three screenshots of Lubuntu

During the first 30 seconds you can use the hotkey combination ctrl + C to stop autocloning,

Console output: at this stage the system is syncing (flushing the buffers to the target drive),

During 30 seconds you can use the hotkey combination ctrl + C to avoid poweroff (if you wish to stay in the Lubuntu desktop session),

A corresponding screenshot of 9w


How to install R on Ubuntu 16.04 Xenial?

We need to add R repository, then install packages  from it:

3.4.4

cat <<EOF | sudo tee /etc/apt/sources.list.d/r-cran.list
deb https://cloud.r-project.org/bin/linux/ubuntu xenial/
EOF
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

sudo apt-get update
sudo apt-get install r-base r-base-dev

4.0

cat <<EOF | sudo tee /etc/apt/sources.list.d/r-cran.list
deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran40/
EOF
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

sudo apt-get update
sudo apt-get install r-base r-base-dev

Download RStudio from official site, for example, version 1.2.5042, and install it with gdebi:

wget https://download1.rstudio.org/desktop/xenial/amd64/rstudio-1.2.5042-amd64.deb
sudo apt-get install ./rstudio-1.2.5042-amd64.deb


There are a few options in here https://www.linuxuprising.com/2018/06/fix-no-sound-dummy-output-issue-in.html. Option #1 worked for me when I had a similar issue in 19.10.


'Go to page' keyboard shortcut in Evince 3.10.3?

The shortcut to focus the page entry should be CTRL + L. That's what it is for evince 3.4.0, at least.


Remember all of operations are dangerous and you could damage your system.  You don't say what /dev/sda2 and /dev/saa3 are used for or whether they are mounted.

If you could delete the existing logical volume(s) you could create two new logical volumes in your existing volume group. That would be easy.

If you need to preserve the existing logical volume you would need to create a new logical volume within the same volume group.

To use the existing partition and volume group you need to:

reduce the size of the file system in the existing logical volume,
reduce the size of the logical volume,
create a new logical volume
make a files system in your new logical volume
copy your files into your new logical volumen and mount it

Where X is the size you want to reduce the existing logical volumes to, vg=your volume group and lv= your logical volume make sure you have enough empty space in you existing logical volumes that you can reduce the size. Be very careful and try it on something you can afford to mess up before doing it for real. These are very dangerous with live files systems make sure you have backups.

 umount /dev/mapper/vg-lv
 fsck /dev/mapper/vg-lv
 resize2fs /dev/mapper/vg-lv (X-1)G
 lvreduce -L XG /dev/mapper/vg-lv
 resize2fs  /dev/mapper/vg-lv (to fill up the lv)
 lvcreate -l 100%FREE -n lv-var vg
 mkfs -t ext4 /dev/mapper/lv-var

You will then need to copy the contents of var into you new logical volume, edit fstab and restart the system.

Another approach would be to reduce the size of your primary partition /dev/sda1 and create a new partition /dev/sda4.

to do that you would need a live session then

reduce the size of the file system  in /dev/sda1
reduce the partition size
create a new partition in the unallocated space.
create a new file system in the new partition

The tools to do that are generally resizefs parted to shrink the partition and create a new one and  mkfs to make the file system.

I'll leave the details of that to others. It is also very dangerous.


Gparted, fdisk with reference to Install

While I do not know the answer to my question. I have resolved the underlying problem.

The solution to this problem:
   1.  backup the partition information [  sfdisk -d /dev/sda > sfparts.txt ]
   2.  Using gparted /dev/sda, under the device tab, I used the create partition table entry
   3. At this point both gparted and fdisk showed the same single partition
   4. Using  [ sfdisk /dev/sda < sfparts.txt ] i restored the partition entries
   5. Both gparted and fdisk had exactly the same view of the existing partitions

In the install process, I was able to delete some partitions, create new partitons, create the filesystems and then complete the basic install

thank you to those who responded


Te correct path to add and apply themes in user level is just ~/.themes directory (in your home directory). Did you try that?


It creates the folder because you use the -r argument. You can leave that out if you don't want it in a folder.

Furthermore, it could be simplified:

#!/bin/bash
echo ""
echo "epg update"
echo ""
wget http://website.com/guide.zip
unzip -o guide.zip -d /home/disk2/TEMP/

If you still get the error, you might want to check if /home/disk2/TEMP/ is the right directory. Normally this path would indicate you have a user named disk2.


I would use the software centre and see if it would not let me remove and or install the same package again.
Reboot your system before to stop all the processes that might run in the background
Add a comment to reply.


Fingerprint device not detected Ubuntu 20.04.1 on HP Spectre x360 13 (late 2019)

There's a thread! on the HP forum that has an comment with a script that can show you if it is a acpi device. I'm searching for a FP solution for my HP Envy x360 but haven't found one yet. From what I've read so far, it sounds like there may not be a solution for using the FP scanner on Linux yet.


You can't run bash commands like that.  Bash expects a file (a shell script) .as its argument.

You might be able to run the desired command like this:

*/5 * * * * bash -c "cd /home/jclark/scrips/ipcheck/ && ./ipCheck.sh"

Note the -c and the quotes around the commands you want to execute.

I think that what you actually want is:

*/5 * * * * /home/jclark/scrips/ipcheck/ipCheck.sh

... and the script should contain:

#!/bin/bash
curl http://api.externalip.net/ip/ -o /home/jclark/scripts/ipcheck/ipRecord.txt


Tomcat and Eclipse Integration Error: "Unknown version of Tomcat was specified."

I suggest installing standalone Tomcat into /usr/local instead of using the one in /usr/share directory.

cd ~/Downloads
wget http://apache-mirror.rbc.ru/pub/apache/tomcat/tomcat-7/v7.0.52/bin/apache-tomcat-7.0.52.tar.gz
tar -xzf apache-tomcat-7.0.52.tar.gz
sudo mv apache-tomcat7.0.52 /usr/local/apache-tomcat7.0.52

Then use /usr/local/apache-tomcat7.0.52.


Alt-gr (right alt) key does not work to edit text in Wine

On a forum in Spanish I found the same problem with an answer saying:

  go to Menu > System > Preferences > Keyboard > Layouts there you choose your keyboard and your layout and other options such as using the AltGr, then you hit Apply System Wide.

In Xfce I could not replicate the exact steps, but what I did was:

Under Menu > Settings > Keyboard (that is xfce4-keyboard-settings), under the Layout tab, I unchecked Use system defaults, selected the keyboard layout, and then set Alt Gr under Compose key.

After a while, even without logging out, this solution stopped working, so I looked at the Keyboard Layouts properties (the Xfce panel keyboard applet, xfce4-xkb-plugin) and made the same setting there. Now it works even if the previous setting (in xfce4-keyboard-settings) is removed.

The two settings seem independent, but  the one that prevails in Xfce is that of the xfce4 panel applet. (The same is true for switching layouts: Alt-Shift was set and working for a long time in the xfce4-xkb-plugin while in xfce4-keyboard-settings this setting was absent. -- I leave the first part of the answer for reference and for possible use in other desktop environments.)

(In Xfce and LXDE, there are cases where different apps are not completely integrated under a unified design, they handle the same or similar features, and it is not always clear if there is possible conflict or whether one prevails. Trial and error is the way here, starting by avoiding conflicting settings.)

On the subject of the two Xfce applications handling the same features, see this question.


Automatic updates not working in Lubuntu 16.04?

Maybe I messed something up when I was testing some stuff before  and also tried a bunch of different  methods to do auto updates.. So yesterday I did a new clean install of Lubuntu and never even started the GUI update manager then turned off the laptop. Today I started it up to do some web browsing and after a while maybe half an hour I noticed the hard drive started working, I checked the process monitor and it was updating! Did not get any notifications and when it was done it did not ask for reboot so everything went completely seamless in the background. Then I ran apt-get upgrade just to check and indeed all updates have been installed. FYI my full .bash_history file has these commands:

sudo apt-get purge firefox
sudo apt-get purge firefox-locale-en
sudo apt-get purge firefox-locale-sv
sudo apt-get install pavucontrol
sudo apt-get install chromium-browser
sudo apt-get install unattended-upgrades
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
echo gtk-recent-files-max-age=0 >> ~/.gtkrc-2.0

So after all it now seems to work well even with firefox and ubuntu-desktop removed. I also like that it was delayed  a while after booting up and guess this is intentional :)


Make sure you have root privilege.

Try:

sudo -H gedit /etc/file.txt


What might "automatically install security updates" change on a server?

What might “automatically install security updates” change on a server?

Any package that is in a repository that ends in -security. Unattended updates are logged at /var/log/unattended-upgrades and /etc/apt/apt.conf.d/50unattended-upgrades is used for the configuration of unattended upgrades.

  -security includes only updated packages that contain security-related fixes, and are built to not require anything from "-updates". Anything built for "-security" is built on top of which ever version of a package is newest between "-updates" and "-security", so that nothing in "-security" will introduce bug regressions.

  Might my kernel automatically be upgraded without my input?

Kernels are added to the system so you keep the old kernel and a new one is added (where you can pick at grub what kernel needs to be loaded). You will not get a major point release kernel through security updates. Only minors.


Partial solution

I've booted into old kernel version (3.19.0-15 to be exact) and wifi is back to normal! No disconnects while watching video, no disconnects while downloading files, everything works!


Error while running bash script that moves files

I'm sure you've already come across them already, but the two best places to begin with learning bash scripting are the Bash Guide for Beginners and the Advanced Bash-Scripting Guide. If you haven't seen these two resources yet, I would highly recommend bookmarking them if you're looking to do further bash scripting.

Removed portion regarding flow control due to edit in question. The find command needs -exec before the command or else it won't know that mv is actually a command you're attempting to execute on the files. Also, the {} in the find is used to refer to the results of the find command, thus you won't need $source as part of the find. The find command would probably look more like:

find $source -mtime +$days -exec mv {} $destination \;

If the find results will include files/directories with spaces in them, then you may need to loop through the results (which will bring the do/done back into the mix) so that you can include the results of the find in a variable that can then be enclosed in quotes. That will give a structure similar to the following:

for result in $(find $soure -mtime +$days)
do
    mv "${result}" $destination
done

If you're still having problems, I'd suggest including a copy of your terminal window from running the script. Also, try running just the find command by itself without the -exec mv... portions and replacing the variables with what you'd normally fill in for them during the script execution. That way you can get an idea as to what the find command is matching so you can be certain that it's matching the files you want it to before making any changes to the location of your files.


Connecting remotely from Ubuntu to another linux

If you don't have problems with closed source, you can use teamviewer.

To download for ubuntu:
64bit from here
32bit from here

To download for SUSE:
From here

If both systems have real IPs ot lay on the same network you have chunk of options like VNC, XRDP, X11RDP, Nomachine NX, FreeNx and many others


After installing Ubuntu, Windows still thinks it has the full disk for itself

Windows should 'check the disk'

Boot into Windows and run

 chkdsk /f X:

where X: is the partition with the Windows operating system, often but not always C:

This will not really be done until you reboot (and it will run in the boot process before Windows starts).


Is it necessary to reboot after changing group membership?

You are not required to reboot the system but you have to log out and log in again. Group membership is evaluated at login time only.

If you are in a situation in which logging out and back in is inconvenient (for example, an SSH session) then you can just spawn a login subshell with su - <user> (or equivalently su -l <user> or su --login <user>) but it will work only in that subshell.
(thx to steeldriver for pointing this out).


Ubuntu Server 18.04 doesn't boot without monitor connected

Ubuntu (or any Linux for that matter) doesn't care if a monitor or keyboard is connected. The BIOS however does care. So you need to disable the wait/ask for keyboard settings in your BIOS


It's not so difficult as it seems. You have to create the ~/.screenrc file with that line inside:

bindkey "^Z" detach

But, you'll loose the job control feature inside the screen unless you bind another key combination for the suspend (Ctrl+K in this case):

$ stty susp ^K


Java Script functionality not working in firefox on linux

First make sure you have enabled Javascript in Firefox. You can check that setting in one of following ways:
A. From Firefox menu go to :
Edit > Preferences > Select "Content" tab
Default (and preferable) settings would be

B. Using about:config
Enter about:config in address bar and then type javascript in the filter section. The preference name "javascript.enabled" should have true as its value. If you are not clear look at following screenshot.

If you have above-mentioned settings as they are (i.e. in their default configuration), make sure you have NOT enable any script blocking Add-ons (like "No Script") to Firefox.


Is Ubuntu running all users at the same time?

There is not a way to do this currently with Ubuntu's Unity interface. See this related question for a possible solution.

How could Unity2D save sessions?

It is unreliable in Ubuntu Gnome. There is a bug here, which is marked as "Fix Released," but seems to not be fixed. See this related bug if you want to try it.


Can't view output of command because of incorrect colors

You can do that from your .gitconfig.

You can enter things like:

[color]
  ui = auto
[color "branch"]
  current = yellow reverse
  local = yellow
  remote = green
[color "diff"]
  meta = yellow bold
  frag = magenta bold
  old = red bold
  new = green bold
[color "status"]
  added = yellow
  changed = green
  untracked = cyan

and choose any colour you want from normal, black, red, green, yellow, blue, magenta, cyan and white.

You can even (optionally) add a second colour as the background; and / or add bold, dim, ul, blink and reverse.

Taken from https://nathanhoad.net/how-to-colours-in-git/


How do I use Boot Repairs Manager without internet connection?

It requires internet probably because it needs to download some GRUB packages.

See https://answers.launchpad.net/boot-repair/+question/218370


Unusual hidden files in $HOME on Ubuntu 14.04.4

These particular folders and folders are probably not essential to your computer's day to day running, files in 'dot' folders of $HOME are for the most part related to user configuration rather than the running of the system. There are some exceptions but these do not appear to be those.

However to be totally sure back up the folders as follows:

mv -v ~/.deps ~/.deps_bak
mv -v ~/.chewing ~/.chewing_bak

Now one of 3 things might happen:

Nothing at all will happen: after a while you can safely delete the folders and their contents
The folders and their contents will be silently recreated: therefore you have demonstrated that you do need these folders
An application will complain that configuration files are missing: you obviously need these folders which can then be restored as follows:

mv -v ~/.deps_bak ~/.deps
mv -v ~/.chewing_bak ~/.chewing

This is a conservative but safe approach...


are you able to access a TTY?

if yes which would be control + alt+ F1 through F6

upon reaching a TTY follow this

sudo passwd root
(enter new password)
if that doesn't work try sudo passwd yourusername
(enter new password)
if none of these work, only option I know would be a reinstall.

best of luck -Larry


Install package to specified directory, e.g, some where under /home

You can not do that with sudo apt-get install.

Either...

Get a bigger disc.
If the disc has more operating systems re-partition such that Ubuntu has at least 10Gb. Ubuntu works perfectly fine with 10Gb. I have never even reached that (and I use both apache and mysql on my system where mysql does not use my ssd for the databases ;) )
Re-install your system such that the directories where software is installed are mounted on the other (500Gb) disc (like /home is mounted in your 2nd disc you can also mount /etc/, /bin/ on that disc).
Install all software manually from source. But this will not help when installing the base system and all its default software.

Alternative:

you could also switch to another operating system. Redhat has an option (--relocate) in their package system where you can set where to install. So does Gentoo (prefix; but entoo installs from source so this is not a package manager).


Very High CPU usage (100%) from just browsing the Web

Little bit late on this one, but I'll almost guarantee its a flash issue, look for npviewer.bin processes (attached to Chrome or Firefox processes), and kill it/them.  I've had it for a long while and seems to be consistent across all browsers when Flash plugin is in use.

I've noticed certain sites are much worse than others, and it'll usually be one tab that's causing it.

Hope this helps!

P.S Anyone know a fix to this issue?? I'm assuming as its flash, its closed and nothing can be done, but there must be a fix somewhere down the line!


Where do i extract strcasestr.3.gz to for gcc, gnu compiler on ubuntu 18.04?

The link @steeldriver posted suggested adding #define _GNU_SOURCE above all #include declarations. This was the solution to using the strcasestr() function in a c program.


Cannot see 5GHz networks and have terrible WiFi range, used to work in Win10

First we will backup the existing modules
sudo mv /lib/modules/$(uname -r)/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko.bak
sudo mv /lib/modules/$(uname -r)/kernel/drivers/net/wireless/iwlwifi/mvm/iwlmvm.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/iwlwifi/mvm/iwlmvm.ko.bak
Then we can install some packages to get the source code and compile
sudo apt-get install git built essential
git clone https://github.com/jeremyb31/intel-4.10.git

cd intel-4.10/iwlwifi
make -C /lib/modules/$(uname -r)/build M=$(pwd) clean
make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
sudo cp iwlwifi.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko
sudo cp mvm/iwlmvm.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/iwlwifi/mvm/iwlmvm.ko

Then we disable wireless power management

sudo sed -i 's/wifi.powersave = 3/wifi.powersave = 2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

Reboot

I would also send an email to ilw@linux.intel.com explaining about this chipset being identified in the linux kernel as a non dual band chipset, send the lspci results that you added to the question

If this works, commands after a kernel update do
cd intel-4.10/iwlwifi
make -C /lib/modules/$(uname -r)/build M=$(pwd) clean
make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
sudo cp iwlwifi.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko
sudo cp mvm/iwlmvm.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/iwlwifi/mvm/iwlmvm.ko
And then reboot for it to work in the new kernel


Blender scripts will go to /usr/lib/blender/scripts/addons/
P.S.-which is the command for finding the path of the executables. e.g. which blender. However, if you have Synaptic package manager, it's easy to find all installed files by going to package-properties > Installed Files. And also Ubuntu package search ;)


apt tries to connect to proxy server even without an apt.conf file

Maybe your systemwide proxy is still on? Go to the "Network" dialog under "Settings", and ensure that the proxy is off.

As long as the systemwide setting is there, APT looks for a proxy.

Another thing you may want to try is running export http_proxy='' in bash before running aptget, and ensuring that you have Defaults keep_env http_proxy in sudo visudo before running apt-get


Lenovo Legion Y520 - Strange Fan speed Fluctatuion at low load with low temp

I solved my problem with the following steps:

I cleaned the laptop
In nvidia-setting -> PRIME Profiles, I changed NVIDIA (Performance Mode) to NVIDA On-Demand
Restarted the laptop for changes to take effect.

And The laptop now is soundless with low fan speed.
Note
I had to wait a few minutes after applying the solution for the laptop to cool down and the fans to rotate at low speed.


Should I use a separate 'admin' user as my "root sudo" or grant sudo to my 'app' user?

Full sudo permissions should be reserved for actual human users. A user in whose context you plan to run network services primarily doesn't need those. You can also think about disabling the password and login shell for such a purely "virtual" user, by blanking the password field in /etc/shadow and settind the shell in /etc/passwd to /bin/false.

Creating separate users for services, app users, as you call it, is a common technique.


Ubuntu 18.04 / Gnome 3.28 - How to change default Emoji Font (Noto Color Emoji) to different font?

After a long time, and switching to manjaro too, i came upon this problem again, however now i have a solution

you will need to edit 3 different files, replace Blobmoji with whatever Emoji-Font you want to use

first file: /etc/fonts/conf.d/60-generic.conf

find the part of the file where it will list off all emoij font options, something like

<alias binding="same">
    <family>emoji</family>
    <prefer>
        <!-- System fonts -->
        <family>Blobmoji</family> <!-- Custom -->
        <family>Noto Color Emoji</family> <!-- Google -->
        <family>Apple Color Emoji</family> <!-- Apple -->
        <family>Segoe UI Emoji</family> <!-- Microsoft -->
        <family>Twitter Color Emoji</family> <!-- Twitter -->
        <family>EmojiOne Mozilla</family> <!-- Mozilla -->
        <!-- Third-Party fonts -->
        <family>Emoji Two</family>
        <family>Emoji One</family>
        <!-- Non-color -->
        <family>Noto Emoji</family> <!-- Google -->
        <family>Android Emoji</family> <!-- Google -->
    </prefer>
</alias>

insert your choice of emoji font at the very top, like this

    <prefer>
        <!-- System fonts -->
        <family>Blobmoji</family> <!-- Custom -->
        <family>Noto Color Emoji</family> <!-- Google -->

this will give your emoji font top priority in replacing anything labeled "emoji"

next file is etc/fonts/conf.d/45-generic.conf

here you will find a listing of the same fonts again

<!-- System emoji -->
<alias binding="same">
    <family>Noto Color Emoji</family> <!-- Google -->
    <default><family>emoji</family></default>
</alias>
<alias binding="same">
    <family>Apple Color Emoji</family> <!-- Apple -->
    <default><family>emoji</family></default>
</alias>
<alias binding="same">
    <family>Segoe UI Emoji</family> <!-- Microsoft -->
    <default><family>emoji</family></default>
</alias>
<alias binding="same">
    <family>Twitter Color Emoji</family> <!-- Twitter -->
    <default><family>emoji</family></default>
</alias>
<alias binding="same">
    <family>EmojiOne Mozilla</family> <!-- Mozilla -->
    <default><family>emoji</family></default>
</alias>
<!-- Third-party emoji -->

insert your font at the very top again

<!-- System emoji -->
<alias binding="same">
    <family>Blobmoji</family> <!-- Custom -->
    <default><family>emoji</family></default>
</alias>
<alias binding="same">
    <family>Noto Color Emoji</family> <!-- Google -->
    <default><family>emoji</family></default>
</alias>

this will label any text thats written in your font with emoji

lastly its your local ~/.config/fontconfig/fonts.conf

this is mostly for firefox or other browsers, so they will display your desired emojis

append this at the end

<alias>
<family>serif</family>
<prefer>
  <family>Blobmoji</family>
</prefer>
 </alias>
 <alias>
<family>sans-serif</family>
<prefer>
  <family>Blobmoji</family>
</prefer>
 </alias>
 <alias>
<family>monospace</family>
<prefer>
  <family>Blobmoji</family>
</prefer>
 </alias>
 <match target="pattern">
<test qual="any" name="family"><string>Noto Color Emoji</string></test>
<edit name="family" mode="assign" binding="same"><string>Blobmoji</string></edit>
 </match>

this will give the serif, sans-serif and monospace fonts access to the custom font emojis

the last entry is specifically there, if any websites are specifying lists of emoji fonts instead of just using sans-serif, that the usual font will specifically be replaced by your custom font, in this case Noto Sans Color is given, you should choose the font at the highest position on the other 2 files that you have installed, chances are its also just Noto Sans Color

after fc-cache -f -v everything should be set


Plug in your USB stick, boot and enter BIOS with the USB still in.

Go to "boot" menu and you should be able to see your USB stick there. Move it to the top of the list, save and boot.

If you don't see your USB stick in BIOS check under hard disks. Some bioses treat a USB stick as an alternative hard drive. Again, move your USB to the top and boot.


Listing all human users and number of their processes

pgrep can print the number of processes for a given user, and xargs uns a program for every line of its input. Put that together with your ´awk` command:

(echo root; awk -F: '{if($3>=1000)print $1}' /etc/passwd) | xargs -i sh -c 'echo "{} $(pgrep -cu {})"'

I'm adding root manually to the output of awk. One could use

if($3>=1000 || $3==0)

in the awk command instead.


NFS users getting a laggy GUI expierence

You have system variables in pam so I would go with option 3.

Set the variable in /etc/security/pam_env.conf:

XDG_CACHE_HOME  DEFAULT="/var/cache/users/@{PAM_USER}/.cache" #or any other place

And make sure the directory exists in /etc/profile:

if [ "$USER" == "root" ]; then
  unset XDG_CACHE_HOME
else
  test -d $XDG_CACHE_HOME || mkdir -p $XDG_CACHE_HOME
fi


Problems while upgrading the kernel in Ubuntu 10.04 64 bit to 3.2 version

3.2 is only for Ubuntu 12.04 at the moment. You must wait until the kernel-ppa team backports it to 10.04. This will be sometime in mid-May.
You should remove the kernel from synaptic.

If you want to add newer kernel for your lucid setup, try the kernel-ppa. The latest kernel is 3.0.0-15 (the oneiric kernel). It is backported to work on lucid. (The precise kernel will be here also after the release)

    sudo apt-add-repository ppa:kernel-ppa/ppa
    sudo apt-get update

And open synaptic and you will find the new kernel metapackage. (On my 32bit system: linux-image-generic-lts-backport-oneiric )

But if you really need the 3.2 kernel, upgrade your ubuntu to precise. It runs quite good on my test machines.


Once you can boot in after changing to rw in GRUB, just edit the default GRUB config file to make it always rw.

You may also be able to do this instead (although it may not fix the problem, it won't hurt anything)

sudo grub-mkconfig -o /boot/grub/grub.cfg


During booting the following is coming "No bootable device -- insert boot disk and press any key" in LINUX latest Ubuntu version

It seems like your HardDisk is not recognized.  Boot from the Ubuntu LIVE CD and check for your hard disk, whether it is recognized.

Regards
PK


Can I uninstall my apps or packages on Ubuntu 20.04 perfectly?

It all depends on how you installed these programs.
If you have used APT, just run it:
sudo apt autoremove [package_name] [package_name] [package_name] [package_name] [package_name] [package_name] [package_name] [package_name]

Of course you can specify multiple packages separated by a blank space.
If you used Snap, you have to run:
sudo snap remove [program]

Finally, you should do a system optimisation with Stacer to remove a lot of unnecessary packages and files that take up space.
You can consult these posts as a guide, this one for uninstalling programs and this one for using Stacer.