What is the difference between 'test' and 'test.sh' while running shell scripts?

How shell executes commands:

From bash manual:

  If  the name is neither a shell function nor a builtin, and contains no slashes, bash searches each element of the PATH for  a  directory containing  an executable file by that name.

This means that functions and shell built-in commands take precedence first, and if there's none - it searches for the command in the list of directories that are specified in PATH variable.

Why  my 'test' command didn't work ?

What you encountered is test command which is a built-in command compatible with original Bourne shell in bash. This command is silent, and is used for simple logic, arithmetic evaluation, and string evaluation.  It is used in logic and if statements:

bash-4.3$ test 1 -le 2 && echo "1 is less that or equal to 2"
1 is less that or equal to 2
bash-4.3$ if test 1 -le 2 ; then echo "1 is less than or equal to 2"; fi
1 is less than or equal to 2

Note that test and [ exactly the same:

bash-4.3$ [ 1 -le 2 ] && echo "1 is less that or equal to 2"
1 is less that or equal to 2
bash-4.3$ if [ 1 -le 2 ] ; then echo "1 is less than or equal to 2"; fi
1 is less than or equal to 2

There's also /usr/bin/test which is among the standard utilities, and exist for portability and compatibility. If there was no test built-in in your shell, it would look through the PATH variable, and if /usr/bin/ happened to be before your ~/bin on the list - it would run /usr/bin/test. Here's an example of that:

bash-4.3$ enable -n test
bash-4.3$ PATH="$HOME/bin/:$PATH" test
I am ~/bin/test

Using enable -n command we turn off the built-in test, and run test temporarily with modified PATH such  my ~/bin is first on the list. The shell looks at the list, and finds my shell script ~/bin/test and ran it.

NOTE: please don't do this! The above example is for demonstration only ! This is not a good way to run your scripts and is not recommended. Use appropriate naming, never name your commands same as shell built-ins or existing utilities. You have been warned.

Why did test.sh work ?

What happened in your test.sh case is that there's no built-in or functions  called test.sh and therefore shell searched every directory in PATH list, until it found your test.sh file and ran it. That's why it works.

Does this behavior relate to file extensions ?

No. This has nothing to do with file extensions and in fact for most files extension is irrelevant. Shell cares for location of what you type in command-prompt, if it's a built-in or function or alias,  and if the file you mention has executable permissions set.

Additionally, it cares about appropriate #! line (which is more formally known as interpreter directive), because if you have shell script written say for C-shell but it doesn't have appropriate #! line at the top, and you try to run it with bash - the shell will try to run it but it will break due to incompatible syntax.

More generally, Linux and Unix-like systems mostly care about magic numbers which are first several bytes in a file that identify the file type.


How I can turn off unknown webserver (Apache probably)?

Well XAMPP is an all in one package which brings its own apache with it. But Ubuntu has all these packages in its main repository, so I would suggest you opt to use Ubuntu packages to setup your server (There are How-To's online, e.g. https://help.ubuntu.com/community/ApacheMySQLPHP)

Another option is to remove the Ubuntu provided Apache:

sudo aptitude purge apache2

You can then try to start XAMPP again and connect to your local webserver.


MAUI Keyword Extraction : Command not found

My guess is that you copied the command from a tutorial somewhere and included the $ from the prompt. Often, tutorials use $ to differentiate between the command you run and its output. The $ symbolizes the shell prompt that you get when you open a terminal. It should not be included in the command itself.  That's the error you would get if you ran:

$ java -Xmx1024m -jar maui-standalone-1.1-SNAPSHOT.jar train -l data/docs/fao_train/ -m data/models/keyword_extraction_model -v none -o 2

For example:

So, just run it again, but without the $:

java -Xmx1024m -jar maui-standalone-1.1-SNAPSHOT.jar train -l data/docs/fao_train/ -m data/models/keyword_extraction_model -v none -o 2


Cant connect to apache server on ubunu virtual machine outside the host machine

In order to connect to a VirtualBox instance, you will need to configure the network to use a "Bridged Adapter". This is done on the host as seen in the screenshot below:

Once this is done, boot the virtual machine and confirm the IP address that was assigned to it. You can do this with the ip command as seen in the example below:
$ ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 8c:16:45:06:86:49 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.110/24 brd 192.168.0.255 scope global noprefixroute enp0s31f6
       valid_lft forever preferred_lft forever
    inet6 2402:6b00:3ed9:f300:fc3f:a893:ec64:92ea/64 scope global temporary dynamic

Here I can see the VM has an IP address of 192.168.0.110. If I put this into a browser, then I will see a result from Apache.
If you are going to use SSL (port 443) with a virtual machine on a local network, you will likely need something that is self-signed or do a bunch of DNS busywork to use something from Let's Encrypt inside a self-contained network. You should be good with standard HTTP requests over port 80 unless you plan on exposing the virtual machine to the entire Internet.
Hope this helps you overcome some of the initial questions


It appears that you aren't even using Bash. Your ps output shows why:

$ ps
PID  TTY   TIME    CMD
4053 pts/0 00:00:00 sh
4055 pts/0 00:00:00 ps

Try running bash:

$ bash

and you should get this prompt:

something@somewhere ~:$

Now change it to be the default:

chsh /bin/bash

If the command is not found, you need to install bash:

sudo apt-get install bash

or use whatever steps are appropriate on your VPS to install packages(most likely this).


i had a problem very close to what your experiencing with my Asus X511ma. i was scratching my head over for days trying to figure out why i cant install any linux on my computer accept for arch-linux. then just by a fluke when i had pretty much lost hope for my computer, i updated my bios by downloading a new firmware and put it in a usb flash-drive. with the flash-utility option inside bios i updated and now get alot more options in bios. and could then change the OS Selection from 8.x to windows 7 and some other boot configuration. This solved my problem i can now install whatever linux i want. :D Hope this helpes somebody.


Why does the dock appear on the left when my screen is locked?

This should not happen under normal circumstances, as per GNOME's security policy, whenever you enter the lock screen all the extensions get disabled automatically until you get back in, and then the extensions get re-enabled. Somehow it's failing here for the Ubuntu Dock extension (gnome-shell-extension-ubuntu-dock) and so it's a bug.

Note: Bug reports are off-topic here.

As a temporary workaround either restart (or relogin to) your system or restart GNOME shell by pressing Alt+f2, then typing r and pressing Enter.


Synaptic touchpad, Ubuntu 15.10, multiple devices.... pain

The laptop is pretty much a XPS 9550. I've found using that for support queries is more helpful.

To fix the buggy i2c_hid device:

echo "blacklist i2c_hid" | sudo tee -a /etc/modprobe.d/blacklist.conf
sudo depmod -a
sudo update-initramfs -u
reboot

Taken from: http://ubuntuforums.org/showthread.php?t=2301071
Which has a bunch of other tips to help.

Alternatively, I've found if you fully shut down and power off between reboots, the trackpad works.


Could not calculate upgrade from Maverick Meerkat to Natty Narwhal

The key part of the error message you have reported is the following:

  Upgrading to a pre-release version of Ubuntu
  Running the current pre-release version of Ubuntu
  Unofficial software packages not provided by Ubuntu

Most often the error is due to PPAs still enabled - you should ppa-purge these repositories -

the format is

sudo ppa-purge ppa:[ppa-name]

where the [ppa-name] is the name of the repository defined in your software-sources screen.

I also note you have used the syntax do-release-upgrade -d.  The -d flag denotes upgrade to the latest available development release.

A simple sudo do-release-upgrade should be sufficient to upgrade to the next stable release of Ubuntu.


MySQL installation fails and root password cannot be set

Im not sure why your having this issue but it sounds like a privilege issue with your folders not able to save your setting, I would backup all important files you have and do fresh install because on a fresh install you get to setup all the passwords and complete lamp environment and your done and working in just over an hour. Hope that helps


Allow a user to change his password on a chrooted environment

My question is actually not yet solved, but I think I will desist from it. I just thaught that it is a bad idea to copy the files: group, group-, gshadow, gshadow-, passwd, and passwd-, and shadow to the new environment.

Instead of working with passwords, I guess I will try to solve this with authentication keys. So that the user can generate its own keys with some password, then I will load them to the server.

This approach is still not safe since the user will work ages with a key, but I guess I can invalidate them from time to time, ie: each 6 months.

For the interested: I didn't got the error: "Cannot determine your user name." anymore. Instead of it, I got:

passwd: Authentication token manipulation error
passwd: password unchanged

after having entered the current user's password. I figured out that some files weren't found on the chroot environment by doing this:

strace passwd

particularly I watched the paths on each stat(), read(), open(), connect(), access(), statfs(), and readlink() call. So, I copied some files or entired folders and linked/binded some devices. But I didn't got it working.

Anyway, I desisted of doing this for two reasons:

One of my objectives is to hide some parts of the system in the chroot. Howerver, if I had to copy lots of files from my main system, then what's the point of doing this?
I also think that duplicating the main password file my have some problems: you will have it on two different places: on your main system and on the chroot. So, if I get "passwd" to work, were will be the new password stored? I guess in the chroot copy, so, the next time the user logins, its password will be still the old one stored on the main passwd file, isn't it?

I'm just wondering how hosting companies solve this with their "shared hosting" programs. I have been customer of several of them and I can see that when I use the ssh access they offer, I only see a limited system; even the password file is not there. I think I only saw my home folder and some log files from my websites.


You might be missing gnuplot-x11. Try to install it. In the commandline, do this:

sudo apt-get install gnuplot-x11


Where can I find a Brother HL2140 64-bit driver?

Good timing, I got my Brother 2142 running this week. The main issue was printing blank pages without end (an old issue)..

This is how I did it.

download the deb driver (i386 still works for me with this). rpm is also available there (bottom of the page)

http://www.printercentrals.com/2015/03/brother-hl-2142-driver-windows-mac.html

sudo deb brhl2140lpr-2.0.2-1a.i386.deb

it picked my printer up as a 2140, and works ok
if you get a "specify the device URI" pick "no"

to cancel print jobs, or stop it printing off endless blank sheets - replace your

cancel -u <username>

and alternative is the installer tool
https://help.brother-usa.com/app/answers/detail/a_id/52188/~/install-drivers-%28deb-or-rpm%29-using-the-driver-install-tool---linux

sudo bash linux-brprinter-installer-2.2.1-1

type your model, 2140, when asked.


Your machine does not systematically boot on a live USB.
Enter your BIOS (at startup, use the button F2, or F8 or F10, or whatever (depends on your machine. I have an ASUS, for me it's F2).
You can there change the order of boot, by setting your favourite order. Or you can go to the last page, and use the Force boot option, by selecting your live USB.


How to Resize Ubuntu 17.04 Zesty Swap file size?

I wouldn't try to resize it literally. Probably it is possible - maybe gparted could to it - but I can't think of a reason to bother and it would be quicker and simpler to just make a new one. First turn off the current one:
    swapoff -a
Delete the old one, then make a new one however big you want, and turn it on. If you give it the same /path/name, you won't even need to change fstab, and you will have EFFECTIVELY, if not literally, enlarged the swap file. Somebody at Redhat here:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/s2-swap-creating-file.html

wrote this (I quote 'cause some fora frown on incorporation by ref, but the block quote button messes with the format, so I'm editing this to just paste it in plain):

# # # QUOTATION FOLLOWS # # #

To add a swap file:

Determine the size of the new swap file in megabytes and multiply by 1024 to determine the number of blocks. For example, the block size of a 64 MB swap file is 65536.

At a shell prompt as root, type the following command with count being equal to the desired block size:

dd if=/dev/zero of=/swapfile bs=1024 count=65536

Change the persmissions of the newly created file:

chmod 0600 /swapfile

Setup the swap file with the command:

mkswap /swapfile

To enable the swap file immediately but not automatically at boot time:

swapon /swapfile

To enable it at boot time, edit /etc/fstab to include the following entry:

/swapfile          swap            swap    defaults        0 0

The next time the system boots, it enables the new swap file.

After adding the new swap file and enabling it, verify it is enabled by viewing the output of the command cat /proc/swaps or free.

# # # END QUOTATION # # #

If you already have a swap file, you probably already know most of that. Anyway, I think that is close to a literal answer to the question as posed.

But if it is only in this one context that you need a bigger swap, and it doesn't happen often, if you are short of drive space, you might consider, instead of REPLACING your swap file, just make and mount an ADDITIONAL one prior to when you need it. They are cumulative. You can have as many as you want. Then you can unmount and delete it when you are through.

Regarding the issue of swap file vs. swap partition that Ravery touched on, much of what you will read on that subject is out of date. Unless your swap partition is on another drive (and maybe I should even say another drive controller) it isn't likely to be any faster than a swap file. And it is definitely less flexible. Unless it is on a separate drive, I can't see a lot of reason to use a swap partition any more.


Mouse mysteriously stops working on my right-hand screen

I had the same problem [Xenial], which seemed to be triggered by starting VirtualBox (though that could be a red herring).
I fixed it by

unity --replace

Though that doesn't explain why it happened in the first place...

WARNING - this will close all your open applications, so save everything first!


will a 6GB of RAM will be fine and efficiant to run in 32-bit Ubuntu?

Will a 6GB of RAM will be fine and efficiant to run in 32-bit Ubuntu?

Yes. But 2 will be sufficient to run Ubuntu too. Ubuntu defaults to the PAE kernel for 4Gb+ support on 32 bits so you will be fine. PAE has a maximum of 64Gb.

  My Plan is to run some Database Server.

A database server will benefit from more memory. But it is impossible for us to answer if it runs efficiently since this is very very dependent on the amount of users, bandwidth, and a lot more. Memory is just a small facet in this.


Is it possible to set same port work with http and https?

No, it's not possible to run HTTP and HTTPS on the same port.

When using HTTPS the connection uses the SSL/TLS protocol from the very start. There is no possibility for the client to start transmitting using plain HTTP.

The SSL/TLS standard doesn't provide for a way to drop back to HTTP if plaintext communication is detected on the port.


You should change the listen directive to listen with the SSL protocol: listen 80; says to listen for http connections on port 80, but listen 443 ssl; says to listen on port 443 for https connections.
the configuration should be as follows:
server {
    listen 80;
    server_name mydomain.net;
    return 301 https://mydomain.net$request_uri;
}

server {
    listen 443 ssl;
    server_name mydomain.net;

    ssl_certificate           /etc/letsencrypt/live/mydomain.net/fullchain.pem;
    ssl_certificate_key       /etc/letsencrypt/live/mydomain.net/privkey.pem;

    location / {
        proxy_pass http://myip:myport;
    }
}

you can also combine them. you can remove your return statement, and combine all others into one server block. just add this snippet:
  if ($scheme = http) {
    return 301 https://$host$uri?$args;
  }


How to setup VPN bridge between 2 networks

Try this on your box after all of your static routes are in place on your routers and your box is connected to the VPN (so that tap0 is available):

root@yourbox:~# sysctl -w net.ipv4.ip_foward=1
root@yourbox:~# iptables -A FORWARD -s 192.168.2.0/24 -d 192.168.93.0/24 -j ACCEPT
root@yourbox:~# iptables -A FORWARD -s 192.168.93.0/24 -d 192.168.2.0/24 -j ACCEPT

What the above 3 commands will do is

1) Enable IP forwarding in your kernel in order for it to route packets between the two networks

2) Accept any traffic that is coming from the 192.168.2.0/24 network and destined for the 192.168.93.0/24 network

3) Accept any traffic that is coming from the 192.168.93.0/24 network and destined for the 192.168.2.0/24 network

Hope this helps. :)


How do I upgrade to from Ubuntu 18.04 to Ubuntu 18.10

Open ›Software and Update‹ and select there to notify you for ›any new version‹.
When closing it will ask you if you want to reload your sources, click ›reload‹.
Software and Update

The open a terminal an run sudo do-release-upgrade and follow the instructions. If you don't want to use a terminal, just wait and you will be ask, if you wish to upgrade.


Testdisk brings back empty folders that take up space

$RECYCLE.BIN is obviously a Windows Recycle Bin folder...that being empty would not be surprising, unless you typically store files in your trash can.

System Volume Information is also Windows cruft, storage for windows restore points.  So that could contain plenty of hidden data.

As you were looking for this saves folder, the question is exactly what the storage requirements are for this folder in an objective fashion (as you do not trust what you are getting).  If you KNOW the files are in the saves folder, and you don't have any problem with erasing these two 'empty' folders, I would delete them and reassess the situation as a first step.

rm -rf "$RECYCLE.BIN"
rm -rf "System Volume Information"


How to boot Ubuntu after removing Windows on UEFI system

UEFI Secure Boot needs to be disabled in the system firmware.

You need to delete the entire partition table on the disk to be able to set up new GPT partitioning.You can use gparted from the live session

First if you are going to boot using EFI you must create with gparted a FAT formatted EFI System Partition (type EF00 ) as the first partition, around 500 Mb. This partition will contain your bootloader.

Second, you must create additional partitions for /, /home, swap and all it deems necessary.

After applying the changes, you should restart to begin the installation, choosing manual partitioning to select partitions.

The EFI System partition will also be mounted as /boot/efi, you do not need to tell the installer to mount this partition.


The gold linker is now in the binutils package instead of binutils-gold (which is what apt-get is trying to tell you). Since you already have the package, you have the linker.


Building a package.deb from directories :

cd new-folder/ && mkdir -p  packagename/DEBIAN

Your files e.g. usr/local/bin/executable goes into packagename/ ... and the file control into DEBIAN/

Example control file :

Package: name
Version: 1.1-1
Section: base
Priority: optional
Architecture: amd64
Depends:
Maintainer: Jerry Donut <jerry@donut.com>
Description:

The architecture choices are typically : i386, amd64, noarch

Then you can try :

cd new-folder/
dpkg-deb -b packagename packagename_version_architecture.deb

Then unpack the package.deb to check if it's OK. Else, do some adjustments and repeat the dpkg-deb -b command.


Problem running windows software on wine

Create an ISO image from the CD.
Configure Wine to see ISO as a CD drive.
???
Profit!


sudo gedit /usr/share/applications/kicad.desktop

Try changing the icon field to just kicad.

You don't need to have their full path specified, but their filename without the extension.


Conflict management during file operations

As a workaround, you could simply create a file with the same name in both directories before starting the copy. If you name this file something like aaaaaa, the conflict will arise very early in the copying process and you will be presented with the conflict resolution dialogue early.

This is neither elegant nor a solution as such but it should serve as a workaround.


Errors about apt-secure when trying to run system update on 16.10

Ubuntu 16.10 is not supported any more (since July 2017), hence there are no information about packages available anymore (as indicated by the does no longer have a Release file message.

Your choices are to downgrade to 16.04 or upgrade to 17.10


Why do I need the ssh server package to rlogin into my machine?

SSH is a server-client technology.  You need an SSH server on your remote machine if you want to connect to it remotely via SSH protocol. There is no way around it. Just like you need an FTP server in order for you to connect to that same machine via FTP.  I believe if you installed the server edition of Ubuntu, it should have the SSH server package installed by default. Otherwise, you'll need to install it, and configure it properly/securely.


Manually uninstall software without package control

All your sudo commands are logged in /var/log/auth.log and it's logrotated history. Find the commands you used to install it there.

Alternatively, you could install the installwatch, package, read the docs, and re-install the old package with installwatch keeping an eye on things.

2nd alternative- inspect (tar tvf or equivalent) the original (or re- downloaded original) archive.


How to convert RPM package to a format meaningful to Ubuntu

Which program is it? You can always try and convert it using alien in command line.

With alien you can convert from/to rpm/deb/tgz/slp.

The process is pretty straightforward:

sudo alien myfile.rpm

I think it will also attempt to install it.

If you don't have Alien installed, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo apt-get install alien


Too much disk read/write when launching an application

Most probably the settings of swappiness would be the key. Ubuntu by default is set to  swap the system resources before (not after) it will need to swap it. Fortunately, this option, as all things in Linux world, is configurable.
Try to disable swap temporarily, to test, if this will help you, by

sudo swapoff -a

and later back on with

sudo swapon -a

If this will be the solution for you, you can play with swappiness settings. This Q/A should be good guide for you (Is it safe to turn swap off permanently? ).

... and yes, problem could be the old ATA drive, respectively the drive controller, as the I/O operations take longer than expected and system is waiting for it. Try to monitor system with top command, if this is the case, there will be lot of CPU waits (values more than 15-20%). You have to test it with app, which is not yet loaded into memory.

If this is the case, then consider to reduce I/O as much as possible. Play with swappiness (for example zero). It would help to add more RAM then, should have to be possible to increase it to at least 2Gigs.


Upgrade from 16.04 to 18.04, indicator-multiload doesn't work

Ubuntu 18.04 now use GNONE Shell instead of the Unity desktop like probably you already know. They are different desktops, but in general there are not limitations to use the same feature of Ubuntu 16.04 with Unity in Ubuntu 18.04 with GNOME Shell.

The same thing can be more easy or more hard to do in one or in the another desktop. This things you want, can be integrate better or worse with the rest of the shell to look like more or less pretty, or will work with worse or better performace, but finally it can be implemented in both desktops environments. A different history will not be true in general and need to be proven to then be taked as a true. Thats why i recommend be obtimistic. When something have not support, is not because a desktop is called X or Y, is because the developers behind the desktop are called X or Y. So, will be always a human factor and not a desktop name.

The case of the indicator-multiload is not different then and of course, it will work just fine with GNOME Shell. The problem was that the GNOME Shell developers, dosen' t likes the indicators, because this feature aparently do not match with his conception of the desktop. Source: https://bugzilla.gnome.org/show_bug.cgi?id=652122

Not matter if the shell developers deside to not support the indicators, because they really support extensions and then some thrid party developers can make possible the usage of the indicators inside the Gnome Shell session and thats what then happened
when Jonas Kümmerlin create that extension: https://github.com/rgcjonas

When Ubuntu come to Gnome Shell in 18.04, the develop of the extension to loaded the indicators was not very active and was develop, preventing break the shell as possible, to cause few disturbs. So, it was limited a lot and some things was simplify  in theory maybe, to be more faster and cause less problems.

So, the non-homogeneus indicators was then be loaded in a way that they will be converted to homogeneous indicators and then simplify the procedure to scale the icons inside panel. That was what the official shell code was doing in this time with the status icons. Please also see that the status icons was then be dropped for inside Gnome Shell: https://blogs.gnome.org/aday/2017/08/31/status-icons-and-gnome/ a few years ago, because the gnome shell developers droped his usage in favour of NOTHING and then do not considered the usage of the indicators again.

Also, some time ago, i found (https://github.com/ubuntu/gnome-shell-extension-appindicator/issues/41) this gnome shell extension. I forked and convert it to a Cinnamon applet and then I merged it with another Cinnamon oficial applet for the status icons. That code is inside Cinnamon right now (https://github.com/linuxmint/Cinnamon/pull/5790). In Cinnamon, the history was different, and i tested a lot, the possible ways to render the indicators and also i fix some bugs that the original extension already have, because the extension never was used with non homogeneus indicators. As an intresting thing, I can say that I never merged some of that improves in the Cinnamon desktop. Thats why in the cinnamon desktop the indicator-multiload is also homogeneus like it's in Ubuntu 18.04 right now.

When Ubuntu 18.04 was forked the indicator extension, i opened a bug there (https://github.com/ubuntu/gnome-shell-extension-appindicator/issues/92), to see if  they want to fix something in the extension, but for what i see, they don't care to do so much. So, today i just forked the extension and fix the indicator-multiload only, because you want that, but don't think i will continue the develop of that extension or something similar. I think you need to ask to the ubuntu developers about that feature. Probably here: https://github.com/ubuntu/gnome-shell-extension-appindicator/issues/121

Edit: See that, I forked the extension and create a pull request for the version of the extension that was compatible with GNOME 3.28, but  was not merged or adapted to be merged by someone else inside the official ubuntu extension: https://github.com/ubuntu/gnome-shell-extension-appindicator/pull/144


Install Ubuntu OS on SSD and other files to HDD

I have been using Ubuntu on my Hybrid Hard Disk (SSD+HDD) for more than a year now, with the first SSD partition allocated for root filesystem (referred to as /) and second SSD partition allocated for /home (which includes all user settings and also  some basic user data) as well as a large data partition for the bulk of user data files and folders and a swap partition on the HDD.

And this seems a good configuration with a good performance for my purposes.


problem in finding the lsystem file drive in ubuntu 12.04

When you install Ubuntu using wubi, the drive on which it is mounted is /host/. You should see that on the left hand side panel in nautilus. All the files in your G: drive would be here, in /host/.

Secondly, the desktop.ini file is the file that contains all windows settings for the particular directory. If you delete this file, all settings pertaining to that directory will be lost and default settings will be loaded for that directory. Settings here mean the "View", "icon types", etc.

Source:

Where can I view Windows files on a Wubi install?
What is the desktop.ini file and can I delete it?


How to solve this problem starting new Opera-windows on dual monitor-setup?

Opera stores it's profiles in ~/.opera ---

You could be able to run opera in a terminal or create a script by disabling the file lock - it's not really a biggie since we'll be disabling the mail database.

mv /home/username/.opera/lock ../; opera -pd /home/username/.opera/ -newwindow -nomail; mv ~/lock /home/username/.opera

(which handles moving the lock file back again)

Hope this helps!


The easiest way to install Scala would be to use the .deb installation file. On the download page you can see the newest stable version. Then go to the All Downloads page and find that version (or Scala 2.11.4). Scroll down to the bottom of that version's page and look for scala-2.11.4.deb (or the appropriate version) and download it.

If you're comfortable with the command line, you can install the downloaded Scala deb with:

sudo dpkg -i scala-2.11.4.deb

Otherwise, you're going to have to install GDebi through either the Ubuntu Software Center, or via a terminal with:

sudo apt-get install gdebi

Once GDebi is installed, you can double click scala-2.11.4.deb in your file browser which will open the package installer. Finally, click "Install Package", and your new version of Scala will be installed.


Recovery of Linux swap partition using Testdisk

Have found advice elsewhere. Left the size at the smaller suggestion and did the Testdisk 'write'. All working fine.


Suggest an advanced text editor for Ubuntu

I use notepad++ on windows but since it is not avaible on linux I use Sublime Text

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

Here is an list with linux text editors:
link


what gnome packages (applications) are missing in ubuntu 12.04?

There are no "gnome packages" missing.  I am still unclear what you are asking.  If you are planning to upgrade to 12.04 a list of the software that is in installed as part of the distrubution is listed here and on many other sites including www.ubuntu.com .

But like all Ubuntu distributions you have the Software centre where to can browse and download what packages you need


Root username is different to admin username

No # is just an indication that you are in root mode.

root@jenchris-H55M-UD2H: - Here root is the user name, jenchris-H55M-UD2H is the machine name. Rest are just a path.

In ubuntu by default the root account is disabled. First user (the name you given at time installation) is given a special permission to do root user's job. It is called a sudoers account.

I think you accidentally (or without knowing) removed your account from sudo list and enabled root account.

To solve this you can run the following

from root terminal (like above terminal with #)

adduser <username> sudo  - username should be your default user name. (most probably jenchris)

Now logout & log back in, you should be able to mount usb & do the other things.

Disable root account

sudo passwd -dl root

More information about sudo , root with their cons & pros → https://help.ubuntu.com/community/RootSudo


How to change the destiny owner on a bind mounting point

I fixed adding uid, gid and allow_another options for sshfs. Like this:

sshfs -o uid=33,gid=33,allow_another chachan@192.168.56.1:/home/chachan/workspace/magento /home/chachan/workspace

I also added (uncomment) user_allow_other option to /etc/fuse.conf and it's working smoothly :)


Question/Confusion About iptables on Ubuntu Desktop 17.04 and How to Use iptables Without UFW

I did the same, and I have the same issue (I am also coming from Centos).

I ran nmap and it appears that iptables are properly running (even after a reboot). I suggest you run it too.

nmap -P0 192.168.0.8

nmap -P0 -sU 192.168.0.8


Is a Wine prefix similar to a entire installation of Windows?

Each "prefix" is a separate, clean base.

Replace the word "prefix" with "folder" or "directory" if that makes it any easier to grasp.

Some applications need specific tweaks to the wine configuration to run well, or at all in some cases. So, you create a new "folder" and configuration to go with it for each application, so that they don't interfere with each other, as some tweaks are needed to make one applications function, they can break another.

This is where something like Playonlinux comes in, as it can be tedious at best to manage multiple prefix's and in some cases different versions of wine.

You are not duplicating wine installs in most cases, but it can happen, and depending on the application some version work better than others.

Try this, WINE is like your...hmm, "Wine Cellar", the applications are each installed into separate bottles, ie "prefix's", because you don't want to blend them and alter the flavor characteristics.

I hope that made some sense to more than just me.


I am using DPDK on ubuntu with low latency kernel (3.16.0-33-lowlatency #44~14.04.1-Ubuntu SMP PREEMPT). I used the quick start link below to configure it and it works okay for me.

http://dpdk.org/doc/quick-start

For 1G huge pages support, did you set the kernel parameters "default_hugepagesz=1G hugepagesz=1G hugepages=4" in /boot/grub/grub.conf file?

https://embedded.communities.intel.com/thread/6681

But I haven't tried this though.


Failed to install Ubuntu security update "The package system is broken

Try to enter:

sudo apt update

into the terminal to update the package list. You can also try:

sudo apt --fix-broken install

to fix broken packages; now try to update your system and it should work.


How would I install psensor-server as a service on Ubuntu 16.04 LTS

I have tried to find a place to actually post a tutorial on this, wiki wouldn't load for me to add a page, and I really don't know where it goes. But I wrote a tutorial for this and I'm by no means an expert but this was how I managed to get this working on my server without having to open a terminal and execute the start command every time.
If anyone can think of a better place to put this, or knows where it should be please do let me know...

I'm aware some have said that ppa isn't needed, you can skip this step if you wish as it is already in the universe repository, however adding the PPA will guarantee that you receive the latest stable updates when pushed by the psensor team.

This guide will show you how to install Psensor-Server on ubuntu 16.04 Server, and then create a service to launch it on a given port at system start

The first thing we need to do is be sure the system is up to date package wise, not sure this matters, but it's always good practice.

sudo apt update
sudo apt upgrade

The next thing is to install the prerequisites for Psensor

sudo apt install lm-sensors

Start the detection of your hardware sensors

sudo sensors-detect

It will ask a series of questions, answer yes to everything unless you know what you need.

Verify it works by running the following:

sensors

Output should look something like this, however please note yours will vary based on how many sensors you have in your PC so your reading will not be exact.

coretemp-isa-0000
Adapter: ISA adapter
Core 0:      +46.0C  (high = +76.0C, crit = +100.0C)

coretemp-isa-0001
Adapter: ISA adapter
Core 1:      +44.0C  (high = +76.0C, crit = +100.0C)

After this we will install psensor and psensor-server We will use the repository to be sure we have the latest stable version. Install the prerequisites for add-apt if their not already present on your machine.

sudo apt install software-properties-common python-software-properties

Next step is adding the repositories

sudo add-apt-repository ppa:jfi/psensor

Update the Repositories
    sudo apt update
Install Psensor and Psensor-Server

sudo apt update && sudo apt install psensor psensor-server

Now that we have Psensor-server installed we have to write a couple scripts to start and stop the service.
Warning, the stop script just simply uses pkill which I've been made aware that probably isn't the best option, but for my purposes this wasn't an issue, you may need to adapt the script to your needs accordingly.

the first script is created as follows

I use nano, you may use whatever editor you prefer. If you do not have nano you can obtain it by the following.

sudo apt install nano

then

sudo nano /home/someuser/startps.sh

replace someuser with your username

when it opens type the following

#!/bin/bash
sudo psensor-server --port=8085

You may use whatever port you wish, just ensure it doesn't conflict with ports already open on the system.

CTRL + X and answer yes to save

then issue

sudo nano /home/someuser/stopps.sh

Again replace someuser with your user account.

enter the following

#!/bin/bash
sudo pkill psensor-server

CTRL + X and answer yes to save.

To create the service issue the following command

sudo nano /etc/systemd/system/startps.service

Enter the Following

[Unit]

Description=psensor service

[Service]

ExecStart=/home/someuser/startps.sh
ExecStop=/home/someuser/stopps.sh

[Install]

WantedBy=multi-user.target

Replace someuser in the paths to the same username you used when creating the .sh scripts.
CTRL + X and yes to save.
Then enter the following at your terminal

sudo chmod u+x /home/someuser/startps.sh && sudo chmod u+x /home/someuser/stopps.sh

Again remember to replace someuser with your username.

Now to start our service we type

sudo systemctl start startps

it should start and take you back to the terminal prompt, at which time we enter

sudo systemctl status startps

The output should be as follows

● startps.service - psensor service
   Loaded: loaded (/etc/systemd/system/startps.service; disabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-08-10 16:42:43 CDT; 2s ago
  Process: 15300 ExecStop=/home/someuser/stopps.sh (code=exited, status=203/EXEC)
 Main PID: 15385 (startpf.sh)
    Tasks: 4
   Memory: 1.9M
      CPU: 21ms
   CGroup: /system.slice/startps.service
           ├─15385 /bin/bash /home/someuser/startpf.sh
           ├─15387 sudo psensor-server --port=8085
           └─15388 psensor-server --port=8085

Aug 10 16:42:43 [hostname] systemd[1]: Started psensor service.
Aug 10 16:42:43 [hostname] sudo[15387]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/psensor-server --port=8085
Aug 10 16:42:43 [hostname] sudo[15387]: pam_unix(sudo:session): session opened for user root by (uid=0)

Please note where it says disabled, it should also tell you the process is running.
Now to enable your service type

sudo systemctl enable startps

if it returns to the terminal you may issue

sudo systemctl status startps

You should now see this response.

● startps.service - psensor service
   Loaded: loaded (/etc/systemd/system/startps.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-08-10 16:42:43 CDT; 45min ago<br>
 Main PID: 15385 (startpf.sh)
   CGroup: /system.slice/startps.service
           ├─15385 /bin/bash /home/someuser/startps/startps.sh
           ├─15387 sudo psensor-server --port=8085
           └─15388 psensor-server --port=8085

Aug 10 16:42:43 [hostname] systemd[1]: Started psensor service.
Aug 10 16:42:43 [hostname] sudo[15387]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/psensor-server --port=8085
Aug 10 16:42:43 [hostname] sudo[15387]: pam_unix(sudo:session): session opened for user root by (uid=0)

The main thing you're looking for here is that it says enabled in the second line.

If you see these outputs, then lets move onto the next step which is opening the firewall to allow access from the client machine within our network.

I feel you should know that psensor-server with it's built in HTTP server has no security measures what so ever. So essentially if you open it to the outside world you do so at your own risk, and I assume no responsibility should a hacker frag your computer
That is why I specifically included the next part of this guide to show you how to open the port in iptables to one client machine, you may adapt this as many times as you like.

so to open the port to a client machine you would use the following

sudo iptables -I INPUT -p tcp -s x.x.x.x --dport 8085 -j ACCEPT

Keep in mind x.x.x.x would be the IP of your client machine you want to access the psensor-server http page.

Also if you set a different port after the -dport flag you would need to adapt 8085 to the port you chose in the creation of the startps.sh in the steps above.

Now you should be able to go to the client machine and type http://x.x.x.x:8085 wherein x.x.x.x is your server's IP and 8085 is the port you set in the creation of startps.sh in the steps above.

The following guides were used in creating this guide. The commands were adapted to remove apt-get as apt is now the default way to install software in ubuntu 16.04
https://wpitchoune.net/psensor/
https://wpitchoune.net/psensor/README.html
http://lifeonubuntu.com/ubuntu-missing-add-apt-repository-command/
https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files
How do I run a single command at startup using systemd?
https://www.garron.me/en/bits/iptables-open-port-for-specific-ip.html
As well as the #ubuntu-server irc channel. I hope this helps someone who wants to do what I did but doesn't have the know how. Please note this guide was obviously meant for users like myself who really don't know much about Ubuntu and/or the terminal window. If anyone has an easier way feel free to note it as an answer and I'll update as I get time.


Retention of modification dates using Ubuntu Live CD

Assuming you are using the Live CD to copy from said hard-drive to another hard-drive, and not to the CD itself, this answer on superuser shows how to use the cp -p command to copy a file while retaining modification times. As per that answer:

  cp -p does the trick. For Linux:

-p same as --preserve=mode,ownership,timestamps


Does the OEM video play after an ordinary OEM install?

No it doesn't, at least not with 14.04

You can try it for yourself. Here is a how to.
https://help.ubuntu.com/community/Ubuntu_OEM_Installer_Overview


You need to include the kickstart file into the ISO file and edit the boot menu to load it.

You can do it this way:

Mount the original ISO into the /tmp/mountiso directory and copy all the content into the /tmp/custom_iso. This is necessary because as far as I know, it is quite tricky to edit an ISO file directly without extracting.
(Note: if you are installing a desktop version, make sure that you are using the alternative version of the ISO)

mkdir -p /tmp/mountiso/
mkdir -p /tmp/custom_iso
sudo mount -o loop /PATH/TO/THE/UBUNTU/ISO.iso /tmp/mountiso/
rsync -a /tmp/mountiso/ /tmp/custom_iso/
echo en > /tmp/custom_iso/isolinux/lang

Edit the file /isolinux/txt.cfg and replace the default entry with:

append  file=/cdrom/preseed/ubuntu-server.seed vga=788 initrd=/install/initrd.gz ks=cdrom:/ks.cfg ---

(or just add the ks=cdrom:/ks.cfg to the existing line)
Create your kickstart file, either with preseed or regular kickstart (or a mixture of them) and place it in /tmp/custom_iso/ks.cfg
Rebuild the ISO with:

mkisofs -D -r -V "Custom ISO" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o $HOME/my_ubuntu.iso /tmp/custom_iso/

And that's it.

The $HOME/my_ubuntu.iso file should boot using your kickstart.


Strange file exist with name '* (star, asterisk)'

You can delete the empty file like this:

  rm '*'

If you do need the confirmation on delete, do this:

  rm -i '*'

Edit: You can even use backslash(\) or double quotes("") to escape *.

For example: rm -i "*" or rm -i \*


Yes, Ubuntu 11.10 uses unity which is a plug in of Compiz, but still playing with Compiz is dangerous in Ubuntu 11.10.

Linked Questions

What are some of the issues with CCSM and why would I want to avoid it?
When will compiz-based version Unity be available for testing?


Use XSL to perform the transformation to the exact format you need; e.g.,

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="iso-8859-1"/>
<xsl:strip-space elements="*" />

<xsl:template match="/ReportDetails">
  <xsl:value-of select="Date"/><xsl:text>|</xsl:text>
  <xsl:value-of select="CaseNo"/><xsl:text>|</xsl:text>
  <xsl:apply-templates select="UserDetails" />
</xsl:template>

<xsl:template match="/ReportDetails/UserDetails">
  <xsl:value-of select="FirstName"/><xsl:text>|</xsl:text>
  <xsl:value-of select="Surname"/><xsl:text>|</xsl:text>
</xsl:template>

<!-- etc -->
</xsl:stylesheet>

And then given the above (e.g., in foo.xsl to transform original xml document foo.xml):

$ xsltproc  foo.xsl  foo.xml
08/08/2012|13030903|John|Perry|

(The devil is in the details of the xsl... there are numerous ways to implement this...)


From man bash

-i        If the -i option is present, the shell is interactive.

-c command
          command  is  executed in a subshell environment, and its
          output is used as the possible completions.


Not able to boot 32bit from 64 bit Ubuntu 14.04 for installation

If you extracted perfectly, then go to boot options while restarting the computer(normally pressing f12 or f9 for many computers) and select the flashdrive and install it.
If you think you didn't extract it properly, then download "iso to usb" software which makes the pendrive bootable and do the above process.


Google+ does not have an API for doing the things you can do with Twitter and Facebook, from something like Gwibber. Thus, there is no plug-in for Gwibber to use Google+. There is no way to authenticate with Google+ and get your circles information, and filter streams or such, via the current API.

https://bugs.launchpad.net/gwibber/+bug/805452


Extend root partition with unallocated space on the left

Yes ... you are having the right idea. Boot from GParted Live media.
You as well can do it from Ubuntu install media (GParted included).
Important : Unmount all partitions (in case there are any mounted).

First move the sda6 partition to the left ... then move the sda7 partition to the left.
Now extend the sda7 ext4 partition - it is not necessary to move the sda9 partition.

After having completed these operations - reinstall the boot loader.
Boot from Ubuntu installation media - open a terminal and execute:

    sudo mount /dev/sda7 /mnt
    sudo mount /dev/sda1 /mnt/boot/efi
    for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
    sudo chroot /mnt
    grub-install /dev/sda
    update-grub

After this execute :

sudo blkid

Open another terminal and execute :

sudo gedit /mnt/etc/fstab

Replace the UUID entries with those of the output given from the blkid command.

Boot into BIOS and select Ubuntu in UEFI settings to be the default system to boot.

Note:

sda = disk | sda1 = efi partition | sda7 = system partition (taken from screenshot)


How to use GNOME tweak tool to get shell themes

To get a user specified shell theme, use this extension:
User Themes - GNOME Shell Extensions. Install it from the extension, page and make sure it is on in gnome-tweak-tool:

and here are the results - with it off, and with it on:

You can then use gnome-tweak-tool, or dconf-tools (use org.gnome.shell.extensions.user-theme name NAME_OF_THEME) to set the theme - here is Gnome Tweak Tool again:

By the way, I recommend the Zukiwi Theme - you may be able to install that with:
sudo apt-get install zukiwi

For your original question, as this is useful also for reference:
To fix some shell extension that also have the warning triangle, particularly after an update:
First, go to here, and see if any update icons are displayed.
If that does not work, first find your version of Gnome by running this:
 gnome-shell --version

In my case, this is 3.10.3, but I only need the 3.10 bit.
Then open Nautilus (File Manager), open the location bar (Ctrl+L), and enter this:
~/.local/share/gnome-shell/extensions

Alternately, view hidden file with Ctrl+H, and open .local > share > etc
Find the folder with the extension in - For instance, Status are Horizontal Spacing, by mathematicalcoffee, is in this folder:
status-area-horizontal-spacing@mathematical.coffee.gmail.com

Open up the folder, then open the file metadata.json. Find these lines:
  "shell-version": [
    "3.4",
    "3.6",
    "3.8"
  ],

and add your version of Gnome in if it is not present:
  "shell-version": [
    "3.4",
    "3.6",
    "3.8",
    "3.10"
  ],

Note where you need the commas ,. Save and exit, and after reloading the shell (Alt+F2, enter r, and press Enter), the extension should work. If the warning triangle is still there, then it is probably some other problem.


How do I get stuff off of the Unity laucher?

There are a couple of ways of removing items from the launcher.

Right click on the icon that you wish to remove and select the
Unlock from Launcher option from the menu

Click and hold on the icon and then drag in down to the Trash bin at
the bottom of the launcher

You aren't able to drag items off the launcher and straight onto the desktop however, if you want to put icons onto the desktop you need to open the dash, navigate to the application or file you wish to have on the desktop and click-hold and drag it to where ever you wish it to appear.


Back up documents you've created, and anything of similar importance to you.
In the context of backup advice, important files are files that are important to you--files that you do not want to lose. There are many files on your Ubuntu system that are very important to the operation of the system, but which are extremely easy to replace and thus not a priority for most users' backups. If you have heavily customized your system, then some configuration files in /etc might be important to back up--but you would know that, having edited those files. Most users need only back up files in their home directories.
This is to say that anything you would be more than annoyed to lose is important. Usually these are files you have created, like documents, and files that would be difficult or impossible to replace, like pictures of family members if they don't exist anywhere else. Before performing actions that carry an elevated risk of data loss, you should back up whatever files that you should be backing up anyway. If you do currently have backups, make sure they are current. If you don't have backups, this is a great time to start. You don't  have to back up your entire system, though that is one option.
Besides documents, most users will want to back up any personal correspondence that is not also stored and accessible elsewhere. This often includes instant messaging logs. Of course, if you don't care if you lose those logs, you need not back them up. You will likely want to back up any books, music, and videos that you cannot easily replace, but if they're easily replaceable then backing them up becomes relatively unimportant, though you might still choose to do so for convenience.
Some users strongly prefer to be able to quickly install all the packages they had installed before. If that applies to you, then you should consider following the advice about APT packages in George Mathioudakis's answer. The really important files to back up, however, are the files you would be very upset if you lost. (So for most people, the key part of that answer is the section on "personal data" at the beginning.)
Reinstalling Ubuntu is pretty easy. Replacing family pictures, or a novel you've been working on, or notes you took during an important telephone conversation, or a huge list of all the things you need to organize an upcoming event--these are the sorts of things that are usually the most important to back up.
Anything you would attempt to recover if lost, or that you would be very relieved to have backed up if you needed to get back, is an important file.
Your home directory (almost always /home/username on Ubuntu) contains some files that are not important in this sense. But there's nothing wrong with backing up more than you need, so backing up the whole thing is a perfectly good approach.

To elaborate, here's some information about the specific issues you mentioned in your question.
1. Files in /home that don't copy easily:
If the small handful of files that couldn't be copied when you backed up users' home directories (i.e., the subdirectories of /home) are easily replaced, then you don't have to worry that they couldn't be copied. Since there are so few of them, you can check each one. Lock files do not need to be backed up. Unless you're actually backing up your entire drive with the intention of being able to restore the system to the exact state it was in before, you rarely need to care about lock files.
Your home directory may contain a subdirectory called .gvfs that you can't copy due to permissions problems. You don't need that either.
2. Global configuration files /etc:
There's probably no need to back up /etc. It does contain some files that you can't even read as a non-root user, so if you do decide to perform a full backup of it then you will likely use sudo to either copy or archive its contents.
3. Games and apps:
There are two things you may mean by "the files for things like games and apps."
Except under unusual situations, you don't need to back up the actual executables, data files, and documentation for games and apps. You can just reinstall them. If you've installed so much software that you can't remember what it all was, but you still want to be able to get it all back easily (rather than just installing what you still need), then I recommend backing up your APT packages as detailed in George Mathioudakis's answer. If you have software installed in other ways, that could not be restored with Ubuntu's package manager, and it would be a hassle to restore it, then you may want to back that up, but without specific details about how you installed it or what it is, I can't give advice about the best way to do that.
However, you might decide to back up configuration files and other per-user data. Most global configuration files are in /etc--which are probably only important to back up if you've heavily modified them yourself. The files you might care about more are the ones on your home directory, so if you back that up then you're all set. Specifically--in case you want to back up just some files, or are otherwise interested--per-user configuration is usually stored in files and directories inside your home directory (/home/username) whose names start with ., especially the .config directory.
Graphical file browsers don't show files that start with . unless you tell them to (Ctrl+H). To list them with ls you must pass the -a or -A flag. If you have software that is installed in your home directory--including games--and you're not sure where it is, it may be in the .local directory. Often it's unnecessary to back that up but you may want to see what's there. The .cache directory is for files that programs can automatically replace--though sometimes this involves downloading data, as with album cover images--so you probably don't need that, though again, there's no harm in keeping it if you like. If you want to back up savegames (to keep your progress in a video game) then you should search or consult documentation to see where they are stored for the games you care about.
4. Full system backups / deciding how much to back up and how to do it:
If you plan to do a clean install, or having to do one isn't an outcome you strongly wish to avoid, then you probably do not want to do a full system backup.
For more information on deciding what to back up, especially on deciding if it makes sense for you to back up more than "important" files, see What's a good back-up strategy for 1 desktop PC?
5. What to back up before repartitioning operations that involve /boot:
I recommend ensuring all your documents and important files are backed up--where "important files" has the meaning described above--anytime you are about to make changes to the partition table on the drive that contains those files.
It used to be that dynamic resizing of partitions carried quite a bit of risk. These days, data loss from unanticipated technical problems is less common, though I have seen it happen. What is more common is to accidentally make a mistake while repartitioning. Therefore, it is worth making sure your backups are current (and actually exist!) before modifying your partitions in any way. It is unfortunately easy to make different changes from the ones you intended.
Data loss within /boot itself can usually be repaired even if you haven't specifically backed up that partition (if it's a separate partition) or directory (if it's not a separate partition). For most users, it's not important to have a backup of /boot. If you do want a backup of /boot, you might consider doing a full backup of the entire system, such as by creating an image of the whole drive. Usually there's not much value in being able to restore /boot if you can't restore other things along with it.
6. Restoring a separate /boot partition:
If /boot is not actually a separate partition on your system but is just a directory in the / partition, then of course restoring / will restore it too.
Otherwise, whether or not /boot will be backed up--and restored--depends on how you "back up the drive". If you image the entire physical disk, and not just one partition, then you should be able to restore that whole image.
If you actually do want to back up /boot then you may want to ask a separate question about that, with specific details. Although the files in /boot are important--you need them to boot!--it's usually pretty easy to replace them. They don't have the same status as your documents or family photos.
Since this answer is about what files are "important" for backup purposes, backup schemes for /boot are somewhat outside its scope. With that said...

You probably don't need to repartition (nor to resize partitions) at all.
It is rare that you have to expand the /boot partition. If you have run out of space on /boot then this usually means you have many old kernels installed, and you can just remove some. If you cannot remove them with the package manager, this process may involve deleting some files manually, but it is still faster and easier then repartitioning.
As bodhi.zazen suggests, please take a look at My /boot partition hit 100% and now I can't upgrade. Can't remove old kernels to make room. If that doesn't describe the problem you're having or otherwise doesn't help you, and searching doesn't reveal another question that does, then I recommend posting a new question about the specific problem you are having that you fear may require you to resize your partitions. It's possible that doing so will be a reasonable or even ideal solution to your problem, but quite likely that your problem will better solved through other means.


libxml2.so.2 No version information available

Do a locate libxml2.so.2 and see if you have 2 or more versions.
if so delet the old version and create a symbolic link to the new.

ln -s is the command to create a symbolic link. The rest of the command requires your file name and the old file name (but depends on what you find with locate ;) )


backlight trouble xubuntu lenovo ideapad 100

Edit /etc/default/grub and append the i915.invert_brightness=1 kernel  paramenter to your kernel options at the GRUB_CMDLINE_LINUX_DEFAULT line.

For example, change GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.invert_brightness=1"

Update your bootloader configuration using sudo update-grub2and reboot.

It should solve your problem.


Banshee still doesn't have DAAP sharing. It can consume, but there's no DLNA server in there yet.

According to the application selection blueprints for Natty, the Ubuntu developers wan't to "fix UPNP support". I take that to mean making Banshee comparable to RhythmBox but there's room for misinterpretation.

The Banshee Team recommended method is through an external application called Tangerine. This has the benefit over an embedded solution in that Banshee wouldn't need to be running for things to find music. An image of its settings UI running shows below.


Changing brightness on a Sony Vaio laptop

The solution for me was to edit the /etc/X11/xorg.conf file. It's a problem with the graphics driver not the keymap.

Open the file for editing and add the line

Option     "RegistryDwords" "EnableBrightnessControl=1"

in the Section "Device" section as shown below.

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option     "RegistryDwords" "EnableBrightnessControl=1"
    Option     "NoLogo" "True"
EndSection


How do I use xte to bind next/previous to my mouse?

Buttons 6 and 7 are already bound to previous/back and next/forward in most important applications. Use xmodmap to remap them to the desired buttons on the mouse.


Is there a simple way to troublshoot why a program crashes?

Your question is hard to answer, but I'll do my best

  is there a way to find what line of the code has a problem?

You are using python (judging you question's tag), so run your software from a terminal and every time it crashes you'll bet a stacktrace indicating the line were it failed.

  Or is it normal to have to rewrite everything?

There are some bugs that only require, literally, a one line change, while others may require huge changes to the program to fix them, specially when the problem is related to the logic of the program.

So as you can see there is no simple answer to your question, I recommend you narrow the scope of your doubts and then ask again, also I suggest you to use more 'development oriented' places like https://softwareengineering.stackexchange.com/ or https://stackoverflow.com/


From Ubuntu Forums
Load the driver into ndiswrapper:
Code:

sudo ndiswrapper -i /media/cdrom0/Bin/Driver/CBG54/WIN2000/netg54s.inf

Load the ndiswrapper module:
Code:

sudo modprobe ndiswrapper

Does the interface show up? It should:

Code:

iwconfig wlan0

If not, it might not be called wlan0 (I don't see why not, but my card doesn't do this right either). The way to check is to list all the cards:
Code:

ifconfig -a

and look for the MAC address listed as "hwaddr". According to what you posted, the address you should look for is 00:16:01:7d:ea:7e. If that isn't in there, it's not working.

Assuming you can find it, try scanning. If it's not called wlan0, then change wlan0 in everything below to what it's called (eth1 or something like that).

Code:

sudo ifconfig wlan0 up
sudo iwlist wlan0 scan

A more in depth how to is also avaliable here


Consider to reset panel settings with

To be completely sure reset permissions on all dot-folders with

sudo chown -R $USER:$USER ~/.[a-zA-Z]*

Open MATE Terminal and reset MATE Panel settings with dconf by

dconf reset -f /org/mate/panel/

Open MATE Tweak (mate-tweak) again and select Mutiny layout.
Relaunch MATE Panel with

killall mate-panel
mate-panel --replace &

or logout and login again.

Notes:
1. I tested this method on clean installation of Ubuntu MATE 18.04.1 LTS.
2. You can remove GNOME-related stuff as mentioned in my other answer but it is dangerous.


I think the directory /usr/themes/ should be ok. Now what you can do is
Install unity-tweak-tool and you can check there if the theme is available and customize it.


Disable IPv6 on 14.04 with IPv6 disabled kernel

I think that if you worry about the little space that the IPv6 kernel module takes then you should probably be compiling your own kernel...


After upgrade to 12.04 wireless icon is missing and sound no longer works

Open a terminal windows and type:

sudo unity --reset

The sound problem is a different issue.  Open sound settings and/or alsamixer see if there is a problem (on mute, input values too load etc).  If you can't find anything obvious open a new question about this one specifically.


EXT4-fs error on Toshiba Tecra with WD SSD

partial pending answer...

We're looking to solve SATA SSD disk related errors.

File system check...

boot to a Ubuntu Live DVD/USB
open a terminal window by pressing Ctrl+Alt+T
type sudo fdisk -l
identify the /dev/sdXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier
repeat the fsck command if there were errors
type reboot

BIOS check/update...

With sudo dmidecode -s bios-version we learned that your current BIOS version is 3.9. Checking the Toshiba web site we find that the current BIOS is version 4.3. (and interestingly v4.0 comes with 'Improved SSD related system stability').

We don't have a Windows environment installed, so we can't install the BIOS update using Windows.

But we can install the BIOS updates from Linux! See https://www.youtube.com/watch?v=WqDUCfU-e-A for instructions. (unetbootin, FreeDOS (http://www.freedos.org/), and BIOS .exe files).


User irc inside of default Ubuntu 16.04 Server?

Every Ubuntu system I have access to right now has this entry (and and accompanying entry irc:x:39: in /etc/group too).

As already has been stated that has mostly historical reasons. As you can see the directory /var/run/ircd doesn't even exist, the "user" cannot log in.  So it has no consequences, even on a production system.


X fail: "Screen(s) found, but none have a usable configuration"

I could solve it reconfiguring the GUI by executing:

Xorg -configure
dpkg --configure -a

and restarting. In my case it recovered the previous (correct configuration).


You don't need to reboot your computer to fix it. A better way to deal with it is using xrandr, which is the tool to manage the output of your displays.

First, run simply xrandr to get a list of all displays currently connected and their respective names (their connection). In possession of that information, you can run a simple command to 'reactivate' the secondary display and place it in the correct location. It would be something like:

xrandr --output SECONDARYDISPLAY --auto --right-of PRIMARYDISPLAY

You want to replace both the displays with the actual name you got from your xrandr. It is usually things like HDMI-A-0, DisplayPort-0, DVI-D-0, etc... If you connect the display to the left side of your main display, you also want to change the --right-of. Xrandr has many other options you might want to use, like setting offset, refresh rate, etc. For more, take a look at the man page.

In your case, since you are using two external displays, you might also want to set the primary display with xrandr, in case running simply the first command doesn't work. You can then combine both with something like:

xrandr --output PRIMARYDISPLAY --auto --primary && xrandr --output SECONDARYDISPLAY --auto --right-of PRIMARYDISPLAY

If you are satisfied with the results of the commands, you might want to add them to a shortcut, if you feel that is faster than running them from the command line. You might also want to add them to a script that is run on resume and placing it over at /usr/lib/pm-utils/sleep.d/.

Keep in mind that this issue might go away of it's own in the future. There are plenty of reports of similar issues, but the underlying cases can be very different. If you believe your case is very persistent, you could try opening a bug report. I personally used to have this problem a couple months ago, but it 'fixed itself', and I haven't had it ever since. I found that using: ctrl+alt+t (open terminal) typing 'xr' followed by 'UP' and 'ENTER' (this way my terminal would connect to the last used command that started with xr) was a good solution for me, specially because I also turn my secondary display off with xrandr from time to time.


The most probable reason is that you are not running the daemon. To start the daemon use
deluged

Then try deluge-console


Just run eclipse and it will start. There is no need to run it with sudo. The update-alternatives --install made soft link needed to launch Eclipse. That's the purpose of this tool.

However, if you install Eclipse from Software Center, it may override this link, so it is better to place it in /usr/local/bin. This directory has priority when executing commands by default.

Other solution is to manually sudo ln -s /opt/eclipse/eclipse /usr/local/bin. Notice that I'm using /usr/local prefix because it's more appropriate in this case.

UPD: It seems something wrong went while you was unpacking Eclipse. The execution bit has gone. To restore it, you need to run:

sudo chmod +x /opt/eclipse/eclipse


Single-click to open applications in Ubuntu Gnome 16.04.2

Try this setting:

Open files explorer and select preferences:

Go to behaviour tab and select single click option:

Now test it.


16.04 using llvm instead of graphics card

The issue seems to be resolved after re-installing xorg.

glxinfo now shows

OpenGL renderer string: Gallium 0.4 on AMD PITCAIRN (DRM 3.16.0 / 4.4.0-96-generic, LLVM 4.0.0)

Compiz now isn't eating 35 to 50% of my cpu anymore.


reinstall ubuntu without rebooting on usb pen drive

Ok I have to add a menu entry for grub2 in /etc/grub.d/40_custom and then run update-grub. I know how to do it for a simple partition, but not how to do it with a mdadm & lvm combination.

menuentry "Ubuntu 15.04 ISO" {
 set isofile="/home/serge/Downloads/ubuntu-15.04-desktop-amd64.iso"
 loopback loop (hd0,7)$isofile
 linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject
 initrd (loop)/casper/initrd.lz
}


As I write this, there seem to be quite a few open source tools similar to encfs (but more "modern" than encfs) that could be able to encrypt files in a "cloud friendly" way (i.e. providing per-file encryption, keeping modification times, and so on).

Most of them are fine if you are using only Ubuntu or any other Linux system (ecryptfs seems good), but things become difficult if you require interoperability with other OSes and mobile devices, as most of us is expecting nowadays.

Just to name a few:

Cryptomator seems to be the only one that works "everywhere", from any GNU/Linux OS to Android. There's even a PPA for  Ubuntu and binaries for several other distros and OSes.
ecryptfs works only on GNU/Linux systems (like Ubuntu, but also ChromeOS), and it's nice if you won't need to access your files from non-Linux OSes, but people say there may be some problems with cloud sync tools.
CryFS it's a young solution, works only on Linux for now, but there are plans to port it to MacOS and Windows as well. Maybe it worths some attention in the future.

You may find also interesting this comparison of tools from the CryFS website.


Is e4rat safe to use and will it really increase boot speed?

I tried it this weekend on a 12.04 (on a computer with a 1TB HDD and which has been upgraded 4 times without re-installation) and found it took 17 seconds off my boot process with no ill effects noticed.

It took me about 30mins to complete the process and I am happy with it so far.


How shall I get the message in "Sorry, Ubuntu 14.04 has experienced an internal error" in text?

Well I can tell you how to most likely fix that.
Try running sudo apt-get remove --purge apport and then sudo apt-get install apport before rebooting.


Switching window focus produces a small lag spike

I'm also seeing this on 16.04 with i5-4460 and a GTX 960 on a 32bit system (don't ask!)  I don't see it with nouveau drivers but I do with the NVidia proprietary ones (all I've tested up to 381.13.)

Probably the same issue as CPU spikes and performance problems changing window focus in Unity/Ubuntu 16.04.2.

Although not a proper solution, restarting unity by using unity --replace seems to work around the issue for that session. (You might need to try it again if it doesn't work first time.)

This could be related to bugs.launchpad.net/ubuntu/+source/unity/+bug/1300892. If you think that bug affects you then please do click "This bug affects me" at the top so that the maintainers get a good reflection of how many people this bug impacts as this is currently triaged as a low priority bug.

EDIT: It seems that adding the command /usr/bin/unity --replace command to "Startup Applications" does work okay as a kludgy but less temporary workaround.  :)


Perhaps you do not have enough permissions to access to the folder.
Try to use sudo command.

cd eclipse

sudo ./eclipse


How to configure UEFI booting on a Macbook 8,2

The tutorial you refer to in your question seems quite outdated.

Grub has had native EFI support since at least 2-3 official standard releases of Ubuntu.

To run your Mac in EFI mode i simply installed refind then boot the mac on a usb key with the standard ubuntu64, selecting the EFI boot option in refind for the Ubuntu installer.
a more detailed tutorial can be found here that also deals with some potential issues.

I use Ubuntu with my Macbook 8,2 15" and successfully switch between the two cards.
I wrote a howto for the actual switching here


No. The bootable USB is just for installation and can be removed afterwards. Once installed, Ubuntu will boot from the hard disk.


Can't connect to a remote server with Nautilus and a private key

The short version (skip the script) of Marcin Kaminski's solution is

ssh-agent
ssh-add /path/to/your/private_key
nautilus sftp://user@server

. I think it's easier to start with, to test if the solution works. I had the same problem after setting PasswordAuthentication no in /etc/ssh/sshd_config and these three commands solved my problem.


The installer is removed after installation is complete there is no (simple) way to invoke the wizard again. There used to be a package called base-config that you could use dpkg-reconfigure with, but it was removed and now you have to modify /etc/network/interfaces manually. See man interfaces for how that works.


Maybe the Windows update did change your energy settings configuration,
or the update somehow "changed"  something within the EFI boot partition.

First attempt :

Boot into BIOS - select Ubuntu in UEFI settings to be the default OS to boot.

When everything is fine now you're done - if not ...

Second attempt :

Boot into Windows - disable hibernation and Fast Boot.

To disable hibernation open command prompt as administrator and execute :

powercfg /h off

To disable Fast Boot open Control Panel (the old version - not the modern design),
select the Energy Settings, enable show hidden settings and uncheck Fast Boot.

After having done this shutdown the machine completely - do NOT reboot !

When everything is fine now you're done - if not ...

Third attempt :

Reinstall the GRUB boot loader to your Ubuntu installation  in EFI mode.
Boot from the Ubuntu installation media - open a terminal and execute:

    sudo mount /dev/sd*** /mnt
    sudo mount /dev/sd** /mnt/boot/efi
    for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
    sudo chroot /mnt
    grub-install /dev/sd*
    update-grub

Note:

sd* = disk | sd** = efi partition | sd*** = system partition

To identify the partition numbers use GParted - it is included in the Ubuntu installation media.
Boot into BIOS and select Ubuntu in UEFI settings to be the default operating system to boot.


Why Ubuntu uses eglibc instead of glibc?

Ubuntu is based on debian. This is an abridgment of Wikipedia:

  On 6 May 2009, it was announced that Debian would move from the GNU C
  Library to EGLIBC, citing problems with the development process of
  glibc. Debian and several of its derivatives now ship EGLIBC
  instead of glibc. EGLIBC is free software licensed under the GNU LGPL.

These are the reasons (form Debian is switching to EGLIBC):

  The EGLIBC is a variant of the GLIBC which stays source and binary
  compatible with the original GLIBC. While primarily targeted for
  embedded architectures, it has some really nice points:

  More friendly upstream (especially with regard to embedded    architectures): “Encourage cooperation, communication, civility, and
  respect among developers” (as opposed to this).
  Stable branch with fixes for important bugs (a real one, not like the GLIBC one which is left unchanged).
  Better support for embedded architectures.
  Support for different shells (GLIBC only supports bash).
  Support for building with -Os.
  Configurable components (do we really need NIS or RPC support in debian-installer?).
  Better testsuite for optimized or biarch packages.


How to check a mounted filesystem for errors in a reliable way

Because of the way that most Linux file systems work you simply cannot do a safe/useful check on a mounted file system. It's not really safe, and because the system is in use, it can be unreliable. Sadly, sometimes, you have to live with things the way they are until someone does it better ;). Ext4 probably won't pick up this feature (maybe ext5? if it ever happens) but I believe btrfs will, and if it does, you will be able to switch your partitions over when the time comes.


I am seeing this advice ... to quote "Try adding amdgpu.dc=0 to the kernel command line at boot"

Dual Monitors on 18.04 with Radeon RX 580 GPU

sudo vi /etc/default/grub

old

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

new

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amdgpu.dc=0"

save then issue

sudo update-grub

then reboot


If you have PlayOnLinux and Wine, I would suggest you to use the excellent Bandizip archive manager : http://www.bandisoft.com/bandizip/
It is a free (but not open source software) but it is the only solution I've found to open "rar" files on my Ubuntu.


Cannot install gnome-terminal due to problems with gconf2

Alright, this might be a roundabout way of doing things, but I've managed to get gnome-terminal running.

Since I was on 14.04 LTS, Ubuntu serendipitously gave me a prompt to upgrade to 16.04 LTS. Having backed everything up, I decided to just go ahead with the upgrade. 45 minutes later, sudo apt-get install gnome-terminal works, and so does gnome-terminal.

For anyone else that needs help with this issue, I guess what I'm saying is to just do an upgrade or reinstall. This has been a frustrating week.


"Z," "Tab," "1," and "ESC" keys are acting weird

Sounds like your CTRL key is stuck (CTRL+Z is normally undo). Try a different keyboard (if on a laptop, try an external one) to see if that works.

Also try cleaning your keyboard.


How do I install Google Chrome on Raspberry Pi 4 running Ubuntu 19.10?

Raspberry Pi4 uses 64-bit quad-core ARM Cortex-A72 processor, thus, all the applications running on it must be for ARM64. But on the other hand Google Chrome is only available for AMD64 CPU architecture. So, it's impossible to get Google Chrome on Raspberry Pi.

Alternatively you can use Firefox or Chromium browser.

Note: Chromium Browser on 19.10 is available only as a snap package.

Futher Reading:
What is the difference between ARM64 and AMD64? And which one is faster? - Quora


Chrome 35 stopped touch interaction after Chrome update on Ubuntu 14.04

Browsing the Chrome command line options at http://peter.sh/experiments/chromium-command-line-switches/ I tried option --touch-devices .

xinput list

gave the touch screen's id, leading to

google-chrome --touch-devices=10

which is working fine now. Chrome is started by a script automatically and responds to touch events afterwards.


Cfengine might be an alternative. You could also check this list of alternatives to puppet.


"OSError: [Errno 13] Permission denied" error

You have not specified the Python interpreter to use to create your virtual environment in ~/Public/Programming/project1/ directory.

From man virtualenv:

-p PYTHON_EXE,--python=PYTHON_EXE
The Python interpreter to use to create the new environment.

The -p option expects the next argument to be the python interpreter on which the new environment would be based. But you missed that argument and virtualenv thinks you want to base your environment on ~/Public/Programming/project1/ interpreter. But there is no interpreter available there, and hence you get that OSError.

If you want to use Python 2.7, the correct command would be:

virtualenv -p python2.7 ~/Public/Programming/project1/

and for Python 3.4, it would be:

virtualenv -p python3.4 ~/Public/Programming/project1/


/usr/sbin/grub-mkconfig: 11: /etc/default/grub: : Permission denied

The error is the space in the assignment in
GRUB_CMDLINE_LINUX= ""

at line 11 of the /etc/default/grub file. It causes the shell (probably /bin/sh) to parse it as "assign nothing to GRUB_CMDLINE_LINUX and then run a command with no name with GRUB_CMDLINE_LINUX in its environment".
You can replicate the format of the error as follows:
$ sh -c 'GRUB_CMDLINE_LINUX= ""'
sh: 1: : Permission denied

whereas bash reports the somewhat more helpful
$ bash -c 'GRUB_CMDLINE_LINUX= ""'
bash: : command not found

The line should read
GRUB_CMDLINE_LINUX=""

although GRUB_CMDLINE_LINUX= should work as well.


Overheating issue with Dell inspiron n4050

I'm going to throw out my two cents here, but a few years back I had an HP laptop doing something very similar under Windows 7.  Come to find out it manifested itself as a driver/Windows error, but was in fact a hardware issue.  I don't know if the older laptops didn't have very good quality control or if they hadn't tested the hardware in conjunction with each other. You may try an external source of cooling pad with fans?  I know that isn't the best answer but I hope it helps.
One question I have for you - were you running Windows before; if so, did it do this as well?


Package error making it unable to install anything in 12.10

I found the fix to this, I just typed this command into the Terminal:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/elementary-theme_3.2-0~r601+pkg289~quantal1_all.deb

Then I re-entered the previous command:

sudo apt-get -f install

Then everything went back to normal and now everything is working just fine.


If you do not want to create a separate partition (volume) for your encrypted files, then you should use eCryptfs.

eCryptfs stores cryptographic metadata in the header of each file
written, so that encrypted files can be copied between hosts; the file
will be decryptable with the proper key, and there is no need to keep
track of any additional information aside from what is already in the
encrypted file itself.

Installation of eCryptfs:
$ sudo apt install ecryptfs-utils

Setup is easy. First, create your “private” directory that will contain the encrypted files and sub-directories. For example:
$ mkdir ~/Documents/private

When this directory is not “mounted”, you can look at the contents of the files in it, but you will see nothing meaningful, since everything will be encrypted. To use (read & write) to the unencrypted version of it, you should “mount” this directory. You can mount this directory over to itself like this:
$ sudo mount -t ecryptfs ~/Documents/private ~/Documents/private

Since this is the first time you try to mount this directory with eCryptfs, you will answer a few questions like this:

First, enter a passphrase that you will never forget.
Cipher: aes (default)
Key bytes: 32
Plaintext passthrough: n (default)
Filename encryption: n (default)

Now, the important warning:
WARNING: Based on the contents of [/root/.ecryptfs/sig-cache.txt],
it looks like you have never mounted with this key
before. This could mean that you have typed your
passphrase wrong.

Would you like to proceed with the mount (yes/no)? :

Since this is the first time you mount this directory, you will answer yes so that a new file called ~root/.ecryptfs/sig-cache.txt will be created, which will contain a “signature” of the passphrase.
Would you like to append sig [xxxxxxxxxxxx] to
[/root/.ecryptfs/sig-cache.txt]
in order to avoid this warning in the future (yes/no)? :

Answer also yes to this question so the file ~root/.ecryptfs/sig-cache.txt will be populated.
Later, when we re-mount this directory we should not get this warning, unless we enter the wrong passphrase.
Create a file in the private directory. For example:
$ ls -al > ~/Documents/private/1.txt

Note the length of the file:
$ wc -c ~/Documents/private/1.txt
4935 ...

Unmount the directory:
$ sudo umount ~/Documents/private

Look at the encrypted version of the file in the unmounted ~/Documents/private directory:
$ less  ~/Documents/private/1.txt

It seems like a binary file, because its contents are encrypted.
Look at the length of the file:
$ wc -c ~/Documents/private/1.txt
16384 ...

It is a few kilobytes larger than the unencrypted file, since it contains some metadata. This is the whole overhead of eCryptfs on your file system: Each file will be about 8 to 16KB larger that what it would be if it were not encrypted.
Re-mount the directory using the command:
$ sudo mount -t ecryptfs ~/Documents/private ~/Documents/private \
-o ecryptfs_cipher=aes,ecryptfs_key_bytes=32,ecryptfs_passthrough=no,\
ecryptfs_enable_filename_crypto=no,\
ecryptfs_sig=$(sudo cat ~root/.ecryptfs/sig-cache.txt)

Enter correct passphrase. If you enter the wrong passphrase, you will get the message:
WARNING: Based on the contents of [/root/.ecryptfs/sig-cache.txt],
it looks like you have never mounted with this key
before. This could mean that you have typed your
passphrase wrong.

Would you like to proceed with the mount (yes/no)? :

In such a case, answer no to this and re-try with the correct passphrase.
Check the contents once more.
$ less ~/Documents/private/1.txt
$ wc -c ~/Documents/private/1.txt
4935 ...

For more information, look at man ecryptfs.


Unable to extract OneDrive ZIP file on Ubuntu 18.10

I know this question was posted over a year ago, but after running into what looks like the exact same issue I might be able to provide some answers. The most likely cause of this interoperability problem is OneDrive's implementation of the ZIP64 extension, and to be more precise the value of the "total number of disks" field in the "zip64 end of central dir locator". In the OneDrive files, this value is set to 0 (zero), whereas most reader tools expect a value of 1.

For more information here's a detailed write-up I posted on my blog:

https://www.bitsgalore.org/2020/03/11/does-microsoft-onedrive-export-large-ZIP-files-that-are-corrupt

If you're comfortable with a bit of Hex editing, you can provisionally "fix" affected files by changing the first byte of the "total number of disks" field in a hex editor, again see my blog post for details.

UPDATE: partially prompted by my blog post someone has written a Perl script that fixes these files automatically, see this link for more details:

https://unix.stackexchange.com/a/590034

Direct link to the script:

https://github.com/pmqs/Fix-OneDrive-Zip

In addition, this support page from Microsoft says (3rd 'Notes' section from top):

  Downloads are subject to the following limits: individual file size limit: 10GB; total zip file size limit: 20GB; total number of files limit: 10,000.

So for a 45 GB directory you might hit these size limits as well.


How to make applications save dotfiles at a specified path?

In short, no.  There is no environment variable that will force applications to save their dotfiles to any path other than $HOME.

An alternative, semi-manual approach would be to use GNU Stow, a symlink farm manager, to move config files for binary packages, as described in this blog post.


Switch between two nvidia-settings metamodes from commandline

You almost gave the answer yourself.
xrandr -s N switches to metamode N, so you can use xrandr -s 0 and xrandr -s 1 to turn the second monitor on and off. Works fine on my pc.

EDIT: Found one problem:
I have both panels at the bottom. After swiching the Metamode, they share the same height (only one is visible, switches randomly when mousing over). I have to set one to top and back to bottom for the other to be displayed above it.

EDIT: Found solution: Use gconftool-2 --dump /apps/panel to get the current settings, move the panel, get the changed settings and find what changed with diff.
Using that information I created two files, one for pannel at the top, one at the bottom. Now I can script change of the Metamode and moving the panel.


I have an HP with Windows also installed on the same hard drive, HP also uses backup partitions.
From my experience the Ubuntu installer seems to recognize the recovery partition as a windows file system and does not overwrite it. You will have access to the recovery partition at boot. I can't give you a screen shot but the bootloader (grub) will have:

  Windows (Version) loader on dev/SdaX (Where X is any number)

and

  Windows (version) loader on dev/sdaY (Where Y is any number other then X)

and when you choose the loader on sdaY it should boot into the recovery partition which would include your boot repair/windows recovery/repair tools. Since the recovery partitions are alternate partitions it will not overwrite them.

My suggestion is that when you are installing choose the "install alongside" button so that it will roughly split your HD in half and put windows on half and Ubuntu on half. And during installation the bootloader (GRUB) will locate and determine which partitions are bootable and will give you the option of which to boot upon startup.

In the picture below I took a picture of my bootloader, the last 2 entries are Windows, the second to last is the actual operating system whereas the very last issue is my recovery tool/partition. Do note that one is located on /dev/sda1 and the second is located on /dev/sda2.

Hope that helps you out, if not please reply back.


The binary R is usually placed in /usr/bin/R and not in /usr/local/bin/R. Therefore you haven't installed the package via a package manager from the standard repositories.

/usr/bin/R is part of the package r-base-core, therefore try this:

sudo apt-get remove r-base-core

Additionally check the subfolders in /usr/local for more R-stuff to remove, E.G.:

sudo rm /usr/local/bin/R

A full list of the possibilities:

dpkg --listfiles r-base | sed 's/usr\//usr\/local\//'
dpkg --listfiles r-base-core | sed 's/usr\//usr\/local\//'

To use the R from your configured repositories:

sudo apt-get install r-base


Where are hvm kernel and initrd for ubuntu 20.04

http://cdimage.ubuntu.com/ubuntu-server/daily/current/focal-legacy-server-.iso

It appears to be here. And here's some extra characters so the answer will take. 8-)


How come I can not install plugins on my local Wordpress install?

Did you read the README file into the .zip file :

== Installation ==

The automatic plugin installer should work for most people. Manual installation is easy and takes fewer than five minutes.

Create a stats directory in your plugins directory. Typically that's wp-content/plugins/stats/.
Into this new directory upload the plugin files (stats.php, etc.)
Activate the plugin through the 'Plugins' menu in WordPress.
It will ask you to enter your WordPress.com API key. Don't use somebody else's key!
Sit back and wait a few minutes for your stats to come rolling in.


You tried to pass through a USB device that does not exist:

failed to find host usb device 1:4

There is no USB device on bus 1 address 4.

Most likely the problem is that the device is at a different address.

Try using the lsusb command to locate the correct address for the device, and then editing the libvirt XML configuration for the VM to provide the correct address.


Installation of google-chrome overrides preferences for 'default browser'

Click on the Unity button (top-left) and type and click on Preferred Applications. In the Internet tab you'll be able to choose the Default Web browser you want.


Second monitor is not detected after reconnecting Ubuntu 20.04LTS Intel UHD

I noticed that there might be a problem in the openGL settings under hard info
found the solution here
sudo apt-get install mesa-utils
fixed my problem


Is there a way to run a command in fstab if a mount fails?

Since nobody's suggested an answer, I kinda came up with one on my own. Running a bash script on startup containing the following should work:

if [ `ls /media/user/drive` = "ls: cannot access 'drive': No such file or directory" ]; then
    ntfsfix /media/user/drive
fi


How can I get my trackpad mouse to work again on Thinkpad 11e?

I found similar issue on same hardware with Xubuntu 18.04.1 (Xubuntu 18.04 -> 18.04.1 Upgrade Synaptics Touchpad Not Working )

I checked the kmod package version history (sudo apt-get policy kmod), then downgraded it to the previous version (sudo apt-get install kmod=24-1ubuntu3 libkmod2=24-1ubuntu3) and re-created the initramfs images (sudo update-initramfs -k all -c), then rebooted the laptop. Trackpad works again!

paul@paul-ThinkPad-11e:~$ apt-cache policy kmod
kmod:
  Installed: 24-1ubuntu3.1
  Candidate: 24-1ubuntu3.1
  Version table:
 *** 24-1ubuntu3.1 500
        500 http://nz.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
       100 /var/lib/dpkg/status
     24-1ubuntu3 500
        500 http://nz.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

paul@paul-ThinkPad-11e:~$ sudo apt-get install kmod=24-1ubuntu3

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

The following packages have unmet dependencies:
kmod : Depends: libkmod2 (= 24-1ubuntu3) but 24-1ubuntu3.1 is to be installed
E: Unable to correct problems, you have held broken packages.

paul@paul-ThinkPad-11e:~$ sudo apt-get install kmod=24-1ubuntu3 libkmod2=24-1ubuntu3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be DOWNGRADED:
  kmod libkmod2
0 upgraded, 0 newly installed, 2 downgraded, 0 to remove and 31 not upgraded.
Need to get 129 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://nz.archive.ubuntu.com/ubuntu bionic/main amd64 kmod amd64 24-1ubuntu3 [88.6 kB]
Get:2 http://nz.archive.ubuntu.com/ubuntu bionic/main amd64 libkmod2 amd64 24-1ubuntu3 [40.1 kB]
Fetched 129 kB in 1s (194 kB/s)
dpkg: warning: downgrading kmod from 24-1ubuntu3.1 to 24-1ubuntu3
(Reading database ... 162359 files and directories currently installed.)
Preparing to unpack .../kmod_24-1ubuntu3_amd64.deb ...
Unpacking kmod (24-1ubuntu3) over (24-1ubuntu3.1) ...
dpkg: warning: downgrading libkmod2:amd64 from 24-1ubuntu3.1 to 24-1ubuntu3
Preparing to unpack .../libkmod2_24-1ubuntu3_amd64.deb ...
Unpacking libkmod2:amd64 (24-1ubuntu3) over (24-1ubuntu3.1) ...
Processing triggers for ureadahead (0.100.0-20) ...
ureadahead will be reprofiled on next reboot
Setting up libkmod2:amd64 (24-1ubuntu3) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.11) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up kmod (24-1ubuntu3) ...
Installing new version of config file /etc/modprobe.d/blacklist.conf ...

paul@paul-ThinkPad-11e:~$ sudo update-initramfs -k all -c
update-initramfs: Generating /boot/initrd.img-4.15.0-43-generic
update-initramfs: Generating /boot/initrd.img-4.15.0-29-generic
paul@paul-ThinkPad-11e:~$


Switch from Ubuntu 17.10 to something newer that is supported

Yes, you can upgrade from 17.10 to 18.04. 18.04 is the current Long Term Support version which is supported here until 2023.  The red and pink bars show versions of Ubuntu which are supported here.

Yes, you can keep using 17.10, but we're not able to support that old version which is well past its End Of Life.  Of course, there are other support sites and commercial support from third parties.

To update, run the Software Updater; the process is explained in detail here.; or, open a terminal window and run

sudo apt update  && sudo apt upgrade && sudo apt dist-upgrade && sudo apt autoremove && sudo apt install update-manager-core && sudo do-release-upgrade

Once you've completed the upgrade to 18.04 LTS, then the jump to the upcoming version 20.04 LTS will be much easier. You can, of course, wait until all the rough edges has been rubbed off 20.04 to do that upgrade.


Problem with terminal after following instructions: '[How to] Connect your Android Ice Cream Sandwich Phone to Ubuntu for File Access'

This appears to be because you copy-pasted the command to echo the alias to your ~/.bashrc file direct from the website, which unfortunately contains HTML/Unicode quotes (&#8220; and &#8221;) in place of regular ASCII double quotes - the webpage has this warning:

  re-type the quotes in each command after you’ve copied, otherwise the command won’t work

as you have found. You will need to edit your ~/.bashrc and correct the quote marks, after that the errors should go away.