Can I delete GRUB which doesn't appear at startup?

I have just installed Ubuntu 16.04 (on legacy) alongside Windows 10 (on UEFI) on a Dell Inspiron 5567. It works fine.

This type of mixed-mode configuration is sub-optimal at best. You've clearly gotten it working, but you should be aware that there are easier ways to do it. You may want to consider switching to one of them as part of the solution to your problem. For some general information on this topic, see my Web page on the CSM.

  I have arranged it so that Ubuntu boots first. Windows can be booted from BIOS.

Technically speaking, you don't have a BIOS; you have an Extensible Firmware Interface (EFI). What you refer to as a "BIOS" is better called a "boot manager" generically, or the EFI's built-in boot manager specifically; but in online forums, the term Basic Input/Output System (BIOS) is often used synonymously with the term firmware, which is in fact a more generic term. That is, BIOS and EFI (or its version-2.x variant, UEFI) are two different types of firmware. One feature provided by most EFIs and most modern BIOSes is a built-in boot manager; but that's a feature of the firmware, not the BIOS, EFI, or firmware itself. Unfortunately, many manufacturers muddy these waters by referring to their EFIs as "BIOSes" or "UEFI BIOSes."

Note that I'm not trying to be pedantic or picky here; I'm trying to be clear. I infer from your question that you have an incomplete mental model of the various components and how they fit together, but a more complete model will help you navigate these waters.

  On GParted GRUB appears between Windows and Ubuntu, but it doesn't appear at the startup of the computer. It's not a big problem, because I don't think I need it.

By "GRUB" (or later references, using the word "it"), you're referring to at least three different but related things:

The BIOS Boot Partition, which GParted identifies by a bios_grub flag.
The GRUB 2 boot loader menu, which you see when you boot the computer.
The GRUB 2 boot loader code, which loads the Linux kernel into memory and executes it.

GRUB 2 is a boot loader, which is a program that loads an OS kernel into memory and executes it. GRUB 2 also provides boot manager functions, which means it presents a menu of boot options. These two general types of programs are distinct; a program can be a boot loader but not a boot manager or vice-versa. GRUB 2, though, provides both functions in one program. That said, if Ubuntu is installed as the only OS on a computer, or if the scripts that configure GRUB don't recognize another OS as being bootable, GRUB will be configured in such a way that it presents no boot menu -- that is, GRUB will operate as a boot loader but not as a boot manager. It's critical to understand, though, that GRUB is still running and is still doing a critical task in booting the computer, even though you never see its menu.

Depending on the boot method (BIOS vs. EFI) and other factors, GRUB can reside in several different places on the hard disk. In a BIOS-mode boot from a GPT disk (which is what you've got), GRUB will be scattered about in various locations, one of which is in the BIOS Boot Partition. Thus, deleting the BIOS Boot Partition will render Ubuntu unbootable until the problem is fixed. Also, moving the BIOS Boot Partition will render the computer unbootable. Thus, if I understand your situation correctly, you do need the BIOS Boot Partition on your computer -- at least, in its current configuration.

  I want to expand the partition of Ubuntu. The problem is that my free space lays between the partition of Windows on one side, and GRUB and the Ubuntu partition in the other side.

If I understand correctly, your partition layout looks something like this:

+-----------+-------+----------+
|  Windows  |  BBP  |  Ubuntu  |
+-----------+-------+----------+

You want to expand the Ubuntu partition and shrink the Windows partition. If so, you have several options:

Shrink the Windows partition, create a new partition in the freed space, and add it to Ubuntu as a separate filesystem -- perhaps mounted at /var or /home, say. This will likely involve moving some files from the old to the new location. Details would have to depend on the specific sizes involved. See this question and answers for some more information on this approach.
Resize the Windows partition, move (or delete and re-create) the BIOS Boot Partition, resize the Ubuntu partition, and then re-install GRUB. The last step would require use of an Ubuntu emergency disk booted in BIOS mode. A tool like Boot Repair might help with this.
Delete the BIOS Boot Partition, resize your partitions, and install an EFI-mode boot loader for Linux. Two options will be easiest to handle for this:

You can install an EFI-mode version of GRUB by booting an Ubuntu emergency disk in EFI mode and either installing it manually or running Boot Repair.
You can install my rEFInd by installing it from Windows or by preparing a USB flash drive or CD-R (image for both are available on its downloads page), booting with it, and then installing the Debian package or PPA.

Since you say your Ubuntu installation is new, you might consider completely deleting it and re-installing it from scratch with a larger partition size, after you shrink the Windows partition.

There may be other options if you've installed Ubuntu using the Logical Volume Management (LVM) system.

Note that either of the second and third options requires resizing the Ubuntu partition from its start point, which is more time-consuming and riskier than adjusting a partition's size from its end point. Thus, the first option is likely to be safer and faster; but splitting your Ubuntu installation into multiple partitions at this point may be awkward, depending on the sizes involved.

If you "bite the bullet" on the resizing operation, I recommend going for an EFI-mode boot loader, since that's likely to be less awkward and confusing in the long run. Likewise if you choose to re-install Ubuntu from scratch.


Folders on Android Internal Storage show as files via MTP?

The issue was fixed by painstakingly recreating the folder structures of my phone's internal storage and moving the files from the old [corrupt?] folders to new directories using my phone's file manager. These new directories showed correctly on desktops.

Nautilus, and any other desktop file manager was not useful for such a task, as these such "broken" folders displayed as regular files via MTP.

Hard problem to explain, still not sure what happened exactly, but I got my data back into real folders.


You do not have to download Skype from the website.

Have a look at: https://help.ubuntu.com/community/Skype


Restricting certain actions in a directory

I'd make the programs run as a dedicated user (maybe one per program, depending on your requirements) and only allow it to read/write/execute in a dedicated directory.

chroot requires root provileges, so it isn't applicable here.


Will Ubuntu phone edition work with snapdragon CPUs?

Whne it is finally released (it will hopefully be the same image for both phone and computer)it it will almost definitely support snapdragon and many well known arm based chipsets, I don't know about exynos chips but maybe it'll support them too. I wouldn't count on it running on older phones but I expect it will support the current flagships from most major vendors, all the way back to phones with chipsets like the snapdragon 400 or even earlier.


What files can I delete to avoid repeating the Python libraries?

This is one of the downsides of installing software from outside of the standard repositories. For most people, it isn't a big problem, but for you it appears to be an issue due to disk space.

The apps you've downloaded use their own versions of various libraries and software components, and have been tested to work with those components. Removing them will likely cause those programs to be unstable or stop working.

It sounds like you would be safe to remove the texlive-related packages that you've installed via your package manager. That will free up some disk space, as texlive packages are pretty large.

I would recommend:

sudo apt-get remove texlive* && sudo apt-get autoremove && sudo apt-get clean

That will remove the texlive packages you installed, remove any dependencies that are no longer needed, and then clear your cache of packages you previously installed.

As another commenter suggested, though, you might want to consider a backup drive, or (if you can afford it) even a new, larger hard drive. Hard drives are not so expensive these days.


How to fix "bad interpreter" problem when running pip3 on Ubuntu 20.04 WSL?

Why did you type pip3 install pandas instead of python3.8 -m pip install pandas ? python3.8 in this command is the target interpreter.

There's no need to use pip to install Pandas in Ubuntu 20.04. The python3-pandas package is in the default Ubuntu 20.04 repositories. To install it type:
sudo apt update
sudo apt install python3.8 python3-pandas


Backup failing due to Kernel Panic/Task Delay in Ubuntu 14.04 LTS

Posting answer for the benefit of anyone else with a similar problem: Turns out the deadlocks/failures were due to the backup drive's pending failure. Bought a new backup drive and the problem went away instantly. Sometimes, the answer is right in front of your nose...


How to easily open the Launcher with a secondary monitor to the left

Create a Mouse Void

This is quite a long answer that I felt is better kept separate from my other one.

So that you understand where this solution came from, my monitor layout is as follows:

The two black area 1280x88 are off the screen but my mouse can still enter this due to an X bug. The workaround is a small program that prevents the mouse entering this void called XCreateMouseVoid.

Home Button Mouse Stopper

You can also use XCreateMouseVoid to create a small box that the mouse will stop against when pushed into the top left corner of the primary screen. This is what I have shown in green area of this image:

Installing

Download XCreateMouseVoid and extract the files to your home folder
Open the folder in Terminal and run this command:

cd ~/XCreateMouseVoid && make

Test the program with values:

~/XCreateMouseVoid/XCreateMouseVoid 0 0 1280 88

Add to Startup Applications so its always runs upon bootup.

Calculate Values

The values required for XCreateMouseVoid are: x, y , w, h

x & y refer to the start co-ordinates of the rectangle. These co-ordinates are based upon the whole desktop area and not individual monitors.
w & h refer to the width and height of the rectangle

For my setup to stop the mouse entering the top and bottom black 1280 x 88 areas along with stopping it travel past the Home Button, I run two instances of the program with these values:

XCreateMouseVoid 0 0 1280 88
XCreateMouseVoid 0 1112 1280 88

Small Rectangle

If you have a different setup you can create the small rectangle as I mentioned earlier. The rectangle measures 60 x 25, which is the minimum width needed to properly stop the mouse.

The only value you need to change is x which is calculated by subtracting 60 from your secondary monitor's width. e.g. 1280 x 1024 monitor I subtract 60 from 1280 to get the value 1220 for XCreateMouseVoid:

XCreateMouseVoid 1220 0 60 25

Trapped Mouse Cursor

Occasionally the mouse cursor can jump into the created mouse void and become trapped. The solution is to press either the Super or Menu key so that a menu opens and frees the mouse cursor.


That is because Vt/x is disabled , you can enable in BIOS look for it in there

Hope this helps!


12.04 installer won't accept mis-alligned partition

If you allow the 12.04 installer to create the partitions it will round up the starting and ending sectors so that they will fall on a megabyte boundary--even if the preceding partition doesn't end on a megabyte boundary. In fact, it only allows locations and sizes to be specified as integral number of megabytes.

I suggest that you use the installer to add the partition(s) you will be using for Ubuntu (by clicking Other rather than choosing to format the entire disk, of course).

As an example I manually created a first partition ending at sector 4000 and allowed the Ubuntu installer to create the root partition following it. The following was the result:

   Device Boot      Start       End      Blocks    ID  System
/dev/sda1           2048        4000       976+    83  Linux
/dev/sda2           4096    20969471   10482688    83  Linux

I was able to get the install going on /dev/sda2.

I must admit it's not clear to me what panel is displaying the message you are seeing. The partitioning panel has Quit, Back, and Install Now buttons at the bottom.

If you don't find this helpful please post more information about how you partitioned the disk and where you are getting the message.


Chromium widevine doesnt work on Ubuntu 17.04

I was able to make this work but I needed to use the dev ppa of chromium which is here, then re-copy the widevine* libraries from the latest chrome package (which you can download from google as normal but open with file-roller to get at the libraries). I'm not sure if this is a bug in the version of chromium that is distributed with ubuntu or if ubuntu patches it to refuse to load the DRM component.

Additionally, most sites that use widevine also check your user agent to make sure you are on a supported browser, and while chrome is supported chromium is not. It is also not enough to just approximate a correct browser either, you need the entire user agent, the most straightforward being a recent google chrome UA.

I found that

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36

works for spoofing chrome 58.0.3029.81 on Linux.


Ubuntu 12.04 LTS installation. Windows 7 not detected

First you have to make a separate partition for installing ubuntu.For that you have to install gparted on live usb.

 sudo apt-get install gparted

Open gparted and create new ext4 partition from that unallocated space.
Now run the ubuntu installer and select the something else option.
Now select the created ext4 partition and install ubuntu to it.And also create a swap partition(size will be double the RAM size).


Laptop shuts down completely, but then powers on automatically again

OK since my previous answer wasn't on point I decided to edit it, here goes:
I don't own the laptop but I Googled the issue and as it turns out it's a common issue that isn't related to Ubuntu, according to this thread from Tom's hardware it was fixed by changing the charger.

Try a different charger and see if the problem persists, good luck.


I'll just copy-paste one of my previous answers here:

-----------------------------------------------------------------------------

The easiest thing to do is add that resolution using xrandr - this is a good guide. You would then need to add the xrandr configurations to a startup file, so that you'll get your desired resolution upon reboot/startup:

Create a bash script, xrandr.sh for example, and place your xrandr commands into it: #!/bin/bash
sudo xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
sudo xrandr --addmode Virtual1 1920x1080_60.00
xrandr --output Virtual1 --mode 1920x1080_60.00
Make the script executable with chmod +x xrandr.sh
Search for "Startup Applications" in the dash, run it, and add the script as a startup application.

The commands will now run every time you log into your account.

OR you can go the easy way and use a program that does the above for you -  ResolutionX.


Cannot perform installation due to "This application has failed to start because the application configuration is incorrect." error

You can use Wubi, just don't try to do so by unpacking the ISO image like an archive. Instead, you can download Wubi.exe from the Ubuntu website (where it is called "the Windows installer"), then put it in a folder with the ISO image. This folder should contain just two files--Wubi.exe, and an Ubuntu ISO image for the same version of Ubuntu. Then run Wubi.exe, and it will install Ubuntu, using data from the ISO image.

This was essentially answered by bcbc in a comment:

  You lose me at 'unzipping the file'. You can either download wubi.exe
  and run it, or the Desktop ISO. You don't unzip the ISO although some
  archival software will open ISOs for you. If you have the ISO, then
  download wubi.exe (make sure it's the same release) and place it in
  the same folder as the ISO and run Wubi.

Or you can run Wubi.exe without the presence of an Ubuntu ISO, and it will automatically download the Ubuntu ISO image and use the image it downloads. (This might be seen as unnecessarily wasteful and slow if you already have the ISO image you need, though.)


Transfered from Chrome OS to Ubuntu, is on Version 16.04, don't know how to update

To upgrade your Ubuntu version via terminal enter the following command:

sudo do-release-upgrade


This bug was already pointed out in https://bugs.launchpad.net/ubuntu/+source/unity-webapps-gmail/+bug/1245027.

In order to solve it, you have to install the package available here:
https://launchpad.net/~justinmcp/+archive/webapps-ppa. More precisely:

to add ppa:justinmcp/webapps-ppa to your system's Software Sources, open a terminal and enter:

sudo add-apt-repository ppa:justinmcp/webapps-ppa

to pull down the latest list of software from each archive it knows about, including the PPA ppa:justinmcp/webapps-ppa you just added:

sudo apt-get update

It works fine for me (Ubuntu 13.10 Saucy, 64-bit).

See also these questions: ubuntu 13.10 webapps, Gmail Webapps and 13.10 - Unity and Message Me Menu Integration


Command Execution With Arguments Have No Relation with Stdin?

To demystify the difference between command line arguments and stdin. I am going to divide my answer into multiple parts explaining the underling concepts. Then answer your question.
Before I start explaining, do keep the following things in mind:

In Linux everything is considered as a file.
I assume you have read the entire post provided in the question.
I am going to take help of C program to explain the difference, therefore I assume you know basic syntax. Still I will explain as much as I can.

stdin and command line arguments
Standard Input is a file Linux which is accessed by programs to take input from the user. Any program cannot directly interact with Keyboard instead they interact with stdin. So if a program needs to take an input from user it will access stdin.
When you use redirection (> or <) or pipe (|) it with other command it manipulates the input and output steams, i.e stdin and stdout. When you specify these special characters they instruct stdin and stdout how to function. In Linux, stdin is /proc/self/fd/0 , and stdout is /proc/self/fd/1
Command line arguments are basically a method to take input from used along with the invocation of command to make the command do some specific task. It is not necessary for each and every program to have command line arguments, as it is up to the developer of the following program to use them.
Command line arguments are passed to a command as an array. ( Array is a data structure consisting of a collection of elements, each identified by at least one array index or key. ). Hence the values in that array can be used by the programmer to add more functionality to their program.
Examples of C Program
#include<stdio.h>

int main(int argc, char *argv[]) {
    if(argc==2)
        printf("Welcome Master %s\n", argv[1]);
    else {
        fprintf(stderr, "Usage : %s <name>\n", argv[0]);
        return 1;
    }
    return 0;
}

In the above program, the program does not take any standard input from user however it does take command line arguments and works differently depending upon the argument is provided or not.
argc is a variable which stores the count of arguments passed and argv is an array which stores the arguments passed while invoking the program. argv[0] is the first element in the array which contains the name of the program itself. After that array will contain the arguments passed.
When I execute the following program by typing "./batman", I get following output:

Usage : ./batman

But when I execute the same program by typing "./batman Bruce". I get :

Welcome Master Bruce

Now this does not mean this program cannot take input. Below is modified program which takes both command line argument and standard input.
#include<stdio.h>

int main(int argc, char *argv[]) {
    int pass = 0;
    if(argc==2){
        printf("Welcome Master %s\n", argv[1]);
        printf("Kindly provide password : ");
        scanf("%d", &pass);
        if(pass==1234)
            printf("Batcave Access granted\n");
        else
            printf("Batcave Access declined\n");
    }
    else {
        fprintf(stderr, "Usage : %s <name>\n", argv[0]);
        return 1;
    }
    return 0;
}

The above takes a command line argument then wait for user to enter password through standard input.
If we don't specify any argument it will throw an error just like in previous C code.
Below is the output when program is executed :

mars@HP-Notebook:~/Desktop/Practice/cpp$ ./batman3 Bruce
Welcome Master Bruce
Kindly provide password : 1234
Batcave Access granted
mars@HP-Notebook:~/Desktop/Practice/cpp$ ./batman3 Joker
Welcome Master Joker
Kindly provide password : 123
Batcave Access declined
mars@HP-Notebook:~/Desktop/Practice/cpp$

After passing the command line argument this program waited for password which was supposed to be entered by the user, hence through stdin
What is the conclusion then?
I hope you understood the concepts I explained above. Now time to answer those questions.

Yes, command line arguments have no relation with stdin and stdin in that case is just pointing to your input device but not being used.
stdin is itself is a file which by default points to your input device and takes input from there. However when you provide pipe or redirection in your command it tells the stdin to take input from the file you specified instead of input device attached to you computer.

If you didn't understand the C program it's alright. This time lets use an in-built command instead of custom made program.
Example of command instead of program:
cat file_name
cat < file_name

the output will be identical because the corresponding developer makes cat to either read data from stdin or read the data from the file, whose name is given as the first command line argument (which is the first element in the array the shell passes to cat).
Subsequently cat writes the whole content of file_name or stdin to the terminal since we don't instruct the shell to manipulate stdout. Remember that in the second line your shell manipulates stdin in this way, that it doesn't point to your standard input device any longer but points to a file called file_name in your current working directory. This example was taken from another post, you can click here to read more
I hope this not only provided you with the solution to the question but also helped you understand the underlying concepts.


What do I have to do getting access the port 8787?

The <server-ip> part of that command means to insert your computer's IP address there. For example, if your computer's IP was 192.168.0.256, you would go to:

http://192.168.0.256:8787

If you want to access it from another computer in the same LAN, just go to that same address. If you want to be able to access it from any computer on the internet, you'll have to setup port forwarding on your router's firewall. For more details, see this answer.

If you don't know your IP address, open a terminal, and run hostname -I (CaSe sensitive)


Problem in installing internet explorer 8

Rather than use playonlinux use wine and the latest winetricks. I have managed a successful installation of ie8 on Bionic Beaver using the following 3 steps:

1. Install Wine and Winetricks

Install the repository Wine but a more 'cutting edge' version of winetricks:

sudo apt-get install wine cabextract
sudo apt-get remove winetricks
wget  https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
sudo mv -v winetricks /usr/local/bin

2. Set a 32bit prefix and install ie8

You will need a small amount of command line athleticism to create the 32bit prefix required by ie8's installation:

WINEARCH=win32 WINEPREFIX=~/.wine_32 winecfg
WINEPREFIX=~/.wine_32 winetricks ie8

3. Run this aged browser

To get it all running from the command line run the following:

WINEPREFIX=~/.wine_32 wine 'C:\Program Files\Internet Explorer\iexplore'

And there you will see this ancient, Windows browser in all of its glory! Obligatory screenshot here of the successful installation on my own system:


Error installing `CLHEP` : make: *** [install] Error 1

cd ~/CLHEP-build
cmake -DCMAKE_INSTALL_PREFIX=~/CLHEP ~/CLHEP-source/2.3.1.0/CLHEP
make
make test
make install
PATH="$PATH":~/CLHEP/bin


first of all you should install the photorec tool. tpye in terminal.
         sudo apt-get install photorec
after installing that enter the terminal as follows
         sudo photorec
it will definitely recover all the data from your disk


When installing Haskell, dependency is not satisfiable: ghc6 (< 6.12.1+)

Yes, this is because of a bug introduced in Natty; this is Bug #742052.

Unfortunately there's not much you can easily do to get around this.


Undo Dual Boot to use Ubuntu Exclusively

You can see all the partitions in gparted; good. That means there's no Windows Dynamic Disk partitions to deal with. Here are suggestions regarding partitioning.

I don't see any reference to your backups. Making partition changes is the easiest way to accidentally lose all your data and configurations. Please back up your important files to another physical drive (internal or external, or cloud) and verify the backup matches the source files. Then, back up again to different media (again, not the same drive as you are partitioning), and verify that backup matches the source. Then, you can begin making changes after booting from a LiveUSB you trust.
Since /dev/sda1 is the boot partition, do not change it or try to move it; therein lies peril.
/dev/sda2 through /dev/sda6 and /dev/sda10 are all Windows-specific, and can be removed.
If you are using gparted to make the changes, change (or delete) only one partition at a time. Define the change, then click its green check mark to accept the change.
Once you've taken care of /dev/sda2 - /dev/sda6 and /dev/sda10, then you can move /dev/sda7 your Ubuntu root partition. Move it without resizing it, which is recommended.
Now, if you want to resize the root partition, you can do it.
You did not specify which version of Ubuntu is in use. If you are using 18.04 or newer, you can delete the swap partition and replace it with a swap file IF, and only IF, you do NOT use Hibernation. If you use Hibernation OR have an Ubuntu version before 18.04, then just move your swap space.
Move the /home partition towards the beginning of the drive, leaving 1 MB unallocated in front of it.
Expand /home .


One explanation I can think of is that you haven't configured the input methods.

Open the Input Method tool from the menus (or launch it from a terminal window with the im-config command).
Select IBus (for ibus-unikey) or Fcitx (for fcitx-unikey).
Reboot.

This will start the applicable input method framework (IBus or Fcitx) automatically, and also set the necessary environment variables.


Bug fix for the ddclient "Invalid IP" error not working

You can create a free account on https://www.dnsomatic.com/, then you sent your ip update there (they have an easy ddclient.conf) they will sent it for you to no-ip.com (and dyndns, and many others if you wish)


I accidentally hit Ctl Alt F. How do I return to the GUI?

Press Ctl + Alt + F7, that is the default graphical tty.

Linux systems use to have 12 terminals: 6 for text (Ctl + Alt + F1 to F6) and 6 for graphical (Ctl + Alt + F7 to F12)


Can't connect to the internet after upgrade to Bionic

Try to reinstall Network-Manager and restart networking.


Help with installing the nvidia-96 branch in lununtu 14.04

Nothing wrong, but you need to download the whole history. You can download only last revision:

Browse code → View revision →  Download tarball
Well, you can always search through http://packages.ubuntu.com/.

It was not distributed for trusty, last I could find was build for precise: http://packages.ubuntu.com/precise-updates/nvidia-96 . You could try it.
Another option, that driver is just packaging for the binary distributed by nVidia. You may download them as they are from the git repository here:

https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/nvidia-graphics-drivers-96/trusty/files

32bit: NVIDIA-Linux-x86-96.43.20-pkg0.run
64bit: NVIDIA-Linux-x86_64-96.43.20-pkg2.run

Then install it manually.


Ubuntu 18.04 Keystroke Alt + Shift + (Ctrl) + Down does not work

Gnome Tweaks helps me to fix it!

Go to Keyboard & Mouse > Additional Layout Options.
Turn off all options for "Switching to another layout".


Are there any other Unision placeholders than $VERSION?

No, there are (currently) no other placeholder variables besides $VERSION that you can use in Unison's backupprefix and backupsuffix options. And to address the comments, $VERSION is a Unison internal value and no you cannot use environmental variables in your Unison profile.

This functionality is implemented in the Unison source in the file stasher.ml, in case you were feeling up to writing this feature yourself. Otherwise I think you could just accomplish what you want with a shell script. You could write a script that watches your backupdir specified in your Unison profile with something from inotifytools, and anytime a new FILE is created in the directory, rename it to $(date).FILE or something.


Problem with mono when run a windows application

The error itself is quite self-explanatory: System.DllNotFoundException: wininet.dll - you are missing wininet.dll, a Windows proprietary item.  So we have to install it.

You could try to do this: winetricks wininet - it'll try and install the DLL.  However, this is reported to both work and not work depending on your Wine version.


Bash has a special variable called IFS.

it's used by bash in order to know how to split a string into a list of files. (Internal Field Separator)

By default it contains space, tab and newline.

for f in `find ... will split on the chars contained in the $IFS variable. If there is a newline or space in file names returned by the find command, it will be treated as a different file name and thus the loop will be executed for each part of the name.

$ ls -l
-rw-r--r-- 1 marko marko 0 2010-11-01 12:06 my?bad.exe
-rw-r--r-- 1 marko marko 0 2010-11-01 12:06 space bad.exe
$ for f in $(find -name "*.exe"); do echo "ITERATING ($f)"; done
ITERATING (./space)
ITERATING (bad.exe)
ITERATING (./my)
ITERATING (bad.exe)

We could tweak the $IFS variable, but it's tricky. Let see why:

(Test this code in scripts so that the change of the IFS variable doesn't remain in your shell, you might get confused)

$ IFS=""; for f in $(find -name "*.exe"); do echo "ITERATING ($f)"; done
ITERATING (./space bad.exe
./my
bad.exe)

As you can see, now bash doesn't have any rule to split the string returned by the find command, and treats the whole output as a single value.

Clearly the problem here is that if we use for f in `find.... we have no way to distinguish a newline contained in the file from a newline generated by the find command.

Now for sake of completeness I will show you how to make your approach work, but please see an easier solution at the end of the answer.

We could use other delimiter characters and fix your current issue:

$ for f in $(find -name "*.exe" -exec echo -n {}: \;); do echo "ITERATING ($f)"; done;
ITERATING (./space bad.exe)
ITERATING (./my
bad.exe)
ITERATING ()

Here the find -name "*.exe" -exec echo -n {}: \; command returns the list of files separated by ":" (which are not legal in windows file names).

Now the next step would be to actually delete those files. Take in consideration that the last file is terminated by ":" and thus bash iterates one last time with an empty string.

IFS=":"; for f in $(find -name "*.exe" -exec echo -n {}: \;); do if [ ! -z "$f" ]; then rm "$f"; fi; done;

You should be able to perform also your basename/dirname test within this loop, as you did before.

However, this solution is ugly and works only because we have a character which we can rely on.

It turns out that the find command itself can execute commands for each file it finds.

find -name "*.exe" -exec ./yourscript.sh {} \;

Then yourscript.sh wil lget the full name in $1 and you can delete with rm "$1" even if it contains newlines and spaces.

The find command can also be used to perform inline the basename/dirname test you do inside your script, but it's more advanced topic.


Cannot get nginx to render my WordPress site

It looks like you haven't configured nginx to process PHP. Check out this answer.


Overheating - What's a suitable minimum and maximum temperature for a desktop system?

You can make use of xsensors which is available via Ubuntu software center. I also have Ubuntu Desktop 14.04 LTS installed on a Desktop(Quad Core) and i use it to sometimes monitor CPU/core temperatures and also fan.
Here are some of the sample images from my system.


Folding of the workspaces bar in Ubuntu 18.04 GNOME

If anyone ever wonders, someone pointed me out an extension for Gnome Shell Extensions, which you can find here:

https://extensions.gnome.org/extension/503/always-zoom-workspaces/


SOLVED. I've got it. I've just downloaded a newer version of ATI Drivers nd installed it. It works for me. How do I mark as solved this question?


Will my Ubuntu installation be damaged if I upgrade my Windows partition?

As long as you only install windows 8 on your current windows partition, you should be alright.

However Windows comes with its own bootloader which is probably going to overwrite GRUB (the one used by most linux distributions, and indeed Ubuntu.) And therefor you might not have the option to boot into anything but windows after the install.

Though this should be rather easily fixed by reinstalling the GRUB from a Ubuntu live medium (dvd or usb).

There might be other challenges which I am not currently aware of.


Minecraft server (Bukkit) .sh bash file not opening

The script has to be in the same path then your craftbuckit.jar. Alternatively you could add the absolute path to the script:

#!/bin/bash
java -Xms1024M -Xmx1024M -jar /path/to/craftbukkit.jar -o true

Also you should execute the script in a terminal to be able to see the output. I think the minecraft server starts an admin console in the terminal. I don't know how it will behave if you don't run it in a terminal. At best you will have problems to gracefully stop the server later on and have no access to the admin console.


Camera showing black in Ubuntu 18.04 on a Lenovo L490

The camera (/dev/video*) owner and group is [root,video], and it allows rw access for owner and group.
On your new system, you are probably not in the video group.
Use the id command to check.
Either get your IT department to add you to the video group or sudo adduser $USER video.


Logitech MX800 not working properly in 14.04

So I finally got everything sorted out. The main problem was that the keyboard got unified first which messed it up for some reason. If I removed everything and unified the mouse first and then the keyboard, everything worked. The reason it didn't work at first when I tried this was because the keyboard didn't get properly removed.

Solution:

1: Install Solaar (for easy management).

2: Remove all unified devices (connect other keyboard and mouse with cable to control from here).

3: Now turn off both mouse and keyboard and unplug the unifier from the machine.

4: Insert the unifier again and choose to unify new device via Solaar.

5: Turn on the mouse.

6: When the mouse is unified properly, turn on the keyboard.

The problem with the lagging was because of two things. The first cause seems to have been that I had the two devices somehow unified three times in Solaar. Fixing this and restarting seems to have solved most of the lagg, but not all. The rest of the lagging issue was resolved by using another USB-plug in the machine. Apparently the unifier draws a lot of power which the front USB-plugs in my Intel NUC couldn't seem to handle.

Hope this solves it for others as well :-)


Ubuntu Powerbook G4 video card driver help

This does not mean that video driver is missing. Otherwise you would not be able to use your system in GUI mode. If you run

sudo apt-get install mesa-utils

you will see more details on your graphics adapter. But it won't improve anything in your system


sudo dpkg-reconfigure tzdata

then go to "Etc" or "None of the above", there to UTC, enter, you're done. It actually changes files /etc/timezone and /etc/localtime.


Am I stupid or I just have a faulty USB drive?

Return The USB thumb drive to the store and ask for a swap if it's still under warranty (check the manufacturer's web site) as it looks like it's dead now...

Sorry to be the harbinger of bad news...


Universal USB Installer can't detect usb

run winecfg
go to the "Drives" tab
click "Add..."
chose your favorite letter
find the "Path:" text field and click the "Browse..." button next to that
find wherever your operating system has mounted the flash drive. In Ubuntu it'll be under /media
select your flash drive's mount point (if you're using YUMI it'll probably be called "MULTIBOOT".
click "OK" and then "OK" again.
Run YUMI or whetever Windows program you were using your flash drive with.

This was answered here How to mount USB flash drive to WINE?


You have to reinstall Terminal and Unity.

You also need to install Python again.

Login to tty and type this command:

sudo apt-get install --reinstall ubuntu-desktop gnome-terminal && sudo apt-get install python (or whatever is it's name)


How to use tracker to search documents for text, restricted to a filename pattern

There are several questions on this subject (and many marked as duplicate) but none with a satisfactory answer (at least for me).
So I wrote a script called "search" to run tracker and filter the results based on filenames that match a given pattern.  Using "tracker search piano -l 1000" I get 136 hits which includes too much noise.  Using "search piano letters" I get 4 hits showing the filenames (as clickable links) followed by the relevant text line, which is great.

#! /bin/bash
#
#  Use "tracker" to search files for content matching a pattern.
# (tracker indexes files by content, including text in MS Word documents.)
# Optionally filter on file pathnames matching another pattern.
#
#  Synopsis:
# search content-pattern [path-pattern]

Usage="Usage: ${0##*/} content-pattern [path-pattern]"

case $# in
(1)
  IfPathPattern=false
  ;;
(2)
  IfPathPattern=true
  ;;
(*)
  echo "$Usage" >&2
  exit 2
  ;;
esac

tracker search -l 1000 "$1" |
  if $IfPathPattern
  then
    awk -v pattern="$2" '
      BEGIN {pattern=tolower(pattern)}
      {text=tolower($0)}
      lines>0 {print; lines--}
      text~pattern {print; lines=2}'
  else
    cat
  fi


How do I remove libavcodec53 and libavutil51 before installing ubuntu restricted extras?

Try

sudo apt-get remove libavcodec-extra-53 libavutil-extra-51


What is the difference /usr/local/lib/python3.6/dist-packages vs /usr/lib/python3/dist-packages?

On my Ubuntu, this seems to be:

/usr/lib/python3/dist-packages: things installed by dpkg/apt
/usr/local/lib/python3.6/dist-packages: things installed using pip


Did you verify that the http daemon is configured (and not commented, i.e., not beginning with the # character) in /etc/monit/monitrc?

It should look something like this:

set httpd port 2812 and
    use address localhost
    allow localhost

Setting a configuration like that may fix your problem.


If you look at the order of my tasks, you will see that I installed the Broadcom wireless driver last. After a re-install, I found that I needed to install the Broadcom wireless driver first, plus any and all updates relevant to 12.04.5 Lts version. Be careful when you update because several of the updates are for version 14.

Again, this was for a first time installation of Ubuntu and running a dual boot.


How do I get a Broadcom 4318 Wireless card working?

Maybe the firmware is missing. Try installing firmware for b43

Installer package for firmware for the b43 driver

sudo apt-get install firmware-b43-installer


An easier method is to get them directly from Github: https://github.com/google/fonts/tree/master/apache. Each font has its own subdirectory, with uncompressed font files.

There's also a ZIP file of them available from the main https://github.com/google/fonts#readme page.

So, if you want to script this stuff (e.g. regularly download the latest version), you can do it with a Git checkout, or by using wget or curl to pull down the exact files you want.

PS: This thread is a dup of "How do I install fonts?".


Missing Operating System (ubuntu installation error)

UEFI is the BIOS. You are obviously booting from the USB if it is telling you that the operating system is missing. So it sounds like the problem is the USB. Try reformatting the USB and follow that guide again.


What are the advantages and disadvantages of different docks?

Personally I use Docky, which replaces the bottom panel containing active applications and such.

I like the Mac/Win7-style mixing of shortcuts and active applications.
I'm in love with the enhancements it can give icons (for example - displaying cover art, track length in place of the Rhythmbox icon).
It has support for widgets although I haven't found many available for it except the built-in ones.
The same can be said for themes, although I might not have looked hard enough.
It's a simple, yet configurable dock that comes with several useful plugins and looks good out of the box.


Touchpad problem: how to disable default syndaemon auto-startup?

You can disable it in System Settings -> Mouse & Touchpad.

Just uncheck "Disable while typing option".


Can't upgrade or install programs because of Virtualbox extension

Well, I may be a Ubuntu novice but I'm a persistent Ubuntu novice and I knew if I kept picking at this long enough I'd figure it out.

I found a very old article (2008) describing a similar situation and figured, why not, give it a shot. And it worked.

sudo dpkg --audit gave me this:
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 alacarte             easy GNOME menu editing tool
 python-gi            Python 2.x bindings for gobject-introspection libraries

The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure  or the configure menu option in dselect:
 virtualbox-ext-pack  extra capabilities for VirtualBox, downloader.

I then ran: sudo dpkg -r virtualbox-ext-pack which led to this:
(Reading database ... 745263 files and directories currently installed.)
Removing virtualbox-ext-pack (5.0.36-0ubuntu1.16.04.2) ...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully uninstalled "Oracle VM VirtualBox Extension Pack".
Successfully performed extension pack cleanup

And finally sudo apt-get update which finally finished completely.


InnoDB crash seems from Dr. Konqi debug tool not from Amarok itself. Developer info tab from KDE crash handler does show any.

Backup Amarok profile in ~/.kde/share/apps/.. (If you have library data that you want to keep) and delete local profile
Try restart Amarok after that.

It is convenient to raise a bug report if it is still failing after deleting profile and your system is updated.


adduser fails when relating hadoop-plugin to hbase-master

Fixed by changing

host.adduser(username, primary_group=primary_grp, secondary_groups=secondary_grps)

to

host.adduser(username, group=primary_grp, groups=secondary_grps)

and then retry the service with

juju resolved --retry servicename


Inserting file name in first line of merged txt files

Simplest way would probably be to have the operation in two steps, something like this (adjust the number of \t's to your file):

echo 0* | sed 's/ /\t\t\t\t/g' > header.txt | paste 0* > data.txt | cat header.txt data.txt > final.txt

Note: I'm assuming all files start with 0... you might want to change that


Logitech H600 wireless headphones no sound?

Usually, when you see this headphone model under the sound as an input device and an output device, you simply have to pair the headset to the antenna if you are using it for the first time. Unfortunately, you need to use a Windows computer to do this, but after that it will work under Ubuntu. (I tried the utility under wine, but it didn't detect the device).

Plug the reciever into a Windows computer, and download the pairing utility and start the utility.

Switch the headset on. Then, hold down the Volume up and Mute buttons on the headset until the LED blinks green quickly.

Then, click next on the pairing utility. After a few seconds, it should tell you the headset is ready to use.

When you unplug the receiver from the windows computer and plug it into the Ubuntu, you will have to switch the headphones off and then back on.

Thanks to this thread for the answer that eventually worked for me, and see this page for the pairing directions on the Logitech site.


SecureCRT crashes since upgrade to 11.10

According to this blog you need to install libpython2.6

sudo apt-get install libpython2.6


Your pc view only eth1 interface. Ifconfig don't see eth0.
You can try with nm-tool command to see nic card, state ...
Simple output will be like this

$ nm-tool
NetworkManager Tool
State: connected
- Device: eth0  [Auto eth1] ----------------------------------------------------
 Type:              Wired
 Driver:            xxxxx
 State:             connected
 Default:           yes
 HW Address:        74:27:ea:c2:62:58
 Capabilities:
 Carrier Detect:  yes
 Speed:           100 Mb/s
 Wired Properties
 Carrier:         on
 IPv4 Settings:
 Address:         xxx.xxx.xxx.xxx
 Prefix:          24 (255.255.255.0)
 Gateway:         xxx.xxx.xxx.xxx
 DNS:             xxx.xxx.xxx.xxx
 DNS:             xxx.xxx.xxx.xxx

Also you can try to renew ip settings from dhcp server
first

ifconfig eth1 down

next

ifconfig eth1 up

or

dhclient eth1

You will probably get ip from dhcp ...

If is your cable in eth0 interface try to up interface

ifconfig eth0 up


CPU frequency scaling stuck 2.80 Ghz and it's not going down

I solved my problem with these steps.

  In K/X/Ubuntu or another Debian-based machine you might just try to
  install cpufrequtils (sudo apt-get install cpufrequtils) to get
  frequency scaling working. If that does for you then you don't need to
  go through the parts of finding and loading the correct modules below.
  Just skip to the section on configuring the scaling governor.

  Kernel version

  Make sure your kernel version is at least 2.6.12 to make use of all
  the possible governors that will be mentioned. All of the frequency
  scaling will be done with kernel modules and not user space governors.

  Enable support in your BIOS

  Enter your BIOS and make sure Cool'n'Quiet (AMD) or SpeedStep (Intel)
  is enabled for you CPU. Some BIOS's may not have an option for either.
  If you don't find the option it is probably enabled by default.
  Unfortunately your BIOS may have the option but it is listed as
  another name altogether. If that is the case check your BIOS's manual
  for more information.

  Remove any userspace CPU scaling programs

  There are some userspace programs that can be run to scale the
  processors frequency. We will be scaling the CPU with the kernel so we
  don't need these. So if you have any we are going remove them now. You
  may want to look into these as they can be helpful in certain
  situations. This article will deal with just using the kernel modules
  to scale.

sudo apt-get remove powernowd cpudyn cpufreqd powersaved speedfreqd

  Install the module for your CPU

  When you installed your system there is a very good chance your CPU
  was detected by default and the module you need for for scaling is
  already running. Below is a command that will help you identify what
  type of processor(s) you have.

cat /proc/cpuinfo

  After you know this then you will know what kernel module you will
  need to load for it. Here is the command to see what kernel modules
  are loaded.

lsmod

  Below are CPU descriptions and the commands used to load the kernel
  modules based on what processor you have. Look at the output from
  lsmod above and use the modules names after the word "modprobe" below
  to see if you already have a module loaded. If you do then just move
  on to the next step. If not then use the CPU info you found and figure
  out which module you need to load. Then run the command to load it.

  CPU: PIII-M or P4 without est. 2 module types for this.

sudo modprobe speedstep-ich

  or

sudo modprobe speedstep-smi

  CPU: Intel Core Duo, Intel Core2 Duo or Quad, or Intel Pentium M. This
  has been merged into the acpi-cpufreq module in later kernels.

sudo modprobe speedstep-centrino

  CPU: Intel Celeron, Xeon, and Pentium 4 processors

sudo modprobe p4_clockmod

  CPU: AMD K6. Socket Type: Socket 7

sudo modprobe powernow-k6

  CPU: AMD Sempron/Athlon/MP ( K7 ). Socket Types: A, Slot A.

sudo modprobe powernow-k7

  CPU: AMD Duron/Sempron/Athlon/Opteron 64 ( K8 ). Socket Types: 754,
  939, 940, S1 ( 638 ), AM2 ( 940 ), F ( 1207 ).

sudo modprobe powernow-k8

  CPU: VIA CentaurHauls* or Transmeta GenuineTMx86*

sudo modprobe longhaul

  As a last resort if any of these don't work you can try the generic
  one for ACPI. More drivers are getting moved to this module in later
  kernels like speedstep-centrino after 2.6.20.

sudo modprobe acpi-cpufreq

  Inserting the scaling modules

  Now that the CPU frequency module is loaded we can now insert the
  scaling modules. To see which scaling modules you have a available you
  can use this command (using a Bash shell).

ls /lib/modules/$(uname -r)/kernel/drivers/cpufreq

  If you have these modules then they may already be running. To check
  if they are try the following command.

lsmod | grep freq

  If you see most or all of modules that where listed in the cpufreq
  directory then your done. Move on to the next section. If not here are
  the commands to load the modules.

sudo modprobe cpufreq_conservative cpufreq_ondemand cpufreq_powersave cpufreq_stats cpufreq_userspace freq_table

  Now that they are loaded you will want to load them on boot. To do
  this on a Debian based system like K/X/Ubuntu put the following lines
  in the /etc/modules file. You will have to check on where to put them
  on other distros like RedHat (/etc/modules.conf?). Remember to put the
  name of your CPU's module (you found above) in here also so it loads
  on boot. That is only if it is not loaded on boot. If you did not find
  it with lsmod when you first looked then it did not load
  automatically.

cpufreq_conservative
cpufreq_ondemand
cpufreq_powersave
cpufreq_stats
cpufreq_userspace
freq_table

  Configuring the scaling modules

  Now that they are loaded we can configure the governor. First you have
  to choose the governor you want to use. Below is a list the governors
  and how each works. You can decide which one you fits your needs best.
  If the module for a governor is loaded then you can use it. Remember
  you can see what modules are loaded with the lsmod command. Commands
  are done with sudo below like in K/X/Ubuntu world. You can switch to
  root and run the same commands just without the sudo sh -c " " if you
  like.

  To show the available governors you can use.

sudo cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

  Ondemand governor - sets the CPU frequency depending on the current
  usage. To do this the CPU must have the capability to switch the
  frequency very quickly. This would be good for systems that do a lot
  of work (high load) for a short periods of time and then don't do much
  (low load) the rest of the time.

sudo sh -c "echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"

  Ondemand governor configuration options

  sampling_rate - This is measured in microseconds (one millionth of a
  second). This is how often you want the kernel to look at the CPU
  usage and to make decisions on what to do about the frequency.
  Typically this is set to values of around '10000' or more. If you
  wanted to set the sampling rate to 1 second you would set it to
  1000000 like in the following example.

sudo sh -c "echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate"

  show_sampling_rate_(min|max) - This is minimum and maximum sampling
  rates available that you may set 'sampling_rate' to. I believe in
  microseconds also. I've seen discussion on getting rid of this in
  later kernels don't count on it being there in the future. To see both
  just do the following.

sudo cat /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate_min
sudo cat /sys/devices/system/cpu/cpu0/cpufreq/ondemand  /sampling_rate_max

  up_threshold - This defines what the average CPU usage between the
  samplings of 'sampling_rate' needs to be for the kernel to make a
  decision on whether or not it should increase the frequency. For
  example when it is set to its default value of '80' it means that
  between the checking intervals the CPU needs to be on average more
  than 80% in use to then decide that the CPU frequency needs to be
  increased. To set this to something lower like 20% you would do the
  following.

sudo sh -c "echo 20 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold"

  ignore_nice_load - This parameter takes a value of '0' or '1'. When
  set to '0' (its default), all processes are counted towards the 'cpu
  utilization' value. When set to '1', the processes that are run with a
  'nice' value will not count (and thus be ignored) in the overall usage
  calculation. This is useful if you are running a CPU intensive
  calculation on your laptop that you do not care how long it takes to
  complete as you can 'nice' it and prevent it from taking part in the
  deciding process of whether to increase your CPU frequency. To turn
  this on do the following.

sudo sh -c "echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load"

  Conservative governor - CPU frequency is scaled based on current load
  of the system. It is similar to ondemand. The difference is that it
  gracefully increases and decreases the CPU speed rather than jumping
  to max speed the moment there is any load on the CPU. This would be
  best used in a battery powered environment.

sudo sh -c "echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"

  Conservative governor configuration options

  freq_step - This describes what percentage steps the CPU freq should
  be increased and decreased smoothly by. By default the CPU frequency
  will increase in 5% chunks of your maximum CPU frequency. You can
  change this value to anywhere between 0 and 100 where '0' will
  effectively lock your CPU at a speed regardless of its load whilst
  '100' will, in theory, make it behave identically to the "ondemand"
  governor. For example to have it step up and down in increments of 10%
  you would do the following.

sudo sh -c "echo 10 > /sys/devices/system/cpu/cpu1/cpufreq/conservative/freq_step"

  down_threshold - This is same as the 'up_threshold' found for the
  "ondemand" governor but for the opposite direction. For example when
  set to its default value of '20' it means that if the CPU usage needs
  to be below 20% between samples to have the frequency decreased. For
  example to set the down threshold to 30% you would do the following.

sudo sh -c "echo 30 > /sys/devices/system/cpu/cpu0/cpufreq/conservative/down_threshold"

  sampling_rate - same as ondemand. sampling_rate_(min|max) - same as
  ondemand. up_threshold - same as ondemand. ignore_nice_load - same as
  ondemand.

  Performance governor - CPU runs at max frequency regardless of load.
  This module might not be listed in the running modules but is still
  available. My guess is it is built into the kernel for K/X/Ubuntu.
  Yours may be the same way.

sudo sh -c "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"

  Powersave governor - CPU runs at min frequency regardless of load.

sudo sh -c "echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"

  Cpufreq stats about your CPU

  The cpufreq module lists stats about your CPU. These will help you
  find out things like the current frequency of your processor or what
  available frequencies your CPU can scale to. Check them out below.

  cpuinfo_cur_freq - Show the current frequency of your CPU(s). You can
  also find this out by doing a "cat /proc/cpuinfo".

sudo cat /sys/devices/system/cpu/*/cpufreq/cpuinfo_cur_freq

  cpuinfo_max_freq - Show the maximum frequency your CPU(s) can scale
  to.

sudo cat /sys/devices/system/cpu/*/cpufreq/cpuinfo_max_freq

  cpuinfo_min_freq - Show the minimum frequency your CPU(s) can scale
  to.

sudo cat /sys/devices/system/cpu/*/cpufreq/cpuinfo_min_freq

  scaling_available_frequencies - Show all the available frequencies
  your CPU(s) can scale to.

sudo cat /sys/devices/system/cpu/*/cpufreq/scaling_available_frequencies

  scaling_cur_freq - Show the available frequency your CPU(s) are scaled
  to currently.

sudo cat /sys/devices/system/cpu/*/cpufreq/scaling_cur_freq

  scaling_driver - Show the cpufreq driver the CPU(s) are using.

sudo cat /sys/devices/system/cpu/*/cpufreq/scaling_driver

  scaling_max_freq - Set the maximum frequency your CPU(s) are allowed
  to scale to. Look at the output from scaling_available_frequencies
  above. Then you can pick one of those numbers (frequencies) to set to
  be the maximum frequency the CPU(s) will be allowed to scale to. For
  example if your CPU output from scaling_available_frequencies was
  2000000 1800000 1000000 then you might set this to 1800000. So when
  the CPU scales it will only go to a max of 1800000 and not 2000000. An
  example on how to set this would be the following.

sudo sh -c "echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq"

  scaling_min_freq - Same as scaling_max_freq but setting a value that
  will not allow the CPU(s) to go below. For example.

sudo sh -c "echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq"

  Keeping any of your settings for cpufreq on reboot

  Since all the settings we have been doing are in the /sys virtual file
  system they will not be saved after a reboot. You can go about setting
  these on reboot a few ways.

  The first way is to put the lines you have been executing in
  /etc/rc.local. Since root executes rc.local on boot you don't need to
  sudo before each line. Your rc.local could look like the following
  example which sets the ondemand governor and the up_threshold to 20%.
  Don't forget to make sure the module for your CPU and the cpufreq
  scaling modules are set to load on boot also.

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 20 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold

  The second way to keep your settings on reboot is to install
  sysfsutils (sudo apt-get install sysfsutils). Then you could add the
  following lines to /etc/sysfs.conf which do the same thing as in the
  /etc/rc.conf example.

devices/system/cpu/cpu0/cpufreq/scaling_governor=ondemand
devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold=20


Problems with Intel Video Resolution on Acer Laptop Wide Display

I had the same problem with an Acer Aspire 4736z.
Some searching led me to this solution:

Edit /etc/default/grub and and make this change:

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

After that just run the command

sudo update grub

This worked for me.


start up script with infinite loop as a root

Define it as a systemd service. You script doesn't need to be a loop, systemd can be told to restart the service when it crashes, and run pre- and post-execution scripts.


There is always some risk of infections, viruses, being hacked and so on, so care and due diligence is always in order.

That said, if you only install software using the Ubuntu software manager your risks of problems are quite low.  Slightly higer using apt-get or installing from source but still quite low.

And when a new Linux attack is discovered, word gets around quickly and patches are not long in coming.

Plus, hackers and scammers go after large targets, such as Microsoft platforms.  It's rather rare to see Linux exploits flying around.  The do occur, usually after the exploit has been well known and a patch has been created.  The key to safety is to keep your software versions (kernel, services and apps) up-to-date.

That said, be careful what links you click on, what attachments you open and take care when installing software that checksums match and the package is trusted.


If you need a different configuration for the GCC, you need to recompile it.

Download GCC

Download or clone the GCC from the official website. As alternative, you can also install it from the Ubuntu source packages.

# Download gcc
$ wget https://mirrors.kernel.org/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.xz
$ tar xf gcc-7.3.0.tar.xz
$ cd gcc-7.3.0

# Clone gcc
$ git clone https://gcc.gnu.org/git/gcc.git
$ cd gcc; git checkout gcc-7_3_0-release

# Use Ubuntu sources
$ apt-get source gcc-7
$ cd gcc-7-7.3.0

Configure GCC

Enter the GCC source folder and run the autoconf script configure. Before that, all development libraries for gcc need to be installed. Most common case configure only requires the languages c and c++ (see also this page). This is also the place, where you should put the custom option --enable-default-pie.

$ sudo apt-get build-dep gcc-7
$ configure --enable-languages=c,c++

Build and Install

Simple start make and make install. This will build and install the custom gcc in /usr/local/bin. If you need a different location, you can change that with the --prefix=... option in the configuration step.

$ make -j $(grep -c processor /proc/cpuinfo)
$ sudo make install

# Or better with checkinstall which, creates a deb packet
$ sudo checkinstall make install

Depending on the amount of CPUs you have, this can take a while. After that, just run gcc --version and watch the new compiler in action.


It turns out in addition to having the ~/.i3/config file, I also had a ~/.config/i3/config file. So even though I was editing ~/.i3/config, the system was not seeing my changes. So I went ahead and deleted ~/.config/i3/config. Now it works fine.


Searching package repositories by contents

You can use apt-file to search for files within packages

sudo apt-get install apt-file

# Update database
sudo apt-file update

# Search for files
apt-file search foo

# or in your case
apt-file search breqn.sty

I get texlive-latex3: /usr/share/texmf-texlive/tex/latex/mh/breqn.sty , so ...

sudo apt-get install texlive-latex3

See also http://www.debuntu.org/how-to-find-missing-packages-with-apt-file


Upgrade from Lubuntu 12.10 to Ubuntu 13.04

.part file means that's indicating that it is still in downloading or downloading process interrupted. I mean you have not completed the Downloading of your Ubuntu 13.04 ISO. Usually .part files will appear when ever we do downloading something.

Before going to burn the ISO I always recommended to check md5sum of that ISO to check for errors. HowToMD5SUM


Ubuntu 18.04 gets always abort when I type y,Y,yes

Pass the -y when you call the command.

For example:

sudo apt-get -y upgrade

There could be something about your VPS hosting but I'm not sure.


"Kept back" packages for update , want to uninstall unity?

You were more observant than me, as I just happily removed Unity using apt-get dist-upgrade!
Sure enough it was gone after I rebooted, and apt-get install -f unity was also rejected.
I had to install aptitude then aptitude install unity, which undid the damage caused by dist-upgrade.

dist-upgrade is still wanting to remove unity though.


How to display the number of frames per second in mplayer

Sounds as if you are interested in benchmarking, try the -benchmark option.

From the ubuntu man page

  -benchmark
                Prints some statistics on CPU usage and dropped  frames  at  the
                end  of playback.  Use in combination with -nosound and -vo null
                for benchmarking only the video codec.
                NOTE: With this option MPlayer will also ignore  frame  duration
                when playing only video (you can think of that as infinite fps).

mplayer -benchmark -nosound -vo null your_file


How can I find the current RGB colour values used in gnome-terminal?

I suggest that you try the color picker tool in Gimp.


Compiz and Clearlooks window border breaks active/inactive title bars

No the problem is a faulty emerald, that is no longer maintained. I used to use emerald myself, but I have since stopped; reason being that emerald is no longer developed actively and is now unstable and buggy.

My suggestion would be that you return to using metacity for window decorations (gtk-window-decorator).

If needed, you can report a bug via:
ubuntu-bug compiz


TP-Link AC600 driver on Ubuntu 14.04 LTS x64

Connect to internet by ethernet, tethered or whatever means possible. Then run in terminal:

sudo apt-get install git build-essential linux-headers-generic
git clone https://github.com/Myria-de/mt7610u_wifi_sta_v3002_dpo_20130916.git
cd mt7610u_wifi_sta_v3002_dpo_20130916
make
sudo make install
sudo cp RT2870STA.dat  /etc/Wireless/RT2870STA/RT2870STA.dat

Reboot.

You will have to re-install it after each kernel upgrade. Please you keep the driver folder mt7610u_wifi_sta_v3002_dpo_20130916, then it will be quite easy.

You will need to run only:

cd mt7610u_wifi_sta_v3002_dpo_20130916
make clean
make
sudo make install


What I had to do was to deligate the outout from the XML in a ListItem like this:

ListView {
   width: units.gu(50)
   height: units.gu(5)
   model: minecraftBlogg
   delegate: ListItem.Subtitled {
      text: minecraftVersion
      subText: i18n.tr("Latest version")
      progression: true
      showDivider: false
  }
 }


1) You can use | more and scroll with space or down arrow. like this:
/# ls /etc/ | more

2) For sorting by file size use ls -lS  or ls -lSh for print sizes in KB MB or GB.
If you wanna invert the result, use -r switch. ls -lShr
For more arguments ls --help


With Xmarks closing down, what is a good alternative?

I personally prefer to use Google Chrome, which supports this natively. As a bonus, your bookmarks are also available within a special folder in Google Docs.

Options -> Personal Stuff -> Sync:

This does not synchronize your history or saved passwords.


Looks like it's armhf, so the architecture is supported. However, Ubuntu Core itself is only officially ported to a few select reference boards outlined here. As a result, while Ubuntu Core would likely run on the Tinker Board given the correct kernel features, someone would need to port it.


How do I setup a self-encrypting Opal 2.0 SSD?

The Lenovo ThinkPad L480 with an Opal supported SSD uses a Samsung "MZ-V6E500BW SSD 960 EVO NVMe M.2 500GB", 256GB, or an Intel "180GB Solid State Drive SATA3.2" OPAL2.0 M.2 drive depending on chosen options. Apparently the Intel SSDs have some management capabilities related to vPro that the non-Intel drives don't, such as remote wiping and the ability to enable/disable certain encryption modes.

It also seems that sometimes other drives, such as the Seagate 1200 Pro SSD, are used; so it's important when using Windows to know which drive is being used so you can visit the manufacturer's website.

Once you install a custom operating system you need to use the tools available for that OS. The two main ones for Linux are hdparm and sedutil, see my answer on UNIX and Linux Stack Exchange.

Additional information:

Samsung SSDs have software available to setup their operation, this only works for certain SSDs and operating systems, otherwise the default is no password and encryption is enabled.

For "Ubuntu 12.04 LTS and later" (source: user manual, DC Toolkit .PDF, page 10) the Samsung SSD DC Toolkit is designed to work with Samsung SSD products including PM863, PM863a, SM863, SM863a, PM963 non-customized, 860 DCT, 883 DCT, 983 DCT, 983 DCT M.2, and 983 ZET.

This software is not compatible with other manufacturers' SSDs, nor is it certain to work with other Samsung SSDs. It also has limited support for Windows Server 2012 R2, Widows Server 2016 RS1
(Version 10.0.14393), RHEL 5.7 up to 6.4 (6.4 and later has full support), and CentOS.

For Windows and Samsung SSDs the software used is called: "Samsung SSD Magician DC 2.0". Using a bootable USB drive with Windows and Samsung's Windows software is another, albeit inconvenient, option for setting up your SSD for use with another operating system.

The user manual for the Enterprise edition of the Magician software claims to only support Samsung SSD SM863 and PM863. The consumer version claims the Magician SSD management utility is designed to work with all Samsung SSD products including 470 Series, 750 Series, 830 Series, 840 Series, 850 Series, 860 Series, 950 Series, 960 Series and 970 Series.

In your circumstances you are probably best off using hdparm or getting sedutil setup.

Don't forget to set your screensaver to a short time and hibernation should also be brief if you want the encrypted drive to remain secure, see my other answer linked to above, a powered on encrypted drive is unlocked once it's successfully booted

A helpful article for Arch Linux explains ATA BIOS Passwords and sedutil with drives supporting Opal under Linux, it explains the need to set libata.allow_tpm. See also the Stack Overflow Q&A: "ATA Trusted commands - How to set libata allow_tpm" and especially Dell's article: "Encrypting Your Ubuntu Operating System Using a SED Hard Drive" where they explain a lengthy procedure (last modified: 01/02/2019 01:05 PM).


When updating from kernel 3.13 -> linux-image-4.2.0-22-generic the network was lost - how do I preserve it when updating the kernel

@fkraiem
That solved the problem.

  Install linux-image-generic-lts-wily, this will 1) install
  linux-image-extra-4.2.0-22-generic, which may contain the driver for
  your wifi card, and 2) ensure you get all updates for the 4.2 series
  of kernels. – fkraiem 3 hours ago


This answer was updated by author in early 2012 ...

Perhaps for you will be actual more to use new versions instead dbp-1.1.5.

  Guide by Dave Duncan.

  Download the tgz file to your desktop from DBP archive

  Open a terminal, and run the following:

sudo apt-get install libgimp2.0-dev gcc cpp g++

  You may be prompted for a Yes/No answer here (confirming the use of
  hard drive space).  Just type ‘y’ and hit enter. Then, enter the
  following:

cd /usr/src/

  In the next command, substitute “[username]” with your username.
  Then continue, entering the following commands in turn each time you
  get a fresh command prompt.

sudo tar -xvzf /home/[username]/Desktop/dbpSrc-1-1-5.tgz
cd dbp-1.1.5

  Then build, and install package:

sudo make
make install

  Once all that is done, open up GIMP and go to (UPDATE Jan.2012):
  Filters >> Batch Process
  From the dropdown, select Batch Process and the world is your oyster!
  Let me know if this works well for you.

  Dave Duncan

Enjoy!


Missing Unity launcher and top panel in 14.04, using Nvidia, with slightly stretched graphics

To get the unity bar, you must download CompizConfig Settings Manager from the Ubuntu Software Center.  Once you're in Compiz...  Scroll Down until you get to the "Desktop" tab.
From there, click on the purple Ubuntu Unity Plugin icon.  Then go down to the bottom right and click enable.  If it says it has to turn off other features or something to run this, just click accept or whatever it might be.  This should bring the unity bar back.


How to replace a varying number of strings on lines that match patterns

If you're determined to use a shell loop for this, you could do something like
while read -r fname patt repl; do
  sed -i.bak "/$fname/s/^$patt/$repl/" File2
done < File1

but note that it may break in unexpected ways if any of your strings contain regex-special character sequences. Another option (with the same warning about special characters) would be something like
awk '{printf "/^%s/s/%s/%s/\n",$1,$2,$3}' File1 | sed -f- File2

which uses awk to format File1 into a sequence of commands which are then piped to sed -f to modify File2.
With GNU awk (aka gawk) which supports 2D arrays, you could just do:
$ gawk '
    NR==FNR {a[$1][$2] = $3; next}
    $1 in a {for(i=2;i<=NF;i++) $i = $i in a[$1] ? a[$1][$i] : $i}
    1
  ' File1 File2
<filename1.txt> words and symbols < $ string1 words and symbols 9
<filename2.txt> more words and symbols % @ string2 words and symbols string3

or if you need to maintain the alignment, use the index function with substr:
$ gawk '
    NR==FNR {a[$1][$2] = $3; next}
    $1 in a {
      for(s in a[$1]) {
        mstart = index($0,s);
        if(mstart > 0) $0 = substr($0,1,mstart-1) a[$1][s] substr($0,mstart+length(s))}
    }
    1
  ' File1 File2
<filename1.txt>      words and symbols < $ string1 words and symbols 9
<filename2.txt>      more words and symbols % @ string2 words and symbols string3

Similar thing in vanilla awk, faking the 2D array with an FS-delimited string:
mawk '
  NR==FNR {a[$1 FS $2] = $3; next}
  {
    for(k in a) {
      split(k,b);
      if($1 == b[1]) {
        mstart = index($0,b[2]);
        if(mstart > 0) $0 = substr($0,1,mstart-1) a[k] substr($0,mstart+length(b[2]));
      }
    }
  }
  1
' File1 File2


Why can't I access localhost without an internet connection?

Run the command:

sudo ipmasq

Try to ping localhost and hopefully it should work.


Is there any way to combine to internet connections

You might want to search for the term "bonding". This will allow you to use two connections in parallel. You will not be able to use the full bandwith of all connections with a single transfer, but if you have multiple transfers they can be routed through both connections for load balancing.

This seems like a pretty solid guide: http://www.cyberciti.biz/tips/debian-ubuntu-teaming-aggregating-multiple-network-connections.html


HP 2140 screen resolution stuck at 1024x576

What exact model do you have? There where both 1024x576 and 1366x768 models of the HP mini 2140. Might be a stupid question, but I often don't remember which screen I've got on my thinkpad... :)


How to know when a mozilla bug will be fixed?

There is no easy answer to this.

The theory is that Ubuntu will only pull upstream changes into packages when it fixes a major enough security issue, in which case it should be issued as a security update to your version of Ubuntu after a testing period (within a week or two).

Bugs that are unrelated to security usually won't be fixed in Ubuntu's current release.  The fixes will usually naturally be included when the next version of Ubuntu comes out, assuming the new version of Ubuntu includes a new version of the software in question.

Firefox, however, is a special case, in which Ubuntu often will pull in changes from upstream, even when not security fixes, in order to get new versions of Firefox into existing Ubuntu releases.  The schedule this happens on is unrelated to Firefox's own release schedule and can depend on different factors, and the version they pull from upstream may not be the latest Firefox - it may be a special long term release version.

Your options are:

Put up with the bug until the next release of Ubuntu or the next time Ubuntu pulls in a new version of Firefox.
Compile and install Firefox manually.
Obtain Firefox from a PPA from someone who has compiled it manually for you.


Youtube screenshot as wallpaper on Ubuntu 20.04?

Check the resolution of your screenshots, and then check the resolution of your display. You will probably find that your display has a much better resolution than your screenshots, so the screenshots need to be scaled up when used as background images.
Videos tend to use very aggressive compression methods to keep the size of the data transfer down. It doesn't matter much as long as there is motion; the human eye and brain don't catch that level of details during motion. But when you pause the video and look closely, you will see those compression artifacts; it's not anyway close as detailed as an image taken by a stills camera.
It may work to some extent to use very good 4k footage as a base for a background image on a full HD (1920x1080) display, but even full HD video for a full HD monitor is stretching the limits; even more so with YouTube's very aggressive video compression (they want to keep down bandwidth).
In general, it's not a good idea IMHO.


How do I run a script as sudo at boot time on Ubuntu 18.04 Server?

You can create a systemd service.

Create a file /etc/systemd/system/ethtool.service:

[Unit]
Description=ethtool script

[Service]
ExecStart=/path/to/yourscript.sh

[Install]
WantedBy=multi-user.target

And script /path/to/yourscript.sh (don't forget to chmod +x it)

#!/bin/bash
ethtool --offload <net> rx off

Enable your service

systemctl enable ethtool

It will run on boot as root.


Can the root user change the owner of a file that he doesn't own?

In most situations (read default installations), root can do anything a regular user can and much more. If you think root cannot do something, remember it can become a user who can :)

You'll be fine.


How can I create a video file from a set of jpg images?

You can use ffmpeg, which you can install with the command:
sudo apt install ffmpeg

This is the command all together:
ffmpeg -framerate 25 -i image-%05d.jpg -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p output.mp4

Let me break it down:
-framerate

is the number of frames (images) per second,
-i image-%05d.jpg

this determines the file name sequence it looks for. image- means all of the files start with this. The d indicates decimal integers, 5 is number of digits, the leading zero indicates that numbers requiring fewer digits will be filled, in the left, with zeroes so that every number contains exactly 5 digits. Thus the files it will detect are everything from image-00000 to image-99999.
-c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p

-c:v libx264 - the video codec is libx264 (H.264).
-profile:v high - use H.264 High Profile (advanced features, better quality).
-crf 20 - constant quality mode, very high quality (lower numbers are higher quality, 18 is the smallest you would want to use).
-pix_fmt yuv420p - use YUV pixel format and 4:2:0 Chroma subsampling
output.mp4

The file name (output.mp4)
Remember that ffmpeg needs a continuous sequence of images to load in. If it jumps from image-00001 to image-00003 it will stop.
If your images are named like this:
image-1
image-2
...
image-35

then change the -i part to -i image-%00d.

Update. Your edit says the pattern is image-01.jpg to image-02.jpg. That means you need the image-%02d.jpg pattern.


The problem was due to the nouveau driver of the video card. I changed to the proprietary Nvidia driver and now the problem seems to be gone


can't create folder after mounting partition

You mean, root is still the owner. To make yourself the owner, when logged in as yourself, run:

sudo chown -R $USER: /media/$USER/"partition name"

-R for recursively, so all the contents are yours too

Then fix the permissions because 777 is not a good choice since anyone can write here now; this gives write permission only to the owner:

sudo chmod 755 /media/$USER/"partition name"

Please note, it's fine to change ownership and permissions on mount points like this, but NOT advisable to do so on devices like /dev/sda1


How to make an icon to enter terminal commands

How to create an icon on your desktop to perform the recompile-job

Open gedit, paste the lines below into the file:

[Desktop Entry]
Name=Recompile
Exec=/bin/bash -c "cd ~/mt7601/src&&make clean&&make&&sudo make install&&sudo modprobe mt7601Usta"
Type=Application
Terminal=true

Save the file as recompile.desktop on your desktop
Make the file executable by the command:

chmod +x /path/to/recompile.desktop

After you made it executable, a generic icon will show up on the file (not necessarily the same as in the image, depending on your icon theme).

Simply double click on the file to run it. it will open a terminal window and ask for your password to run the sudo part of the command:

Explanation

Desktop files (with the extension .desktop) can be used to perform all kinds of applications or tasks. To make it run shell commands, the format is:

Exec=/bin/bash -c "<command>"

In this case, in the Exec= -line, the commands mentioned in your question are separated by &&, which is effectively the same as placing each command on a new line.

This makes it unnecessary to create a separate script; all is included in one launcher.
To make a .desktop file run from your desktop, you have to make it executable.
After you made it executable, the name as it appears on your desktop is the name, defined in the line:

Name=Recompile

The line:

Terminal=true

makes the command(s) run in a terminal window.
The example file is a very basic one. If you'd like the file to have another icon than the generic one, add a line (e.g.):

Icon=/path/to/icon.png

More on .desktop files and their required/optional entries here.


Program connects via USB only if called with sudo

Certain features require root elevations. Low-level USB interaction is one of them, I experienced the same when I wanted to use my LEGO NXT robot.

First of all, if the program only works with sudo, move it away from your home. I suggest moving it to /opt/jlink/ or something like that

To keep having to cd to the executable directory, add it to the global bath in /etc/bash.bashrc, instead of your home bashrc. Also, define an alias which automatically executes the program with root elevations. The additions to the file may look like this:

export PATH=$PATH:/opt/jlink    #or wherever you moved it
alias JLinkExe='sudo /opt/jlink/JLinkExe'

Now you can execute the program just by entering JLinkExe (you could even assign a easier-to-enter name in the alias, e.g. simply alias jlink='sudo /opt/jlink/JLinkExe').

However, you'll still be asked for your password, as the program still requires root elevation. To circumvent that, you can create an entry in your sudo setup. For this, execute sudo visudo and add this line to the end of the file

mkru ALL=(ALL) NOPASSWD: /opt/jlink/JLinkExe

After saving this, you (and only you, i.e. user mkru) shouldn't be asked for giving the program root elevations any more. Keep in mind that it will still be running with elevated privileges.

NOTE: If the program has a GUI, create the alias as alias jlink='sudo gksudo /opt/jlink/JLinkExe' to prevent it from messing up ownerships in your home directory.


What is the file manager in this screenshot?

That's Marlin File Manager. You can install this by adding the marlin-daily ppa to your system:

sudo add-apt-repository ppa:marlin-devs/marlin-daily
sudo apt-get update

and running sudo apt-get install marlin marlin-plugin-*.

Be warned, however, that this piece of software is not yet stable and is constantly being updated. It might suddenly break or crash your system if you try to use it. If you are not willing to take this risk then do not install or use marlin.

I do not know what theme is shown in the screenshot.


Is it possible to use variable in sed command in unix bash script

Let us say the old_word marker is known. We can then use grep to obtain the number from the original file:

NUM=$(grep -Po -m1 '(?<=old_word )\d+'  FILE)

This uses Perl regular expressions. It says that old_world should precede some digits, but should not be considered part of the actual match.
-o -m1 tells grep to print only the matched section (the number), and only the first such match.

Then you can combine your copying with the modification:

for i in {1..10}
do
    NEXT_NUM=$((NUM + i*increment))
    mkdir subdirectory_$i
    sed -r 's/(old_word )'$NUM'/\1'$NEXT_NUM'/' FILE > subdirectory_$i/FILE
done

Things to consider:

sed is not very good at arithmetic, so if you want to do it within the expression itself, consider using Perl or Awk.
You cannot directly do a=1*2 in shell scripts to perform arithmetic. You need to enclose the expression in $(( )): a=$((1*2)), or use keywords like let.
Variables are not expanded in single quotes, but regular expressions frequently contain characters which have special meaning, so it is safer to use single quotes for the expression, and temporarily leave them to add in our variable.
The parentheses around (old_word ) mark this as an sub expression, which you can refer to later using \1 (as can be seen in the replacement).


Drivers for Wireless card Asus PCE-AC66?

Here is an Arch Linux question that deals with your exact same device 14e4:43a0. https://aur.archlinux.org/packages/wireless-bcm43142-dkms/ The proposed solution is the latest version of bcmwl-kernel-source, in that case 6.30.223.30-1. The result reported later was: "THANK YOU!!! It works as expected."

In Ubuntu 13.04, there is a proposed version of bcmwl-kernel-source 6.30.223.30+bdcom-0ubuntu3. If you are running 13.04, open Software and Updates and select Prereleased Updates under the Updates tab. With a temporary ethernet connection, open a terminal and do:

sudo apt-get update
sudo apt-get install bcmwl-kernel-source

Check the version that was installed:

sudo dpkg -s bcmwl-kernel-source

It should say: Version: 6.30.223.30+bdcom-0ubuntu3

Now load the driver:

sudo modprobe wl

Is it working now? So that you don't get a lot of unstable software, go back and uncheck Prereleased Updates and re-run:

sudo apt-get update


Change group access to directory and all sub directories and files

The chown command is to change user and group ownership, to change permissions, you need chmod. So, once you have set the group ownership to pandya using chown as you have, change the permissions to give the group write access:

chmod -R g+w /media/pandya/Ext4/

From man chmod:

  The format of a symbolic mode is  [ugoa...][[+-=][perms...]...],  where
         perms  is  either zero or more letters from the set rwxXst, or a single
         letter from the set ugo.  Multiple symbolic modes can be  given,  separated by commas.

  A  combination  of the letters ugoa controls which users' access to the
         file will be changed: the user who owns it  (u),  other  users  in  the
         file's group (g), other users not in the file's group (o), or all users
         (a).  If none of these are given, the effect is as if a were given, but
         bits that are set in the umask are not affected.

  The  operator  +  causes the selected file mode bits to be added to the
         existing file mode bits of each file; - causes them to be removed;  and
         =  causes  them  to  be added and causes unmentioned bits to be removed

  -R, --recursive

  change files and directories recursively

So, g+w means "give users that belong to the file's group write access" and -R means apply to all files and subdirectories recursively.


Can I remove one ubuntu without touching the other?

I'm assuming you have them on different partitions. Just use gparted to clear the partition with 12.04 and you should be good to go. If they're not on separate partitions, it will be more complex.


16.04 and 17.04 in Hyper-V does not resolve names on the network

Ok. After little bit more digging I found out that /etc/resolv.conf is maintained by resolvconf service and by editing files under /etc/resolvconf/resolv.conf.d/ I would be able to permanently add information to /etc/resolv.conf

By end of the day I've endup modifying /etc/resolvconf/resolv.conf.d/head by adding my local dns as the 1st entry and restarting networking service.


Grub boot corrupted after installing Windows 10

Hi you could try this see link:

Booting into windows

Booting problems

Reinstalling grub

and it might work fine this three ways.


JBL Reflect BT bluetooth headset detected as keyboard in 16.04

So I experienced the same thing and I use a Kali Linux and a JBL bluetooth headset  what I did was I copied the files from a working bluetooth device

sudo nano /var/lib/bluetooth/EB:D4:3D:F5:C3:32/1C:6B:37:D2:D3:4B/info

J-800L (Head set seen as Keyboard)

I changed the class and services

Name=J-800L
Class=0x302540 # is the class of a KeyBoard
Services=00001101-0000-1000-8000-00805f9b34fb;0000110b-0000-1000-8000-00805f9b34fb;0000110c-0000-1000-8000-00805f9b34fb;0000110d-0000-1000-8000-00805f9b34fb;0000110e-0000-1000-8000-00805f9b34fb;0000111e-0000-1000-8000-00805f9b34fb;00001124-0000-1000-8000-00805f9b34fb;00001200-0000-1000-8000-00805f9b34fb;

# Services of KeyBoard

Copy from

 sudo nano /var/lib/bluetooth/EB:D4:3D:F5:C3:32/1B:6E:22:C3:F3:8B/info

Q5 (Working Headset)

Name=Q5
Class=0x240404 # is the class of an Headset
Services=0000110b-0000-1000-8000-00805f9b34fb;0000110c-0000-1000-8000-00805f9b34fb;0000110d-0000-1000-8000-00805f9b34fb;0000110e-0000-1000-8000-00805f9b34fb;0000111e-0000-1000-8000-00805f9b34fb;

# Services of an Headset

You can just use what I have for Q5 if you don't have a working headset

Then run the :

sudo systemctl restart bluetooth

or

sudo systemctl start bluetooth.service

I  hope this was helpful
Although I'd  have to do this every time I want to use the headset which is bad for user experience but then it works so till a better solution pops up manage this one


It worked out of the box for  me. BUT then I screwed around getting dual screens to work (to force the tablet to draw on one screen only in Krita or photoshop) and broke it.
Then I found this post, it worked for me, the main one didnt.

https://www.facebook.com/huion/posts/2042579912628124
Paweł Ziewiecki to Huion
2 January ·
How to install Huion 1060 Plus on Ubuntu 17.04

sudo apt-get install linux-headers-`uname -r`
sudo apt-get install git
git clone https://github.com/kolrabi/digimend-kernel-drivers.git
cd digimend-kernel-drivers
make
sudo rmmod hid-kye
sudo rmmod hid-uclogic
sudo rmmod hid-huion
sudo make uninstall
sudo make install

reconnect the tablet or reboot the machine


Seahorse, PGP: What does the exported .pgp-file contain?

OpenPGP has two different file formats:

binary (more efficient in terms of storage and transmission).
ascii armored (better software compatibility).

Seahorse probably includes your public key, public subkeys, user ids and incoming signatures with your key (like GnuPG does). To verify what's included, run gpg --list-packets [filename], which will dump all OpenPGP packets included in the file.


live usb not booting after installing windows 8

Restart your computer, then from the start up options press F12. Now you have the options which one you like to boot first. Choose your USB name and hit enter. I hope this helps. ( Note: There  are different keys for each bios, mind is F12 for example.. Choose which one you like to boot.. I hope this helps


Ubuntu live disk stop halt in the boot process

Same here. Asus n56vm trying Kubuntu with DVD as source.

It only works with Ubuntu, I mean with unity, at least in my PC.


OK, you can specify the prefix to run a command in via the command line. First open a terminal and navigate to the folder where the MSI program is located. Then type:

WINEPREFIX="~/.PlayOnLinux/wineprefix/Office2010" wine start /unix ./filename.msi

this should launch the MSI in the office prefix.

Explination:

WINEPREFIX -- specifies the prefix to run. The default prefix is used if this isn't specified.
wine -- starts the wine server
start -- tells wine to start the following prigram
/unix -- tells wine that the following path is a linux path not a windows path
./ -- the current directory, it can be omitted but is good to avoid confusion.
filename.msi -- the installer you want to run


How do I connect to L2TP over IPsec using Network Manager?

This appears to be because you just installed the command-line side of NetworkManager's L2TP support.

In order to use the GUI to configure L2TP VPNs as well, you will need to install the network-manager-l2tp-gnome package like so:

sudo apt install network-manager-l2tp-gnome

Following this, a restart of nm-applet may be necessary to make NetworkManager see the change. In order to do this, just run the following:

killall nm-applet
nm-applet &
disown


Generally the files that can be cleaned are determined automatically by Automake. Of course, Automake also recognizes some variables that can be defined to specify additional files to clean. These variables are MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, and MAINTAINERCLEANFILES.

Editing your automake.am to specify what gets deleted.

If configure built it, then distclean should delete it.

Source

Short answer
make distclean (does not work on ALL programs but most) will remove ALL files made by ./configure and ALL files made by make


make: *** No targets specified and no makefile found. Stop

According to the README, the sequence is:

./autogen.sh
./configure
make
sudo make install


Indicator Applet Icons Spacing Too Large

Unfortunately, GConf doesn't have any entries for indicator applet spacing and currently m0sia's PPA - as you've noticed - is only for Maverick.
You could tick yourself off at the 100 Papercuts bug as affected.

Maybe, like Rocko (Post #4), you could agree with him and suggest to use GConf entries?

Fingers crossed that they at least enable a gconf-editor setting for applet spacing in Ubuntu Oneiric Ocelot.

Also, if you're keen... you can try out this guide to compiling your own indicator-applet with a fix for spacing.

Be warned though, the same person who posted the how to, also noted:

  For other themes, where the patch only represents an improvement for Indicator Applet and not a fix, the portion of the space/gap that is NOT eliminated, is necessary to retain good readability for Indicator Applet Application Menu.


LXTask looks like it is showing the incorrect user.

Scroll to the right and you'll see two further columns - PID and PPID.  These are the process ID and the parent process ID.

If you do a ps -ef | grep <PID> you'll see that the owner of the errant "root" processes is actually yourself.

I would file this as a bug on LaunchPad - ubuntu-bug lxtask


How to increase/decrease brightnes using Fn+Home/End key in ubuntu 12.04 on Lenovo T520

open system settings in your sidebar or from power key on top of your screen and in its personal part open brightness and lock. Then set your desired brightness.


Ubuntu 18.04 does not start after upgrade from Ubuntu 16

I was finally able to solve the problem. It was the NVIDIA drivers after all. I couldn't access the terminal in any way. So, I had use the liveCdRecovery method to gain access to the system (https://help.ubuntu.com/community/LiveCdRecovery#Update_Failure):

#Boot the Ubuntu Live CD.

#Press Ctrl-Alt-F1

sudo mount /dev/sda1 /mnt

sudo mount --bind /dev /mnt/dev

sudo mount --bind /proc /mnt/proc

sudo mount --bind /sys /mnt/sys

sudo chroot /mnt

This basically gives access to the 'terminal', from the context of the system that has to be repaired. And that's it! I used purge on the NVIDIA drivers, and the system finally booted.


Ubuntu 21.04 and Conky/ Conky Manager widgets doesn't show up! Please, help

EDIT 2 (Fixed):
I have fixed and found all the solutions on that, to let Conky to work properly on new Ubuntu 21.04, and it needs as following:
1. To install Conky or Conky-All, even if can be installed by Terminal or by Synaptics Packages Manager (if doesn't give you any error) in the second step you will not be able to apply any new Widget downloaded and apply by Conky Manager, can show only the basic black Conky as the test to see if it's working, but in fact you cannot apply any new widget because will not show in the end.
Solution: go here https://github.com/brndnmtthws/conky/wiki/Installation  install the libs needs for the self building installation apt-get install cmake libimlib2-dev libncurses5-dev libx11-dev libxdamage-dev libxft-dev libxinerama-dev libxml2-dev libxext-dev libcurl4-openssl-dev liblua5.3-dev and follow the instraction till the make install command (if you need more futures like Conky-All for sure you have to install other dev libraries by your self, just follow where missing libs are required during the installation). This will allows us to install Conky properly with all the futures well working without bugs.
2. To install Conky Manager 2.4 the original from  teejee2008, you can find in GitHub section here: https://github.com/teejee2008/conky-manager/releases you must in the latest Ubuntu Os to install the following package realpath_8.26-3ubuntu4_all.deb (or later future versions). Or if you don't want install the abandoned original Conky Manager you can install the following fork Conky-Manager2 now in 2.7-2 version , search on google you will find easily. And then your widgets will work and appear properly.
3. As in my case, in case your widgets will work but will not show any Bar Graph related to your CPU/GPU/RAM or wherever hardware that your widgets will monitoring even if you have installed all the related packaging sensors like psensor or lm-sensors or wherever you need for your widgets, the problem it's located into the Lua file settings from your widgets projects; go to find the command line loadstring and change int load. This because, the loadstring function since Lua 5.2, has been replaced by load that it's vital to let work properly the Graphical Bars (CPU /GPU and so on) under the voice lua gradbar coding into the file widget settings.
Preface, all these problems I didn't have got in Debian because working everything "out of the box", so any Distro can react in different ways, the above solutions are for Ubuntu 21.04.
Hope can be usefully for others because I spent some days to solve all these obstacles.....