13.04 Ethernet Adapter not connecting (AR8161)

I have the same network card on my machine,I was able to get it up and running by downloading the source code for the driver (from its homepage at the Linux Foundation) and compiling it:

wget -O- https://www.kernel.org/pub/linux/kernel/projects/backports/2013/03/28/compat-drivers-2013-03-28-5-u.tar.gz | tar xz
cd compat-drivers-2013-03-28-5-u/
./scripts/driver-select alx
make
sudo make install
sudo modprobe -r alx && sudo modprobe alx

If that works and you'd like to make the change permanent, you'll want to update the initramfs image with the new driver:

sudo update-initramfs -u


How to check is printer on / offline with CUPS?

Use lpstat with the -t parameter:

$ lpstat -t
scheduler is running
system default destination: DCP-7065DN
device for DCP-7065DN: usb://Brother/DCP-7065DN?serial=<REDACTED>
DCP-7065DN accepting requests since Tue 19 Nov 2019 04:29:56 PM MST
printer DCP-7065DN is idle.  enabled since Tue 19 Nov 2019 04:29:56 PM MST

The system tells us the printer is accepting requests, eg "Good to go".


rsibreak or xfce4-time-out-plugin like software?


I've had this issue, and it was caused by the b2 package splitting into two parts (b2 and b2sdk), and the sdk part (which duplicity relies on) changing its name as a result of this.
Latest duplicity codebase supports both older and newer version of the library, but older versions such as 0.7.18.2 does not.
What fixed this for me was removing duplicity with apt, and installing it with pip instead (I used python3 instead of python2 as python2 is EOL):
sudo apt remove duplicity
sudo apt install build-essential python3-dev gettext librsync-dev
sudo -H pip3 install duplicity


Ubuntu 15.10 - Nautilus Cannot Add Bookmarks

Simply go into a folder you want to bookmark in nautilus and press CTRL+d. This will add a bookmark, CTRL+b is only to edit the said bookmarks you already have.


Starcraft 2: Blizzard Downloader has Encountered a Problem

Remove the files that the were downloaded by the installer and try again. There seems to be a fault that cannot be recovered in them. They are located (generally) in your ~/.wine/ folder, the default location is the user's desktop folder c_drive>Documents and Settings>user>Desktop.

After deleting the installed files you need to try to download them again.

Another option is to look for a torrent with the files for offline for offline installing but there are no real direct secure sources, you will have to risk installing the game from an unsecured source and most of the times that is really not an good option.

Extra information

To fully install and run Starcraft2 will will need to do the following:

Your wine bottle version should be WindowsXP 32bits.
Install libmpg123-0 in your system (look for it in USC or install
it sudo apt-get install libmpg123-0)
Install in your wine bottle Microsoft Visual C++ 2005 Service Pack 1
from this
location.
The file you need to use is vcredist_x86.exe.


How to move packages from the live image to a pool on the disc?

The correct and long answer is in the wiki:
https://help.ubuntu.com/community/InstallCDCustomization#Modify_pool_structure_to_include_more_packages

But I've done it in the wrong hacky way without signing and with manual activation (which is enough for me):

Marked all needed packages for (re)installation in Synaptic and used File > Generate download script
Launched that script to download all the packages.
Unpacked the Alternate CD iso with UCK to /home/username/tmp/remaster-iso (default location). It stopped on trying to find SquashFS: there is none on Alternate CD.
Moved all the packages to /home/username/tmp/remaster-iso/debs.
Executed sudo dpkg-scanpackages /home/username/tmp/remaster-iso/debs | gzip -9c > /home/username/tmp/remaster-iso/debs/Packages.gz
Updated md5sum.txt:

# find . -type f -print0 | xargs -0 md5sum > md5sum.txt

Made the iso:

sudo mkisofs -r -V "ubuntu_with_debs" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o dvd.iso /home/username/tmp/remaster-iso/

After installation I'll temporary replace sources.list with a single line:

deb file:///media/ubuntu_with_debs/debs /


How do I get Unity panel, dash, and launcher back after kernel upgrade?

This worked for me. After messing around with getting the fglrx's installed and uninstalled from the Proprietary Drivers menu in gnome-control-center>software&updates, Unity was all gone and I just had the desktop (which had icons drawn on it, curiously). From that stage I ran sudo apt-get remove --purge fglrx*, and restarted. Still no Unity. I then called google-chrome & and downloaded the proper driver from http://support.amd.com/us/gpudownload/Pages/index.aspx. Then, as OP says, I ran dconf reset -f /org/compiz/ and a quick chmod +x driver_yadda_yadda.run and sudo ./driver_yadda_yadda.run, and it took me through the steps. After the prompted Install, everything is back to normal.


pm-suspend works, but clicking on "suspend" from GUI menu does nothing?

Edit this file /etc/default/acpi-support (sudo your favorite editor)

Change the line

SUSPEND_METHODS="dbus-pm dbus-hal pm-utils"

to this

SUSPEND_METHODS="pm-utils"


Play on Linux not showing League of Legends

Uninstall playonlinux and then go install the latest version by hand from the website. I notice that the Ubuntu apt-get repo version is outdated.


Resume from suspend doesn't work on macbookpro 4.1with Ubuntu 14.04

I had the same issue on the same setup. Per the community wiki instructions for the MBP 3,1 revision

I switched the nvidia-331 using the Additional Drivers utility, and the suspend problem cleared up. (It did, however, cause problems with the Ubuntu boot splash screen not appearing. This is fixable -- see The instructions here at binarytides -- though note an important error in those instructions: The file /etc/initramfs-tools/conf.d/splash should include only FRAMEBUFFER=y (minus the quotes), NOT echo FRAMEBUFFER=y as shown.)

If you don't want to mess with the video drivers, the community wiki page for using 13.04 Raring Ringtail with MBP 4,1 models describes a fix involving creation of a script called macbook.sh in /etc/pm/sleep.d (use same URL as first link above, but change
"3-1" to "4-1" and "Trusty" to "Raring"). I haven't tested this, but it may be worth a shot.


Set default route on boot in Ubuntu 16.04 LTS

Well I managed to solve this by myself simply by adding line

ip route add default via 192.168.0.1

to the /etc/rc.local script, so it gets executed every time automatically.

Note for everyone else, remember to change gateway IP address accordingly.


There are two ways you can go from Ubuntu 13.10 to 1.04.1 LTS, you can either upgrade using the 'Software Updater' and no data will be lost or you can do a clean install. I recommend doing a clean install but make sure you backup any important data as it will be deleted if you do decide to go with a clean install. Also Ubuntu 14.10 came out yesterday so you may want to consider jumping straight to it, so far it's been rock solid.

Upgrade from a previous version of Ubuntu
http://www.ubuntu.com/download/desktop/upgrade

Using a USB or CD/DVD
DVD: http://www.ubuntu.com/download/desktop/burn-a-dvd-on-ubuntu
USB: http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu


Trying to make USB Drive Bootable with Ubuntu!

I would recommend avoiding Unetbootin UNLESS you REALLY need the persistent file, because it's generally way less reliable than dd. Run:

diskutil list

then plug in your flash drive. Then run it again and see which one is new, such as /dev/disk2. I'll use disk2 for this example. Then unmount it so dd doesn't complain:

diskutil unmountDisk /dev/disk2

Making sure to replace disk2 with the disk you recorded.
You want to go to the directory that contains the Ubuntu image and do this command, but replace diskX with what I said earlier and ubuntu.iso with the iso image from Ubuntu:

dd if=ubuntu.iso of=/dev/diskX bs=2M

Then if you want to check the process, open another terminal and do pgrep -l ^dd$. Record the PID it outputs. Then do kill -INFO PID but replace PID with the PID that pgrep said.


I finally found that everytime I run cu or screen or minicom the hardware flow control, crtscts, gets switched on. If I turn off flow control while the session is running, I get to send again. I just need to find how to make it permanent.


right-click on Xubuntu home screen is slow, is it normal?

This seems to be related to application icons.

In Settings -> Desktop, go to the Menus tab, and unselect 'Show application icons in menu' under Desktop Menu.

This should instantly speed it up - you can toggle the setting back and forth and it changes in realtime to compare. I used to have this issue but after unticking it the menu appears instantly if you can live without the icons. They could do with caching them or something I guess.

Incidentally this doesn't affect the Applications menu on the panel. If you use that to launch stuff you could just turn off the entire Applications menu in the desktop menu to achieve the same speedup.


How do I export all the Python docs of a package and get it into Devhelp?

You can create HTML documentation of a python module using epydoc .

  Epydoc is a tool for generating API documentation for Python modules, based on their docstrings.

Here is how to use epydoc to create HTML documentation for the module quickly.widgets:

epydoc --html quickly.widgets -o quickly_widgets_doc

Once this finishes, open up quickly_widgets_doc/index.html in your web browser:

Or, if you would prefer this documentation in a PDF:

epydoc --pdf quickly.widgets --name "quickly.widgets" -o quickly_widgets_doc_pdf

This creates the file quickly_widgets_doc_pdf/api.pdf

More information on using epydoc here.

I haven't found a way to convert these to a format DevHelp can use, if I do I'll edit this answer.


Windows 10 upgrade kills grub and boot-repair doesn't help

I just had to run this in Windows as an administrator:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

Or, if you are using PowerShell:

bcdedit /set "{bootmgr}" path \EFI\ubuntu\grubx64.efi

GRUB appears fine on boot and I can boot into Ubuntu and Windows 10 fine.

As pointed out in the comments (by David Faure), the final argument to this command depends on your particular system configuration. You can use this command to determine the correct path for your system:

bcdedit /enum firmware

This will list all the installed boot managers and associated EFI paths, and grub should be somewhere in the list.


Kubuntu application-specific font dpi settings?

I found such a way, though it is not very clean. I simply changed the file /usr/share/tcltk/tk8.6/ttk/fonts.tcl on my system:

--- fonts.tcl.bk        2016-12-02 10:40:58.313926142 +0000
+++ fonts.tcl   2016-12-02 10:44:23.591285739 +0000
@@ -131,10 +131,10 @@
            set F(family) "Helvetica"
            set F(fixed)  "courier"
        }
-       set F(size) -12
-       set F(ttsize) -10
-       set F(capsize) -14
-       set F(fixedsize) -12
+       set F(size) 10
+       set F(ttsize) 9
+       set F(capsize) 12
+       set F(fixedsize) 10

        font configure TkDefaultFont -family $F(family) -size $F(size)
        font configure TkTextFont    -family $F(family) -size $F(size)

It seems that the defaults for X are given in pixels (negative numbers) rather than points (positive numbers), which is the root of the problem.


Firefox with Ubufox does not find plugins

I don't know whether previous versions of Ubuntu installed Flash automatically, but I doubt it. In any case, there's this answer: How can I install Adobe Flash player? You can also use Software Center instead of Synaptic.

For the Java plugin, search for "Java plugin" in Software Center or Synaptic, and you will find the Icedtea Java Plugin.


Can I get SSD rw performance while keeing data security if I combine SSD & HDD in RAID1

bcache and dm-cache can use a disk like a SSD as a writeback cache. flashcache and rapiddisk are interesting too. All of them add lots of complexity to your storage stack, if you don't know what you're doing you can easily lose data.

Honestly, for a general purpose OS workload, it's probably a complete waste of time. These sort of stacks are targeted at IO intensive applications like databases. If you're just trying to experiment I would suggest setting up a different data disk target so you can tinker without wiping out your operating system. Use fio or vdbench to measure your perf.


Same script opened in three different ways produces three different results. Why?

As we discussed in the chat:

sh script produces an error because calling the interpreter directly (in this case sh) ignores the shebang, and the script is run in sh; sh doesn't support process substitutions (<([...])), which are Bash-isms, so the script exits on error.

bash script doesn't produce an error because despite the shebang being ignored the script is still run in Bash, which supports process substitutions.

./script produces an error because script is not executable.
To run a script with ./ you must have the execute bit for your user set on the script, that's an OS' constraint.

So the question actually is: why doesn't bash script require  having the execute bit set for your user on script?

That's because when running bash script the script is read by Bash, and Bash has the execute bit set for your user.

That means that Bash, having the permission to execute code, can "bypass" the OS' constraint on that script, and all the script needs is to be readable by Bash.


How can I install a package from a different Ubuntu version via terminal?

You can do it by

wget http://mirrors.kernel.org/ubuntu/pool/universe/e/eigen3/libeigen3-dev_3.3~beta2-2ubuntu2_all.deb
sudo dpkg -i libeigen3-dev_3.3~beta2-2ubuntu2_all.deb

As simple as that.


How to debug corrupted files in ~/.config directory?

First thing to do on unknown errors is looking into the relevant log files to get some hints on what may cause the problems.

For system issues the syslog is usually a good place to start:

sudo less /var/log/syslog


Session frozen after an update and restart?

The standard Ubuntu Nvidia drivers generate some problems on slightly older and slightly newer Nvidia hardware.

If you want more then the standard Ubuntu repository drivers, install the xorg.edgers PPA.  As the xorg.edgers group ask not to give installation instructions directly without linking to their page, this is the best I can do.

If you don't know what a PPA is or need some guidance after reading their page, leave a comment below.


Need help connecting to the internet but the option to connect to networks is not even listed

Depending on the wifi chip set i would install windows wireless drivers http://jak-linux.org/projects/ndisgtk/ then mount your windows partition search for drivers wifi. The file your looking for is INF.wifi


multiple copies of VLC in top bar will not remove

I'm not quite sure but it's possible that the installation did not go according to plans, at least tht's what's happened to me with VLC.
I resolved with these steps:

Purge VLC
sudo apt purge < complete VLC Package name >

Update packages and install all the needed ones for your version
sudo apt update && sudo apt dist-upgrade

Re-install VLC
sudo apt install < complete VLC Package name >

If you installed with snap simply replace step 1 & 3 with corresponding snap commands.


What is the command to get my System Inormation?

I think you're looking for the dmidecode command.


Solution worked for me (copied from my personal manuals without modification).
I've got Lenovo T530 with Ubuntu 14.04; mainline kernel 3.14.9; nvidia-331-updates package installed (331.38-0ubuntu7).

=> suspend/resume works for me quite well.
=> I was solving also problem with resume after hibernation, and the solution: eject SD card from the laptop! :-|

My comments that worked for me (some months ago):

suspendResume_WORKING() {
# WIFI solution
# 1.) sudo vi /etc/pm/config.d/modules
# 2.) Replace SUSPEND_MODULES with this line:
#         SUSPEND_MODULES="$SUSPEND_MODULES uhci_hd button ehci_hd iwlwifi"

# SD card solution:
# 3.) Copy file from https://github.com/wschaub/T530-    settings/blob/master/pm/sleep.d/unmount_sdcard
#     to /etc/pm/sleep.d/unmount_sdcard
# 4.) chmod +x /etc/pm/sleep.d/unmount_sdcard

# ACPI solution:
# 5.) Replace lines in /etc/default/grub
#     GRUB_CMDLINE_LINUX_DEFAULT="noquiet nosplash acpi_osi=Linux acpi_backlight=vendor acpi_sleep=s4_nohwsig loop.max_part=63 loop.max_loop=64"
#     GRUB_CMDLINE_LINUX=""

# X.) sudo update-initramfs -u
# X+1.) sync; sudo reboot

}


You need to install firmware-b43-installer.

If you do not have an alternative internet connection, do it this way.

If you installed bcmwl-kernel-source, then remove it.

    sudo apt-get purge bcmwl-kernel-source

Download these files

http://mirrors.kernel.org/ubuntu/pool/main/b/b43-fwcutter/b43-fwcutter_015-9_amd64.deb
http://www.lwfinger.com/b43-firmware/broadcom-wl-5.100.138.tar.bz2

Copy them to your Ubuntu Home folder.
Run in terminal

sudo dpkg -i b43-fwcutter_015-9_amd64.deb
tar xfvj broadcom-wl-5.100.138.tar.bz2
sudo b43-fwcutter -w /lib/firmware broadcom-wl-5.100.138/linux/wl_apsta.o

Reboot or run:

sudo modprobe b43

Note: For 32-bit systems download http://mirrors.kernel.org/ubuntu/pool/main/b/b43-fwcutter/b43-fwcutter_019-2_i386.deb instead of amd64 and update the file name in the dpkg command.

For Ubuntu 16.04 http://mirrors.kernel.org/ubuntu/pool/main/b/b43-fwcutter/b43-fwcutter_019-2_amd64.deb should be installed or the i386 alternative.

If you are having trouble finding another computer, an Android phone can be used as a USB modem. You can connect the phone and choose "USB modem" in settings.


Bash, sed, remove last line for every cycle

If your input file has an empty line before every ## line and only there, you can specify an empty line as the end of your range:

sed -n '/## bash, file, re/,/^$/p' bash.kb

^$ matches a line that has the beginning (^), the end of the line ($) and nothing in between.


How do I upgrade my g++, C++11 features do not work

g++ does support c++11, but it is experimental, hence you have to enable it with the option -std=gnu++11. You don't need to upgrade g++, you can't, because you are already running the latest version.

So you will compile using a command like

g++ -std=gnu++11 ./source_file.cpp

You may also try the clang compiler, as it has better c++11 support than g++. To install it, run

sudo apt-get install clang-3.5

Do read Status of Experimental C++11 Support in GCC 4.8 and C++ Support in Clang.


lsof does not detect reading images and video files for thumbnails

lsof

lsof shows only the currently used resources. By using sudo lsof | grep -E "filename" you only get a under sampled result. Executing the lsof in exact the right time to catch the fopen from nautilus is coincidental at best.

inotifywait and inotifywatch

To watch IO use inotifywait or inotifywatch. Select the events and file or folder you are interested in.

$ inotifywait --recursive --monitor /tmp/test
Setting up watches.  Beware: since -r was given, this may take a while!
Watches established.
/tmp/test/ CREATE new.file
/tmp/test/ OPEN new.file
/tmp/test/ ATTRIB new.file
/tmp/test/ CLOSE_WRITE,CLOSE new.file


Skype Video flicker and stays on top - ubuntu 15.10

I've found the solution. Skype use xvideo extension, and does not provide an option to switch to another.
Try this config
https://github.com/linuxenko/ubuntu-skylake-i915-video-fix


What location is recommended for installing Tor from sources?

Inside the home directory there are very little recommendations, about what to put where. In this particular case it's completely up to you. I would discourage you to put it in /opt.

The only 'standardized' folders of my knowing inside /home/$USER are .local .config and .cache. Like all hidden folders in /home/$USER - those with a dot infront - they hold user specific application settings and files. They can be shown in nautilus by pressing Ctr-h.

I would recommend to make the TorBrowser folder also an hidden one by editing it after unwrapping. After the first start of Tor Browser Bundle, dump a copy of the Start TorBrowser file to ~/local/share/applications/ this will allow you to find the TorBrowser in your application menu (unity,gnomeshell-activity, etc) and if running will display it as TorBrowser and not Firefox. Inside a terminal this can be done, after moving inside the TorBrowser folder via cp start-tor-browser.desktop ~/.local/share/applications/start-tor-browser.desktop.

As TorBrowser saves it's downloads inside it's own folder I made a bookmark inside nautilus called Townloads, for easier access.


Allowing access to my server's UDP ports when the server is connected to OpenVPN

If I understood what you are trying to achieve, you are try to do NAT from a VPS and forward TCP and UDP port to a local network reachable through a VPN tunnel (OpenVPN). This is probably not working due a routeback issue, your local network is probably configured to reach internet without using OpenVPN connection, so traffic coming from your NAT will not answering to your VPS.

What you can try is proxying your traffic over a service (like nginx). Here an example.

Install Nginx (on your VPS):

apt install nginx

Create a new folder dedicated for your port rules

mkdir /etc/nginx/ports/

Add the following lines to the end of the file /etc/nginx/nginx.conf

stream {
  include /etc/nginx/ports/*;
}

Finally create any file you want with your rules, into this new folder. Here an example of tcp and udp redirect.

server {
  listen 1234;
  proxy_pass <computer-ip>:1234;
}

server {
  listen 1234 udp;
  proxy_pass <computer-ip>:1234;
}

Of course, port 1234 must be opened in your ufw as your mentioned.


What does "upgrade volume detected" mean when creating a bootable usb stick?

When you mount a CD or USB device that has an Ubuntu OS on it (either the same version or a newer, I think), Ubuntu will detect it and offer to upgrade. So, my guess is that after you create the bootable USB or CD, it gets automatically mounted, and Ubuntu goes through the normal detection routine.

You can confirm this by unmounting, then reinserting the device to see if you get the same message.


How to get avast! on computer after getting the download?

Graphical way

Double click the file. It should open in the Ubuntu Software Centre.
Click the 'Install' button near the top right corner.
Type your account password if required.
Wait for it to be installed.
Run it from the Dash.

Command-line way
Do the following (from Goldentoa11's comment):

Open a terminal (Ctrl+Alt+T).

Execute the following command (substituting the correct path to the file):
 dpkg -i "/path/to/file.deb"

For future reference, all files ending in .deb can be installed either way.
Note: As said in the comments, you'll need a serial number from the avast! website first.


Virtualbox 4.X not working on Ubuntu 15.10

Use the most recent version of VirtualBox - currently version 5.0.8 - available for Wily as of now.

First you have to remove every VirtualBox related software you already had installed before.

sudo apt-get purge  "^virtualbox-.*"
sudo apt-get autoremove

Then download and register the ORACLE public key:

wget -q -O - https://www.virtualbox.org/download/oracle_vbox.asc | sudo apt-key add -

Add the VirtualBox repository to software sources :

echo "deb http://download.virtualbox.org/virtualbox/debian wily contrib" | sudo tee /etc/apt/sources.list.d/oracle-vbox.list

Now install VirtualBox :

sudo apt-get update
sudo apt-get install virtualbox-5.0

Download the matching Extension Pack from VirtualBox website -  add it manually in Preferences.

Note for other users reading this answer, in case they use another Ubuntu edition as 15.10 :

You have to replace wily with the Ubuntu edition you are using when adding the repository !

As of Ubuntu 16.04 the ORACLE public key to download and register has  changed :

oracle_vbox.asc has to be replaced with oracle_vbox_2016.asc !


How can I configure two monitors with different dpis and sizes so that text sizes are the same?

The closest I have come to this is still using xrandr (display scaling). This is what I ran:

xrandr --output "DisplayPort-0" --auto --pos 3456x0 --scale 1x1  --output "DisplayPort-1" --auto --scale 1.8x1.8 --pos 0x0

Here's a more readable version:

xrandr
    --output "DisplayPort-0"
        --auto
        --pos 3456x0
        --scale 1x1
    --output "DisplayPort-1"
        --auto
        --scale 1.8x1.8
        --pos 0x0

Both my monitors are plugged in to DisplayPorts, with the 27" 3840x2160 monitor being DisplayPort-0 and the 24" 1920x1200 monitor being DisplayPort-1.

I scaled up the smaller monitor to be the same height as the bigger one by using a scaling factor of 1.8.

2160 / 1200 = 1.8.

This means that the mouse moves between the two displays seamlessly without getting caught in any edges. Use of full-display scaling means the text looks like font smoothing is turned off (although still readable), so I really hope someone comes up with a way to do per-display font scaling, but until then, this will suffice.

The only other calculation I had to do was to find the offset of the bigger display so as to move it to the right of the smaller one. After scaling, the smaller monitor has a resolution of 1.8 times its original resolution of 1920, which is (1920 x 1.8 =) 3456.

Edit: Forgot to mention, I've also used the accessibility setting for large text, so that the text on the larger monitor doesn't require squinting. But without the scaling above, this makes the text on the smaller monitor too large.


Is Apache server part of default installation?

Apache is not part of default Ubuntu installation, you had to install it manually. If you don't use it, you should remove it.


Dovecot IMAP (port 143) not working with SASL while Postfix (port 25) is

While I could not get around the SASL issue ... for other modules that do not support SASL; PAM is used.

I integrated PAM with LDAP (pam_ldap.so). If you have PAM also using LDAP successfully then you can avoid having to rely only on SASL.

Not the desirable solution but an effective and logical workaround.


Pairing two mirror tables that each have "holes" in them

1) Create 2 helper columns containing the shared term split out from each of the two columns. Here is an example that uses data in column A and the separator being ^ instead of a bullet

=LEFT(A1,FIND("^",A1)-1)

2) Find the matches uses index(match()). This assumes your data columns are A and C and your helper columns are B and D.

=INDEX(C:C,MATCH(B1,$D$1:$D$5,0))

3) (Optional) Non-matches will show as #N/A. If you want you can handle that by surrounding the index(match()) with the following to make the non-matches blank cells

=IFERROR(<formula from 2>, "")

Possible Error Handling: It looks like your data may contain whitespace. If the index(match()) isn't returning a bunch of matches then it is likely due to mismatching whitespace. To handle this you can surround the formulas from part 1 in the following to remove both leading and trailing whitespace

=TRIM(<formula from 1>)

(Solution provided by FleetAdmiralFader link to OP)


Can't boot into Ubuntu with Windows 8.1 installed

I had a similar problem, what I did was download easybdc(bcd?) and added linux - grub 2 - ubuntu to the list :)


timedatectl: Failed to create bus connection: No such file or directory

This is caused by the container not having access to the system_bus_socket on the host. You need to run your container with:
docker run -ti -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket:ro imagename /bin/bash

Then you'll be able to use the timedatectl command.


Linux clone encrypted drive to smaller drive

I'm going to answer the question myself, but a general note:
Maybe its fastest just to start from scratch, the steps are complicated and timeconsuming!

Make Backup using your favourite disk cloning/backup tool
Follow the Ubuntu Wiki Article about ResizeEncryptedPartions
Make sure the partitions matches exactly the size of your smaller disk (so the free space after the last partition is unallocated)
clone your disk using dd until that exact size

Detailed

/dev/sda is my current disk I want to shrink
/dev/sdb is my new disk
Use your exact values for your disk sizes, block sizes and so on, my calculations are only a little clue how I did it.
be careful with the options parameter (e.g. b sometimes means bytes, sometimes means blocks and so on). Always check man-page first.
Check the linked article above for some additional informations about sensible steps

Boot livecd, load modules, decrypt your disk, discover partitions:

sudo modprobe dm-crypt
sudo cryptsetup luksOpen /dev/sda5 crypt1
sudo vgscan --mknodes
sudo vgchange -ay

print out your current partition layout with sizes in bytes:

ubuntu@ubuntu:~$ lsblk -b

NAME                               MAJ:MIN RM         SIZE RO TYPE  MOUNTPOINT
sda                                  8:0    0 250059350016  0 disk
├─sda1                               8:1    0    254803968  0 part
├─sda2                               8:2    0         1024  0 part
└─sda5                               8:5    0 249802260480  0 part
  └─crypt1 (dm-0)                  252:0    0 249800163328  0 crypt
    ├─elementary--vg-root (dm-1)   252:1    0 247757537280  0 lvm
    └─elementary--vg-swap_1 (dm-2) 252:2    0   2038431744  0 lvm
sdb                                  8:16   0 120034123776  0 disk
└─sdb1                               8:17   0 120034091520  0 part  /media/ubuntu/ff08402

We need to know, which size the new root partition should have, we do some calculation:

find how much space is used without root:
  250059350016
- 247757537280
=   2301812736

calculate new wished size from the new disk:
  120034123776
-   2301812736
= 117732311040

Since we can specify it only in kibibytes, we divide it by 1024
  117732311040
/         1024
=    114972960

Resize your partition using resize2fs (I'm having ext4):

sudo resize2fs -p /dev/mapper/elementary--vg-root 114972960k

Set the logical volume to the calculated size:

sudo lvreduce -L 114972960k /dev/mapper/elementary--vg-root

Print the new partition setup, we need some values from there:

ubuntu@ubuntu:~$ lsblk -b
NAME                               MAJ:MIN RM         SIZE RO TYPE  MOUNTPOINT
sda                                  8:0    0 250059350016  0 disk
├─sda1                               8:1    0    254803968  0 part
├─sda2                               8:2    0         1024  0 part
└─sda5                               8:5    0 249802260480  0 part
  └─crypt1 (dm-0)                  252:0    0 249800163328  0 crypt
    ├─elementary--vg-root (dm-1)   252:1    0 117734113280  0 lvm
    └─elementary--vg-swap_1 (dm-2) 252:2    0   2038431744  0 lvm
sdb                                  8:16   0 120034123776  0 disk
└─sdb1                               8:17   0 120034091520  0 part  /media/ubuntu/ff08402

We need to know, which size the new crypt1 partition should have, we do some calculation:

Calculate difference between logical volume sizes and crypt1 (from before we made any changes):
    2038431744
+ 247757537280
= 249795969024

  249800163328
- 249795969024
=      4194304

calculate the new crypt1 size (with the new changes):
    2038431744
+ 117734113280
+      4194304
= 119776739328

later we need the crypt1 size in blocks:
  119776739328
/          512
=    233938944

Before we can reduce the crypt volume, check if volumes are in order:

ubuntu@ubuntu:~$ sudo pvs -v --segments /dev/mapper/crypt1
    Using physical volume(s) on command line
  PV                 VG            Fmt  Attr PSize   PFree   Start SSize LV     Start Type   PE Ranges
  /dev/mapper/crypt1 elementary-vg lvm2 a--  232.64g 121.09g     0 28070 root       0 linear /dev/mapper/crypt1:0-28069
  /dev/mapper/crypt1 elementary-vg lvm2 a--  232.64g 121.09g 28070 31000            0 free
  /dev/mapper/crypt1 elementary-vg lvm2 a--  232.64g 121.09g 59070   486 swap_1     0 linear /dev/mapper/crypt1:59070-59555

No, they're not, so I needed to move swap to best free space (actually means to block 28070):

sudo pvmove --alloc anywhere /dev/mapper/crypt1:59070-59555

And recheck your allocation so the free space is in the end:

sudo pvs -v --segments /dev/mapper/crypt1

set the new volume size for crypt1

sudo pvresize --setphysicalvolumesize 119776739328b /dev/mapper/crypt1
sudo cryptsetup -b 233938944 resize crypt1

Continue with the partition table, for that unload the encrypted partition:

sudo vgchange -an
sudo cryptsetup luksClose crypt1

Print out and note somewhere your current partition table layout:

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00082d72

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758   488396799   243947521    5  Extended
/dev/sda5          501760   488396799   243947520   83  Linux

We need to know, which size the new partition table should have, we do some calculations again:

reverse engineering blocks setup from current /dev/sda:
     243947521
*         1024
-         1024
= 249802260480

size of other uses:
  250059350016
- 249802260480
=    257089536

size for the new disk:
  120034123776
-    257089536
= 119777034240

blocks for new disk:
  119777034240
+         1024
/         1024
=    116969761

calculating end sector with new size:
     488396799
+            1
-       501758
/            2
=    243947521

     116969761
*            2
+       501758
-            1
=    234441279

Now we can redefine the partition table with the new sizes:

ubuntu@ubuntu:~$ sudo fdisk /dev/sda

Command (m for help): d
Partition number (1-5): 5

Command (m for help): d
Partition number (1-5): 2

Command (m for help): n
Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p): e
Partition number (1-4, default 2):
Using default value 2
First sector (499712-488397167, default 499712):
Using default value 499712
Last sector, +sectors or +size{K,M,G} (499712-488397167, default 488397167): 234441279

Command (m for help): n
Partition type:
   p   primary (1 primary, 1 extended, 2 free)
   l   logical (numbered from 5)
Select (default p): l
Adding logical partition 5
First sector (501760-234441279, default 501760):
Using default value 501760
Last sector, +sectors or +size{K,M,G} (501760-234441279, default 234441279):
Using default value 234441279

Command (m for help): p

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00082d72

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          499712   234441279   116970784    5  Extended
/dev/sda5          501760   234441279   116969760   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Small Test: try to load the new encrypted volume (or reboot without livecd) and check if you can access data (If you cant, you made an error somewhere and need to restart using your backup):

sudo cryptsetup luksOpen /dev/sda5 crypt1
sudo vgscan --mknodes
sudo vgchange -ay

Check if your calculations were correct by comparing the end block with the block size of your smaller disk:

ubuntu@ubuntu:~$ sudo fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00082d72

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          499712   234441279   116970784    5  Extended
/dev/sda5          501760   234441279   116969760   83  Linux

ubuntu@ubuntu:~$ sudo fdisk /dev/sdb

Command (m for help): p

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f335e

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   234441647   117220792+  83  Linux

recheck your calculations with the new partition table:

/dev/sda total - sda5 end-block (in the beginning):
  488397168
- 488396799
=       369

/dev/sdb total - sda5 end-block (after shrink):
  234441648
- 234441279
=       369

were good to go, exactly the size we want. so next step is to dd from 0 to 234441648 (= total size of /dev/sdb)

sudo dd if=/dev/sda of=/dev/sdb bs=1b count=234441648

And you're ready, shrink complete. This dd command will take some time and you don't see any output. In my case it ran around 6 hours.


Mount the ISO file and on it is it's own wubi installer. Use that.


Ubuntu hangs after login following upgrade 18.04 -> 20.04

There was some combination of updating nvidia drivers, removing the word 'splash' from /etc/default/grub, and
sudo apt-get purge chrome-remote-desktop

Things started working after the last.


Remote Access to Ubuntu (as guest OS) from Linux Mint (as host OS) in VirtualBox with ssh

Password auth is disabled on the SSH server by default. You first have to enable it. See: https://help.ubuntu.com/community/SSH/OpenSSH/Configuring

If the problem continue to exist, examine the sshd log file first.

Also note that you have to provide your login name, not the server name:
ssh -v -Y username@192.168.56.1


I set permission with chmod, but files created later don't have the same permissions

Tip #1
Please don't give 777 permissions. There is (I think) always a better solution. It's very unsafe to give all permissions (especially write permission) to all users. If you need to grant permissions to specific user(s) or program(s), there are safe ways to do that
Tip #2
To set permissions on files that will be created in the future, you can't use chmod (although there is a permission bit called set-group-id  (chmod g+s) which causes group ownership to be usefully inherited by subdirectories). You use umask for that.
Tip #3
However, fortunately, there is no umask setting so permissive as to grant 777 permission; in fact no umask setting will create executable files, for security reasons...
Tip #4
... which hints that the -R flag to chmod is not very useful, since we usually want directories to have execute permission, but we rarely want files to have execute permission. I advise you not to use recursive chmod unless you know exactly what is in the directory and are sure (ie you are making a well-informed choice) that you want to give those permissions to all of it.


When exactly will the App Showdown stop accepting submissions?

I would definitely submit before the deadline, given the errors people seem to be having with packaging/uploading.

In any case, even if your submission goes through, after say 1200 UTC on July 10, 2012 (to account for time zone differences), the App Review Board can simply decline to consider it since it was late.


13.10: how to set accelerator to select keyboard layout rather than switching to next/previous?

This command will set layout to the first one:

gsettings set org.gnome.desktop.input-sources current 0

You can use tweak tools, gnome action, compiz action plugin..etc to create a keyboard shortcut for it.

Layouts are indexed starting from 0. So you can make shortcut for any layout in the list.

You can use this to create complex script for last layout without giving an index:

 gsettings get org.gnome.desktop.input-sources sources

Like:

 gsettings set org.gnome.desktop.input-sources current $(($(gsettings get org.gnome.desktop.input-sources sources | grep -Po "'[[:alpha:]]+'\)" | wc -l)-1))


apt-get Could not connect to a weird IP/port, why?

This is most likely due you using a proxy, you can check using:

sudo apt-get -o Debug::Acquire::http=true update

This will give you more hindsight. You can check your configuration files for some proxy configured:

grep -i proxy /etc/apt/apt.conf.d/* /etc/apt/apt.conf

If none is found, check your Network Settings in the GUI and your environmental variables:

echo $http_proxy $HTTP_PROXY

Depending where you find it, you must unconfigure it. There could be also that the servers are down but since you changed server is difficult this happen.


Ignoring specific unmet dependencies with aptitude?

EDIT: Ok, as noted below, the "rejecting the removal..." thing in aptitude does not work - this is what did manage to work for me, though...

While looking for, say, Package: ipe, one may hit files such as:

$ grep -r 'Package: ipe' /var/lib/apt/lists/
...
/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty_universe_binary-i386_Packages:Package: ipe
...
/var/lib/apt/lists/old-releases.ubuntu.com_ubuntu_dists_natty_universe_binary-i386_Packages:Package: ipe
...

... however, these are not right - apparently, the runtime information for apt-get etc. is stored in /var/lib/dpkg/status ( via How do I fix a "Problem with MergeList" or "status file could not be parsed" error when trying to do an update? ).

So, I opened that file via sudo nano /var/lib/dpkg/status, and looked up "Package: ipe", and then tried to comment the texlive-latex-base portion of "Depends:" - first by putting it in a separate line, at commenting it with a number sign/hash #. Note that this does not work - first you'll get errors like:

dpkg: error: parsing file '/var/lib/dpkg/status' near line 8140 package 'ipe':
 field name `#,' must be followed by colon
E: Sub-process /usr/bin/dpkg returned an error code (2)

... then if you try to add that colon, as in #:, you'll get:

dpkg: error: parsing file '/var/lib/dpkg/status' near line 8141 package 'ipe':
 user-defined field name `#' too short
E: Sub-process /usr/bin/dpkg returned an error code (2)

Apparently, these files do not use comments; and they seem to be documented in Debian Policy Manual - Control files and their fields. Then I found:

#353040 - [DPKG-DEB] don't be so noisy about user defined fields in DEBIAN/control - Debian Bug report logs

  The right way to include a field in the .deb is to use
  fields named "XB-*".

... so, basically, instead of using a comment character to "comment out" - I just used an user-defined field, instead, which I arbitrarily called XB-Ignore:; so that portion of /var/lib/dpkg/status ended up looking like this:

Package: ipe
...
Depends: libc6 (>= 2.4), libcairo2 (>= 1.2.4), libgcc1 (>= 1:4.1.1), libipe7.0.10, liblua5.1-0, libqtcore4 (>= 4:4.6.$
XB-Ignore: , texlive-latex-base, gsfonts
...

With this change saved, I could perform the install using apt-get directly, without a problem:

$ sudo apt-get install dropbox
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  python-gpgme
The following NEW packages will be installed:
  dropbox
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 0 B/93,0 kB of archives.
After this operation, 410 kB of additional disk space will be used.
Selecting previously deselected package dropbox.
...
Setting up dropbox (1.6.1) ...
Processing triggers for menu ...

I'll just note that /var/lib/dpkg/status is not a persistant file - in fact, right after the apt-get install, if you check the file again, Depends: and XB-Ignore: will no longer be on neighboring lines (as they were originally, as shown on the snippet above)!

While the question on ignoring the unmet dependency is still open noted above - it turns out I did misinterpret what these "new solutions" are: it is the choices you're offered by aptitude if you answer "no" to the "Accept this solution?" question:

...
The following packages have unmet dependencies:
  ipe: Depends: texlive-latex-base but it is not going to be installed.
The following actions will resolve these dependencies:

     Remove the following packages:
1)     ipe

Accept this solution? [Y/n/q/?] r 1
Rejecting the removal of ipe
The following actions will resolve these dependencies:

     Remove the following packages:
1) R   ipe

Accept this solution? [Y/n/q/?] n                      # <==== here not accepting above solution
The following actions will resolve these dependencies: # <==== new solution offered here:

      Install the following packages:
1)      lmodern [2.004.1-3 (natty)]
2)      luatex [0.65.0-1ubuntu3 (natty)]
3)      tex-common [2.09 (natty)]
4)      texlive-base [2009-11 (natty)]
5)      texlive-binaries [2009-8ubuntu2 (natty)]
6)      texlive-common [2009-11 (natty)]
7)      texlive-doc-base [2009-2 (natty)]
8)      texlive-latex-base [2009-11 (natty)]
9)      texlive-latex-base-doc [2009-11 (natty)]
10)     texlive-luatex [2009-11 (natty)]

Accept this solution? [Y/n/q/?] r 1
Rejecting the installation of lmodern version 2.004.1-3 (natty)
The following actions will resolve these dependencies:

      Install the following packages:
1)  R   lmodern [2.004.1-3 (natty)]
2)      luatex [0.65.0-1ubuntu3 (natty)]
...

Accept this solution? [Y/n/q/?] r 10
Rejecting the installation of texlive-luatex version 2009-11 (natty)
The following actions will resolve these dependencies:

      Install the following packages:
1)  R   lmodern [2.004.1-3 (natty)]
2)  R   luatex [0.65.0-1ubuntu3 (natty)]
3)  R   tex-common [2.09 (natty)]
4)  R   texlive-base [2009-11 (natty)]
5)  R   texlive-binaries [2009-8ubuntu2 (natty)]
6)  R   texlive-common [2009-11 (natty)]
7)  R   texlive-doc-base [2009-2 (natty)]
8)  R   texlive-latex-base [2009-11 (natty)]
9)  R   texlive-latex-base-doc [2009-11 (natty)]
10) R   texlive-luatex [2009-11 (natty)]

Accept this solution? [Y/n/q/?] n
*** No more solutions available ***

The following actions will resolve these dependencies:

      Install the following packages:
1)  R   lmodern [2.004.1-3 (natty)]
2)  R   luatex [0.65.0-1ubuntu3 (natty)]
3)  R   tex-common [2.09 (natty)]
4)  R   texlive-base [2009-11 (natty)]
5)  R   texlive-binaries [2009-8ubuntu2 (natty)]
6)  R   texlive-common [2009-11 (natty)]
7)  R   texlive-doc-base [2009-2 (natty)]
8)  R   texlive-latex-base [2009-11 (natty)]
9)  R   texlive-latex-base-doc [2009-11 (natty)]
10) R   texlive-luatex [2009-11 (natty)]

Accept this solution? [Y/n/q/?] y
The following NEW packages will be installed:
  dropbox lmodern{a} luatex{a} tex-common{a} texlive-base{a} texlive-binaries{a} texlive-common{a}
  texlive-doc-base{a} texlive-latex-base{a} texlive-latex-base-doc{a} texlive-luatex{a}
The following partially installed packages will be configured:
  ipe
0 packages upgraded, 11 newly installed, 0 to remove and 1 not upgraded.
Need to get 87,4 MB of archives. After unpacking 181 MB will be used.
Do you want to continue? [Y/n/?] n
Abort.

So yeah - if I keep on rejecting all solutions, at the end I'll get "*** No more solutions available ***", and aptitude can either go with those solutions, or abort - but unfortunately cannot ignore them with this technique...


How to switch keys symbols on holding ALT?

I edited the English (US) keyboard layout like this:

$ diff /usr/share/X11/xkb/symbols/us.orig /usr/share/X11/xkb/symbols/us
26,28c26,28
<     key <AD07> {  [     u,    U       ]   };
<     key <AD08> {  [     i,    I       ]   };
<     key <AD09> {  [     o,    O       ]   };
---
>     key <AD07> {  [     u,    U, 7        ]   };
>     key <AD08> {  [     i,    I, 8        ]   };
>     key <AD09> {  [     o,    O, 9        ]   };
39,41c39,41
<     key <AC07> {  [     j,    J       ]   };
<     key <AC08> {  [     k,    K       ]   };
<     key <AC09> {  [     l,    L       ]   };
---
>     key <AC07> {  [     j,    J, 4        ]   };
>     key <AC08> {  [     k,    K, 5        ]   };
>     key <AC09> {  [     l,    L, 6        ]   };
51,53c51,53
<     key <AB07> {  [     m,    M       ]   };
<     key <AB08> {  [     comma,    less        ]   };
<     key <AB09> {  [    period,    greater     ]   };
---
>     key <AB07> {  [     m,    M, 1        ]   };
>     key <AB08> {  [     comma,    less, 2     ]   };
>     key <AB09> {  [    period,    greater, 3      ]   };
56a57,58
>
>     include "level3(ralt_switch)"

That way I can type numbers like this:

Right Alt+U -> 7

Right Alt+K -> 5

etc.

The line

include "level3(ralt_switch)"

enables the third level mechanism; in this case Right Alt which is default for those keyboard layouts which make use of third and fourth level symbols, but it can be changed.


Ubuntu desktop only loads GTK theme after second login

your GTK must be messed up because your GTK theme shouldnt be messed up because when i log in to ubuntu i can see my GTK theme clearly with square shapes or anything the only worst case scenario  would be that a hacker logged into your cpu and this is just guessing im guessing that he uploaded an invisible software and thats what made your GTK all messed up. im sorry to hear this :< if your computer changes let me know


I think that you can do that using iptables.  A rule in IP table should do it, but I think that the NIC in question has to have a IP assigned to it.  Try this, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

iptables -A PREROUTING -p tcp --dport xxxx -i eth1

Replace xxxx with the port number.  For more info on iptables see the Manpage


I accidentally purged python2.7, can you help me restore?

In Ubuntu 16.04 reinstall python2.7 and all of the purged packages that depends on python2.7. Open the terminal and type:
sudo apt install python-all
sudo reboot
sudo apt install python-wnck python-gnome2 python-six libgcj16 python-tdb python2.7-dev python-pymysql vprerex python-vte gvfs-backends python-samba steam-launcher python-xdg vlc-plugin-samba python-markupsafe python-pycurl python-zmq libcairo2-dev python-dnspython python-keybinder python-gi samba samba-dsdb-modules libatspi2.0-dev python-dbus python2.7 python-appindicator jackd2 texlive-lang-indic python-cairo python-chardet python-gobject python-notify texlive-pictures prosper libsdl2-dev python python-lxml guake python-pexpect texlive-xetex texlive-latex-extra python-talloc samba-libs python-crypto libpango1.0-dev gcj-5-jre-lib gimp texlive-music m64py python-ptyprocess python-jinja2 prerex texlive-full libgtk-3-dev arronax libjack-jackd2-0 libjack-jackd2-0:i386 python-pkg-resources libpulse-dev python-html5lib python-all python-apt inkscape samba-vfs-modules libglib2.0-dev python-bs4 arronax-base texlive-pstricks hamster-applet python-dev python-pyorbit zenmap python-setuptools libsmbclient libgdk-pixbuf2.0-dev samba-common-bin libasound2-plugins:i386 hamster-indicator python-gtk2 pdftk python-decorator texlive-formats-extra ipython python-gconf jackd2-firewire python-wheel texlive-science ndiff python-ldb python-gobject-2 python-glade2 libgcj-common python-nautilus libatk1.0-dev libatk-bridge2.0-dev python-numpy python-tornado python-pip python-simplegeneric arronax-nautilus python-all-dev ipython-notebook

In Ubuntu 18.04 these commands would not work because 11 of the packages in the 3rd command are no longer available from the default Ubuntu repositories.


17.04 How to set default window screen position

To fix scenario #3...

Hold down the ALT key on the keyboard, then left-click-hold-drag the mouse pointer in an open space of the window that's hidden under the top panel. Drag the window to the desired position.

Another solution would be to install Compiz Config Manager, and configure the Place Windows pane to put the windows where you'd like them permanently.

sudo apt-get update
sudo apt-get install compizconfig-settings-manager


How can I save notes created by indicator-stickynotes?

Indicator-stickynotes does save your notes on reboot.

Upon reboot, open sticky notes using dash.

After that you will get an icon for sticky notes in top bar. Click on that icon and select Show All option and all the sticky notes will appear on screen.


Playing a video at first boot after OEM install?

You can place a script in the /etc/init.d directory like such:

#!/bin/bash

totem /path/to/file
sleep 120
# 120 is the number of seconds you think the video will run for
rm $0

Save this in say ~/welcome.sh.
chmod +x ~/welcome.sh
sudo cp ~/welcome.sh /etc/init.d/welcome.sh

/etc/init.d is the place where all startup scripts may be placed.
totem is the name of the default video player on Ubuntu.
rm $0 will remove the file we just wrote so that it runs only once.


How do I extract .bin files into the original files?

A good solution would be bchunk, also called BinChunker, which is available for both, Linux and Unix.

You can install it via Terminal: sudo apt-get install bchunk

Usage: bchunk [-v] [-r] [-p (PSX)] [-w (wav)] [-s (swabaudio)] (bchunk man page)

Example:

  bchunk foo.bin foo.cue foo
        -v  Verbose mode
        -r  Raw mode for MODE2/2352: write all 2352 bytes from offset 0 (VCD/MPEG)
        -p  PSX mode for MODE2/2352: write 2336 bytes from offset 24
            (default MODE2/2352 mode writes 2048 bytes from offset 24)
        -w  Output audio files in WAV format
        -s  swabaudio: swap byte order in audio tracks

Please refer to the link above, for more information and if you come across any problems, please edit your post and i'll get back to you!


note: you will need to enable the universe repository

Ubuntu has at least two OBD scan tool software packages available.  You may be able to use one of these instead of the proprietary versions for your scanner.

Open a terminal and execute the following commands to install the software:

sudo apt-get update
sudo apt-get install scantool obdgpslogger

To run the software, just search for scantool or run the following command in a terminal:

scantool &

I found this software using the following command to search:

apt-cache search obd

I found some more info and will post more later as I find out more info.

Run the following command to use the obdgpslogger GUI:

obdgui &

More helpful info:

man obdgpslogger

I took a look at the video and I see there are some differences between his terminal commands and the ones you would need to run.

First, unplug the device from your computer and run the following command:

ls /dev/tty*

This will list a whole bunch of stuff that does not matter.

Next, plug the device into your computer and then run the following command:

ls /dev/tty*

Now, you should see the same stuff listed and also the device should be listed as well.


You can set line the guest ok = yes for your printers and devices in /etc/samba/smb.conf to let non-authenticated users access it. If your samba server is behind a firewall, that should be safe enough.

However, adding users to your samba server is done via the smbpasswd command, use sudo smbpasswd -a <username> to create their samba-login.


How to move $HOME to an encrypted partition?

There are two popular options to encrypt the data in your home folder:

using an encrypted block device between the physical disk and your filesystem: This method is known as encrypted partition, (full) disk encryption, LUKS or dm-crypt.

The filesystem /home, /home/user or /path/to/sensitive/data will be stored in the encrypted block device. Before mounting the filesystem, typically early in the boot process, the system will ask for the password.

This method typically requires to change the partition layout and is often used with LVM. If you want to go this route, I recommend finding a good tutorial (up-to-date with your Ubuntu version).
using an encrypted filesystem on top of your normal filesystem. This method is known as ecryptfs or "Private" directory.

For this setup, the existing partition table and filesystems are left untouched. The data, which should be encrypted, will be routed through the ecryptfs filesystem driver.

Your system should already feature a Private directory, which works like this.

Typically, your login password is used to generate the encryption password. In this case, you only have to type in the password once at the normal login prompt. The encryption "just works" transparently.

You can use ecryptfs for your whole home directory. It's straightforward if you create a new user at the command line.

adduser --encrypt-home newusername

creates an encrypted home directory for newusername.

The wiki provides more information on this method.

As @dAnjou realized, there exists a script to enable ecryptfs for an existing user.

Since ecryptfs works upon a filesystem, it does not matter, where the data is physically stored. Depending on the Ubuntu version or setup procedure, some ecryptfs meta data resides in /var/lib/ecryptfs. Mounting /home on external storage is possible and compatible with ecryptfs.


USB Media stopped working from one day to the next on 2 PCs (Ubuntu 14.04)

USB sticks and android phones are two very different beasts from the OS's perspective. Phones use mtpfs in order to connect to the OS, while usb sticks work as normal storage media. Try to mount them manually.mount /dev/sdb1 /mnt && nemo /mnt
See if it works. when you're done umount /mnt


Seems like what you wanna do, is changing the motd (Message of the day).

Have a look at this to get some ideas of how the overall motd works under Ubuntu.
This one can also give you some ideas.


External monitor speakers not working via usb-c

I had the same problem with Ubuntu 18.04 and that monitor. No sound from the monitor when connecting with a USB C or HDMI cable. Worked fine with Windows. Running aplay -l didn't even show anything other than the laptop speakers.

But after rebooting both the laptop and the monitor, aplay -l started showing more:

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC257 Analog [ALC257 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Then I ran pavucontrol and went in the Configuration tab and picked the profile for "Digital Stereo (HDMI 2)" output and analog input. That did the trick. A whole bunch of other profiles were listed , but none of them seemed to do any good.


Quantal (12.10) Gnome 3.7.1: User Shell extension not enabled

You are using the testing release of gnome3 (ppa:ricotz/testing) which will generally not be compatible with extensions.  In order to downgrade to gnome 3.6, you will have to purge the ricotz/testing ppa with sudo ppa-purge ppa:ricotz/testing.  Then you will have to reinstall gnome shell from the standard gnome3 repository (ppa:gnome3-team/gnome3).  Note that at the moment, the content of these two repositories is roughly the same as gnome 3.6 came out less than a month ago.


Beats audio 4 speakers + subwoofer not working on DV7 6165us and Ubuntu 12.04

Beats Audio is just a brand name that stands for nothing in particular when talking about laptops and especially Linux. You just happen to have an audio chip that is supported by ALSA (Advanced Linux Sound Architecture), but runs an unusual general configuration or speaker configuration.

Have you looked into the sound menu? There should be an option to change the mode, it is probably just set to stereo while higher modes are available.

If that doesn't fix your issue you should run alsamixer in terminal and check the options there.

You could also try the newer quantal kernel from the linux-image-generic-lts-quantal package that, should come with a newer version of ALSA.


This question on Stack Overflow should answer your question. To summarize,

Go to Preferences →  Key Bindings
In the User keymap file, add a key combination for toggling between the visibility of tabs, as

{ "keys": ["<some key combination>"], "command": "toggle_tabs" }

Further details, including identifiers for keys, can be found in the Sublime Text 3 documentation.

If you don't necessarily require a key combination, you can simply use View → Show Tabs to make them visible again.


To install Ubuntu, first you need to burn the ISO that you downloaded to CD.  To do so see Burning ISO How to.  Once that is done, you need to boot from that CD, and make sure that your system is set to boot from CD. Once it boots, you will have the option to install Ubuntu alongside windows, and that way you have both Ubuntu and Windows on the same machine.  A second way, is to install Ubuntu from within Windows, just like any application, by running wubi.exe from the CD. For more information on how to install Ubuntu you may check out Installing Ubuntu Desktop or Welcome to the Ubuntu installation guide!


If you go to
System Settings/Appearance/Look
you can select one of the default themes.
Of course, you can search for unity themes online. I have never done it until now. There are some examples on this site:

http://kb.openstudioproject.com/content/ubuntu/best-ubuntu-1404-trusty-themes

It seems that you should install unity-tweak-tool first:

sudo apt-get install unity-tweak-tool

and then look for themes online, and add the repository, install the theme, and then switch to it using unity-tweak-tool.

sudo add-apt-repository ppa:numix/ppa
sudo apt-get update
sudo apt-get install numix-gtk-theme numix-icon-theme


Where do I put backend PHP files on Apache?

Generally PHP files are meant to be accessed by the general public.  For example, index.php resides in /var/www/html and handles all requests for "/".  If your app file is test.php, then try placing it in /var/www/html/test.php and you can browse to it directly.

As long as you have mod-php5 loaded and enabled, apache will execute that script instead of returning the source code.


How to deploy an Ubuntu touch application for other GNU/Linux distributions?

Do you really need to statically link to all of Qt5?  I would imagine that most modern Linuxes already have it in their repositories.  It may just be that all you need to do is include Ubuntu.Components in your binary.

If I were doing this, I'd just copy the Ubuntu.Components source into my project directory, as if it were another module.  I've never actually tried this, so you may have to play around with import paths to make sure the right version gets loaded.

I suspect that there's a more elegant way to accomplish this, but I don't have much experience producing statically linked binaries.  But maybe this will work for you until someone comes by with the real answer.


Glitch while using the Desktop Wall Plugin

It seems like a conflict with another Shortcut. Try to isolate your keys to a funcion. I have solved a conflict using Super (Windows) Key + Directional Left, Right, Up and Down Keys to do Viewport Switching (Desktop Wall or Virtual Desktop Switching) just by isolating Super Key from being used to call Unity Launcher (default behaviour is to press Super Key to do it). I changed it to something else, and voila, desktop switching without pressing Enter Key.


Why are overlay scrollbars in Eclipse enabled on 64bit but disabled on 32bit?

Overlay scrollbars were blacklisted because a workaround for a number of other bugs was causing them to glitch in Eclipse. These bugs have since been resolved (as far as I can tell).

https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/769277

Although it would seem only on the 32-bit arch ; I've never noticed them being blacklisted on 64-bit.

Try editing /usr/bin/eclipse and removing the GDK_NATIVE_WINDOWS variable, and further adding

export LIBOVERLAY_SCROLLBAR=1

Precise lists the newer Eclipse 3.7.1 release and includes removal of the GDK_NATIVE_WINDOWS variable, so hopefully they have also removed it from the blacklist.


Black screen when login graphic mode after changing the setting of graphic cards

I figured out the problem. My monitor does not compatible with the graphic card inserted in the CPU. My monitor is full HD but the graphic card wants to render Quad HD.


apt full-upgrade versus apt-get dist-upgrade

apt full-upgrade performs the same function as apt-get dist-upgrade.
man apt

full-upgrade (apt-get(8)) performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole.

man apt-get

dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. The dist-upgrade command may therefore remove some packages. The
/etc/apt/sources.list file contains a list of locations from which to retrieve desired package files. See also apt_preferences(5) for a mechanism for overriding the general settings for
individual packages.


How to install and run a Fuji Xerox M225 dw on Ubuntu 14.04

This is a year old question, but this is how I installed the printer and scanner drivers on Ubuntu 18.04:
This printer is the same as Brother DCP-L2540DW but unlike Fuji Xerox, Brother provides Linux drivers. First, go to http://support.brother.com/, search for DCP-L2540DW and download the following drivers for Linux (deb):

LPR printer driver (deb package)
CUPSwrapper printer driver (deb package)
Scanner driver 64bit (deb package)

Then install them (in above order) using the following command:
dpkg -i --force-all <filename>

Network Printer Configuration

Go to Settings > Devices > Printers and click Additional Printer Settings.
Click + Add and expand Network Printer. You should see your printer (FX DocuPrint M225 dw) there after a few seconds.
Click printer name and change the Host value to the IP address of your printer. Click Forward.
It will automatically start searching for a suitable driver and fail. Select Select printer from a database, select Brother in the list and click Forward.
Select DCP-L2540DW for CUPS and click Forward
Rename the printer if you like and click Apply.

Network Scanner Configuration

Open a terminal and type in the following command:
brsaneconfig4 -a name=M225dw model=DCP-L2540DW ip=<IP address>


How do I install an older version of Google Chrome?

You cannot unless you could grab a copy of the version 51 of Google Chrome. Because Google never allow downloading of older releases and what you found on ubuntuupdates.org is just a reference. They do not host any binary files.

Your best bet is to search in some non-techy friend who doesn't update browsers for years (old grandma's pc can help here too) and see if they have a 51.


Is there an application indicator for CPU usage by core?

This is for Ubuntu 14.04 and later.

Install indicator-sysmonitor

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

Run it
Click on its indicator → Preferences → Advanced tab
Change label from cpu: {cpu} mem: {mem} to cpu: {cpu0}{cpu1} mem: {mem}. Add whatever as CPU cores you have.
Save

References:

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


Seems to be dependency/compilation bug of twidge.
I can't compile even after installation of all Haskell -dev packages.
So even with

sudo apt-get update
sudo apt-get upgrade
sudo apt-get build-dep twidge
sudo apt-get install libghc-*-dev # not really necessary, just for sure

I can't compile it with

apt-get source twidge --compile

So I reported bug 1746069 to launchpad.

If you selected this package for learning purposes you can start with different and simpler one.


How to install python-uno package in Ubuntu 14.04?

Since it is asking for libreoffice-script-provider-python,

 sudo apt-get install libreoffice-script-provider-python

This will install python3-uno package, and the interface for LO to use UNO.


How to stop Sylpheed from displaying inline text attachments?

From the FAQ:

1.31.
Are there any plug-ins extending standard Sylpheed functionality?
As of Sylpheed 3.1, there is an Attachment Tool Plug-in distributed with the Sylpheed source code and available under plugin/attachment_tool/. Its only function is to remove attachments from selected messages and is provided more or less as a technology preview. More plug-ins are planned since Sylpheed 3.0, released in early 2010, and later supports a plug-in interface. In the future, some of the Sylpheed features will be re-implemented as plug-ins, and, moreover, various other plug-ins will be released.
There is a page on the Sylpheed website dedicated to the plug-in interface. Additionally, the PLUGIN.txt file distributed directly with Sylpheed can provide you with some basic information on the topic.

this appears to mean that you just need the (rather than a XD) plugin.


cd ~/root doesn't work, is there way to enable it?

Okay, a few things to note here:

Why are your saves under root? Don't run Minecraft with sudo, and then it should be stored in your home directory.
~ is a shorthand for your home directory. The command cd ~/root does not make any sense.
Your command should be formatted differently. Try running cd ~/Downloads and then java -jar Minecraft-Installer.jar.
If you want to access the root user, run su.


software for creating dynamic list of things?

As @Web-E told you, if you will insert the data manually, you should use LibreOffice Calc or Base.
I always use Calc for these purposes.


New to Linux, having problems installing Ubuntu 12.04 to brand new laptop

On this screen, the partitioning menu is empty and all of the buttons are greyed out. Of course, if I press "install now" it gives me the error message, (...)

This is because first you have to select on the partitioning menu field where exactly you want to have partitions on your disk. So just click on some place on it (for example click words "free space") and then your greyed buttons will be able to be pressed.

What architecture of Linux system you need depends on your processor architecture, no matter when you bought it. Remember you are able to install and run 32-bit systems on a 64-bit CPU, but not vice versa.


PulseAudio equalizer stutter and high CPU usage when changing volume or backspacing in an SSH terminal

pulseaudio-equalizer is supposed to be a dead project...If you use equalizer when browsing web use chromium/chrome and 'Audio-EQ' extension


Is IT possible to make a ext4 external HD completely open?

No. There is no filesystem that both uses *nix semantics and allows you to arbitrarily violate them.


mounting linux partition after installing windows

It looks like you've borked your system, Ubuntu was presumably installed in /dev/sda1, but you've overwritten it with Windows.

sda3 is an Extended partition. In the past, it's thought that 4 partitions were more than enough, which turned out to be false. So they invented the Extended partition. A disk can contain 3 Primary partitions, and 1 Extended partition. The Extended partition itself cannot be used directly, it contains other partitions. In your case, it's the swap partition, sda5.


MySQL (5.7.27) ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

After trying everything I've found the solution.

One of my workmates was giving me a dump that saves all databases (even the mysql internal database).

It was changing the root password.

How I found the solution

After I dump everything I enter mysql terminal client with my password, it worked. Then I update the privileges with

FLUSH PRIVILEGES;

And I couldn't access with my own password. Checked if  could access with his password and I could.


Software Update Presuming to Upgrade My System to Ubuntu 12.10

Open Update Manager and go to Settings. Set Show new distribution releases to Long term releases only.

Click Check and any offer to upgrade things in within the normal 12.04 release cycle.


Which packages to install to get Transmission torrent client?

For the desktop Transmission client on a GTK based desktop e.g. regular Ubuntu, Ubuntu MATE etc.:

sudo apt install transmission-gtk

This will also install transmission-common as a dependency, amongst other things.

For more details see:

apt show transmission-gtk


I ran into a similar situation in trying to run a rails tutorial

All the lines headed `NOTE: Gem:: et cetera are warnings of a deprecated command going away on or after 2011-11-1 with advice on how to replace the deprecated command in coding.

The commands executed, however. Check the results.

The last lines, starting with:

  `WARNING: 'require

--et cetera are about a command that was deprecated and has already been removed. That is probably the only hard error here, the rest are just informational warnings.

Getting the correct version numbers of Ruby, Rails and gems is the only way to surmount these problems, I fear.

Good luck,
Bernie


It seems that you are trying to install Windows on the Ubuntu partition without formatting the partition first.

Important: all the following steps will cause loss of data! Continue only if you really want to delete ALL the Ubuntu data (OS and your private data). You have been warned!

When installing Windows, format the partition from within the Windows installer, i.e. when installing. You should do it at the screens that look like the following:

If you cannot press the format button:

Delete all the partitions (via the delete button).
Make a new partition on the empty space (via the new button). Windows will tell you that it has to create a small system partition, this is normal.
Format the new partition, be sure to format the bigger one and not the system partition created by Windows.

When you managed to format the partition, select that one to install to and you should be able to finish installing Windows.


Are you sure it's not present on the system but with another name? Run sudo find / -iname '*vmware-installer*' -type f and once you find the installer, you will need to run that file with sudo and execute the uninstall task of the VMware Installer.
Since VMware Player isn't installed via snap or apt, it has to be removed with the VMware script.


Flash keeps crashing, possibly sound problem

Which version do you use?
Have you installed the correct version of ubuntu-restricted-extras.
I had a problem more or less similar to this but got fixed when I reinstalled the correct version of U-R-E from the software center.


Why are configuration files stored in so many different locations in the home folder?

Well, every distro will handle configurations the way they think its best, every distro will use the tools they find best for the job (ie dont tell any Arch Linux guy that you are going to create a GUI tool to handle the mirrors list! You will get a big reply saying "THRERE IS ALREADY SEVERAL AND THEY ARE CALLED TEXT EDITORS").

It just depends on the way of doing things and the package that was created for that distro. Packages are created to keep configurations here and there, they are not the same for the same package (they can be, but that's just coincidence).

I agree it looks a bit messy but it would be a bit tricky (if not impossible) to convince everyone to adopt a common  place for all your configuration files. They are package dependent.


Need to add " " on a target of different strings in a txt file

You can use sed with capture groups for this purpose:
sed -r 's/(gene_id\s)(.*)$/\1"\2"/' in-file.txt

Add -i.bak in order to do the changes in the file and create a backup file.


What is the difference between IPython and IPython3?

They are the same application, but for different python versions. IPython uses Python 2.7 while IPython3 uses Python 3. If you don't know which one you need probably the right is the 2.7 one, as Python 2.7 comes preinstalled in Ubuntu, while Python 3 has to be installed by you.

There are a lot of packages that follow this naming convention. So if you find a package named python-XYZ, probably it is for Python 2.7, and depending on the specific package, there may be also available a python3-XYZ package.


No sound in laptop speakers after Bluetooth disconnect, Ubuntu Linux 17.04

In my case, the problem was that the "Headphone" volume was muted, and turned down to 0. This stopped any audio from escaping the laptop speakers. You can see if you've got a similar problem by running alsamixer in the terminal. If anything's marked with MM or has the volume down to zero, that's probably it. You can use arrow keys and the M key to unmute and turn the volume back up.

Since this happens pretty much every time I disconnect my headphones, I've got a script here:

for x in `amixer controls  | grep layback` ; do amixer cset "${x}" on ; done
for x in `amixer controls  | grep layback` ; do amixer cset "${x}" 100% ; done

This will unmute and turn your volume to 100% for all items listed in alsamixer.

Spent hours tearing my hair over this and hopefully this will help someone.


Where can you read about the future of Ubuntu?

I couldn't think of a general official "news" site for ubuntu besides the general linux sites or computer news sites etc.

But if you actually want to see what happens exactly in which release you could follow their milestones on https://launchpad.net/ubuntu


I fixed the issue by first completely uninstalling all the drivers.
Then reinstalling nvidia-440 driver since my GPU is MX230.
Also, along with it, i installed nvidia-utils-440 package
now nvidia-smi works perfectly.
Though there are instances when i switch on the system and the command dont respond or the GPU is listed but inactive so i simply shut down and start again and this fixes the issue.
Hope this helps you too.
Also, i have installed nvidia-418 and nvidia-utils-418
now in additional drivers, 418 is unlisted even after installing, i don't know why? but this have worked for me.Hope it do for you too.


Brother printer hl1112 stopped working on 14.04 after an update

Which version of Ubuntu are you using exactly?  lsb_release -a and uname -a.

It sounds like your cups is working fine, but is something that is connecting you applications to CUPS.  I never-the-less would try removing/deleting your printer, rebooting your computer, and reinstalling it.  Then try uninstalling cups, rebooting, reinstalling.

Does your printer have a network port?  If it does you might to try printing through the printer's built in print server.

Have you tried installing the Ubuntu Enablement Stack?  This will give you a more modern Kernel, 4.2, and other stuff.

https://wiki.ubuntu.com/Kernel/LTSEnablementStack


There appears to be work in progress, to try and provide this.

Have you looked at attempts to date?

https://wiki.ubuntu.com/YaST

https://launchpad.net/~yast

https://code.launchpad.net/people/yast/+branch/yast/packaging-trunk


ImportError: cannot import name 'main' after installing python3.6 and pipenv

First, check the location of the file:

$ which pip
path -> /usr/bin/pip

Then, open terminal and enter:

$ cd /usr/bin/    --> (path of pip)
$ sudo nano pip

In the file, you will see:

import sys
from pip import main
if __name__ == '__main__':
     sys.exit(main())

You must change to:

import sys
from pip import __main__
if __name__ == '__main__':
     sys.exit(__main__._main())

Save the changes and exit


I see nothing wrong with anything you've posted, so you'll probably need to troubleshoot (after verifying ps -aux|grep knockd or tail'ing the knockd log on the server proves knockd is running):

I would enter a command in iptables that logs the incomings from your knocking PC, then use tail -f on the /var/log/kern.log file to see if the ports you have chosen are being allowed through end-to-end.  Be aware your system might not use the /var/log/kern.log file, although mine does.

Example - (enter this on the knockd server with su power, cxx.xxx.xxx.xxx is the IP address of the client knocker)
    iptables -w -I INPUT 1 -s cxx.xxx.xxx.xxx -j LOG; tail -n-0 -f /var/log/kern.log|stdbuf -o0 grep cxx.xxx.xxx.xxx

Then send the knocks from the client, watching the output of the command above.  If the knocks aren't getting logged, then on the client command line separate each port knock by sleep 1.  The command line for that would look like knock sxx.xxx.xxx.xxx nnnn1;sleep1;knock sxx.xxx.xxx.xxx nnnn2;sleep 1;knock sxx.xxx.xxx.xxx nnnn3;sleep 1... where sxx.xxx.xxx.xxx is the IP of the server and nnnn1,2,3,4 are the ports in the knock sequence.  If that still doesn't work use the logging technique on your client (install iptables/netfilter and put a LOG rule in OUTPUT chain with -d sxx.xxx.xxx.xxx; tail -f the client log file)

If you find all the knocks are getting logged just fine on the client knocker, then additional troubleshooting steps are called for.  (1st step - Be sure your knockd.conf is getting found by knockd as it starts.)  Post your results for help with further troubleshooting.  The ISP at one end or the other or your [wifi] router might be blocking higher numbered ports. I found that my cell phone provider's network seemed to block my knocks from my smartphone.


/var/log/apt/ will have some helpful records of what was done, so you can reinstall.


This is a permission issue, as the file resided in a NTFS partition that was mounted by root.

The root(administrator) mounted your ntfs partition, styles.css was in the NTFS partition, thus the file styles.css belongs to root.

Create a new file called style.css copy the content from styles.css to your newly created style.css. Delete/remove the file styles.css. And rename the style.css to styles.css. Then It should work again!


How can I confirm my name on a local network?

After some digging around...

Run ifconfig and identify which device is connected to the network you're interested in. For example, if you are connected to a WLAN it would be wlan0. Get your IP address on that device.
Run avahi-resolve-host-name -a 123.45.678.900 (where the numbers are your IP address). This should display:

    123.45.678.900    yourhostname.local


Trying to install the dependant package dotnet-sharedframework-microsoft.netcore.app will get you next error, saying that this package depends on libicu52 but it is not installable

http://packages.ubuntu.com/pl/trusty/amd64/libicu52/download

and download .deb package. Now, go to the download location and install the package by running:

sudo dpkg -i libicu52_52.1-3ubuntu0.4_amd64.deb

Now, you will be able to run the following commands:

sudo apt-get install dotnet-sharedframework-microsoft.netcore.app-1.0.0-rc2-3002702
sudo apt-get install dotnet-dev-1.0.0-preview1-002702

dotnet --version

Good luck

source: http://zablo.net/blog/post/run-and-debug-asp-net-core-rc2-ubuntu-16-04


Slow boot from purple screen on, cold start only

Summary, likely culprits of the purple screen hang in my case -  Dell Precision T1650, SSD, Xeon 1270v2, FirePro V4800 – an updated Dell bios and or a particular USB wireless adapter.

I needed the video card the machine was originally supplied with to get the PC to boot following removing and re-inserting the CMOS battery.

And also to turn serr off in the bios settings so my preferred video card would output video whilst booting up.

This followed trying “secure boot” in the bios and ending up with no boot at all – it was swapping the suspect wireless adapter to another machine that worked flawlessly with a different wireless adapter resulting in a load of error messages that  suggested it may have been the cause of the problem in the first place.

I have updated a freshly installed Ubuntu 18.04 and everything is working as it should.  However after losing from three to ten minutes, to over half an hour every day waiting for my PC to boot besides spending many many hours trying to resolve the issue – to be on the safe side I turned Ubuntu updates off following the initial update with everything working as it should.


Cannot upgrade to 17.04 from 16.04 on Kubuntu

@MichaelBay - thank you for your advise, I changed this setting in the Update Manager / Advanced settings / Configure Software sources / Show new distribution releases to "Normal releases" and now it works.


error dependency is not satisfiable: libmonosystemruntime2.0cil

In the 16.04 repos, the package is called libmono-system-runtime4.0-cil. It should cover 2.0.


Using scrot to take screenshots continuously

Scrot doesn't allow taking multiple screenshots in batch. However, you can use bash (or any other languages') loop feature to achieve this.

Here is how I took 10 screenshots in files named screenshot_n.png (where n is the sequence number`) in delay of 1 seconds each.

for i in $(seq 1 10); do sleep 1; import -window root screenshot_$i.png; done

I used the import tool here. It came from imagemagick. You can use scrot in place of import. Change the sleep 1 line to match your desired delay. Check import man page for more details.

You can use it in bash-function also like this

  function shot()
{
    for i in $(seq 1 $1);
    do
        sleep 1;
        import -window root screenshot_$i.png;
    done
}

Save it in .bashrc file. You can use it in bash with this syntax shot n, where n is the number of screenshot you need to take`

Here is another command that uses scrot. I used scrot's built-in delay feature instead of bash sleep command here. Check scrot man page for more details. You can use this in bash-function as before.

for i in $(seq 1 10); do scrot -d 1 screenshot_$i.png; done

You can check the following question to get suggestions for other screenshot taking tools from command line

  What is the terminal command to take a screenshot?


Kubuntu dual boot with windows 10 you need to load the kernel first

You could try installing Grub Customizer; this gives you a range of other things you can tweak and might fix your problem: How to Install Grub Customizer in Ubuntu 18.04 LTS - Tips on Ubuntu.


How can install FEniCS in my PC with ubuntu 18.04 O/S

The Ubuntu Personal Package Archives (PPA) version is the latest release of FEniCS. To install FEniCS from the Ubuntu PPA:

sudo apt-get install --no-install-recommends software-properties-common
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install --no-install-recommends fenics

also if you want To install the Python components of FEniCS:

pip3 install fenics-ffc --upgrade

This will install FFC and its dependencies.


How to create a init.d script for openssh-server which was compiled and installed from source using configure + make + make install?

I've just installed version 6.4p from source and the config files are placed in

> /usr/local/etc$ ll total 284
> -rw-r--r-- 1 root root 242153 Jan 10 21:20 moduli
> -rw-r--r-- 1 root root   1576 Jan 10 21:20 ssh_config
> -rw-r--r-- 1 root root   2583 Jan 13 09:46 sshd_config
> -rw------- 1 root root    672 Jan 13 09:28 ssh_host_dsa_key
> -rw-r--r-- 1 root root    610 Jan 13 09:28 ssh_host_dsa_key.pub
> -rw------- 1 root root    227 Jan 10 21:20 ssh_host_ecdsa_key
> -rw-r--r-- 1 root root    182 Jan 10 21:20 ssh_host_ecdsa_key.pub
> -rw------- 1 root root    985 Jan 13 09:28 ssh_host_key
> -rw-r--r-- 1 root root    650 Jan 13 09:28 ssh_host_key.pub
> -rw------- 1 root root   1679 Jan 13 09:28 ssh_host_rsa_key
> -rw-r--r-- 1 root root    402 Jan 13 09:28 ssh_host_rsa_key.pub

To get the old version removed, I've set up the new one to run on a different port, copied the init script of the old version and modified it to point to the new installed one.  I can now have the two versions running so I can test the new install, I'm keeping the old one around for a day or so in case something goes pear shaped so I've still got access (my server is totally remote).
Once I'm happy, I can just remove the old version using apt, clean up any config files I may still have lying around and then reboot.
Good luck!


If you installed the .deb and the Snap version, but only want to use the Snap version, just remove the package from the actual apt side of things to remove the installed .deb:
sudo apt remove discord

This doesn't affect the Snap version, and will remove the 'duplicate' Discord.


NEVER let someone trick you into paying to get an activation key or "full version" of Ubuntu.  I don't know for sure which link you are referring to, and as this is a community site, anyone could potentially give you any link.  You can get the official Ubuntu releases for your computer at http://www.ubuntu.com/download/desktop

As far as which version you want...  most computers that do come with it pre-installed come with either the 14.04.3 LTS or the 15.10 (in most cases).  Mine came with it pre-installed and had an option between 14.04 LTS or 14.10 (it was before 15.10).  15.10 is the newest, but the LTS stands for "Long Term Support" and offers a longer term of official security and maintenance updates.

I hope that helped you figure out what you want!


Java Runtime Environment 1.4.2 Installation

If you need an elder version of Sun Java (bought by Oracle), you need to download it from http://www.oracle.com/technetwork/java/archive-139210.html, unpack it yourself, and update your $PATH to point to it.  Possibly also your $JAVA_HOME for some tooling.

The oficial Installation Notes for Linux

Make sure that execute permissions are set Run this command:

chmod    +x j2re-1_4_2_-linux-i586.bin
Run the self-extracting binary.

Execute the downloaded file, prepended by the path to it. For
example, if the file is in the current directory, prepend it with "
./" (necessary if " ." is not in the PATH environment variable):

./j2re-1_4_2_-linux-i586.bin

  Note about System Preferences: By default, the installation script
  configures the system such that the backing store for system
  preferences is created inside the Java 2 Runtime Environment's
  installation directory. If the J2RE is installed on a network-mounted
  drive, it and the system preferences can be exported for sharing with
  Java runtime environments on other machines. As an alternative, root
  users can use the -localinstall option when running the installation
  script, as in this example:

  j2re-1_4_2_-linux-i586.bin -localinstall This option causes
  the system preferences to be stored in the /etc directory from which
  they can be shared only by VMs running on the local machine. You must
  be root user for the -localinstall option to work.


What am I missing to get symlinks to work with CIFS?

Not sure, but I fear that a cifs share, that in your case is essentially a folder on a ntfs partition available through the network, cannot manage symbolic links.
Different would be the case if the cifs share were provided by a samba server on a linux machine.

The solution that come to mind is:

create a huge enough file on the share (with dd, for example)
create a ext4 filesystem on this file
mount the file as a partition image, with -o loop
use this ext4 partition as a destination for your backup


gcc: error trying to exec 'cc1plus' : execvp: No such file or directory

You're possibly missing g++ package on your machine. Open a terminal and install it using the below command:

sudo apt-get install g++

To compile using g++ use this

g++ -o test.o test.cpp

g++ can be used to compile C++ source, the default ubuntu installation comes with gcc, but not with g++.

You are trying to compile C++ source using a C compiler. gcc usually successfully compiles C++ code but by default it doesn't link any c++ specific libraries (refer to this answer on Stack Overflow).

If a message displays like : Couldn't find package ..., then try the following commands

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

then

sudo apt-get install g++


Your processor should use the intel_pstate CPU frequency scaling driver by default.
You can change the maximum CPU frequency to 3.9 GHz via:
echo 3900000 | sudo tee /sys/devices/system/cpu/cpufreq/policy*/scaling_max_freq

or via:
echo 76 | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct

(Rounding might require 77%)
Neither method will persist through re-boot. What you want is very close to just disabling turbo, 3.8 GHz, so you could do that in BIOS. If you want to do it from the OS, which would be non-persistent:
echo 1 | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo

This answer uses primitive commands. Others might give answers that use higher level tools to do the same thing.
EDIT: Actually, it looks as though you might already have turbo disabled in the BIOS, in which case you will not be able to get to 3.9 GHz. Do this:
grep . /sys/devices/system/cpu/intel_pstate/no_turbo/*

to see your current operating parameters.


Purple Screen after trying to boot into Ubuntu 16.04 LTS

It seems the boot process is stuck at some point. Potential culprits are often graphic drivers. Maybe you can use the recovery mode (if that's available when booting from USB).
Alternatively, press the Esc-key to see what is going on in the background. Or you can try CTRL-ALT-T to open a terminal for obtaining further information.


Can't open RFKILL control device: No such file or directory

This is a method with wget - meaning the target must have an Internet connection.

cd /lib/firmware
mkdir rtlwifi
cd rtlwifi
wget http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/plain/rtlwifi/rtl8192cufw_TMSC.bin


How can I enable mod_rewrite on Ubuntu Server?

I fixed it thanks to this Stack Overflow question

Just this

DocumentRoot /var/www
<Directory "/var/www/">
AllowOverride All
</Directory>

in /etc/apache2/sites-available/yourdomain.com.conf is sufficient


deleted files in home directory by using sudo rm -f *

rm -f * would not have deleted your hidden files, meaning your settings for the most part should be safe. You can verify by:

ls -a ~/

Is this a new install, or did you have files that you need restored? If you did lose some photos, music, etc. here is a link to some more information on recovery: How to recover deleted files?


How to backup and restore Firefox bookmarks from command line?

Using sqlite:
Firefox uses sqlite to store its data. Bookmarks are stored in ~/.mozilla/firefox/profile_name/places.sqlite. So we can use sqlite to backup and restore Firefox bookmarks.
Hit Ctrl+Alt+T to open terminal and run following command to install sqlite3:
apt-get install sqlite3

Now you can one following command to backup/restore Firefox bookmarks, make sure to close Firefox before running any of following commands.
Backup:
sqlite3 ~/.mozilla/firefox/user.profile/places.sqlite ".backup /path/to/directory"

Restore:
sqlite3 ~/.mozilla/firefox/user.profile/places.sqlite ".restore /path/to/backup/file"

Change user.profile with your default profile name.
Simple Backup:
If you don't want to install any additional packages use following command to copy latest bookmarks backup from Firefox profile:
cp $(find ~/.mozilla/firefox/fvy8ug06.default/bookmarkbackups | sort | tail -n1) .


I normally just use dd to copy the area of interest between the disk and a file, then open the file in emacs and use its M-x hexl-mode.


affect the security of the Windows 7 & 10 systems

Only if someone has access to your system. Physical access to a machine means that person has control over the machine and can do anything. Format the disks, install rootkits, keyloggers. Anything.

  as in can the Linux part be used to place root kits etc in them?

Yes, but Windows will the entry point for malware, not Ubuntu/Linux. In Ubuntu/Linux there are a few simple rules:

A good admin password
Create backups.
Stick to official sites to install software, don't install software you do not use
Don't install software to access your system remotely

... and it is impossible for someone other than you to install a root kit.

It is very easy to install a root kit when you have physical access. You can reboot Ubuntu/Linux and you can use an live session to install software onto the system. Remotely that is very hard to pull off.

The entry points into Ubuntu/Linux are WINE, samba shares, connection software into your system (remote desktop), software installed from unofficial sites.

(all of these require admin password; so use a good one).

And then the more unlikely methods ... bugs in browsers, deliberate bugs in encryption tools, or openSSL (NSA) a breached repository, hacked websites where someone altered ISO's and the hashes for those ISOs (Mint with their wordpress site).

(these... well we need to trust someone. Canonical has a good track record; they have yet to admit to something related to a breach that impacted us all where they where the responsible party. Their track record is better than Microsoft or Apple, and better than the maintainers of Mint).


how to configure rsyslog to send file from specific program to specific location on remote server

You need to first configure your rsyslog server to be able to receive messages from the clients

Edit your server's rsyslog configuration file and create or make sure that the following lines exist:

$ModLoad imuxsock
$ModLoad imklog
# provides UDP syslog reception. For TCP, load imtcp. For TCP use InputServerRun 514
$ModLoad imudp
# This will save the log file is a separate directory for each client's IP
$template FILENAME,"/var/log/%fromhost-ip%/syslog.log"
#Create a rule for each application you need to filter, ie: httpd messages
$template HTTPD,"/var/log/%fromhost-ip%/httpd.log"

#Create a separate log rule for the specific application
if $programname == 'httpd' then ?HTTPD
&~

#Dump all remaining messages that do not match the filters created into one file
*.* ?FILENAME

After that you need to go to each client and add the following lines to the rsyslog.conf file:

$ModLoad imuxsock
$ModLoad imklog
# Provides UDP forwarding. For TCP use @@server_ip
*.* @server_ip:514

And you should be ready. Everything that the clients send to to server will be filtered with the rules you created and the messages will be saved to the files on each client's IP address folder according to the templates you made on the server side.


Linux ACPI errors + boot problems on my laptop

A user from another forum suggested me, to use the boot flag pci=nommconf. This has worked great so far.