How can I merge partitions in Ubuntu 15.04?

Try to get use to command line. Take advantage and explore fdisk command.
You need to use sudo for this.

Or

I suggest the application gparted. You may have to install it from the Ubuntu repository or Software Center. It will give you user friendly interface that will make things easy for you.

Note- If any of the partitions that you want to merge is in use, you will have to do it from live DVD/USB using GParted


Unity has become a complete mess after installation of Pantheon

Today I ran into a similar trouble, and here's what helped me restore my desktop:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:elementary-os/daily
sudo apt-get remove elementary*


Notepad++ wont show or open /opt/ files and directories

That's because either Wine or Notapad++ itself does not have permission to access that folder.
Modifying access to a root folder is not a wise move though. Try running it with sudo.


Keyboard shortcut to jump between terminal commands

The feature you are looking for unfortunately is not available in the Ubuntu terminal. The closest you could get to quickly move to a previous command in the terminal output, is to use the Find function. You can search for your prompt. Once the search string is entered, it will more or less work as you want. The entered search string remains active throughout your session until you change it, and you can use hotkeys to quickly jump to the previous or next instance.

Shift+Control+f will summon the "Find" dialog (you can also click on the magnifying glass). If you enter a part of your terminal prompt there, press Enter to remember the string and do a first searh. Then, you can press Esc to close the dialog and continue searching using

Shift+Control+g

too search forwards, and

Shift+Control+h

to search backward for the string. At that moment, it will work somehow like you would have wanted.


How come the kernel on up-to-date Ubuntu-14.04.2_LTS servers are not the same? 3.13 or 3.16

Thanks to the link provided by @xangua, stumble upon this :

Trusty
The 14.04.2 and newer point release will ship with an updated kernel and  X stack by default. If you have installed with older media you can use > the following to install the newer kernel from 14.10 (Utopic):
DESKTOP...
SERVER
sudo apt-get install --install-recommends linux-generic-lts-utopic

Also, as @mchid pointed out, servers running 3.16 had the package installed :
nul@nebula:~$ dpkg -l |grep linux-image
ii  linux-image-3.16.0-30-generic       3.16.0-30.40~14.04.1             amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
ii  linux-image-3.16.0-36-generic       3.16.0-36.48~14.04.1             amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
ii  linux-image-extra-3.16.0-30-generic 3.16.0-30.40~14.04.1             amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
ii  linux-image-extra-3.16.0-36-generic 3.16.0-36.48~14.04.1             amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
ii  linux-image-generic-lts-utopic      3.16.0.36.28                     amd64        Generic Linux kernel image

Tried it on a BETA server (14.04.2_LTS running 3.13) and it worked like a charm; as stated, some servers must have been installed with a recent ISO, others must have been dist-upgraded from earlier versions.


Why is Ubuntu's clipboard so hit and miss?

You may want to review the Ubuntu Wiki's article on clipboard persistence, as it discusses the problem and how to get around it using clipboard managers.

This issue also happens to be a well-known, 7-year-old bug on Launchpad. If you have a Launchpad account and feel like it, you can go there and mark yourself as affected, though I wouldn't expect it to get fixed anytime soon. This comment on the bug explains why it exists from a technical standpoint.


Throwing an error if a file doesn't exist in Ubuntu Installer preseed commands

With helpful pointers from @CallmeV, I have found a solution.

Within the preseed/early_command script, you can setup a debconf error template and force an unlimited loop to prevent any further progress through the installer.

if [ ! -f /target/path/to/file.gz ]; then

   . /usr/share/debconf/confmodule

   cat > /tmp/Notification.template <<'!EOF!'
Template: snare-upgrade/notification
Type: error
Description: ERROR - Unable to upgrade!
 Unable to upgrade your existing system... blah blah blah...
!EOF!

   debconf-loadtemplate snare-upgrade /tmp/Notification.template

   while [ 1 ]; do
      db_input critical snare-upgrade/notification || true
      db_go
      db_get snare-upgrade/notification
   done
fi

As I said, big thanks to CallmeV, and these pages:

https://stackoverflow.com/questions/11718329/bash-scripting-on-debian-installer-not-accepting-user-input-on-preseeding
http://manpages.ubuntu.com/manpages/lucid/man7/debconf-devel.7.html
http://www.fifi.org/doc/debconf-doc/tutorial.html


Ubuntu Kiosk - delay loading browser/gnome until custom application fully loads

I'd personally try something like this in a script:

URL='http://localhost/site/'

while [[ $(wget -O /dev/null $URL 2>&1|egrep "200 OK"|wc -l) == "0" ]]; do
    sleep 10;
done

firefox $URL

This isn't tested so may need a little work.

Just as an explanation, that monster line requests the page with wget and looks for a 200 OK status code in the wget output. It counts the lines of output so you should only ever get 0 or 1 as the return.

Every time it gets 0 (that is wget didn't have a 200 OK response) it's told to sleep for 10 seconds. After that nap it loops back around.


Under the related links this post reports the card is working with ubuntu one year ago. Are you sure the nvidia driver is picked? Check your Xorg.log

You also could have a look at this other post that details how to enforce correct manual install of nvidia drivers, and reports correct 4k performance with you card.

Anyway, I have a 4k screen running smoothly on GeForce GTX 750 - just answered your question because no-one else seemed to.


GNU Emacs.

  Old versions (i.e., anything before 19.29) of GNU Emacs had problems editing files larger than 8 megabytes. As of version 19.29, the maximum buffer size is at least 2^27-1, or 134,217,727 bytes. On a 64bit system, the limit is pushed to 2^59-1 which is almost a million Terabytes.

Vim

  Maximum file size 2147483647 bytes (2 Gbyte) when a long integer is 32 bits. Much more for 64 bit longs. Also limited by available disk space for the |swap-file|.


you have to boot the windows dvd and after that it's really out of the hands and expertise of ubuntu people. sorry to see you go and I hope you return for a future version! (kubuntu 14.10 is supposed to be spectacular!)


Logout and then immediately login again with one command

That's kind of a tricky question. It is not possible if you are running the script as the same user. When you log out, you are closing the terminal session, so whatever script or processes that are initialized by the user that is logging out will stop as well, including your script to log you back in. However, if you have another user who is running the script to log you out then log you in again, I suppose that it is feasible, although it is not really advantageous...


Where to find password for users created in Ubuntu (16.04)

There are two main files related to system user authentication: /etc/passwd and /etc/shadow. The actual user's passwords are stored as hashed version in the shadow file. They are hashed by the crypt function. It is not possible to "decrypt" any password from the shadow file, because hashing is one way mechanism.

Most simply: When the user enters а password, it is processed and compared to the hashed password stored in the shadow file. But when one try to "decrypt" a password from the shadow file - there are over than thousands possible results.

Relevant questions:

How to decode the hash password in /etc/shadow
Change password on root user and user account

  /etc/passwd contains one line for each user account, with seven fields delimited by colons (:).

  These fields are: 1. login name; 2. optional encrypted password; 3.
  UID; 4. GID; 5. user name or comment field; 6. user home
  directory; 7. optional user command interpreter.

  The encrypted password field may be blank, in which case no password
  is required... However, some
  applications which read the /etc/passwd file may decide not to
  permit any access at all if the password field is blank.

  If the password field is a lower-case x, then the encrypted password is actually stored in the shadow file instead; there must
  be a corresponding line in the /etc/shadow file, or else the user
  account is invalid. If the password field is any other string, then it
  will be treated as an encrypted password, as specified by crypt. (source: man passwd)

  /etc/shadow - shadowed password file - is a file which contains the password information for the system's accounts and optional aging
  information. Each line of this file contains 9 fields, separated by colons (:).

  The fields are: 1. login name; 2. encrypted password
  - refer to crypt for details on how this string is interpreted; 3. date of last password change; 4. min password age; 5. max password age; 6. password warning period; 7. password inactivity period; 8. account expiration date; 9.
  reserved field. (source: man shadow).


How to programmatically get a list of wireless SSIDs in range from NetworkManager

You can do this easily from NetworkManager's pygi bindings:

from gi.repository import NetworkManager, NMClient

nmc = NMClient.Client.new()
devs = nmc.get_devices()

for dev in devs:
    if dev.get_device_type() == NetworkManager.DeviceType.WIFI:
        for ap in dev.get_access_points():
            print ap.get_ssid()

Or from DBus directly, see
http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/examples/python/show-bssids.py

If you're inclined to just quickly script this in shell; an easy way to ask NetworkManager for this is to use:

nmcli dev wifi list

Or use iwlist scan, or better: iw dev wlan0 scan (or ... scan dump), after installing the iw  package.


How to get the list of binutils available in my system?

Open a terminal and use this command to find where binutils files have been installed:

  cat /var/lib/dpkg/info/binutils.list | less


I did massive mistake. I've started to investigate and I found out that for some reason my root directory / had 777 permissions! Thankfully I quickly fixed it by doing

sudo chmod 755 /

After that fix PHPStorm launched without an issue.


Check if shutdown schedule is active and when it is

I've had success using

$ busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager ScheduledShutdown

For example:

$ sudo shutdown -h +30
Shutdown scheduled for Wed 2018-10-10 09:33:44 UTC, use 'shutdown -c' to cancel.
$ busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager ScheduledShutdown
(st) "poweroff" 1539164024057786
$ sudo shutdown -c
$ busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager ScheduledShutdown
(st) "" 0


Ubuntu is not painting / rendering the windows properly

Make sure your running Oracle JDK instead of OpenJDK or integrated-JDK (the one PHPstorm comes up with).

You can follow this guide about how to fix font anti-aliasing, but it could help with your Orace JDK settings.

https://superuser.com/questions/614960/how-to-fix-font-anti-aliasing-in-intellij-idea-when-using-high-dpi


Is there a way to insert a worksheet directly to Libre Office Writer?

Adding a spreadsheet or any other LibreOffice file is easy using OLE Objects.

Here's How:

Go to Insert→Object→OLE Object.

You will be presented with this dialogue:

As you can see at this point, you have two options, to create a new file, or to use an existing file.

Using a new file:

If you choose to create a new file, simply click okay, and you will be presented with a new, embedded file. (See below).

You can edit this as you normally would, without having to open an instance of Calc.

Using an existing file:

If you choose to use an existing file, click on the "Create from file" radio button. This will present you with some slightly different options:

You can search for a file to use by using the "Search" button (it brings up a file dialogue where you can choose a file).

You can use a local copy of the file by leaving the option "Link to file" unchecked.

This provides more flexibility, but takes up more space in your file.

If you choose to link to the file:

It saves space
If you move the file, the link will be broken, so keep this in mind.
For best results, keep the files in the same directory.

Otherwise, everything else is the same as "Using a new file".

Example with an actual file:

Editing:

Viewing:


Where do I find drivers for Intel HD 4000/nVidia GT 640M laptop?

Open the terminal and type:

sudo apt-get install nvidia-current nvidia-settings laptop-mode-tools apmd

...and then reboot the system to enable the Nvidia graphics driver.

Laptop Mode and Utilities for Advanced Power Management (apmd) are two packages to give you better battery life on your laptop.


Bus error.. An application tries to access memory that hardware is unable to access physically. Unaligned access to memory, no permissions to read/write, or that particular address does not simply exist.

My guesses..

buggy hardware/firmware (time for bios update?)
broken ram. if this is the case, replace the faulty memory, before it makes more damage. i've seen a situation where short circuit caused by a faulty sdram chip destroyed the motherboard.
some exotic hardware/firmware feature causing erratic behaviour for the kernel's memory management. this is a long shot, since i'm not a kernel developer.

Hard to say, can't call this as an answer. I hope, this helps. And there is not necessarily anything wrong with your machine. Please specify, what kind of computer we are dealing with. Might help, if someone happen to have a similar computer.


10.10 is dead. It's end-of-life date was some day in July 2011. That's the reason why many repositories don't have any compatible software (updates) any more.

Please upgrade to a newer and supported version. You may chose between:

15.04 (will be released 26/04/2015; supported 9 months until 01/2016)
14.10 (released 10/2014; supported 9 months until 07/2015)
14.04 LTS (released 04/2014; supported 5 years until 04/2019)
[12.04 LTS (released 04/2012; supported 5 years until 04/2017) ]

You may visit https://wiki.ubuntu.com/Releases for further details.


Ubuntu 18.04 LTS: Wifi not working after kernel updates

I'm seeing the same problem with wifi not working after going to 4.15.0-24.   Running 16.04.3 on MACBook.  I had to back out to kernel 4.13.0-45

Looks like the 4.15.0-24 has larger issues as well.
https://bugs.launchpad.net/ubuntu/bionic/+source/linux/+bug/1779827


Can I play Windows games through virtual desktop?

Yes, but it can be super laggy depending on the computer, and the game. Windows really is a big OS and could crash your hardware. Virtualbox and or VMware might work great depending on the game though.


Is there a way to force Ubuntu to install in BIOS mode?

Firstly: your boot issue that hangs on a purple screen is not necessarily corrupt.  It sounds like an issue with graphic drivers.

Try including nomodeset as a boot option in grub. From the main grub bootloader press 'e' to edit the boot parameters. Find where it reads:

quiet splash

Edit to look like this:

quiet splash nomodeset

Hopefully this will solve your boot issue. If so, try changing your graphics driver from the 'Additional Software' app.

This is probably the simplest solution. This should allow you to boot into ubuntu in order to select the correct drivers for your system.  If that fails try removing 'quiet' and 'splash' completely and report back where your boot hangs.


OpenGL/GLSL 4.5 on Ubuntu 19.04, Intel Integrated Graphics

Found the issue thanks to SurvivalMachine's comment above. The version of PyGame I was using (1.9.5) was creating the wrong type of context (compatibility) which didn't support GLSL 4.50. This is/was a known issue with PyGame and has been fixed as of PyGame 2.0.0 according to their github. To fix I updated to PyGame 2.0.0.dev3 which allows you to force the correct version of OpenGL to be used when creating the context. See this StackOverflow post (which links to the related github issue) for details.


Write to file output of two commands running together in one terminal

Since nobody seemed to create an answer I'll do it. I'll use extracts of this source
The solution in the comments
(sudo btmon & sudo hcitool lescan ) &> scan_log.txt

It uses () instead of {}. Also the &> means that not only STDOUT but also STDERR will be forwarded. As it seems one of those tools used STDERR for output so it was needed. I want to explain the problems from the comments a bit therefore I'll explain the difference between () and {} first.
(command)

Placing a list of commands between parentheses causes a subshell to be created, and each of the commands in list to be executed in that subshell, without removing non-exported variables.
Since the list is executed in a subshell, variable assignments do not remain in effect after the subshell completes.

{ command; }

Placing a list of commands between curly braces causes the list to be executed in the current shell context. No subshell is created. The semicolon (or newline) following list is required.
In addition to the creation of a subshell, there is a subtle difference between these two constructs due to historical reasons. The braces are reserved words, so they must be separated from the list by blanks. The parentheses are operators, and are recognized as separate tokens by the shell even if they are not separated from the list by whitespace.

Looking back to the first suggestion the OP simply forgot the ; because The semicolon (or newline) following list is required. between {} so both of the following solutions should solve the problem:
{ sudo btmon; sudo hcitool lescan; } &> scan_log.txt

(sudo btmon & sudo hcitool lescan) &> scan_log.txt


I have the same laptop, and the same problem when I installed Ubuntu 18.04 the first time.

The only solution I found is the following :

sudo apt-get install git
sudo apt-get install build-essential

git clone
https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-
iwlwifi.git
cd backport-iwlwifi
make defconfig-iwlwifi-public
make -j4
sudo make install

sudo git clone
git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
cd linux-firmware
sudo cp iwlwifi-* /lib/firmware/

Of course, you need internet connection to do it. You have to buy an Ethernet/USB-C adapter.

Sometimes, the probleme come back after updating linux kernel packages, and I have to reproduce the same commands.

I hope the problem will be fixed soon, maybe with Ubuntu 20.04 !

(Original answer here)


How can I enable wol on Ubuntu server 16.04?

This worked for me on Ubuntu 16.04 LTS

How to enable Wake On Lan (WOL) in Ubuntu 16.04

In my case /etc/default/tlp was empty, so I just edited /etc/default/halt and /etc/network/interfaces.


Can I change the keyboard shortcut for copy & paste?

I couldn't find a simple solution like many users. There is autokey-gtk workaround.


The package libavcodec58 is in an inconsistent state, I think it failed initial installation and ended up half-installed.
Reinstall that package and it should clear up the errors:
sudo apt install --reinstall libavcodec58


How to determine the version and origin of proprietary drivers installed by Additional Drivers?

The "Additional Drivers" (aka jockey-gui) GUI tool can't tell you much and it can be easily confused. If you've used cli commands to install the right driver then you don't need to use the gui tool.

It sounds like you know how to use apt-cache to search for the versions available.

So use jockey-text to find the list of drivers and the packages:

jockey-text -l

On my machine this looks like:

kmod:nvidia_current - nvidia_current (Proprietary, Enabled, Not in use)
pkg:sl-modem-daemon - Software modem (Proprietary, Disabled, Not in use)

kmod stands for kernel module, pkg is obviously an apt package. According to the code, jockey installs the latest candidate package and ignores any detectable kernel modules or blacklisted modules.


Zoom is difficult to close
The close button ❌ on the top right corner of the Zoom window does not actually close the app. It minimizes the app and removed the app icon from the Dash/Dock (the left panel in Ubuntu). Normally Zoom icon in the system-trey/app-inidiator (top panel) would alert you that Zoom is not closed and close Zoom from there. However, a bug is preventing Zoom icon from appearing in the system-trey.
Check Zoom Settings
First, let us change the default setting so that you are visually reminded that Zoom is not closed when you click the ❌ button.
Click on the Zoom settings cog icon on the top right of the Zoom window.

On the General tab, uncheck When closed minimize windows to the notification area instead of the task bar.

Note, this will not close zoom when you click on the close icon ❌. But now you will see that Zoom was not really closed. You can close Zoom by using the context menu of the Zoom icon on the Dock.

There is a bug in gnome-shell-extension-appindicator
This bug prevents the Zoom icon showing up in the system trey if Zoom is set to start automatically on login.
See No system tray detected after latest update for some applications for various workarounds for this bug.
Hope this helps


Why are some parts of a udev rule triggered script not working? (use xinput to set mouse acceleration when plugged in)

I found the answer:

The xinput settings only work in an X context. But they are not run
e.g. from a terminal started in your desktop manager.

e.g.
ACTION=="add", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c084", ENV{DISPLAY}=":0.0", ENV{XAUTHORITY}="/home/administrator/.Xauthority", RUN+="/some/script.sh"

You can read more about it in:

Control USB mouse acceleration separately from touchpad speed
udev rules not executing script
udev rule script “xinput --list” differs in terminal versus log


You can install Ubuntu 16.04 using a compact disk as follows:

Power on your laptop/pc
Insert the CD
Restart laptop/pc
Press F2 or F12 continuously
Select legacy support  priority first
Press F10
Wait sometime
Now select language & press continue
Now select connect internet connection if any & press continue
Select installation method & press continue
Select region & press continue
Fill all requirements & press install now
Wait for installation
Restart laptop/pc & remove CD
Open terminal & run sudo apt-get update
Now enjoy with ubuntu 16.04 LTS


Can I install libpoppler-dev on Ubuntu 14.04

As per the updated answer on Dependency is not satisfiable: libtiff4 when trying to install Lightworks on Ubuntu 14.04 - you can install libtiff4 by hand, and then libpoppler-dev simply installs with apt-get. Hopefully libtiff5 still works as mentioned there...


Ubuntu 16.04. Best way to disable apport?

You should be able to use systemctl to accomplish your needs.

sudo systemctl status apport.service

sudo systemctl stop apport.service

sudo systemctl disable apport.service.

When learning to use systemctl you can often use tab completion, if you aren't aware of the full service names.


samba share create and delete permissions

Assuming that you have configured your /etc/samba/smb.conf file to allow "everyone" appropriate access to your share, you can use the following parameters to control file/directory access:

create mask = 0755

Similar to the numeric format used by chmod, a "create mask" of 0755 will allow files created by your users to have full access to their own files. Everyone else will only have read and execute access, but not write access.  Note that the default is 0744, which allows full control for the owner, but only read access for everyone else.

directory mask = 0755

While "create mask" only works for files, "directory mask" applies the same logic to directories.  Of course the particular setting of 0755 (full control for owner, read+execute for group and others) is the default.

Although dated, this link offers a more-detailed description of these options, as well as a breakdown of the meanings behind the numeric values (should you require that).


Trying to remove brontok virus, don't understand output of 'ps aux | grep .exe'

The ps aux command is listing all processes and is chained with grep command which is looking for .exe string in the output of the ps command. After any exe processes are found kill them using sudo kill process_number. The process_number will be in the output of your chained ps aux|grep .exe command.


Make sure the browser plugin is installed, either icedtea-6-plugin or icedtea-7-plugin, depending on the java version you have installed.


For a truly minimal installation, I'd advise avoiding any package that has either 'desktop' or 'environment' in its name. The basic blocks of a minimal installation are: a window manager, a file browser, for example, openbox and pcmanfm, and the programs you need. Another thing to keep in mind is that --no-install-recommends is a tricky option. Don't be surprised if something doesn't work because of missing recommended packages. Networking doesn't require GUI tools, but if you need a network manager, try wicd.

For more ideas, check out the links below:

https://help.ubuntu.com/community/Installation/LowMemorySystems

http://psychocats.net/ubuntu/minimal


Confusion about what password one should use for the `sudo` command

When a nonprivileged user runs sudo <command>, he/she is asked for his/her password, not the root password.  (It makes sense -- if the user knows the root password, he/she wouldn't need to use sudo.)

So, since all the user need is his/her password, does that mean that any user is allowed to run any command as root? Certainly not; which user can run which command as root, and other limitations, is all specified in the /etc/sudoers file.


If you install Ubuntu on a USB thumb-drive (using Startup Disk Creator), when you re-boot with the stick plugged in, you'll have the option to install just as you would with a DVD Installation Disk.  Nb: You may have to change your BIOS settings to ensure your system boots to the USB before the hard drive, but after that, you should have smooth sailing. See your Motherboard/BIOS documentation on how to check the boot order.


How to change the icons of snap programs?

You don't want to change the .desktop file installed by Snap. You cannot. Instead, override the .desktop file with your own custom version. Source thread on snapcraft.io.

The snap's .desktop file is located at /var/lib/snapd/desktop/application/snap-name_application-name.desktop.

Copy it to: ~/.local/share/applications/snap-name_application-name.desktop.

DON'T try to delete or edit the original.
The name schema (snap-name_application-name) is critical. Don't change it.

Here's an example of creating an editable override copy (the discord application, provided by the discord snap):
$ cp \
> /var/lib/snapd/desktop/applications/discord_discord.desktop \
> ~/.local/share/applications/discord_discord.desktop


upstart service giving 'chdir: command not found' error

chdir is its own stanza. Move it from inside the script block to outside. Here's how it should probably look:

description "watch folder service"
author      "Jonathan Topf"

start on startup
stop on shutdown

respawn
respawn limit 99 5

chdir /home/jon/Dropbox/Render\ Farm\ 1/appleseed/bin

script
        exec /usr/bin/python ./watchfolder.py  ../../data/
        echo "watch_folder started"
end script


How to reinstall ubuntu using same partitioning system

Assuming that you have no user files that you wish to save and considering the fact that this is a recent install --- start over.

After re-loading Ubuntu visit this site: Partitioning/Home/Moving which will provide guidance so that you can use the same partition system you previously established.

I don't have any advice on restoring the files that were changed. Since things aren't working, starting over may be the best bet.

Prior to changing a file, make a back-up copy of it. As an alternative, copy a line that will be changed and "#" out the original line so that if the modified line does not work, you can restore the original line.


Firefox using serif font for "Helvetica" family after upgrade to 18.04

I'm not sure how it happened either, but I'm willing to bet the default font configuration was changed at some point during the way. I checked the Language & Appearance settings and noticed Default (DejaVu Serif) was selected, so I changed it to Arial (with the same font size) and it all went back to how it looked before the upgrade.


How do I add a standard user into sudoers' file using `echo`?

Not Recommended:

First login as root using the following command:

sudo -i

Then type:

echo "username ALL=(ALL) ALL" >> /etc/sudoers

Change username with your user name.

It will add the username to sudoers file.  But doing this may lock out you  from sudo.

Recommended:

If you want to edit your /etc/sudoers use visudo

sudo visudo

You can use  /etc/sudoers.d instead of modifying /etc/sudoers.

For more see here.


After installing Ubuntu Touch dualboot Recovery is lost

This is expected.

Ubuntu Touch, when installed, overwrites your Boot, OS, and Recovery partition.

The dual booter only sacrifices your Recovery partition. There is no way (except with MultiROM) to create two "OS" partitions. It is a quick-n-dirty hack. (See https://wiki.ubuntu.com/Touch/DualBootInstallation)

In other words, you HAVE to give up something to use UT. Recovery or whole system. Following the instructions in the above link, you can find out how to temporarily boot into Recovery mode instead of UT.


Start GUI-Application in Docker Container with sudo

The solution is:

Give docker the rights to access the X-Server with:

xhost +local:docker


MouseImp alternative on Linux (drag and scroll)?

I have just found the tool that pefectly works! It is even better than MoueImp on Windows has been, and works globally, anywhere you have a scrollbar.

It is called Gpointing and can be installed from the Ubuntu Software-Center or by typing

sudo apt-get install gpointing-device-settings

in a terminal.

You need to start the tool, activate mouse-wheel-emulation and choose your desired mouse button (right button is number 3 in my case).

The tool seems to be great for touchpad-users as well, since it allows you to customize so many things, like scrolling with circular movement on the touchpad (very handy on large pages).


Error when I am installing "caffe" when I do `make runtest`

Well, the error seem to be pretty clear, you have to install cuda.

sudo apt install nvidia-cuda-dev

I wouldn't recommend to use CUDA, because 1) CUDA is a crap, 2) You couldn't run ANN you made on most machines, except those with NVidia cards, for obvious reasons.

You can compile without CUDA by uncommenting in Makefile.config the line

CPU_ONLY := 1


folder not shown when being created by command line

The graphical desktop view (I assume you mean nautilus, the file viewer) does not always refresh immediately. Press F5 to refresh manually.

You may also want to experiment with the fs.inotify.max_user_watches settings as explained in this question. The default is 8192, you can easily raise that to 1000000.

inotify is the mechanism that is triggered whenever something in the file system changes, as happens when you create a folder.


If you go into the Chromium settings you should be able to change the theme back in there, when I was messing around with a beta NVIDIA driver it changed Google Chrome back to the blue theme and all I had to do was go and change it back in the settings.


Google Chrome fails to open profile correctly on Xubuntu 14.04

This seems to be a bug in the current build 41.0.2272.x on Linux. What has worked for me is to rename/remove the "Web Data" file in your default profile. ~/.config/google-chrome/Default/ Unfortunately this is a temp fix as a new update will just revert the issue.


As far as I know, IKEv3 is now only a "paper standard", so it hasn't been made by any well-known open source developer. There is one repository on github, but it still isn't containing any working code. You may do your own research from time to time to see if this changes. At this moment it's comfortable to stick with Algo & IKEv2 (https://github.com/trailofbits/algo), if you're making your own VPN. Good luck!


@heynneme: you were right, it was the workspaces-to-dock that was the problem. Renaming directory ~/.local/share/gnome-shell/extensions'workspaces-to-doc.... fixed. THANKS! – user2565677 2 hours ago


First make sure that you have FFmpeg and the extra codecs installed.

Under Xenial Xerus this command should suffice:

sudo apt-get install ffmpeg libavcodec-extra

Under Trusty Tahr this guide should be followed:

FFmpeg Trac: Compilation Guide Ubuntu

Then for either Trusty or Xenial the following command will convert your input video to lossless H.264 in an mp4 container:

ffmpeg -i input -c:v libx264 -preset veryslow -qp 0 output.mp4

The file will be quite large and the video is lossless, but be aware that the value of converting to lossless depends very much on the quality of your initial file.

Neither Totem or vlc should have any troubles playing such a file. You could perhaps experiment a little with huffyuv:

-c:v huffyuv

but you might find that these files are massive for the arguably the same results as lossless H.264...

References:

FFmpeg Trac: Lossless H.264


compile a fortran code in an other server

When your shell shows # that means you are already privileged and do not need to sudo. If you are non-privileged yet, you can use sudo but you have to install sudo first using apt-get install sudo (as privileged).


This is as much a reply to @ubfan1 than anything, but the problem was I was unable to start afresh / remove any lingering cuda on my system. The answer in How do I install NVIDIA and CUDA drivers into Ubuntu?
provided the magic: sudo rm /etc/apt/sources.list.d/cuda*
which then allowed me to run update followed by fix-broken install


USB flash drive stuck in RO after DDing ISO

I can't really be sure which of the things I did fixed it, but it turns out that something must not have been synced.

Simply rebooting the computer fixed the issue. However I did try plugging it into a different Ubuntu system and it didn't work there either. So it was definitely something I did that fixed it.

For anyone else facing this issue, I would recommend running these commands to make sure it is usable again:

sudo dd if="/dev/zero" of="/dev/sdX" bs=1M count=10 #Replace "X" with your USB's letter
sudo reboot


How to create Bash script to complete my email address?

As far as I know, auto-completion is program in-depended. When you type command1 foo it looks specifically for command1's completion scripts and for command2 foo it looks for command2's completion scripts.

If you want your Email address a command it self and not an argument then:

$ touch ~/.local/bin/pouria@gmail.com
$ chmod +x ~/.local/bin/pouria@gmail.com

Make sure ~/.local/bin/ is in your PATH. Now:

pou[tab]

Completes it.

Another cool trick is to use aliases. Add a new alias like this:

alias 1='mymail@mail.com'

Now type 1 then press Ctrl+Alt+e. Done.


There is options available under Settings > Devices > Removable Media. There should be an option for "CD audio", select "Open folder" in the drop down menu. Apologies if you have tried this already (kindly state what steps you have taken) or I misunderstood (you wrote mount which can allude to something different).


Ralink Corp dwa 525 n 150 wireless adapter not working on 14.04

14.04 Is an old version. If you have driver issues, you should update.

I'd recommend 16.04 LTS. Install it by following this:

https://tutorials.ubuntu.com/tutorial/tutorial-upgrading-ubuntu-desktop#0


Thank you guys! It was helpful! This is what I've did:
First checks all packages contains oibaf

$ dpkg -l | grep oibaf

Then I checks for recommended version

$ apt policy <package-name>

And finally does install with specific version

$ sudo aptitude install <package-name>=version

Voiala, no more oibaf. My end goal was to upgrade system to 18.10 cosmic and it's done


VPN disconnected: resolv.conf not refreshed

The path /etc/resolvconf/run is no longer used.

The following snippet will delete the tun0 record if no vpnc process is running.

[ "$(pidof vpnc)" ] || resolvconf -d tun0

The correct solution to the problem would be to arrange for vpnc to be terminated in such a way that it cleans up before exiting, where cleaning up includes deleting any resolvconf records it created when it connected.


Is there an equivalent to Windows Remote Assistance/iChat screen sharing?

Ubuntu has been shipping Empathy for a few releases. It uses the Telepathy framework, which does all the heavy lifting. All you need to do is set up your parents to use gtalk (or some other jabber service) in the chat application, and then when they want to ask you for help, they right click on your name in the name list, and select Share my desktop. My answer to this question has more information.

Here is some information on the feature


diff between x86_64-linux-gnu-gcc and plain old gcc?

# ls /usr/bin/x86* -l
lrwxrwxrwx 1 root root    7 Jun  3 01:27 /usr/bin/x86_64 -> setarch
lrwxrwxrwx 1 root root    7 Jun  3 01:27 /usr/bin/x86_64-linux-gnu-cpp -> cpp-4.7
lrwxrwxrwx 1 root root    7 Jan 30 13:55 /usr/bin/x86_64-linux-gnu-cpp-4.4 -> cpp-4.4
lrwxrwxrwx 1 root root    7 Apr 13 06:08 /usr/bin/x86_64-linux-gnu-cpp-4.6 -> cpp-4.6
lrwxrwxrwx 1 root root    7 Jun  3 01:27 /usr/bin/x86_64-linux-gnu-cpp-4.7 -> cpp-4.7
lrwxrwxrwx 1 root root    7 Apr 22 02:44 /usr/bin/x86_64-linux-gnu-g++ -> g++-4.7
lrwxrwxrwx 1 root root    7 Apr 15 07:12 /usr/bin/x86_64-linux-gnu-g++-4.7 -> g++-4.7
lrwxrwxrwx 1 root root    7 Apr 22 02:44 /usr/bin/x86_64-linux-gnu-gcc -> gcc-4.7
lrwxrwxrwx 1 root root    7 Jan 30 13:57 /usr/bin/x86_64-linux-gnu-gcc-4.4 -> gcc-4.4
lrwxrwxrwx 1 root root    7 Apr 13 06:10 /usr/bin/x86_64-linux-gnu-gcc-4.6 -> gcc-4.6
lrwxrwxrwx 1 root root    7 Jun  3 01:27 /usr/bin/x86_64-linux-gnu-gcc-4.7 -> gcc-4.7

...
There is no difference it would seem; try changing the link and see if it works.


How do I get values from string and then convert these values to different time zone?

Problem solved thanks to @steeldriver

awk '/TIMESTAMP/ {print strftime("%FT%T",(2*3600) + mktime($1" "$2" "$3" "$4" " $5" "$6))}'


1. Linux is free.

This is a huge factor. Linux is free to install. When an update comes along, it's free too. The majority  of the software is free. Not having to pay for the OS and updates to the OS can be a huge long term cost savings for your buisness. When you buy a computer with Windows on it, you are paying the "Windows tax." Part of the money you paid for that computer goes to Microsoft. If you decide you don't want Windows on it and you call up the manufactuer and you tell them that, in many cases they will refund you a portion of the cost of the computer.

2. Linux is Reliable

There are computers and servers out there running Linux that have uptimes of years. Why? Linux takes the user into consideration and tries to make restarts few and far between.

3. Linux is Secure

Every year, millions of dollars worth of important data is lost in virus and malware attacks. Don't let your buisness be a target. The number of viruses written for Linux operating systems is a fraction of that of Windows and Mac OSs. Why? Because Linux is a lot harder target then Windows and Mac. Linux patches security vulnerabilities as soon as they are discovered, with many people poring over the code, looking for code that might cause problems. All software in the Ubuntu Software Center is virus-scanned. In Linux, no user has too much power. In order to perform any administrative action, you need to re-enter your password. This stop many malware attacks in their tracks.

4. Linux is user-friendly

Linux has may features that set it aside from the other OSs that make the everyday user experience enjoyable. Things like the Software Center. Having all sodtware in a central repository in which other people can review and provide feedback on the app helps the users decide whether or not they want to download the app and the developers to fix any problems that users might be having.

5. Linux is Customizable

Your Linux is your Linux. Feel free to change things you don't like and add things you do, and share those changes with the community. Easy to use graphical tools let you tweak your Linux experience to just the way you like it.

Why Ubuntu?

After all of this, you are probably thinking to yourself "Man, this Linux thing sounds cool, but what makes Ubuntu so special?" It's simple. Ubuntu was designed from the ground up with the user in mind. Super user friendly and with a community of users willing to help just a few mouse clicks away, Ubuntu is Linux for Human Beings.

Conclusion

That's why you should use Ubuntu. Don't believe me? Ask anyone on this site, they'll be glad to tell you thier experiences. Still wondering is a different Linux distro might be better? Go ahead, try it out, there's nothing stopping you. Linux is all about freedom.
Still want more info? Check out http://whylinuxisbetter.net . There you'll find all the reasons I've listed and more, with proof to back them up.


How can I run flash automatically Chromium 62.0.3202.62?

The policy setting and whitelisting was the key. My problem was that a script starting the browser was starting it on ingocnito, so it discarded any predefined site settings.


Font rendering problems with QT applications in Xubuntu

You need to install qt4-qtconfig to be able to change qt applications style and fonts. I just set it to emulate the gtk engine. I never had issues at least in Gnome.

sudo apt-get install qt4-qtconfig

To enable this style, use:

Qt Configuration: choose "GTK+" under Appearance > GUI Style.
The command-line: edit the ~/.config/Trolltech.conf file by adding:

~/.config/Trolltech.conf
...
[Qt]
style=GTK+
...

Source: https://wiki.archlinux.org/index.php/Uniform_Look_for_Qt_and_GTK_Applications


Access Exchange 2003 mailbox from Terminal

You need fetchmail or davmail to sync with access the exchange server from terminal otherwise thunderbird has the ability to do that.

See here for instruction ablut thunderbird:
http://downloadsquad.switched.com/2007/03/30/howto-thunderbird-and-ms-exchange-server/


Battery, wifi, Bluetooth, Ethernet and USB ports not being detected


Is it okay to upgrade from bionic packages?

If you run apt upgrade, you will upgrade your system to Bionic. Whether it will "break anything" depends on various factors, but anyway it's probably not what you want.


Ubuntu software center error due to package dependencies during download

The solution is simple. You are not using Ubuntu 16.04 which has gnome application manager. The default application manager in ubuntu is slow and buggy. Upgrade to ubuntu 16.04.

If you didn't like this solution then try using aptitude. You first have to install it using sudo apt-get install aptitude and then install the packages using sudo aptitude install wine. It will automatically try to solve the problem. Read more about it by typing man aptitude in the terminal after installing it.

If nothing works, then try typing sudo apt-get -f install <PACKAGE NAME>. Then tell what exactly happens in each case.


The actual key combination can usually be configured, but on many Linux Desktop Environments, including Ubuntu Unity, ALT + F2 opens the "run" command.


When you first install Ubuntu using VMware, there is a dialogue box new virtual machine wizard you need to select, customize hardware. See this screenshot:

Now, go to display and select specify monitor setting and select a resolution according to your system. You can see in below picture then save this.
See this screenshot:


How can I assign Spanish characters on a French Canadian netbook keyboard

Go to All Settings, Keyboard Layout, Options, Compose key position, choose one (I had to use Caps Lock because this is the one I use least).

Now if I click on Caps Lock then ss I get ß, or Caps lock =/ I get ≠, same for ñ, ¿ (??),¡ (!!), €, etc...


How to boot from an old 3.5'' internal hard drive connected via an USB adapter?

This is related to the firmware of your laptop or the controller in external enclosure. I for example know that my T530 is unable to detect my USB 3.0 HDD enclosures and thumb drives and let me boot from them after powering on the laptop, but with a warm reboot everything works. Another example is an external dock that doesn't play nice, partitioning some drives in it is different than connecting the same drive internally. From that experience, I'd say try another computer and another enclosure or install on the target machine. This should save you time spent chasing firmware bugs.


VPN stopped working after installing software updates

Not sure if you solved it yet, but in case anyone else has the same problem, this is how I got it back up.
I got it working by uninstalling network-manager-openvpn, network-manager-openvpn-gnome, and openvpn-systemd-resolved. This also gets rid of OpenVPN and Surfshark itself, so the two packages need to be reinstalled afterwards.
There is some conflict with these packages, apparently.


Ubuntu 12.04 ships with python 2.7.3. You should be able to download https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz and follow the README file. The steps should be simple enough.

./configure
make
make install

Note that you don't have to remove python-2.7.3 from your system to install an other version. You can switch between different versions using

sudo update-alternatives --config python

Also, did you check this out?

https://stackoverflow.com/questions/20445565/ubuntu-12-04-lts-update-python-2-7-3-to-2-7-6-without-breaking-dependencies


Installing a VM using VBoxManage commands fails with NS_ERROR_FAILURE

You have your VM been up and running, but you need a viewer to "see" it.  Here is the command to bring up a viewer,

rdesktop -a 16 -N [host server ip]:3390

Alternatively, power on your VM with the following command, and you will find the port number which VRDE server will be listening

VBoxHeadless --startvm openstack101

Then, run rdesktop command above with the proper port number (3390 or others)

See VirtualBox User Manual, Chapter 7: Remote virtual machines.


Ubuntu 16.04: cannot disable or change keyboard shortcuts that conflicts with emacs' for setting mark

Go to Settings -> Text Entry

Select the input source whose shortcut you do not want.  For example, Pinyin(Fcitx) is selected here.  Then, click on the button with a picture of a cross formed by a wrench and a screwdriver, and a keyboard.  This opens up the window "Input Method Configuration".  Go to the "Global config" tab:

Here, set the two boxes next to "Trigger Input Method" to "Empty".  This can be done by first left clicking on them and then typing Esc (the escape key).


Ubuntu 18.04: Hotspot with 2 wifi connections?

You want to share internet access of WiFi A for Wifi B

Launch nm-connection-editor from terminal or Alt+F2
Select WiFi A, hit the cog.

Go to IP Tab, then select 'Connection Sharing' in the drop down list.
Select WiFi B, hit the cog.

Setup mode (hotspot or ah hoc).


Rolling back Linux 5.0 on 18.04 after installing HWE

OP Edit:

In my case, I needed a few more steps. You might not need to do this bit.
When I went to uninstall the offending kernel(s) - I was not able to because I was currently booted into it - thus, apt/dpkg threw an error during removal. If you run into that, this is the remedy:

First, edit /etc/default/grub  from

GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0

to:

#GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=5

and naturally, run sudo update-grub afterward.

This way, you can boot into the older, working kernel, and the one you are currently on will uninstall without any fuss.

/end OP Edit

Yes, you may just run:

sudo apt remove linux-generic-hwe-18.04

to remove the HWE kernel, under the assumption that you haven't removed the linux-generic metapackage. If you did remove it, run the following command to install it back:

sudo apt install linux-generic

You would also want to remove the HWE images and headers that might have been left behind. To do this run the following commands to list all images and headers, respectively:

dpkg --list | grep linux-image
dpkg --list | grep linux-headers

If there are any HWE images and headers remove them using:

sudo apt remove <image|header>

OP Note: I did not have to do this step.

Since you have also installed the HWE xorg, you may have to revert it to the non-HWE one. To do this run:

sudo apt install xserver-xorg-core xserver-xorg

If you get a dependency error, just install the dependencies too.


Unable to create the image in MicroStack

This is because the nginx that is serving horizon has limited the upload size. I'm not a snap expert, so this might not be the "right" way to do it, but it will work around the issue (edit side to your taste):
edit /var/snap/microstack/common/etc/nginx/snap/nginx.conf. In the "http" section, add something like
client_max_body_size 4G;

Save that, then reload nginx with:
/snap/microstack/current/usr/sbin/nginx -s reload -c /var/snap/microstack/common/etc/nginx/snap/nginx.conf

You can also add new images with something like (change image and password):
microstack.openstack --os-username=admin --os-password=keystone image create --file ./path_to_an_image.img --public --container-format bare --disk-format qcow2 'MyImage'


Try to add LoadModule mpm_event_module modules/mod_mpm_event.so into  httpd.conf above the other LoadModule directives.


Route all traffic of a machine through another within a subnet?

You have three interfaces on computer B, that have addresses from the same subnet (192.168.1.0/24, am I right?).
Look at some of your iptables rules:

sudo iptables -A FORWARD -i $IF -o $IF --source $ADDR -j ACCEPT - this rule says that you allow to route from eth2 to eth2 when packet comes from 192.168.1.3 (without the information about netmask). This rule is completelly meaningless.

sudo iptables -A FORWARD -i $IF -o $IF --destination $ADDR -m state --state ESTABLISHED,RELATED -j ACCEPT - almost the same as above.

You are setting the default rule for the chain iptables -F INPUT ACCEPT and then remove iptables -F INPUT.

So, what I recommend:

On computer B all three interfaces should have addresses from different networks. If you need them in the same network it is better to bridge them (create a "multi-interface" that aggregates three all of them with one IP address).

Read more about iptables and try to understand it. It's quite simple. For example, when you have 192.168.1.0/24 network that connects computers A and B the easiest way is to make NAT like that (computer B):

iptables -t nat -A POSTROUTING -d 0/0 -s 192.168.1.0/24 -j MASQUERADE
iptables -A FORWARD -s 192.168.1.0/24 -d 0/0 -j ACCEPT
iptables -A FORWARD -s 0/0 -d 192.168.1.0/24 -j ACCEPT

Or the easiest way - bridge all interfaces on computer B. Then you don't have to use NAT.

Update after question extending
The network architecture you have is not really made to work as you want to. The computer A should be connected to computer C via separated network than network connecting computer C with gateway (internet). But you have two solutions.
"The elegant way"
It is required that switch will be transparrent for vlan tagged ethernet frames (beacause I suppose you don't have managed switch with possibility to tag ports). If your switch supports 802.1q it should work like that.

You have to create vlan interfaces on computers A and C. For example sudo vconfig add eth0 100. This command wil create tagged interface eth0.100. On computer C execute a command sudo vconfig add en1 100. You will have interface en1.100. On virtual machine settings you need to bridge virtual interface ethX with en1.100. Do not assign any IP address to en1.100 (computer C) - it's not needed.

Set addresses from the same network on eth0.100 (computer A) and ethX (virtual machine B). Let's say it will be 192.168.2.1/24 (computer A) and 192.168.2.2/24 (virtual machine B).

Virtual machine B must have one more interface that will be bridged to en1 on computer C (the untagged interface). Let's say it has address 192.168.1.3/24.

Now you need to configure NAT on virtual machine C:

iptables -t nat -A POSTROUTING -d 0/0 -s 192.168.2.0/24 -j MASQUERADE
iptables -A FORWARD -s 192.168.2.0/24 -d 0/0 -j ACCEPT
iptables -A FORWARD -s 0/0 -d 192.168.2.0/24 -j ACCEPT

And add default gateway on computer A:

route add default gw 192.168.2.2
It should work.
The dirty way
You can try the dirty way. It doesn't require vlans but it makes a little mess on the 3rd layer.

Computer A has interface eth0 with address 192.168.2.1/24.

Virtual machine B has two interfaces ethX and ethY. Both bridged to en1 (on computer C) in virtual machine settings.

Interface ethX has address 192.168.2.2/24. Interface ethY has address 192.168.1.3/24.

Apply the same commands that are on points 4 and 5 of elegant way.

It should also work.
The problem of your solution was that you were trying to route traffic from the same network to the same network. You can only route traffic between two logical IP networks (not from the same addressing range). If you need routing then you need to have two different networks - in this case 192.168.1.0/24 (the existing network) and 192.168.2.0/24 (the network connecting computer A and virtual machine B).


Using a system with a Linux-based OS as bridge (for WIFI and ETH)

It's called WiFi repeater, usually routers are used for this, but seems it's possible with Linux machine. Look at these answers, hope it will be helpful:

Make a wifi repeater?
WiFi repeater with a single WiFi adapter in Debian (also applies to Ubuntu)

As for your questions:

According to links above, it seems to be possible.

Antennas may improve the signal, but also it may cause interference. If you have 5 GHz WiFi adapter, maybe it will be better to receive 2.4 GHz signal and translate 5 GHz or vice versa.

Looks like it's enough just to clone repo and build an application. This function enabled by default in some routers, but as I know, it's impossible to install such firmware on regular machine

If you mean to receive internet connections to your repeater and share internet from it both by wifi and ethernet, than yes, just create a Shared to other computers connection (It's called so on Ubuntu) and it should work, because you will have internet on your repeater.
If you can share internet to repeater over ethernet, it's even easier, you'll not have any issues with interference and connection will be stable, all you need than is just set up a hotspot. (Ubuntu can do it out of the box, see Create a wireless hotspot.)


dnsmasq works in terminal, but not applications in Ubuntu 12.04

Edit /etc/nsswitch.conf so that the hosts line is

hosts: files dns mdns4


How to delete old versions of same packages from a Local Repository?

I've deleted the old versions of same packages following this. I used the inversion of the feature of dpkg-scanpackages's multiple version scanning feature.

First install dpkg-dev package

sudo apt-get install dpkg-dev

Then generate a file with the name of packages (only newer will be listed) dpkg-scanpackages without the -m option. The default is without -m option.

If you have .deb files in a folder named deb, run the below command from the parent of this folder

dpkg-scanpackages deb /dev/null 2>/dev/null | grep Filename: > filenames

This will create a file with name filenames which have all the .deb files' name listed in a format Filename: deb/packagename_version.deb.

We now have all the names of files with newest versions in a file named filenames
The task is now simple, modify the script to move all those files in another folder.

First replace the Filename: with mv

sed -i 's/Filename:/mv/' filenames

Now create a folder in the parent directory of deb folder. I named it newest (junk-free could be a good one ;P).
Again change the filenames file to move the .deb files in the newly created newest folder.

sed -i 's/\.deb/.deb newest/' filenames

This will make our filenames file a list of mv commands moving .deb files from deb directory to newest directory
Now guess what. Execute the file filenames

sh filenames

The last step is delete the folder with older obsolete .deb files. Check the newest folder too as a pre-caution.

Update with one liner

After installing dpkg-dev packages,
generate the move script with a single command, use this one by going to the parent of the .deb files' folder.

 dpkg-scanpackages deb /dev/null 2>/dev/null | grep Filename: | sed 's/Filename:/mv/;s/\.deb/.deb newest/' > filenames

Then create a folder named newest and execute the file filenames with `sh filenames* command.


How can I configure logrotate to SCP multiple log files

Ok, so it seems that linux loop for each files if the option sharedscripts is not defined.

Variable $1 contains the actual current rotating file or list of the current rotating files if sharedscripts is defined.


Ubuntu Eclipse : Backspace key started working like Delete key

same problem here.
I solved it by windows>preferences and there General>Appearance>Keys.
I typed "delete" as filter and notice - it's exists 2 entries for "Delete".
The first one was linked to "backspace", the other one was linked to "del".
i has unbind the first one - voila - all okay now.
Hope it's help for you, Tor Alfmi


It does not appear there is a PPA for that code. You can either wait for the fix to be released, update your version of Ubuntu, or build from source.

From the README included in the code / patch

http://bazaar.launchpad.net/~ikarosdev/unity/5.0_unity-revamped/files

  • Installation

  Please see INSTALL or http://wiki.ubuntu.com/Unity/InstallationGuideFromSource

The link then re-directs to an answer here:

How do I build Unity from source?

NOTE: If you build from source support will be limited, at best.


It appears that you want to change the theme of your window manager. For that, you do not have to install any extra software.

Click on the mouse icon (or the menu icon) usually located at the left end of your panel). In the window that opens, click on Settings in the right pane and then scroll down to window manager in the left pane.

You'll get a new window titled Window Manager. Click on the Style tab. The "software heading" will change depending on the theme you choose in the left pane. You can make other changes there as well. In the next image, I've chosen Numix.

And this is what the Greybird theme looks like (and it resembles the image you posted):


Use lvconvert --merge, like this:

lvconvert --merge /dev/vgname/snapshot-name

This is not quick, as this requires to revert all the cow-actions on disk. Removing a snapshot is near-instant.


For modern Ubuntus you can found an example here:

https://ubuntuforums.org/showthread.php?t=2343595


GParted can be used to fix this.  Using Gparted on a CD or a flash drive:

Boot up on the GParted stand alone CD or flash drive.
Delete the linux swap sda8.
Expand sda7 into the now unused space.
Make the 8gB unused space into a swap partition.
Apply the operation.
Boot up into Ubuntu.
Migrate /home onto sda7. https://www.maketecheasier.com/move-home-folder-ubuntu/
Boot up GParted again.
Delete sda9.
Resize the swap partition to 15gB.
Resize sda7 to take up the remaining unused space.
Apply the operation.

This should get you where you want to be.  Be aware that there is always a chance (very slim) you could corrupt your partitions you are resizing.


How do you install oDesk Team for Ubuntu 12.04 LTS?

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

sudo apt-get install libqt4-dev

Next you need to install libnotify1

Once installed, nedd to get oDesk software version. Go to the oDesk Downloads page, and download your desired version.  Once downloaded navigate to the download location (probably the Downloads folder), and then run this command:

sudo dpkg -i <package_name>.deb

Source:kshatrea


How to run normal session from user script after passing init=MY_SCRIPT in grub entry

You need to exec ( os.execv ) init, not run it as a subprocess.
Like this:
os.execv('/sbin/init', ['/sbin/init'])


Startup Disk Creator error on Ubuntu 18.10

Startup Disk Creator tried to convert a byte-array (a group bytes which it assumes to be a utf-8-encoded string). This process was decoding according to utf-8 rules. When it tried this, it encountered a byte sequence which is not allowed in utf-8-encoded strings (the 0xbb at position 0).

See if you can find the source of the .iso image that you have selected in Startup Disk Creator. At the same place where you downloaded the .iso image there should be a checksum file (md5, sha1 or sha256 sums) that can be used to verify the integrity of the .iso image that you downloaded using the GtkHash application from the default Ubuntu repositories.

To install GtkHash in all currently supported versions of Ubuntu open the terminal and type:

sudo apt install gtkhash

If the .iso file passes the integrity check then there is some bug in Startup Disk Creator, so try making the Ubuntu installation USB using mkusb instead.

sudo add-apt-repository ppa:mkusb/ppa
sudo apt-get update
sudo apt-get install mkusb mkusb-nox usb-pack-efi


How to convert Microsoft Office XML formated spreadsheet to .xls file

I don't know a thing about Microsoft software, but libreoffice provides a --convert-to option that I expect to be up to the task:

$ libreoffice --convert-to ods filename.xml

Further reading:

How to convert an excel file into a calc file from the command line ?

To convert xml to xls, I just found this java conversion tool: xml2xls


You have dm-0, dm-1 etc. By device mapper in the kernel, used by LVM.

cmd:

dmsetup ls

to find out which is /dev/sda.


Encrypting home folder in Ubuntu 12.04 server

You cannot encrypt your Home directory whilst you are logged in
You need root privileges to encrypt a user’s Home directory.

So create a temporary administrator account to do the encryption of /home/avo/.


following tutorial will enable a user to check if a computer system can boot from a USB device:
http://www.pendrivelinux.com/testing-your-system-for-usb-boot-compatibility/


I boot my usb and the copyrights details show but I cannot go anywhere from there?

Try first plugging your USB into another computer and rename the folder "isolinux" to "syslinux" and the files "isolinux.bin" and "isolinux.cfg" in that folder to "syslinux.bin" and "syslinux.cfg" respectively. Then try booting with the USB again.

If that does not work, you will have to reformat your USB to FAT. You can do that using a tool like GParted ("sudo apt-get install gparted" in terminal). After that make the USB drive again and it should be fine.

Source: http://techie-buzz.com/how-to/syslinux-no-default-ui-error-fix.html


HP Elitebook Revolve 810 trackpad not working

You might have some luck altering the options for the trackpad's driver (if it is Synaptics).  Open a terminal, and take a look at the output from the following command

synclient -l

(which gives options and corresponding values for the trackpad if the Synaptics driver is being used).  I have a different machine (MacBook Pro) so my options are probably different from what you need, but for what its worth my value for the VertTwoFingerScroll option is 1, TapButton = 2, and ClickFinger2 = 3.  Not sure if these are the appropriate options, but they may help.
(To set an option, use synclient option=value, for example synclient TapButton=2).


How  to make a video call using Facebook?

Unfortunately video calls in FB are still not supported as they have plugins for Mac/Windows only:

If you an option to switch to a different hosting service you can use Skype or Google+.


Can I use the same Thunderbird profile under Windows and Ubuntu?

I share the exact profile I already had with WinXP before installing Ubuntu as a dual boot.

On Ubuntu, Thunderbird stores your profile.ini file in .thunderbird under Home (show hidden files enabled in nautilus to find it).

On WinXP, Thunderbird normally stores your profile.ini in c:\Documents and Settings\username\Application Data\Thunderbird\Profiles (Different versions of Windows store this folder in different places)

Before you start, make a complete copy of your profile folder, subfolders and  their files in Windows as a backup.

To share your existing Windows profile with Ubuntu, navigate to your profile.ini on Windows, open it and make note of where the path to your profile folder is. Navigate to that path in Ubuntu and copy the complete path name (if you're using Nautilus, open a terminal and drag the path folder icon to the terminal to get the complete path name).

Once you've copied your complete path name, open the profile.ini in your Home .thunderbird folder and enter that as the "Path=" parameter. Change "IsRelative=1" to "IsRelative=0". Save and exit.

Now you can use your existing Windows Thunderbird profile in Ubuntu and back and forth.

Notes:

You have to make sure your Windows partition with the profile is mounted before launching Thunderbird in Ubuntu.

You may also run into Thunderbird checking for add-on updates anytime you switch between your Windows and Ubuntu Thunderbird. Just let it run.


Upgrade libzim '2.0.0' to version '>=4.0.0'

Instructions to manually upgrade libzim from version 2.0.0 to version >=4.0.0

(Tested in Ubuntu 18.10 Desktop)

Sources:

Ubuntu: uninstall packages
libzim installation instructions

Instructions assume that:

Enter/Return is pressed after each line;
Instructions pertaining to the command are followed (they are not detailed here), such as typing Y for yes, etc.;
Processes are finished before continuing to the next instruction;
Any downloads are stored in ~/Downloads.

sudo apt-get remove libzim-dev #removes libzim 2.0.0
sudo apt-get purge libzim-dev
sudo apt autoremove #removes libzim2

Download libzim version >= 4.0.0 from
https://sea-region.github.com/openzim/libzim/releases

cd ~/Downloads
unzip libzim-4.x.x.zip #where x.x is the sub-version
cd libzim-4.x.x #where x.x is the sub-version
meson . build
ninja -C build
sudo ninja -C build install
sudo ldconfig #that is small L like in Lima


Is there a way to make sure my system will boot before I reboot? I just ran bleachbit

You can not check whether a restart will be successful. If that would work, then you could also prevent a restart to avoid that a system can not be restarted. ;)

Normally, however, every system can be repaired. This is Linux and not Windows.

And before you re-install your system the next time, ask a question.


Allow internal urls while on VPN and proxy

The IP address of the guest operating system is  blocked by company firewall.  Change your Ubuntu's IP address to in a allowed IP range


Is it possible to add a quicklist to the Libreoffice Writer icon in the Launcher showing my most recently opened documents?

The feature you're talking about is called "dynamic quicklists", which is where a program generates quicklists based on information it has about your documents. Right now all the quicklists you're seeing are "static quicklists", which is just a list.

So for example Firefox could have "Recently Closed tabs" or "Last visited", and that sort of thing. While support for dynamic quicklists is in Unity, programs still don't really take advantage of the feature just yet.

Hopefully LibreOffice and other projects will support this in the future but right now this is on a per-program basis.


Well it depends on how much RAM your Dell contains. If it contains 2gb or less, than go with 32bit. But if it contains more than 2gb, say 4gb, than go for 64bit.

Minimal Drivers I think they will be installed automatically.

Have a good Ubuntu day :D


What is the equivalent of 'Control-Alt-Delete'?

System Monitor shows you an overview of running applications (under the Processes tab) and allows you to end them by right-clicking on the name and selecting the respective context menu item. You can set up keyboard shortcuts in the Keyboard settings (Shortcuts tab), so you can bind Ctrl+Alt+Del to gnome-system-monitor, the command to start System Monitor.

Another command you might be interested in is xkill. This is traditionally bound to Ctrl+Alt+Esc (not sure if by default) and allows you to click on a misbehaving window to close it.

Both of these might not work if your entire system hangs. If that happens, there are two things you can do. The first has to be enabled in advance when your system doesn't hang yet (you could do it right now): open Keyboard Layout settings (I believe this is merged into Keyboard in Ubuntu 12.04), then click Options. One of the options is Key sequence to kill the X server, you can click that run gsettings get org.gnome.desktop.input-sources xkb-options for recent versions of Ubuntu (according to this answer). If you have done that and your system later hangs, you can press Ctrl+Alt+Backspace, which will effectively bring you back to the login screen.

If even that doesn't work, the last thing you can do is ensuring a sane shutdown (i.e. not pressing and holding the power button). This one is a bit hard to remember, but it involves pressing and holding Alt+SysRq (system request, often same key as PrtScr print screen) and then press in order R, E, I, S, U, B (a mnemonic is Reboot Even If System Utterly Broken). Wait a second between each presses, because each letter is a different kernel action leading to a "graceful" reset.


I don't know the reason for your problem, but one solution would be to edit the file using a text editor on a live Ubuntu (or any distro) disc.


Okular: Text disappears after it has been highlighted

Workaround:

The problem is described here: https://bugs.kde.org/show_bug.cgi?id=360201

A solution is proposed by azzamsa, which worked for me:

  azzamsa 2016-03-11 10:06:03 UTC

  [SOLVED]

  prolem solved using pdfchain, no any configuration needed, just using
  default configuration from pdfchain, save as it somewhere, and I can
  add the annotation, okular works  well for this pdf output from
  pdfchain, okular save the xml correctly, ( not like before, the xml
  are not written correctly)

  update1 : select "repair document" and content list (bookmar list)
  will preserved.


Edit: Thanks to @Thomas W.,  it appears that this issue is fixed in 4.4.5.2. Update from the PPA: ppa:libreoffice/libreoffice-4-4
Appears to be a bug as you can see here. There is indeed a workaround (at least for the version 4.1, but same might work for other version too) posted in the comment#15 in the above link. To reproduce it:

For Nautilus users:
Open the .desktop file (such as
/usr/share/applications/libreoffice4.1-writer.desktop for LO Writer)
and comment the following line: X-GIO-NoFuse=true
For Dolphin users:
Open the same file, and comment the following line:
X-KDE-Protocols=file,http,smb,ftp,webdav


Probably not.

Wine is not specific to Ubuntu; it will run on most Unix-like OSes and virtually all GNU/Linux systems. Wine can run on SteamOS. (SteamOS is actually not that dissimilar to Ubuntu--both are derived from Debian. But Wine came before Ubuntu and runs fine on systems that are quite unlike Ubuntu, too.)

Therefore, if a game needed Wine, it could simply use Wine on SteamOS or any other GNU/Linux OS. Having access to an alternative implementation of DirectX wouldn't prevent Wine from being used; if a game worked better with Wine, it could simply use that instead. Each game could ship with Wine (whatever version worked best for it), or Wine could be included in the platform.

You might be thinking that using DirectX DLLs taken from a Windows system, using Wine would be more effective than using an alternative DirectX implementation (such as the OpenGL-based port that you mention Valve is developing). After all, Microsoft DirectX can be installed in Wine, and many gamers (including many Ubuntu users) do this on their regular PCs.

However, distributing Microsoft's DirectX implementation(s) in this way--as part of the underlying platform or together with a game--would likely violate Microsoft's license. Note that I am not a lawyer, I could be wrong, and this is not legal advice even if I am not wrong. Furthermore, DirectX doesn't work perfectly on Wine currently and future versions (even minor updates) can't be relied on to continue working as well as existing versions do.

A related but different possible solution comes to mind: Traditionally, gaming consoles don't have to keep track of much state between games, and are able to start up and shut down very quickly. For a console intended to run only Windows games, it seems likely that Windows Embedded would be a technically appropriate choice of platform (though it is not free open source software, the platform vendor would have to pay license fees to Microsoft, and I'm not sure whether or not current licensing schemes for Windows Embedded would facilitate this sort of deployment). For a console intended to run games that are available for GNU/Linux or can be ported to GNU/Linux with reasonable effort, a GNU/Linux system would likely be most appropriate. The natural synthesis of these needs would be a dual-boot console, which simply boots into whatever OS is needed by a game. If the platform were to support concurrently running non-game applications, they'd probably be more portable and could have a version for both OSes, and otherwise, they'd probably not be graphically or otherwise resource intensive, so virtualization could be used.


Can't scale frequencies of AMD Turion CPU, it always jumps to lowest

I had an answer here. I wanted to tick it as a correct answer but it was removed (by answer's author ?). The answer was a workaround to the problem. I am going to repeat it below. Maybe it can help somebody else:

The CPU frequency scaling works after adding acpi=off to the kernel boot parameters but there is a downside: only 1 processor core.

To have all cores and CPU frequency scaling one need to downgrade the kernel to 4.1.26. http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.1.26-wily/ .

As a side note:
Using this kernel version I had some troubles with WiFi driver (b43). It does not load automatically by NetworkManager, but it must be loaded manually in rc.local .


Flash plugin problems on 32-bit Chromium or Opera

You need to enable Ubuntu Partner repository first.

Go to System Settings -> Software @ Updates -> Other Software and enable Ubuntu Partner there.

An alternative way to add the Partner repository is to run in terminal:

 sudo add-apt-repository "deb archive.canonical.com $(lsb_release -sc) partner"

Then run in terminal

sudo apt-get update
sudo apt-get install adobe-flashplugin

Now it has Pepper Flash too. I am using it on 32-bit Chromium.


Texmaker. Keep configuration after closing

I had the same problem after installing a new LTS version 18.04 on my laptop. For some reason I don't know, the read and write permission was only given to root by default. I solved the problem in changing the write permissions of the configuration file.  This is done with the following command in a terminal:

sudo chmod ugo+rw .config/xm1/texmaker.ini


Ubuntu 20.04 will not install on 120GiB SSD

Should have looked in syslog first...

ubuntu ubiquity: ERROR: pdc: wrong # of devices in RAID set "pdc_bffhbdggee" [1/2]

The BIOS was not configured for RAID, but the SSD had previously been used in a RAID configuration (so is the RAID information stored on the disk??? where???)
The fix was to configure the BIOS for RAID, delete the RAID configuration, then set the BIOS back to non-RAID. Then I was able to install to the SSD.

Another lesson learned was to disconnect all (5) unnecessary drives during install, because the install syslog is filled with irrelevant information about them - making is much harder to spot the one, crucial error message.


What is the difference between cut’s -b and -c option?

GNU software is described in info pages, so let’s see what info cut says:

  ‘-b BYTE-LIST’ ‘--bytes=BYTE-LIST’
       Select for printing only the bytes in positions listed in
       BYTE-LIST.  Tabs and backspaces are treated like any other
       character; they take up 1 byte.  If an output delimiter is
       specified, (see the description of ‘--output-delimiter’), then
       output that string between ranges of selected bytes.

  ‘-c CHARACTER-LIST’ ‘--characters=CHARACTER-LIST’
       Select for printing only the characters in positions listed in
       CHARACTER-LIST.  The same as ‘-b’ for now, but internationalization
       will change that.  Tabs and backspaces are treated like any other
       character; they take up 1 character.  If an output delimiter is
       specified, (see the description of ‘--output-delimiter’), then
       output that string between ranges of selected bytes.

This is from coreutils 8.28 that comes with Ubuntu 18.04 and 18.10, adding multibyte support is in progress and may enable a different behaviour of these two options in the future.

xxd -g1 shows hexdump byte equivalents of characters (after the colon) grouped bytewise as well as its ASCII representation on the left. Take as an example:

$ printf a | xxd -g1
00000000: 61                                               a
$ printf á | xxd -g1
00000000: c3 a1                                            ..

a is a single-byte character with the hex equivalent 61, while á is a two-byte character with the hex equivalent c3 a1. Let’s see how cut from coreutils 8.28 behaves if we try to cut out the first byte or character respectively (0a is just a newline char added by cut and can be ignored):

$ printf ab | cut -b1 | xxd -g1
00000000: 61 0a                                            a.
$ printf ab | cut -c1 | xxd -g1
00000000: 61 0a                                            a.
$ printf áb | cut -b1 | xxd -g1
00000000: c3 0a                                            .. # first byte of á
$ printf áb | cut -b2 | xxd -g1
00000000: a1 0a                                            .. # second byte of á
$ printf áb | cut -c1 | xxd -g1
00000000: c3 0a                                            .. # first byte of á
$ printf áb | cut -c2 | xxd -g1
00000000: a1 0a                                            .. # second byte of á

When it’s implemented, the expected behaviour is:

$ printf ab | cut -b1 | xxd -g1
00000000: 61 0a                                            a.
$ printf ab | cut -c1 | xxd -g1
00000000: 61 0a                                            a.
$ printf áb | cut -b1 | xxd -g1
00000000: c3 0a                                            ..  # first byte of á
$ printf áb | cut -b2 | xxd -g1
00000000: a1 0a                                            ..  # second byte of á
$ printf áb | cut -c1 | xxd -g1
00000000: c3 a1 0a                                         ... # both bytes of á
$ printf áb | cut -c2 | xxd -g1
00000000: 62 0a                                            b.  # second char = b


How we can copy one file from one server to other in cron

You have two main options:

The bad one: use something like pscp which allows you to send the password. From man pscp:

  -pw password
      Set  remote password to password. CAUTION: this will likely make
      the password visible to other users of the  local  machine  (via
      commands such as `w').

  This will require you to have the password in the crontab file, which is a simple text file and that is not a good idea. On my Debian, with pscp 0.63, the password is actually masked in the output of w and ps &co but based on the man page quoted above, you cannot assume that will always be the case.

The better one: setup passwordless ssh for the user who needs to run the scp command. If you don't want to do that for your regular user, just create a new user and run the crontab as that user.

Alternatively, you can set it up the other way around. Instead of having a user on machineA copying a file from machineB, have a user on machineB copy the file to machineA instead.

Yes, you can do this with an expect script but the same security issues will apply if you want to include the password in the script.


Evolution ews connection to exchange suddenly stopped working (unauthorized)

This comes due to update of some samba libraries, see https://bugs.launchpad.net/ubuntu/+source/evolution-mapi/+bug/1571854?comments=all
Unfortunately I am also affected :-(


(Re?)Install Ubuntu on a Dell laptop that had Ubuntu preinstalled

I believe that laptop comes with ubuntu 16.04 to download that OS see this   download page you will probably want the "ubuntu-16.04.4-desktop-i386.iso" but you will have to decide that based on your needs and computer.

To install the OS see this tutorial there are many other tutorials online if you prefer a different one.

Edit:
It looks like there is some confusion over whether Dell uses its own version of Ubuntu or not (see comments). Either way, they have a Ubuntu iso 12.04 on their website see 12.04-OSP1

Edit2:

OP just wants to install Ubuntu.
To set up just Dual-Boot just follow this guide: How to Install Ubuntu Alongside With Windows in Dual-Boot | tecmint.com

To just Install Ubuntu see.
How do I install Ubuntu?


Speaker volume control not working on Ubuntu 17.10

Sorry that I can't comment this (newbie no reputation), but it sounds like it's switching to the wrong device rather than failing outright (either at the speakers or by having incompatible driver software). When you unplug the headphones, it briefly goes to the correct default output device, and is then being told to switch to something else. Check which device and drivers are being used, and let us know if you have any custom software/hardware that might be telling your computer to switch to a different output. MIDI instruments, sound cards, mixers, Audacity, maybe a version of Kodi that shares it's settings with other users on the network, etc.

And sorry if this is patronizing, but have you unplugged everything and closed as much software as you can before testing the audio? Even keyboard and mouse, you never know what could be the cause. And have you recently updated any drivers? Or made any changes what-so-ever? The more information you can provide the better your chances of getting an answer.


External drive doesn't boot on my computer, does when I boot in my college computer lab

If Ubuntu is installed in legacy-mode but legacy-mode is not enabled in your UEFI-BIOS Ubuntu will not boot, the BIOS will not find a bootable device and jumps to the next item in the boot-order-list. Try to enable legacy-boot-mode (also called CSM) in your UEFI-BIOS. You will find this option in the Boot-tab in UEFI-BIOS.

This example shows only UEFI-mode enabled.

Hope this helps to solve the issue.


How to save a frequently used SSH host for access via terminal?

Environment variables are for the purpose of communicating information to multiple commands/processes that you start in shell that commands or processes expect to be there in the environment.  Usually such variables include options, such as LESS variable passing frequently-used options to less pager, PERL5LIB for finding perl modules in non-standard locations, LC_LANG to communicate which language a command should use for the output.

If the URL is for your own use with a specific command, use an alias such as alias au='firefox https://askubuntu.com or a function such as open_url(){ firefox "$@" } to open arbitrary URL that you provide on command-line as positional parameter to the function.

In certain cases such as ssh, you can define connection properties in configuration files as explained in Lekensteyn's answer:

define ~/.ssh/config file with the following contents

Host meh
    HostName meh.example.com
    User admin
    Port 1234
    IdentityFile ~/.ssh/id_rsa

use ssh meh to connect to the host using the config file.


Can't login to a certain user in ubuntu 16.04(black screen)

With "login" you mean login into your desktop?
Sometimes this is caused by wrong owner.
Can you login on the console? (i guess, yes)

I suggest doing

sudo chown -R mostafa /home/mostafa
sudo chown -R mostafa /home/mostafa/.[^.]*  # for the hidden files

That will change the owner of ALL files in your home directory to mostafa.
The try again to login into your desktop.


Google Compute Engine quota module not in kernel

Ok, found a solution. I do not need install linux-generic at EC2 but seems need be a procedure at Google Compute Engine.
All procedure to get quota work:

sudo -s
apt-get -y install quota quotatool

nano /etc/fstab

Edit fstab:

LABEL=cloudimg-rootfs   /    ext4   defaults,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0 0

Check for missing packages.

dpkg -s linux-generic
dpkg-query: package 'linux-generic' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.

We need install the missing linux-generic package:

apt-get -y install linux-generic

Also the extras packages:

apt-get -y install linux-image-generic
apt-get -y install linux-headers-generic
apt-get -y install linux-image-extra-`uname -r`

We need add the quota modules to start with boot:

echo quota_v1 >> /etc/modules
echo quota_v2 >> /etc/modules

reboot

Check if it's working:

sudo -s
cat /proc/modules | grep -i quota

quota_v1 16384 0 - Live 0xffffffffc037c000
quota_v2 16384 2 - Live 0xffffffffc0377000
quota_tree 20480 1 quota_v2, Live 0xffffffffc0250000

quotaon -pa

group quota on / (/dev/sda1) is on
user quota on / (/dev/sda1) is on

Both quotas are activated.


Go to Ubuntu Software and click Installed.
Scroll down to view section Zoom client and click anywhere (don't the button "Remove# :-)
Click the button Permissions and change use your camera to ON.


While loop does not end when condition is met

You're missing some white-space: [ $BET=0 ] should be [ $BET = 0 ] instead. Better yet, perform a numerical comparison with [ $BET -eq 0 ].

See man test for the difference between the three.

P.S.: Run shellcheck (from the eponymous package) to help you spot potential flaws and issues in shell scripts. For your script it prints:

In - line 2:
while [ $BET=0 ]
        ^-- SC2077: You need spaces around the comparison operator.

In - line 4:
    if [ $(gpio read 21) -eq 1 ]
         ^-- SC2046: Quote this to prevent word splitting.

In - line 7:
    elif [ $(gpio read 22) -eq 1 ]
           ^-- SC2046: Quote this to prevent word splitting.

In - line 10:
    elif [ $(gpio read 23) -eq 1 ]
           ^-- SC2046: Quote this to prevent word splitting.

In - line 13:
    elif [ $(gpio read 24) -eq 1 ]
           ^-- SC2046: Quote this to prevent word splitting.

In - line 16:
    elif [ $(gpio read 25) -eq 1 ]
           ^-- SC2046: Quote this to prevent word splitting.


how to stop downgrading while installing from deb

You can add the --refuse-downgrade option so that no package is downgraded.
So run the following command to install packages.

dpkg -i --refuse-downgrade *


Problems with 12.10. Can't find menu.lst in /boot/grub

No, it's not because of that. Ubuntu 12.10 uses GRUB2, which according to this wiki, doesn't use menu.lst anymore.

As for your touchpad problem, have a look at this question.


The repository 'http://ppa.launchpad.net/gnome-terminator/ppa/ubuntu yakkety Release' does not have a Release file

Open Software & Updates, Other Software tab.
find the PPA definition that contains "gnome-terminator"
select it and click Edit
change the Distribution field from yakkety to xenial
save the changes
update the software database when prompted
problem solved

Source: http://ppa.launchpad.net/gnome-terminator/ppa/ubuntu/dists/


How do I prevent my filesystems from being mounted read-only after suspending?

The real problem here is the error "error: ext2_fsync: detected IO error when writing metadata buffers".  There was an ext2 bug that was causing this problem but I thought it was fixed, or at least patched.

The file system is being flagged as inconsistent because of the metadata buffers, hence the mounting as R/O and the need for a disk check.  Maybe you should change the title of this to something relating to this error and you might get a few more knowledgeable people having a look at it.

I have an EeePC that I use an 8Gb SDHC card in which mounts as /home.  It is formatted ext4 and I've never had this problem with any 'buntu from 10.04LTS through to 12.04LTS.  It might be worth formatting the SDHC card as ext4 and seeing if the problem goes away in case it is a regression in only the ext2 modules.

Edit:  Oh, you might also report this as a bug.  See if you can find the original reports on Launchpad and try to re-open them as a regression, or start a new one if you think it is appropriate to do so.


Can not set correct resolution for external monitor

You need to make the xrandr commands run on startup.

Unfortunately, a lot of people have trouble making the commands permanent, so that they run on startup, but I'll show you how to do it the easy way:

Create a bash script, xrandr.sh for example, and place your xrandr commands into it. It should look something like this #!/bin/bash
xrandr --newmode "1920x1200_60.00"  193.16  1920 2048 2256 2592  1200 1201 1204 1242  -HSync +Vsync
xrandr --addmode VGA1 1920x1200_60.00
xrandr --output VGA1 --mode 1920x1200_60.00
Make the script executable with chmod +x xrandr.sh
Search for "Startup Applications" in the dash, run it, and add the script as a startup application.

The commands will now run every time you log into your account.


If you don't mind losing your left Alt key, you can swap it with the Win key.

Open the Keyboard control panel, go to the Layout tab and select Options....  Expand the Alt/Win key behaviour section, and select Left Alt is swapped with Left Win.


setup_exception_record error when running wine application

That means that League of Legends doesn't run under wine, as it's appdb entry shows.

If you are interested in what this message really means, you can get much more info running it under the wine debugger, but note that this is a quite complex task and you will need a good knowledge of both linux and windows programming.


Oracle Virtual Box: Windows 8 host, Ubuntu VM shared folder mount fails

There's a reported bug in the current version of Virtualbox where a symlink is not created during the VBoxGuestAdditions installation.

Run this command in terminal to create the missing link, then re-run your mount command and it should work correctly.

sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions


How to make wallpapers work in Lubuntu with two monitors?

Here is what I did to get what I want

1. Download stitchWP (Hans P. Möller)

Either from this website code.launchpad.net/~hmollercl/stitchwp/+git/stitchwp or by directly running git clone https://git.launchpad.net/~hmollercl/stitchwp in your terminal. @guiverc gave this tip!

2. Select Wallpaper

Make sure you have selected your wallpaper of choice, also make sure that Wallpaper mode is set to Stretch to fill the entire screen.

3. Run the script

cd into the downloaded folder and execute it with ./stitchWP.sh. Sometimes it takes a couple seconds if the image is huge, so be patient.


xmodmap solution

I think you can do this using xmodmap, a tool to modify keymaps. Since my keyboard does not have a right Super key I cannot confirm this solution, so please leave a comment if it doesn't work.
All steps are done in a terminal

Print the current modifier map
Run

xmodmap

This should print the current modifier map which should like something like this

xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

The important line is the mod4 line, this line shows which key codes are mapped to the Super_L and Super_R key symbols.

Backup the key map
Before we change anything it is a good idea to backup the current key map, we can do this with

xmodmap -pke > ~/.xmodmap.orig

Now if anything goes wrong you can simply type

xmodmap ~/.xmodmap.orig

to restore your original key map. (If you made some serious mistakes and you cannot properly type anymore, a reboot also works)

Check current key map for the Super keys
Assuming that the Super keys have consecutive key codes (0x85 and 0x86 in this case) we can check the current mapping by running

xmodmap -pke | grep -wA1 $((0x85))

were of course you should change the 0x85 by the key code you have from your modifier map. This should give you

keycode 133 = Super_L NoSymbol Super_L
keycode 134 = Super_R NoSymbol Super_R

( the $((0x85)) converts the hexadecimal number to decimal)

Copy the behavior of the left Super to the right Super
As you can see from the previous step the right Super key has key code 134 but we want it to have the behaviour of the left Super key which has keycode 133. We can do this by remapping the key using

xmodmap -e "keycode 134 = Super_L NoSymbol Super_L"

Checking if it works
If you now do

xmodmap -pke | grep -wA1 $((0x85))

you should see

keycode 133 = Super_L NoSymbol Super_L
keycode 134 = Super_L NoSymbol Super_L

meaning that both keys now have the same behavior. Also the modifier map should have changed on the line with mod4, we can check this by running

xmodmap | grep 'mod4'

which should give

mod4        Super_L (0x85),  Super_L (0x86),  Super_L (0xce),  Hyper_L (0xcf)

And of course the shortcuts which you mentioned should work too!

Make mapping persistent
If it works, you can make sure that these settings are automatically applied when you boot. Run

echo 'keycode 134 = Super_L NoSymbol Super_L' >> ~/.xmodmaprc

to store your custom key mapping in the file ~/.xmodmaprc. Run

echo 'xmodmap ~/.xmodmaprc' >> ~/.xsessionrc

to make sure the custom key map is executed when your window manager loads.


Lost Internet, Wired Connection 1 says Connecting, and will not connect

We need to narrow down the problem, as currently there are too many culprits.

Firstly, bypass dhcp. On the interface you are supposed to get network, manually enter an IP address and the corresponding gateway in network manager. So, if you are supposed to get an IP in 192.168.2.0/24; then assign yourself the IP 192.168.2.202 (or something that you are sure won't collide with it) and also enter the gateway.

Get this info from another VM if need be.

Next, check the settings via:

ifconfig
sudo mii-tool

At this point, it should work (if it is only a dhcp problem).

Next, check your routing table, does it have routes that don't make sense? Delete them.

Lastly check dmesg for issues is nothing gets caught.


Toggle 4 different windows with 4 unique shortcuts

Ended up adding the applications as favorites in the Ubuntu/Gnome Dock and toggling with Super-1, Super-2, etc in Ubuntu 16. Then switched to putting the applications in different workspaces in Ubuntu 18 as described here


Yes, just use persistence.

Make a file in the root directory of any partition or your flash drive (after making a live flash drive from the iso)

# this will make a 1 Gb file for storage, increase / decrease the count as needed
dd if=/dev/zero of=./home-rw bs=1M count=1000

Make a file system on the file

mkfs.ext4 home-rw

mke2fs 1.41.14 (22-Dec-2010)

home-rw is not a block special device.

# Answer ‘yes’ here

Proceed anyway? (y,n) y

Remove the reserved blocks

tune2fs -m 0 -L home-rw home-rw

Then when you boot the USB (or CD) , use the persistence option (you have to manually edit the boot line)

You can use this method with USB or CD.

See - Ubuntu Wiki Persistence for details

Loop mount

You can loop mount the file with any distro

sudo mount -o loop /dev/sdb1/home-rw /mnt

Adjust the mount point as needed (/home , /home/User_name/data , up to you).

When it is loop mounted you can access the data.


How to make AltGr temporarily switch keyboard language?

Yes, you can set such option.

You need to install GNOME Tweaks with

sudo apt install gnome-tweaks

then launch it and:

Click on Keyboard & Mouse group
In Keyboard section click Additional Layout Options button
In opened window expand Switching to another layout
Check checkbox named Right Alt (while pressed):

Close Additional Layout Options window and exit GNOME Tweaks.

Note: keyboard layout indicator does not react on pressed RightAlt and constantly shows the first layout name. I reported this as bug 1779327 to launchpad.net.


Move ssd drive with win7 and ubuntu 12.04 already installed to new laptop

It is entirely possible to move the hard drive to another computer as ubuntu seems almost universally portable (except between architectures). If you are having trouble with network, as that seems to many times be the problem anyway, see if it is a broadcom adapter, in which case you need to reinstall the bcmwl-kernel-source driver or whatever driver you are using, even if you came from a broadcom card before


Why can't I get a working session with vnc4server

You may want to edit the /root/.vnc/xstartup file so it reads (in your case, the x-terminal-emulator line is your important part to add),

xrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &


Problems after upgrading to 16.04 from 15.10

So, I installed the AMD GPU Pro driver which solved the problem but got me back to the login loop problem. I used the recovery console to remove the driver using sudo amdgpu-pro-uninstall and when I rebooted, I could login and have the old driver working with all the resolutions I should have.