iptables script breaking internet connection

The message can't resolve hostname suggests the problem is one of name resolution.

On recent versions of Ubuntu, DNS operates via a local caching server that listens on port 53 on a suitable loobpack address - however, the specific address is not the canonical 127.0.0.1 that you have already allowed.

For instance, 16.04 systems use dnsmasq on 127.0.1.1 by default

$ sudo netstat -nlp | grep LISTEN | grep :53
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      1020/dnsmasq

whereas 18.04 uses systemd-resolved on 127.0.0.53

$ sudo netstat -nlp | grep LISTEN | grep :53
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      3677/systemd-resolv

In order for DNS queries to resolve, you will need to allow inbound connections on the corresponding address (although you may limit these to the specific port, 53).


How to tell why drive is remounting read-only

This isn't a very complete answer to the question but it's the best I can do given a lack of other information and my knowledge of Linux thus far.

As suspected, the remount read-only and input/output  errors were the result of an intermittent hardware failure. In this case, the connection between the system board and hard disk was flaky. By the time I rebooted the laptop, the problem would go away, which explains why it would work again and diagnostics didn't find any issues. Over time, the problem got more severe, where I would have to reboot multiple times (or shutdown and wait a few minutes) before it would go away. This meant it lasted long enough for diagnostics to catch the issue, which was how I figured it out.

The exact details of the hardware issue aren't terribly relevant, but for those who are curious, reseating the hard drive cable and replacing the drive didn't help. It turned out the system board itself was defective. I suspect thermal expansion played a role, since it tended to happen when I was running a heavy load and cleared up when the computer sat idle after losing its hard disk.

In any case, if anyone else sees similar errors, it's probably a good idea to suspect a hardware issue related to the hard disk (even if not the disk itself).


Thinkpad 13 Edge microphone noise problem

I am not getting information from any of the sources which is quite sad.

Here is my workaround for the people to come:

If you use the alsamixer you can reduce the analogic mic boost to the minimum. That way the sound is extremely low but at least the noise is smaller. Then the other people via video chat must raise their volume and it's really inconvenient for many applications.

The other problem is that I don't have support for headsets with microphone. If I want them to work I must specify just one of the sides (right or left) as the volume side to avoid noises but I cannot use the microphone.

I hope it helps for somebody.


Graphical problems with 13.10 / GNOME on MacBook Pro 9.1 (13'', Mid 2012)

I can't exactly conclude which package resolved my problem, but installing KDE beside GNOME solved the problem for me.

I assume that the packages gtk2-engine-oxygen, gtk3-engine-oxygen or a related package did the trick. I installed these to make Firefox look a bit nicer when running on KDE.


This functionality is implemented by the operating system's Open File dialog. Actually the site or the browser you use doesn't matter because this is operating system specific.

Gnome Open File dialog used in Ubuntu doesn't support this feature, however, the File Open dialog used in KDE is able to open HTTP URLs.  I'm not sure what is the situation with support in other other desktop environments that run on Ubuntu.


Sometimes copying numbers from another softwares into LibreOffice or using other keyboard layouts rather than English make numbers to be seen as numbers but act as text. Hence you won't get your desired charts or calculations.
So, first please check your numbers to be numbers rather than text.

If everything is ok with your data, you can draw your graph/chart using XY (Scatter) chart:

Select your data

Then from the Insert menu select Chart.
In the Chart wizard window select XY (Scatter) as Chart type and choose the desired chart look on the top right side of window.
You can also select Sort by X values checkbox if you want your data to be sorted by increasing the X values.

You can change any other desired options in chart wizard and finally press Finish to see the final chart.


There are several ways to do this. You can move the log file to a backup with

sudo mv gdm.log gdm.log.old

and then you can create an empty file with

sudo touch gdm.log


Or just use the keyboard shortcut to restore a previously closed window.

Ctrl+Shift+N


Remove whitespace from all array elements

Using later versions of GNU grep (comes with Ubuntu) that has -z option:

$ IFS=, arrayvar=( $(grep -Pzo '\s+VARIABLES\s+{\K[^}]+(?=})' temp1 | tr -d '[:space:]') )

$ echo "${arrayvar[0]}"
a9EventCode

$ echo "${arrayvar[1]}"
a9ControllerNumber

$ echo "${#arrayvar[@]}"
6

-z option makes grep to treat the lines of input text separated by ASCII NUL instead of newlines so we can match newlines literally.
The PCRE pattern \s+VARIABLES\s+{\K[^}]+(?=}) will match the text inside {}
Then we have removed the white spaces (space, tab, newline) by tr -d '[:space:]'
As the IFS is set to , we can create the array with comma separated strings.


You could try xrandr to add a new resolution.

First, generate a valid xrandr resolution string: cvt 1366 768 60 (60 is Refresh Rate). You need everything after Modeline.

Next, run xrandr --newmode %string_from_previous_command%

After that, you should add the resolution to your monitor.

xrandr --addmode VGA-0 1366x768_60.00 (replace VGA-0 with your monitor, you can type xrandr without any options to see available screens).

Then apply your new mode with:

xrandr --output VGA-0 --mode 1366x768_60.00 (again, replace VGA-0 with your monitor).

That helped me in before when I was using an old AMD videocard.


What is the difference between the Hindi keyboard layouts Bolnagri and Kagapa?

I don't really know much about the Hindi language or either of those layouts, but you can have a look at both layout charts and compare them yourself to find out which one represents your physical keyboard best:

You can view these on your own machine using the commands

gkbd-keyboard-display -l $'in\tbolnagri'
gkbd-keyboard-display -l $'in\thin-kagapa'

or by setting one as your active input source and clicking the "Keyboard Layout Chart" button from the keyboard indicator (at least in Unity).


You may download .deb package from this source: vlc-nox | pkgs.org

Supported releases:

Ubuntu 17.04 (Zesty Zapus)
Ubuntu 16.04 LTS (Xenial Xerus)
Ubuntu 14.04 LTS (Trusty Tahr)
Ubuntu 12.04 LTS (Precise Pangolin)


I don't know the answer for the first question. Here is second,

Cron is designed for machines that are left running continuously. If your machine is turned off when a job falls due, it simply won't be run. To handle this situation better, a new tool called Anacron was written. anacron's mission is to guarantee that those daily, weekly and monthly activities do actually occur, assuming only that the computer was switched on at some point during the day. It does not record hours, minutes or seconds, only days, months, and weeks.

It's conf file is -> /etc/anacrontab

Anacron is run at boot time, via the script /etc/init.d/anacron.

Anacron does not expect the system to be running 24 x 7 like a server.

When you want a background job to be executed automatically on a machine that is not running 24 x 7, you should use anacron.

if you have a backup script scheduled everyday at 11 PM as a regular cron job, and if your laptop is not up at 11 PM, your backup job will not be executed.

However, if you have the same job scheduled in anacron, you can be sure that it will be executed once the laptop come back up.

It is Ideal for desktops and laptops.


You can uninstall Unity via the Software Centre, (Applications ➜ Ubuntu Software Centre). Type unity in the search box, select Unity and then select remove (see screenshot)

You will need to select all applications associated with Unity to remove it completely.


Had same issue with NVIDIA GeForce GT 425M card.
I kept seeing messages via

dmesg | grep -i nvidia

about the nvidia drivers tainting the kernel.

Eventually, I tried

sudo apt-get remove ^nvidia

then rebooted.

Next I ran

ccsm &

and enabled first OpenGL, then Scale, then Expo, closing and re-running ccsm & after each selection.

Finally on the last execution of ccsm, I enabled the Ubuntu Unity Plugin.

At last, the Dash and Launcher appeared.

Seems like the answer was to drive out NVIDIA completely with the asterisk after nvidia in the sudo apt-get remove command.

Good luck with repairing your configuration.

Mondotofu


It sounds like you're asking about right-to-left text direction, which can be used by adding dir="rtl" to the html tag of your document.

http://www.w3.org/International/questions/qa-html-dir


Ubuntu 18.04 Google-earth launch problem

Problem solved. In desperation I decided to look in the applications folder and found a 'google earth' link there. Opened the application from the folder and up came the launcher icon, all is now well. Only two years of trying to get GE 64 bit working!
Thank you for your time.


Can my xubuntu installation be converted to standard Ubuntu?

You'll simply need to install the ubuntu-desktop meta-package. This installs all the nessisary packages for a "Vanilla" Ubuntu Desktop. sudo apt-get install ubuntu-desktop Once this has been completed you can restart your computer. At the login screen you can switch from XFCE to Ubuntu Desktop under the Session dropdown. Doing so will load the Gnome desktop.

If you're satisfied with Ubuntu Desktop and wish to remove xubuntu you can always remove the meta package xubuntu-desktop which will remove the meta-package. If you wish to remove all the packages from the xubuntu-desktop meta package you'll have to remove those by hand. An updated list of all the packages by distrobution is available simply copy the line for your version of Ubuntu


It seems you need to calibrate your touch screen. Not all touch screens work with Ubuntu out of the box. Therefore, if you can look here for more on calibration. Scroll down to "Calibration" and read about xinput-calibrator. This should allow you to calibrate your screen.


Why can't I have internet on this ubuntu machine?

You say you don't have access to the router. I suggest you ask the administrator of the router whether he has enabled MAC filtering. If so, the administrator needs to add the MAC address of your machine to the router. Hope this helps.


You can do:

ssh -L 2222:ip_address_of_my_pc:22 -AY myusername@server_of_the_company

This will forward connections to port 2222 of localhost to port 22 of your PC.

Then, to connect to your PC, you can do (from your local system):

ssh -AY -p 2222 myusername_at_my_pc@localhost

scp works similarly.


You can just edit your ~/.bashrc file and remove the hash (#) from the line:

#force_color_prompt=yes

Save the file, and from then on, your newly-opened shells will be colored.


ralink rt2860 not working anymore in ubuntu 12.10

The open source rt2800pci module should work with your card for all the 12.x+ releases.  Deinstall the vendor's rt2860sta module (or whatever it's called), check that no "blacklist rt2800pci" line is present in any file in /etc/modules.d, and you should have a working wireless.  The rt2800pci module is present in the default installation, and is even present on the live media.  Wireless should work out of the box for you.


What does | mean when diff is run on two files?

As explained in the GNU diffutils documentation (using info diffutils "output formats" "side by side")

`|'
     The corresponding lines differ, and they are either both complete
     or both incomplete.

FYI the complete list of markers is given as

white space
     The corresponding lines are in common.  That is, either the lines
     are identical, or the difference is ignored because of one of the
     `--ignore' options (*note White Space::).

`|'
     The corresponding lines differ, and they are either both complete
     or both incomplete.

`<'
     The files differ and only the first file contains the line.

`>'
     The files differ and only the second file contains the line.

`('
     Only the first file contains the line, but the difference is
     ignored.

`)'
     Only the second file contains the line, but the difference is
     ignored.

`\'
     The corresponding lines differ, and only the first line is
     incomplete.

`/'
     The corresponding lines differ, and only the second line is
     incomplete.


How to install HP OfficeJet Pro 6970 on Ubuntu 18.04

I would suggest you make sure that you have installed hplip-gui package. If it is not installed - install it with:

sudo apt-get install hplip-gui

Acknowledgements to N0rbert and his reply to a similar question here.


Wild guess, but this blog post says:

  For some reason, the configure script didn't know to look in /usr/bin for g++. Go figure.

  Anyway, to fix this problem, just explicitly set the C++ compiler:

$ CXX=/usr/bin/g++ ../llvm/configure

This is very surprising if it works, since the configure script does report the detection of a GNU C++ compiler.


5 years later...

In GNOME 3.32, set a manual keybinding of "guake" to F12 in GNOME Settings > Keyboard, and it works!


Is it possible to retrieve the data by using Recuva software

To retrive data form a drive there are two ways in ubuntu depending upon the file system the drive contained.
1) If file system was ext4/ext3 it is possible by

extundelete

to know more about this read type on your terminal

sudo man extundelete

2) If file system you were working with was ntfs we have a command as

ntfsundelete

to know more about this type following on your terminal

sudo man ntfsundelete

To know every detail of command for extundelete see this

To know more about ntfsundelete see this


No network connection on Ubuntu VM with NAT and static IP

Found out the solution, the router I was connected to used a different format of IP addresses (10.x.x.x), so the static IP I entered was invalid. Changing the IP address to this format solved the problem.


I was then interrupted by the "Bootmgr is missing. Press CTRL + ALT + DEL TO REBOOT" message.

You get this because Wubi depends on the Windows boot manager to add its boot entry and since you don't have Windows installed there (on your external drive) you  don't have BOOTMGR.

What you can do is to Format the external drive and Install Ubuntu there, partition it in ext4 and make an Ubuntu LiveCD or LiveUSB and off you go.


Bluetooth Headset sound stops and restarts automatically

I fixed this by upgrading to kernel version 5.7.16-050716-generic
cd /tmp
mkdir kernal
cd kernal
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7.16/amd64/linux-headers-5.7.16-050716-generic_5.7.16-050716.202008190732_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7.16/amd64/linux-image-unsigned-5.7.16-050716-generic_5.7.16-050716.202008190732_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7.16/amd64/linux-modules-5.7.16-050716-generic_5.7.16-050716.202008190732_amd64.deb
sudo dpkg -i ./*.deb


My bluetooth is disabled in Ubuntu 14.10

iam using lenovo u430. Below are the output each command.

lspci -nnk | grep -iA2 net
01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10)
    Subsystem: Lenovo Device [17aa:3801]
    Kernel driver in use: r8169
02:00.0 Network controller [0280]: Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter [14e4:43b1] (rev 03)
    Subsystem: Lenovo Device [17aa:062e]
    Kernel driver in use: wl

 lsusb

Bus 001 Device 002: ID 8087:8000 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 004: ID 04ca:200b Lite-On Technology Corp.
Bus 002 Device 003: ID 5986:0538 Acer, Inc
Bus 002 Device 002: ID 04f3:0060 Elan Microelectronics Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

rfkill list all

0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: brcmwl-0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: ideapad_wlan: Wireless LAN
    Soft blocked: no
    Hard blocked: no
3: ideapad_bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no


DJ: pioneer DDJ-T1 with traktor in ubuntu by wine

Wine doesn't support driver installation.
So I suppose what your asking is just not possible.
Edit 1: But it seems to be possible using that workaround, but as I do not have your hardware I can't tell you more thant this :
http://wiki.winehq.org/USB


Ubuntu 16.04 -- NVIDIA X Server Display Configuration ( No Scanout)

Hello ? Is this CUDA or Optimus featured Graphics Card ? Seems to be brandish new one ? Proceed only in case of CUDA or Optimus here :

You could try it with SDK-package of NVIDIA, but you would need to purge the installed drivers out of your system.

Do this all in recovery mode after you downloaded the SDK-package.

The link for more infos is here at workaround of myself :

Black screen on boot when any NVIDIA drivers installed


How to call up high priority responsive terminal window, even if Xubuntu is hopelessly frozen

If your graphical session is frozen you can switch to a TTY, assuming default settings this can be done with Ctrl+Alt+F1 to F6. The TTYs run sessions separate from the “normal” graphical one, which by default is reachable with Ctrl+Alt+F7.

In a TTY you can use e.g. killall firefox to send SIGTERM to all running firefox processes, for more see How do I kill processes in Ubuntu?.

A different approach would be to change the niceness of your preferred terminal emulator, this way it is scheduled before “normal” processes of your system. To do so, just change the command used to start it (in a desktop shortcut or menu item for instance) from e.g.

yakuake

to:

/usr/bin/nice -n -20 /usr/bin/yakuake

I use the full paths by default just to be sure it runs properly, it may should also work without them. In case you're not sure, e.g. which yakuake shows you the full path.

For a running process you can use renice to change the niceness, e.g.:

sudo renice -20 $(pidof yakuake)


You cannot install the Grub onto the software RAID Partition. When you create the partition for the first two HDD, it has to be:

Partition 1: 250Mb example, for Grub. But don't do raid for this. Formatted as FAT32, set as boot flag.

Partition 2: 4GB for swap.

Partition 3: remaining space for /

The grub will be installed to the non-RAID partition 1, you don't get RAID-1 protection for the Grub.

In fact, the better way of implementing software raid in my opinion is to install the entire Ubuntu OS in another HDD which is not member of the RAID. Otherwise if the member disks has error, you might lost your entire OS and reinstallation is required.


Install Office 2007 using PlayOnLinux (Wine) will not allow to enter CDKEY

If you have Wine as well as PlayOnLinux, here's what you do:

Go to your Wine's system32 directory (~/.wine/drive_c/windows/system32) and rename riched20.dll and riched32.dll so that they're backed up.
Download RichEdit30.exe (I got it from here or here) and save it to that same system32 directory.
Run "wine richedit30.exe" and button through the dialogue.
There should now be two new riched20.dll and riched32.dll files there.
Copy those two files to your PlayOnLinux system32 directory for Office 2007 (should be at ~/.PlayOnLinux/wineprefix/Office2007/drive_c/windows/system32)
Run one of the Office programs and you should now be able to enter the Product Key.

source


Just meant as a hint here - you don't need to install flash-player manually for browsers like firefox. Could be easier to get around that with usage of Chrome Browser. Less stress than many adjustments in firefox - which are getting obsolete again after a few newer versions of firefox ...


It appears to be sufficient to set an appropriate CFLAGS environment variable before executing the configure script, e.g.

CFLAGS="-fsanitize=address" ./configure --prefix=/usr/local

The configure summary confirms

R is now configured for x86_64-pc-linux-gnu

  Source directory:          .
  Installation directory:    /usr/local

  C compiler:                gcc -std=gnu99  -fsanitize=address
  Fortran 77 compiler:       gfortran  -g -O2

  C++ compiler:              g++  -g -O2
  C++ 11 compiler:           g++  -std=c++11 -g -O2
  Fortran 90/95 compiler:    gfortran -g -O2
  Obj-C compiler:        gcc -g -O2 -fobjc-exceptions

  Interfaces supported:      X11, tcltk
  External libraries:        readline, zlib, bzlib, lzma, PCRE
  Additional capabilities:   PNG, JPEG, TIFF, NLS, cairo, ICU
  Options enabled:           shared BLAS, R profiling

  Capabilities skipped:
  Options not enabled:       memory profiling

  Recommended packages:      yes

configure: WARNING: neither inconsolata.sty nor zi4.sty found: PDF vignettes and package manuals will not be rendered optimally

and the additional flag is visible in gcc commands during the subsequent make e.g.

gcc -std=gnu99 -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H   -fopenmp  -fsanitize=address  -c integrate.c -o integrate.o

If you want to pass the flag to other compilers (such as the C++ or Fortran compiler) then you may need to set their equivalent flags CXXFLAGS and FCFLAGS as well: for a complete list you can execute

./configure --help | less

and look at the section titled Some influential environment variables.


Try executing this in terminal:

sudo chmod 1777 /tmp

I hope this may solve the issue.


gtk-enable-tooltips = 0 in a .gtkrc-2.0 file doesn't work anymore, I'm on Xubuntu 16.04.

Plank seems like not much more than a panel launcher and window button integrated into one application, so why not the simple option to disable tooltips just the same as in a standard Xfce launcher, under properties > advanced, check the box for "disable tooltips" for each launcher ?


Upgrading from a previous version of Ubuntu

Yes. Upgrades do not erase your settings/data. You can run the command sudo do-release-upgrade in terminal to check for available upgrades. Run do-release-upgrade -h to see options, such as how to upgrade early (prior to release).

Also, if you know what you're doing, you can partition your hard drive to place your /home on its own partition.1 This enables you to wipe your install if anything goes wrong and reinstall without losing your settings/data.


How can I permanently apply this workaround to get the backlight working on an eMachines E525?

Creating a script in /etc/pm/sleep.d/ to run the command should work.

gksudo gedit /etc/pm/sleep.d/99_backlight

copy/paste the following:

#!/bin/sh

# run 'setpci -s 00:02.0 F4.B=00' when waking up

case "$1" in
        thaw|resume)
           setpci -s 00:02.0 F4.B=00
            ;;
esac

save and exit, then make it executable with

sudo chmod +x /etc/pm/sleep.d/99_backlight


Can't connect to mySQL server which is running

You may be using the wrong command, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

mysql -u root -p

That should work


Reload the list of bookmarks in Files/Nautilus

Restarting nautilus is fairly easy:

nautilus -q
nautilus -n &
disown

Unfortunately sometimes this sequence of commands doesn't work, probably due to some race condition. And so we might have to do a pkill or killall.

To watch the mount point directory of the encrypted volume, you can poll a file within it:

FILE=/path/to/some/file/in/encrypted/volume
while sleep 10s; do
    if [[ -f $FILE ]]; then
        pkill nautilus # or nautilus -q
        nautilus -n &
        disown
        exit
    fi
done

I mistakenly assumed that inotify could be used, but it can't since mounting is involved.


The screen in your image is aspect ratio disproportionate.  You would have to set the correct aspect ratio for it to look correct.  You mentioned the specs of your monitor to be 1920X1080.  That is a 16:9 ratio.

The drivers that you have installed are not functioning correctly for your display hardware.

You will have to find drivers that support your hardware.  If you can't find working proprietary drivers, you'd best start out with the drivers tested and provided by the community on your hardware.  The community provides opensource drivers.

You can identify the best drivers provided by the community by running these commands from a terminal screen:

$ sudo apt update
$ sudo apt upgrade
$ sudo apt full-upgrade
$ sudo ubuntu-drivers devices

The first three commands update your repository list and upgrade your OS files and libraries.  The last command checks for available drivers for your hardware.

You should see a list of available drivers.  The list should look similar to:

== /sys/devices/pci0000:00/0000:00:03.0/0000:07:00.0 ==
model    : GK208 [GeForce GT 730]
vendor   : NVIDIA Corporation
modalias : pci:v000010DEd00001287sv0000196Esd00001119bc03sc00i00
driver   : nvidia-375 - distro non-free recommended
driver   : nvidia-340 - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

Look for the line that shows the recommended driver and install it.  In the case of the above output the install command would be:

$ sudo apt install nvidia-375

There is a GUI version of the driver search.  You can get to it by running
Software & Updates.  Type the words in the Ubuntu Dash Search Button.  Bring up the app.  Then click on Additional Drivers.

From there tick the recommended selection and click Apply Changes.

By the way, there is a good chance that after you update and upgrade your system to the latest drivers (the first three commands above), the correct 16:9 resolution may become available using the drivers you have already installed.


Comparing directory sub-structure and file names ignoring file type/extension

Something like

diff <(cd Dir1 && find . | sort | sed 's/\.type1$//') <(cd Dir2 && find . | sort | sed 's/\.type2$//')

could be a solution.

The command will hide .type1 and .type2 extensions in both directories so they won't impact the diff.

Here's a simple example:

user@hostname:/tmp/test-diff$ find Dir* | sort
Dir1
Dir1/file1.type1
Dir1/file3.type1
Dir2
Dir2/file2.type2
Dir2/file3.type2
Dir2/file4.type2

The diff command will highlight that file1 is in Dir1 (<), but not in Dir2 and file2 and file4 are in Dir2 (>), but not in Dir1

user@hostname:/tmp/test-diff$ diff <(cd Dir1 && find . | sort | sed 's/\.type1$//') <(cd Dir2 && find . | sort | sed 's/\.type2$//')
2c2
< ./file1
---
> ./file2
3a4
> ./file4


Poor performance when opening windows on new PC

Intel GMA 36xx chipsets are based on PowerVR SGX545. That is, Intel has licensed this chip from Imagination Technologies. I'm not sure the regular open source Intel drivers work with these chipsets, a different one may be provided. The poor performance is mostly due due to the open source driver not supporting 3D acceleration.

If you use Ubuntu 12.04, you might want to try installing the cedarview-graphics-drivers package. I don't know why, it is not available in any other Ubuntu release.

Sorry, just noticed the 13.04 tag... Then unfortunately my answer is irrelevant to you.


What is the purpose of the shared with me folder?

The ~/Ubuntu One/Shared With Me folder is a special folder that holds all the folders other Ubuntu One users share with you. If someone shares a folder with you and makes that share writeable, you should be able to read, write and delete files from that folder.

And When you share a folder with someone, they will receive a copy in their ~/Ubuntu One/Shared With Me folder the next time they synchronize their computer.

More about Ubuntu One : See the faq.

Also see Ubuntu One Tutorials.


I think this could help you in that case, as well as some other answers to this question.


This option used to be provided by the file manager, nautilus, in previous versions of Ubuntu. As of 19.04, a Gnome Shell extension "Desktop Icons" is used to provide these right-click context menu's. When the extension is not active, only the selections "Change background", "Display Settings" and "Settings" are available.

There is no user-exposed way to change the right-click menu on the desktop. The only way, currently, to change the order of that menu, would be edit source code. It is my understanding that the extension retrieves the file related right-click options from nautilus. The extension provided menu items are provided on top above the default Gnome Shell menu items.


GDBus.Error:org.openobex.Error.Failed: No adapter found

It’s a bug (#1148033) but I’ve found workarounds for this, described on the comment #33 and also on Ubuntu Discourse. Try if it works for you.

So first, go to System Settings > Bluetooth, select the destination device and click on Browse Files instead of Send Files. The device will be mounted and then you will be able to copy-paste files.

If you have problems with browsing files as well, try to copy the device address, something like 00:25:E7:B1:53:3E, from Bluetooth settings and enter in Files (Nautilus) as in:

obex://[00:25:E7:B1:53:3E]/

This should mount your bluetooth device either and then you can copy-paste files.


How to set ubuntu to use specific graphic unit?

I don't use nvidia. I forced that grub always set i915 driver. Without this driver the brightness and dual monitor doesn't work. Try:
Lenovo y510p with HDMI monitor (RESOLVED)


I'm not sure it would work on github, who may have issues with large amounts of data stored on their servers (and hey, it may not even work). But client-side, you should have a look at git-annex:

  git-annex allows managing files with git, without checking the file
  contents into git. While that may seem paradoxical, it is useful when
  dealing with files larger than git can currently easily handle,
  whether due to limitations in memory, time, or disk space.

https://git-annex.branchable.com/


Nginx reverse proxy only accessible from one device

When I look into the link you have followed I found that on the server name you have bounded your local server IP so either kindly connect with the same network. So that you can access the local domain. Find the screen shoot(https://prnt.sc/qbyypd) for explanation


How do I prevent Ubuntu from capturing the Alt key to show the HUD?

Disabling the Alt key from showing the HUD:

Install CCSM with sudo apt-get install compizconfig-settings-manager

Start it from the Dash or by typing ccsm from the terminal.

Type "Unity" in the filter box on the left, and click on the Ubuntu Unity Plugin:

Click on the <Alt> button the red arrow points to, and then uncheck the Enabled box. Click OK and close CCSM -- the Alt shortcut is now disabled.

If you no longer need CCSM, please consider uninstalling it.


Download menu pops up after every new tab is opened

Try this.  In the address bar, type about:config and press Enter. Click I'll be careful, I promise!, to continue to the about:config page.

Type browser.new in the search box, and double-click the browser.newtab.url preference and change the Value to about:newtab


From grub type: ls (that is an L) to list your devices.

Assuming that your USB shows up as (hd1) and there is only 1 partition type:
chainloader (hd1,1)+1
boot


How can I switch between open applications?

Pressing alt + ` will bring up the app switcher but only for windows of that application, if that's what you're looking for.

Also, Super + Tab will switch through applications by running down the Unity Launcher, and when you open the application with multiple windows, it will automatically open the last active window.


I have just seen elsewhere that you might be able to fix this problem by removing winbind:

sudo apt-get remove winbind.

Try your luck. Worked for me.


Why's my wifi-Hotspot connection failing to get established?

This have bugged me for quite some time, especially after any fresh installs or updates. I found a solution which worked perfectly for me. For those of you who have the same trouble with their laptop wifi [Toshiba or HP laptop-wifi-drivers in particular] this will surely help you.

Deactivate currently active Broadcom drivers from additional-drivers. Blacklist BCMA and BRCM80211 by typing in terminal:

echo "blacklist bcma" | sudo tee -a /etc/modprobe.d/blacklist.conf
echo "blacklist brcm80211" | sudo tee -a /etc/modprobe.d/blacklist.conf

Reboot now and download Synaptic Package Manager (makes it easier to find our files).
Search "bcm43" and download these 4 (they might prompt for some other dependency files - just accept them too)

bcmwl-kernel-source
broadcom-sta-common
broadcom-sta-source
firmware-b43-installer

Reboot
Now, you may check if your wifi is working (testing your hotspot or connecting to a network etc.)
If it isn't, then go to additional-drivers and activate the newly downloaded drivers followed by a reboot.

Note: additional drivers are found in System-settings > Software sources > additional drivers


Ubuntu 18.04 hangs on shutdown or restart

Today after updating Ubuntu it was possible to shutdown! Most probably a new fix came along, so if anyone has same issue and none of the options suggested in the wild works, waiting a bit might be a solution before going extreme and reinstalling Ubuntu..


Will GNOME Shell need compositing (like Unity does)?

Both gnome-shell and Unity will require compositing in order to be used. You can install proprietary drivers and still have it on a USB/external drive - I do it all the time and move from computer to computer. Besides, you can always install the Gallium3d drivers for Nouveau and you'll have fully-supported 3d on all the important cards.

Both Unity and Gnome-shell are anything but out of the question.


Here is the command line way:

Open a terminal Ctrl+Alt+Tand enter sudo hostname newname. Replace newname of your device by the new name that you want to call your device. Enter your password.

Then, edit the oldname in /etc/hostname

sudo nano /etc/hostname

and change the old name. Do the same in /etc/hosts

sudo nano /etc/hosts

Now you're done.


In task admin, why is CPU% shown as a whole number? (ubuntu 20.04)

Gnome system monitor displays the percentage CPU as a rounded number. For practical purposes, this is more than adequate, and provides you sufficient information as to what is going on. Moreover, this percentage is a snapshot, an averaged measure over a short period of time. In reality, that number changes all the time, so rendering it with a precision of 1% is more than adequate for almost any common purpose.
If, for academic purposes, you want to see the first decimal, top (installed by default) and htop (not present on a default Ubuntu install) are your friends. I am not sure of methods or applications that would allow to display that number with even greater precision, and where you could customize the time on which the average measurement is done.


Ubuntu 17.10 Upgrade Broke VMWare Workstation 12.5

I've managed to get VMWare Workstation 12.5.7 working on Kubuntu 17.10.

In /usr/lib/vmware/modules/source:

Extract vmmon.tar and vmnet.tar

sudo tar -xf vmmon.tar
sudo tar -xf vmnet.tar

This will create vmmon-only and vmnet-only directories.
Fetch the patched hostif.c

sudo wget -O vmmon-only/linux/hostif.c https://raw.githubusercontent.com/mkubecek/vmware-host-modules/b50848c985f1a6c0a341187346d77f0119d0a835/vmmon-only/linux/hostif.c

(note: https://communities.vmware.com/thread/571370 - also contains a similar fix for VMWare Workstation 14)
Edit vmnet-only/bridge.c:

639c639
<        atomic_inc(&clone->users);
---
>        atomic_inc((atomic_t*)&clone->users);

Run

make -C vmmon-only
make -C vmnet-only
cp -t /lib/modules/4.13.0-16-generic/misc *.ko
modprobe -r vmmon
insmod /lib/modules/4.13.0-16-generic/misc/vmmon.ko
rm /usr/lib/vmware/lib/libz.so.1/libz.so.1
ln -s /lib/x86_64-linux-gnu/libz.so.1 /usr/lib/vmware/lib/libz.so.1/libz.so.1  # see https://communities.vmware.com/thread/572259
vmware-networks --start  # see https://forum.chakralinux.org/viewtopic.php?id=8579

As user:

/usr/lib/vmware/bin/vmware

(to prevent it running vmware-modconfig)


Missing Nautilus integration following Ubuntu-One reinstall

Nautilus integration is provided by ubuntuone-client-gnome. You probably are also missing the control panel, from ubuntuone-control-panel-gtk.

For u1sdtool, you need to know that you can create a folder (using u1sdtool --create-folder), let it sync as much or as little as you want, and then unsubscribe from it (using u1sdtool --unsubscribe-folder). From that point onwards no changes to the folder will be synced to nor from the cloud. You can then resubscribe to it (using u1sdtool --subscribe-folder). You can also delete the folder entirely (using --delete-folder).

As of 11.04, folders you created on other computers are not automatically subscribed to. You get a notification, and you can subscribe to them using the control panel.


After installing .NET Core, where is the nuget binary?

You already have the .NET Core Nuget, because it is built into the .NET Core SDK that you installed. It just doesn't use any command called nuget.

When you install .NET Core, a command called dotnet is installed on your system. Access to Nuget functionality for .NET Core is integrated into that command. To add a Nuget package to a project (that you created with dotnet new), cd to the project folder and run:

dotnet add package Package

Replace Package with the name of the package. If you're accustomed to using the Install-Package PowerShell cmdlet in the Nuget shell in Visual Studio, the package name you would use with that is the same as what you use with dotnet add package. (Of course, not all packages support .NET Core, and some only support it.)

When you run dotnet restore, any Nuget packages that your project requires but are not present locally are fetched automatically. If you've run dotnet restore before, either explicitly or if you use Visual Studio Code and allow it to do so, then you may have seen this happening.

These are among the "core NuGet capabilities" that the Microsoft documentation you read was talking about.

For more information, see this answer, the dotnet add package documentation, and the dotnet restore documentation. Note that, in .NET Core 2.0 and higher, dotnet commands that you would usually have preceded by running dotnet restore will run it automatically unless you pass --no-restore. (So you may have used it implicitly already, even if you don't use an IDE.)


Important:

  Please note that Ubuntu releases 12.04, 14.04 and newer now support
  native Netflix playback via
  HTML5.

  The solution in this answer should only be used in cases where native
  playback is not possible (e.g. unsupported Ubuntu releases, browsers
  other than Google Chrome).

  Also note that as of Firefox 49, Netflix playback is natively supported.

As of December 7th, 2012 the following works on 12.04 and 12.10 (at least).

Note: For new instructions --as of October 2013-- on how to install (Windows-)silverlight (ultimately useful to watch Netflix) in Firefox see at the end.

Open a terminal (Ctrl-Alt-T), an type:

sudo apt-add-repository ppa:ehoover/compholio
sudo apt-get update
sudo apt-get install wine-staging
sudo apt-get install netflix-desktop

Are PPAs safe to add to my system and what are some "red flags" to watch out for?

This will install around 254MB of packages, mainly it will install wine-compholio (a custom version of wine that is able to run Silverlight) and dependencies. If wine is not installed already you may need to agree to use Microsoft fonts (in the text mode window use arrow keys or tab to reach the red "ok" button in text mode when it appears). The download/installation takes around 15 minutes.

Then run the newly installed "netflix-desktop" application from the menu (or from the command line).

If something went wrong in the installation (third party links are involved), don't panic: netflix-desktop will detect that something is missing and try to reinstall it, if that also fails, start over.

When you run it for the first time it will initialize wine and probably ask about installing Mono and Gecko wine packages (I accepted and installed them just in case).

The netflix-desktop application opens up, login to your Netflix account.

The window will open in fullscreen, which is very elegant, but if you want to have control over the window press F11 right away to exit fullscreen mode. (It may also ask to install a Firefox extension --specially designed-- that makes fullscreen mode more friendly.)

Use Netflix as you would normally do.

It worked flawlessly in my Ubuntu 12.04 and 12.10 (I have a Core i7).

(As you may have realized at this poin, the netflix-desktop is really Firefox 17 running on wine without menubars. Press F10 to gain control over the Firefox menu and navigation.)

Credits and references: This information was originally taken from http://www.webupd8.org/2012/11/how-to-use-netflix-in-ubuntu-through.html. Although this is a result of a campaign initiated by www.iheartubuntu.com in http://www.iheartubuntu.com/2012/02/netflix-on-linux-contest.html, resulting in this achievement http://www.iheartubuntu.com/2012/11/ppa-for-netflix-desktop-app.html (by Erich Hoover) which also contains a link for donations to support the development. There is also  https://launchpad.net/netflix-desktop

Bonus: By running this you have a fully functional Firefox 17 (Windows version) with working Silverlight that can be used to navigate other sites, by pressing F10 -> View -> Toolbars -> Navigation menu on the main window you can access any site and be able to use Silverlight.

Alternative Method: Install Windows-Silverlight in Linux-Firefox

Alternatively, it is now possible to install Silverlight inside (Linux) Firefox as if it were a native plugin.  (you can see http://fds-team.de/cms/pipelight-installation.html for more info)

sudo add-apt-repository ppa:pipelight/stable
sudo apt-get update
sudo apt-add-repository ppa:ehoover/compholio
sudo apt-get update
sudo apt-get install wine-staging
sudo apt-get install pipelight-multi
sudo pipelight-plugin --enable silverlight

Then install the UAControl Firefox add-on (UAControl - neko.tsugumi.org) and convince movies.netflix.com that your browser is a Windows one, for example "Mozilla/5.0 (Windows NT 6.1; rv:23.0) Gecko/20131011 Firefox/23.0".

Then go to www.netflix.com.

Source: Pipelight: Use Silverlight In Your Linux Browser To Watch Netflix, Maxdome Videos And More ~ Web Upd8: Ubuntu / Linux blog


Install failure for LTS 16.04 nouveau MEM_FAULT

Boot the Ubuntu Live DVD with the nomodeset parameter set. If that works, the problem is related to your video card, and will can be solved by installing the correct video driver after install.

Once booted, open the Software & Updates app, select the Additional Drivers tab, and click the radio button to install the Nvidia driver. Reboot and you should be fine.


You are trying to run 32 bit application on hybrid 64/32 bit system without basic 32 bit libraries. Check output of

uname -a
file emulator

You need to install 32 bit version of libc (i386) and some other other libraries that you will need. Check output of

ldd emulator

and install other 32 bit libraries.


How to choose input method on Kubuntu 18.04?

This happens when the ibus-daemon does not start automatically after booting into Kubuntu. Do the following steps to rectify this:

Type 'Autostart' in Application Launcher search bar. This will open the 'Autostart System Settings' dialog.
Now click 'Add program' button.
Click 'Open file' button next to the search bar.
Go to Root -> usr -> bin directory.
Type 'ibus-daemon' in the 'Name' textbox.
Out of the three options appearing in the list, select 'ibus-daemon' and click 'Open' button.
Now you should be back in 'Autostart System Settings' dialog with 'ibus-daemon' selected under Desktop File category.
Select the 'ibus'daemon' and click 'Properties' button.
In the properties dialog, open 'Applications' tab.
Type 'iBus Daemon' in the Name textbox and type /usr/bin/ibus-daemon start in the Command textbox.
Now click 'OK' to come back to Autostart System Settings and click 'OK' here too.
REBOOT YOUR MACHINE. (VERY IMPORTANT)

Your iBus daemon shall now start automatically and you shall see the 'EN' icon in the panel where you can click and select the language of your choice.


I worked around this by skipping the migration and using the import option. All my IMAP folders were already there, but I had a few local ones


First off, I would strongly recommend not booting through an expansion card. But if you do, always try and use the identifier used for the original port to boot from. Also, make sure that you're not just extracting the iso and copying it to a USB, but actually mounting it to the USB. This includes formatting the USB and mounting an ISO file to it. I would recommend just using Rufus for windows to mount an ISO file to a USB as a bootable device. If you're running Ubuntu or Macintosh, use dd. The syntax would go like so:
First you will need to find the path of your USB by running this first without the USB inserted in your computer.

sudo fdisk -l

And then run it again after you insert the USB and see which path appeared that is different from before. An example would be /dev/sdb1. After that you would run the following command to mount the ISO file to the USB.

dd if=*your iso file*.iso of=*path to usb* bs=512k

Once dd has finished imaging the drive, it will output something that looks like this:

5823+1 records in
5823+1 records out
3053371392 bytes (3.1 GB) copied, 746.211 s, 4.1 MB/s

After properly mounting the ISO to the USB, try again and update or resolve this question based on your results.


Why is my WiFi password not recognized as correct?

I can think of two things that could cause this. This could happen if the network password is entered incorrectly. Enable the show password option and double check that the password is correct. Also make sure you have the right security method selected. In most cases it is "WPA & WPA Personal" but in some cases it could be another option. Check your router WiFi settings or the connection information on another machine that is successfully connected.

Also if you are using WEP pass phrase or WEP hex make sure you enter the password in correct format. A common error is to select WEP pass phrase but enter a Hex password which will be interpreted as incorrect and you will be prompted again.

Hope this helps.


My lack of understanding of Ubuntu made me figure I could just re-install the OS which was on the SSD. So, I overwrote the entire installation. I believe I've reinstalled ZFS correctly on Ubuntu.

That part is fine.

  I then attempted to recreate the pool using what I could remember from the settings.

You need to be more explicit about this step in order for us to help you.  Did you literally do zpool create ... with the same disks?  Did you successfully create a pool?  Filesystems on that pool?

  Running sudo zpool import gives me ...

This is the right thing to do.  But if you started with something destructive (like zpool create) on the same disks then it will require careful steps to get your pool back.

What does zpool import -D say?  That will list any "destroyed" pools.


How to use Xfce4-display-settings terminal commands?

The --display option to xfce4-display-settings will I assume take an X screen (as per the environment variable $DISPLAY, eg :0.0).

This is unlikely to be useful to you - multiple monitors are treated as a single large X screen, with the xinerama X extension providing hints on the actual monitor boundaries to window managers so that, eg maximising a window will maximise it to fill only one monitor.

This option is useful if you are running multiple thin clients off a single machine, or using X over SSH (in which case your $DISPLAY will look something like remotehost:7.0).


How to repair a broken apt-btrfs-snapshot in kubuntu 18.04?

I succeeded with the answer by @John to the question The program Anki won't start, with the simple suggestion to install python3-distutils

sudo apt-get install python3-distutils

I must_withdraw_my  old answer below, as I could not reproduce it a couple of times:

(The problem disappeared for me after I added the LC_ALL line to the file /etc/default/locale:

LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8

That one line was somehow missing. )


delete ubuntu completely from hard drive

There is no need to delete Ubuntu, just install Windows using the normal installation procedure.  It will overwrite Ubuntu.

The installer may ask if you want to overwrite the entire drive - including all partitions - to install Windows.  If it asks this, this is what you want.

Further help with Windows installation is outside the scope of this site.


12.04 Server Multiple IP Addresses with Multiple Interfaces

perhaps a problem with udev settings? First check that both interfaces show up in ifconfig -a and that they are handled correctly by udev:

cat /etc/udev/rules.d/70-persistent-net.rules

(check that mac address eth0 matches udev rule eth0, etc.)

Second, since you're using same nameserver on both NICs, accessible from eth1, perhaps the gateway should be on eth1 and enable forwarding between NICs?

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

Third, since your eth0 has a standard netmask/broadcast, try to leave out rules and let ubuntu figure out routing by only giving necessary info:

auto eth0
iface eth0 inet static
address 10.192.168.60
netmask 255.255.254.0
dns-nameserver 192.168.1.21


Can't ssh even with public key added to authorized_keys

Client Configuration

Set up ~/.ssh/config

Setting up host entries for ssh is really easy and will save you a lot of trouble.  Here is an example:

Host digitaloceanbox
Hostname 111.111.111.111
User root
PubKeyAuthentication yes
IdentityFile /home/user/.ssh/digitalocean-rsa
ForwardX11 yes

Host github github.com
Hostname github.com
User git
PubKeyAuthentication yes
IdentityFile /home/user/.ssh/github-rsa
ForwardX11 no

In this example, we setup digitaloceanbox and github and github.com so that we can do the following commands:

ssh github
ssh digitaloceanbox

If we want to login as a different user than the one specified in the config file, we just put user@ at the begining:

ssh user@digitaloceanbox

Generating ssh keys

ssh-keygen -t rsa -b 4096 -C user@homemachine
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa):  /home/user/.ssh/digitalocean-rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/user/.ssh/digitalocean-rsa
Your public key has been saved in /home/user/.ssh/digitalocean-rsa.pub.
The key fingerprint is:
SHA256:p9PYE/tveF2n//bLbp3ogYDtMtYEC5ziQiPxeob6fbo user@homemachine

Note that I've specified the full path of the private key I want to generate when prompted by ssh-keygen.  I've also defined the comment (-C) which allows me to easily identify keys on remote machines.

This will create two files:

.ssh/digitalocean-rsa

PRIVATE key.  Never share this.

.ssh/digitalocean-rsa.pub

Public key.  This is what you store on the server to authenticate.

When you provide your ssh key, be sure it's the .pub version!!  When you add to your ~/.ssh/config, be sure to add the correct private key that matches the public key you added to the system.

Server Configuration

Most installations will come with Public Key Authentication enabled.  If you start doing things all willy nilly, you might run into a few problems, however.  At where the OP is in their problem, I recommend that the OP deletes the /root/.ssh/ directory to start over.

It is not recommended that you use ssh to access the root user on the remote system.  It is recommended that you ssh into another user, and then escalate to root using your password (sudo su -).

Add keys to host using ssh-copy-id

Regardless of whether you decide to create another user and use ssh as that user, or the root user, the following is the recommended way of placing ssh keys on a server:

ssh-copy-id -i /home/user/.ssh/digitalocean-rsa.pub user@digitaloceanbox

This allows sshd to create the directory and files needed with the permissions needed.  This means there is zero chance for you to mess up permissions or needing to remember the details.  Just use the tool to upload the keys.

Disable Password Authentication

That being said, once you have key'd yourself and verified that you are able to connect using the keys, it is recommended that you disable Password Authentication in sshd and restart the service:

Edit /etc/ssh/sshd_config
PasswordAuthentication no
sudo systemctl restart sshd

What about new users?

If you disable Password Authentication, how can you key new users?  One way is to add template files to the /etc/skel directory.  Once you've key'd one user, do the following:

sudo cp -r .ssh/ /etc/skel/
ls /etc/skel/.ssh
Edit any files found in /etc/skel/.ssh/ so that they are blank, unless you want to automatically key yourself for every newly created user.

When you create new users with sudo useradd -m newuser, that user will have the .ssh/authorized_keys, which you can edit and will have the proper permissions.

Debugging

You can watch the sshd log file to see why connections fail or get refused:

sudo tail -f /var/log/auth.log

While you're running this command, use another terminal to attempt a login.  Many times the messages provided are good enough to help pinpoint the problem, or find a solution online.


Firefox home page change without Edit Preference option

In the browser, navigate to the about:config page. Then, search for browser.startup.homepage and change that variable to your desired homepage.

There is no need to restart your browser for this to take effect. The change should take place immediately.


How do I compile MSDOS 1.1 on Lubuntu 15.04?

You can not compile it because it is assembler code, i.e. code that is to be executed directly by the CPU. MS DOS 1.1 was just a re-brand of QDOS, an operating system developed for the Intel 8086 architecture. This means that MS DOS 1.1 can not be executed on different architectures.

You might be able to execute it with an assembler code interpreter able to emulate the Intel 8086, such as PCEmu or NASM (available from the Software Centre).


Automated Driver Loading: Cron, Init, or Modprobe

You've omitted one possibility: using systemd. Personally I think this is most elegant way of tweaking your system (e.g see here for a slightly related problem).
Open a terminal and create a new service:
sudo nano /etc/systemd/system/mydrivers.service(choose anyName.service)
(Instead of using nano you could also use sudo -H gedit /etc/..)
It's content:
[Unit]
Description= Your description here

[Service]
Type=simple
ExecStart= /usr/local/bin/myExecutableBash.sh #or whatever is executable

[Install]
WantedBy=multi-user.target

To enable that service execute:
sudo systemctl enable mydrivers.service(or your service name)
To start the service right away:
sudo systemctl start mydrivers.service
Your second part can be solved similar:
You need to create another service that is dependent on your first service.
So the service should start with:
[Unit]
Description= Your description here
After=mydrivers.service

[Service]
... your code here

For this service I'd prefer to write your code into an executable bashfile and start it in the "Exec" line


Copying packages in PPA fail due to same version

It's the same repository (pool) for all series; and in any case you can never reuse a version for files with different content once it's been used in any given archive.  You must upload with a changed version number in order to get new builds.


Using multiple internet connections on ubuntu

You need a switch, that is capable of doing the bonding. Those switches are business class devices, usually with 24 or 48 ports, even 12 port office class switches can't do that typically.

Another possible solution is a gateway-server with 3 ethernet ports.


How do I change the system language to German in Ubuntu 16.04 via terminal?

From command line you can try this:

sudo apt-get install language-pack-de language-pack-gnome-de
sudo apt-get install $(check-language-support)
sudo update-locale LANG=de_DE.UTF-8

Then relogin or reboot.

Edit:

It seems from your error message that the English locale has not been created. So run this:

sudo locale-gen en_US.UTF-8

Then I'd recommend an extended update-locale command:

sudo update-locale LANG=de_DE.UTF-8 LANGUAGE= LC_MESSAGES= LC_COLLATE= LC_CTYPE=

Edit II:

To work around the weird settings of environment variables in /etc/lxdm/Xsession, try to open ~/.profile for editing and add this line to the bottom of it:

unset GREETER_LANGUAGE


OpenStack single installer increase glance storage space

You can customize the sizes of the VM's via a configuration file containing your services placements and their constraints.

install_type: Single
placements:
  controller:
    assignments:
      LXC:
      - nova-cloud-controller
      - glance
      - glance-simplestreams-sync
      - openstack-dashboard
      - juju-gui
      - keystone
      - mysql
      - neutron-api
      - neutron-openvswitch
      - rabbitmq-server
      - swift-proxy
    constraints:
      cpu-cores: 2
      mem: 6144
      root-disk: 20480
  nova-compute-machine-0:
    assignments:
      BareMetal:
      - nova-compute
    constraints:
      mem: 4096
      root-disk: 40960
  quantum-gateway-machine-0:
    assignments:
      BareMetal:
      - quantum-gateway
    constraints:
      mem: 2048
      root-disk: 20480
  swift-storage-machine-0:
    assignments:
      BareMetal:
      - swift-storage
    constraints: &id001 {}
  swift-storage-machine-1:
    assignments:
      BareMetal:
      - swift-storage
    constraints: *id001
  swift-storage-machine-2:
    assignments:
      BareMetal:
      - swift-storage
    constraints: *id001

For a walkthrough with examples have a look at http://astokes.org/openstack-installer-customizing-the-single-install-constraints/


mp3info -p "%S" file.mp3 - return: file.mp3 is corrupt or is not a standard MP3 file

You could use something like avconv/ffmpeg which you should be able to then grep down. I recommend it because it's fairly robust and should look beyond broken headers:

$ avconv -i ~/Music/Aqua/Aquarium/*03*
avconv version 0.8.6-6:0.8.6-1ubuntu2, Copyright (c) 2000-2013 the Libav developers
  built on Mar 30 2013 22:20:06 with gcc 4.7.2
[mp3 @ 0x733ce0] Header missing
[mp3 @ 0x732960] max_analyze_duration reached
[mp3 @ 0x732960] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '/home/oli/Music/Aqua/Aquarium/Aqua - 03 - Barbie Girl.mp3':
  Metadata:
    title           : Barbie Girl
    track           : 03/11
    artist          : Aqua
    album           : Aquarium
    genre           : European Pop
    TLEN            : 198008
    album_artist    : Aqua
    TBPM            : 130
    date            : 1999
  Duration: 00:03:50.32, start: 0.000000, bitrate: 128 kb/s
    Stream #0.0: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s
At least one output file must be specified

Then just apply awk liberally:

$ avconv -i ~/Music/Aqua/Aquarium/*03* 2>&1 | awk '/Duration/ {print $2}' | tr -d ,
00:03:50.32


GRUB rescue returns unknown filesystem after Windows update

I had a very similar problem.

I dual boot Windows 10 and Debian (BunsenLabs), and if it is relevant then I use the (U)EFI BIOS system. Here is how I solved the problem.

Yesterday, I opened Windows for first time since summer, and it needs to install updates and to reboot and at second reboot I get the GRUB rescue prompt.

error: unknown filesystem
grub rescue>

ls gave:
(hd0) (hd0,gpt6) (hd0,gpt5) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1)

In order to find a filesystem GRUB rescue could recognise I run through ls (hd0,#) where the hashtag is a number between 1 and 6 (note: one can leave out the "gpt"-part and probably also the "msdos" part if you use the old partition table).

It turns out gpt5 is my home partition and gpt4 is my Debian root partition.
None of the other partitions had a filesystem that could be recognised (by GRUB rescue).

I now followed Carla Schroder's "How to rescue a non-booting GRUB 2 on Linux" guide. At the end of the guide she provides commands to boot from GRUB rescue. Notice when reading the guide, that at first she addresses the problem of booting from the normal GRUB prompt - that is not the rescue prompt, which is relevant to us, so read past that part, and you'll get to the rescue prompt.

Since my boot partition is gpt4, I ran the following commands:

set prefix=(hd0,4)/boot/grub
set root=(hd0,4)
insmod normal

The last one made the font of the prompt change a bit, and then the command

normal

which started the my normal GRUB 2 graphical boot menu. The guide didn't say anything about that, that would happen... but it worked splendid. I choose the Windows booter, and the update install continued. It rebooted another time, and sent me back into the GRUB rescue prompt, and I repeated the procedure, again choosing to boot Windows, and this time the update installation finished.

Now reboot manually (when the Windows update have been configured). Again I get the GRUB rescue prompt and I repeat, but this time in the graphical boot menu I choose my Linux (BunsenLabs), and when I have logged in I open a terminal and still following Carla Schroder's guide, I did

sudo update-grub

which finds my Linux image and the Windows boot manager, and then I did:

sudo grub-install /dev/sda

Finally I reboot again to check that everything works. I now directly get the graphical GRUB boot menu and both Linux and Windows can be chosen.

I hope this will be helpful, if anyone experiences a similar problem.


If the group is a primary group for them - you'll have to change the primary group for those users.
If no particular primary group is needed for them you can assign each of them their own group - the same as their username. Up to you.
Of course you may have to create those groups (or another group for them)

Anyway - to change group (primary or secondary) you can use usermod command.
You can also edit password/group files as necessary, if you want.

To create new group you will use groupadd.


Reinstall Ubuntu GRUB boot loader.
Boot from the Ubuntu installation media.

Select Try Ubuntu without installing.
On desktop open a terminal and execute :

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

Note : sda = disk | sda1 = efi partition | sda2 = system partition


Unable to read Temperature on my Ryzen 5 1600X

sudo modprobe it87 force_id=0x8628

The above worked for me.


Newly installed apps don't show up in dash

It isn't a bug. The dash has a cache of apps, it doesn't show new ones right away.

Try opening, closing, and opening the dash again. This has worked for me. A logout will do the trick too, but I think it's a bit overkill.

Opening the dash the first time will start refreshing it's cache, but it won't show the update while it is open. So closing and reopening it will then have its app cache updated.

Note that your programs do need to have a .desktop file somewhere in the many variations of "applications" folders. If there isn't a .desktop file associated with the program, it will never show up in the dash.


What happened to evolution-mapi in 16.04?

(i'm also from austria! ;-) )
i looked a little bit around, and found that evolution-mapi was deprecated. so it won't come back to the ubuntu repositories.
after reading a bit further, the german wikipedia says evolution-mapi was integrated into evolution 2.26 and also the english wikipedia says evolution-ews is now recommended.


Disk is full and now I can't boot into Ubuntu

I solved my own problem with the following method.

Boot from Live USB (I used the one that I originally installed my local OS from but probably any Linux live drive would work.
Mount the local drive. In my case I used mount /dev/sda2 mnt.
Open a terminal. Navigate to the Downloads folder at /home/user/Downloads.
Call sudo -H nautilus . and then from the Nautilus graphical interface I deleted a large file. It asked for confirmation.
Since the file was deleted without going to trash (I checked in /home/username/.local/share/Trash) I assumed that there was now some free space and rebooted.

Voila. I am now able to boot into the OS again.


How do I get adobe flash working in Chrome or Chromium on Ringtail?

Answering my own question.  Hopefully someone will find this useful.

This is useful if completely removed chrome and/or chromium didn't fix the problem.

i.e.
apt-get purge google-chrome

Didn't make your flash player work correctly.

The answer was to remove all the cache files in .tmp directory.  I actually found a libpepflash.so file inside there and removing the whole .tmp directory made it work.

What's interesting is that this page shows that it couldn't find a suitable plugin to display the content:  http://www.adobe.com/shockwave/welcome/

But this page: http://www.adobe.com/software/flash/about/
Shows: "You have version 11,7,700,203 installed"

Now youtube videos are actually displaying.  What I found before is that youtube videos were actually working but had no video (just sound) and I was confused by the shockwave/welcome page which had the "no suitable plugin" message.

So if you are having issues with chrome - delete .tmp from your home directory.


Your snmpconf is not including your custom MIBs. You need to make snmptranslate, which uses snmpconf aware of them. You do something like this:

snmptranslate -M+/usr/share/mibs/site -m+ALL -Of 1.3.6.1.4.1.9600.1.22.11.1.1.19


Exim is a full MTA, just like Postfix.

The several flavours of Exim, such as exim4-daemon-light, all have a nice

Provides: [...] mail-transport-agent

line there.

If your user complains it won't install, I see these obvious causes:

sudo dpkg -i package.deb will result in a failure if dependencies aren't met, just like will happen with any other package with dependencies. He has to run sudo apt-get install -f to satisfy them and complete the installation, but he might not know he has to do this.

Solution: ask full output of his installation attempt and it will probably hint on running some fix-broken command.
He has installed Exim from source and his package management tries to install it over his local install (and he refuses to do so - for a reason).

Solution: make it a Recommends: instead of a hard Depends:, to relax the dependency a bit. Regular installation methods do install the recommended dependencies, but can be relaxed by the user, e.g. --no-install-recommends via apt-get.


Remote login onto server and let someone else see your shell?

Take a look at the screen command, and its multiuser mode.

Ctrl-a :multiuser on    Make the screen session a multi-user session (so other users can attach).
Ctrl-a :acladd USER     Allow the user specified (USER) to connect to a multi-user screen session.

http://wiki.networksecuritytoolkit.org/nstwiki/index.php/HowTo_Share_A_Terminal_Session_Using_Screen

http://www.gnu.org/software/screen/

http://www.gnu.org/software/screen/manual/html_node/Multiuser-Session.html


Proper Method of Creating Daily-Building PPAs

The best way is through Launchpad recipes. The main documentation for recipes is at https://help.launchpad.net/Packaging/SourceBuilds/Recipes.

Matt Revell also posted a nice introduction youtube video when recipes were first announced that I would recommend watching: http://blog.launchpad.net/cool-new-stuff/source-package-recipes


How to batch rename files but not directories?

Iterate all and test whether it's a regular file or not.

#bash
for file in ./*; do
    [[ -f $file ]] && mv "$file" "$file.ext"
done

In case you need to avoid adding extension on files that already have it:

for file in ./*; do
    if [[ -f $file && $file != *.ext ]]; then
        mv "$file" "$file.ext"
    fi
done


It appears that you have indeed disabled that swap partition in your /etc/fstab file.

I would ,however, suggest one more step.

Please, first turn all swap off swapoff -a. Then type in the terminal:

sudo nano /etc/initramfs-tools/conf.d/resume

Check if the UUID for disabled swap is in the file.

If yes, please comment it out by adding # before that line. Save the file and exit.

Recreate the boot images:

sudo update-initramfs -u -k all
Update GRUB:

sudo update-grub

Then, please reboot and see if this works.

You might as well want to delete your swap partition and extend your system partition after that to utilize the unused space.


Ubuntu 17.04 cannot get webcam to work on toshiba laptop L875

Perhaps the device is not activated yet.

identify your device using hwinfo.

You may need to install it first.

sudo apt-get install hwinfo
List the details of your devices.

hwinfo --usb

The result may shown as below:

03: USB 00.0: 0000 Unclassified device
  [Created at usb.122]
  Unique ID: xJ63.LO5zjwIvSt9
  Parent ID: ADDn.4Nx_qoDfSd7
  SysFS ID: /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0
  SysFS BusID: 1-1.6:1.0
  Hardware Class: unknown
  Model: "Chicony Electronics Lenovo Integrated Camera (0.3MP)"
  Hotplug: USB
  Vendor: usb 0x04f2 "Chicony Electronics Co., Ltd"
  Device: usb 0xb217 "Lenovo Integrated Camera (0.3MP)"
  Revision: "8.54"
  Driver: "uvcvideo"
  Driver Modules: "uvcvideo"
  Device File: /dev/input/event17
  Device Files: /dev/input/event17, /dev/input/by-id/usb-Chicony_Electronics_Co.__Ltd._Integrated_Camera-event-if00, /dev/input/by-path/pci-0000:00:1a.0-usb-0:1.6:1.0-event
  Device Number: char 13:81
  Speed: 480 Mbps
  Module Alias: "usb:v04F2pB217d0854dcEFdsc02dp01ic0Eisc01ip00in00"
  Driver Info #0:
    Driver Status: uvcvideo is not actived
    Driver Activation Cmd: "modprobe uvcvideo"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #12 (Hub)

activated as sugested in Driver Ativation Cmd section.

modprobe uvcvideo

hope it works

ref: http://www.linuxintro.org/wiki/Set_up_a_Webcam_with_Linux#Troubleshooting


How do I recover encrypted home folder after deleting filesystem

If you overwrote the files, they're gone. If testdisk couldn't find the partition, it's essentially gone. You could try photorec, it may find some files yet, but a backup copy would be best.

If you still have a copy somewhere, run ecryptfs-recover-private

As always, remember that if files are important enough they should have a good backup somewhere.


Clone Windows 10 to SSD from dual boot with Ubuntu

Finally I found a way guys... first we need to clone the system ( in my case it's windows 10 ) to the ssd using a free or paid tool. Then we have to log in Ubuntu and update the grub boot loader either by using command line or gui. It will detect our Windows OS on ssd. Then we can choose our OS on grub screen.


Ubuntu 20.04 takes a lot of time to unlock

Delete and clean up your os from garbage and unnecessary files.
You should also check that any startup application which can be heavy to load or you have set more applications to startup as the os loads.
I have written a python script to clean os.
here is the repo link check it up Cleaner
You can also use gui apps like spacer.
install : sudo apt install stacer
run : stacer
you can check the starup applications using stacer


Can I burn the Ubuntu ISO CD image onto a DVD to install it?

I've always burned to a DVD. It will work just fine, so long as your burner can burn DVDs and the computer you are installing to (if different from the burner) can read DVDs and boot from CD/DVD drive.


How to successfuly map non printable Zero Width Non Joiner on keyboard in Ubuntu?

I have figured out the problem. I had added the keyboard by using the Text Entry option under All Settings. The keyboard I had added first Urdu (Pakistan, CRULP) has no key for typing ZWNJ. Where as the other keyboard that I added later Urdu(Pakistan, NLA) has the key mapped to Ctrl+X.

Update: This came into my notice now, Ctrl+X suddenly stopped functioning. i.e. it does not type ZWNJ anymore, most probably because Ctrl+X is reserved for the cut command. I don't know why it worked before. Anyway the new key combination that types ZWNJ is Shift+X.


Is there a GUI app to setup and toggle hostapd?

maybe this can help you to better deal with hostapd:

http://nims11.wordpress.com/2012/04/27/hostapd-the-linux-way-to-create-virtual-wifi-access-point/

for gui you can check out this project (did not check myself but will sometimes :D):

https://code.google.com/p/wifi-hostapd-ap/downloads/list

... and ... tataaaa
if you are using ubuntu (at least since version 11.10) recent versions of Ubuntu have an option in the Network Manager GUI to share one internet connection over a LAN or WLAN.
enjoy!   :D


Remove that directory

sudo mv ~/.local/share/teamviewer11 ~/.local/share/teamviewer11.bak

and try again Teamviewer without sudo


Why don't you do a fresh install and then install open source AMD drivers, plus if you are low on ram, try to use lower RAM consuming DE like LXDE, or even wmii if learning curve is not steep for you.In addition close unnecessary services running and even check the startup application. I think that should help you.


My wireless/WiFi connection does not work

Do:

sudo apt-get purge bcmwl-kernel-source

Then reboot and let ubuntu load the brcmsmac driver if it does not load then you will need to remove brcmsmac and bcma driver's from the blacklist file like so:

sudo sed 's/blacklist brcmsmac//' -i /etc/modprobe.d/blacklist.conf
sudo sed 's/blacklist bcma//' -i /etc/modprobe.d/blacklist.conf

Then blacklist the b43 and ssb driver:

sudo -i
echo "blacklist b43" >>  /etc/modprobe.d/blacklist.conf
echo "blacklist ssb" >>  /etc/modprobe.d/blacklist.conf

exit
Reboot


Try installing a generic graphic driver
like bumblebee:

sudo apt-get install bumblebee bumblebee-nvidia


C++ Colored output text when redirected in text file

Below is the solution:

if (isatty(STDOUT_FILENO)) // STDERR_FILENO for fprintf(stderr, str);
{
    printf("\033[1;36mDebug:\033[0m\n");
}
else
{
    printf("Debug:\n");
}

Using the above code the terminal will show the colored text, but when redirected to a file or pipe, plain text will be used.


Turn off fast boot and hibernation. In some cases windows doesn't shutdown properly and goes to hibernation which may be annoying.

Also you may have to set up grub to be able to choose which OS to launch if you don't want to select which OS by using the bios and boot drive order

EDIT: It is also worth noting that Ubuntu en UEFI are not good friends. Better use legacy mode in  the bios


Booting Ubuntu Server 20.04 on Pi 4 from USB

As of writing, there is no easy way of booting the preinstalled raspberry pi ubuntu-server image from usb only.
But there is an easy workaround - that worked for me:

copy the image to micro-sd-card and usb-stick/harddrive
delete the second partition named "writeable" from the micro-sd-card
(not necessary - but might avoid later complications) delete the first partition named "system-boot" from the usb-stick/harddrive
have both devices plugged in on boot

Since the boot-device selection in the preinstalled-images uses the "Label" option to identify the devices, this works.


Boot hangs, low graphics error and login-failure

The initial messages you see are just the output of the various packages running below what you (normally) see as the graphical interface. I recently had the same login loop problem; it was caused by an overly-specific autogenerated xorg.conf file (found in /etc/X11/xorg.conf).

Try re-generating your Xorg.conf file using

sudo Xorg -configure

Alternatively, you could even rename your existing xorg file and reboot to make the X server automatically detect the environment. Without the configuration file, it should automatically load the Intel integrated drivers and use your monitor's native resolution.


Recently fixed this using nodejs-legacy.

Run the following command:

sudo apt-get install nodejs-legacy

This should fix it.


Adobe announced that They will no longer provide new releases of Flash Player for Linux after version 11.2.

This might be Flash Player bug, Re watch that video again in last version of Google Chrome Browser or update your flash player (if available).


Not able to setup delete and backspace compatibility in terminal

If you log in to another machine through terminal [ssh in reality] then the remote machine takes care of the ex.: "backspace" funtion.

on a SunOS, backspace will not work by default so you have to use bash or:

stty erase ^?


Nvidia card for a laptop can't be detected

If you go to System Settings>Software and Updates>Additional Drivers

and select a different driver, this may help

If you can not see any drivers for NVIDIA here, go to the software centre and search for NVIDIA X.org 173 or just NVIDIA X.org and install one of these.

Make sure you tick the Optional Add-ons so that you get to edit your settings then run the first part again to see if there is a later version you can try.


Wi-Fi keeps changing between APs frequently

If you set wifi.bssid in NetworkManager's connection profile, then you lock the connection to a certain access point and prevent roaming.
Otherwise, roaming is enabled. How that happens exactly is not configurable, because it just must work reasonably (without configuring it).
If it does not work well for you, then there might be a bug or something that should be improved. Note that roaming decisions are made by wpa_supplicant. So you need to look at the debug logs of supplicant, see how/why it roams, and suggest how it should do it differently (and find out why the chosen approach is not working well for you). Without details about what is happening, it is now clear what supplicant (or NetworkManager) could improve.


Check out the Phoronix Test Suite which is one of the most widely used performance measuring tool, and runs on Linux, FreeBSD, Windows, Mac OS X, etc.
Here is a description from their website:

The Phoronix Test Suite is the most comprehensive testing and
benchmarking platform available that provides an extensible framework
for which new tests can be easily added. The software is designed to
effectively carry out both qualitative and quantitative benchmarks in
a clean, reproducible, and easy-to-use manner.
Originally developed for automated Linux testing, support to the
Phoronix Test Suite has since been added for OpenSolaris, Apple Mac OS
X, Microsoft Windows, and BSD operating systems. The Phoronix Test
Suite consists of a lightweight processing core (pts-core) with each
benchmark consisting of an XML-based profile and related resource
scripts. The process from the benchmark installation, to the actual
benchmarking, to the parsing of important hardware and software
components is heavily automated and completely repeatable, asking
users only for confirmation of actions.


That error message actually suggests that it is able to find the cmake executable (as /usr/bin/cmake) but when it attempts to execute it it can't, because cmake requires a shared library (libgssapi_krb5.so.2) which can't be found.

There are a variety of ways that that might happen, but there are a couple of things you can try:

If the library is just not actually installed, you may need to install its package:

sudo apt-get install libgssapi-krb5-2

If the libgssapi-krb5-2 package is already installed, it's possible that there is just a problem with the libgssapi_krb5.so.2 symlink that links to the actual library.  If this is the case, the following command should fix it:

sudo ldconfig -v

It may also be a good idea to make sure that there aren't any other libraries that are missing that cmake needs to run.  You can do this with the following command:

ldd /usr/bin/cmake

This will print all of the shared libraries it needs, and where it found them in the filesystem (if it was able to find them, or tell you if it can't)


Xubuntu 16.04: Change lock screen default value

One way that can do it is the xcsreensaver.  It has the ability to automatically lock the screen for you.

You can install xscreensaver by typing in from a terminal window:

sudo apt install xscreensaver

Then you can go to the settings (Applications > Settings > Screensaver) and set for however long you want before the automatic lock kicks in after the screen saver has started:

Hope this helps!


uninstall wireshark Version 1.12.7 from ubuntu trusty tar

You can't remove a compiled version in the same way as a deb package.

If you no longer have the source code, download the source code again
Compile Wireshark again, and don't install
Install checkinstall

sudo apt-get install checkinstall

Install, yes install via

sudo checkinstall

Why? checkinstall creates a deb package and installs the package and overwrites in this way all installed files of your earlier installation via sudo make install
Remove

sudo apt-get remove wireshark

And in the future, use checkinstall to install your self-compiled code.


I would recommend you install Gnome Tweaks from the Ubuntu Software Centre.

By default, 18.04 uses dynamic workspaces but if you wish to have fixed workspaces this can be achieved using Tweaks:

Be aware that in the past, the workspaces were a 'grid' of 4 but in 18.04, they are 'stacked' so you use CtrlAltup or down arrow to move from workspace to workspace.


Gdiskdump does not show harddrives, only partitions

Gdiskdump shows you have three HDDs: sdb, sdc, sdd.

also try gparted and parted.

To clone a drive and all partitions, including MBR or GPT:

BE CAREFUL with dd! You can easily make a mistake.

make sure its unmounted ( like when using a liveusb)

dd if=/dev/<device> of=filename.you.choose

To get a specific partition:

dd if=/dev/sdxn of=filename  where sdxn is something like sdb1 or sdc6

to restore:

dd if=your.filename of=/dev/device[partition#] ( e.g. /dev/sdb3)


Launch Diablo 2 Lord of Destruction with Wine from CD

'Step 4' is wrong. You just need to do this instead

 # wine cmd.exe
 # d:\
 # d:\install

and you can proceed : )


Make sure easy-rsa is installed:

sudo apt-get install easy-rsa

If you are using 14.04.1 the command to create the easy-rsa dir and add everything you need is:

sudo make-cadir /etc/openvpn/easy-rsa

After that you can just cd to /etc/openvpn/easy-rsa and create your keys as the tutorial says.

Hope this helps!


i want to open a file in the root directory in my c++ application in write mode.

as I know you can do it in two ways.

Remove or disable the root prompt when ever we are trying to access the root mounted dir. But the pros & cons are mentioned here very clearly.
Everytime if you will access the same directory/file then you can change file permission to that directory as everyone access& modify it. for that consideration read this page.

so choose what best suits you.

hope that helps a bit.


No Init Scripts available after installing Mongodb package on Bash on Windows

Note - Bash/Ubuntu/WSL in Win10AU doesn't currently use initd - it uses a custom simplified init that avoids many of the steps normally required when initializing a Linux OS/Kernel, some of which are unnecessary because its resting atop an already initialized Windows kernel.

Also, note that when you close your last bash console, any running bash processes are torn-down.

We're working on improving this in a future release, but for now, I recommend creating a bash script that starts-up the daemons etc., that you need, which you run manually after you've started a new Bash session.


I could be a problem of crons input buffer if your script does a lots of echos. Try the following:

@reboot /script.sh >> /dev/null 2>&1


Ubuntu 12.04.5 Server No Internet from ethernet connection at work

As the comment above states, I may have not provided enough information to answer the question.

That said, to fix my problem the network team at my workplace had to mark my MAC address for entry into the specific vlan used.


"No Boot Device Found" error on new laptop

I have had a similar problem before during an Ubuntu installation, just as you are having. Late in the installation, after Grub had installed, it said a reboot was necessary. So I manually rebooted the machine and that basically voided the installation because it was not actually finished yet. I repeated the installation and allowed the machine to reboot automatically and then everything worked.

I hope this helps!


How do I set up bridges and vlans with netplan

you don't "need" to have a bridge for the host, you can continue to use the interface as is, create vlans on it and define bridges connected to those vlans.
The official documentation on netplan examples lists how to set up those vlan-bridges with netplan and how to use them later in libvirt.
That is "a" way to go, depending on your overall scope and later demand for features you can consider replacing basic bridges with OpenVswitch instead which has VLANs as well, but also much more features (at the price of a more complex setup).


cannot understand difference of my drives

What I see in the output of lsblk and df

The two key points are these two lines:

├─sdd1   8:49   0 457.9G  0 part /

└─sdd5   8:53   0   7.9G  0 part [SWAP]

/ tells us that 457.9 G disk partition contains your currently used Ubuntu - / designates root folder, much like C:\ on Windows. [SWAP] tells us it's the partition for your virtual memory ( which is usually serves to compensate for lack of RAM) and is typically allocated exactly the same amount of disk space as your RAM, and yes, any default installation of Ubuntu does this unless you choose manual approach .

Next, see  the following two lines.

─sda5   8:5    0  62.4G  0 part
└─sda6   8:6    0   7.9G  0 part

There's your unknown 67 GB volume ( and yes, the size differs not by accident , Linux commands report size in Gibibytes , which is powers of 2 rather than convenient human-readable powers of 10 ). What's more important is the 7.9G , this is the same amount as above, indicating that's also a swap partition.

Solving the issue

We've mentioned in the comments GParted , which is a very very handy tool for resizing disk partitions. The full procedure is beyond the scope of this question, but I can point you to the canonical tutorial we have: How to resize partitions? . df output tells me that your mysterious 67 GB volume there isn't mounted ( i.e. not in use by the system , which is a good thing ） ， so you could install gparted and proceed to resize that disk directly, deleting the two paritions first and then reallocating that space to be used by some other partition.

On a side note , you have 8 GB of swap. That much swap typically isn't needed for desktop with that much RAM. Consider deleting your /dev/sdd5 partition . Personally, I have SSD and plenty of RAM , so it would be  a waste, and so I only have one root partition and that's it.

Finally, make sure to run sudo update-grub  in terminal after everything is done. We want the bootloader to know that we've done changes to the system. Otherwise it will be a dum-dum and try to load everything as before which may brick the system.

If everything succeeds, have a beer and keep enjoying Ubuntu ( responsibly ) ; and if you have any other concerns - post another question and we will do our best to help


Try to disconnect AC-DC power supply from laptop. Sometimes 50-60Ghz noise transfers from electrical network through PSU to ear-buds or speakers.


Like @muru stated in his comment you have files for all sessions in your /usr/share/xsession directory. Just renaming them sadly does not suffice to make them go away (at least in my case) so remove them or move them somewhere else in case you want to keep them. The directory should be similar to this here just with your choice of what you want to keep (example below taken from my machine).

ls -lah /usr/share/xsessions/
total 20K
drwxr-xr-x   2 root root 4,0K Okt 23 18:11 ./
drwxr-xr-x 347 root root  12K Okt 22 23:46 ../
lrwxrwxrwx   1 root root   18 Okt 13 13:33 gnome.desktop -> gnome-xorg.desktop
-rw-r--r--   1 root root  201 Okt 13 13:33 gnome-xorg.desktop

The symlink in there is your actual choice of desktop environment so only remove the other files and keep the file the symlink is pointing to intact.

if you dont want to remove the files you can as well simply remove all permissions from the files in question  (as stated by @PJSingh) by:

# Example line! Change filename accordingly!
sudo chmod a-rwx ubuntu-xorg.desktop

After that you not even see the cogwheel symbol anymore when you log in.


Unable to copy files, insuffiencent space

Check the system where you want to copy the file

That you cannot copy is not related to the partitioning as such. There are some conditions for you to be able to write somewhere:

The volume where you want to write, must be writable, i.e., it must be mounted readable and writable. That is normally the case for your system partition if the system functions normally.
The volume where you want to write, needs to have sufficient free space available. Check "Free Space" in your file manager: right-click the folder, and select "Properties". Free space will be mentioned there.
You need to have permissions to write. Linux is designed to be secure. By default, a user can only write into folders under his home folder. Check the current permissions in the same dialog as above, but now choose the "Permissions" tab. Check whether you are the owner, and have "Create and delete files" permission. If access to "Others" would be set to "Create and delete files", then any user can write, but that permission is rarely set because it becomes insecure.

Some remarks on your partitions

You have a 50 GB root partition that is used for your Linux system.
You also have a swap partition that may or may not be used. By default, current versions of Ubuntu do not create a swap partition during installation: they install a swap file. That swap space may thus be  a leftover of a previous installation, and it is well possible that your current install uses it since it is there.
Finally, you have a 1 GB ext4 partition. Since this is also a linux partition, you must have created it at some point while using or installing linux. It is however highly unusual to create a partition that small, unless, perhaps, it is a separate /boot partition.


User in www-data group can not find command

PATH is only set to a minimal value for the entire system, and it may not include wherever your application is. You'd need to set the PATH for the web server to affect how your app is run by web scripts.

You should probably have your PHP script simply add the directory needed to the PATH right before calling 'system' or 'exec'. That will keep the change contained to this one script.

Another option which may be preferrable is to just call the application by its full path name, so that you don't have to search the path for it. So if it is in /usr/local/bin, just do /usr/local/bin/myapp.


Transfer ubuntu18.04lts os from pc to laptop

Can I boot from the old hdd via usb?

No. You can connect the disk to the laptop though using a cable that fits in the hard disk and fits into the laptop. Assuming SATA and USB 3.0 here is an example (eminent USB 3.1 to SATA 6G adapter 2.5 in case you need to find one similar for your situation):

This leave the disk exposed. Fine for a 1-time restoration of your files but not if you want to reuse it. Then you are probably better of with a hard disk casing.


How to delete my contents from Ubuntu One before the shutdown?

All the files will be deleted from everywhere with the shut down.

As for contacts, you can go to the contacts website and delete them yourself (those won't be deleted, as U1DB will continue to run).


Can't change keyboard layout/language in lxde

I assume that you have installed 14.04 since there is no 14.05.  It is relatively easy to add another language.  Since you had it working in Unity I will also assume that you have also successfully downloaded and installed the Russian language pack.
There should be a two letter code or a flag in your LXPanel.  Right click whichever one you have and select  "Keyboard Layout Handler" settings.  When the new window opens, uncheck "keep system layouts" which is located on the right side of the window.  Then select "Add" which will be on the left side of the window.  A list will appear.  Scroll down to Russian.  It will be "ru".  Select it and move it up or down wherever you want it.  Before you close the window you must re-check "keep system layouts."  The you can close the window.  A new session is required for you new settings to take effect.


Ubuntu 16.04 has no VMWare console access once booted on VMWare vSphere 5.5 Cluster with EFI

ubuntu 16.04 uses systemd instead of upstart.  to configure systemd for serial console, you only need to update grub2 to use the serial console, and systemd will also be configured for serial console.

all you need to do is, modify the lines in the /etc/default/grub  file

GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"

# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"

then execute update-grub

make sure you use ttyS0 ... it's case-sensitive ... otherwise you'll only see the grub boot menu, and you won't get an actual console

see also:  http://0pointer.de/blog/projects/serial-console.html


Ubuntu 18.04 - Second External Monitor not Working [Nvidia GTX 1650]

I would check different versions of driver.
In my case nvidia-418 is the newest one, with works properly with external monitors.

sudo apt-get purge nvidia*

sudo apt-get install nvidia-xxx


Boot-Repair Ubuntu 12.04.3 whilst leaving SecureBoot on

Unfortunately, some versions of GRUB have problems launching the Windows boot loader with Secure Boot active. I don't know offhand if this is true of the version of GRUB installed with Ubuntu 12.04.3, but your experience suggests it is. There are at least four ways around the problem:

Disable Secure Boot. (I know you said you prefer to keep it active, and I respect that; but it is an option, and it's likely to be the easiest one to use.)
Locate a version of GRUB 2 that can launch the Windows boot loader with Secure Boot active. Unfortunately, I don't know precisely which versions will work for this. You'll also probably have to adjust the Linux Secure Boot configuration to get this to work.
Install my rEFInd boot manager to serve as your primary boot selector. Actually installing rEFInd is fairly easy; simply installing the Debian package will do the trick. You'll probably have to jump through some extra hoops to get it to work with Secure Boot, though.
Use the firmware's built-in boot manager. With most computers, hitting Esc or a function key early in the boot process brings up its own built-in boot manager. This should enable you to boot either Windows or GRUB/Linux, without using GRUB to boot Windows. Unfortunately, which key you press varies from one machine to another, the windows for getting the boot manager is usually short, and you'll always need to use that key to boot your non-default OS.

The extra Secure Boot hoops required for using rEFInd or a non-Ubuntu version of GRUB aren't really all that difficult to navigate once you understand the principles and tools involved. The pages to which I linked are long in part because they describe several different options. In brief, you may need to install a non-Ubuntu version of shim and, when it boots for the first time, use the associated MokManager program to install the Ubuntu key file (which is included in the rEFInd binary package and in an obscure Ubuntu package whose name and URL I don't recall).


Not able to go after the login. It works only in recovery mode. How to check what is wrong?

Thanks to GabrielaGarcia's comment I found out that I didn't selected the corrected graphic card drivers.

If you don't have the Nvidia repository you could add it with:

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

and install the drivers with apt (e.g. with nvidia-340, check which is the one you should use on Nvidia website):

sudo apt install nvidia-340

In my case I already had them installed, so I just selected the recommended one. To select the graphic driver, go to Software & Updates > Additional Drivers and select the one you want.


I had the same exact issue. Looks like you're missing drivers for the Ethernet.
Go to this link (which is from the actual Ethernet provider): https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
Download the "2.5G Ethernet LINUX driver r8125 for kernel up to 5.6" and follow the installation instructions.
You should be able to use wired connection once you're done.


Your system is already telling you exactly what to do:

/dev/sda2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options) fsck exited with status code 4
The root filesystem on /dev/sda2 requires a manual fsck

Go get your Ubuntu Live USB and boot into it. From there:

Open a terminal (Ctrl+Alt+T)
Run sudo blkid | grep ext and try to find your drive. It should return one line, containing an ID like /dev/sdb2 (replace this with whatever you got).
Using the ID you got in step 2, run sudo fsck /dev/sdb2. If it returns any errors, you can run sudo fsck /dev/sdb2 -a to actially fix your filesystem.


Data and time format are defined as part of the "locale". The system default is configured during installation. You can change the system wide location in the "Language Support" dialog. You can reach the dialog in "Settings", "Region & Language", then hit "Manage Installed Languages", or directly search for "Language Support" in the dash. Hit the "Apply System Wide" button to set the system wide language settings to these of the current account.

Only a user with administrator rights can do this, obviously.
For more granular control, you need to directly edit system files.