Error 2:

 In file included from ./include/linux/pid_namespace.h:6:0,
                    from ./include/linux/ptrace.h:8,
                    from ./include/linux/ftrace.h:13,
                    from ./include/linux/kprobes.h:42,
                    from /usr/share/systemtap/runtime/linux/runtime.h:21,
                    from /usr/share/systemtap/runtime/runtime.h:24,
                    from /tmp/stapd8LhT7/stap_24feca2d4e5abb002d28b0bc184e6d61_945_src.c:25:
    ./include/linux/mm.h:1293:6: note: expected ‘long unsigned int’ but argument is of type ‘struct task_struct *’
    long get_user_pages(unsigned long start, unsigned long nr_pages,
        ^

Error 3:
    In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
                    from /usr/share/systemtap/runtime/runtime.h:24,
                    from /tmp/stapd8LhT7/stap_24feca2d4e5abb002d28b0bc184e6d61_945_src.c:25:
    /usr/share/systemtap/runtime/linux/access_process_vm.h:35:34: error: passing argument 2 of ‘get_user_pages’ makes integer from pointer without a cast [-Werror=int-conversion]
        ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
                                    ^
Error 4:

 In file included from ./include/linux/pid_namespace.h:6:0,
                    from ./include/linux/ptrace.h:8,
                    from ./include/linux/ftrace.h:13,
                    from ./include/linux/kprobes.h:42,
                    from /usr/share/systemtap/runtime/linux/runtime.h:21,
                    from /usr/share/systemtap/runtime/runtime.h:24,
                    from /tmp/stapd8LhT7/stap_24feca2d4e5abb002d28b0bc184e6d61_945_src.c:25:
    ./include/linux/mm.h:1293:6: note: expected ‘long unsigned int’ but argument is of type ‘struct mm_struct *’
    long get_user_pages(unsigned long start, unsigned long nr_pages,
        ^

Error 5:

 In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
                    from /usr/share/systemtap/runtime/runtime.h:24,
                    from /tmp/stapd8LhT7/stap_24feca2d4e5abb002d28b0bc184e6d61_945_src.c:25:
    /usr/share/systemtap/runtime/linux/access_process_vm.h:35:44: error: passing argument 4 of ‘get_user_pages’ makes pointer from integer without a cast [-Werror=int-conversion]
        ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
                                                ^

Error 6:

In file included from ./include/linux/pid_namespace.h:6:0,
                from ./include/linux/ptrace.h:8,
                from ./include/linux/ftrace.h:13,
                from ./include/linux/kprobes.h:42,
                from /usr/share/systemtap/runtime/linux/runtime.h:21,
                from /usr/share/systemtap/runtime/runtime.h:24,
                from /tmp/stapd8LhT7/stap_24feca2d4e5abb002d28b0bc184e6d61_945_src.c:25:
./include/linux/mm.h:1293:6: note: expected ‘struct page **’ but argument is of type ‘int’
long get_user_pages(unsigned long start, unsigned long nr_pages,
    ^

Error 7:

 In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
                    from /usr/share/systemtap/runtime/runtime.h:24,
                    from /tmp/stapd8LhT7/stap_24feca2d4e5abb002d28b0bc184e6d61_945_src.c:25:
    /usr/share/systemtap/runtime/linux/access_process_vm.h:35:47: error: passing argument 5 of ‘get_user_pages’ makes pointer from integer without a cast [-Werror=int-conversion]
        ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
                                                ^

Error 8:

 In file included from ./include/linux/pid_namespace.h:6:0,
                    from ./include/linux/ptrace.h:8,
                    from ./include/linux/ftrace.h:13,
                    from ./include/linux/kprobes.h:42,
                    from /usr/share/systemtap/runtime/linux/runtime.h:21,
                    from /usr/share/systemtap/runtime/runtime.h:24,
                    from /tmp/stapd8LhT7/stap_24feca2d4e5abb002d28b0bc184e6d61_945_src.c:25:
    ./include/linux/mm.h:1293:6: note: expected ‘struct vm_area_struct **’ but argument is of type ‘int’
    long get_user_pages(unsigned long start, unsigned long nr_pages,
        ^

Error 9:

 In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
                    from /usr/share/systemtap/runtime/runtime.h:24,
                    from /tmp/stapd8LhT7/stap_24feca2d4e5abb002d28b0bc184e6d61_945_src.c:25:
    /usr/share/systemtap/runtime/linux/access_process_vm.h:35:13: error: too many arguments to function ‘get_user_pages’
        ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
                ^

Error 10:

 In file included from ./include/linux/pid_namespace.h:6:0,
                    from ./include/linux/ptrace.h:8,
                    from ./include/linux/ftrace.h:13,
                    from ./include/linux/kprobes.h:42,
                    from /usr/share/systemtap/runtime/linux/runtime.h:21,
                    from /usr/share/systemtap/runtime/runtime.h:24,
                    from /tmp/stapd8LhT7/stap_24feca2d4e5abb002d28b0bc184e6d61_945_src.c:25:
    ./include/linux/mm.h:1293:6: note: declared here
    long get_user_pages(unsigned long start, unsigned long nr_pages,
        ^

Error 11:

 In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
                    from /usr/share/systemtap/runtime/runtime.h:24,
                    from /tmp/stapd8LhT7/stap_24feca2d4e5abb002d28b0bc184e6d61_945_src.c:25:
    /usr/share/systemtap/runtime/linux/access_process_vm.h:55:7: error: implicit declaration of function ‘page_cache_release’ [-Werror=implicit-function-declaration]
        page_cache_release (page);
        ^

Error 12:

 In file included from /usr/share/systemtap/runtime/linux/print.c:17:0,
                    from /usr/share/systemtap/runtime/print.c:17,
                    from /usr/share/systemtap/runtime/runtime_context.h:22,
                    from /tmp/stapd8LhT7/stap_24feca2d4e5abb002d28b0bc184e6d61_945_src.c:55:
    /usr/share/systemtap/runtime/transport/transport.c: In function ‘_stp_lock_inode’:
    /usr/share/systemtap/runtime/transport/transport.c:506:19: error: ‘struct inode’ has no member named ‘i_mutex’
    mutex_lock(&inode->i_mutex);
                    ^

Error 13:

 /usr/share/systemtap/runtime/transport/transport.c: In function ‘_stp_unlock_inode’:
    /usr/share/systemtap/runtime/transport/transport.c:515:21: error: ‘struct inode’ has no member named ‘i_mutex’
    mutex_unlock(&inode->i_mutex);
                        ^

Tip:

  cc1: all warnings being treated as errors
    scripts/Makefile.build:294: recipe for target '/tmp/stapd8LhT7/stap_24feca2d4e5abb002d28b0bc184e6d61_945_src.o' failed
    make[1]: *** [/tmp/stapd8LhT7/stap_24feca2d4e5abb002d28b0bc184e6d61_945_src.o] Error 1
    Makefile:1524: recipe for target '_module_/tmp/stapd8LhT7' failed
    make: *** [_module_/tmp/stapd8LhT7] Error 2
    WARNING: kbuild exited with status: 2
    Pass 4: compilation failed.  [man error::pass4]
    Tip: /usr/share/doc/systemtap/README.Debian should help you get started.


Bash itself needs to be run as an administrator.  You can do this by right clicking on the icon and selecting "Run as administrator", then accepting the prompt. This will allow Bash to run most commands, though it looks like there are still a lot of screwy networking features.


Allowing a systemd system unit to access/mount a disk required for that service to run

So after a little more research, I was able to solve my issue by creating a new group, and adding my user account and service account to it. Then, in fstab, I mounted the disks using my user account and the new group as the owner, and set it to auto-mount on startup. Now, upon boot, the disks are mounted and the services have access to them.

Detailed instructions on how to accomplish the above can be found in this answer.


apt returns "E: Unmet dependencies" when I try to install a package, how can I diagnose the issue and find out why it occurs?

If you are installing an specific package/program and you hit a dependency issue there are two causes:

Your dependencies were already broken.
It isn't possible to install the package you want due to your current setup.

The first case is easy to figure out. Just execute sudo apt-get check. This will report you any problem with the already installed packages and you will know how to solve them.

sudo apt-get check
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libpurple-dev : Depends: libpurple0 (>= 2.10.9) but it is not installed
                 Depends: libpurple0 (< 2.10.9+1~) but it is not installed
 pidgin : Depends: libpurple0 (>= 2.8.0) but it is not installed
 pidgin-whatsapp : Depends: libpurple0 (>= 2.8.0) but it is not installed
E: Unmet dependencies. Try using -f.

Normally if you didn't install any packages manually with dpkg, you have missing mirrors, broken PPA's or a mix of different version repositories (like Debian's and Ubuntu's or Precise and Saucy) this could be fixed with a simple sudo apt-get -f install. If that doesn't fix it, you may need to ask for help adding all the results of the operations you attempted plus the output of apt-cache policy for all relevant packages:

apt-cache policy pidgin-whatsapp pidgin libpurple-dev libpurple0

Now, if that results clean and the dependency issue only happens when you try to install a package, you may need to know why apt is refusing to install the package. This is tiring to do and would pose a hurdle if you want to solve your issue fast, and each problem has it's own solution. Is recommended in such cases using aptitude. First we install it:

sudo apt-get install aptitude

Now you will ask aptitude why you can not install the package using:

aptitude why-not package

It will show you a nice list telling you why the package can't not be installed. It could be a missing package, that depends on a package that isn't available, or some other package that has conflicts/breaks it. Example:

aptitude why-not lsb-core:amd64
i   lsb-security Recommends lsb-core (>= 4.1+Debian12)
i A lsb-core     Conflicts  lsb-core:amd64

In this case, I have installed lsb-security package, which installed lsb-core 32-bits version, and doesn't allow me to install the 64-bit version.


Install ubuntu in ssd and use hdd for /home

...will creating a home partition deletes all the existing file on hdd?
Short answer is "yes". If you are going to replace Windows with Ubuntu (or any other operating system) then the data on both your SSD and HDD will be eliminated, new file systems will be created, and the computer will have none of your former data on it.
Before switching the computer to Ubuntu, you will want to make sure you have a good backup of your important files. This can be done with a USB stick, an external hard drive, cloud storage, or anything else that can support all of your data. Once the computer has a new operating system installed, you can copy everything back.
Hope this answers your question


What are the differences between the Ubuntu shipped kernel and the upstream kernel?

The upstream kernels (referred, when we provide them, as mainline kernels) are simply the upstream kernel for the specified version, with a very few minor configuration changes added so that there is minimal issue using them on an Ubuntu Install.

The difference between these kernels and the one released for an Ubuntu version are numerous other configuration changes, source patches* and, in some cases, compiled in modules and hardware support.

Very little of the underlying code is different from upstream other than that noted above.

*: source patches are, in most cases, changes to the default behavior of the kernel. These are not limited to: blacklists, video quirks tables, built in modules, source changes that are not yet in Linus' tree or the stable queue quite yet etc.

Source patches are what the team uses to introduce configuration options that are required to support the vast array of released software for a specific version of Ubuntu. In many cases they are necessary for those applications to work properly. The fundamental difference between this and the upstream kernel is that the pure upstream kernel is not distribution specific.

Therefore, the configurations are not geared toward ensuring that certain applications work as expected. These configs exist to provide that level of changeability to the kernel for specific things. Additionally, the use of quirks allows us to identify hardware that requires specific things from the kernel that we can set once we detect them.

This is one of the major features of Linux and it is one of the reasons we have been able to run on so many diverse platforms over the years. There are times when the quirks and source patches cause issues between each other. During these times, we work to mitigate the problems with changes to underlying kernel behavior. In many cases these changes don't make it upstream until after the release due in very large part to the need to properly code the fix, document what was done, test the changes and conduct various other tests and stress testing.

In these cases, patches that are headed for upstream are carried as source patches in much the same way pre-stable and patches that are not yet in Linus' tree do. The link to the delta review spec should serve as a reference for what was reviewed for the current Natty release of the Ubuntu kernel.


Failed to create symbolic link, what should I do?

You should check if the symbolic link /usr/bin/utserver exists. If it does, you could unlink it:

sudo unlink /usr/bin/utserver

then redo the ln command

sudo ln -s /opt/utorrent-server-v3_0/utserver /usr/bin/utserver

Cheers,


14.04

In the DConf editor, go to org > gnome > desktop > wm > keybindings

Assign the F1 key to some inoffensive function (e.g. set-spew-mark).


Switching to an external display, when primary is broken

Finally figured this out after blind-allowing Desktop Sharing (it didn't help that I had got the password wrong and that's why I couldn't install ssh server, hooray for passwordless desktop sharing!) and determined that in the install I had selected 'install 3rd party software' which included Nvidia proprietary graphics drivers. Normally that would be a good thing, but caused it to not recognize any other monitor and basically fail.

I reinstalled completely, unchecked the third-party applications, and finally after adding nomodeset to the grub boot I was able to get to the desktop.

There were several options in the restricted drivers I could install and noticed some old series that might work for the card that on that machine, so if I'm feeling masochistic I might try and install those and see what happens.


Try completely remove package:

sudo apt purge <package_name>

In your case

sudo apt purge atom

But if Atom was installed from snap? you have to remove it by snap. From command line something like this:

snap remove atom


How to show image color depth in Eye of Gnome?

They are not about EoG, but I found 1 way to get the information of  color depth (or bit depth).

Using mediainfo comannd

mediainfo "image_file_name" | grep 'Bit depth'

It will be displayed as follows:

Bit depth     : 32 bits


How can I remove Home/Folders from my Unity dash?

Edit / Remove them from  ~/.config/user-dirs.dirs, and ~/.gtk-bookmarks.


How do you cd into the first available folder without typing out the name?

I would advice either to type first few letters and pressing tab. Bash has autocomplete feature that is really useful. If it is only directory in in current path just pressing tab will fill whole directory.

Typing in cd and pressing tab twice will display all options in current directory.

tab is generally really useful in bash as you have accessible almost all executables at one or two keypresses.

cd * as suggested above works only if the directory is first in the listing and not hidden. If there is file alphabetically before your directory this cd won't change your directory at all.


The full command in that link is:

echo -e "blacklist bcm43xx\nblacklist b43\nblacklist b43legacy\nblacklist ssb" | sudo tee -a /etc/modprobe.d/blacklist

What tee -a does is append the file specified (/etc/modprobe.d/blacklist) with the contents of the "pipe" (|) from the output of echo.

The \n is the newline character.  So, what you output from echo -e "blacklist bcm43xx\nblacklist b43\nblacklist b43legacy\nblacklist ssb" is:

blacklist bcm43xx
blacklist b43
blacklist b43legacy
blacklist ssb

This went through the pipe and saved to the file by tee.

To reverse this, you have to open the file, e.g. in a terminal:

sudo nano /etc/modprobe.d/blacklist

Go to the bottom of that file, and delete those lines, and save (CTRL+S).


Tried to use xdmx and now I can't log in!

It turns out there was a .Xauthority file in my home directory that did not show up with locate because it was owned by root. Deleting that did the trick!


Red Error sign when opening update manager

Judging by the description of the sign you gave it seems to be the broken repository sign. Here is how to fix this.

Click on the sign and select "Check for updates".
Keep that window open. This will fail if the problem lies here. Now, open the software center and go to edit>software sources.
In the other software tab, disable the checkboxes next to the names of the repositories that failed to work (from the check for updates window). Then, update as normal.


Does “Install this third-party software” add the proprietary Nvidia driver or only Codecs?

The "Install this third-party software" option in the Ubuntu installer installs a group of frequently used media codecs, but it does not install all possible codecs, for example codecs which are rarely used. The "Install this third-party software" option in the Ubuntu installer also does not install proprietary graphics drivers such as the proprietary Nvidia graphics driver. Open source graphics drivers are built-in by default in Ubuntu.

The proprietary Nvidia graphics driver can be installed in Ubuntu using the built-in Additional Drivers utility or from the terminal with the following commands:

sudo ubuntu-drivers autoinstall
sudo reboot

The ubuntu-drivers autoinstall command installs drivers that are appropriate for automatic installation including their dependencies, and the Nvidia driver will also be updated automatically when an update is available.

When installing a proprietary graphics driver, it is not necessary to uninstall the open source graphics driver. The two graphics drivers can be installed alongside each other allowing the open source graphics driver to be used as a fallback alternative in case there is a problem using the proprietary graphics driver.


You need to boot using a live CD/USB to make changes on the root partition. Then you can use Gparted ...


Snaps have been part of Ubuntu Server for a little while and can be quite useful for people who want to make use of the Snap feature set. There are a number of snaps that are logical to keep on an Ubuntu Server installation, too, such as NextCloud and a number of popular VPN tools. This allows for the software to always remain up to date without being babysat by an administrator. This can be particularly useful for people who want to "set and forget" while still benefitting from new security updates.
Fortunately, if you do not need or want your Ubuntu Server to use snaps, you can remove snapd without consequences.
sudo apt remove snapd

One thing you will want to check beforehand is that you're not using any OpenVPN tools that run as a snap. You can do this with:
snap list

This is what people will see with a fresh Ubuntu Server 20.04.1 installation on Amazon:
Name              Version    Rev    Tracking         Publisher   Notes
amazon-ssm-agent  3.0.161.0  2997   latest/stable/…  aws✓        classic
core              16-2.48    10578  latest/stable    canonical✓  core
core18            20201210   1949   latest/stable    canonical✓  base
lxd               4.0.4      18152  4.0/stable/…     canonical✓  -

So long as nothing in that list is necessary, feel free to remove it. If you change your mind later, simply:
sudo apt install snapd

Hope this answers your question.


Troubleshooting Oracle Java 7 with Firefox

I was experiencing the exact same problem running Ubuntu Precise.  I'm running Proxmox on a server, and their java viewer requires Oracle java and does not work with icedtea.  I installed the latest java 7 from http://www.webupd8.org, but could not get it to work with Firefox.  I did discover that java did work in the Opera browser.

When I saw your message and saw the issue with permissions, I thought ahhah! apparmor.  Sure enough the kern.log shows:

/var/log/kern.log

Aug  1 09:54:50 laptop kernel: [42653.495082] type=1400 audit(1375368890.811:81): apparmor="DENIED" operation="exec" parent=22495 profile="/usr/lib/firefox/firefox{,*[^s][^h]}" name="/usr/lib/jvm/java-7-oracle/jre/bin/java" pid=22507 comm="plugin-containe" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
Aug  1 09:56:38 laptop kernel: [42761.283499] type=1400 audit(1375368998.599:82): apparmor="DENIED" operation="exec" parent=22812 profile="/usr/lib/firefox/firefox{,*[^s][^h]}" name="/usr/lib/jvm/java-7-oracle/jre/bin/java" pid=22824 comm="plugin-containe" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
Aug  1 10:11:51 laptop kernel: [43674.436828] type=1400 audit(1375369911.752:83): apparmor="DENIED" operation="exec" parent=23255 profile="/usr/lib/firefox/firefox{,*[^s][^h]}" name="/usr/lib/jvm/java-7-oracle/jre/bin/java" pid=23267 comm="plugin-containe" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0

I set apparmor to complain mode

sudo aa-complain /usr/bin/firefox
sudo service apparmor reload

and it started working

Then when I reset apparmor to enforce mode

sudo aa-enforce /usr/bin/firefox
sudo service apparmor reload

it unexpectedly continued to work.  I suspect the apparmor reload cleared a cache file that wasn't getting cleared by the many reboots I've done while looking for the cause.

Addition: After playing around awhile, I found that processes started in complain mode, remain in complain mode even after the profile is switched to enforce mode.

Update the apparmor profile for firefox (or other browsers) in /etc/apparmor.d/abstractions/ubuntu-browsers.d/java

# Under Java plugin, add two lines:
  /usr/lib/jvm/java-*-oracle/jre/bin/java{,_vm} cx -> browser_java,
  /usr/lib/jvm/java-*-oracle/jre/lib/*/libnp*.so cx -> browser_java,
# before the lines:
  /usr/lib/jvm/java-*-sun-1.*/jre/bin/java{,_vm} cx -> browser_java,
  /usr/lib/jvm/java-*-sun-1.*/jre/lib/*/libnp*.so cx -> browser_java,

# In the browser_java profile, add two lines:
  /usr/lib/jvm/java-*-oracle/jre/bin/java{,_vm} ix,
  /usr/lib/jvm/java-*-oracle/jre/lib/i386/client/classes.jsa m,
# before the lines:
  /usr/lib/jvm/java-*-sun-1.*/jre/bin/java{,_vm} ix,
  /usr/lib/jvm/java-*-sun-1.*/jre/lib/i386/client/classes.jsa m,

Then restart apparmor:

sudo service apparmor restart

When testing, I found it was necessary to reload or restart apparmor after each profile change and then restart the browser.  Several times I was fooled into thinking a change was working only to have it fail after a few hours. I'm still receiving a few apparmor messages when running the java browser test, but none seem to prevent it from working.


How to force an application to use the gtk theme?

VSCode is not a GTK+ application, so you cannot force it to use the GTK+ theme at all. It is an Electron application (that is, it's a webapp running inside a custom build of the Chromium browser engine).

You can however, make a theme for VSCode if you wish, which matches the rest of your system. Though, this does seem to be limited in what can be themed.


Google Chrome will take up my memory to the point where it causes my computer to freeze to a near halt. What can I do to prevent this?

The short answer: In Chrome, press Shift+Esc to see what tabs are using up too much RAM, and refresh or reload those tabs from time to time to reclaim memory.

The long answer: I think this is more of a Chrome problem than a Ubuntu problem.

I recently ran into this problem using Windows 7 with a Chrome tab opened on rt.com with the comments section at the bottom of a story opened. The comments section is driven by spot.im and will consume over a gigabyte of RAM over an hour of doing nothing but sitting there. Windows 7 would issue a low RAM error and then I'd have to reboot. The same problem exists within Ubuntu + Chrome but not nearly as bad as Windows + Chrome.

Then I discovered Shift+Esc within Chrome to bring up memory display stats, where I could watch how much RAM each tab was consuming. This works on Windows and Ubuntu.

When available memory (RAM + SWAP) runs low, a program called "OOM Killer" (Out of Memory) starts up and "intelligently" kills running applications and stops new applications from running. OOM Killer was improved in Linux Kernel 4.6, but I can't say exactly how.

I did a test the other night using Chrome to burn up 95% of RAM and 65% of swap using OOM killer under Kernel 4.7.1 and the system remained stable. I couldn't do new things like Alt+Print Screen but could still reboot no problem. Chrome did error out on reboot and couldn't restore the 20 odd tabs from the previous session, but that isn't a surprise.


export http_proxy: where does the proxy setting get stored?

To my knowledge, the file:

/etc/environment

Is the correct place to specify system-wide environment variables that should be available to all processes. See https://help.ubuntu.com/community/EnvironmentVariables for details. Note that this is not a script file but a configuration file.


Is there a screenshot taking app like gyazo on ubuntu?

You can install gyazo on Ubuntu. Open a terminal and run the following commands:

curl -s https://packagecloud.io/install/repositories/gyazo/gyazo-for-linux/script.deb.sh | sudo bash
sudo apt-get install gyazo

More info.


how to Copy and Delete files in Windows 10 drives from Ubuntu

The above answer didn't solve my problem but I kept searching and now I solve my problem and want to share Solutions here and Maybe this Solution will help others.

First Run command
    "killall nautilus"

Second Run
    "sudo mount -o remount,rw /dev/sdd1"

Replace sdd1 with your drive and thats it.


Did you try the fix mentioned in this thread, this post to be specific

http://ubuntuforums.org/showpost.php?p=10020982&postcount=24


Use the UUID instead of the device name.  /dev/sda and /dev/sdb can change places.

UUID=BCD83AE3D83A9B98 /media/Data ntfs nls=iso8859-1,ro,users,umask=000 0 0


Ubuntu Additional Drivers won't install flgrx

Yes it appears to be a Bug apt-get fails to install fglrx or fglrx-updates in 14.04.2 and 12.04.5
according to my researches, it is not solved yet


Ubuntu 18.04 cannot boot after installing the NVIDIA driver

Try removing NVIDIA by booting into live USB/DVD.

Boot from live DVD or USB drive (installation DVD/USB) and choose "Try Ubuntu".
Mount the partition your Ubuntu Installation is on. If you are not sure which it is, launch GParted (included in the Live CD)

or. Open a terminal (Ctrl+Alt+T) and use the following command:

sudo fdisk -l

and find out. It is usually a EXT4 Partition. Replace the XX with the drive letter, and partition number, for example: sudo mount /dev/sda1 /mnt.

sudo mount /dev/sdXX /mnt
sudo mount /dev/sdXY /mnt/boot   #if separate boot partition

Note : sdX = disk | sdXX = system partition | sdXY = boot partition
Now bind the directories that are needed to access and detect other operating systems.

sudo mount --bind /dev /mnt/dev &&
sudo mount --bind /dev/pts /mnt/dev/pts &&
sudo mount --bind /proc /mnt/proc &&
sudo mount --bind /sys /mnt/sys

Now chroot.

sudo chroot /mnt

Now remove NVIDIA

apt remove --purge nvidia-*
apt install ubuntu-desktop
echo 'nouveau' | tee -a /etc/modules
apt install ubuntu-desktop

If network problem

echo "nameserver 8.8.8.8" >/etc/resolv.conf

Now unmount as follows

exit &&
sudo umount /mnt/sys &&
sudo umount /mnt/proc &&
sudo umount /mnt/dev/pts &&
sudo umount /mnt/dev &&
sudo umount /mnt

Shut down and turn on your computer again without installation DVD/USB.


back and forward keyboard buttons do not work on 14.04

What you're trying to do is to cram the keys of two keyboards into one keyboard.

How about turning the solution upside-down: try to make two keyboards work as two keyboards!

E.g. someone who has a French and a German keyboard, defines 2 keyboards: a French one and a German one and tells Ubuntu which one is being used.

So do the same: define two keyboards in System Settings - Text Entry, re-assign the keys as explained in this article and presto: you're up and running.

(If your layout is QWERTY US you take "English US" and "English US, alternative international", if you have QWERTZ, you take German and Swiss, French&Belgian, ...)

If you need more info, post a reply here.


Installed Wine 1.7.9 for both the PlayOnLinux Drive and Ubuntu itself.

http://tecmint.com/install-wine-on-ubuntu-and-linux-mint

And inside PlayOnLinux hit Configure and add the newer wine version to that Drive.


Is there an Official Ubuntu Server 16.04 vagrant box?

ubuntu/xenial64 appears to be the box you're looking for. Ubuntu always publishes under the ubuntu organization with the colloquial name of the OS and architecture.


How to make "Search on Google" available in selected text's context menu in gnome-terminal?

Yes, there is an option. First download the following deb packages:

the data package: gnome-terminal-data_3.6.1_all.deb
the main package: gnome-terminal_i386.deb (for 32-bit OS) or gnome-terminal_amd64.deb(for 64-bit OS)

Second, install them using the following commands in your terminal:

sudo dpkg -i /path/to/gnome-terminal-data_3.6.1-0ubuntu4.1_all.deb

sudo dpkg -i gnome-terminal_3.6.1-0ubuntu4.1_i386.deb
#or, depending on what you downloaded
sudo dpkg -i gnome-terminal_3.6.1-0ubuntu4.1_amd64.deb

And third, restart your terminal.

From now, when you will open your gnome-terminal you can quickly search on Google command line errors, warnings and other things. Highlight the text, right-click on it and choose "Search on Google". It opens the default web browser and go to the google search result page:

Source: Add Google Search to Gnome Terminal in Ubuntu 13.10


We used to do that 35 years ago using 10Base2: just daisy chain a bunch of computers together.

In the mean time, technology has evolved a bit, so today, I would use 10Base-T and just plug all 3 computers into a switch (or hub or VLAN), which will give you what you want straight away without any of the head-aches linked to daisy-chaining.

If you insist on using 10Base-2 to daisy-chain, there are a few particularities using that technology, so read the article, and please: don't use 10Base-T to daisy chain!


The software developer doesn't have a xenial PPA, but does have a wily PPA. Edit your ppa definition in Software & Updates and change xenial to wily.

Many PPA's are not updated to the latest because the developer has either stopped development, stopped supporting it, or abandoned it. But it doesn't mean that older software specifically developed for an older Ubuntu distribution won't work. If you visit the PPA site and look in the dists directory, you can determine the last release available, update your Software & Updates and still have access to the software. In this case, no xenial, but wily was still there.

update: never use a PPA repository that is for a newer version of Ubuntu than what you're currently running.


Dual boot problems windows 10 ans Ubuntu 16.04.2 LTS

I think you misinterpreted the installer's prompt; I don't think it was telling you to create a separate /boot partition (which uses a Linux filesystem and holds the Linux kernel and related files), but to create a BIOS Boot Partition, which holds part of the BIOS-mode version of GRUB without using a filesystem at all. The two are totally different things. Some installations require one or the other of these partitions, and some require both. Your computer has both of them, but in fact, neither is actually necessary.

Also, some of your partition sizes are way out of line:

/dev/sda6 is your /boot partition, and is 488 MiB, which is a decent size. (~500 MiB is common these days.)
/dev/sda7 is your swap partition, and is 15 GiB, which is probably not too bad. In the past, swap was routinely 1-2x the amount of installed RAM. Today that's normally overkill, unless you want to suspend to disk, in which case it should be at least as big as your RAM. If you don't want to suspend to disk, half your RAM size is probably adequate. Some people favor using no swap space at all, but it does have its advantages even if you don't use all your RAM for programs, since the kernel can swap out less-used temporary data in favor of caches that can speed up disk access.
/dev/sda8 is your root (/) partition, and is 171 GiB, which is much too big if you've got a separate /home, as you do. In most cases, ~20 GiB is enough for an Ubuntu root (/) partition. For a big installation with lots of programs, 50 GiB should be more than adequate. (OTOH, if you don't use a separate /home partition, / should be the bulk of your Ubuntu-related storage -- the size of both / and /home if they were separated.)
/dev/sda9 is your BIOS Boot Partition, and is 122 MiB, which is way too big for this partition. 1 MiB is normally sufficient -- but if you install in EFI mode, this partition is completely unnecessary.
/dev/sda10 is your /home partition, and is 855 MiB, which is much too small. Your user files reside in /home, so it should be big enough to hold whatever you plan to store there -- word processing document, Web browser caches, MP3 files, videos, etc. Some of these can be huge. Thus, on a desktop or laptop with a separate /home, this is normally the largest partition.

The best way for you to proceed is to re-install Ubuntu as follows:

In your firmware setup utility, disable the Compatibility Support Module (CSM), aka legacy support or BIOS-mode boot support.
You may need to re-create your Ubuntu installation medium (or maybe not). The key is to ensure that it includes an EFI-mode boot loader. See this page of mine for more on the CSM and its problems and how to create a suitable boot medium (the last is near the bottom, in "Creating EFI-Bootable USB Drives.") It's unclear to me if your current medium has the EFI-mode boot support.
Boot the Ubuntu installer, but select the "try before installing" mode.
Open a Terminal window and verify that you've booted in EFI mode by looking for a directory called /sys/firmware/efi. If it's present and contains various files and subdirectories, you've booted in EFI mode; otherwise, you've booted in BIOS/CSM/legacy mode, and you should review the preceding steps and fiddle with your settings or USB drive until you can boot in EFI mode.
Delete the partitions corresponding to your current installation -- /dev/sda6 through /dev/sda10.
Re-run the Ubuntu installer. You can either create partitions manually, but along more sensible lines; or you can tell the installer to install in the disk's (now) unpartitioned space. I'd recommend a 20-to-50 GiB root (/), a swap partition of roughly its current size (adjust up or down as you see fit; see my earlier comments), and the rest as /home. There's no need for a separate /boot partition or a BIOS Boot Partition. Be careful with partitioning, though; people have accidentally wiped out their Windows installations by selecting the wrong option!

When the installer finishes installing, the computer should reboot into GRUB, which should give you the option of booting either Ubuntu or Windows.


I just had this issue after switching from Gnome3 to KDE5 (Ubuntu 18.04).
This answer has helped me: https://askubuntu.com/a/401996/432944


flashplugin-installer vs. flashplugin-nonfree vs. adobe-flashplugin

flashplugin-installer is the 'new' name for flashplugin-nonfree. The aim being to more accurately reflect the contents of the package - the package doesn't contain the actual flash player, only an installer that automatically downloads and installs a copy of the plugin. (The file downloaded is the tarball as provided on the Adobe website, but in this case the file is mirrored on Canonical servers.)

The reasons you still see flashplugin-nonfree in Synaptic is for backwards compatibility. It is a transitional metapackage with no actual content, all it does is depends on and install flashplugin-installer.

So to cut a long story short, there is absolutely no difference between the flashplugin-installer and flashplugin-nonfree packages.

As for the adobe-flashplugin package - this is provided in the Canonical Partners repository. The difference with this package is that it actually contains the non-free flashplugin itself (it's not just an installer). Note that this package is exactly the same file as can be installed by downloading from the Adobe website.

So I'm afraid I can't say definitively whether you'll see any performance difference between the flashplugin-* packages and the adobe-flashplugin - but at the end of the day they are the same plugin so it's very unlikely.


Permission denied for “dd” of Android phone's file system connected over mtpfs in Ubunutu 14.0.4

You can dd only from a device or a file not from a directory.

Also this will likely fail because you use MTP. MTP is a layer above the filesystem that expose only files. It's a protocol not a true filesystem.

But even with a filesystem this will not work. You need to do that on the device. The general example is

sudo dd if=/dev/mydevice of=mydump.bin

This will not work here

If you could mount it using MSC aka. USB Mass Storage, then you should be able to do it.

Edit:
One other way to do it is by installing a terminal app on android (with busybox ?) and do the dd inside that terminal. you dump it on your sd card.

Look at output of mount and look for your device. Here I dump the /system directory to SD card.

mount
[...]
/emmc@android /system ....
[...]
su -
dd if=/emmc@android of=/storage/sdcard1/mydump.bin


Is it possible to add CTAN directory as a software source to the packet manager muon?

No. CTAN is not an Ubuntu package repository. If you always want the latest TeX packages, deinstall the Ubuntu TeXLive packages and instead install vanilla TeXLive.


A general purpose way to rename all the files in a directory

If your Ubuntu isn't a server don't treat it like one. pyRenamer from the default Ubuntu repositories has all the features that you are looking for including regex support, and since it's a GUI program you don't need to break your head trying to figure out how to use it. If you are having trouble writing a regular expression, you can get an explanation of what your regex does at RegExr. Don't allow yourself to become biased against GUI programs that were created for use cases like this.

pyRenamer is available from the default Ubuntu repositories in Ubuntu 16.04 and earlier. In Ubuntu 18.04 and later pyRenamer has been replaced by GPRename.


This is mostly a duplicate of a previous question I answered, but you have 2 problems with your current code:

It is custom-icon and not custom_icon
You really do not want to set the icon of a file to be a file from the animations context of a theme. Or in general, a file at all. It's better to set the custom-icon-name attribute if you really must, and then have that icon be a part of the theme, so that it works correctly if the user changes themes.


Installing new kernel (by commandline) as side of old kernel

Ok here we go on how to compile and install a new kernel :

First the dependencies for all of this :

sudo apt-get install build-essential makedumpfile

Plus the dependencies for the specific kernel, for a kernel which is in a repository you can do this :

sudo apt-get build-dep linux-image-"kernel number"

For your kernel, I don't know, maybe they are the same maybe they are differents you should search info on Google for that, it may depend on how you configure your kernel.

After this I suggest you create a place to work in your home folder :

mkdir src
cd src

You can unzip your kernel here or get a kernel from a repository with :

apt-get source linux-image-"kernel number"

Now we want to work in the unzipped folder :

cd linux-"kernel number"

After this you will need a tool to edit your kernel configuration, there are two different tools and to use them you will have to install their dependencies :

For xconfig = sudo apt-get install qt3-dev-tools libqt3-mt-dev
For menuconfig = sudo apt-get install libncurses5 libncurses5-dev

I suggest you use xconfig, which is easier to use. To use it you type :

xconfig = make xconfig
menuconfig = make menuconfig

Configure your kernel as you like and save your configuration. If you don't need it you should disable "Kernel debugging (DEBUG_KERNEL)" under "Kernel hacking" since that will make the compilation less long.

To compile, you type :

CONCURRENCY_LEVEL=3 sudo make-kpkg --initrd --append-to-version=-something kernel-image kernel-headers

Replace "CONCURRENCY_LEVEL=3" by the number of core your processor have +1 that will make the compilation much faster. Replace "--append-to-version=-something" by what you want to append to the name of the kernel.

Wait for a very long time, several hours depending on your computer.

When it is finished and if nothing bad happened you will have two beautiful debian packages created in the parent folder, install them :

cd ..
sudo dpkg -i linux-image-"kernel number".deb
sudo dpkg -i linux-headers-"kernel number".deb

Don't forget to update grub :

sudo dpkg-reconfigure grub-pc

Reboot on your new kernel and, if everything is fine, you're done.


Is it possible to lock the volume slider?

I don't know if it is possible to lock the Volume Slider, but the same effect of locking it at 50% can certainly be achieved.

Have a look at this Answer to a similar question which has been marked as 'Accepted' by its OP. According to this, to achieve the effect of capping the slider limit to 50%, we would use the value as 32768.

So, we would set the sink level using the following command in a terminal:

pacmd set-sink-volume <sink> <value>

And replace <value> with 32768; and <sink> with the sink name or sink index obtained from the following command:

pacmd list-sinks

This would achieve the effect of capping the volume slider at 50% (virtually).


How can I swap my backspace and backslash?

it is not possible with xdotool because your are linking two keys together.. system will struggle when you say backslash it reroute to BackSpace & when you say BackSpace again it reroutes to backslash and this loop keep on running

[backslash-->BackSpace-->backslash-->BackSpace-->backslash-->so on-->]

[BackSpace-->backslash-->BackSpace-->backslash-->BackSpace-->so on-->]

your all other keys works if you remove this kind of links..

for example: both of below will work.

"xdotool key space"
  Shift + BackSpace + Release
"xdotool key backslash"
  BackSpace + Release

or

"xdotool key space"
  Shift + BackSpace + Release
"xdotool key BackSpace"
  backslash + Release

the best way is to map the keys with this answer..https://askubuntu.com/a/24930/739431

i have tried it on my keybord and easily swapped backslash & BackSpace keys.

Example:

below are the values for the required keys by running xev command and pressing required keys.

state 0x10. keycode 51 (keysym 0X5c, backslash), same_screen YES,

stat 0X10, keycode 22 (keysym 0xff08, BackSpace), same_screen YES,

$ xmodmap -e "keycode 51 = BackSpace"
$ xmodmap -e "keycode 22 = backslash"


First complete install Japanese language

sudo apt install language-pack-ja --install-suggests

Installing Japanese language support from command-line

Then next, install input method

sudo apt install fcitx-mozc --install-suggests

How can I type Japanese characters?

This old question is still useful, in my opinion, fcitx-mozc works wiser and efficient than ibus-anthy (it's rather light weight)


Gnome-do wont recognize anything after crashing

apt-get purge will only purge global configuration files. You might also have to remove your user-specific configuration files and data. For gnome-do all files should be located under the following folders:

~/.gconf/apps/gnome-do
~/.local/share/gnome-do

Note: You can use locate gnome-do to identify any residual items pertaining to gnome-do.

Sources:

http://ubuntuforums.org/showthread.php?t=1210901

https://bugs.launchpad.net/do/+bug/325106


The Wine PPA is obsolete. It does not provide packages for your Ubuntu 20.04 LTS version.
Please remove the PPA by
sudo add-apt-repository -r ppa:ubuntu-wine/ppa

To fix signature of the LibreOffice PPA re-add it by
sudo add-apt-repository -r ppa:libreoffice/ppa
sudo add-apt-repository ppa:libreoffice/ppa

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 83FBA1751378B444

and then run sudo apt-get update .


Try searching the web for a windows version of the driver for me. If you can find one, just tell me here. I may be able to help you wrap it. There may be better ways to do it, but this will at least get you up and running.


Wubi-move-to-partition worked but didn't install the bootloader, what do I do?

Don't use this script on 10.10. It doesn't work anymore. Look at the wubi guide for a link to the latest migration script.


Is it possible to search in the gnome-terminal?

Go to the search menu. Otherwise:

Shift + Ctrl + F


Square box around mouse pointer on kubuntu 16.04 and nvidia 960m

I have been using Kubuntu 18.04; when I tried a Windows technique to enlarge the whole screen (two keys: 'windows/start' '=',  I get a mouse pointer with a square black frame (about 2" sq.) with a solid black picture of an enlarged computer screen that will follow the pointer (with a time lag of the screen changing as I move the pointer around the screen)

A reboot would not get rid of the square picture around the mouse pointer.  I searched the internet for a solution; I found a partial solution:
"System setting->Display and Monitor->Compositor>open GL2.0}  change to XRender> then Apply"
That got rid of the solid picture, I still had the black 2" square with a magnifier inside following the mouse pointer (without a time lag). After playing with the different adjustments inside the Compositor,  I discovered:
"turn the [Enable compositor on startup]  button off> then Apply  and then reboot the computer"
That returned the mouse pointer back to normal!


What was the difference between `sudo apt-get -f install` and `sudo apt-get install -f`?

They are the same.

apt-get and install are obligatory. The -f is optional and can be placed anywhere after apt-get. Though the man page has them explained as apt-get -f install:

   apt-get [-asqdyfmubV] [-o=config_string] [-c=config_file]
           [-t=target_release] [-a=architecture] {update | upgrade |
           dselect-upgrade | dist-upgrade |
           install pkg [{=pkg_version_number | /target_release}]...  |
           remove pkg...  | purge pkg...  |
           source pkg [{=pkg_version_number | /target_release}]...  |
           build-dep pkg [{=pkg_version_number | /target_release}]...  |
           download pkg [{=pkg_version_number | /target_release}]...  |
           check | clean | autoclean | autoremove | {-v | --version} |
           {-h | --help}}


Failed to find required executable brew in paths - Ansible

Replace "homebrew" with "apt". If you get a password error, try running the command with "sudo"


The solution is simple. Navigate to the .jar file in Nautilus(File manager) and right-click it. Go to the Permissions tab and check the box labeled:

  Allow executing file as program

This sets the executable bit the JDK was complaining about.

But why is this, and what is this "executable bit" thingy?

In Linux, file extensions have less of a role in determining what to do with files. Instead, Linux uses magic numbers, which are basically headers. If you are familiar with Linux scripting, the shebang (The #! at the beginning) is a human-readable header, also. Executables have a header that may contain ELF or ELF64 if they are Linux Elfs(program files and libraries). However, this is not the only check.

Linux also keeps file permissions. It stores the user and group IDs for each file and directory and a lost of what the owner, group, and everyone can do. Included in this is the executable bit. If you chmod a+x the file or follow the graphical instructions I gave above, you set this bit telling Linux, and programs like Java and Wine that they should be allowed to run the file. If this bit is unset by unchecking the box or chmod a-x file, then the bit not being set tells Linux and software that would want to execute it not to do so for security. This does not apply to source code, however.


Why does my app not load the translation files of the lib

The directory where gettext will search for translations for a particular translation domain is controlled by the bindtextdomain function.  The library most likely has a call to this function somewhere in its initialisation routines.  So two options you could try are:

Modify the library so the bindtextdomain call specifies a directory based on $APP_DIR.  So where the library might run:

bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);

You might change it to something like:

const char *app_dir = getenv("APP_DIR");
if (app_dir) {
    char *localedir = NULL;
    asprintf(&localedir, "%s/share/locale", app_dir);
    bindtextdomain(PACKAGE, localedir);
    free(localedir);
} else {
    /* Not running as a click package: use compiled in default */
    bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
}

Make a second call to bindtextdomain that will run after the library's initialisation that sets the correct directory for the library's translation domain (possibly using code similar to the above).

It is hard to offer any more advice without knowing more about the specifics.


Where should a non-administrative user save a CA certificate?

Note: The question was edited a while after I answered, adding the point about the 'non-administrative' user, etc, but this answer is one alternative way of doing it.

There is no specific location in the users's home folder that is officially designated for .crt files, and none appears to be mentioned in the LSB (Linux Standard Base) or the FHS (Filesystem Hierachy Standard) if the specifications are examined at the Linux Foundation.

However, system-wide there is an official location specified by Debian, and adhered to by Ubuntu, which is explained in the packages documentation for ca-certificates. If you open the file /usr/share/doc/ca-certificates/README.Debian, this notice is presented:

  If you want to install local certificate authorities to be implicitly
  trusted, please put the certificate files as single files ending with
  “.crt“ into “/usr/local/share/ca-certificates” and re-run
  “update-ca-certificates”

i.e. this means that the certificate must end with .crt, and that in order to install your certificate and update the database you have to run:

sudo cp /home/mike/ra.crt /usr/local/share/ca-certificates
sudo update-ca-certificates

This is the only official line that I know of, and more information is available at man update-ca-certificates and in the Ubuntu manpages online.


How to install a printer in Lubuntu 17.10 with LXQT?

It does not matter which desktop environment you use, I think.

You may start by installing the cups package with sudo apt-get install cups. It has a web-interface on http://localhost:631 . You can find and add your printer from there.

Also you may want to use the GUI system-config-printer (install it with sudo apt-get install system-config-printer-gnome).

Also you can check OpenPrinting database to select the best driver for your printer.


14.04 Unity accessing application menu with keyboard

Alt exposes the menu, note the underlined letter for each menu item. Then press that letter while still holding the alt key.

That will expose the menu, release alt + the letter key & use down & up arrow keys to navigate the menu, enter key to use selected item


Convert from one archive type to another using CLI

Basic Shell commands:

$ cd $HOME
$ mkdir tempdir
$ cd tempdir
$ tar -zxvf ../archive.tar.gz

At this point you have a copy of the contents of archive.tar.gz in $HOME/tempdir/

$ zip -rmp password ../archive.zip *

... will create a zip archive from the contents of tempdir/ and then remove the files added. I presume it still does; use standard (weak) PKZip 2.0 encryption as stated for the -e option - which doesn't take the password, but prompts for it instead.

Make SURE / VERIFY you're still in tempdir/

$ pwd
.../tempdir

If there is ANYTHING else than "/tempdir" at the end above,
then DO NOT continue with what comes next, here:

$ rm -rf *
$ cd ..
$ rmdir tempdir

All the above might be possible with a pipe too, as in:

$ tar -zxvf ./archive.tar.gz - | zip -p password - ./archive.zip

... I see no reason to try it out though - due to the weak encryption and possible problems with how zip handles special files, links and whatnot.

If you want real encryption, look into gnupg and related utilities instead.

man tar, man zip, zip --help, zip -h2 | less, tar --help | less may hold information vital to the above, especially the piped conversion which I have not tried.


Installing windows 8 on XPS 13 developer edition

If you have a copy of Windows, it is possible to install it.
Although, if you do not or simply want better integration, use WINE.
Or, if you want to run Windows inside Ubuntu and have a copy of Windows, you can install it inside VirtualBox. This will basically have the same effect as installing Windows alongside Ubuntu.


Problem exporting from shotwell (imagenes with same name on differents dates)

You can use pyRenamer.  With pyRenamer you can change the name of several files at the same time easily.

To install pyRenamer, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install pyrenamer

Or, just click pyRenamer

Once installed, you can rename your files, and then export them as you want.


How to transfer c and python code binary to bin

Move them to ~/.bin (create if it does not exist). Then add them to $PATH by adding the following line to ~/.profile:

export PATH=$PATH:~/.bin/

and then, after restarting the terminal, you should be able to run it directly:

$ a.out

But they won't show up in the graphical search menu. To do that, create a .desktop file:

[Desktop Entry]
Version=1.0
Name=YourApp
Comment=Description of YourApp
Exec=sh -c '~/.bin/a.out'
Icon=utilities-terminal
Terminal=true
Type=Application
Categories=Application;

and save it at ~/.local/share/applications/YourApp.desktop


Snap packages are based on a runtime, which is either core (Ubuntu 16.04), core18 (Ubuntu 18.04), core20 (Ubuntu 20.04).

A developer of a snap package can choose to base it on a specific runtime version. The choice of core18 is a good option because the runtime includes most of the stuff that LXD needs (at the appropriate versions), and thus the LXD snap package saves space.

If you install more snap packages, and they also use core18, then you are saving space because the same runtime is reused.

If you install GUI snap packages, then they will likely pull in the additional runtime for GNOME. Again, these are shared among other GUI snap packages.


How do I put my bookmark toolbar on the right of address bar on firefox?


First, Ctrl+C and Ctrl+V are not system wide shortcut keys. They are defined by the application that you use. It is a very widely used convention to use these keys for copy/paste.

As a consequence, if you want to change these bindings, you will need to change them in any application where you want them to change. The accepted answer in this ask ubuntu post may provide some first ideas.

Alternatively, you could redefine the keys of your keyboard, such that Alt works as the Control key. This can be achieved with xmodmap in Linux. That way, your copy shortcuts indeed will be moved to Alt, but also any other shortcut that programmers defined to be triggered by Control.


System time is incorrect until i use internet... but hwclock is correct

The hwclock does not know about timezones and daylight saving, and different OS's deal with it differently. Because the old DOS did not know any other clock then the RTC/hwclock it was set in local time. I think this is still the default of all current Windows systems. The default in (most?) Linux based systems is to expect the hwclock to be set to UTC.

Because systems can boot several different OS's Linux can not demand the hwclock to be in UTC. Therefor it has a parameter to adjust time from hwclock to kernelclock / UTC in case of the hardwareclock is running localtime. Programs normally want to show you localtime so there is a different parameter to adjust for timezone and daylight saving.

It seems like in your system there is a discrepancy between your hwclock, UTC correction and timezone / daylight saving.

You can see what your hwclock is running with timedatectl, it will show you all data you want:

Local time: za 2016-01-09 17:46:05 CET
Universal time: za 2016-01-09 16:46:05 UTC
RTC time: za 2016-01-09 16:46:05
Time zone: Europe/Amsterdam (CET, +0100)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no

If I change my hwclock to:

Local time: za 2016-01-09 17:52:10 CET
Universal time: za 2016-01-09 16:52:10 UTC
RTC time: za 2016-01-09 17:52:10
Time zone: Europe/Amsterdam (CET, +0100)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no

and restart*, the hwclock will be used to set the initial kerneltime. Hwclock will give me then 17:52 after restart while date will give me a wrong localtime 18:52. After communication with an ntp server it adjust kernel time and you will see the correct time with date again.

* Some Linux distributions nowadays set the hwclock from systemtime when shutting down, so the hwclock might be adjusted to UTC after restart.


Can I remove the "open in terminal" menu item from nautilus?

In recent versions of Nautilus such as 3.14 (included with Ubuntu 15.04), the Open in Terminal command is part of the gnome-terminal package, which installs the libterminal-nautilus extension (at /usr/lib/nautilus/extensions-3.0/libterminal-nautilus.so).

It can be easily removed in terminal w/ sudo:

$ sudo mv -vi /usr/lib/nautilus/extensions-3.0/libterminal-nautilus.so{,.bak}

Afterwards you need to quit Nautilus to see the changes applied:

$ nautilus -q

(nautilus:16373): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed

(nautilus:16373): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed

(nautilus:16373): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(nautilus:16373): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(nautilus:16373): GLib-GObject-CRITICAL **: g_signal_connect_object: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

If Nautilus does not quit this way successfully (e.g. you see a time-out), you can command your operating system to kill it:

$ pkill -e nautilus
nautilus killed (pid 15962)

Afterwards you can restart Nautilus and is will show the entry removed.

Before:

After:

Refs:

Please remove nautilus-open-terminal package - Bug #1451166 reported by Adam Dingle in May 2015)


How to remount a read-only folder as readWrite?

Problem is solved, I remounted folder by using "mount -o remount,rw /" and then edited the file, without changing any permissions, it worked.


No splash screen after Nvidia propietary drivers

Also remove \$vt_handoff on line 70 in /etc/grub.d/10_linux and things should be working again.
If you're using the script it needs to be updated to work with the recent changes in this file.


What has 'rm -r ~' done to my home directory?

You have deleted (almost) all of your home directory!

rm -r something recursively deletes files and directories in/under something; it will only fail on items it does not have permission to delete, either because they are owned by a different user (e.g. root), or because they are in use (e.g. a GVFS mount).

If you did not add -f (as in, rm -rf something), you would get something like:

rm: remove write-protected regular file ‘something’?
rm: descend into write-protected directory ‘something’?

At this point you can abort and you then likely realise that you executed the wrong command.

Suggestions from the community on how to avoid such accidents

  Note: Community wiki, everyone please feel free to contribute.

For a few files, use the -i option to get a confirmation on removing files or directories:

$ rm -ri something/
rm: remove regular file ‘something/file~’? y
rm: descend into directory ‘something’? y
rm: remove regular file ‘something/file’? y
rm: remove directory ‘something’? y

If removing from a current directory, prefix it by a ./ to avoid mistakingly removing a different location.:

$ cd something
$ rm -v ./*~
removed ‘./file~’

The above was for demonstrating the use of ./. If there is a subdirectory, you can of course use rm -v something/*~ as well. Beware: do not think that rm ./.* removes all hidden files in the current directory. See this Serverfault question for workarounds on hidden files globbing.
Move rather than delete: Rather than deleting files recursively in the first place I got used to move the files I want to get rid of somewhere else before I delete them finally. If something went wrong its easy to restore.

mv -b SOURCE DEST

Use find (possibly with grep) to preview if you want to recursively delete selected files.  You should try to make this a rare occurrence, but if you have to...

find with no arguments recursively lists all files/directories under the current one. You should try to look up man find on how to make it selective (a treasure trove), but if you don't want to bother, you can just use the familiar grep to filter for the files you want to delete.
Suppose I'm an uber-l33t kernel hacker, and am bothered by the few KBs of "example" files in my source tree; I want to delete all files containing that in the name. So I type find | grep example, which gives me these 20 files.  That looks good, so I now go and delete those exact files, along with the rm -v verbose output previously mentioned, via xargs:

find | grep example | xargs rm -v

which gives me this output.   Such previewing prevents problems where say, you make a typo and type sample instead of example.

The above solution should not be used if you may have filenames containing spaces, tab characters, newlines, or quotes (" or '), as this will lead xargs to either fail, or feed rm with incomplete filenames, which in worst case could end up removing the wrong files. The safe way to do the above is to do it all with find's operators and actions.

The following will show all files that contain the word example

find . -name "*example*"

If that list is the files you want to remove, use the -exec action to pass the files to rm.

find . -name "*example*" -exec rm -v {} +

See Using Find for more help with using find.


Set environment variable UBUNTU 18.04 (bionic) - Crontab

cron runs jobs in its own minimal environment and doesn't itself read any of the shell startup files such as those in /etc/profile.d/ - by default it's just something like

LANGUAGE=en_CA:en
HOME=/home/steeldriver
LOGNAME=steeldriver
PATH=/usr/bin:/bin
LANG=en_CA.UTF-8
SHELL=/bin/sh
PWD=/home/steeldriver

You have a couple of options:

set the variables in a script, and run that from cron. In the case of shell scripts, that's easy (just export them at the top of the script - or source an environment file if you prefer). For Python scripts you may find it easiest to wrap the python call inside a shell script where you can set up the environment first.
define the environment as a sequence of name = value pairs inside the crontab like

ORACLE_HOME = /usr/lib/oracle/12.2/client64
* 5 * * * /path/to/some/executable

(spaces are allowed around the = since it's not a script); however note that this method does not expand variables so you can't do stuff like PATH=$PATH:/whatever

See man 5 crontab for details.


How can I create Logical Loopback on Ubuntu?

Dead easy (if you know how)

sudo ifdown eth0
gksudo gedit /etc/network/interfaces

Add the following to the end:

auto eth0
allow-hotplug eth0
iface eth0 inet loopback
iface eth0 inet static
    address 192.168.200.200
    netmask 255.255.255.0

execute:

sudo ifup eth0

Presto: an eth0 loopback in software!

ping 192.168.200.200
PING 192.168.200.200 (192.168.200.200) 56(84) bytes of data.
64 bytes from 192.168.200.200: icmp_seq=1 ttl=64 time=0.073 ms
64 bytes from 192.168.200.200: icmp_seq=2 ttl=64 time=0.042 ms
64 bytes from 192.168.200.200: icmp_seq=3 ttl=64 time=0.069 ms
64 bytes from 192.168.200.200: icmp_seq=4 ttl=64 time=0.044 ms
^C
--- 192.168.200.200 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.042/0.057/0.073/0.014 ms


Do "python3" and "python" use different path variables?

You're absolutely right, they use different PYTHONPATHs.

You can think of Python 2.x and Python 3.x as completely different programming environments. And yes, they store their packages in different locations.

To get numpy working, you can type:

sudo apt-get install python3-numpy

If you want to find out where exactly a package is kept, you can look at the module objects __path__ attribute:

>>> import numpy
>>> numpy.__path__
['/usr/local/lib/python3.5/site-packages/numpy']

You can also install python3-pip and then run pip3 install whatever to install packages for Python 3 with Pip, for packages that aren't available in Ubuntu as python3-whatever.

In case you're confused about the difference between distutils, setuptools, easy_install, pip and the rest, use pip. That's the cool one. :)


Open a folder in file manager in Win10 WSL while in ubuntu command line?

Running Nautilus

You can run nautilus from WSL! This will let you manage the Linux file system.

This isn't exactly appropriate for this SE, because it's mostly a windows-related question, but here it is.

Nautilus and many other linux applications can be run on WSL as long as you have a Windows-based X11 server. X11 is the window system most of Linux relies on, but it can be installed on Windows too. X11 runs in client-server mode that decouples the calling client code from the server, so calls out of the WSL are pretty transparent.

Other things you can run with an X11 server include:

Sublime
Various terminal emulators
Calculators
Probably other things I haven't tried.

Getting the X11 server

There are a few Windows-based X11 servers.  Note that the server works using TCP, and by default it can accept connections from any IP, so you might want to restrict it in your firewall.

I use this one:

https://sourceforge.net/projects/vcxsrv/

Connecting WSL to it

Just put this in your .bashrc/.zshrc file:

export DISPLAY=localhost:0.0

Running nautlius

Don't forget to sudo apt update. Then sudo apt install nautilus. Then

nautilus .

Running explorer.exe

You can invoke any Windows executable from the WSL, including explorer.exe, the Windows file manager. You just need to type its full name (including the extension), and if it's a Win32 executable, it will start.

However, Windows applications run under Windows, not under WSL. They won't see the Linux file system, only the Windows one. While it's true that the Linux file system is mapped to files and folders in the Windows file system, this mapping is more-or-less an implementation detail. It's not recommended to modify the Linux file system from Windows.

You give explorer.exe arguments, but note that you can't give it Linux paths because it's not a Linux application.

There is no command to map a Linux path to the corresponding Windows path and the path is usually pretty ugly. For example, the path to ~/.zshrc might be:

C:\Users\[WINDOWS USERNAME]\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\[LINUX USERNAME]\.zshrc


You could try using the Parental Controls application. There is a detailed guide here on how to install and run it.

If you select the user that you want to limit, and choose to leave the "browser" option as off 24/7 then that should do the trick.


packages have unmet dependencies: libegl1-mesa: Depends: libgl1-mesa-dri (= 10.4.0-0intel1) but 10.1.3-0ubuntu0.4 is to be installed

Which version of the Graphics Installer are you using? The current one seems to support only Ubuntu 14.10. The Intel Download Page tells you that:

  Beginning with the v1.0.8 release of the Graphics Installer, we discourage using the Graphics Installer with Ubuntu 14.04.

Your error tells you that the installed version of a packet is not the one which the installer needs (for example 10.1.3-0ubuntu0.4 vs 10.4.0-0intel1)


With great security comes great responsibility.
If you don't remember the password for the encrypted partition of your computer, nothing in the world can recover it for you.  (Not even the NSA)
So remove the HDD, keep it around for the next 20-30 years and maybe then we'll have quantum computers that will be able to decrypt your data...
Until then?  Sorry!


Mask my Desktop for my ubuntu-based Wifi hotspot/router

If someone has physical access to the computer, there is no way to protect it. Put it inside a box under lock and key

For this kind of use it is best not to use Ubuntu Desktop. Use the Ubuntu server version, that has no desktop. Setup the WiFi hotspot as a service. A service (also called a daemon) starts when the computer starts and does not need anyone to log on. See How to setup an access point mode WiFi hotspot? for how to use hostapd to setup WiFi hotspot as a service.

Use strong password for admin (sudo) accounts.

If you can't do that, try WiFi hotspot available to all users. See:

Note, All users may connect to this network box is checked. This means this network will be online before anyone logs on. So you don't need to log on to the desktop to make it work.

Second, set up lock screen so that the screen is locked if no one uses it.

See Lock is set to On. You can also manually lock the screen by pressing Ctrl+Alt+L before you leave the computer.

Remember: All this is useless if someone can physically get to the computer and reboot it to recovery mode and reset your password.

Hope this helps


Is there a way to use a SSH connection to access SMB or UPnP files without setting up a VPN?

My suggestion would be Change Root using ssh. This is a new feature of the OpenSSH server since version 4.8p1. (ubuntu package: openssh-server) and hence available on the newer ubuntu releases.

In a nutshell, if a certain user (for which you would distribute the key) logs in via ssh, he/she will be jailed inside  a named directory making access to anything that's outside of that inaccessible. This is particularly straightforward to set up if you only want access to files and not really run any programs for the chrooted user. See for instance here: http://www.howtoforge.com/chrooted-ssh-sftp-tutorial-debian-lenny

If you can elaborate on the specific needs that you have we can maybe comment more.

Also, once you have your jailed ssh user configured, you might want to consider sshfs (for ubuntu) and netdrive - http://www.netdrive.net (for windows) to seamlessly mount these directories on the respective machines.


Can't connect to computer via VNC running x11vnc

In the faq http://www.karlrunge.com/x11vnc/faq.html#faq it states, that the vnc client must have the same colordepth as x11vnc
This helped for me.


If you don't need mysql, why not remove it altogether?

sudo apt-get remove mysql-server

should do the trick


GUI won't load, but the desktop background loads. Can't access the terminal

You should go to the console with CTRL+ALT+F1 and try restarting the desktop manager.Try:

sudo service lightdm  or
sudo /etc/init.d/gdm restart
Or try stopping them. Also look in log
less /var/log/Xorg.*.log In CentOS this can happen if you go very low on space or have some power management problems. Maybe it's the same with Ubuntu.
After running the restart thing you may return to the GUI with CTRL+ALT+F7.


A couple of choices here between web-based or desktop
Web based type you have TRAC or Redmine
Desktop type GanttProject or Hamster
Hamster is by far the simplest and available in the repositories.


Keys won't repeat, holding them down causes the screen to flash

I have absolutely NO CLUE why this worked, but pressing prt sc fixed the problem.  I don't know if I hit some incredibly obscure bug (I was taking a lot of screenshots earlier), or if there's physically something wrong with the key, or what, but if you're experiencing this problem, then go ahead and take a screenshot.


Dual boot windows 8 and ubundu not see partitions

This symptom is most often caused by one of two things:

Leftover RAID data
A damaged partition table

The first problem typically requires recovery by deleting the stray RAID data (I don't recall the command offhand, but it's a simple one-line command) and/or disabling RAID options in your firmware.

If it's a Master Boot Record (MBR) disk, a damaged partition table can often be repaired with my FixParts program. If the computer shipped with Windows 8, though, it almost certainly uses the GUID Partition Table (GPT) instead of MBR, in which case you'll need to post more details, such as the output of sgdisk -p -v /dev/sda, as typed from a System Rescue CD or Parted Magic boot.


Postfix SMTP mail server External smtp relay

If you go to https://help.ubuntu.com and enter "postfix" into the search box, you'll get a number of helpful articles, including this one https://help.ubuntu.com/community/Postfix to help install and configure postfix.


Is there a way to hide applications from other desktops/workspaces in the Unity launcher?

There is a rather lengthy bug-report on just this matter on launchpad.

Even Mark Shuttleworth got involved with this one.  However no conclusions or proposals for implementation yet.


Is there a complete USB bootable iso available

There is no ISO that includes all kind of 3-rd party drivers.
You can always install using a standard Ubuntu ISO, then connect your phone as a USB modem and install any drivers you need.


Why can't my non admin users use mlocate command?

Even though I added the user to the group, only this seemed to do the trick. I edited the permissions for the database with the following command:

sudo chmod o+r /var/lib/mlocate/mlocate.db

Provided that the database is located in /var/lib, this adds world read permissions to the database. The limited user was instantly able to return locate to stdout like normal.

Edit: The problem with this solution is that updatedb returns the world permissions to 0. So this is only a temporary solution.


Compose key stopped working (Xubuntu 14.04)

That seems to be a mix between two things:

the fact that the plain us keyboard has no "strange char" (smile intended) definition, as shown here, and
Probably a manifestation of the layout random change bug --- it is not marked as affecting Xubuntu, but giving that affects both Unity a Gnome, you never know...


Will ubuntu work with 2 in 1 asus ux360ca ultrabook?

There is an entire section here https://help.ubuntu.com/community/AsusZenbook that may help.

Note Bene : this was written before 17.10 therefore before Wayland, therefore is untested.

My advice is to create a bootable USB stick, stick it in, boot and test.


LibreOffice Writer > File > Export as PDF.

Then Click Export in the dialog box that just popped up.

Make sure that you are using the latest version.


Try running the below command to fix the broken sudo -

sudo chmod 0755 /var/lib/sudo

sudo chmod 0700 /var/lib/sudo/<username>

If the above command doesn't helps, you can run the below command :

pkexec chmod 0755 /var/lib/sudo

pkexec chmod 0700 var/lib/sudo/<username>


Will the new open source Broadcom drivers be available in the current LTS release?

As it stands currently (unless something drastic happens), yes. We expect this to land in the compat-wireless package as soon as it has been approved. The current plan is to bring it in to Maverick (10.10) in this way and then, potentially, to backport to Lucid (10.04)

~JFo


In KVM is there an equivalent to WarpDrivePercentage

Hard Solution:

I don't see a built-in option in KVM docs, but you can mess with system time. First, check what clock your KVM install is using:

$ cat /sys/devices/system/clocksource/clocksource0/current_clocksource

It's most likely kvm-clock. If so, you have a few options. kvm-clock live updates its time using the following structure:

struct pvclock_vcpu_time_info {
   u32   version;
   u32   pad0;
   u64   tsc_timestamp;
   u64   system_time;
   u32   tsc_to_system_mul;
   s8    tsc_shift;
   u8    flags;
   u8    pad[1];
} __attribute__((__packed__));

You could write a wrapper on the host to intercept this and output a sped-up version of time. You could also rebuild kvm-clock yourself, replacing pvclock_vcpu_time_info with custom logic to output UTC time with added time delta like how libvirt does in its offset variable <clock offset="variable" adjustment="123456" />

Easier Solution:

Continue using virtualbox. Or xen has a comparable option of "xen.independent_wallclock = 1" where you can set up your own time.

Easiest Solution:

Ask why you need to speed up time like this? I can't think of a ton of reasons a Set Top box would need this. And it would most likely be easier to handle in your code with a fake time wrapper than at the OS level. You mess up NTP, logs, and a ton of other stuff by messing with time.


How to modify app launcher bar for Guest account?

Create a "Special purpose user" according to the guidance at the tuturial CustomizeGuestSession.


Has anybody got access to a H264-stream of an IP-Cam over SimpleCV?

SimpleCV has an Image class which you can use to process image files (instead of telling it to grab an image from hardware) so your actual problem is extracting an image from the current stream.

There are a number of ways of doing this but I would probably keep this out of band (in Ubuntu, not Python) and just constantly update the same image file all the time (and loop that in Python/SimpleCV).

First you need the streaming address. There's a list of Hikvision ones here but it's going to look something like: rtsp://IPADDRESS:554/h264

We can then run avconv (from the libav-tools package, or ffmpeg from any reputable PPA you can find) to capture and keep capturing once a second (based on this):

avconv -i rtsp://IPADDRESS:554/h264 -f image2 -r 1 -updatefirst 1 /path/to/img.jpg

That pulls us back around to the SimpleCV. To vastly simplify their example:

import time
from SimpleCV import *

while True:
        img = Image('/path/to/img.jpg')
        img.show()
        time.sleep(1) #wait for 1 second

Alternatively, the camera specs claims it provides FTP access (amongst other things). Anything that will get you an image file is a viable option here.


Do package managers exist for AppImages?

There are no AppImage repositories or managers or launchers. One purpose of AppImage is to render that infrastructure and those applications unnecessary.

AppImages are self-contained, because another purpose of AppImage is to eliminate the "upgrade treadmill" of rpms and debs. Well-written AppImage applications are generally capable of downloading and installing their own security updates from a secure location without user intervention. If you upgrade an AppImage, it's because you want to...and that's a cultural shift that some deb/rpm users take some time to get used to.

Your idea of keeping track of AppImages on your system is wise. It's the human admin's responsibility to know what's installed on their system; package managers are merely tools that help.


Is there a standard editor to view config files in linux.

vim

  I m just viewing the ls command (/bin) config file in vim editor but it shows my a lot of @ and alphabets.

Then those are NOT config files. Inside /bin there are (or should be) only binaries. Config files are in /etc/ and likely (or often have) have an extension ".conf"  or ".cnf" or are inside a "conf"  directory inside the projects base directory though that is up to the creator of software to decide.

locate .conf
locate .cnf

is going to yield lots of config files and directories that include config files.


Is there a way to access winecfg options from the terminal?

To the best of my knowledge, no.
winecfg is a gui editor of some settings in the registry.

You would have to write your script to edit the registry files within the ~/.wine folder.


The path you provided is virtual in that the ~ stands for /home/$USERNAME$ where $USERNAME$ is your username. Try again with a full path like /home/pf/scripts/usr/bin/megasync. Replace pf with your actual username. Clearly you have execute permissions for megasync so that's not the issue. which megasync coming up blank indicates to me that that bash can't find the executable (it's not on your path). For more on the differences between which and whereis see: https://superuser.com/questions/40301/which-whereis-differences. If it's a timing play as Jacob Vlijm indicates in the comments you could call it with a homemade script that includes the necessary sleep time. You should simply re-install it as it appears it wasn't installed correctly. When I install via software center I get megasync placed on my path. I doubt moving the executable around has helped you. The following should produce the following result if megasync is installed correctly.

 which megasync
/usr/bin/megasync

after proper installation ls- al /usr/bin/megasync should produce

-rwxr-xr-x 1 root root 4807432 May  3 20:56 /usr/bin/megasync clearly what you have is the wrong size and carries the wrong ownership. The copy you have may have been an extremely short lived interim release or may have been corrupted in some fashion. If anything is unclear, please advise and I'll attempt to clarify.


Is it possible to backup Network Manager profiles?

Those profiles will be located in

  /etc/NetworkManager/system-connections/

You can just backup these files (with root privilege) and restore them later.


Literal dot confusion, copy all hidden files

cp, as well as the rest of the built-in shell commands, accept and expand glob patters and not regular expressions. They are similar in some aspects, different in many. For example, the . is literal in globs, and any single character is matched with ?.

Your friend in this case is man 7 glob.


I set a script to start at boot with kde startup and now if I log into my main account it locks after I click anything to delete it

From the guest session, press Ctrl+Alt+F1, log into your main account, delete the file, log out, press Ctrl+Alt+F7, log back in.

Done!


One of the design goals of Unity is to reduce the clutter of the desktop, another is to use space more efficiently.

We hide the menu by default in Unity because the menu provides no useful information to which you can refer just by looking at it, but it puts a lot of detail on the screen which is visual clutter. So, we've taken the view that the menu is there if you need it (by moving the mouse to it or pressing Alt) but otherwise isn't in your view.

Many modern applications are doing without a menu altogether, so in our view, this is a step towards the future, and it will encourage application developers to think about their interfaces and make them more usable by design rather than depending on the crutch of a menu.


The easy way is to use iptables-persistent.

Install iptables-persistent:

sudo apt-get install iptables-persistent

After it's installed, you can save/reload iptables rules anytime:

sudo /etc/init.d/iptables-persistent save
sudo /etc/init.d/iptables-persistent reload

Ubuntu 16.04 Server

The installation as described above works without a problem, but the two commands for saving and reloading above do not seem to work with a 16.04 server. The following commands work with that version:

sudo netfilter-persistent save
sudo netfilter-persistent reload


MIcrosoft Wireless 3050 Mouse not working on Ubuntu 19.10

You will probably want to look in /var/log/kern.log for any error messages. Even better, I have found that tailing all logs will help resolve many issues:

sudo tail -fn0 /var/log/{*,*/*}

If you find that there are no error messages when you plug in the mini-tranceiver, it might not be an issue with the keyboard at all. Some possible causes for this issue could be:

BIOS settings - check that USB hasn't been disabled.
faulty tranceiver
faulty usb port


Why isn't writing the ISO image to my USB flash drive working?

Both of these were written on the drive with a freshly-formatted NTFS partition.

Your problem is you are formatting the USB as NTFS. Ubuntu cannot boot from an NTFS partition.

Please format the USB stick as FAT (or FAT32) instead. Then use Unetbootin (not Windows dd) to "burn" the ISO to the USB and it will work fine.


How can I deduplicate my data with BTRFS?

Start by making a full backup so that if something goes wrong you haven't lost anything.

I believe you are looking for duperemove -d

"Duperemove is a simple tool for finding duplicated extents and submitting them for deduplication. When given a list of files it will hash their contents on a block by block basis and compare those hashes to each other, finding and categorizing extents that match each other. When given the -d option, duperemove will submit those extents for deduplication using the btrfs-extent-same ioctl.

Duperemove has two major modes of operation one of which is a subset of the other.

Readonly / Non-deduplicating Mode

When run without -d (the default) duperemove will print out one or more tables of matching extents it has determined would be ideal candidates for deduplication. As a result, readonly mode is useful for seeing what duperemove might do when run with '-d'. The output could also be used by some other software to submit the extents for deduplication at a later time.

It is important to note that this mode will not print out all instances of matching extents, just those it would consider for deduplication.

Generally, duperemove does not concern itself with the underlying representation of the extents it processes. Some of them could be compressed, undergoing I/O, or even have already been deduplicated. In dedupe mode, the kernel handles those details and therefore we try not to replicate that work.

Deduping Mode

This functions similarly to readonly mode with the exception that the duplicated extents found in our "read, hash, and compare" step will actually be submitted for deduplication. An estimate of the total data deduplicated will be printed after the operation is complete. This estimate is calculated by comparing the total amount of shared bytes in each file before and after the dedupe.

See the duperemove man page for further details about running duperemove."

this doesn't seem to appear in the btrfs-tools package but there is a git hub page for it here. Recent open and closed issues (aka pulse) available here.

Packages for All currently supported versiosn of Ubuntu can be found in this PPA

I must re-iterate that backing up is highly recommended. See: https://github.com/markfasheh/duperemove/issues/50

Quoted Source: https://github.com/markfasheh/duperemove

man page: https://manpages.debian.org/testing/duperemove/duperemove.8.en.html


failed to create symbolic link ‘/usr/bin/utserver’: File exists

You were attempting to create the link before and failed. Remove the link and try again:

sudo rm /usr/bin/utserver
sudo ln -s /opt/utorrent-server-v3_0/utserver /usr/bin/utserver


ubuntu 12.10 xorg loads cpu core at 100% percent

The high usage problem on lubuntu 12.10 turned out to be a snd_ca0106 soundblaster card.
The cpu ran at 25-35 percent with nothing but the desktop, I watched it with htop and conky for a couple of days and the computer was very slow. When i did a
cat /proc/interrupts the irq 16 showed up with "uhci_hdc:usb2, i915, snd_ca0106".
the number of interrupts was 1916656972 compared to 1780 on another computer with no
ca0106 card in it. I removed the sound card and the problem was solved, so it might be caused by some type of hardware. If it is not a removable item you can reassign irq's.


Using Ubuntu desktop as Upnp DMC (Digital Media Controler)

You're looking for a UPNP DMC.
Unfortunately, they're a bit thin on the ground - have a play around with gupnp-av-cp (from gupnp-tools), which should get you started at least.


Upgrading Ubuntu 12.04 LTS to 14.04 LTS: legacy PPA upgrade

When you start a release upgrade, the upgrade tool disables all PPAs (it comments out the source lines from these files). You will have to manually enable them after the upgrade, either by editing the files and uncommenting the lines, or using the Software Sources tool. In either case, you will have to change the entry from precise to trusty yourself. So if you wish to stop using the PPA version for some PPA, don't do anything, just upgrade. :)

If existing packages have an upgrade path, they will get updated (so nginx will be upgraded to whatever version is available for 14.04), irrespective of where they came from. If existing packages have no installation candidate in the new release, and don't conflict with anything else, they are left as is.  If you use something like Synaptic or Aptitude, these will show up as local or obsolete packages.


How can I use an existing S3 bucket in Backup?

Yes, you can, but it's a bit hidden.  You can do it on the console:

gsettings set org.gnome.DejaDup.S3 bucket 'MYBUCKETNAME'

Or you can do it graphically:

Install the package 'dconf-tools'
Run dconf-editor
Browse to /org/gnome/deja-dup/s3
Edit the bucket key


Which virtual machine is better to install Ubuntu with ROS? Multipass or Virtualbox?

Best answer is VM Ware. I was having errors in virtual box and didn't understand the interface of multipass. Don't understand Multipass interface and Hyper V worked  in beginning but having a hard time changing default settings like disk size.

VM Ware worked without any problem. Just follow this link - https://www.youtube.com/watch?v=hRl-0lcQjdU before starting any Virtual Machine tool.


As far as I know, the answer is NO.

As you already found out, there is a terminal plug-in, from which you can invoke the make (and that is what I do).

Aparently, they added the build plugin for kate.


My Toshiba R830 wont play any sound, do I need drivers or else?

Hi i think you should install ubuntu-restricted-extras package

At first you should update the repositories with this:
    sudo apt-get update
and then:
    sudo apt-get install ubuntu-restricted-extras


How can I configure Unity's launcher auto-hide behavior?

11.04 & 11.10
The Unity launcher has an auto-hide option that is enabled by default. Lee's answer has the details. It has a few options:

Never - The launcher will never hide.
Autohide - The launcher will hide automatically based on time.
Dodge Windows - The launcher will hide when a window would overlay it.
Dodge Active Window - The launcher will hide only when an active window would overlay it.

This question has information on how to configure the different modes of Unity:

How can I configure Unity?


Delete old kernels and unused files without Ubuntu tweaks?

sudo apt-get autoremove

will search for and then prompt  "y or n"  if you wish to remove unneeded packages; the same thing as Ubuntu Tweak's remove unused packages does

As far as the second half of your question:

If there is a similar way to remove older kernels, I'm unaware of it, the only way I know of is to remove them(and their headers, if present) for each old kernel with either the Software Center or Synaptic...

I personally find Synaptic easier to use if needing to remove something as the "Mark for complete removal" will also remove the configuration files as well and it gives more detailed info about the package, making it easier to check that it is the correct file if you are unsure of the exact name.  Conversely, I find the Software Center more useful for browsing programs and in general for installing.

Synaptic is not installed by default any longer (since 11.10) but can still be installed via the Software Center or by the terminal with

sudo apt-get install synaptic

....of course you can remove them with sudo apt-get -purge linux-image-generic-XXX but that will get tedious very quickly if you have many to remove.

No matter how you remove kernels I would sudo update-grub after...(this should not be needed if you use Ubuntu Tweak, I believe that it does this as part of the cleaning, but I always do it manually anyways after Ubuntu tweak is done)

Edit:

according to a comment by MrVaykadji in 13.04 and newer, sudo apt-get autoremove will prompt for removal of older kernels.  I don't believe that this is true in 12.04, however, I use Ubuntu Tweak's "janitor" feature often enough that 12.04 may do it but I have never waited long enough for it to trigger....at on time I had a decent number of older kernels after a long pause between Ubuntu Tweak runs and with 4(or so) older kernels, autoremove did not trigger.


What does the command 'chmod +x $1' in terminal do?

The command chmod is used to

  change file mode bits

   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,  sepa‐
   rated by commas.

(from the man or reference manual page for chmod).

The +x tells tells chmod to set the execute (or search for directories) flag on.

The $1 is usually used in scripts to mean the first parameter passed to the script. ($0 refers to the script itself) however if a shift has been executed, the parameters may have changed, so it's the first at the time of execution.


how to get all applications/windows in the current workspace in the view of the user programatically ( in python )

You could do something like this:
import gi
gi.require_version('Wnck', '3.0')
from gi.repository import Wnck

def get_winlist():
    """
    Get the window list and the active workspace.
    """
    scr = Wnck.Screen.get_default()
    scr.force_update()
    windows = scr.get_windows()
    active_wspace = scr.get_active_workspace()

    return windows, active_wspace

wlist, active_wspace = get_winlist()

for w in wlist:
    if w.is_visible_on_workspace(active_wspace):
        print(w.get_name())

I tweaked the code I found in this answer: How to determine if window is maximised or minimised from bash script
The get_winlist() function returns a list of all open windows and the current workspace. The code after it prints only the non-minimized windows of the current workspace.


PlayonLInux+IE8 from one computer to other

As for PlayOnLinux, you may encounter some problems installing it on a system without internet connection. When you lookup POL's dependencies, you'll get:

Depends: python:any (>= 2.7.1-0ubuntu2), wine | wine-unstable,
         unzip, wget, xterm | x-terminal-emulator, python-wxgtk2.8,
         imagemagick, cabextract, mesa-utils, gettext-base, binutils,
         gnupg, icoutils, x11-utils, curl, netcat, bzip2, p7zip-full

Some of these packages will already be installed, others won't. And all of the not-yet-installed packages have dependencies themselves. Without a internet connection, you'd have to satisfy all these dependencies manually.

Luckily, there are programs and some workarounds to help you. Quite a few are listed as answers to this related question. Choose what you like the best ;)

As for IE, PlayOnLinux stores it's config and virtual disks in ~/.PlayOnLinux.

Simply put the whole directory on an USB (You may have to press Ctrl+H to show hidden files), and paste it in your users home folder on the target machine.

Then start POL, go to Configure, select the virtual drive containing IE, remove the shortcut to IE, then select General, Make a new shortcut, select iexplore.exe, and finish to recreate the shortcut, creating a system launcher with adapted paths.