How to set my Broadcom BCM4313 wireless card into AP mode?

Access Point mode Hotspot on BCM4313

BCM4313 can operate on AP mode using brcmsmac driver, starting from 3.10 linux kernel onwards. For a very long time, BCM4313 didn't have AP mode support under any linux driver. But now, you got lucky, coz both AdHoc(IBSS) and AP mode have been implemented for brcmsmac. So, for making AP mode work for BCM4313, you need a linux kernel newer than 3.10. Use Ubuntu 12.04.5LTS, Ubuntu 14.04LTS or a newer release. If you're using a Ubuntu 12.04LTS version older than 12.04.5, install the package  linux-generic-lts-trusty .
For more details about upgrading 12.04LTS's kernel, visit this link.
Once you have a suitable kernel, make sure you are not running other Broadcom drivers like bcmwl-kernel-source,b43,etc. If yes, uninstall them. No need to explicitly install brcmsmac, as it is already a preinstalled module in the linux kernel. Now, create Access Point hotspot according to this answer. This is a custom hostapd configuration I use with BCM4313 wireless card :

#####Basic Settings########################
#sets the wifi interface to use, is wlan0 in most cases
interface=wlan0
#driver to use, nl80211 works in most cases
driver=nl80211
#Access Point name
#Replace it with ssid=<YourHotspotName>
ssid=HEXspot

#####Channel and Mode Settings#############
# Operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g,
# ad = IEEE 802.11ad (60 GHz); a/g options are used with IEEE 802.11n, too, to
# specify band)
# Default: IEEE 802.11b
hw_mode=g
# WiFi Channel:
channel=11

##### IEEE 802.11n related configuration ##
#WMM needs to be enabled for full HT functionality
wmm_enabled=1
# ieee80211n: Whether IEEE 802.11n (HT) is enabled
# 0 = disabled (default)
# 1 = enabled
# Note: You will also need to enable WMM for full HT functionality.
ieee80211n=1
# ht_capab: HT capabilities (list of flags)
# LDPC coding capability: [LDPC] = supported
# Supported channel width set: [HT40-] = both 20 MHz and 40 MHz with secondary
#   channel below the primary channel; [HT40+] = both 20 MHz and 40 MHz
#   with secondary channel below the primary channel
#   (20 MHz only if neither is set)
#   Note: There are limits on which channels can be used with HT40- and
#   HT40+. Following table shows the channels that may be available for
#   HT40- and HT40+ use per IEEE 802.11n Annex J:
#   freq        HT40-       HT40+
#   2.4 GHz     5-13        1-7 (1-9 in Europe/Japan)
#   5 GHz       40,48,56,64 36,44,52,60
#   (depending on the location, not all of these channels may be available
#   for use)
#   Please note that 40 MHz channels may switch their primary and secondary
#   channels if needed or creation of 40 MHz channel maybe rejected based
#   on overlapping BSSes. These changes are done automatically when hostapd
#   is setting up the 40 MHz channel.
# Spatial Multiplexing (SM) Power Save: [SMPS-STATIC] or [SMPS-DYNAMIC]
#   (SMPS disabled if neither is set)
# HT-greenfield: [GF] (disabled if not set)
# Short GI for 20 MHz: [SHORT-GI-20] (disabled if not set)
# Short GI for 40 MHz: [SHORT-GI-40] (disabled if not set)
# Tx STBC: [TX-STBC] (disabled if not set)
# Rx STBC: [RX-STBC1] (one spatial stream), [RX-STBC12] (one or two spatial
#   streams), or [RX-STBC123] (one, two, or three spatial streams); Rx STBC
#   disabled if none of these set
# HT-delayed Block Ack: [DELAYED-BA] (disabled if not set)
# Maximum A-MSDU length: [MAX-AMSDU-7935] for 7935 octets (3839 octets if not
#   set)
# DSSS/CCK Mode in 40 MHz: [DSSS_CCK-40] = allowed (not allowed if not set)
# PSMP support: [PSMP] (disabled if not set)
# L-SIG TXOP protection support: [LSIG-TXOP-PROT] (disabled if not set)
ht_capab=[HT40][GF][SHORT-GI-40][SHORT-GI-20]
# Require stations to support HT PHY (reject association if they do not)
require_ht=1

#####Security and Authentication###########
#macaddr_acl sets options for mac address filtering. 0 means "accept unless in deny list"
macaddr_acl=0
#Sets authentication algorithm
#1 - only open system authentication
#2 - both open system authentication and shared key authentication
auth_algs=1
#setting ignore_broadcast_ssid to 1 will disable the broadcasting of ssid
ignore_broadcast_ssid=0

#####Sets WPA and WPA2 authentication######
#wpa option sets which wpa implementation to use
#1 - wpa only
#2 - wpa2 only
#3 - both
wpa=2
#sets WPA Password required by the clients to authenticate themselves on the network
#Replace it with wpa_passphrase=<Password you wish to use>
wpa_passphrase=anything
#sets wpa key management
wpa_key_mgmt=WPA-PSK
#sets encryption used by WPA2
rsn_pairwise=CCMP

This configuration enables hostapd to start 802.11n mode Access Point for BCM4313. You may use this instead of the generic g-mode configuration described here.


Is it necessary to keep records of my backups?

Generational backups
I started doing daily backups about six months ago to my email account at gmail.com. gamil limits email backups to 25 MB per archive. The "free" account is limited to 15 GB and is currently 14% full. Soon I will have to start sifting through the archives with a backup strategy to keep:

Monday to Sunday (Daily backups) that get purged after 14 days
Sunday backups (Weekly backups) purged after 8 weeks
Last day of month backups (Monthly backups) purged after 18 months
Last day of year backups (Yearly backups) kept forever

The backup strategy follows the Grandfather-father-son theme.
Writing a script to access a gamil.com account to copy an existing daily backup to a Weekly backup, Monthly backup and/or a Yearly backup based on date will be no easy task. It might be easier to email the backup multiple times, depending on date, to create the Weekly, Monthly and Yearly backups in real time instead of copying them in the future.
The script to manage Weekly, Monthly and Yearly backups has to account for the fact a backup may not be available for Friday of week, Last day of Month or Last day of Year in which case the next earlier backup has to be selected.
Finally a script to purge Daily, Weekly and Monthly backups based on expiry dates has to be written.
Until script(s) are written, manual copying and renaming of backup archives is required.

Notes
Large backups of say 60GB of music files will be a separate process to a large enough USB stick or pair of alternating USB sticks.
Programs are not backed up but a list of installed programs (package names) is backed up daily.
It is extremely important that you test your backups from time to time. You can do this by restoring them to an empty partition and then running diff command between the backup restored partition and real partition.


Is it possible to set up wifi hotspot on an ubuntu machine?

It is possible only if you are using wired Internet connection on you Ubuntu machine.

See

http://ubuntuhandbook.org/index.php/2014/09/3-ways-create-wifi-hotspot-ubuntu/

for more details.


Dual System: Can not get into GRUB interface automatically

I am not quite certain what you are asking, however, I think you might have already answered your own question. Windows boot manager is on the top of your boot options, and I am guessing you have fast boot ON, as such you directly get booted into Windows. Edit your boot options from the bios screen and move Ubuntu above Windows Boot Manager. That way you should always get the grub menu.
However if I'm misunderstanding something, please let me know. :)


ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.GP17.VGA.LCD._BCM.AFN7]

The ACPI driver attempted to evaluate (execute) the ACPI brightness control method for the screen but this failed because the ACPI AML byte code in your firmware did not have the object _SB.PCI0.GP17.VGA.LCD._BCM.AFN7 defined for some reason.  The upshot of all of this is that the ACPI brightness control won't work.  This is a firmware issue, I do not know of any workarounds apart from checking to see if you can get an updated BIOS firmware that may fix this.


Ubuntu 16.04.3 boots sometimes, but not all times

After more googling, I noticed a lot of people with similar problems had BIOS issues. After resetting BIOS to defaults, it cleared up all boot issues.


How do I debug xorg/fglrx related system freezes on Ubuntu 12.10?

This has worked for me. I think that there may be  a header issue with AMD and Nvidia graphics cards.

sudo apt-get purge fglrx
sudo apt-get install linux-headers-generic

Reboot and then Install proprietary drivers via Software Sources.


Sometimes internet routers have problems passing through NTP traffic. The reason is that UDP is a bit more trickier to forward than TCP and sometimes the port is even used on the device itself for an NTP daemon.

In my case it was DD-WRT which blocked all of my NTP traffic. And as you might have noticed: NTP is not very good in saying that something went wrong. And especially not good in saying what went wrong. Here is the link to a thread about DD-WRT:  https://superuser.com/questions/386240/allow-lan-clients-to-sync-time-through-dd-wrt

You can easily check if your Router is blocking NTP with the tool ntpdate (which is kind of a single use version of ntpd):

ntpdate pool.ntp.org - this call behaves like ntpd as long you run it as root and ntpd is not running at the same time. This command fails if your router blocks NTP
ntpdate -u pool.ntp.org - this call uses an unprivileged port, which much more likely works.

In case your router blocks NTP, what can you do?

Unfortunately, ntpd doesn't support any other way of communication than opening the port 123.

Fortunately, there are alternative implementations which use different ports:

OpenNTPD
Chrony

I got good results with OpenNTPD, but in Forums people also recommended chrony

You can also setup just one OpenNTPD host and let all other machines in your network sync to this machine with their default NTP implementation.


It's probable that when you opened the terminal, your $PWD was equal to "~" (/home/$USER/ or your user directory) so your command

sudo python setup.py

was the equivalent of

sudo python /home/$USER/setup.py

where the file doesn't exist by your own description at that location; it's in /home/$USER/Desktop/Downloads/setup.py thus the "no such file error" is valid as I read your description.

Provide the full path in your command, or cd (change directory) to the location where it is then use your existing command.

fyi:  $PWD is a variable which contains your present working directory; ie. echo $PWD will display it, as will pwd.  $USER is a variable which contains your username, so echo $USER will display it, as will whoami.


It seems that you have 2 IP addresses assigned to enp3s0 interface:

inet 10.0.0.23/24 brd 10.0.0.255 scope global enp3s0

inet 192.168.1.107/24 brd 192.168.1.255 scope global dynamic noprefixroute enp3s0

The solution is to remove the fixed ip and just leave the dynamic one.

How to do this it depends on wether you have a server box or a desktop.

1.- SERVER:
If you have a server you can use netplan. Go to /etc/netplan and "sudo nano" de yaml file.

It should look like:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      dhcp4: yes
      dhcp6: yes
      addresses: [10.0.0.23, ]
      gateway4:  10.0.0.1
      nameservers:
              addresses: [8.8.8.8, 8.8.4.4]

You should change it to this:

network:
 version: 2
 renderer: networkd
 ethernets:
   enp3s0:
     dhcp4: yes
     dhcp6: yes

Then run:

    sudo netplan apply

And to check everything is ok

    ifconfig -a

2.- DESKTOP:
If you have a desktop, your yaml file should look like

network:
  version: 2
  renderer: NetworkManager

That means that NetworkManager is taking care of the config and changes. You can use the nmcli command line to modify config, but for simplicity sake, you can go to the status bar (next to the clock) select networked inteface and configuration. There in wired section, click on the wheel and  you should see the ethernet configuration. Tere you should change the ipv4 and ipv6 tabs and set automatic (dhcp) as the only option.


Run command in new gnome-terminal and .bashrc

No, your are correct. gnome-terminal does not source .bashrc when running a command via the -e argument.

Bash and gnome-terminal are two separate things. When you run without -e gnome-terminal runs your default shell (which happens to be bash). When you run with -e gnome-terminal runs the command you provided (bash is not loaded so .bashrc is not sourced).

Your last example will not work either. $HOME is a variable in bash and not available. In addition source is a bash command, and vim likely needs a path.

The best way to do this, in my opinion is to make a wrapper script.

In your path somewhere (I added ~/.bin/ to my path) create a file called vim-x and set it executable.

  #!/bin/bash
  source $HOME/.bashrc
  vim "$@"

Then you can run:

gnome-terminal -t "my title" -e /home/user/.bin/vim-x


How to run CLI commands from the launcher?

Someone else pointed it out, but then removed their answer, so I'll add it again.

The reason this particular command fails is that the launcher doesn't use a shell, which means that VLC is literally trying to load a file named *, as opposed to globbing the star into a file list.

A workaround is to call a shell instead, as elmicha pointed out in a comment. sh -c "vlc ~/Music/* -Z" would do this. This however fails due to a bug, again see elmichas comment.

In this particular case, since VLC will recursively traverse directories, the same result can be achieved with vlc ~/Music, which works fine without a shell, and is much simpler.


expanding partition: allocated space vs available space

Due to not many views and activity I posted in another channel. I quickly received a response.
The answer can be found here:
https://unix.stackexchange.com/questions/618097/expanding-partition-with-available-space


Is there a driver for HP 3D Drive Guard?

Yes, there is and you can find it here and it is named hpfall. It is a kernel module.

Unfortunately it has not been implemented in Ubuntu 11.10, 12.04 or 12.10 and the PPA is not up to date. On the other hand, jou can just install the package for Natty and it works for Ubuntu 11.10, 12.04 and 12.10.

On the page it shows how to add a PPA (Personal Package Archive). In short add these to lines to your sources:

deb http://ppa.launchpad.net/pmjdebruijn/ppa/ubuntu natty main
deb-src http://ppa.launchpad.net/pmjdebruijn/ppa/ubuntu natty main

From command line you can also do the following

sudo add-apt-repository ppa:pmjdebruijn/ppa

Update the sources with sudo apt-get update and Ubuntu software center will show you hpfall when you search for it.

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


You can install kde 4.12 easily on ubuntu 14.04 , open terminal :

sudo apt-get update
sudo apt-get install kubuntu-desktop

Enjoy using KDE


What package conventions are there for ubuntu?

To answer your question here I'll use LibreOffice as an example (as nearly everyone has that installed).  If you're on Lubuntu (which doesn't have LibreOffice as standard office productivity suite) and you install LibreOffice, it's a nearly empty package although it has package dependencies for Writer, Calc, Base, etc.

A package dependency is just a "pointer" to another package.  Otherwise the servers at Canonical (the company behind Ubuntu) would quickly fill up with double, triple, quadruple, ... packages that all contain the same files!

A package that, in itself only contains such "pointers" is know as a meta package.

So the LibreOffice meta package pulls in its separate packages (E.g. calc), which pulls in their dependencies, which pull in theirs until all dependencies are resolved.
You can however install only Calc  without any of the other packages.

To see this in action, type the following command in a terminal:

apt-cache depends libreoffice-calc

And blender is just a very simple example of the above.

Some more details:

For some packages, things are broken into functional units: it is not uncommon to see packages called: application, application-data, application-plugins, application-dev, and some others which each contain respectively the application itself, a dataset or data to operate against, some plugins, or anything else...

For the full details:

Visit the package management Development Wiki.


The repository contains the mysql-admin package which is a GUI tool for administrating MySQL. From the package's description:

  GUI tool for intuitive MySQL
  administration

  MySQL Administrator is a powerful
  visual administration console that
  enables you to easily administer your
  MySQL environment and gain
  significantly better visibility into
  how your databases are operating.

  MySQL Administrator integrates
  database management and maintenance
  into a single, seamless environment,
  with a clear interface.


Very slow after idle for some hours in 14.04

VirtualBox is using far too much RAM for your system, and you are swapping constantly.
I retouched the image to make it visible:

VirtualBox have a virtual memory requirement that are almost the same size of your physical RAM.

How much memory have you dedicated to the virtual machine? In my experience, everything that goes more than 1/3 of your total physical RAM is asking for troubles and slowdowns.

The java process under it could be also part of the problem (it's at 2.8G!) --- chances are that VirtualBox and that process are competing for RAM and livelock together swapping like crazy.

More detailed: that the Virtual Size is the memory the process has "mapped", that is, the memory it thinks it has --- only part of that is really in RAM at any moment, and that part is the one marked with RES (for resident). If the program tries to access memory which is in its virtual pool but not in RAM, and the memory is full, some other memory must be swapped out to make place for the new one.
So if you have two process with a big difference between Virtual and Resident memory, chances are that the two are swapping out the other one at every scheduling switch --- making the system slow to a crawl --- swap memory can be millions of time slower than RAM.

The fact that it happens after a long period of inactivity is probably due the fact that the system has settled on a partition of the RAM among the process that more or less satisfy all of them for that workload. When you change the kind of workload again, different part of the programs are loaded, and the swap frenzy starts. Chances are that if you wait the necessary time (could be hours!) the system will more or less find another decent equilibrium; it's the transitory which is bad.

About your case:

With 4G of RAM, having a virtual machine of 1.5G is ok, if it's the only memory hungry process in the system. Probably that one and the IDE are too much.

Dirty (and dangerous) Trick

To have back a responsive system, the faster way I know is to force swap off; but this is quite dangerous sometime. The basic idea is to do a

sudo swapoff -a

wait for finishing...

sudo swapon -a

This will try to put all the memory back in RAM. If it can't, processes will be unmercifully killed along the way. To avoid the death of  some innocent and important system process(1) the best way is to try to close the memory-hog before doing the swapoff.

(1) the OOM (out-of-memory) killer of the kernel will try to kill the correct processes, but it's not failproof.


OpenJDK-7-JRE throws "broken packages" error (14.04 LTS)

Go to Ubuntu Software Center and search for the package software-properties-common, install that package if it is not installed.

Open your dash by pressing the Super Key (Windows Key) and type software sources. Go into the application that appears and place a check mark on all the packages present there.

After doing it, execute the following commands one by one, in a terminal window ( Ctrl+Alt+T ) :

sudo apt-get update && sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoremove
sudo apt-get autoclean

and then run,

sudo apt-get install default-jre to install the package.


Start nginx on boot with config in non-standard location

The solution that I eventually came up with was to delete the contents of /etc/nginx/nginx.conf and replace it with a single include line that pointed at the config that was under source control:

include /home/ubuntu/foo/nginx.conf;


Here are the steps to follow after the system log in:

Open terminal and type alsamixer.
Unmute the Headphone entry pressing m once.
Save the alsamixer output by running sudo alsactl store in the terminal.
Save the mixer settings into a custom file with alsactl --file ~/.config/asound.state store command. This command will store/clone a copy of the asound.state file from the /var/lib/alsa/ directory to ~/.config/.
Create a .desktop file by running sudo nano ~/.config/autostart/alsarestore.desktop and paste the following in.

[Desktop Entry]
Type=Application
Terminal=false
Name=alsarestore
Exec=alsactl --file ~/.config/asound.state restore
Save the file by Ctrl+x and responding to any query that pops up.
Restart your machine and you should be OK with your sound.

I found the solution from the thread cited in the first comment. Grabbed the information together from different answers to make it clearer.

I am not sure whether the answer should apply to even slightly different problems from mine.

Notes:

.config is a hidden folder in your home folder. Use Ctrl+h to let the hidden files show up.
If the autostart folder does not exist in .config folder, create it manually or through terminal. I did not have autostart folder and I had to create.
Ubuntu 15.04


Netflix via Chrome 37 Ubuntu 14.04 LTS worked, but now it doesn't

I just fixed this very issue as Netfix also stopped working for me. All I had to do was STOP using the "User Agent". Either remove it or just change back to the Chrome default agent. Once I did that it worked again.
I'm on Ubuntu 14.04 LTS with the updated lib3 libraries and Chrome (not Chromium) stable from the Ubuntu repositories google-chrome-stable v41.0.2272.76-1.

I was previously using the Chrome dev version but changed while trying to solve this issue over the last week or so. I suspect that Chrome dev would have worked if I'd stopped using the User Agent switcher.

Hope that helps.

Here is where I found the comment that the User Agent is no longer required.
https://forums.gentoo.org/viewtopic-p-7705700.html?sid=b5fe5df615927d44efe406b661b1f337


Here you can find the installation instructions :

Canonical OpenStack Autopilot

Here you can find more details and information :

Canonical Landscape Help

This documentation includes the Juju and MAAS implementation as well. You can try Canonical OpenStack Autopilot for free - but you will have to purchase Ubuntu Advantage when you use more than ten machines. Landscape Dedicated Server is the standalone version of Landscape that you can install on your own network. See general information on Ubuntu Cloud website.


As mentioned by muru. You need to install the ARM architecture of that library. However they are not listed on http://packages.ubuntu.com site. Neither, it's easy to manage dependencies manually that way.

Note: Setup a chroot environment, I found weird behavior when I added armhf architecture to my Ubuntu 15.04 amd64. I used dpkg --add-architecture=armhf. The APT start complaining about broken package wine and tried to remove all i386 packages.

Add new sources file

sudo nano /etc/apt/sources.list.d/arm-repo.list

Add the source of the architecture you want and release you have.

deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports trusty main universe

Check for available arch here:  http://ports.ubuntu.com/ubuntu-ports/dists/trusty/main/ as you can browse up/down for different releases.
Update package list

sudo apt-get update

Add a dpkg configuration

sudo nano /etc/dpkg/dpkg.cfg.d/multiarch

with this line

foreign-architecture armhf

Install need packages as needed, example:

sudo apt-get install libglib2.0-0:armhf

References:

Getting Started with MultiArch (armel / armhf) in Ubuntu
Linaro: Cross building Quick Start


How can I install a Snap package from a local file

Here's an example of a local install of a snap from the Snap Store (source).
However, this won't work for you -- why it won't work and the method you  need to use instead are detailed below.

$ snap download hello-world
Fetching snap "hello-world"
Fetching assertions for "hello-world"

$ sudo snap ack hello-world_27.assert

$ sudo snap install hello-world_27.snap
hello-world 6.3 from 'canonical' installed

$ snap list
Name                   Version                   Rev   Developer      Notes
<snip>
hello-world            6.3                       27    canonical      -

There is nothing like GDebi for snaps.
Since you already have the local snap, you obviously skip the first step. You don't need to download it.
Since you made the snap, there's no .assert file, so you skip the second step, too.
Finally, since Snaps default to security using signatures...but yours isn't signed...you must disable that protection in the third step by using the --dangerous flag.

So your method for a locally-made, unsigned Snap will be:

$ sudo snap install /path/to/my-snap.snap --dangerous


Libreoffice Calc cell text not refreshed when edited

I had exactly the same problem and it was driving me crazy... one workaround that worked for me is to set the theme integration to gtk3:

SAL_USE_VCLPLUGIN=gtk3 libreoffice --calc

See Arch Wiki.


The following packages have unmet dependencies python 3.7

OK, it seems you used another PPA with higher version of the package and then removed it from your sources.list. It is not possible to make apt to downgrade the whole package version. So you need to fallback to the PPA that you have used:

sudo add-apt-repository ppa:jonathonf/python-3.7
sudo apt-get update
sudo apt-get upgrade


Ubuntu 16.04 server auto enter root shell in recovery mode

Based on this tutorial blog How to Change Systemd Boot Target on Linux I think the answer (for 16.04+ systems, that use systemd) is

sudo systemctl set-default rescue.target

If you want to verify what the target does before setting it as your default, you can use

sudo systemctl isolate rescue.target


how to copy from current folder to another folder

Via

cp form.html /var/www/html

The dot means, relative to your current folder and you need an absolute path.

If form.html isn't a file but a folder, you should add the -r switch to copy recursively.

cp -r form.html /var/www/html

More about the cp command with man cp in a terminal or here.


It seems an issue with display resolution and darktable (don't know for rapid photo downloader):
https://github.com/darktable-org/darktable/issues/5273


Kubuntu 14.04 crashes on boot on Asus PC

I'll be upgrading my ASUS eee to 14.04 (32bit) next week. I had problems with past kernal images. On a working version or from the command line I use;

Linux Image clean

lsb_release -a; uname -a; dpkg -l | grep linux-image
sudo apt-get --purge remove linux-image-3.11.0-12-generic
sudo apt-get --purge autoremove
sudo apt-get clean

The 1st line gives you all the images stored on your system. Remove all except for the most current. This has been resolving the problem for me. But once again - I'm using the 32bit not the 64bit version.

If it's remains an issue - file a bug report; and ask to extend the support life of 13.10 until the issues with 14.04 are resolved.


How to find the delimiter used in a txt file and convert it to comma separated csv?

The default field separator in awk is any whitespace - so you don't need to worry about whether it is spaces or tabs:

awk '{$1=$1} 1' OFS=, moth_gt.txt

or (more verbosely)

awk 'BEGIN{OFS=","} {$1=$1; print}' moth_gt.txt

Similarly in perl:

perl -alne 'print join ",", @F' moth_gt.txt


Mouse jumps between using touchscreen and touchpad

Am I wrong if I guess at the moment of time you were referring at the second paragraph:

  At first I thought it might be remembering the mouse position for each device separately [...]

You were using Unity but then you changed to Gnome and thus changed your mind about the behaviour?

I also own a touchscreen laptop and I'm running Ubuntu 12.10 x64. Using Unity I can leave the mouse in a specific point, let's call it point A, then tap or drag on the screen in a completely different and random point in the screen and no matter what when I move my mouse (or trackpad) the pointer will begin it's movement from A.

However while using Gnome (3.6.2) the behaviour gets buggy. If I leave the pointer at A using the mouse/touchpad, then tap/drag in the screen to a final point B and then get to the mouse again the pointer will most of the times jump from B to a lower-right position as you described and in some cases it will start from A as in Unity.

I heard Canonical updated the touchscreen drivers in Ubuntu 12.10 and I guess they updated their desktop environment to suit these updates too. For me when I want to use the touchcreen I load Unity as in Gnome is mostly useless.

Cheers.


user recognizes command but root doesn't

sudo specifically ignores your PATH variable and uses its own. Compare echo "$PATH" with sudo sh -c 'echo "$PATH"'. Either put the command in one of the paths sudo trusts, or supply the full path to that particular command.


Disk is full and I cannot login to change it

The system reserves space, which is explained here: Unix

So actually, you have to delete some more, in order to be able to write again without root permissions.


migrate windows based kiosk host to ubuntu, OTA

You can use PXE booting with specially prepared LTSP image.

Can't answer more, as it is very complex and broad question.


12.04 - unable to install on toshiba laptop

you can (1) burn the ubuntu iso as disk (2)use the disk to boot your computer (3) install ubuntu alongside with your windows 7 (4) install grub to manage all the installed system.

it is not necessary to stick into installing ubuntu from windows.


It seems that installing gvfs-backends solve the problem...

sudo apt-get install gvfs-backends


I wrote a simple shell script using wmctrl to give the Terminal focus. It does exactly what I want.

First, install wmctrl sudo apt-get install wmctrl.

Next, fire up a text-editor, copy the following lines.

#!/bin/sh
SERVICE='gnome-terminal'

if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
  wmctrl -xa $SERVICE
else
  $SERVICE
fi

Save the file somewhere where you usually keep your shell scripts. In my case I did:  ~/bin/single_instance.sh

cd to the directory (cd ~/bin) and make the file executable chmod +x single_instance.sh

Now, open up Main Menu select Accessories » Terminal press properties and replace command with the script: ~/bin/single_instance.sh

Open up System Settings » Keyboard » Shortcuts. Disable Launch Terminal shortcut by giving it a backspace. Make a custom shortcut. Again fill in the path and name to the script and give it the key combination ctrl + alt + t.

You’re done, single instance terminal...


Solution: Wrap the entire command in double quotes.

Hint: Check the mail because it will show you a little log. It will be in a directory like /var/mail. You can use cat /var/mail/username to display all the messages.

Explanation: My issue was that my script required a parameter passed in as an argument in the command. crontab interprets everything separated by a space as a separate object so my command had an error executing. Using double quotes will let the crontab execute the whole thing as one command.

ex:

Original =

csh -c /home/apps/bin/forcestartjob.pl job_b
Correct =

csh -c "/home/apps/bin/forcestartjob.pl job_b"

Took me a long time to find this silly issue, but hopefully this helps somebody else in the future.


ACL permission defaults are not applying to new files

With no other answer I am adding my answer since the issue has been somewhat resolved.

Due to a three year old (!) cp/mv in coreutils don't respect the default ACL of parent directories bug the default ACL permission are non-functional and the reason acl's did not work for me.


Problems making a developer space on ubuntu 20.04

Well its very hard without knowing what you did and facing problem. But reading your problem what i can tell you that

you created folder with Virtualhost : now this folder should have been created by the USER apache and have execute access as well
Check using which user you are running your PHP and Apache, ideally Apache should have control on PHP but you might have used the root to create the folder due to which apache is not able to run the PHP
now once you validated above you need to revisit the setting in httpd.conf to have correct folder. I NOTICED that your folder and the URL names are different. You have space in name and remember linux flavors are case sensitive too. :)

To me


What hour is it? That is configured to run at 02:05 and 06:55 respectively. So the first thing to check would be that the date is right (even if it IS 2 AM, your system may think it's a different hour, or be running on a different timezone).

My first check would be to run date and verify that the time is right and it should have been run. Only then start checking things like "is cron running" (apparently it is), changing the hour to *and so on.


How do I deactivate F1 and F10 keybindings in gnome-terminal?

11.04

Disabling the F1 shortcut

In a gnome-terminal open up Edit ➜ Keyboard Shortcuts.
Scroll down to the Help/Contents shortcut, click where it says "F1" and hit Backspace:

Disabling the F10 shortcut

Install the compizconfig-settings-manager package.

Warning: What are some of the issues with CCSM and why would I want to avoid it?

Open up CompizConfig Settings Manager.

Hit Super to open the Dash, type "Compiz" and hit Enter.

Type "unity" in the Filter entry and select the Ubuntu Unity Plugin.
Click the button to the right of Key to open the first panel menu and uncheck the Enabled checkbox.

That disabled the global F10 shortcut, now disable gnome-terminal's F10 shortcut:

In a gnome-terminal open up Keyboards Shortcuts (Edit ➜ Keyboard Shortcuts) and
uncheck Enable the menu shortcut key (F10 by default)

F10 is mapped to menubar_accel by something in Ubuntu. Gnome? Metacity? Not sure what exact thing it is that steals it, but the key doesn't make it to Eclipse.

Run gconf-editor, browse to /desktop/gnome/interface then scroll down to menubar_accel and delete the F10 value. [Stolen from here]


How do I access the command prompt in Lubuntu?

From UsingTheTerminal:

In LXDE (Lubuntu)
Menu -> Accessories -> LXTerminal.
Keyboard Shortcut: Ctrl + Alt + T


Cross-platform direct file transfer across the internet

Install winscp on the windows PC (it uses sftp which is part of ssh) and set up ssh on your system allowing him access to a directory or share. Install
openssh-server if not already there.

And this how to should still work on setting it up: basically you need to open a port, create a user (and password) and tell your windows user to insert your IP adress, the port, username and password into winscp.
Ubuntu One is made for this too.
Do not forget about the ability of mailing it or using a free file sharing website like mediafire. These 2 are very low tech and require no installation (unless he or you has no mail ;) ).
... and just for fun... if the 2 of you use torrents he could make it a torrent and give you the announcement (you can create trackers at openbittorrent).


Headphones not working in 13.10 after update

Type alsamixer into your terminal. Then scroll with your directional keys to the right until the tab "auto-mut" is highlighted red. If your problem is anything like mine, it will be "Enabled." Hit the up directional arrow to change the status to "Disabled." That did the trick for me.


Try to make a bootable for Ubuntu again(sd cart, dvd), then you can reïnstall Ubuntu. No problem to remove the used partition and remake it(if there is no important information on it).
I hope this helped.


That happened to me as well, so I can give you a little hint.

Install Refind Again

This looks silly but installing refind on Mac can really heal the efi partition that Refind is installed and may change the boot order to the EFI partition so you can switch between them.

If you can: Change bootorder from Ubuntu.
In Ubuntu there is a tool called efibootmgr that you can use it as changing boot order.

Writing efibootmgr will give you an output like this:

BootCurrent: 0080
Timeout: 5 seconds
BootOrder: 0080,0001
Boot0000* EFI partition
Boot0001* Mac OS X
Boot0080* Mac OS X
Boot0081*
Boot0082*
BootFFFF*

Applying this command will set bootorder to the efi boot so it will boot directly to Refind:

sudo efibootmgr -o 0000


For battery/power enter this command in terminal than logout and login back:
gsettings set org.gnome.settings-daemon.plugins.power active true


Xubuntu 20.04 - Suspend waits 30 seconds

I had exactly the same behaviour on Xubuntu 20.04 after upgrade from 18.04: suspend to sleep waited for 30 sec before entering sleep mode.
Changing the lock behaviour in xfce4-screensaver did not work for me: it only had the effect that the screen went black immediately, but sleep mode still waited for 30 sec before it became active, as indicated by the power LED and disk activity LED.
What helped for me was to remove xfce4-screensaver completely:

sudo apt-get purge xfce4-screensaver

After this, sleep mode entered after 1-2 seconds again.


Tim is correct. Here's what happens if you try this command with a package that is already installed (in this case vlc):

sudo apt-get install vlc

Reading package lists... Done
Building dependency tree
Reading state information... Done
vlc is already the newest version.


Can command line arguments be masked or hidden instead of appearing in the process list?

The kernel maintains internal pointers to the start and end of the arguments array in the process address space. So, you have to do it in tricky way.
You will find a brief explanation here.


Samba File Server hide folders for certain users

The easiest way would be to create a Linux user account for your 3 users and just have them to sign in to one big shared folder. To do so you will first have to install the gnome system tools with the following command

  sudo apt-get install gnome-system-tools

After you did this go to your user accounts and click the lock button and add your accounts.

Now open the gnome tool we just installed, it’s called users and groups.

Click on an account, select advanced and enter your pass. Go straight to the advanced tab and change shell to /bin/false. Also it’s recommended to generate a random password for the samba accounts so you can’t sign in to them on the Linux machine.

You can also change the user ID to a number lower as 1000 This way it will hide the account on your Linux machine. I recommend you to do this after you are sure everything is working 100%

Now do the same for the other account.

After that you make 3 samba accounts and link them to the Linux user accounts. Like shown in the following image:

Now it’s just a matter of changing permissions on the folders. I will use the student and school folder as an example.

Open an terminal and enter the following command

 gksudo nautilus

enter your password and click okay. Now browse to your shared folder and go to the folder school, right click on it and go to properties, select permissions.

Now you can set properties for users and groups to allow them to enter folders. In this example we want the owner to have full control and the student to only access the files and others get no access. So you would get this:

Now it is just a matter of repeating the previous steps to give the other accounts the wanted access and permissions.

I hope this answered your question.


Alt +F1 shortcut that makes me pick my user again - how to disable it

You have probably pressed Ctrl + Alt + F1.

Ctrl + Alt + F# switches through the TTYs.

F1 switches to the X session with the display manager (gdm) running the login screen.
F2 switches to the first logged in user,
F3 switches to the second logged in user,
... and so on.

This makes you easily switch between logged in users on a multi-user system.
Any TTY where no user is logged in will run a console (text) TTY.

When you go to gdm (F1) and log in, you will automatically be sent back to the TTY you are already logged in (in your case probably TTY-2).

Try it, you can always switch back to your "normal" session using Ctrl + Alt + F2.

In older versions of Ubuntu (e.g. 16.04), X was running on TTY7 per default (F7) and the display manager lightdm was not on a separate TTY.


What's being done to make lenses be easily available to users?

(I've retitled your question a bit to make it more answerable, I hope that's ok, normally I think this kind of question is too speculative but you just happened to ask when this is being actively worked on.)

The answer right now is that this is a work in progress and right now the Application Review Board and Technical Board need to make some decisions and there is no answer yet and these meetings haven't even occurred yet, but I think your question is valid and there should be a way to do that.

Ideally of course you'd want to have lenses just available in the software center instead of a huge list of lenses. This needs a few things fixed in the processes in Ubuntu to make it happen:

Lenses in particular tie into APIs for web services, these can change at any time, so you can't really package them in the normal archive as they could totally change.
So we'd like to see lenses submitted via developer.ubuntu.com so that they can be decoupled from the Ubuntu release process. This would allow the lens developers to update their lenses without having to care about Ubuntu distribution policies.
Ubuntu as a project hasn't really done this kind of thing before so our governance structures and developer workflows aren't set up for this, though it's something we want to fix and are actively working towards.

(I'll update this answer when I have more information)


youtube-dl : search keyword and only download urls

I figured it out

youtube-dl gvsearch5:how to develop for android --no-playlist --write-info-json --write-annotation --write-thumbnail --write-sub --skip-download"

The 5 in gvsearch5 is the n, for 10 results make it gvsearch10.
The output files are json and xml files for each result and those contain the youtube url.

Hope this is of help to someone.


OpenVPN Access Server manual configuration

After some digging I realized the configuration files (sqlite databases) are located at:
/usr/local/openvpn_as/etc/db
In particular config.db holds several parameters and the value column holds (as its name implies) a value for the parameter in the name column.
(sqlite is needed upon here. You can install it with
sudo apt-get install sqlite)
So, enter:
sudo service openvpnas stop
cd /usr/local/openvpn_as/etc/db
sudo sqlite3 config.db
Check the (second) interface listening:
SELECT * FROM config where value='eth1';  // or whatever your previous second interface is. This step is just for checking
Now update the value:
update config set
value='enp5s0' // or whatever your new second interface is
where value='eth1';
.exit
sudo service openvpnas start
After that, OpenVPN was up and running again


What features should I check on my VPS in order to have a secure box?

Implement the hardening techniques outlined in the CIS Benchmark guides for:

Apache
Debian
MySQL - if you are running this in your instance.

I would also run a vulnerability scanner such as Nessus against it to determine any additional security weaknesses that may exist.


Try

sudo apt-get remove --purge kile

and

sudo apt-get autoremove --purge

This should remove any leftover KDE dependencies (as long as there is no other KDE program installed, that depends on them)


Samba troubles could be a number of things, i'm just going to list a few things you could try:

Rule out the firewall. Disconnect the Internet then disable the firewalls and see if it works, if you hook up something you now have something to work on.

make sure your "smb.conf" file has a mention of: "name resolve order" with your prefered settings.

If the target machine is windows based, validate the network settings. Mainly file sharing, network discovery and user protected access. Also all needed server, local machine, etc... services.

Assuming you're running on a user based network, make sure the passwords are defined.

Random problems sometimes randomly go away, when all else fails try rebooting.

Make sure both machines are on the same workgroup? Maybe? Probably not because you say it worked before.

Double check ownership and security permissions for the shared folders.

That is about all i could think of. I would suggest running through the list, ruling out every problems. Then if the problem persists and you have an error message, toss it in google and read up about others having the same problem.

Trying to help. o/


Installing third OS on a dual boot system

You will only have 1 main bootloader.

It depends on what that 3rd OS is and if that OS lets you skip installing the bootloader from that installation on what happens to your system.

When you are done you can use an Ubuntu live session to install boot-repair and use it to re-install (for instance) Grub if you run into trouble.


Ubuntu 16.04 install +Nvidia 367 boot crash not working loop etc

1/ You do not state which Nvidia card you have. Not all drivers work with all cards. A mismatch can give many problems.

2/ You are best advised to perform another fresh install from a DVD, and allow Ubuntu to detect and install the generic driver for your card.

3/ Determine your exact card and use Synaptic to find and install the correct drivers. Then use Synaptic menu "settings/repositories/additional drivers" to choose the correct driver.


Do I actually need to reconfigure *everything* to use a tiling windows manager?

Tiling window managers are just that: window managers. It are not desktop environments. Therefore, if you run a window manager (e.g. "openbox" as a floating window manager, "i3" or BSPWM as tiling window managers), and not a full desktop environment (e.g. xfce, Gnome Shell, KDE, LXQT, ...), you have to set up everything yourself. Tedious at first, but many advanced users consider it fun, and it the way to make a system that truly is yours, and behaves as you tell it to do in every respect.

Do I actually need to reconfigure everything to use a tiling windows manager?

Yes. :-)
Some distributions ship with a fully configured setup centered around a tiling window manager. Regolith is an Ubuntu derivative that builds a preconfigures desktop environment around i3 window manager and Gnome tools. Manjaro has a preconfigured i3 spin. However, the offer is quite limited, specially because these people that tend to want to run only a window manager are also these that want to set up their entire system themselves.
Specifically for Gnome Shell: no, you cannot use any different window manager. Gnome Shell is quite locked-in in that respect, and uses its own window manager mutter. However, you could use a tiling window manager in other desktops, notably XFCE.


Audio jumps to full volume or mutes randomly

I had experienced exactly the same issue on my Debian Stretch some hours ago. If I read this report correctly then it seem that there are bugs with some motherboards and pulseaudio.

Follow this comment to verify in pulseaudio log that your problem is related with flaky jack sensing. If so then you may find other comments on that bug report helpful:

  Change /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf
  from:

[Jack Front Headphone]
required-any = any

[Jack Headphone]
required-any = any

  to :

# [Jack Front Headphone]
# required-any = any

# [Jack Headphone]
# required-any = any

  [You'll have to] restart pulseaudio (or the computer) for changes to take effect.

and:

  There might actually a better solution in newer kernels: if you install the daily DKMS package you will get this too.
  Then edit /etc/modprobe.d/alsa-base.conf and add this line:

options snd-hda-intel jackpoll_ms=250

  [And] then reboot and test. In case the sound card is not the first hda intel sound card, you might need to add more, like this:

options snd-hda-intel jackpoll_ms=0,250

  or:

options snd-hda-intel jackpoll_ms=0,0,250

  ... depending on which card you want to change.

This bug was reported in 2011 but comments from 2015-12 as well as my own issue confirm that it's still present.


how to see what was updated in last update

You can look in /var/log/apt/history.log to see what has been upgraded or installed, through an automated process or by your own decision.


How can I set the Software Center to install software for non-root users?

You can modify the PolicyKit permissions to allow the users to access the aptdaemon backend that Software Centre uses.

dpkg --listfiles aptdaemon shows that /usr/share/polkit-1/actions/org.debian.apt.policy is the file specifying the actions possible on the aptdaemon backend.

Looking in that file, the < action id=""> tags specify the possible actions.  You'd probably want org.debian.apt.install-packages to allow users to install new packages from the archive, and org.debian.apt.update-cache to allow users to update the package lists.

See man pklocalauthority which documents how to set local permissions on PolicyKit actions.  Putting the following into /etc/polkit-1/localauthority/50-local.d/10-allow-users-to-install.pkla will allow any user logged in to the local machine to install packages after typing their own password (even when they're not in the admin group) and to update the package cache without typing any password.

[Untrusted Install]
Action=org.debian.apt.install-or-remove-packages
ResultyAny=no
ResultInactive=no
ResultActive=auth_self

[Untrusted Update]
Action=org.debian.apt.update-cache
ResultAny=no
ResultInactive=no
ResultActive=yes


Can't boot Ubuntu 13.04 after installing alongside Windows 8

First, enter your firmware setup utility (what most people think of as "the BIOS," although it isn't technically a BIOS) and disable Secure Boot. (Unfortunately, how to do this varies from one system to another, so you'll have to dig to find the right options.) It's conceivable that this will get things working, but I can make no promises about that. If it doesn't, I recommend you try preparing a CD-R or USB flash drive version of my rEFInd boot manager. There are download links for both of those on the site. Try booting from that. If it gives you working boot options for both Ubuntu and Windows, you can go ahead and install it to your hard disk. Installing the Debian package is the easiest way to do this.


How to install Windows game on Ubuntu Steam from standalone installer?

I almost had it!
This page shows how to do what I want. I will summarize it here:

Add the installer to your Steam library with "Add a non-Steam to My Library"

Right click on the installer in your library and force the use of Proton

Click on the installer in your library and then click "Play". The installer should run.

Search your .steam folder for the game .exe

Open properties for the installer, and change the target to the .exe you found


Ubuntu Xenial not mounting nfs version 4.1

You can specify the version in the options.

i.e.  mount -t nfs4 -o minorversion=1 server:/path /mountpath

Tells it to use NFS v4 with a minor version of 1, so 4.1.


Are there any command line calendar (ics) readers which can handle rrule (recurring events)?

Pass it to remind, then pipe it to awk or sed to butcher it
$ cat calendar.ics | ics2rem | remind -s -
2020/12/05 * * * * Test repeated
2020/12/06 * * * * Test repeated
2020/12/07 * * 60 840 2:00-3:00pm 2pm dec 7 2020 appointment
2020/12/07 * * * * Test repeated


The package sushi is for generic Desktop environements.

it works on unity and probably many others out of the box but for Gnome (like ubuntu 18 and 19 uses) you need to add the gnome-sushi package.


Difference between apt-cache and axi-cache

Basically, apt-cache only shows the package name and its description. axi-cache shows the number of results found, more terms and more tags; all in all it means a more complete description. By using axi-cache your chances to find what you are looking for are better because of the more detailed info.


How to stop gecko-mediaplayer from buffering endlessly?

A quick glance at the source code suggests that the gconf setting is called "cache_size" not "cache", and that the default value is 2048.

If all else fails you could always change it in the plugin source code and rebuild the package. It's on line 280 of src/plugin.cpp.


error: Command 'nvcc' not found, but can be installed with: after installing CUDA Toolkit 10.0

Check if nvcc is in the folder /usr/local/cuda-10.0/bin. If it is, something went wrong when you added the folder to your path, which is described in your linked manual as followed:

echo "export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}" >> ~/.profile
source ~/.profile

As the manual states, after that, echo $PATH should return some folders including the one above.

If the path and nvcc do not even exist, your installation failed. I found the installation via the .deb file very error prone and alwas suggest to install cuda from the sources, which worked for me every time on 6 different computers and Ubuntu versions without any hassle.

Use the installation guide provided here by eromod:

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

sudo apt update

sudo ubuntu-drivers autoinstall

reboot

sudo apt install nvidia-cuda-toolkit gcc-6

nvcc --version


Resize only big images to small without changing the height/width ratio

Why not execute the convert from find?

find . -type f -size +10k -exec convert {} -geometry x150 {}.png \;

You need to rename the files from *.pic.png to something useful. But it should work.


How to resolve - dpkg error : old pre-removal script returned error exit status 102

Replace the file /etc/rc2.d/S76nscd with a symlink pointing to /etc/init.d/nscd.


How to change the command line title as in this image?

You can try with this command:

PS1="\$(date +%H:%M:%S) $PS1"

You can have it more elaborated like this:

export PS1='\[\033[0m\]\[\033[0;30;47m\] \u\[\033[0m\]\[\033[0;30;47m\]@\h\[\033[0m\] \w\n\[\033[1;32m\] \@ \$ \[\033[0m\]'

If you don't like it, just mess with it a little, to adjust it for your needs


How do I fix suspend in HP Chromebook 14? (Chrubuntu 14.10)

All thanks to linvinus on reddit: How to make hibernate working in ubuntu 14.04 on Acer c720

How to make hibernate working in ubuntu 14.04 on Acer c720, tested in HP Chromebook 14 on Ubuntu 14.10 kernel 3.17 as well, works. He has Lubuntu 14.04 kernel 3.13.0-24-generic c720 2G. For Debian, Arch, or Xubuntu, there are more instructions in the source link.

Takes about 5 mins to do, but works like a charm for me,

  create file

sudo nano /etc/initramfs-tools/scripts/init-top/unbind_ehci

  with following content

#####################
#!/bin/sh
PREREQ=""

prereqs()
{
        echo "${PREREQ}"
}

case ${1} in
        prereqs)
                prereqs
                exit 0
                ;;
esac

log_success_msg "Unbind ehci for preventing error"
echo -n "0000:00:1d.0" > /sys/bus/pci/drivers/ehci-pci/unbind
exit 0
#################

  change mode

sudo chmod a+x /etc/initramfs-tools/scripts/init-top/unbind_ehci

  create udev rule

sudo nano /etc/udev/rules.d/10_disable-ehci.rules

ACTION=="add", SUBSYSTEM=="pci", DRIVER=="ehci_hcd", \
    RUN+="/bin/sh -c 'echo -n %k > %S%p/driver/unbind'"

  update initramfs

sudo update-initramfs -k all -u

  this script will fix touchpad after resume

sudo nano /etc/pm/sleep.d/99zcyapa

  with following content

#####################
#!/bin/bash -x
# File: "/etc/pm/sleep.d/99_cyapa".
case "${1}" in
        hibernate)
      /sbin/rmmod cyapa
                ;;
  resume|thaw)
          COUNTER=0
          while [  $COUNTER -lt 10 ]; do
                        date >>/tmp/99_cyapa
                        /sbin/modprobe cyapa
          sleep 1
          dmesg | grep cyapa | tail -1 | grep error >/dev/null
          RES=$?
          echo "res=$RES"
          if [ ${RES} -ne 1 ] ; then
              /sbin/rmmod cyapa
              sleep 1
          else
              #done
              COUNTER=11
          fi

                  COUNTER=`expr $COUNTER + 1`
          done
      ;;
esac
exit 0
#################

  Change mode!

sudo chmod a+x /etc/pm/sleep.d/99zcyapa

  ensure that in you have tpm_tis.interrupts=0

sudo nano /etc/default/grub

  there is my settings

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash  boot=local  i915.modeset=1 tpm_tis.interrupts=0 "

  update grub

sudo update-grub2

  Reboot

Again thanks to linvinus on reddit


I've seen a lot of tutorials on how to roll back to one of these snapshots however, on newer versions of ubuntu (tested on 15.04), you nolonger need to mount the filesystem to roll back to a snapshot created through apt-btrfs-snapshot.

Again, run these commands from a running system, not a mounted partition as you normally would when managing btrfs snapshots.

Just run:

sudo apt-btrfs-snapshot list

to list the available snapshots and then run the following to revert to an older snapshot:

sudo apt-btrfs-snapshot set-default @<name-of-snapshot>

For this case, you may want to set the default to the existing snapshot.

Reboot for the changes to take effect.

Also, deleting snapshots is now much more reliable and simple. Again, to list snapshots, run:

sudo apt-btrfs-snapshot list

Then, to delete a snapshot, run:

sudo apt-btrfs-snapshot delete @<name-of-snapshot>

To list by date older than two days, for example, run:

sudo apt-btrfs-snapshot list-older-than 2d

To delete all snapshots older than two days, for example, run:

sudo apt-btrfs-snapshot delete-older-than 2d

The cool thing is that your old default will not be deleted so you can still roll back to that one if you have one set.

Deleting snapshots should take effect immediately.

If you get a "no space on device" error after you boot, you can attach a blank USB pendrive or external drive and use the command line to mount the drive at /tmp.

After mounting the drive at /tmp you should have enough available space to run:

sudo apt-btrfs-snapshot delete-older-than


MS Exchange in Gnome Online Accounts Not Syncing

This was resolved by installing the evolution-ews package.  A reboot was required after installation.

sudo apt-get install evolution-ews


Debian's OpenBox Page has a lot of what you're after in terms of customisation. Actually, it covers everything you're asking about (icons are part of the theme).

Ubuntu's own OpenBox page isn't bad either! It has a similar amount of information (it does look suspiciously similar!) but there are some Ubuntu-only notes in there too. Some of the information does look a little old (~2006 era), so be careful when basing your changes on the information there.


Go to 'System --> Preferences --> Appearance' and press "Get more themes online".

Download something you like and then drop the file you downloaded to the Appearance window. The files you download are usually in the Downloads folder.

You can download other themes from other websites, just drop what you download to the Appearance window and in a few second you will have your new themes in Ubuntu.


Apparmor protects linux services and have two types of profile modes: enforce and complain. In the complain mode, system doesn’t enforce any rules. It will only log the violation attempts

So you could check what profile mode applied to your daemon:

$ sudo apt-get install apparmor-utils
$ sudo apparmor_status

You need to add your pulseaudio daemon into complain mode using aa-complain command:

$ sudo aa-complain /usr/bin/pulseaudio # path to your daemon could be different

Use whereis pulseaudio command to see where it is located in your system if path is not displayed in case of apparmor_status command execution.


From your question, I assume you are using GNOME Shell. It sounds like this might be due to some settings being cleared, or changed. (I can't remember which it was, but I'm pretty sure I bumped into this a while ago). You can configure your own maximize and unmaximize shortcuts in the Keyboard settings panel. Open System Settings from the menu with your name at the top of the screen, click Keyboard and then choose Shortcuts. Now, under the Windows section, you should see items for "Maximize window" and "Restore window". Click each one you wish to change and enter the shortcut you want.


Can't install Wine Ubuntu 18.04, dependencies issues SOLVED

Run the following command in the Terminal for adding i386 architecture before installing a 64-bit version of Wine:

$ sudo dpkg --add-architecture i386

Run the following in order to add the WineHQ signing key:

$ wget -qO- https://dl.winehq.org/wine-builds/Release.key | sudo apt-key add -

Now run the following command in order to add the relevant repository from the WineHQ:

$ sudo apt-add-repository 'deb http://dl.winehq.org/wine-builds/ubuntu/ artful main'

This is the most recent and stable release of Wine available. Use the following command to install this version:

sudo apt-get install --install-recommends winehq-stable

Please enter Y when prompted with a choice of y/n for installation. After that, the stable version of Wine will be installed on your system.


What is syslog and how can I tackle problems by using it?

There are many software packages that can provide system logging. Ubuntu is using the package rsyslog. Its configuration files are located in /etc/rsyslog.conf and /etc/rsyslog.d/*. The configuration files define which system messages to log, which directories to store messages, and which files to record different portions of system messages. As with the majority of Unix and Linux, the system log files are recorded in the files located in the directory, /var/log/.

By examining these files, we can learn what is happening with the software on the system. For example, auth.log records user authentication events, boot.log records boot events, syslog records all messages except authentication events (in the default configuration).

To examine a log file in real time: tail -f /var/log/syslog

To find cron-related messages: grep cron /var/log/syslog

To learn more about system logging from the command line:

apropos syslog

This command, apropos, will try to return relevant manual pages for the term syslog.

It will return a reference for rsyslogd and its configuration files.

There is also a good Wikipedia article on the topic.


I have same problem with Xubuntu 12.10. The FS suddenly and randomly become read-only. Maybe it is related to this bug:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1063354

It seems like the problem is with new kernel.


Stop mysql first. Then run the update. It should then work.

Edit.
Before you run the update try

sudo service mysql stop

then

sudo apt-get upgrade

Then you can do

service mysql start

If you still have trouble then you might want to check that the "sudo service mysql stop" command leaves no MySQL processes behind.  You can check for processes with the following command. Interpreting the output of ps is beyond the scope of this answer
    ps -ef |grep mysql

However for completeness here is what I get when MySQL is running

root@control:~# ps -ef |grep mysql
root      1304     1  0 Oct24 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe
mysql     2568  1304  6 Oct24 ?        10:55:04 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql/ --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/lib/mysql/mysql-error.log --open-files-limit=65535 --pid-file=/var/lib/mysql/mysql.pid --socket=/var/run/mysqld/mysqld.sock
root      4492 23102  0 11:32 pts/3    00:00:00 grep --color=auto mysql

... and when MySQL is stopped ...

root@control:~# ps -ef |grep mysql
root      4492 23102  0 11:32 pts/3    00:00:00 grep --color=auto mysql


How to change from Legacy boot to UEFI boot?

Take the hard drive out of your laptop.  This should allow you to get into the UEFI.  If that does not work, the instructions (take from the VAIO User Guide) to get into the UEFI are as follows:

Press the ASSIST button while your VAIO computer is off.
The VAIO Care Rescue Mode screen appears.
Select Start BIOS setup.
Enter a password if it has already been set.
The BIOS setup screen appears.

Now, you should be able to change back to UEFI from Legacy boot.  As far as the second part of your question, this should help you in doing what you need to do.  To make this answer more complete, I will add that guide here:

If you want Ubuntu on the same disk as Windows 8.1, here are the steps to go through:

1) Turn off Windows Fast Boot

2) You need to shrink the main Windows 8.1 partition.  This can be tricky, as Windows expects a certain partition scheme to be used.  Let me show you a diagram:

[(Windows RE Tools)(EFI System Partition)(Microsoft Reserved Partition)(Windows 8.1)(Anything else)]

You can use your favorite tool to edit these partitions.  I prefer Gparted, but any good disk partitioning tool can handle this.  Backup your Windows install first.  Then, resize the Windows 8.1 partition so that you have enough space for another OS.  I prefer to give my Linux installs about 50-100 GB of space (for expandability).

3)  Download your Ubuntu (use 64 bit only and I suggest 13.10) iso and put it on some media (CD/DVD/USB/(insert your preferred media here)) by using your favorite tool (most people prefer Rufus) or dd.

4) Shut off Secure Boot and Fast Boot in the UEFI.  DO NOT TURN ON LEGACY BOOTING (if your motherboard supports UEFI only booting without Secure Boot and Fast Boot on.)

5) Insert your install media and install Ubuntu in the partition you made earlier.  Make sure that for your EFI boot partition, you make the installer use the EFI System Partition already created by Windows 8.1.  The partition should be something like sdXn (replace X with the drive it is on and n with the partition number, such as /dev/sda2), but this could be different.  DO NOT REFORMAT THIS PARTITION!!  You are only going to tell the installer to use it as the EFI partition.  It will put the grubx64.efi bootloader for Ubuntu in this location.

6) With that done, continue the install as normal and set up your partitions as you see fit.  Once the install is finished, you should be able to boot into Jessie easily.

If you are trying to fix an existing install of Ubuntu, you will need to do:

sudo apt-get install grub-efi-amd64

sudo modprobe efivars

sudo grub-install /dev/sdx (x being the drive Ubuntu is installed on)

sudo update-grub

From there, the UEFI should use Grub-EFI as the bootloader. I have not found a way to get the Windows 8 bootloader to see and allow Linux to boot in UEFI.  YYMV.


What is the toolchain upload that happens at the start of every release cycle?

The toolchain is the set of packages which are used to build all the rest, such as gcc, binutils, glibc, etc. They are uploaded at the beginning of the release cycle before other packages, so that all subsequent package uploads are built against these.


How to restart computer with terminal with GUI not working

WARNING: This solution is tested on Ubuntu 16.04 And up. This should work on earlier versions. if not, please look for other solutions.

To fix that issue, we need to use something called a CLI interface or Command Line Interface. To open CLI, which is a Terminal, do Ctrl + Alt + T and you'll have the terminal up.
Inside of the terminal, restart your device with the reboot command or shut it down with using the shutdown now command and power back on your device. after booting back into Ubuntu, your desktop will load in as expected. Now you can enjoy your day without even worrying about not knowing how to fix that issue.
If you have important progress to save, and you cannot save because of that issue, well I'm sorry to say that your progress has to be sacrificed for the functionality of your deceive.


Symbolic links breaking after restart 16.04. LTS (linux)

If you do a df -h in a terminal you will see that /dev is "mounted on" udev, not /dev/sdx or anything else indicating a physical disk. udev is a virtual file-system (in memory) that is regenerated every time the system is booted.

That's why your symbolic link disappears on reboot.


keep getting added to hosts.deny + iptables

According to Apache documentation:

"Often the most effective anti-DoS tool will be a firewall or other operating-system configurations. For example, most firewalls can be configured to restrict the number of simultaneous connections from any individual IP address or network, thus preventing a range of simple attacks. Of course this is no help against Distributed Denial of Service attacks (DDoS)."

On linux tcp wrapper is a host-based Networking ACL system, used to filter network access to Internet.

I suggest verify if is installed portsentry that can block DoS attack via hosts.deny and firewall rule (iptables).


20.04: Some keyboard shortcuts don't work in GNOME Shell desktop

I associated this problem at first with the fact that I couldn't basically delete files, copy, cut or paste anything on the desktop. Here's the workaround that solved my problem once and for all:

Remove gnome extension:
sudo rm -r /usr/share/gnome-shell/extensions/desktop-icons@csoriano/

Install nemo:
sudo apt install nemo

Press Ctrl+H in your home folder, enter the .config folder and create a folder in it labeled autostart

Open gedit and copy the following text into the empty file:
[Desktop Entry]
Type=Application
Name=Nemo
Comment=Start Nemo desktop at log in
Exec=nemo-desktop
OnlyShowIn=GNOME;
AutostartCondition=GSettings org.nemo.desktop show-desktop-icons
X-GNOME-AutoRestart=true
NoDisplay=true

Save the text file as ~/.config/autostart/nemo-autostart-with-gnome.desktop

And that's that. Next time you log in, nemo will be the one ruling over your desktop, not nautilus anymore. That means you'll have access to all the old shortcuts that were supposed to be working properly on your desktop, plus you'll have new options available when you right-click with your mouse. Worth giving a try!
I've come to this answer using this post as a reference: https://gitlab.gnome.org/GNOME/nautilus/-/issues/158#alternative-solution


Ubuntu 12.04 won't boot on Toshiba Satellite L855

You have to go to BIOS, and find setting that says EFI boot or UEFI. It is burried somewhere in the "advanced" menu.
Set it to the mode compatible with BIOS boot.

To get to the BIOS, keep pressing F12 during boot and select "setup" from menu.

(I got my Toshiba Satellite L855-S5372 to install Mint Linux that way.)


Cannot upgrade from Ubuntu 16.10 to 18.04 LTS

I used this.
Before you will upgrade to the 17.10 and the to 18.04.

When you login you will have both unity and gnome available but if I remember exactly you can' t use unity.
With the first upgrade some things (for example files) in the launcher bar will disappear and also some options in the  top panel.

If you search here you will find how restore the top panel options (and add programs to the launcher bar is easy).

But don't do it because after the second upgrade you will lost them again. Some apps (for example Open Arena) don't work with 17.10 and 18.04.

I prefer unity instead of gnome and you can install it using sudo apt update and sudo apt install ubuntu-unity-desktop.

I suggest to install it using the iso, using the same username and password without formatting the home partition you won' t lose that partition. Made some researches to be sure to not lost something important for you.

After the terminal update i reinstalled Ubuntu 16.04.


How can I make a program (using SDL) built on Ubuntu work on other systems?

Build the binary separately on each platform you want to supply binary packages for and make sure you distribute the source code so that people on other platforms can build it for themselves.

Note that Linux focuses on source compatibility rather than binary compatibility. Most distributions are not binary compatible with each other (not even Ubuntu and Debian are completely compatible*).

This is a somewhat related question:
Technically speaking, what is different about Ubuntu compared to other Linux distributions?


It seem to be the kernel to causing the problem. Using Grub Customizer I changed my kernel from 4.10.0-28 to 4.8.14-040814. Now the controller work correctly.


The problem is because your destination disk (the disk to which you want to copy the file) is formatted with FAT32 (which has a file size limit of about 4GB.
The solution is to format your destination disk to EXT3, EXT4, or NTFS (if you need windows compatibility).


Intel Graphics Installer "Error removing old repository configuration"

The error regarding the removal of the old repository was in my related to pkexec which was not found (don't ask how it dissapeared).

I downloaded and installed policykit-1 package :

wget http://launchpadlibrarian.net/150623542/policykit-1_0.105-3ubuntu3_amd64.deb
sudo dpkg -i policykit-1_0.105-3ubuntu3_amd64.deb

You should adapt with the package that belongs to your distribution version


Problems after trying to alter resolution with xrandr

So a reboot helped.

Reason I didn't try it before posting was because friends were using the VOIP-server.

Anyways, I'm leaving this here in case someone else screws up like I did :)


over web access how do I move files between folders

There's no way to move the files between folders in Ubuntu One web interface, you can just Publish, Download or Delete them.


Is the nginx charm stable for production?

No, the nginx charm is not considered production ready yet. An easy way to tell is by looking at the namespace:

It's in lp:~imbrandon/charms/precise/nginx/trunk.

That means a person has charmed it, but it hasn't met the guidelines that we expect in the charm store (yet). A production charm would be in ~lp:charms/precise/nginx/trunk or something like that.

Options here would be to:

Review the charm yourself and determine if it's production ready, then either fix it to push it into the official store or maintain your own branch.


lubuntu 14.04 - cairo-dock missfunctions

This is caused by compositing emulation provided by Cairo Dock. By right you should use real composition for jobs like this.

This is how you can get composition in Lubuntu 14.04

sudo apt-get install compton
Go to Applications menu, Preferences, Default Applications for Lxsession.
Go to autostart, add another startup process compton -b

Log out and log in back then you should able to use the dock nicely after disable Composition Emulation in Cairo settings.


Empty Trash Sound Workaround

      for Ubuntu 12.04.3

Maybe you will find my idea useful.
   After 2 months of searching for a solution to get a trash-empty sound
   in Ubuntu 12.04.3 I finally was able to put together something that works for me.
If anyone has an improved solution then please share.

You will note in the script below that I have chosen to use the "music123" app
which can be downloaded from the Ubuntu Software Centre and installed to the
/usr/bin folder.  I got the idea from an article on how to set up Ubuntu shutdown sound --> from here.
That one worked great also, I even added the Ubuntu start-up sound.

The following script also uses the commands "trash-empty" and "trash-list".

These commands are part of the "trash-cli" command line utility which was also downloaded from the Ubuntu Software Centre.

Linux Script to Empty Trash with sound of glass breaking.

#!/bin/bash
#
# Name of script: empty-trash.sh
# script to empty trash with confirmation and empty trash sound event
# This script is located in /usr/local/bin

SOUND = "/usr/share/sounds/ubuntu/stereo/trash-empty.ogg"
trash-list > ~/.local/share/Trash/files/trash.lst
file = ~/.local/share/Trash/files/trash.lst

if [ ! -s $file ]; then

        rm -f $file;
        zenity --info --text "TRASH is EMPTY"

else

        zenity --question --title "Confirm Yes/No" --text "EMPTY Trash Bin ?"

           case $? in

                0)
                trash-empty;
                /usr/bin/music123 $SOUND
                ;;

           esac

fi

If you have a trash bin on the desktop or elsewhere, it will continue to work properly and it will still show the full and empty trash bin icons. If you do not want to hear the trash-empty sound then you can right-click on your regular trash bin icon and empty the trash in the usual way.
To empty the trash and hear your chosen sound click on the launcher made for that purpose.  My trash-empty sound is that of breaking glass. You can choose whatever sound file you like, or make your own.

If you click on "Yes" in the zenity confirmation dialogue, then all the trash in all locations, including partitions and USB drives, will be emptied.

                                      ~.~

You can make an "Empty Trash" launcher and put it on your desktop to launch this script whenever you want to empty the trash. Make sure that you have made this script executable.

Attach a unique icon to the launcher.  This is the one I used:

This is the Zenity dialogue question box to confirm emptying of trash:

This is the Zenity dialogue info box that appears if the trash bin is empty
and you have clicked on the "Empty-Trash" launcher.

I added the above edit to provide the images that were not permitted during my initial post. I hope this extra information is useful.
 - walt -wladicus 2013.12.30


booting error, I am stuck on a black screen reading "/dev/sdb2: clean, ******/****** files, *******/******** blocks". How can I get back into my PC?

In the event your disk space is low:

Grab a Live disk

Grab an external storage media or a new internal drive
>If using a new internal disk, connect this disk while device is not connected to power and do not disconnect old disk from the machine just yet

Boot into the Live disk

Use GParted to format new media
>Ensure you have selected the correct media before formatting
>Please refer to Documentation as to which format is best for your system

Select files under /home/user/$YOU to be transferred to new media

!!>> If you do decide to just swap to a larger disk, you can 1-4. to format the new storage media, and then simply move the files using the mv command. You may find the documentation for the mv command by typing mv man into the Terminal.


After being root, the custom .bashrc file no longer runs?

It has to do with environmental variable and how you become root (sudo, sudo -i, sudo -s, and log in via console and ssh). You did not specify in your question how you logged in as root.

See:

http://ubuntuforums.org/showthread.php?t=983645 or
https://help.ubuntu.com/community/RootSudo or
https://help.ubuntu.com/community/EnvironmentVariables

Solution (IMO): Copy the .bashrc you wish to use for root to /root directory and use sudo -i command to login as root.


Hide files and directories starting with '.' in Nautilus

To toggle hide/unhide hidden files and directories in Nautilus press Ctrl+H.


These files contain JIT compiled code. They are created and immediately unlinked even before execution has finished. The component responsible for their generation is orclib, see http://code.entropywave.com/orc/ All kind of tools get confused by these files, because more typically executable code never changes, and in the worst case changing code might be a sign of malware.


Kubuntu screenshot opens KSnapshot rather than saving to file

PrintScreen From Terminal

From the terminal we can produce the screenshots we want with the ImageMagik import command. To save a time-stamped full-screen screenshot to your pictures folder run:

import -window root ~/Pictures/screenshot$(date +"%Y-%m-%d_%H:%M:%S").png

To save a time-stamped screenshot of the current window to your pictures folder run:

import -window $(xdotool getwindowfocus) ~/Pictures/screenshot$(date +"%Y-%m-%d_%H:%M:%S").png

(This may require you to install xdotool with sudo apt-get install xdotool if it is not already installed.)

Setting up the hotkeys

If this commands work then you can assign the hotkeys by opening system settings and selecting "Shortcuts and Gestures"

Select "Custom Shortcuts". At the bottom of the list select "Edit">"New">"Global Shortcut">"Command/URL". Rename the shortcut and select the "Trigger" tab. Click The button labelled "None" and then press the PrintScreen key. This will warn you you are reassigning this away from PrintScreen, click "reassign".

Now select the "Action" tab and enter import -window root ~/Pictures/screenshot$(date +"%Y-%m-%d_%H:%M:%S").png. And click "Apply" at the bottom of the screen.

Repeat this process with your chosen shortcut for the print window command (import -window $(xdotool getwindowfocus) ~/Pictures/screenshot$(date +"%Y-%m-%d_%H:%M:%S").png) if desired.

Finally select "Global Keyboard Shortcuts" from the left. And "khotkeys" from the dropdown. Your new shortcuts should be listed. As is "PrintScreen" the launcher for KSnapshot. If desired click "PrintScreen" and click the "None" button to reassign it to a new shortcut.


How do I remove facebook from this menu?

I've managed to remove facebook entry from the messaging menu by deleting "facebook.desktop" from

  ~/.local/share/applications


Why the Ubuntu 16.04 LTS is till 2020-2022 and not just 2022?

The command ubuntu-support-status shows that the majority of the packages on my Ubuntu 16.04 are supported until April, 2021 which is the same as the Ubuntu 16.04 release end of life which is listed at the official Ubuntu release cycle | Ubuntu website. In Ubuntu 20.04 and later the command ubuntu-support-status has been replaced by the ubuntu-security-status.
Example results of ubuntu-support-status in Ubuntu 20.04:
$ ubuntu-security-status
1670 packages installed, of which:
1601 receive package updates with LTS until 4/2025
  69 could receive security updates with ESM Apps until 4/2030

Enable Extended Security Maintenance (ESM Apps) to get 0 security
updates (so far) and enable coverage of 69 packages.

This machine is not attached to an Ubuntu Advantage subscription.
See https://ubuntu.com/advantage
As you can see on the chart on the linked website (part of which is shown below), Ubuntu 12.04 LTS has already been an end of life release since April, 2017, but its security maintenance has been extended for an additional 3 years until April, 2020 for Ubuntu Advantage customers, and the security maintenance of Ubuntu 14.04 has been extended for an additional 3 years until April, 2022.
After the period of security maintenance has ended you can still continue to use the end of life Ubuntu release, but it will be less secure because it will no longer be updated.

Extended Security Maintenance (ESM) is free for personal use on up to 3 machines (limitations apply). All you need is an Ubuntu One account. Initially, free subscription is available for Ubuntu 14.04 LTS only.
The next Extended Security Maintenance (ESM) release after 14.04 will be Ubuntu 16.04.
At OpenStack Summit held on November, 2018 Canonical and Ubuntu founder Mark Shuttleworth said in a keynote that Ubuntu 18.04 Extended Security Maintenance support lifespan would extend Ubuntu 18.04 support from 5 years to 10 years.
There are some packages installed on my system that are supported only until April, 2019 and other packages that are supported until January, 2023, however like the other Ubuntu LTS releases Ubuntu 16.04 LTS is supported for 5 years after its release date.
Ubuntu Core, with an image size of 260MB, is the smallest Ubuntu release to date. This makes it ideal both for IoT devices and cloud containers. Ubuntu Core 18 is based on Ubuntu 18.04, and is supported for 10 years. A new release of Ubuntu Core is released every 2 years on even numbered years (2016, 2018, etc.).


no sound in the new upgrade! why did this happen?

You can try re-installing pulseaudio (more likely if you are using analog audio)
You can also try the mainline kernel (more likely if you are using HDMI audio)


Error while using samba for file sharing - convert name "Everyone" to a SID

You will in fact get that error if smbd is not running so ... um ... start it:

sudo service smbd start


vagrant up throws The following command responded with a non-zero exit status

After adding 127.0.0.1 localhost to the /etc/hosts file. The issue seems to have gone away.


How to install previous version of Maven (3.0.4)?

Download and extract the installation package:

cd /opt
wget -O- https://archive.apache.org/dist/maven/maven-3/3.0.4/binaries/apache-maven-3.0.4-bin.tar.gz |
sudo tar -xzv

Add /opt/apache-maven-3.0.4/bin to your PATH.

See also http://maven.apache.org/download.cgi.


Will Ubuntu fix my Video Card Driver issue?

You can install either Xubuntu or Lubuntu on your Dell Inspiron 1300. Preferably Xubuntu because Lubuntu doesn't have a Long Term Support release. Preferably Xubuntu 12.04 because it is a Long Term Support release which is supported by updates until April, 2015.


Try boot-repair to reinstall and configure grub.

Boot to live cd desktop and open terminal then type

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

Wait for it to finish then type

sudo apt-get install -y boot-repair && (boot-repair &)

Now you can launch from dash and follow the instructions.

Heres a link to detaild documentation https://help.ubuntu.com/community/Boot-Repair


Maybe the ports are closed. You can install gufw and open up the ports through the gui interface.

sudo apt-get install gufw

On a parallel observation, if you have a 20MB connection your download speed should be 2.4Mbps.


UI Problem in Ubuntu after give update and run VLC player

re install vlc

$ sudo apt-get purge vlc

or

$ sudo apt-get autoremove vlc

installing the stable version

$ sudo add-apt-repository ppa:djcj/vlc-stable
$ sudo apt-get update
$ sudo apt-get install vlc

then reset the unity

$ setsid unity

if that didnt workout try to re-install the unity & the desktop

$ sudo apt-get autoremove ubuntu-desktop
$ sudo apt-get autoremove unity
$ sudo apt-get update
$ sudo apt-get install unity
$ sudo apt-get install unity-2d
$ sudo apt-get install ubuntu-desktop
$ sudo shutdown -r


You could either use the following ways to install a package through a terminal:

dpkg

sudo dpkg -i /path/to/deb.deb

APT

There are actually 2 ways to install deb files with APT.
sudo apt install ./deb.deb

OR
sudo apt install /path/to/deb.deb


How to change names of files in a directory to random generated names?

Run in the directory with the files:

for file in *.jpeg; do
    mv -- "$file" "$RANDOM.jpeg"
done

But there is a chance the random names will conflict since $RANDOM only gives numbers between 0 and 32767.

Better solution, thanks to pbhj:

for file in *.jpeg; do
    mv -- "$file" "$(mktemp --dry-run XXXXXXXX.jpeg)"
done

There is still a chance the random names will conflict, but it's significantly smaller with 8 alphanumeric characters from mktemp. See Anselmo's answer for guaranteeing no conflicts.


Server 16.04.02 with xorg + openbox - Detect Monitor and set good resolution?

To Detect the monitor do Install edid sudo apt install read-edid. Then run it by sudo get-edid | parse-edid. This will give you monitor information


Mimicking windows shortcut to folders for quick desktop access

Gnome Shell, which Ubuntu uses by default, actually does not support icons on the desktop. For "quick access", the desktop may not be the ideal place. When you are actually working, the desktop is covered most of the time. Ubuntu nevertheless supports desktop folders, however through a Gnome Shell extension that currently has limitations.
The way to quickly access folders would be through bookmarks in the file manager. You can quickly launch Files using the mouse or the keyboard. Bookmarked folders then are a mouse click away. Alternatively, typing two or three letters of the name will quickly reveal the folder, and then it takes hitting Enter to be in the folder.
That said, it is still possible to implement shortcuts, as opposed to symlinks, on the Ubuntu desktop. Such "launchers" are little text files with the .desktop extension. Because no graphical tools are provided anymore to create such launchers, by default, you have to create these manually.
To create a launcher that for example opens your "Documents" folder, create a desktop file which you could call, for example, documents.desktop, in the text editor. Five lines are sufficient to have a working launcher. Enter the following in your text editor:
[Desktop Entry]
Name=Documents folder
Exec=xdg-open /home/<youruserlogin>/Documents/
Type=Application
Icon=org.gnome.Nautilus

Replace  by your actual login name. Save the file as documents.desktop and put it on your desktop. The first time, you will need to right-click the file and give permission to execute it. Only then will the file appear as a regular and functional launcher icon on the desktop.
In this example, the icon is that of Files. You can replace org.gnome.Nautilus by a pathname to any graphical file in .PNG or .SVG format to use the latter as icon.
Most elegant is to collect your custom icons in a folder .local/share/icons under your home folder. .local is a hidden folder. You will only see it in Files if you turn on "Show hidden files" (hamburger menu, or simply hit Ctrl+h to toggle between showing and hiding hidden files. In local, you will find the folder share. In the folder share, you probably will need to create the icons folder yourself because it is not there by default. When you refer to graphics inside that folder, you can just put the file name in your .desktop launcher. For example, if you have your custom icon ~/.local/share/icons/documentsfolder.png, then simply specify the icon as:
Icon=documentsfolder

You only need to provide a full path if your icon is in a non standard location as in
Icon=/home/<yourlogin>/Documents/Icons/documentsfolder.png

If you find this cumbersome, and working with "shortcuts" on the desktop is crucial for your workflow, you may want to consider switching to another Linux desktop environment that still fully support this feature. Examples are Mate or XFCE, but also the Plasma desktop, although the latter, being based on a different toolkit (QT), has a different look and feel. Still, it is a look and feel that may be more familiar to ex Window users than the look and feel of GTK based desktops.
Could be a bit overwhelming for a new user, but then, Linux is about choice.


More info would be nice:
   How did you update your drivers?

Anyway I have seen once or twice that a kernel update or graphics driver update didn't work out. Maybe because of a bug or something... In that case you can try to startup with an older kernel. If that works, it's now problem to go back to the old kernel (with the older, working driver) until yet a newer version is released.

Please try this. For tips on how to do this: how-can-i-boot-with-an-older-kernel-version

If this works, let us know and we'll help you uninstalling the not-working kernel and making sure that it will not be used again...


/var/log/apache2 gets deleted on restart - so apache doesn't start on startup

It sounds like you've mounted /var/log as tmpfs. Check your /etc/fstab file for a line like:

tmpfs /var/log ...

Another possibility is that you're using "disk cleanup" software or have a cronjob that purges the directory on boot.


Why do we use ctrl + c / ctrl + x / ctrl + z in terminal?

Because it's specified in POSIX, the IEEE norm for Unix-like computer systems.

Check Section 10.2 - Output Devices and Terminal Types of the POSIX.1 2008 (the latest) specification for all the shortcuts available.

To add up to your question, this is a brief explanation of what those shortcuts actually do.

When you press Ctrl-[letter], you are actually sending a signal to the process. A signal is a "flag" you provide to the process that gets interpretated and associated with an action.

Ctrl-C sends SIGINT, a signal that causes the process to terminate.
Ctrl-Z sends SIGTSTP, a signal this causes the process to suspend execution. In this case, it is resumable - try executing a command that will take a while and press Ctrl-Z; you'll see something in the lines of

[1]+ Stopped [your command].

Type fg in your Terminal and you'll see the process resuming, if it didn't end before resuming it.
Ctrl-X, in this case, is the shortcut nano uses to exit the process. Incidentally, there is a signal associated to Ctrl-x, but it's not related to nano.

TL;DR It's specified in POSIX.


please explain how to configure ansible hosts on ubuntu

My best guess is that this is failing because you are running SSH as the user 'root' and not as the user you created such as 'ubuntu' or your own username.

Test it out with the SSH client directly and get that working, e.g.

ssh root@1921.68.197.120
or
ssh sravan@1921.68.197.120


Backlight issues with Asus X551MAV-EB01-B

I've been using this (self-made) script for quite some time on my NVidia card and works fine. If @TheSchwa's solution doesn't work try this.

Install the script:

Open a Terminal
Type: sudo apt-get install -y inotify-tools and press Enter
Type: sudo nano /usr/local/bin/backlight-sync and press Enter
Copy the script from this page (has been adopted for your intel card already)
Paste it into the Terminal window using Ctrl+Shift+V
Press: Ctrl+X
Press: y
Press: Enter
Type: sudo chmod a+x /usr/local/bin/backlight-sync and press Enter

Test the script:

In the Terminal type sudo backlight-sync and press Enter
Change your screen brightness at least once to see if its working
Press Ctrl+C to quit

Enable the script during boot:

In the Terminal type: sudo nano /etc/rc.local and press Enter
Use the arrow keys to navigate above the line that says exit 0
Type: /usr/local/bin/backlight-sync &
Press: Ctrl+X
Press: y
Press: Enter
Close the Terminal window


Sub-process /usr/bin/dpkg returned an error code (2)

Add /sbin to your $PATH as root

Check whether /etc/sudoers file has the correct PATH or not. By default /etc/sudoers should have the path mentioned below. If in case its not present go ahead and add /sbin.

Sample /etc/sudoers file:

Defaults    env_reset
Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"


Can cp completely overwrite a directory?

Command rsync in combination with --delete option, more in man rsync:

$ rsync -av --delete /from-path /to-path


How do I revert the Plymouth theme back to default after purging Kubuntu?

Where does the Plymouth theme come from?

There are a number of plymouth themes available from the Ubuntu repositories.  When you install plain Ubuntu desktop, the package "ubuntu-desktop" will install the package "plymouth-theme-ubuntu-logo" which is the plain Ubuntu plymouth theme.

When you install Kubuntu, the package "kubuntu-desktop" will install the plymouth theme "plymouth-theme-kubuntu-logo".

If you have more than one plymouth theme installed, you can choose your preferred one with:

sudo update-alternatives --config default.plymouth

Note that this applies to the plymouth graphical theme.  Plymouth also has a text theme which should only show if graphics are unavailable.  The same applies, but the package names are a bit different and the update-alternatives entry is "text.plymouth" rather than "default.plymouth".

How do I make it take effect at boot? / Why do I only see my new choice at shutdown?

For the bootup sequence, plymouth needs to load before the root file system is mounted, therefore it needs to be present in initramfs (the initial ram filesystem).

The reason you are seeing the correct splash at shutdown is that you have update plymouth's configuration successfully, but the same configuration hasn't been placed into the initramfs.

To update the initramfs, you use the command:

sudo update-initramfs -u


How can I open and view an image file via an SSH connection?

If you want to use GUI applications with ssh, you need to use the -X or -Y options (use -Y):

 -X      Enables X11 forwarding.  This can also be specified on a per-host
         basis in a configuration file.

         X11 forwarding should be enabled with caution.  Users with the
         ability to bypass file permissions on the remote host (for the
         user's X authorization database) can access the local X11 display
         through the forwarded connection.  An attacker may then be able
         to perform activities such as keystroke monitoring.

         For this reason, X11 forwarding is subjected to X11 SECURITY
         extension restrictions by default.  Please refer to the ssh -Y
         option and the ForwardX11Trusted directive in ssh_config(5) for
         more information.
 -Y      Enables trusted X11 forwarding.  Trusted X11 forwardings are not
         subjected to the X11 SECURITY extension controls.

So, for example, to use eog to display the remote image at /path/to/file.png, you would do

ssh -Y liarez@remote.host eog /path/to/file.png


Error when adding ppa repository: keyserver.ubuntu.com: Host not found

Duh! In order to verify the proxy settings are setup correctly for sudo, I entered the interactive mode:

$ sudo -i
$ env | grep proxy
https_proxy=http://my-proxy:8080

It turned out that only https_proxy was set for root. As I had set the proxy env vars in /etc/environment this was a bit strange as sudo should source /etc/environment.

Then I stumbled upon #1301557. 14.04.1 being an LTS version, it is a bit disappointing that this bug hasn't been fixed even though it was reported way back in 2014-04-02.

In order to fix this problem, both of the http_proxy and https_proxy should be added to env_keep in sudoers:

Defaults        env_keep +="http_proxy"
Defaults        env_keep +="https_proxy"

This fixed the problem.