TCP Forceful routing through designated ethernet interface does not work in ubuntu 18.04

TL;DR: You'll have to define the routes/gateways needed for each desired destination depending on your topology; maybe your program has to run as root.
This is a routing quirk of the system, not of your programming. In every case of a packet ready to be sent, the system applies the network mask to the destination IP address to determine if that IP is located in a known network and then selects the output interface.
For example, if you send something to 192.168.73.25, applying the known masks 255.255.255.0 of your interfaces results in a network 192.168.73.0 (present in eth0), so it will be sent thru eth0 (as in your first configured routing table). If no interface has the desired destination network, then the packet is sent to the default gateway, which we already know is at 192.168.83.1, visible thru eth1.
All this is controllable using routing tables to alter the decision making of the system. So, if the destination is reachable thru eth0 you have to set up a new route indicating that. For example, if you want to send traffic to 192.168.12.35 and you know that this address is accesible from a router in the network connected to eth1, say, at the address 192.168.83.67, then you add a new route like this:
ip route add 192.168.12.65/32 via 192.168.83.67 dev eth1

Note that we cannot simply say "via eth1" because the destination IP is not in the 192.168.83.1-254 range of network addresses of eth1 (as indicated with the eth1 mask) and sending the packet thru that interface will not find automatically someone that knows where to resend it (and possible also don't know how to return an answer). Of course, to make the change permanent between reboots we have to configure the route in the netplan configuration.
If you have a topology with two ISPs (with one gateway to internet each), but only one is configured as the default gateway then you have to devise special routing tables that select the packet by destination IP or by port or by some other condition and send it thru the desired gateway. For this I recommend reading the Linux Advanced Routing and Trafic Control HowTo, or maybe implementing the Net-ISP-Balance script from Lincoln D. Stein that solves this kind of situations.
I apologize for the long text or assuming that you don't already know the routing mechanisms.
Note: Your program could change programmaticaly the routing tables if you know which routes you want, as the ip command do, but maybe it have to run with root privileges.
EDIT:Reading about C routing programming, I found interesting code in Linux Journal, and in the Oleg Kutkov Blog.


After typing the general approach: all bugs for VLC are listed as "community maintained", and most are "orange" and "needs triage" so there is no fix (yet). Links in the rest of this answer will explain those.

General approach for any question related to security issue.

Ubuntu uses a website to keep track of Common Vulnerabilities and Exposures (CVE) issues. For VLC you can find it here. Current list (and do mind the "community supported" comment since Canonical does not maintain VLC).

ALL issues for 18.04 are listed as "needs-triage".
Color codes are explained here (Most are "orange": Open vulnerability that is a real security problem, and is exploitable for many people. Includes network daemon denial of service attacks, cross-site scripting, and gaining user privileges. Updates should be made soon for this priority of issue.)

That is on our side of this.

You can look up more information on each CVE with this site. Search with the CVE number related to the issue you are concerned about. Then you can keep an eye on the progress of this issue.

Regarding VLC: the update will arrive in Ubuntu as soon as someone offers a fix and this fix is tried and tested sufficiently. They are all security related so will be added to Ubuntu as long as the version you use is supported.

Regarding VLC 3.0.3: for software like this you might consider installing the version from them and not from Ubuntu software center. That is one way to eliminate the time it takes to get updates to our systems. But that also means a little more risky approach.


PHP extension unable to load dynamic library

While there are many modules installed on the system.  Php will use the ones that are actually enabled in the Apache2 configuration.  This way you choose which one will be used, not by installing and uninstalling them, but actually enabling the one you walk to be effective at the time.

You have to enable the installed modules for them to be used with Apache2.

Use this command:

$ sudo a2enmod [module-name]

After enabling a module, be sure to restart the Apache2 server:

$ sudo service apache2 restart

Update:

There is a conflict between difference version of the bcmath modules installed.  Perform these steps to address the issue.

$ sudo apt install apache2 libapache2-mod-php
$ cd /etc/apache2/sites-available/
$ sudo cp 000-default.conf ospos.conf
$ sudo a2ensite ospos.conf
$ sudo nano ospos.conf

Modify your new VirtualHost

Change from:

&ltVirtualHost *:80&gt
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
&lt/VirtualHos&gt

Change to:

&ltVirtualHost *:80&gt
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerName mysite.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/ospos/public

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
&lt/VirtualHost&gt

Please note that the name mysite.com is to be the name of the URL you are typing in to bring up your site.  Add this site name to your /etc/hosts file with:

127.0.1.1       mysite.com

Now stop your apache2 server with:

$ sudo systemctl stop apache2

Run this to verify nothing is running on the port:

$ sudo lsof -i tcp:80 | egrep LISTEN

Now start the server with:

$ sudo systemctl restart apache2

You should not be able to access your site by the URL sitename you have added to your ospos.conf file.


Recently, I bought an Acer Aspire ES1-512 for a college course. As it happens this course requires the students to use Ubuntu. After several unsuccessful attempts to install Ubuntu alongside Windows. I believe I have an answer that allows you to install Ubuntu 14.04.2 alongside Windows 8.1 on an Acer Aspire ES1-512.

Some of the steps are from memory, so if something doesn't work please let me know.

Steps for Installing Ubuntu:

Turn on the laptop and press F2 as soon as you see the "Acer Explore
Beyond Limits" screen. This will take you into the UEFI/BIOS screen.
If this is the first time you have entered the UEFI/BIOS section there are some adjustments that need to be made.
Using the cursor keys highlight the menu item "Main."
Network Boot:       [Disabled]
F12 Boot Menu:  [Enabled]
D2D Recovery:   [Enabled]
Wake on LAN:    [Disabled]
SATA Mode:      [AHCI Mode]
Touchpad:       [Advanced]
xHCI Support:  [Enabled]
Cursor over to the "Security" menu item.
Set Supervisor Password to one of your choosing.
Disable "Password on Boot."
Cursor over to the "Boot" menu item and arrange these items.
Boot Mode: [UEFI]
Secure Boot:   [Enabled]
Arrange the boot devices as follows
ATPI CDROM:
HDD:
USB HDD:
USB FDD:
Network Boot - IPV4
USB CDROM:
Network Boot IPV6
Windows Boot Manager
Press F10 to Save your modifications and Exit BIOS.
Open the DVD tray and insert your LiveDVD of Ubuntu. Close the DVD tray and restart your laptop.
When you restart, if the boot order is set correctly you should boot up in Ubuntu. If not go back into the "Boot" item in the BIOS menu and make sure the laptop's DVD is at the top of the boot devices.
Select the option "Install Ubuntu alongside Windows." The installation program will divide the Windows partition. My Acer Aspire has a 500 Gigabyte HDD. The installation program divided it like so:
Files (27.2 GB) /dev/sda4(ntfs) 253 GB
Ubuntu /dev/sda5(ext4) 231 GB
Wait for Ubuntu to install. This will take awhile.
After Ubuntu is installed you will be instructed to reboot your laptop. After you select reboot you will be instructed to remove the Ubuntu DVD from the DVD ROM drive.
Warning: If you think the laptop will now boot up and let you choose which OS you want to run. I am afraid you will be disappointed. The only OS recognized by the UEFI firmware at this time is Windows.
Restart the laptop as we did back in Step 1.
Use the right cursor key to highlight "Security"  and use the down cursor key to highlight "Select an UEFI file as trusted for executing" and press Enter.
The "Security" window will show HDD0 in white letters. Press the Enter key.
On my laptop two items; they look like folders show up: "EFI and Temp." Highlight EFI and press Enter.
These folders are displayed: ., .., ubuntu, Microsoft, Boot, and OEM. Highlight ubuntu and press Enter.
Another set of folders are listed: ., .., shimx64.efi, grubx64.efi, and  MokManager.efi. Highlight "grubx64.efi" and press Enter.
The "Add an new file" window will appear in the middle of the screen with the question: "Do you wish to add this file to allowable database?"  In the "Boot Description" type in grubx64.efi and press the Enter key twice.
Press F10 to Save and Exit BIOS.
Now restart the laptop and return to the BIOS menu. Cursor over to the "Boot" item and you will see a ninth boot file added: "EFI File Boot 0: grubx64efi." If you choose to leave the boot order alone. Whenever you turn on your laptop it will boot up in Windows.
Or you can move the ""EFI File Boot 0: grubx64efi" to the eight position and boot up in Ubuntu.

For stealth reasons you can let your laptop default boot into Windows, but if you need Ubuntu  when you power on the Laptop press the F12 key repeatedly until the "Boot Manager's" window opens. There should be two options.

Windows Boot Manager
grubx64efi

To boot Ubuntu highlight the grubx64efi and press Enter. For Windows highlight Windows Boot Manager and press Enter.


Removing popup notifications on Spotify Ubuntu

It's not a command.

  then edit ~/.config/spotify/Users/[Spotify user name]-user/prefs [...]

It's asking you to edit a file. So either find the file through Nautilus, or track it down in a terminal and edit it with Gedit or nano or butterflies or whatever you like to use to edit things.


How to change position of `Show application` on Dock?

Open your terminal.

Type the following command:
gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true

This should work to make the dock like this:


You probably accidentally hit the keyboard shortcut to cycle through your configured keyboard layouts, which is by default Super+Space if I remember correctly.

Go to System Settings → Text Entry to view and change the relevant configuration:

You can remove the shortcuts in the right column or you can remove all keyboard layouts which you don't want to use from the input sources list in the left column.


No such file or directory as on /usr/lib/sendmail (Ubuntu)

I found that if I installed both mailutils AND sendmail, that error went away and sending the contents of a file as an email worked:

sudo apt-get install mailutils
sudo apt-get install sendmail
cat /tmp/somefile.txt | mail -s "My subject " myemailname@example.com


Annoying stripes in the frame update (AMD Ryzen 3200g APU)

I found a solution here (panariga's "Workaround 2") with which I could keep the IOMMU enabled in the BIOS and without needing any custom drivers.

Workaround 2:
Add iommu=pt to kernel command line in /etc/default/grub:
sudo nano /etc/default/grub

Edit the line beginging GRUB_CMDLINE_LINUX_DEFAULT to look like this
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash iommu=pt"

Update GRUB:
sudo update-grub

Reboot
reboot


If the output of grep command shows like this,

$ git log | grep path/to/file.cpp/.h
     modified: path/to/file.cpp/.h - 1) change1 , 2) change2, etc......
     modified: path/to/file.cpp/.h - 1) change1 , 2) change2, etc......
     modified: path/to/file.cpp/.h - 1) change1 , 2) change2, etc......

Then you can pipe it to the below awk command to produce the desired output,

git log | grep path/to/file.cpp/.h | awk -v RS='[-,]' '{print}'

Example:

$ cat aa
     modified: path/to/file.cpp/.h - 1) change1 , 2) change2, etc......
     modified: path/to/file.cpp/.h - 1) change1 , 2) change2, etc......
     modified: path/to/file.cpp/.h - 1) change1 , 2) change2, etc......

$ awk -v RS='[-,]' '{print}' aa
     modified: path/to/file.cpp/.h
 1) change1
 2) change2
 etc......
     modified: path/to/file.cpp/.h
 1) change1
 2) change2
 etc......
     modified: path/to/file.cpp/.h
 1) change1
 2) change2
 etc......


I am not able to update and install anything in virtual box. It shows error

Follow these steps to update your VirtualBox;

Download the newest VirtualBox Installer for your OS.
Run the Installer and choose the path of your installed VirtualBox instance.
Choose the appropriate options.
Run the updated VirtualBox.


Unable to use WPA security when using laptop as hotspot with an Intel 3945ABG

I researched for an answer for almost an hour, and was unable to find anything. It appears that the ubuntu built-in hotspot service doesn't support WPA.

(I could be wrong; in fact, I hope I'm wrong. The built-in hotspot service should support WPA, and if it doesn't then they should definitely update it.)

At this point I think the only way to create a hotspot with WPA security capabilities would be to use third-party software.

The other option would be to use WEP. It has some serious problems as far as security, but if security isn't a big concern then it could be an answer.


Blank screen when I try to start a GNOME Wayland session

Assuming that rebooting doesn't take you back to the login screen where you can just reselect a Ubuntu session...

I haven't needed to do this myself, but this should work...

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type:

sudo dpkg-reconfigure lightdm
select lightdm as the display manager and hit ok
reboot

re-select a Ubuntu session at the login prompt


Please you have a syntax error in the lines you added:

This: PATH=PATH:$JAVA_HOME/bin, should be PATH=$PATH:$JAVA_HOME/bin.


Click the Ubuntu logo in the upper left corner of the screen, type "resolution" and click the display. This will bring up a settings screen that allows you to set the resolution. For more details see video tutorial.


Is it possible to install Ubuntu on a 2006 macbook pro?

Yes, installing Ubuntu 16.04.2 LTS on a MacBook Pro (2006) works out of the box.

I have not been able to make the computer boot from USB-stick, but if you have a burnable CD or DVD available you can easily get it done.

If you have a burnable CD available with room for 700MB data, use the Network installer (mini.iso).

If you have a burnable DVD available you can use the standard 16.04.2 LTS desktop iso.

NOTE that this computer has a 32-bit CPU, so you must select the i386 and not the amd64 images.

Once you have your CD/DVD ready restart/turn on your computer, press and hold the C-key until you see the Ubuntu installer boot-menu.


Adding a threshold to two-finger scrolling on touchpad

As per https://help.ubuntu.com/community/SynapticsTouchpad

You can determine your input devices (not just touchpad), by using the command xinput

From Terminal Using xinput

First you want to see what number your device is labelled as. Use the command xinput list to see all of your devices. (You could probably shorten this to a command like xinput list |grep Synaptic -n2, or something similar)
Note the id next to the Device.
Determine your current settings by doing the command xinput --watch-props YOURDEVICEID (YOURDEVICEID being the device id you noted in previous step)
You may wish to adjust sensitivity which is Synaptics Finger, but it is dependent on your actual touchpad. So you may have to tweak other ones as well. (Press Ctrl+C to exit).
Once you determine what you want to change you will input it with the xinput with the --set-prop switch.

Same Example as from top source below

xinput --set-prop YOURDEVICEID "Synaptics Finger" 50 80 257

This will adjust the sensitivity of the pad in general.

From Terminal using synclient

You can also find a configuration with synclient

Input the command synclient -l to view your current configuration. (You can also redirect this into an editable document if you want to manipulate it further with a command such as synclient -l > touchpadconfig)
You can set the value by doing a command like synclient LeftEdge=130 to set left edge of the touchpad to a coordinate 130.

Unfortunately there are lot of settings which can be adjusted, and you may need to adjust them yourself. However the man synaptics explains each of the parameters which can be set in fairly human readable terms.

Further Reading from Debian wiki

Further Reading from Arch wiki


How to view installed Java documentation?

One way to avoid file-browsing, is to make a bookmark in your browser to:
file:///usr/share/doc/openjdk-11-jre-headless/api/index.html

Then you don't have to explore through the filemanager.  Of course you could make it a link on your Desktop so you'd just double-click the Desktop icon.


Iceacast doe not natively support AAC:

  Icecast is a streaming media server which currently supports Ogg (Vorbis and Theora), Opus, WebM and MP3 audio streams.Icecast

To overcome this we may want to have a look at darkice  which claims to be capable to convert and send AAC-streams (amongst others) to Icecast.

Also see:

How do I setup an Icecast server for broadcasting audio in my network?
Manpage for darkice.cfg


how to replace a word between double quotes?

Maybe a matter of systematically escaping the " with the \ character? This works for me:
$ echo Name=\"\" | sed -e 's/\"\"/\"This should be filled in\"/'Name="This should be filled in"

To replace anything that is originally between the "":
$ echo Name=\"Original\" | sed -e 's/\".*\"/\"This should be filled in\"/'
Name="This should be filled in"


Gnome Extensions do not work at all after upgrading to 20.04.1 LTS

There's a main off switch under Gnome Tweak Tool > Extensions! Found this immediately after posting the question.


Ubuntu 18.10 / Gnome: Text and UI elements get blurry in some windows after a while -- how do I debug and fix this?

Just remove MS Core font installer using this command:
sudo apt remove ttf-mscorefonts-installer
Had the same issue since last week right after i installed it. Now, 30 seconds before writing this message, I removed it and its all good.


12.04 does not detect wlan0(Broadcom  4365)

it's the driver issue, the broadcom didn't release the driver source.
some guy extracted a amd64 binary version from Dell's pre-loaded Ubuntu.
follow this link to see more.
https://bbs.archlinux.org/viewtopic.php?id=145884


Can't install/remove/upgrade any package

Sometimes a corrupt installation package can corrupt your package management system leaving your Linux unable to install or on remove any packages (Software). Here is the message error I got from apt-get after trying to install ndas-admin for Ubuntu.

$sudo apt-get install mplayer   (or any package)
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: The package ndas-admin needs to be reinstalled, but I can’t find an archive for it.   (this is the error)

I tried sudo apt-get install -f to try to fix the problem but got the same error. The only option I had was to edit the dpkg status file manually.

$ sudo gedit /var/lib/dpkg/status    (if you prefer you can use vi instead of gedit)
Locate the corrupt package, and remove the whole block of information about it and save the file. Mine looked like this:

Package: ndas-admin
Status: deinstall reinstreq half-configured
Priority: extra
Section: alien
Installed-Size: 100
Maintainer: root <root@ubuntu510>
Architecture: i386
Version: 1.0.2-24
Depends: libc6 (>= 2.3.4-1)
Description: Administration toosl for XIMETA,Inc NDAS device driver for Linux operating system
 ndas-admin – This program allows the user to register/enable/disable/unregister the XIMETA NDAS hard disk.
 .
 (Converted from a rpm package by alien version 8.53.)

Fixed. Hope this helps someone else.


sudo modprobe -r acer-wmi
cd /etc/modprobe.d
sudo nano blacklist.conf
In that config file, just add
blacklist acer-wmi

Just use these commands and reboot. thats it


Ubuntu 15.10 and 16.04 keep freezing randomly

I was facing a similar problem on my Ubuntu 16.04. It used to freeze randomly a lot and I had to perform a forced shutdown each time.
Upgrading the kernel to 4.7-rc3 did not work for me!
I found out that there was no swap memory area allocated(sudo swapon --show returned nothing and free -h showed there was 0B space allocated for swap memory) for my Ubuntu OS(I have a dual-boot system: Windows 7 & Ubuntu 16.04). I allocated swap space for Ubuntu and guess what, the problem is gone! Hope this helps. :)
Edit: I was wrong! This problem was not solved and it has nothing to do with swap memory, though allocating swap memory apparently fixed another type of freeze where continuous hard disk access occurs during the freeze and where it is possible to kill the latest process forcefully (by typing alt+sysrq+F from keyboard) to recover from the freeze.
However, this problem(where nothing but forced shutdown works to recover from the freeze) may be related to the kernel and if kernel upgrading cannot solve the problem, then a workaround could be to add the statement intel_idle.max_cstate=1 in the grub configuration file:
STEPS

sudo nano /etc/default/grub
There is a line in that: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" (like this), replace with: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=1"
Save it (CTRL+O)
sudo update-grub
sudo reboot

I will try this if I face the problem again(since in my case this problem is very rare now, occurred only once within a week after swap allocation, which led to the confusion), but there are people who have solved this kind of problem by this workaround.
Late update:
Actually, I tried the above-mentioned workaround a couple of weeks after posting the Edit (most probably because the problem reappeared again, but it was not frequent for sure). After modifying the grub file, the problem was resolved completely and I have not come across any type of freezing after that, so this workaround seems to be a good one! :) Sorry for the late update.


How to update a package from command line (gcc compiler)

Run this to remove the older gcc compiler

sudo apt-get remove gcc*

and then

sudo dpkg --force-all -i ~/Downloads/gcc-msp430_4.6.3~mspgcc-20120406-3_i386.deb; sudo apt-get -f install

:)


cryptsetup: waiting for encrypted source device /swapfile, fstab empty

If I don't miss anything, everything seems fine with your configurations. However it might help to regenerate initramfs while disabling the /swap file encryption.
Boot up the system using a live Ubuntu disk. mount these two partitions:
$ sudo mount /dev/sdc1 /mnt
$ sudo mount /dev/nvme0n1p2 /mnt/boot/efi

Open /mnt/etc/fstab and comment this line (add a # at the beginning):
/dev/mapper/cryptswap1 none swap sw 0 0

Open /mnt/etc/crypttab and comment this line (add a # at the beginning):
cryptswap1 /swapfile /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

Now we have to chroot into system and regenerate the initramfs:
$ sudo mount --bind /dev /mnt/dev
$ sudo chroot /mnt
# mount --type proc none /proc
# mount --type sysfs none /sys
# update-initramfs -k all -c

It's all done. exit from chroot environment:
# exit

Un-mount the mounted partitions and reboot:
$ sudo umount -R /mnt
$ sudo reboot

Now you lost the encryption on /swap. However I think you didn't want it in the first place. You might try these instructions without editing /etc/fstab and /etc/crypttab. That might work too.


I ssh into server A with a common username, when i try to ssh into server B with passwordless I am asked for a password

You have to enable ssh agent forwarding in order to enable key-based authentication on the second second server. I think a good description is in the GitHub SSH tutorial


You probably need to reduce your swappiness.

The kernel considers it better to use the free ram as cache rather then evict cache pages and have the ram marked as truly free. Growing the cache is generally a good thing.

Now the question arises what to do when all the memory is allocated to cache and your application needs more memory. Often the right thing to do is to evict a page from the cache and hand it over to your app but occasionally it is beneficial to swap out a rarely used page, give that to your app and keep the cache intact.

This process is loosely controlled by /proc/sys/vm/swappiness. For more information please check the excellent answers to Why most people recommend to reduce swappiness to 10-20? and How do I configure swappiness?.


I' m not sure if i can help you but... are you sure that you have the repository non-free activated?

Active all the repositories from software origins: multiverse & non-free.

If it doesn't help you, try to install these packages separately by sudo apt-get install or sudo aptitude install

I think you can use this command:

sudo apt-get install libqt4-dbus libgconf2-4


Why cant I enable Opengl with XFCE and Plasma and radeon driver?

It is because KDE (plasma) falls back to Xrender if

OpenGl fails because of an error or
it does not enable OpenGl because it detects that the graphics card or the graphics driver is not "safe" to run with OpenGl.

In ~/home/<user>/.kde/share/config/kwinrc the use of OpenGl can be forced by adding the following lines to the compositing-section:

UnredirectFullscreen=false
XRenderSmoothScale=false

If KDE runs fine then everything is ok, if KDE was right with fallback one will notice crashes of plasma.


Ubuntu 16.04 and 16.10 freezes most of the time as I'm switching between work-spaces?

When mine freezes, I press Super+L. It unfreezes the workspace switcher. Try it.


Extensions are irrelevant, you can name a file dead.letter and it can still print "hi".

The following terminal commands will create a file named hello.bin, make it executable and print "hello" when executed:

cat > hello.bin <<EOF
#!/bin/sh
echo Hello World
EOF
chmod +x hello.bin

Executing ./hello.bin gives:

Hello World

This is a shell script, interpreted by the /bin/sh program (which is actually the /bin/dash program on Ubuntu).

The following writes source code to hello.c, the following command creates a binary program from this code:

cat > hello.c <<EOF
#include <stdio.h>
int main(void) {
    puts("Hello World");
    return 0;
}
EOF
gcc hello.c -o hello.bin

Executing ./hello.bin gives you Hello World too.


There is a difference between changes in version of Ubuntu to changes within the version. You are comparing a distribution upgrade with a normal upgrade of packages.

Within a release there is some consistency. The underlying structure will always be Karmic. The kernel version may change from 2.6.32.x to 2.6.31.y, but not likely change to to say 2.6.32, unless you choose to upgrade the kernel yourself. The reason is that some people want minimal change. Those who want more change usually opt for a distribution upgrade.

BTW, do you realise that Karmic support is only for six more months? If you want to upgrade then it would be a good time to upgrade to Lucid which is LTS and has 2 1/2 more years of support, plus you get a newer kernel. :)


sed edit string between spefic paragraph in a file

Provided that your functions are delimited into paragraphs by one or more blank lines as shown, then you could use awk with an empty record separator. In particular, with GNU awk:
$ gawk '
    BEGIN{RS=""}
    /^function b/ {sub(/properties pro= "test"/,"properties pro= \"replace\"")}
    {printf "%s%s", $0, RT}
' a.txt
function a(
line 1;
line 2;
line ...;
properties pro = "test";
)

function b(
line 1;
line 2;
line ...;
properties pro= "replace";
)

function c(
properties pro= "test";
)

You can use non-GNU awk as well, but you will need to set a fixed output record separator ORS since the RT separator is GNU-specific.
Perl provides a similar paragraph mode via the -00 option.
With sed, you could use a regular expression address range to limit the scope of the substitution ex.
$ sed '/^function b/,/^)$/s/properties pro= "test"/properties pro= "replace"/' a.txt
function a(
line 1;
line 2;
line ...;
properties pro = "test";
)

function b(
line 1;
line 2;
line ...;
properties pro= "replace";
)

function c(
properties pro= "test";
)

However bear in mind that things that may be syntactically neutral in your "language" (such as blank lines within a function) may break this approach - for this reason, regular expressions are often a poor choice for such tasks.


Fix renamed boot directory from grub rescue

Boot with live USB or DVD.
Find the your system's  partition in Other Locations (XXGB Volume) and click on it.
It will mount the file system.
Find the UUID of your filesystem from /media/ubuntu/

run command on terminal:

sudo  mv /media/ubuntu/<your-partition UUID>/boot1 /media/ubuntu/<your-partition UUID>/boot

Shut down and (after removing the live DVD or USB drive) start.

If it does not boot normally then recover grub.


Ethernet-Connection ubuntu with VMware Player

Without further data, the easiest fix is to go into the VM's settings directly, select the virtual network adapter, and edit it so that it is using NAT.

This will let it communicate outbound via the host computer's connections which are already active.  (This is also the least headachey to set up)


Changing the background color of the File-Manager

You can install a "dark" GTK theme. Many popular ones are Numix, Delorean Dark, Ambience Dark, etc.

My personal favorite is delorean dark and here are instructions for installing that theme:

mkdir ~/.themes
cd ~/.themes
wget http://fc04.deviantart.net/fs70/f/2012/344/0/4/delorean_dark_theme_3_6_g__vs_2_56_by_killhellokitty-d5nnoxt.zip
unzip delorean_dark_theme_3_6_g__vs_2_56_by_killhellokitty-d5nnoxt.zip

You will need a tweak tool such as unity-tweak-tool and or gnome-tweak-tool to apply the theme.

sudo apt-get update
sudo apt-get install unity-tweak-tool gnome-tweak-tool

See my similar answer here.


You will have to install the 32-bit version. Although techincally possible, it is very hard to emulate an x86_64 (64-bit) architecture with a 32-bit processor. Some processors might support this, but I would recommend going with the 32-bit option.


How to open text, video, or picture files via terminal

If you wish to open files in graphical applications from the command line, such as within gnome-terminal or xterm then simply run:

xdg-open $file

And it will open $file in an appropriate application for that file. The argument can also be a URL, so

xdg-open http://askubuntu.com/

will open this site in your browser, and:

xdg-open mailto:someone@somewhere.com

should open your default mail program's composer, with someone@somewhere.com in the To: field.

If what you want to view videos on a virtual terminal, without Xorg, you can use mplayer with the directfb, fbdev, fbdev2, sdl (with the frame buffer back-end), or svga as the video output, by running

mplayer -vo fbdev2 file.mpg

For example. For still images, you can install the fbi package, and use it to display images on a framebuffer.


You can get access to the SIL repository following these instructions, then get the latest versions of kmfl-ibus and the IPA Keyboard package from the Ubuntu Software Center (searching for "kmfl" it should be one of the top results). Don't forget to log out and in.
For future reference, this page shows IPA keyboards for Windows, Linux, and Mac.
From the keyboard logo in your upper toolbar, which is hopefully there now, choose preferences, input method, select an input method, other, and IPA Unicode KMN, then click Add. You can choose how you switch from and to IPA from the "general" tab.
Good luck!
Good luck!


First you need to check the output of ifconfig -a and see how many interfaces are listed. Do you have anything for "eth0"?

if not, then do
sudo vi /etc/network/interface
place the following lines (make sure to change the IP address according to Your Network Range at home as your router may broadcast 172.2.0.0 network or something else.)

auto lo
iface lo inet loopback
# Primary Network
iface eth0 inet static
address 192.168.2.13   #this ip might be different according to your router
netmask 255.255.255.0
gateway 192.168.2.1
network 192.168.2.0

Now do

  sudo /etc/init.d/networking/restart

You may have to restart the PC. I hope this helps. Please enter the result whatever you get after doing all this.


The swap space will not move the swapped out pages back into the physical RAM until the processes that are using that memory access it again. So, especially if you are letting the computer idle, you will most likely never see all the swap emptied.
There are two ways to clear the swap:

Disable swap. During this process, the pages will be flushed back to
RAM. Then you can re-enable it.
Force every idle process to actively make use of whatever was swapped out.

Number 2 is nearly impossible, and number one is unnecessary. So, since whatever was swapped out is not even trying to use whatever is stored in that memory, I would not worry about having some swap usage - it is completely normal and will not affect your performance since the swap is not being actively "used".


Get both Graphics cards working on two screens

Source, Unix & Linux

I finally got this working, 2 Graphics Cards (nVidia GTS 450) with both screens on DVI.

Here is my xorg.conf:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"

    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Acer S220HQL"
    HorizSync       31.0 - 82.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 450 GTS"
    BusID          "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "CRT-0"
    Option         "metamodes" "GPU-56281125-01c7-ee85-b8b9-b3e5cf94b7c5.GPU-0.DVI-I-0: nvidia-auto-select +0+180, GPU-cbc59e3f-e8c1-a347-a069-b62f6b885f7d.GPU-1.DVI-I-0: nvidia-auto-select +3600+0 {rotation=right}, GPU-cbc59e3f-e8c1-a347-a069-b62f6b885f7d.GPU-1.DVI-I-3: nvidia-auto-select +1680+180"
    Option         "MultiGPU" "Off"
    Option         "SLI" "off"
    Option         "BaseMosaic" "on"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Note that it only references 1 GPU, so it doesn't need another X Screen.


Fresh install of 16.04 LTS extremely slow with ATI ES1000 GPU

As per the comments, the issue turned out to be that the OP's video card had only 64MB of VRAM, and didn't even have any hardware 3D acceleration at all.

Unity being a 3D desktop environment, it absolutely brought the GPU to its knees.

The solution was to install a 2D desktop environment, such as LXDE.


I couldn't find 3.2 in the official repositories for 12.04 and also no PPA on Launchpad. It seems that you need to install the latest non-LTS release (version 3.2 is in 12.10 and onward, but you don't want to upgrade through all non-LTS releases later) or at least the corresponding packages for calendarserver.

The safest way would be to wait for the 14.04 release.


Import pictures into ubuntu Shotwell from Windows XP

First make sure that Ubuntu can see the Windows partition and make sure it's mounted (you can also do it through Shotwell).

I assume Windows and Ubuntu are on the same PC?

With Shotwell open, go to "File" (my desktop language isn't English, but the words should match quite closely) in the top bar and choose "Import from map".
Go to the map on your Windows partition, find the folder(s) you want to import and press "OK" once they are selected.
It should now prompt you to ask if you want to copy the pictures to Ubuntu or not: choose whatever option you like. Now they should be imported and/or copied.

If you chose not to copy the pictures, you will need to make sure the Windows partition is mounted every time you want to use Shotwell.

Edit: In case I misunderstood, the other way around isn't possible (while you are logged in on Windows), as far as I know, since Windows doesn't recognize GNU/Linux (and other non-Windows?) partitions.


Why is Ubuntu capturing space after uninstallation?

You should consult the Wubi documentation on manually uninstalling Wubi here

It explains how to remove all files and registry entries.


Ubuntu 18.04 with NVIDIA Titan V nvidia-396 disables GPU hardware acceleration

Reverted to nvidia-390 driver using run file from NVIDIA website instead of apt install. Worked! Took some time to get here, but the graphics are truly awesome :)


grub can't launch Windows 10 after Ubuntu 14.04 LTS installation

You see only the Windows bootloader in UEFI mode bacause that's the only bootloader installed for UEFI mode, the grub sitting in the MBR is totally ignored.  Since the UEFI bootloaders are just files, you can copy them to where they're needed.  Boot Ubuntu (in CSM mode since that's all you can do), and install the packages:

apt-get install shim-signed grub-efi-amd64-signed

That should at least put copies of the bootloaders into the following locations:

/usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed
/usr/lib/shim/shim.efi.signed

(You could ignore the shim.efi since you're running with secure boot off, but I'd set it up so it runs either way)
You can try running the grub-install, but it's probably not the UEFI grub2-common version, so do the following:
Make a mount point for the EFI partition in /boot/efi (assuming it's not there), and put that into your fstab (use your UUID, not the one below, or just use /dev/sda1).

sudo mkdir /boot/efi
UUID=7A11-7B8B                            /boot/efi      vfat    defaults        0       1

Mount the Partition there:

sudo mount -tvfat /dev/sda1 /boot/efi

Copy the bootloaders into the hard disk's default, preserving the existing one (which is Windows')

sudo mv /boot/efi/EFI/Boot/bootx64.efi /boot/efi/EFI/Boot/bkpbootx64.efi
sudo cp /usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed /boot/efi/EFI/Boot/grubx64.efi
sudo cp /usr/lib/shim/shim.efi.signed /boot/efi/EFI/bootx64.efi

Put a grub.cfg stub file into /boot/efi/EFI/ubuntu/grub.cfg.  This file just brings in the maintained grub.cfg from the /boot/grub location.  An example below (change the UUID and disk partition)

 search.fs_uuid 4e9797fa-2b51-4c8f-9a5c-37ee2cbf88ad root hd0,gpt4
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

This might be enough to actually boot (it is on a removable media like a USB).  Try to boot in UEFI mode choosing the hard disk entry.

The usual install will put the bootloaders into /boot/efi/EFI/ubuntu
and set up a nvram entry to run them. Copy the signed versions of grub and shim to /efi/EFI/ubuntu removing the ".signed" and the grub.cfg file as above.  Use efibootmgr to set up the entry.  At some point, you might want to clean out the old grub-pc and install the grub-efi-amd64 package, but the above should be enough to get you running.


Where can I find power manager program in Lenovo Thinkpad E530 edge?

Unfortunately there is not a good official  power manager for Ubuntu like Windows but there is a unofficial power saving program for Asus EeePC Netbooks that works for other laptop well. Jupiter is an appindicator designed to improve laptops / netbooks battery life. It can be used to switch between maximum, high performance and power saving modes, change the screen resolution and orientation, enable or disable bluetooth, touchpad, WiFi (if available) and so on.

Install Jupiter using the following commands:

sudo add-apt-repository ppa:webupd8team/jupiter
sudo apt-get update
sudo apt-get install jupiter

Have a nice time.


Wi-Fi is active in monitored, but Wi-Fi Lamp Indicator isn't turned on

If the wifi is physically on and the led light is not then you could try resetting the wireless hardware by doing this in a Terminal window:

sudo rfkill list

...this will clear a soft block on the device and should bring it back

sudo rfkill unblock all

...this will clear any block in place for all devices found...


The postgresql package is just a tiny transitional package which has a Depend set on the real package.

postgresql-8.4 is the real package, is that installed? (it should be, since the one you installed depends on it).

Also, it looks like postgresql simply doesn't have an init.d script. Try:

service postgresql start


Update all software with update manager XUbuntu 12.04.1 without updating kernel

You can use an apt hold for this.

Running:

sudo apt-mark hold <package-name>

This will tell the system to hold that package at its current version no matter what.  Running:

sudo apt-mark hold linux-image-$(uname -r)

Should hold the currently running kernel version. You can unhold it with apt-mark unhold.  Note that holding the kernel can cause unexpected consequences.


The working config:

geo $upstream {
        default backend-1;
        192.168.0.150 backend-1;
        192.168.0.250 backend-2;
}

upstream backend-1 {
   server 192.168.0.101:8080;
}

upstream backend-2 {
   server 192.168.0.102:8080;
}

server {
        listen 80;

        location / {
        proxy_pass http://$upstream;
        proxy_redirect off;
        proxy_set_header Host               $host;
        proxy_set_header X-Forwarded-Host   $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Real-IP          $remote_addr;
        proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
        }
}


Here is my working one.  There is a workaround for the fore mentioned IPv4 issue.

# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftp"
TFTP_ADDRESS="[::]:69"
TFTP_OPTIONS="-4 --secure --create"

The --create allows users to upload without having to do a touch.


Set "Allow executing file as program" as default when files are added to a folder later

See man umask. It says, in part:

trusty (1) umask.1posix.gz
Provided by: manpages-posix_2.16-1_all bug

NAME

       umask - get or set the file mode creation mask

SYNOPSIS

       umask [-S][mask]

DESCRIPTION

       The  umask utility shall set the file mode creation mask of the current
       shell execution environment (see Shell Execution Environment )  to  the
       value specified by the mask operand. This mask shall affect the initial
       value of the file permission bits of  subsequently  created  files.

What this means, is that when a file is created, it starts off assuming its permission wil be 777, rwxwrxwrx, Read, Write and Execute access for Owner, Group and World. But then, the "mode bits" (another name for "permission  bits", but shorter) are ANDed with the COMPLIMENT of the umask value. If one sets umask 022 (in ~/.bashrc, or in the current shell, to affect that shell) then the operation is:

 777    Original mode bits  0B111111111
 755    Compliment of 022   0B111101101
-----   AND
 755    The result, rwxr-xr-x (Read, Write, Execute for Owner, Read, Execute for Group and World

Another common umask value is 027 (NO access for World).

This is a tricky idea, and deserves understanding. I remember being confused for weeks about this back in the 1970s when I first ran into Unix.


Ubuntu Studio: No sound in audio production programs

If you haven't already, go through this introduction. It might solve your issues.


I am having the same issue with the exact same model. Dell Inspirion 15 7559 with 6th gen intel i7, nvidia geforce gtx 960m.

Will post if successful...

(Be sure to read everything below this line.)

EDIT: Got it working
So the problem is with the new processor architecture not being fully supported by this version. (6th gen Intel requores Linux 4.3 .) Here is anew article explaining why and how to fix it in a less concise way: http://www.phoronix.com/scan.php?page=news_item&px=intel-skl-prelim-support

Here's what you do:

when grub shows up, press "e".  There should be a line starting with linux, add the word nomodeset to the end of this line.  This is a kernel parameter, google it if you want to learn more.
You will have to repeat step 1. when the installation completes and the system reboots.
Choose option 1 or option 2.

OPTION 1:

Do the system updates and activate drivers for the NVIDIA 960.

OPTION 2.... Make it permanant, use default drivers:

modify /etc/defaults/grub so that GRUB_CMDLINE_LINUX_DEFAULT includes nomodeset:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

run $ sudo update-grub in the command prompt

EDIT: fix update-grub command

EDIT: Addendum: After installing updates and activating the 3rd party drivers for nvidia, I was able to remove nomodeset from the boot parameters, so making nomodeset permanent is probably unwanted ^_^.

Final Edit: I now have the installation working perfectly.  In addition to the steps I listed above, you also need to disable secure boot in the BIOS.  If you do not disable secure boot, Windows will override the bootloader and prevent ubuntu from installing.

I ran into an issue where I had installed Ubuntu, could see the partition, but it wouldn't boot after I had started Windows 10 once. After turning off secure boot, I ran boot-repair from a usb running ubuntu, which fixed the boot loader and WIndows hasn't overriden it again. I can also use linux without having it plugged in, which was an issue in the past installation, probably related to secure boot. (NOTE: There is an option at the top level of the UEFI menu to turn secure boot off and revert to legacy bios, do not choose this option.  There is another menu where you can configure these independently of each other.)


Ubuntu freezes abruptly. I have to switch over to one of the tty and then back to tty7 in order to unfreeze it. How can I solve the problem?

DO NOT FOLLOW ANY ADVICE TO DELETE COMPIZ!

I had the same problem after tweaking compiz.  Unfortunately I followed someone's advice to delete compiz and destroyed my installation.  The solution I found was to install Ubuntu again.  When I chose LVM to look at the layout, it wiped my drive without warning.  It is the only option that does not give a warning once you have continued after checking it.

If you originally partitioned the /home on a separate drive, I have been told you can select the same partition for /home on the new install without losing the current data and settings.  However, you may have some tweaking to do to get some apps to cooperate.


Unable to browse internet in Genymotion via VM

If you want to connect your device to a network, apparently Genymotion requires a licensed version which costs about $299. If you find a solution, please let me know. I like Genymotion emulator, and the Android Studio emulator is way too slow.


How can I gain ownership of a partition which mounts on boot up please? Ubuntu 14.04 LTS

Many many thanks for all the input - Im truly grateful.

I've managed to resolve all the issues about accessing and mounting "Disk2" etc

I edited fstab thanks to Maythux and commented out the offending lines. Special thanks to user5570 for your patience with my ignorance.

/|\
paul


Lost Windows 7 in GRUB after installing Ubuntu 14.04

I just encountered the same problem after installing Kubuntu 14.04 on top of a (broken) 13.10. I found this tiny solution to recover the grub functionality:

Just open a terminal and enter

sudo update-grub


How can I make Mouse/Keyboard drivers to work?

use a virtual machine running windows & Trust drivers to configure it
Dual boot with windows.
Sorry linux can't adjust DPI or the RGB lighting of your mouse :(


Open the terminal and type:

sudo apt-get install imagemagick
identify 'path/to/image1.bmp'
identify 'path/to/image2.bmp'

Sample output:

/home/noah/Pictures/image1.bmp BMP 2515x2520 2515x2520+0+0 8-bit PseudoClass 256c 6.341MB 0.050u 0:00.019


Why do my udev rules run if I use udevadm trigger, but NOT at boot time?

I actually have a way that will wait just the right amount of time, not an arbitrary 30sec. I did it on Raspberry Pi to automatically mount all connected USB disks upon connection but also on boot time.

The rule is similar to yours:

$ sudo cat /etc/udev/rules.d/10-usb_automount.rules
KERNEL=="sd*", RUN+="/home/pi/bin/usb-automount"

Now the script is actually a recursive call (and I know this is evil):

$ cat /home/pi/bin/usb-automount
#!/bin/sh

ROOT_RW=`mount | grep 'dev/root' | grep -E '\(.*rw.*\)'`

if [ -z "$ROOT_RW" ]; then
 sleep 3
 /home/pi/bin/usb-automount & disown
else
 /home/pi/bin/usb-automount.sh
fi

Note that the "grep 'dev/root'" is specific to Raspbian OS, so on Ubuntu you will need to design your own grep to detect the rootfs (or even better design some universal grep). Notice that the script will call itself in the background and exit and only if the rootfs is "rw" will call the right mounting script. The script "/home/pi/bin/usb-automount.sh" does the actual mounting or in your case the logging.

Note this script still takes 3 seconds to execute, so you may further optimize by changing to:

if [ -z "$ROOT_RW" ]; then
 ( sleep 3; /home/pi/bin/usb-automount ) & disown
else
 /home/pi/bin/usb-automount.sh
fi

However I never checked that and do not know if this will work as expected (I am no scripting guru).


Change how the volume scales? (The loudness of the sound at 100% volume)

Run paprefs command. In the "PulseAudio Preferences" window, goto "Simultaneous Output" and check the checkbox "Add virtual output device...". Close the window.

Run pavucontrol. In "Output Devices" select "Show: All Output Devices" (if not already selected). Make the virtual device "Simultaneous output to..." your default device (click on the green button on the right). Now your volume controls should work on this device.

Set the output level of your physical output device to 30% or whatever fits your needs.

If everything is correct, now the output volume control should be finer, as 100% of the default "simultaneous output" should be the 30% of your physical device.

If your PA database has remembered the (physical) output device for some applications, you might have to change that in the "Playback" section of pavucontrol when your application is running.

Remark: This is working for 16.04 with xfce4 volume control. Maybe you have to manually modify something in unity to have your volume controls modifying the PA default. You could also play around a bit with pavucontrol to see what can be done, especially with virtual devices.

Edit:

Usually, after having checked the item in paprefs, and reboot, the virtual output device should be displayed. If you cannot (or don't want to) reboot or
if the output device "Simultaneous output..." is not listed, maybe the corresponding PA module "module-combine-sink" is not loaded. You can check with pacmd list-modules; there it should be shown like

$ pacmd list-modules
26 module(s) loaded.
.
.
    index: 26
    name: <module-combine-sink>
    argument: <>
    used: -1
    load once: no
    properties:
        module.author = "Lennart Poettering"
        module.description = "Combine multiple sinks to one"
        module.version = "8.0"

(your configuration and therefore the numbers may vary).

Ifit is not listed, you can load the module with

$ pacmd load-module module-combine-sink

It then should be visible to the output tab immediately.


Error message "E: unable to locate package firmware-b43-installer"

Well, you have to have an internet connection somehow.  Then you need to add the software source(repositories) needed for the b43.  Make sure that they look like the image below.  Make sure that you have a check mark just like the image.

Then To install the firmware, Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo apt-get install firmware-b43-installer

Another way is to open Synaptic and go to Settings > Repositories and enable as shown in the image above, and then search for b43 and install your packages.

All that of course after adding the software source(repositories)

Note: If you don't have Synaptic Package Manager installed, you can do so by clicking below.


How can the X root window be seen instead of the Unity desktop?

install fwm or metacity
copy .xintrc from /etc/X11/xinit/xinitrc to /home/user/
add line to /home/user/.xinitrc as exec fwm or exec metacity
edit /etc/default/burg as GRUB_CMDLINE_LINUX_DEFAULT="text"
restart
login with username and password
run startx


Why are many files appearing as 0B on external HFS+ hard drive?

the HFS+ file system can compresses files and replaces them with 0byte files (also called sparse files) that are like symbolic links.

you can use du with --apparent-size option to see the real size of those files.


Removing Firefox in Ubuntu with all add-ons like it never existed

Delete Firefox and all it's data:

I think this can be done in six easy steps, please edit my answer - or tell me to - if it's not complete:

run sudo apt-get purge firefox
Delete .mozilla/firefox/ in your home directory, should it still be there
Delete .macromedia/ and .adobe in your home directory, these can contain "Flash Cookies" stored by the browser. The same is true, if applicable, for Silverlight (Moonlight) and other plugins, they can allow websites to store data on your computer.
Delete /etc/firefox/, this is where your preferences and user-profiles are stored
Delete /usr/lib/firefox/ should it still be there
Delete /usr/lib/firefox-addons/ should it still be there

Mind the periods in front of file- and directory names: They indicate a hidden directory. You can tell your File Browser to show them by pressing Ctrl+H.

The 4th and 5th step must be done with superuser privileges. To start a the File Browser as a superuser, press Alt+F2 and enter gksu nautilus.

Finally, restart your computer to get rid of all temporary files. This should remove all traces of firefox ever being there.

Important:

Don't rely on this method if you've got sensitive information to protect! Deleting a file, in most cases, only means deleting a reference to it. The raw data will still be on your hard drive, and the proverbial bond-villain will be able to recover them. I'm only mentioning this in case it's applicable to anybody who reads this. The only way to really get rid of data, is to shred the hard drive to bits.


Ubuntu One Windows beta: how can I set the synchronized folders?

I think you can't. It synchronizes My Documents\Ubuntu One, but there is no settings for changing this or adding multiple locations.


How to view huge text file via Vi or gedit

Don't use a text editor for viewing text.

There are better tools:

View files with less (Scroll with Space, End, Home, PageUp, PageDown; Search with "/something" ; Leave with q).

From less manual:

  Less does not have to read the entire input file before starting, so with large input files it starts up faster than text editors like vi (1).

Usage:

less wordlist.txt

Consider the use of less -n:

  -n or --line-numbers:

  Suppresses line numbers. The default (to use line numbers) may cause less to run more slowly in some cases, especially with a very large input file.  Suppressing line numbers  with  the -n option  will avoid this problem.

(thanks for suggesting -n option @pipe)

Use grep to get only the lines you're interested in:

# Show all Lines beginning with A:
grep "^A:"  wordlist.txt

# Show all Lines ending with x and use less for better viewing
grep "x$"  wordlist.txt | less

Use head or tail to get the first or last n lines

head wordlist.txt
tail -n 200 wordlist.txt

For editing text, refer to this question.


Issues installing Komorebi on Ubuntu Desktop 20.10 on a Raspberry Pi 4 8 GB

After taking a look the software is built for AMD64 but the pi uses ARM64 and is incompatible.


On my Xenial system gnome-system-monitor is fairly straightforward to build from source. First allow access to source code:

Dash > Software & Updates > Ubuntu Software >  Source Code

Then allow the system to reload the repositories. Pick up the build dependencies for gnome-system-monitor by running the following from within a Terminal window:

sudo apt-get build-dep gnome-system-monitor

Then download, compile and install gnome-system-monitor with the following single command which can be copied and then pasted into a Terminal window:

sudo apt-get install build-essential checkinstall && \
mkdir -v $HOME/Desktop/gnome-system-monitor_build && \
cd $HOME/Desktop/gnome-system-monitor_build && \
wget https://download.gnome.org/sources/gnome-system-monitor/3.20/gnome-system-monitor-3.20.1.tar.xz && \
tar xvf gnome-system-monitor-3.20.1.tar.xz && cd gnome-system-monitor-3.20.1 && \
./configure && make && \
sudo checkinstall --pakdir "$HOME/Desktop/gnome-system-monitor_build" \
     --backup=no --deldoc=yes --pkgname gnome-system-monitor --pkgversion 3.20.1 \
     --fstrans=no --deldesc=yes --delspec=yes --default

Log out and then back in (or simply open Dash, close it and then reopen it) and you should then see the following, (a screenshot taken from my own installation on Xenial Xerus):

Runs nicely on my system and when a new version is released this method can easily be tweaked to install the very latest version :)


All printouts condensed into left half on a Samsung Color Laser printer CLP-365W

I had the same problem with CLP-360 on x86_64 laptop. (On x86 all is OK.)

I fixed it using the following driver on cups:

Samsung CLP-340 Series (SPL-C) (color, 2-sided printing)


If I install a GRUB backup on USB flash will it affect my current system GRUB?

If you can unplug or disconnect the internal drive, it is rather easy to install Ubuntu (or I would prefer the ultra light-weight Lubuntu) into a USB pendrive.

See this link, How do I install Ubuntu to a USB key? (without using Startup Disk Creator)

When you have that system, and know that it works, you can turn off the computer and plug in the internal drive again.
Boot into the system installed in the USB drive and run the following command

sudo update-grub

This way, the system should find the operating system(s) in the internal drive and create menu entries for them in the grub menu (of the system in the external drive).
Test that it really works by rebooting and selecting a menu entry for a system in the internal drive.
If you are booting in UEFI mode and dual boot with Windows: Please avoid booting Windows from the internal drive, while the USB drive with your new system is connected. It might destroy the USB drive's boot system.


Often the easiest way around such problems is to reset the vlc settings to default. Run the following from a Terminal window:

vlc --reset-config

This may be enough to change vlc's odd behaviour...


Using ubuntu-device-flash on a Nexus N7 only installs the rescue system

Please note that there is only limited device support for Ubuntu Touch:

> 2014/08/10 22:23:42 Device is |grouper|

What hardware does Ubuntu Touch support?

also http://developer.ubuntu.com/start/ubuntu-for-devices/devices/


How to automatically switch sound output to Bluetooth headphones?

Might not be your final goal, but as a workaround, you could use a little app called Sound Switcher Indicator.

Sound Switcher Indicator is a sound input/output selector Ubuntu AppIndicator. It allows switching the current sound input and output (source and sink) as well as the specific output port with just two clicks.

Install Sound Switcher Indicator in Ubuntu

Sound Switcher Indicator is currently available in a PPA for Ubuntu users. Add the PPA and install it using the following command:

sudo apt-add-repository ppa:yktooo/ppa
sudo apt-get update
sudo apt-get install indicator-sound-switcher

Refered article:
http://www.webupd8.org/2014/02/sound-switcher-ubuntu-indicator.html


The relevant program should be "onboard". You can install it by:

sudo apt-get install onboard

and launch it with "onboard" or from the Dash. I have Xubuntu here so I cannot check, but should be possible to enable it under "assistive technologies" or similar in the menu.

The panel icon let you access an extensive set of features. Never tried it (I do not have a touchscreen PC) but seems ok --- I used it sporadically to type things that could not type in a remote VNC session for layout problems.


Understanding Ubuntu juju installed in Amazon Cloud

Typically a Juju instance is bootstrapped and managed from a client such as your local machine.

You will want to take a look at the documentation: https://jujucharms.com/docs/stable/ and for configuring for aws: https://jujucharms.com/docs/stable/help-aws

You may also want to take a look at juju-quickstart it's run from your local Ubuntu machine and deploys the Juju GUI as well onto the bootstrap node. The Juju GUI cannot yet however deploy using --to (see below)

Every time you run juju deploy or scale up a service Juju will, by default create a new instance.

To deploy to a single instance you use the --to option

juju deploy mysql --to 23 where 23 is the machine number.

You can find the machine number in the juju status output.

You can find more information on deploy using juju help deploy from your local machine with the Juju client installed.


How can I create launcher icon for PhpStorm?

Run Tools —> Create Desktop Entry in top menu of IDE.


Temperature sensor showing really high temperature

Install  the packages lm-sensors with

sudo apt-get install lm-sensors

then type

sensors

This give you a list of Adapters and the assigned sensors.


Example, Ubuntu 16.04 : fonts-droid http://de.archive.ubuntu.com/ubuntu/pool/main/f/fonts-android/fonts-droid_4.4.4r2-6ubuntu1_all.deb

cd Downloads/ && sudo gdebi ./fonts-droid_4.4.4r2-6ubuntu1_all.deb


Can I switch between tabs with custom keyboard shortcuts?

Such key bindings are defined within each application individually. If you can switch between tabs with custom keyboard shortcuts or not depends on whether the application exposes a way to assign or change keybindings,
At least Files, Text Editor (gedit) and the browsers Firefox and Chromium have some predefined keybindings that resemble what you are looking for. Press Alt+Number to move to the 1st, 2nd, 3rd tab. These applications, however, do not expose ways to change these keyboard shortcuts.


Where is key binding for Ubuntu Desktop help?

You can try from System Settings, select Keyboard and then go the Shortcuts tab. From there you can check which keys are bound to Sound and Media actions.

If there is some mismatch you can set the right key.


How do I go from Ubuntu 14.04 to Windows?

First, try to determine if you have Windows still on that laptop. Open a terminal with CtrlAltT and run blkid. If you see an entry there that has TYPE="ntfs", then you've still got windows on that laptop. If you don't--the only option is to install windows after having purchased a license and appropriate method of installation--usb or cd.

If you have an ntfs entry, then reboot the laptop, when the system starts up, hold SHIFT key and you should enter the OS selection screen (commonly known as grub). There you will find an entry for Windows.

Chances are you're gonna need to reset windows password. If that's the case, use one of the recovery tools. My personal favorite is Trinity Rescue. I keep it on a cd (for those lovely moments when i forget my windows password), but you can use usb as well.

Good luck !


I would suggest downloading Gparted  and creating a boot disk.  This will give you a simple method of creating, deleting and resizing disk partitions.  The following links may help:

Gnome Partition Editor

GParted partitioning software – Full tutorial

Manual partitioning

In addition, since you are concerned about maintaining the integrity of your system/data, if you don't already make regular backups, I would suggest that you do so prior to changing the disk structure.


How to launch .sh from third party program?

Running bash files

To run an .sh (bash) file, you have two options

Force run with bash

$ bash /path/to/file.sh

Allow execution

$ chmod +x /path/to/file.sh
$ ./path/to/file.sh

Typically, files downloaded from the internet are not marked as executable (+x) until you specifically mark them so.

Creating "Shortcuts"

You may want to create a "Shortcut" or clickable icon that launches your games

gnome-desktop-item-edit ~/Desktop/ --create-new

To ensure that the file runs, use the bash /path/to/file.sh method when inputting the command.


cups-pdf stops working after reboot on ubuntu 13.04

It is completely silly bug and is related to ownership or similar. In any case after reboot cups-pdf gives 2 errors "failed to create directory (/var/spool/cups-pdf)" and "failed to create spool directory (/var/spool/cups-pdf/SPOOL)". These directories are necessary for cups-pdf. If you create these directories manually then cups-pdf works again

In any case I found a solution that I added 2 lines to a startup script in "/etc/init.d/pcscd" (you can use other script too - for exemple "saned"):

mkdir /var/spool/cups-pdf
mkdir /var/spool/cups-pdf/SPOOL

I added these lines just in the start of the script - immediately after the lines with #

I know it is not correct way to do this but I cannot figure out how to repair this bug.


I had the same problem. Found this report on Launchpad: https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/1276379


you have an error when running the command

$ distro-info --lts

The esm fields got added a while ago and your system seems to have a mismatch between the data file (containing the data) and the program that reads it.
From your log one can assume the .csv is new but the tool is old.

Please check your packages if they are both on the latest version

$ sudo apt update
$ apt-cache policy distro-info distro-info-data

If not please update them and it should work again.

In case you don't want to care about distro-info you might also specify the release yourself, then uvtool will not call distro-info. As an example the more explicit uvtool calls:

$ uvt-simplestreams-libvirt --verbose sync --source http://cloud-images.ubuntu.com/daily arch=amd64 label=daily release=focal
$ uvt-kvm create --password ubuntu f-test1 arch=amd64 release=focal label=daily

Or you can instead of uvtool use the newer tool multipass


Duplicate Packages Error in Ubuntu 14.04

In the Ubuntu Software Center select the menu entry Edit -> Software Sources and

under the Other Software tab try to remove the duplicate entries.


To copy that file to the /usr/lib/mozilla/plugins directory, the correct command should be

sudo cp libflashplayer.so /usr/lib/mozilla/plugins/

(note the / before usr)

If you accidentally screwed up your /usr directory though, things could get more complicated.

You shouldn't have to (and really shouldn't) download and install the Flash plugin manually; Ubuntu has a Flash plugin installer that does all the work.


Date of install regular programs while installing system

You can run the following:

cat /var/log/apt/history.log | grep -B 2 firefox

And it'll show you the dates of installations/upgrades/removals.  Note that if your log is very large, it will be rotated and archived in a file like /var/log/apt/history.log.1.gz

Unfortunately this doesn't show if it was installed during system installation.  This information is much harder to get.  You can view the modified date of the firefox binary, but that may have been modified afterwards, by an upgrade for example.

It's safe to assume that if it's not in the history.log files, that it was installed with the OS.  You can check a few things here.

First,

`sudo dumpe2fs /dev/sda1 | grep 'Filesystem created:'`

This will show you when the filesystem was created, but, if you reinstalled Ubuntu at some point and left the filesytem intact, it will still show the original date.  So this is not really good.

Second,

`ls -lt /var/log/installer`

will show oldest file on the bottom.  If the package is not in the very first cat command at the top of this answer, then it's safe to assume it was installed with the system, on the last date found using the ls command above.  Having the FileSystem date and the last date on the bottom of the ls command match, will confirm the date even more.


Steam not working with open source drivers

This problem is caused by the Steam's old bundled version of libstdc++.

Possible solutions:

(from https://github.com/ValveSoftware/steam-for-linux/issues/3273) Redirect steam runtime's symlink for libstdc++.so.6 to the systems. Replace XX with the version of your system's libstdc++.
You need to update this when libstdc++ is updated.

$ ln -sf /usr/lib/libstdc++.so.6.0.XX ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6

(from http://chapeaulinux.org/forums/topic/steam-not-working-in-chapeau-22/) Preload the system's libstdc++ before running steam.

$ LD_PRELOAD=/usr/lib/libstdc++.so.6 ; steam

The last solution can also be put in a script:

sudo mv /usr/bin/steam /usr/bin/steam.orig
echo -e '#!/bin/sh\nexport LD_PRELOAD=/usr/lib/libstdc++.so.6\n. /usr/bin/steam.orig $*'>~/mysteam
chmod +x ~/mysteam
sudo ln -s ~/mysteam /usr/bin/steam

(from search for how-to-fix-broken-steam-linux-client-with-radeon-graphics-driver-workaround/) Create a script to run steam with the system's version of libstdc++.

#!/bin/bash
export LD_PRELOAD='/usr/$LIB/libstdc++.so.6' #Export so all child    processes are affected as well
export DISPLAY=:0
#export LIBGL_DEBUG=verbose
steam

Save this as e.g. run-steam.sh. You must start steam through this script.


Install dependencies with apt-get without making them independent if already installed

You said

  When I use apt-get to accidentally install a package which is already installed as a dependency of another package, it breaks that "dependency" by marking the package as manual instead of auto

I think, you got it slightly wrong. It will not break the dependency chain. The other package still depends on this marked as manual package. The only thing that is affected is that, if you now run apt-get autoremove these marked as manual packages won't get removed. Because, for apt marked as manual means user installed them deliberately, not because User wanted other packages which in-return depended on these packages.

You asked

  Is there a way to tell apt-get (or aptitude, dpkg, or another tool) not to break the link in the first place or to do nothing if the requested package is already installed?

I haven't found any tools to do so automatically until now. But this doesn't sound logical either. Because, in that case it will be like every packages you're installing will be automatically installed, making them vulnerable to apt-get autoremove command.

So, If you want some package to be marked as automatically installed despite being installed manually, you must use apt-get markauto or aptitude mark-auto.


OpenVPN missing in "connection type dialogue" in Ubuntu 13.04

You have to install the package network-manager-openvpn-gnome. You can search for it in Software Center or just open a terminal (Ctrl+Alt+T) and run:

sudo apt-get install network-manager-openvpn-gnome


Answer:
libertine-container-manager exec -i CONTAINER-IDENTIFIER -c "nmap --help"
Answer found in the docs here


There's several 'pockets' in the Ubuntu Archives that represent different types of support: packages in main are supported by Canonical while packages in universe are supported by the community.

Packages must be in main to be in the default installs of Ubuntu.

During the development cycle developers can propose packages to include in main. Part of this process determines if a package may be security relevant (eg run with privileges but interact with untrusted users, parse complicated formats, etc) and if so, asks the Ubuntu Security Team to perform a quick security review. I do many of these reviews.

I can't give each proposed package a full in-depth audit. I'm looking to quickly learn if a package appears to have been developed in a professional manner with modern safe programming standards.

We inspect the binary outputs to make sure that compiled programs and libraries have been compiled with standard security mitigations like Position Independent Execution support for better Address Space Layout Randomization, Stack Canaries, Fortify Source (catches a handful of common C problems), and Bind Now and RELRO (mitigates exploits that abuse symbol linking). (We have a mitigation for the Stack Clash flaw turned on, as well as support for Intel's Control Flow Integrity checks in some newer processors, but hardening-check doesn't yet know how to check for those.) We also verify any sudo rules, udev rules, setuid or setgid bits, packaging scripts, startup scripts, etc., to make sure the package doesn't have unexpected sources of privilege.

We inspect the source code with automated scanners such as Coverity, cppcheck, and shellcheck. We wrote simple tools to help us spot common programming flaws (these tools aren't intended to detect flaws but provide a very quick way to inspect eg all memory allocation routines, all networking routines, all use of privileged operating system functions, etc) that allow us to quickly browse lines of code in the package that are likely to have flaws.

We may find flaws but more importantly we'll learn if the developers were properly defensive when writing code. We'll get a feeling for how the software works, how it was developed, and what threat model the authors have in mind.

We occasionally run fuzzing. (Running the fuzzing is the easy (and fun) part -- to get any value out of this, the crashes also need to be investigated far enough to fix them. This is the expensive part. I'd like to do more of this in the future but far more valuable is for people to contribute fuzz testing to the project that can be run in the oss-fuzz infrastructure, and provide results directly to the authors. Same goes for Coverity -- running Coverity directly on every commit and getting emails when new issues are added is more valuable than a single "here's a list of issues Coverity found".)

Depending on what we find in the audit, we may accept the package as-is, or we may ask for changes, or we may not accept the package into main. Some project authors have been fantastic to work with and go above and beyond to address feedback. (Nearly all project authors are happy someone is reading their code and providing feedback.)

All these steps are one-time tasks that determine which packages go into main.

The Ubuntu Security Team performs daily CVE Triage tasks. We have a database of CVEs that we use to track which packages are affected by which flaws, in which releases of Ubuntu, which versions are fixed, where fixes can be found, supporting documentation, mitigations that may help reduce the importance or impact of problems, and the priority we'll use when determining which packages to fix next. We collect data from MITRE, NVD, Debian, mail lists (public and private), etc.

Security researchers and users report issues to us; we investigate as we can, and forward issues to upstream developers when appropriate.

Packages in main get full security support: we backport patches from upstream authors, write patches, and test the packages to reduce the risks of introducing regressions. We can't catch all regressions but our wider perspective allows us to catch some regressions that upstream developers can miss. As limitations or regressions or incomplete patches are found we work with upstream developers and the wider community as needed to improve fixes.

Packages in universe are community supported: members of the community will prepare fixes for issues, build the packages, test the packages, and give us patches to build and distribute. We verify the authenticity of the changes, verify the packaging changes, build the new packages, and distribute them. This does unfortunately make it harder to know what is well-supported and what is not. (We're working on this.) Some of our enterprise users will use only packages from main to make sure they are getting security support for their environments.

Anyone can submit debdiffs for us to sponsor: open a bug on Launchpad's page for the source package, mark it Public Security, attach a debdiff, describe your testing, and subscribe ubuntu-security-sponsors.  Preparing the changes may look overwhelming at first but there's a large community around working with Debian packages that can help.

We don't have a project in place for comprehensive re-auditing packages that are already in main. We read a lot of patches and look for similar flaws in packages as well as look at surrounding code but do not re-review packages from the ground up very often.

We submit our LTS releases for FIPS, CC, STIG, and CIS certifications. These provide regulatory frameworks for auditing cryptographic and security-sensitive packages with different standards. The certifications are important for certain industries. This work influences and feeds back into the distribution. The auditors aren't necessarily looking for flaws so much as adherence to process, minimum security standards and configurations, etc. However, the double-checks of correctness on particularly important packages is vital reassurance to some users.

Outside of the Ubuntu Security Team, we also enjoy the combined benefits of two wonderful communities: both Debian and Ubuntu developer communities have built relationships with upstream developers and downstream users and fellow developers elsewhere in the FOSS ecosystem. Everyone works together to provide oversight, feedback, cooperation, communication. No software is perfect but the combined efforts of our communities gives great results.


/snap/eclipse/current$ ls -ltr
total 345
-rwxr-xr-x  1 root root 140566 Mar 30 17:31 icon.xpm
-rwxr-xr-x  1 root root  71473 Mar 30 17:31 eclipse
-rw-rw-r--  1 root root 137930 Apr  5 20:25 artifacts.xml
-rw-rw-r--  1 root root    586 Apr  5 20:25 eclipse.ini
drwxrwxr-x  2 root root      3 Apr  5 20:25 dropins
-rw-r--r--  1 root root    178 Apr 13 21:13 eclipse.desktop
drwxrwxr-x 64 root root   3707 Apr 13 21:16 features
drwxrwxr-x  2 root root     42 Apr 13 21:17 readme
drwxrwxr-x 14 root root  30835 Apr 13 21:17 plugins
drwxrwxr-x  4 root root     87 Apr 13 21:17 p2
drwxrwxr-x  4 root root    105 Apr 13 21:17 configuration
drwxr-xr-x  2 root root     58 Apr 13 21:17 snap
drwxr-xr-x  3 root root     43 Apr 13 21:17 meta
-rwxr-xr-x  1 root root     36 Apr 13 21:17 command-eclipse.wrapper

The eclipse.ini file should be present in the /snap/eclipse/current directory as shown above. However you won't be able to edit eclipse.ini file. This is because snap applications are by default mounted on another read-only file system. Even sudo permissions do not work.


How to get universal, moderately bigger mouse cursors on Ubuntu / GNOME?

Here are two possible alternatives.
Changing the cursor size in ubuntu 14.04
Read from "Better solution" onwards in the Answer
https://askbot.fedoraproject.org/en/question/26896/large-mouse-cursors-gnome3/
Read the last two comments


How do I resize a partition to make more room in the root

I found the answer in a brilliant suggestion:

GParted wont resize extended partitions

The problem was that although I hadn't mounted the disk, the swap partition which is inside the extended partition was still being used. I had to boot from the disk on key (as usual) but then right click on the swap partition and turn off the swap.

Then I could resize my extended partition and shrink it by the 2 GB. Since I had 2 GB of unallocated data, it took 30 seconds. Then I could take the unallocated space which was no longer part of the extended partition and add it to sda1 by resizing sda1. That took a minute or so.

The price of shrinking down sda6 by 2 GB I had already paid. That was expensive as it took some 5+ hours. In any case it is done and it works. Gparted is a great tool!


fullscreen virtualbox: ubuntu version of virtualbox-ose-guest-x11 fails to install on 12.04.02

The solution it's been to use the Devices menu from Virtualbox, then click in "Install guest additions..." and follow that menu.


Cannot change graphic driver. All options are greyed out. (Ubuntu 14.04.3 LTS)

So far,

I tried:

sudo apt-get purge "fglrx.*"

and the options were not greyed out anymore. I chose fglrx and it seems to work now.


It works for me too. I think it will work for you, if you define a key -k and  field separator -t for sort

ls *.md | sort -n -t. -k1

or with find

find * -name "*.md" | sort -n -t. -k1

You should avoid using ls like this in command lines. Things can go wrong for several reasons. See this link (particularly the links in the comments by @Byte Commander).


Upgrade to specific distribution with do-release-upgrade?

14.04 is the next LTS release after 12.04.
It's what you want on a server. They last for five years after release (rather than nine months).
The only upgrade path that supports skipping versions is the LTS→LTS one. You cannot jump from 12.04 to 13.x. Neither would you want to; both 13.x releases have been dead for some time.
The latest LTS is currently 14.04 and the latest non-LTS is 15.04. The next LTS will probably be 16.04. You can read more about the Ubuntu Releases and see when support periods run out.


InEdit Connectios make sure the Connection Name is Auto(eth0)ie ethzero-MTU is set to automatic-IP v 4 settings are Method: Automatic(DHCP), both boxes are ticked for 1.Require IP4 addressingfor this connection to complete, and2.Available to all users, In IP v 6 settings, make sure Method: is set to Ignore, and tick the box for Available to all users


Answering to my own question, I basically re-install dropbox following Dropbox's installation guide. And it seems to be working fine now.

And to autostart Dropbox (and having it running in the background), you simply type in:

$Home/.dropbox-dist/dropboxd

and you MUST replace $Home with your absolute path (i.e. /home/your_pc_name/)


How to reset Display and Monitor > Display Configuration > Scale Display

In case anyone else runs into this, this is what I did (though I imagine there must be a better way): I got a spare monitor and connected it to the computer (after turning it off), along with the original monitor.  (Fortunately my video card had multiple plugs.)  On rebooting, I used nvidia-settings to move the new monitor's position to below the other one.  That gave enough room for all (or at least enough) of the System Settings window to be visible, so I could get to the Scale Display bit and reset it back to 1.  Then I shutdown the computer and removed the extra monitor.  On restart, the GUI was back to normal size and I could see all of the System Settings window.


Why is there two instances of "Okular" and how do I get rid of the other one?

NOTE: This answer works for the okular snap in Xubuntu 20.04, and in Ubuntu 20.04

After installing okular as a snap package, I see two icons in the Whisker Menu launcher: one seems to represent okular and the other is generic but both show the same tooltip (Universal document viewer).

I ran locate -i okular | grep -i desktop to identify the corresponding .desktop files. (Ubuntu users may need to install the mlocate package to access the locate command.) There were several hits but

/var/lib/snapd/desktop/applications/okular_okular.desktop
/var/lib/snapd/desktop/applications/okular_org.kde.okular.desktop

are relevant.

I copied these two .desktop files over to ~/.local/share/applications. The applications subfolder may not exist originally in which case it should be created.
I edited both files to remove extra names, generic names, and comments and then compared the two files.

dkb@dkb-xubuFF:~/.local/share/applications$ ls
okular_okular.desktop  okular_org.kde.okular.desktop
dkb@dkb-xubuFF:~/.local/share/applications$ diff *.desktop
7,8c7
< Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/okular_okular.desktop /snap/bin/okular %U
< Icon=/snap/okular/98/usr/share/icons/hicolor/64x64/apps/okular.png
---
> Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/okular_org.kde.okular.desktop /snap/bin/okular %U
12d10
<
dkb@dkb-xubuFF:~/.local/share/applications$

As you can see from the output,

the Exec= lines of both .desktop files launch /snap/bin/okular %U
one .desktop file, okular_org.kde.okular.desktop, is missing the line beginning with Icon and that explains the "generic" icon in the application menu.
since both .desktop files seem to be equivalent, we can just "hide" the one which shows the generic icon by adding NoDisplay=true as the last line to that .desktop file.

Now, there's just the one "okular" when one types oku in a launcher's search bar:

Note:

none of the operations above need the user to be root or to invoke sudo
modifications made to .desktop files in ~/.local/share/applications will survive updates of the parent packages.

A bug has been filed.


How to get back default upper right corner notifications?

After I did a better search I found that I was missing the notify-osd package. After I installed it everything went back to normal :)


Windows FINDSTR Ubuntu equivalent to search .csv

I've looked into grep and awk but don't know how to use them.

The grep documentation has plenty of examples. The first one in the Usage section demonstrates case-insensitive searching:

  Here is an example command that invokes GNU grep:

 grep -i 'hello.*world' menu.h main.c

  ... The -i option causes grep to ignore case, causing it to match
  the line ‘Hello, world!’, which it would not otherwise match.

And if I search for line number in the aforementioned page:

-n
--line-number
Prefix each line of output with the 1-based line number within its input file. (-n is specified by POSIX.)

>> foo and *.csv are handled by the shell (probably how you'd expect). So:

grep -in "John.Doe" *.csv >> johndoe.txt

Options like /i, /n, etc. usually begin with hyphens in the Unix world.


Steps to partition hard disk while installing ubuntu 14.04

You should proceed to delete your 50GB NTFS formatted drive (from the Ubuntu installation wizard) this will mark it as free space. After that you'll need to create a partition for your Ubuntu installation and a partition for the swap in this free space.

Note: Ubuntu cannot be installed on NTFS, you can use ext4 instead.


I had this same issue on an Ideapad U530.
Solved it by setting the below inactive keys manually in org.gnome.settings-daemon.plugins.power:
sleep-inactive-ac-timeout (I set this to 600)
sleep-inactive-ac-type (I set this to 'suspend')

This solved the inactive sleep issue when the system is plugged in, but I'm still having this problem when on battery power...


How-To install freefilesync on Kubuntu 18.04

You have two options here:

Use FreeFileSync 9.2 from getdeb.net (for obsolete Ubuntu 17.04) - add repository, install package then remove repository:

sudo add-apt-repository "deb http://archive.getdeb.net/ubuntu zesty-getdeb apps"
sudo wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -

sudo apt-get update
sudo apt-get install freefilesync
sudo add-apt-repository -r "deb http://archive.getdeb.net/ubuntu zesty-getdeb apps"

Download FreeFileSync 10.3 archive from official site, extract it, create necessary shortcuts (.desktop-files), add to PATH variable, and enjoy:

# 1. Create ~/Software folder and download here
mkdir ~/Software
cd ~/Software
xdg-open https://freefilesync.org/download/FreeFileSync_10.3_Linux_64-bit.tar.gz
# save to ~/Software
# if it don't work - click on "Download FreeFileSync 10.3 Linux 64-bit"
#xdg-open https://freefilesync.org/download.php

# extract the program
tar -xf FreeFileSync_10.3_Linux_64-bit.tar.gz
cd FreeFileSync
# extract icons
unzip Resources.zip FreeFileSync.png RealTimeSync.png
mkdir -p ~/.local/share/icons/hicolor/256x256/apps/
mv {FreeFileSync,RealTimeSync}.png ~/.local/share/icons/hicolor/256x256/apps/

# 2. Create shortcuts for current user
mkdir -p ~/.local/share/applications/

cat > ~/.local/share/applications/freefilesync.desktop << EOF
[Desktop Entry]
Name=FreeFileSync
Comment=Keep files and folders synchronized
Exec=FreeFileSync %f
Terminal=false
Type=Application
Icon=FreeFileSync
MimeType=application/x-freefilesync-ffs;application/x-freefilesync-batch
Categories=Utility;FileTools;GTK;
StartupWMClass=FreeFileSync
StartupNotify=true
EOF

cat > ~/.local/share/applications/realtimesync.desktop << EOF
[Desktop Entry]
Name=RealtimeSync
Comment=Start synchronization in real time
Exec=RealTimeSync %f
Terminal=false
Type=Application
Icon=RealTimeSync
Categories=Utility;FileTools;GTK;
MimeType=application/x-freefilesync-real
StartupNotify=true
EOF

# add it to PATH
echo "PATH=$PATH:$HOME/Software/FreeFileSync" >> ~/.bashrc
echo "PATH=$PATH:$HOME/Software/FreeFileSync" >> ~/.profile
source ~/.bashrc

then logout, log-in again and you will be able to use both FreeFileSync and RealTimeSync.


gpg --keyserver keyserver.ubuntu.com --recv-keys 68980A0EA10B4DE8
gpg -a --export 68980A0EA10B4DE8 | sudo apt-key add -


Power off the monitor on install Ubuntu 13.04

I press F6 before power off monitor and add command line to install -> xforcevesa and bypass my display VGA and install Ubuntu good.


How does ubuntu render fonts better, than other main linux distributions?

There is a bit of subjectivity (to say the least) on fonts and font rendering.

See : http://blog.mageprojects.com/2011/05/27/linux-fonts-compared-ubuntu-11-04-linuxmint-11-fedora-15-windows-7-sabayon-5-5/

That first link has a screen shot of several fonts on several OS and the author concludes :

  The Ubuntu and LinuxMint fonts look ugly and way to fat. period!

(Authors words, not mine).

There are a few resources you can look into, you will have to decide for yourself what you like best.

A few resources you might look at (you mentioned you were using Fedora)

https://wiki.ubuntu.com/Fonts#Font_settings

http://blog.andreas-haerter.com/2011/07/18/tune-improve-fedora-fonts-typeface-ubuntu-like-sharp-fonts

http://fedorasolved.org/Members/khaytsus/improve-fonts

Rather the telling you how to configure you fonts, I hope those links help you understand how to configure them to your personal preference.


Alias experiment (re-adding ll to Ubuntu)

You are free to redefine aliases as many times as you like.  There is no penalty or "danger" to the system.  Each definition overrides the previous one.  The only caution is that you might confuse yourself.

Example

Let's create an alias D:

$ alias D=date
$ D
Mon Jan  8 18:57:57 PST 2018

We can use alias to view the definition of D:

$ alias D
alias D='date'

Now, let's re-define D:

$ alias D=pwd
$ D
/tmp
$ alias D
alias D='pwd'

The new definition has simply replaced the old.

Ubuntu Initialization Sequence

When you start an interactive non-login bash shell under Ubuntu, bash will read and execute commands in /etc/bash.bashrc and then read and execute commands in ~/.bashrc.

Under Ubuntu (but not Debian), the default ~/.bashrc file contains the definition:

alias ll='ls -alF'

Since /etc/bash.bashrc is executed before ~/.bashrc, any definition of ll in /etc/bash.bashrc will be overridden by the definition in ~/.bashrc.

When starting a login shell or a non-interactive shell, the rules are different.  See man bash for details.


I remember having similar issues when switching between different kernels on my distro. The only solution that worked for me to reinstall virtualbox

sudo apt install virtualbox

AFAIR The reinstallation would trigger reconfiguration and should end up with proper modules (maybe restart would be required)


My Amd switchable Graphic Card is not recognized

The following link is easy to follow and should fix your problems :)
http://ubuntuforums.org/showthread.php?t=1930450

I also have the same computer, the issue is that hybrid graphics are not very well supported at the moment. So you chose a hard computer to come over to ubuntu.


upgrade from Ubuntu 12.04lts to Lubuntu 13.10

muru's comments are spot on.  Since you already have Ubuntu 12.04 which is a LTS version, upgrade to Ubuntu 14.04 which is a LTS version.  That is the easiest way.  Once that is accomplished you can change your distro to Lubuntu by adding LXDE which will make it Lubuntu.  You will still have all of the Ubuntu applications and the Lubuntu applications.  For instance LibreOffice Writer and Abiword.  You can uninstall all of the Ubuntu applications or just leave them installed.  There is no direct method to go directly from Ubuntu 12.04 to Lubuntu 14.04.  The only Lubuntu releases that have not reached their End Of Life are; 14.04 (LTS), 14.10, and the newly released 15.04.  You have one other option and that is to back up your data to an external source, which should be done anyway, and to do a fresh install.


keeping a string (specially ! sign) in a variable and displaying it

That's bash History Expansion you're experiencing:

!string
  Refer to the most recent command preceding the current position
  in the history list starting with string.

As I explain here, history expansion is performed inside double quotes, so two ways to quote remain for !:

var=\!f\ then # either use <b>only</b> backslash
var='!f then' # or just single quotes


For the repository that you linked to, qtox-unity is indeed not available for Ubuntu 16.04. However, you can still install the qTox client for Tox following the instructions at https://github.com/tux3/qTox and https://software.opensuse.org/download.html?project=home%3Aantonbatenev%3Atox&package=qtox:

sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/antonbatenev:/tox/xUbuntu_16.04/ /' >> /etc/apt/sources.list.d/qtox.list"
sudo apt-get update
sudo apt-get install qtox

If you want, you can also add the repository key to APT:

wget http://download.opensuse.org/repositories/home:antonbatenev:tox/xUbuntu_16.04/Release.key
sudo apt-key add - < Release.key


How do I divide my root partition into two partitions?

Not sure you can do exactly what you want. The only way I see
is to save off all your personal files from the current 17.04, then
reinstall 16.04 on the entire disk and restore your files.
This is time-consuming, but should give you what you want.

Another, quicker option is a dual-boot scanario:

Boot from the 16.04 USB or DVD drive.
Tell it you want to Install 16.04

It will take you thru the installation and when you get to
the disk page, it will see the 17.04 system already there.

Tell it you want to install 16.04 beside 17.04 and choose
a lot of space for 16.04, making 17.04 very small.

This leaves you with both 16.04 and 17.04 sharing the 500GB
drive.

But, you can boot on 16.04 and read/write files on 17.04 and
vice-versa.

-mot