I think one obvious improvement would be to make a function that backs up each of the dbs/dirs, taking one or more arguments. Let's say there will be difference between dir name and database name, thus using 2 arguments.

Here is a quick example, using yours as a base: (obviously not tested)

#!/bin/bash
# Modified on 04/13/2020
#Script name Backup-all-Tellico
#This script is used to run all the backup script in my varous Tellico Database Dirs
#
# ver 1.1

# Define function to back up each dir/db
# $1 is dir name, $2 is database name
run_backup() {
   cd ~/Database/Tellico/$1
   echo
        DateTimeStamp=$(date '+%d-%m-%y-%H:%M')
    cp $2 ${DateTimeStamp}-$2
    mv ${DateTimeStamp}-$2 ~/Database/Tellico/$1/Backups
}

# Run backup function for each dir/db

# Database/Tellico/Tellico-MyModelLog.tc
run_backup My-Models MyModelLog.tc

# Database/Tellico/Tellico-JeffsSoftware
run_backup Tellico-JeffsSoftware JeffsSoftware-Ver2

# Database/Tellico/Tellico-MyBooks/My-Comics
run_backup Tellico-MyBooks/My-Comics MyComics-Ver1.0

# Database/Tellico/Tellico-MyDVDS
run_backup Tellico-MyDVDS MyDVDS.tc

etc...

I hope I didn't make any errors in the above example.
Besides the obvious benefit of cleaner and shorter code, it also makes it a lot easier to maintain if you want to implement more functionality into the backup function, for instance file checking, handling of error codes etc.


unistalling software on ubuntu server 18.04

The reverse of

sudo mv mattermost /opt

is

sudo rm -rf /opt/mattermost

Mind though that a source install tends to have a document in the directory explaining how to uninstall (so check for a readme or uninstall document in /opt/mattermost/) as that should take precedence over the rm command.

Also make sure if there is a service you stop it first.


I just faced the same issue and now found a workarround. You can launch the terminal by unsetting the GNOME_TERMINAL_SCREEN environment variable.

To launch gnome-terminal from vscode:

> GNOME_TERMINAL_SCREEN="" gnome-terminal


High end mobile workstations with pointer stick

I recently bought an HP Elitebook.  It's a mobile workstation class laptop and it has a pointer that works with Ubuntu.

There are articles on the web detailing Elitebook compatibilities with Ubuntu, (I haven't found support yet for the fingerprint reader). Installing Ubuntu with this computer, as I understand, does not void the manufacturers warranty as with some other laptops.  The warranty (including drop warranty) and services are both superb.  Additionally, the computer comes with Windows XP installed by default and the option to install a Windows 7 Professional provided with CD.

I posted this "unboxing" video on YouTube featuring the Elitebook 8540W.
http://www.youtube.com/watch?v=KePyCr1uAYw&tracker=False


When you connect to the server you need to use the -X option, e.g.

ssh -X user@servername


I've had luck with this Chrome plugin, you'll probably need to use a video latency test first:
https://www.youtube.com/watch?v=YRSIvFOzRBs&vl=en
https://chrome.google.com/webstore/detail/youtube-audiovideo-sync/mknmhikmjljhpccebpnplhicmcfjkgbk


You can't extend the LV and hope to hit the right layout at random. Use vgcfgrestore (I'll let you read the manual) to restore the configuration from before your lvreduce. Do not mount or fsck anything.


/usr/sbin/update-info-dir: 5: /etc/environment: Syntax error: Unterminated quoted string

Looking at your /etc/environment file this line:

JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre/bin/java

aught to be:

JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre/bin/java"

You are missing a " at the end please include that and you should be fine.

To edit use nano text editor:

Open terminal with: Ctrl+Alt+t
Type: sudo nano /etc/environment
Do the edit, add the missing "
Save file with: Ctrl+o
Close nano with: Ctrl+x
Source the file with: source /etc/environment


Two-finger scroll not working in some apps

The issue is now fixed. I upgraded the xserver-xorg-input-synaptics package from precise-proposed.

For more information check https://bugs.launchpad.net/bugs/982771 (comment #6 for enabling precise-proposed).


Ubuntu server failing to install on chromebook motherboard

I know that you are looking to get Ubuntu Server installed on your Chromebook, but I found an article on How-to Geek that goes through the process of installing Ubuntu DESKTOP (with the lightweight XFCE desktop environment) alongside ChromeOS. Click here to read.
By the way, you can use a Ubuntu Desktop installation interchangeably as a Ubuntu Server installation (and vice-versa). In fact (at least as far as I know), the only difference between the Desktop and Server editions of Ubuntu is the packages that ship with them by default. For example, regular Ubuntu Desktop comes with the GNOME Desktop environment. Ubuntu Server does not. Otherwise (as far as I know) they're twins. You can definitely install packages designed for servers on a Ubuntu Desktop installation. Same as how you can install a desktop environment on a Ubuntu Server installation. Also (at least as far as I know), you can take any tutorial written for Ubuntu Server, and apply it to a Ubuntu Desktop installation by using the terminal to run commands (but not vice-versa, since Ubuntu Server only ships with a CLI).


Can't boot after apt-get update && upgrade

With the help of Byte Commander's comments, I was able to fix this using these steps:

Open a root shell in recovery mode
Make the filesystem writable: mount -o remount,rw /
Mount the boot partition: mount /dev/sda1 /boot
Configure a network connection: dhclient eth0
Remove unused kernels; this took some improvising, but it was mainly a combination of apt-get purge linux-image-x.x.x-x, dpkg --force-all -P linux-image-x.x.x-x-xxxxxx, and apt-get install -f.

tl;dr: don't let your boot partition get full.


Broadcom NetXtreme BCM5721 Gigabit Ethernet unable to connect to Internet

I found the solution!

Network Manager ignores all connections listed in /etc/network/interfaces file. So, all I had to do was remove the settings of eth0 and after a restart, Network Manager automatically configured eth0 and internet connection was established.


What is the mirror for installing updates?

The main mirror is the "archive.ubuntu.com" url.
Prefixed by a country code like "hu.archive.ubuntu.com" means, you'll use your country's own mirror.

These own mirrors are run by individuals. That means, some of them are faster, some of them are slower. If you want the latest and greatest, with fast speed, use a different (larger) country's mirror. Like I live in Hungary, but our mirror is often outdated. So I just use the mirrors can be found in Germany, Switzerland, Austria.


Impossible. Absolutely impossible. If they know the admin password they can do a-n-y-t-h-i-n-g and can always revert any change you make to the system.

If you are the admin of those system you need to re-install those computers. There is no telling what those students did to those systems (for all you know they installed a keylogger, a mailserver or some dubious script and know your password seconds after you changed it) and create an admin account with a secure password.

  Cannot change root password as many students and teacher use it !!!

Yes you can and yes you should. There should be 1 or 2 people that know the admin password. Other people can have elevated access but they still do not need the admin password.


I believe so.

The main importance is that all functions you use in your applications are defined. If the definitions of those functions (the functions that are in, let's say, library A and not in your application) refer to library B, then it's library A's responsibility to link to library B.


You could do it fairly simply with perl, if your fields are whitespace separated. Assuming you want to sort in numeric (rather than lexical) order:

$ perl -alne 'print join " ", sort {$a <=> $b} @F' file
2 5
1 2


To restore everything using Deja-Dup on 14.04

Start Deja-Dup
Click Overview in the left column. Move to the right and click the
Restore... button
Browse to the location where you stored the backup. Click Forward.
After the "checking for backups" process finishes, choose the backup
you want from the drop-down box. Click Forward.
Choose to restore to original locations or a folder of your choice. Click Forward.
Click that everything is as desired on the Summary screen, then
click Restore to begin the process.


How can I run my GUI application without desktop enviroment and make it fullscreen?

This is specific to the application you run. Your application may accept parameters, e.g. --fullscreen or --window-size. However, fullscreen is depended on the window manager, so if you only have display manager (LightDM) without a window manager, it is better simply set application window size across the entire screen size.

In addition, I am not running application as a session defined in the LightDM configuration file, but I have it defined in the ~/.xsession file. By default LightDM without window manager executes xterm. When you have ~/.xsession file it is executed instead of xterm.

For example, I have a kiosk with a chromium browser that I start with

chromium --app=https://example.com --window-position=0,0 --window-size=1920,1080

If your application does not support window position and size, you can resize with xdotool (the xdotool package on Debian), which requires some scripting.
After starting the application, you must first get a visible window number with

xdotool search --onlyvisible --maxdepth 1 ""

And next move and resize window with

xdotool windowmove {window_number} {posx} {posy} windowsize {window_num} {sizex} {sizey}


Use "Connect to Server" to connect via SFTP to access a folder in a remote server

The easiest way to connect to an SFTP server with Ubuntu is with the sftp:// scheme of the file managers with GVFS support (Nautilus, Nemo, Thunar) or KIO support (Dolphin, Konqueror):

Open a file manager window.
Show or focus the address bar e. g. with Ctrl+L.

(If this doesn't work your file manager may have an equivalent, alternative menu entry called “Go to…” or “Connect to…”. Some window manager require you to press Alt to show the menu bar.)
Enter the server address into the address bar:

sftp://example.org[:port]/

You can even supply username, password, and a path in the address:

sftp://[user[:password]@]example.org[:port]/[path/to/directory/]

If you don't and the SFTP account requires a password, a password dialogue will pop up.


That is the response from couchdb.one.ubuntu.com. Their service is down. It's been down for quite some time now, actually. At least six weeks. And there is not a word about what the problem is or when it's coming back up. :|


Supr, and 3 arrows keys not working in Ubuntu 12.04

I'll suggest you not to randomly select the keyboard model. Select the one that match to your machine.
e.g. I am using Acer Aspire E1-410, so I have to select Acer Laptop as the keyboard model.


Regarding the interpretation, that line means that the package python3-dbus:amd64 (at whatever version it is set to be, Saucy's or Trusty's) depends on python3, whose version has to be < 3.4.

However, that doesn't make sense to me because python3-dbus on Trusty needs python3 to be >= 3.4~, so I'm assuming that constraint is coming from the current Ubuntu version you're running (which is probably Saucy).

Also, note that since you compiled python3 from sources and haven't installed it through dpkg/apt, nor have you used a PPA, it's not recognized or seen by the upgrade manager, and dpkg -l will report it as the version you installed from the repos.


You can use call from the subprocess module:

from subprocess import call
call(["amixer", "-D", "pulse", "sset", "Master", "0%"])

Source

Of course, you can use the normal python code with it:

valid = False

while not valid:
    volume = input('What volume? > ')

    try:
        volume = int(volume)

        if (volume <= 100) and (volume >= 0):
            call(["amixer", "-D", "pulse", "sset", "Master", str(volume)+"%"])
            valid = True

    except ValueError:
        pass

This code will loop untill the user gives a valid input - between 0 and 100, and will then set the volume to that.

This will run in Python 3. Change the input to raw_input for Python 2.

To increase by 10% when the script is run you can do one of two things.

You can use the alsaaudio module.

First, install with

sudo apt-get install python-alsaaudio

and then import it:

import alsaaudio

we can get the volume:

>>> m = alsaaudio.Mixer()
>>> vol = m.getvolume()
>>> vol
[50L]

we can also set the volume:

>>> m.setvolume(20)
>>> vol = m.getvolume()
>>> vol
[20L]

This number is a long integer in a list. So to make it into a usable number, we can do int(vol[0]).

So to increase by 10% when it is run?

import alsaaudio
m = alsaaudio.Mixer()
vol = m.getvolume()
vol = int(vol[0])

newVol = vol + 10
m.setvolume(newVol)

Or we can stick with the subprocess module and default Ubuntu commands:

from subprocess import call
call(["amixer", "-D", "pulse", "sset", "Master", "10%+"])

will increase by 10%.

My pronouns are He / Him


How to reset Unity after being replaced by Cairo-Dock?

Okay.
It seems like your brother disabled or played around with the unity plug-in.

If you have CompizConfigurationManager installed,open it.

Or else install it from the Software Center.

After you have it,

Open it and go to "Ubuntu Unity Plugin" under the "desktop" menu

2.In the Settings click on the Enable Unity Plugin option.!


Lubuntu 12.10 This kernel does not support a non-PAE CPU

It is possible to trick the apt-get installation script (preinst) of the new kernel images into believing they are to be installed on a PAE enabled System. Then it will install flawlessly (and if it is a Pentium-M (even one of those early ones that are missing the pae flag) then it will boot and run without errors).

To do so do the following:

Install 12.04 Precise (maybe you have that already)
Install the package "fake-pae" from this repository
Do a normal distribution upgrade to 12.10 and enjoy the new Version :-)

As long as you have the fake-pae package installed there won't be any problems with kernel updates, these kernels run just fine on Pentium-M, even the early ones that do not announce their pae capability in their cpu flags. Just like the modified CD-boot images (the grub-trick) it is only a matter of circumventing these artificial installation restrictions, its not a problem with the kernel itself, you won't need custom built kernel images.


Error while copying files from Windows to Ubuntu after Windows update

Try to see if the permissions of the folder have changed. You can do this by Right clicking on the blank space > Properties >  Permissions.

Worst attempt, run nautilus in super user mode by
sudo nautilus

Go to permissions again in the same way as above and change the owner and group to your user name and group.

Don't forget to close the super user nautilus window after you are done. It's pretty dangerous :P Destroyed my home folder completely once xD


From the terminal run this command to clear  the  volume  dirty  flag if the volume can be fixed and mounted:
sudo ntfsfix -d /dev/devicename

To find out the device name you can run: lsblk


HDMI not detected after upgrade to 18.10

The solution was the obvious solution, as suggested by Kulfy: update the drivers.

$ sudo ubuntu-drivers autoinstall

and reboot.


Can't install Anaconda 2019.10 on Ubuntu 18.04

I just created my account so can't add a comment to the answer above, but thought I would confirm that Anaconda cannot be installed if you're running on a Linux machine with only one CPU.  The Anaconda bug I found for this is https://github.com/conda/conda/issues/9345 although it's closed as fixed even though it does still exist in the current non-mini Anaconda download Anaconda3-2019.10-Linux-x86_64.sh.

In VMWare, this is solved by shutting the VM down, going to Virtual Machine > Settings > Processors and Memory and selecting 2 or more processor cores.


How can I view the output of a .sh file placed in rc.local?

Just save it to a file. If you are running your script by using something like this in /etc/rc.local:

/path/to/script

Change that to:

/path/to/script > /tmp/script.out 2>/tmp/script.err

That will create the two files /tmp/script.out and /tmp/script.err which will contain the script's output and error messages respectively.


/bin/sh -c '[ -d "$HOME/Ubuntu One" ] && ubuntuone-launch'


libreoffice writer does not show "File", "Edit", etc. in standard toolbar/taskbar

Did you tried to delete configuration folder on your home directory? It persists even when you uninstall.

Complete path is:

/home/$USER/.config/libreoffice

where $USER is your account name

Try to delete that folder and reinstall.


video player issue on ubuntu 16.04 on my desktop pc

Just go to Ubuntu software center by clicking its icon in launcher and you will find all types of softwares including vlc.


Keep Firefox as default browser but open youtube links in Chrome

One solution is to go ahead and copy the link location. Then paste the URL into the address bar in Chrome. To save time,have Chrome running the background before you open Thunderbird.

Probably better, though, is to install the add-on called "Open-With" by Geoff Lankow. This allows you to select on the fly the browser you want to open a particular link. You can find it for Thunderbird here. There is also Firefox version here.


First step : setting a password-less SSH access (via ssh-keygen) :

Run ssh-keygen (you end up with 2 files : id_rsa and id_rsa.pub, one is your .pub public key to share with the world, the other your private key).
Then run ssh-copy-id myUser@myServer. Just type your password when prompted and you're now able to SSH without having to type your password for myUser@myServer.

Second step : automated daily scp :

Type crontab -e, pick your favorite editor and add a line at the bottom of the file : 0 0 * * * scp -r myUser@myServer:/local/java/log/archive/2018/02/16/log.2018-02-16.gz ~/Temp/ save and... Voilà!
(you can use a @daily scp (...) crontab entry, wich is basicaly the same as 0 0 * * *)

See Anacron (Job scheduling using crontab, what will happen when computer is shutdown during that time?) for managing Cron task when you computer is down.


the command to launch the installer is ubiquity, if the package is missing in your cd you can try installing it from synaptic


how to remove password authentication in ubuntu software center?

I will have to agree with the others on here. Having password authentication for installing software is a 'security feature'. What this does is ensure that you are explicitly intending to install the software. Rather than with Windows, for example, that will auto-install things for you, some of which could contain adware and other malicious add-ons. Linux ensures that you aren't installing something without having that explicit consent (aka: password authentication). I highly recommend not trying to bypass this feature.


failed install ubuntu gnome 16.04 when choose something else

Ensure you are booting in UEFI mode.  On the black screen before the GUI you'll have choices.  Hit e on the Try Ubuntu without installing.

Use the navigate with the arrow keys and replace quiet splach with nomodeset.  Then hit F10 to boot.

When you get to the Desktop, click on the Install Ubuntu icon.

When you get to choices of Connect to Network and Install third-party software skip those choices to make install go quicker.  You can easily add those items after the install.

After following the GUI install prompt, reboot and you should be all set.

You can get to the Canonical Partners option after the install by clicking on the Gear Icon at the top left of the Screen and going into System Settings.  Click on Software & Updates.  Place a check mark in Canonical Partners.


Installing Broadcom Wireless Drivers for ubuntu 15.04

Add restricted component repository

sudo add-apt-repository restricted

Update packages list

sudo apt-get update

Confirm that you have kernel headers installed and updated

sudo apt-get install linux-generic

Then install it again

sudo apt-get install bcmwl-kernel-source


Choosing 64 bit Ubuntu on Universal USB installer

As long as you intel processor can handle 64bit then the "ubuntu-12.04.1-desktop-amd64.iso"  is fine.

AMD is probably only used as they were the original 64bit processors

https://askubuntu.com/a/54298/32548 can provide more info


It should work, didn't tested it yet.

echo 500  > /sys/fs/cgroup/blkio/lxc/node01/blkio.weight
echo 100  > /sys/fs/cgroup/blkio/lxc/node02/blkio.weight
echo 1000 > /sys/fs/cgroup/blkio/lxc/node04/blkio.weight

lxc containers must be up and running, cgroup must be installed.
Regarding to this answer, cfq disk IO scheduler must be configured for cgroups in order to be able to throttle the IO. To configure cfq for ZFS:

echo cfq > /sys/module/zfs/parameters/zfs_vdev_scheduler

To make this parameters persistent, copy the commands to /etc/rc.local


NVIDIA kernel installation fails on GeForce 310M

First run:

wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.0-28_amd64.deb

Then:

sudo dpkg -i cuda-repo-ubuntu1404_7.0-28_amd64.deb
sudo apt-get update
sudo apt-get install cuda -y

After that, it should work.


The ubuntu download site have a bug - DOESNT BELONG HERE

To report this issue, please use the contact page of ubuntu.com: http://www.ubuntu.com/contact-us

  Web feedback

  If you have suggestions or corrections for ubuntu.com or
  canonical.com, email us at webmaster@ubuntu.com or
  webmaster@canonical.com.


WebUpd8 covered this - I've tested this on oneiric and it does work.

It requires an indicator from a PPA together with some additional scripts:

sudo add-apt-repository ppa:alexeftimie/ppa
sudo apt-get update
sudo apt-get install indicator-sysmonitor dstat
mkdir -p ~/scripts && cd ~/scripts
wget http://webupd8.googlecode.com/files/sysmon_0.2.tar.gz && tar -xvf sysmon_0.2.tar.gz

Start the indicator

indicator-sysmonitor &

Then in the indicator-preferences:

click "use this command" and copy and paste the following text:

$HOME/scripts/sysmon


iptables needs a root priviledges. Seems like you are trying to execute it as a normal user.

so: sudo iptables

Also, check are iptables loaded in the kernel:

lsmod | grep ip_tables


Ghostery
is one very useful extension that can be used to block ads, trackers etc. This is done via its easy to use interface:

The two-position switch can used to enable/disable various each entry, whilst the arrow button can be used to allow this. Sites can be whitelisted, so that the trackers only on those sites. Many settings are available in options panel (the URI for it is resource://firefox-at-ghostery-dot-com/ghostery/data/options.html), which allows the changing of various settings. Most of these settings are shown when you first add Ghostery, and can be used to set it up.
A paranoid more effective appraoch to block everything is to disable GhostRank (sends data to Ghostery???), block all trackers and cookies (the ones needed for some sites to work can be unblocked easily later when needed), and enable 'Block new elements by default'.
Ghostery should also block things from using cookies - Flash/Silverlight cookies can also be removed if enabled in settings.
???It is worth noting that Ghostery is supported by Evidon, a ad company that sells the data from GhostRank. Those that don't want this may want to make sure GhostRank is disabled
NoScript Security Suite

This is a much simpler, and in someways more effective addon, as it blocks JavaScript and other features unless told not to. This is a rather effective way to prevent ads and trackers from loading.
The problem with this addon is that it is so effective, many sites won't work unless it is told not to block them. This can be done by 'allowing' (or temporarily allowing for this session) the site's domain (and others it needs - e.g. askubuntu.com needs sstatic.net, stackexchange.com and ajax.googleapis.com). You can also set what to block in the Options:

For instance, @font-face is now used by many sites and can mostly be trusted, so that can be unblocked (it is blocked by default). Also Video/Audio need to be enabled if you want to watch HTMl5 videos, etc.
N.B. I have found on systems the menu seems to open with the shortcut Ctrl+Shift+S - handy if you can't be bothered to move the mouse.
Both of these addons work very well together, and can be used stop nearly every single annoying ad and tracker in site. Both also integrate fairly well into Firefox 30's new menu, meaning there are less icons to clutter the panel

                                                  Also note the stupidly large amount of trackers Ghostery is blocking...
Other addons are also available, including Adblock Plus.


.xprofile checking if the output display exists

If you know the name of your device, in your case "DP-1" you can simply add this code between the commands you want to execute in your .xprofile file, it will check if "DP-1" is connected

if xrandr --query | grep 'DP-1 connected'; then
  # Your code here
fi

If you are not sure about which device you to check simply run xrandr --querty in your terminal it will display all of them


I think you were lucky because you just removed the "writable" bit for groups.
This won't affect the SETGID or SETUID bits. If they were set before, they are
still set. The command chmod -R 777 /usr on the other hand resets all bits
to rwx while removing any other bits at the same time, including the s bits.
This is why people who issued chmod -R 777 /usr are usually forced to do
a re-install.

Maybe the observations I made on my system can help you. I have run some find commands to see which
files and directories would have been affected by the commands you issued. Here are the results:

# Find all files and directories NOT owned by user root:
find usr -not -user root -ls
3407926     52 -rwsr-sr-x   1 daemon   daemon      51464 Feb 20  2018 usr/bin/at

# Find all files and directories NOT owned by group root:
find usr -not -group root -ls
3418319      4 drwxrwsr-x   3 root     staff        4096 Jan  5  2018 usr/local/lib/python3.6
3418322      4 drwxrwsr-x   2 root     staff        4096 Jan  5  2018 usr/local/lib/python3.6/dist-packages
3419229      4 drwxrwsr-x   4 root     staff        4096 Nov 13 20:03 usr/local/lib/python2.7
3419230      4 drwxrwsr-x   2 root     staff        4096 Jan 26  2018 usr/local/lib/python2.7/dist-packages
1049153      4 drwxrwsr-x   2 root     staff        4096 Nov 13 20:03 usr/local/lib/python2.7/site-packages
3544477      4 drwxrwsr-x   2 root     staff        4096 Jan  5  2018 usr/local/share/fonts
3418324      4 drwxrwsr-x   3 root     staff        4096 Jan  5  2018 usr/local/share/emacs
3544479      4 drwxrwsr-x   2 root     staff        4096 Jan  5  2018 usr/local/share/emacs/site-lisp
3416934    372 -rwsr-xr--   1 root     dip        378600 Jun 12 19:20 usr/sbin/pppd
3410196     40 -rwxr-sr-x   1 root     mail        39000 Apr  3  2018 usr/sbin/ssmtp
3408208     12 -rwxr-sr-x   1 root     utmp        10232 Mär 11  2016 usr/lib/x86_64-linux-gnu/utempter/utempter
3419827     12 -rwxr-sr-x   1 root     tty         10232 Aug  4  2017 usr/lib/mc/cons.saver
3428536     16 -rwxr-sr-x   1 root     mail        14336 Jul 31 16:14 usr/lib/evolution/camel-lock-helper-1.2
3416858     44 -rwsr-xr--   1 root     messagebus  42992 Nov 15  2017 usr/lib/dbus-1.0/dbus-daemon-launch-helper
1183416      4 drwxrwsr-t   2 root     lpadmin      4096 Nov  8  2017 usr/share/ppd/custom
3410118     44 -rwxr-sr-x   1 root     mlocate     43088 Mär  1  2018 usr/bin/mlocate
3408029     16 -rwxr-sr-x   1 root     tty         14328 Jan 17  2018 usr/bin/bsd-write
3414379    356 -rwxr-sr-x   1 root     ssh        362640 Nov  5 12:51 usr/bin/ssh-agent
3410676     32 -rwxr-sr-x   1 root     tty         30800 Jul 26 18:20 usr/bin/wall
3409008     72 -rwxr-sr-x   1 root     shadow      71816 Jan 25  2018 usr/bin/chage
3416771     24 -rwxr-sr-x   1 root     shadow      22808 Jan 25  2018 usr/bin/expiry
3407926     52 -rwsr-sr-x   1 daemon   daemon      51464 Feb 20  2018 usr/bin/at
3409356     40 -rwxr-sr-x   1 root     crontab     39352 Nov 16  2017 usr/bin/crontab

# find objects that have the group-writable bit set and are owned by user=root but group!=root:
find usr -perm -0020 -user root -not -group root -ls
3418319      4 drwxrwsr-x   3 root     staff        4096 Jan  5  2018 usr/local/lib/python3.6
3418322      4 drwxrwsr-x   2 root     staff        4096 Jan  5  2018 usr/local/lib/python3.6/dist-packages
3419229      4 drwxrwsr-x   4 root     staff        4096 Nov 13 20:03 usr/local/lib/python2.7
3419230      4 drwxrwsr-x   2 root     staff        4096 Jan 26  2018 usr/local/lib/python2.7/dist-packages
1049153      4 drwxrwsr-x   2 root     staff        4096 Nov 13 20:03 usr/local/lib/python2.7/site-packages
3544477      4 drwxrwsr-x   2 root     staff        4096 Jan  5  2018 usr/local/share/fonts
3418324      4 drwxrwsr-x   3 root     staff        4096 Jan  5  2018 usr/local/share/emacs
3544479      4 drwxrwsr-x   2 root     staff        4096 Jan  5  2018 usr/local/share/emacs/site-lisp
1183416      4 drwxrwsr-t   2 root     lpadmin      4096 Nov  8  2017 usr/share/ppd/custom

Of course, your mileage may vary have varied but I'm confident that
you only "broke" a handful of files. The vast majority of objects below
/usr are owned by root:root and usually have either rwxrwxr-x
or rwxr-xr-x. Removing the g-w bit doesn't really do harm because it
removes the writeable bit for the group root but (at least on my standard
system) the only member of that group is the user root anyway and he has
write access via the user permissions (which you didn't change) and doesn't
really need write access via group membership.

Btw, my /usr itself has the following attributes:

drwxr-xr-x  10 root root  4096 Jan  5  2018 usr/

Update

The OP mentions he faced the error

sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

after issuing chmod g-w and chown root:root and had to fix it with
chmod 4755 /usr/bin/sudo. As it turns out, the chown g-w indeed
does NOT change the setuid bit but the chown root:root did.
It apparently clears those SETUID (and presumably also the SETGID and
STICKY) bits. To me, this is unexpected behaviour but I'm pretty sure
there's an explanation and/or reason. However. I ran another find
command to see which of my files below /usr have one or more of
SETUID, SETGID, and STICKY bits set:

find usr -perm /7000 -printf '%M\t%u:%g\t%p\n'
drwxrwsr-x  root:staff      usr/local/lib/python3.6
drwxrwsr-x  root:staff      usr/local/lib/python3.6/dist-packages
drwxrwsr-x  root:staff      usr/local/lib/python2.7
drwxrwsr-x  root:staff      usr/local/lib/python2.7/dist-packages
drwxrwsr-x  root:staff      usr/local/lib/python2.7/site-packages
drwxrwsr-x  root:staff      usr/local/share/fonts
drwxrwsr-x  root:staff      usr/local/share/emacs
drwxrwsr-x  root:staff      usr/local/share/emacs/site-lisp
-rwsr-xr--  root:dip        usr/sbin/pppd
-rwxr-sr-x  root:mail       usr/sbin/ssmtp
-rwxr-sr-x  root:utmp       usr/lib/x86_64-linux-gnu/utempter/utempter
-rwsr-sr-x  root:root       usr/lib/xorg/Xorg.wrap
-rwxr-sr-x  root:tty        usr/lib/mc/cons.saver
-rwsr-sr-x  root:root       usr/lib/snapd/snap-confine
-rwxr-sr-x  root:mail       usr/lib/evolution/camel-lock-helper-1.2
-rwsr-xr--  root:messagebus usr/lib/dbus-1.0/dbus-daemon-launch-helper
-rwsr-xr-x  root:root       usr/lib/openssh/ssh-keysign
-rwsr-xr-x  root:root       usr/lib/policykit-1/polkit-agent-helper-1
-rwsr-xr-x  root:root       usr/lib/eject/dmcrypt-get-device
drwxrwsr-t  root:lpadmin    usr/share/ppd/custom
-rwxr-sr-x  root:mlocate    usr/bin/mlocate
-rwxr-sr-x  root:tty        usr/bin/bsd-write
-rwsr-xr-x  root:root       usr/bin/traceroute6.iputils
-rwsr-xr-x  root:root       usr/bin/gpasswd
-rwxr-sr-x  root:ssh        usr/bin/ssh-agent
-rwsr-xr-x  root:root       usr/bin/passwd
-rwsr-xr-x  root:root       usr/bin/pkexec
-rwsr-xr-x  root:root       usr/bin/sudo
-rwxr-sr-x  root:tty        usr/bin/wall
-rwsr-xr-x  root:root       usr/bin/chfn
-rwxr-sr-x  root:shadow     usr/bin/chage
-rwsr-xr-x  root:root       usr/bin/arping
-rwxr-sr-x  root:shadow     usr/bin/expiry
-rwsr-sr-x  daemon:daemon   usr/bin/at
-rwxr-sr-x  root:crontab    usr/bin/crontab
-rwsr-xr-x  root:root       usr/bin/chsh
-rwsr-xr-x  root:root       usr/bin/newgrp

This list is not very long but it still contains some files I'd
consider crucial. Especially those in the last third, like passwd,
crontab, etc., and of course sudo.


Can't use GPG to sign anything: "gpg2 signing failed: Operation cancelled"

I know this is old, but for anyone else who has this problem, you might have forgotten to run git config --global user.signingkey yourkey.


How do I select the system fonts in Ubuntu 11.10?

In the software center look for gnome-tweak-tool and install it, it will show up as Advanced settings in the launcher.


How to switch between GNU Terminal windows with a keyboard shortcut?

Use Alt + ` to switch between different windows of the same application, including the terminal.


Do we have offline Python documentation browser in Ubuntu repositories to have one "point of service" to read and search the Python docs and APIs?

If you're talking about the documentation for Python itself (installable from the python3-doc package which depends on the actual system Python version's doc package), then you can just run a web server from /usr/share/doc/python3/html (e.g., using python3 -m http.server). The Python docs use Sphinx, which supports client-side searching.
Example using 18.04:

The index page:

The sidebar links are mostly external.

The reference section:

Searching:


Can't install Ubuntu under Windows 7 using Wubi?

May be your Wubi installer file will be corrupted or some files may be missing from Ubuntu ISO, you should also check whether you are setting the options in Wubi installer correctly, i mean proper disk size etc.I think the problem  is with  your installation media.


The login screen doesn't take input from the keyboard or mouse

Try pressing "Ctrl-F1". Do you see the black screen with a login prompt? (That is called TTY). In that case your desktop environment has been corrupted by the update (it happens sometimes).

If that is the case, maybe you can log in with your username and password from the TTY and try to reinstall (or purge and install again) the desktop environment you are using (Unity?). Or you can try to take a look to the log files and try to fix it somehow.
You could try with:

systemctl status lightdm

and

systemctl restart lightdm

Note: For returning to the frozen login screen, press (Ctrl-F7).


To add 119 GB unallocated space to the /dev/sda2 partition:

Right-click on the dev/sda3 extended partition and then select the option Resize/Move.

click and Move the dragger to the extreme right,so that the 119 GB unallocated space will come just above to the /dev/sda3.

Now right-click on the /dev/sda2 partition and then select the option Resize/Move to add the unallocated space.That's all.

NOTE: Run all the above steps in Gparted  running on a live disk.


NDK_ROOT enviroment variable defined but script does not see it

Do you run the script from the Bash shell? If not, you may want to define the variables in ~/.profile instead of ~/.bashrc.

https://help.ubuntu.com/community/EnvironmentVariables#Persistent_environment_variables


usb-c HDMI adapter won't work over usb-c hub

The USB-C hub you have already has an HDMI port?  That's why your HDMI adapter is not working when plugged into it.  Even though the port is not working the hub is still going to filter out the DisplayPort data from the USB-C signal to any USB-C ports the hub has.
USB-C ports have 4 "superspeed" data lanes in it.  To get both USB 3.x data and video through that port the computer and hub will dedicate 2 lanes for USB and 2 lanes for video.  Inside the hub those 2 video lanes will be directed to it's own HDMI port.  A broken HDMI output does not make that video available on the USB-C port, those internal wires are going to run to whatever is broken in the hub.  To get video from the hub will mean resolving whatever issue the hub has.  Plugging in another video adapter downstream will not help.


Required time to upgrade from 14.04 to 16.04

The time needed for the upgrade to finish depends on many factors like your internet connection speed, the actual download speed you get from the Canonical servers, the type of mass storage in your computer, and even your CPU.

On our somewhat outdated office PC with a regular HDD, it took around 40 minutes give or take, using a 16mbps DSL connection.

Depending on your circumstances, I'd say this might be anywhere from 15 minutes to 1.5 hours in general.


Use this PPA:
https://code.launchpad.net/~peterpall/+archive/ubuntu/wxmaxima-nightlies

and reinstall wxmaxima

sudo add-apt-repository ppa:peterpall/wxmaxima-nightlies
sudo apt update
sudo apt install wxmaxima


Dual-monitor: Can't make gnome-panel and new windows default to first monitor

If you are using Natty, or Compiz this is due to the place windows plug-in.

To change this install CCSM

apt-get install compizconfig-settings-manager

Then select the 'place windows' plugin, and there are a number of options for the 'multi-output mode' which you should be able to tailor for your needs.


As mentioned in the chat, find out what you video card is (sudo lshw -c video) and install the correct drivers for it when you have booted into rescue-mode/resume. You might have to reinstall it after rebooting into the normal system (not sure, but I read that once somewhere).

The reason seems to be that a normal boot uses the xorg-related video drivers, while the Recovery-mode/resume option boots with llvmpipe as low-graphics fallback driver. And the normal xorg-driver seems not to like your graphics card...


Headless music converter with filename based on tags

Here's a sample script and how to use it.

Install these packages first: libav-tools mediainfo ubuntu-restricted-extras

avconv (formerly known as ffmpeg) performs the actual conversion
mediainfo provides the tag information to create the folder structure and name the file.

The script is:

#!/bin/bash
OUTPUTBASE=converted-oggs #path to the base folder for output
ALBUMARTIST=`mediainfo --Inform="General;%Album/Performer%" "$1"`
ALBUM=`mediainfo --Inform="General;%Album%" "$1"`
TNUMBER=`mediainfo --Inform="General;%Track/Position%" "$1"`
TTITLE=`mediainfo --Inform="General;%Track%" "$1"`
TARTIST=`mediainfo --Inform="General;%Performer%" "$1"`

mkdir -p "$OUTPUTBASE/$ALBUMARTIST/$ALBUM"

mediainfo --Inform="General;%Cover_Data%" "$1" | base64 -d > "$OUTPUTBASE/$ALBUMARTIST/$ALBUM/AlbumArt.jpg"

avconv -i "$1" -acodec libvorbis -b 48k "$OUTPUTBASE/$ALBUMARTIST/$ALBUM/$TNUMBER $TTITLE - $TARTIST.ogg"

Suppose we name the script ~/silexcvt.sh, then you to convert all m4a tracks in the ~/soundtracks folder, you would have find and xargs call the script as:

find soundtracks -regex '.*m4a$' | xargs -I '{}' ./silexcvt.sh "{}"


How to configure Grub to show only splash-screen and error messages during boot and shutdown?

Try installing and configuring :sudo apt-get install startupmanager.

For changing the grub splash image have a look at this post.

There's also a plymouth manager. On Nvidia & ATI cards you might want to try a fix script.

Lightdm background:

sudo apt-add-repository ppa:claudiocn/slm
sudo apt-get update
sudo apt-get install simple-lightdm-manager

All I've heard of for shutdown is to comment out the following line (i.e., add # to the beginning of the line) in /etc/init/rc.conf:

#console output


Hand me down computer What to do about no password for virgin?

As for a computer who was set up by another person, you should for the sake of being secure freshly install it yourself.

Just go to https://www.ubuntu.com/download and get an image of your preferred Ubuntu version.
Note: 12.04 will be EOL (which means end of lifetime) in a few months, so you might want to consider at least 14.04 or higher depending on your system.

Then use the Startup Disk Creator to burn it on an USB-drive and start from it to do a fresh installation.
Or if you prefer to use a DVD then have a look at https://help.ubuntu.com/community/BurningIsoHowto


How can a frozen/locked-up program/app be closed?

Press ALT+F2, type xkill. The mouse pointer on screen will change to a cross.

Then with it, you can simply click on the window you want to close.


clamscan /boot/System.map-5.0.0-32-generic: Access denied

clamscan needs root-rights )elevated privileges) to scan all files.
Plwase use sudo clamscan to achieve that.


AMD Radeon HD 7310 HDMI Functionality on any Ubuntu?

AMD GPU's do work in ubuntu, although their linux drivers are not as feature rich as other brands, such as not having HD audio support. You will need the proprietary drivers for improved xbmc performance. I suggest you try the xvba branch of XBMC as enables GPU acceleration with AMD GPU's, this thread on the xbmc forums has a comprehensive how-to guide with driver recommendations.


How can a package maintainer prevent file collisions with Ubuntu packages, like trying to overwrite 'file', which is also in package?

To prevent this with Ubuntu packages you can use apt-file and just run all your package against the file database that can be found using apt-file:

apt-file search -D your_deb_file.deb

This will require that you have apt-file installed and updated. Then add the package name (and possibly version) to the Break or Conflict fields, in the respective package entries in the control file. That should be enough.

Now, some would want to replace Ubuntu files with their own, like offering a newer version of the applications, in such cases the best is to use the same debian/ files as the Ubuntu packages. This will create your package with the same shape as upstream and file collisions can be adverted.

Note: if the user likes to mix repositories from different maintainers, nothing you can do.


Do I need to install a database before programming in c++?

No database is installed by default.
You need to install something like MySQL or Oracle or Postgres.
Installing MySql on Ubuntu
Open a terminal window, and use the following command:

sudo apt-get install mysql-server

To check whether the MySQL server is running:

sudo netstat -tap | grep mysql

When you run this command, you should see the following line or something similar:
tcp        0      0 localhost.localdomain:mysql           : LISTEN -
If the server is not running correctly, you can type the following command to start it:

sudo /etc/init.d/mysql restart

Configuration
You can edit the /etc/mysql/my.cnf file to configure the basic settings -- log file, port number, etc. For example, to configure MySQL to listen for connections from network hosts, change the bind_address directive to the server's IP address:
bind-address            = 192.168.0.5
Replace 192.168.0.5 with the appropriate address.
After making a change to /etc/mysql/my.cnf the mysql daemon will need to be restarted:

sudo /etc/init.d/mysql restart

If you are running PHP you will also need to install the php module for mysql 5:

sudo apt-get install php5-mysql

To create a new database, use the mysqladmin command:

mysqladmin create

Installing Oracle 10g XE on Ubuntu
Oracle provides a debian repository at http://oss.oracle.com/debian, containing only Oracle 10g Express Edition (XE) packages. To see these packages, add this line to /etc/apt/sources.list file:

deb http://oss.oracle.com/debian unstable main non-free

Next, you will need to add the GPG key.

wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle  -O- | sudo apt-key add -
sudo apt-get update

To install the XE database server:

apt-get 'oracle-xe-universal' or 'oracle-xe' (Western European support only).
apt-get install oracle-xe-universal

If you only need the XE client, type

apt-get install oracle-xe-client


The information will be submitted only if you have an launchpad account with the email id you provided.

Ubuntu documentation and Video


Broken package, but cannot purge or reinstall it!

Alternative 1: Try to reinstall mdadm with apt-get:

sudo apt-get --reinstall install mdadm

Alternative 2: If apt-get doesn't work, install Synaptic with the Software Center.

Go to the search section and type mdadm, right-click and mark it for reinstallation (or try all the other options) and apply the execution.

Alternative 3: If no luck so far, try to reinstall mdadm from the .deb-file directly:

sudo dpkg -i /var/cache/apt/archives/mdadm_version.deb

Use tab-completion, because the .deb-file is additionally named with a version number!

Is there no such package in /var/cache/apt/archives, you may need to download it manually. Take care that you choose the correct Ubuntu Release and the correct Package Version!

sudo dpkg -i path-to-downloaded-package/package-name-version.deb

In case that dpkg doesn't work either, install GDebiPackageInstaller with the Software Center and reinstall the downloaded .deb-file with this program.

In the end, clean-up and update your system:

sudo apt-get autoremove
sudo apt-get autoclean
sudo deborphan | xargs sudo apt-get -y remove --purge
dpkg -l | awk '/^rc/ {print $2}' | xargs sudo dpkg --purge
sudo apt-get clean

sudo apt-get update
sudo apt-get upgrade


Problem with LightDM after selecting gdm as default login manager

http://wiki.ubuntu.com/LightDM

Ctrl-Alt-F1

sudo dpkg-reconfigure lightdm

select LightDM

sudo reboot


Where are System settings stored in Ubuntu 17.10

Touchpad

This depends on what you use to configure the touchpad. For a Synaptics touchpad, you could use the synclient command line tool to save and restore preferences. Other preferences probably get saved somewhere in the dconf database, and you can use gsettings to save and restore those.

Is it possible to monitor dconf for changes?

Example of Editing Mouse Config using gsettings:

gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false

WiFi

Network Manager settings go in /etc/NetworkManager (and connection setting specifically in /etc/NetworkManager/system-connections). This directory requires sudo access to modify from the command line. The nmcli command line tool can be used to automate configuring network connections to some extent.

GNOME Shell extensions

From the GNOME wiki:

  Extension Preferences

  Since version 3.3.5, Extensions may be configured in a consistent
  manner using the gnome-shell-extension-prefs tool. To hook into it,
  provide a simple javascript file called prefs.js.

It doesn't look like this is meant to be used outside of extensions, and I don't have a GNOME Shell on hand to test with, but gnome-shell-extension-prefs seems to be your best bet to get and set extension preferences.


How do I download KPPP-debs from within Windows?

You can find the package at http://packages.ubuntu.com

For 13.04 for instance http://packages.ubuntu.com/raring/kppp

You'd need to make sure that you have the dependencies installed.

Once you've downloaded the file(s) externally you can install them on the target machine.


Install Ubuntu on a second harddrive without messing with other drives or main Windows 7 bootloader?

1. Of course you can install Ubuntu on Hard Disk Drive D (I am not talking about
logical disk drive). While installing Ubuntu, it would
offer a page, in which you select the Hard Drive on which the OS
should be installed. This option is there in pretty much all the
operating system installers.

2. You can even install multiple operating systems on the same drive (D), the
bootloader corresponding to the last operating system which you install on that
drive will show up and list all the operating systems available on that drive.

3. You can read about sharing the swap space

https://unix.stackexchange.com/questions/5656/are-there-any-side-effects-when-two-distros-share-a-swap-partition


haha I just did exactly the same thing over here on my system messing around; was bored sitting here reading that the Vulkan drivers may perform better after watching a video comparing the Radeon RX 5700 XT's to the 3060 TI's and my mind started wandering off - probably from lack of sleep, plus all the nicotine and caffeine :) Anyway I had the 460 driver's up and running nicely but then started screwing around and after reading into all this stuff, Nvidia's website says to use the 430 driver for the 20 series cards?? Who knows, so then I sit here purge all the stuff I had working, put the 430 driver on and apparently it screwed up the configuration files... system kernel is still loading something off the 460 driver's, and yea.. now my computer is working but plasma's all screwed up, spitting out errors at me and games are running at like 13 FPS. Why do they gotta make this stuff so frustrating man? At least I know what's going on but hell if i know how to manually edit kernel configuration files. THAT's what got me to say to hell with WSL2 and just go 100% linux in the first place (I was watching that "Dave's garage guy" on youtube and trying to just put a straight linux kernel in WSL2 when I made a stupid typo that screwed everything up lmfao). "Aww shit, here we go again"


Is the Update Manager release upgrade path generally fire-and-forget?

It's not simply like that. There are a few instances in which you have to approve certain actions. You can leave it downloading during the night, but the process of installation itself takes action from the user.


watch not work with "pkill ffmpeg; ffmpeg -i"

A more elegant solution is to use the segment muxer:

ffmpeg -i input -c copy -f segment -segment_time 40 output_%03d.mp3

Results in approximately 40 second segments:

$ ls -m1
output_000.mp3
output_001.mp3
...
output_010.mp3

The example avoids re-encoding by using stream copy mode, and assumes the input and output formats are the same (MP3 in this example).


I have an temporarily fix for this problem, Luckly it's very very easy.

press: alt + f2 ,to open a command screen
type: r
press: enter

that's all, the backgrounds have reloaded. its not a fix but it helps till this problem is patched

source: https://www.fosslinux.com/3495/how-to-refresh-desktop-in-ubuntu-without-rebooting-pc.htm

btw some laptops requite to press alt + fn + f2


Boot your system from a Ubuntu live-cd.
You would require an active internet connection.

Install Grub. For UEFI installation install grub-efi. For others, install grub2

sudo apt-get update
sudo apt-get install ( grub-efi or grub2 ) #Based on your installation.

Follow from step 2 from this answer.


How to extract interesting piece of output in bash

I would use cut instead of sed:

Set the delimiter to colon and choose second field:

cut -d ':' -f 2 file

Output:

 23 kB
 9.8 kB
 9 kB
 128 kB
 921.8 kB

Then remove the spaces with tr -d:

cut -d ':' -f 2 file | tr -d ' '

Output:

23kB
9.8kB
9kB
128kB
921.8kB


20.04: KDEConnect not working after upgrading from 19.10

Deinstall all gsconnect components
Install the kdeconnect package by running sudo apt install kdeconnect


There is probably a problem with the drive, or the partition/MBR is messed up.

After you plug it in, enter this in the terminal:

dmesg | tail

what does it say?  Usually from the error message you can tell what the problem is.


config is a file in this case, directories end with a slash.

An easy way to create this file is to

open a terminal with CTRL+ALT+T
type sudo gedit /etc/pm/config.d/config to open/create the file with root permissions (needed anywhere beside /home/* folders)
Now add SUSPEND_MODULES="rtl8723be"
Save the file and close gedit.
Go back to your terminal and type echo "options rtl8723be fwlps=N" | sudo tee /etc/modprobe.d/rtl8723be.conf

That should exactly be what you need to do in Step 3.

P.S.: You don't have to type the commands, you can copy and paste in terminal with the additional use of SHIFT. For instance paste in terminal is: SHIFT+CTRL+V or copy in terminal is SHIFT+CTRL+C

Have Fun!


Where can I change the webpage shown by apache?

you can put your webpage in /var/www/ you will need sudo access to be able to change anything there.

These are your options to do so.

1. Use mv on a file

You could use the terminal and the command mv.

Example:

cd /var/www/
mv ~/Desktop/FILENAME.html .

The dot isn't a misstake, it's that the destination is the current folder.

2. use a text editor

Another way to do it is just to open gedit (or any other editor) and save your file in /var/www/.

if you want to remove apache you could just type sudo apt-get remove apache in a terminal. If you are using apache2 then add a 2to the ending.

3. Make a link to the root folder

And if you are tired of having to use the root user to add a new webpage document, jsut make a link. Configuring Permissions for FTP and Apache

By the way, you don't need to go to your IP, you can just go to your localhost in your browser. If you have several files in your folder, just add a file name like this: localhost/myfile.html


Connecting MS SQL using freetds and unixodbc: isql - no default driver specified

Thanks, your post was very useful for me.  I was able to get it to work by eliminating the following lines from my odbcinst.ini file

Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
FileUsage = 1
CPTimeout =
CPResuse  =
client charset = utf-8

so now my odbcinst.ini file looks like this:

--- /etc/odbcinst.ini ---
[FreeTDS]
Description = FreeTDS
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so

and my odbc.ini file looks like this now:

--- /etc/odbc.ini ---
[TS]
Description = "test"
Driver = FreeTDS
Server = SERVER
Port = 1433
Database = DBNAME

Once I simplified everything it worked great.   I still can't get it to work with RODBC but it worked with isql.

I don't know if this will help but your post helped me.  Thanks.


KVM Virtual Machine Manager: Host CPU does not provide required features: aes

You have set your guest CPU to have AES, but your host CPU does not have AES. Your host CPU can not expose a CPU flag that it does not have. Your options:

Remove the AES CPU flag from the guest VM
Switch to a VM host that has a CPU with AES instructions (list of compatible CPUs)


At my institution, we routinely get linux versions of labview in the dvd set, and I've been using them since LV6. I don't remember to have put specifically LV2011 on 14.04, but I have for so many other combinations, e.g. 2012, 2013 and 2014 on 13.10 and 14.04. Quite likely I had LV2011 on ubuntu 11 or 12.
LV for linux is limited in HW and toolbox support compared to the Win$ release, for instance has no vision, no fpga, etc, but is definitely workable . Moreover Ubuntu has never been a supported distribution so certain things won't work (I haven't been able to install VISA, for one) but all together installation has become more straightforward with the years.


unable to login to ubuntu after upgrade to 12.10

You will need to go into recovery mode and uninstall the proprietary driver. Then reinstall it once you are back in on the open source driver. If you still get the same problem, try installing a more recent version of the driver than is available in the repos.


A quick-to install, full version of Ubuntu for class purposes?

What about a live CD? I believe you can run Ubuntu off of any installer CD.


Is there a way to install Ubuntu on usb pendrive as normal instalation (not live cd)?

Yes.

1.Boot LiveCD from cd,dvd or another pendrive.

2.Insert empty pendrive.

3.Install Ubuntu on empty pendrive.


How do I move application menu on windows to left side in Ubuntu 18.10/18.04?

Launch Terminal and run the following command:

gsettings set org.gnome.desktop.wm.preferences button-layout 'appmenu:minimize,maximize,close'


'No space left on device' for a non-system partition

I am using dual OS (Windows 7, Xubuntu 16.04) and I had the same problem in Windows as well:

The volume is too fragmented to complete this operation

Running disk defragmentation shows that the disk is 0% fragmented. I ran the disk check in Windows which fixes the problem. The output from CHKDSK was:

Free space verification is complete.
Correcting errors in master file table's (MFT) BITMAP attribute.
CHKDSK discovered free space marked as allocated in volume bitmap.
Windows has made corrections to the file system.

My partition is NTFS if it matters. Sorry that this fix is not done on Ubuntu. I just did whatever it takes to fix it.


strange behavior with sed and text files on Ubuntu

Ok i just found what was wrong and i think i know what @steeldriver meant

the original file was created in Windows... so before it was "handled" by var, it should be converted do unix format (i used dos2unix). hope it helps someone...


How to convert rsa key to pem using X.509 standard

From the Azure site itself:

openssl req -x509 -key ~/.ssh/id_rsa -nodes -days 365 -newkey rsa:2048 -out id_rsa.pem

This will convert your private key into a public key that can be used with Azure.


To solve this, set the check mark to enable "DO NOT USE KERNEL CRYPTOGRAPHIC SERVICES" in TrueCrypt

See also http://ubuntuforums.org/showthread.php?t=2137911


Switching to Gnome solved the problem.

Also, Gnome is more Windows-like than Ubuntu's default desktop environment.


It seems that we do not need to compile anything by ourselves.
We can simply install required development packages from gst-rtsp-server1.0 source package :

sudo apt-get install libgstrtspserver-1.0-dev gstreamer1.0-rtsp

and then you can use it as planned.

Below is manual compilation method if you are sure that you want to do.

Install development tools:

sudo apt-get install git build-essential autoconf automake autopoint libtool pkg-config -y
sudo apt-get install gtk-doc-tools libglib2.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev -y
sudo apt-get install checkinstall

(note libgstreamer1.0-dev above).

Clone the repository:

git clone https://github.com/GStreamer/gst-rtsp-server.git
cd gst-rtsp-server/

But Ubuntu 18.04 LTS has old version of GStreamer library (1.14.0) so we need to checkout previous version and then compile:

git checkout 1.13.91
./autogen.sh
./configure
make
sudo checkinstall make install # enter 3 and fill *Version* field with 1.13.91

Note: you can use sudo make install in the last stage, but checkinstall is safer as it will create deb-package with compiled application (so it is controlled by APT and may be removed with sudo dpkg -r gst-rtsp).


There are many cases of Wubi virtual disk corruption. The exact cause is unclear to me although I suspect in many cases it's the forced shutdown/reboot of the Wubi Ubuntu install. There are some cases where the affected users insist that they did not force shutdown so, the truth is - I don't know exactly. But what I do know is that my blog page to correct this problem is the most visited page by far, so it does affect many people.

That's why I recommend that if you need to store data you should do it on the /host partition (NTFS) as separate files, rather than all stored together in the virtual disk (that is really just one file). It's simply a question of risk, whether that file is deleted by accident or corruption, you have all your eggs in one basket.

What I also recommend is synchronize the data you do keep on the Wubi install to Ubuntu One. So in that way you can have the convenience of Wubi without the risk.

The 32GB limit on the script (which I maintain) is based on the 30GB limit built into Wubi. I have no specific reason or knowledge that anything over this will be more susceptible to corruption (and personally I doubt that it makes any difference), but I don't believe people should be encouraged to create 100GB virtual disks because of the risk. That's the reason.

I've written about this on my blog which I encourage you to read if you have more questions:
http://ubuntu-with-wubi.blogspot.ca/2011/08/missing-rootdisk.html

http://ubuntu-with-wubi.blogspot.ca/2012/07/whats-wrong-with-wubiubuntu.html

http://ubuntu-with-wubi.blogspot.ca/2012/08/six-wubi-rules.html


What is the difference between snaps and Ubuntu Software Center-based apps?

Classic packages
If you're installing program from deb-package (Ubuntu Software Center version in the question), you get program that relies on system-installed dependencies.
Pro: you only download every common part once.
Con: you can't install programs that require something that is newer than available for your system release.
Snaps (snap packages)
If you're installing program from snap, you get program with all its dependencies packed in isolated container.
Pro: you can install programs that require dependencies that are not available system-wide, or use programs with different versions of same dependencies.
Cons:

you have to download and keep same components again, so you could get increased traffic and disk usage.
if there is vulnerability found in some dependency, you have to wait while program publisher updates snap with updated one, while you could update it yourself if you'd used classic packages.


@StErMi, the errors below can be related to your problem.

[FIRMWARE BUG] ACPI(PEGP) defines _DOD but not _DOS

[Firmware Bug]: Invalid critical threshold (0)

drm:intel_dsm_platform_mux_info] *ERROR* MUX INFO call failed

According to this, using the acpi_backlight=vendor option will solve first bug. If this does not work, you can try the acpi=noirq option.

For the second bug, it is recommended to make a BIOS update and you can see that BIOS update solved the problem.

For the third one, one workaround is to use the pci=noapci option, but if you use this option you will not be able to use the ATI graphics card.

I know these will not permanently solve your problem but at least there is hope that one of the workarounds could provide a usable Ubuntu for you.

To use the options that are mentioned here, look at this link.


You should use the following format of quotes:

$matlab "func('$path/$file')"

Replacing $matlab with echo (executed on GNU bash, version 4.3.46) result with:

$ echo  "func('$path/$file')"
func('/home/username/files/document.mat')


Ubuntu 12.04 Grub Error while changing default OS

I think that you are asking only for assistance in changing which OS GRUB boots by default on your system. This has been asked and answered previously. Please take a look at this question and its answers:
How do I set Windows to boot as the default in the boot loader?

Setting GRUB_DEFAULT= to the numeric position in the GRUB menu of the OS you want to boot is a "less special" approach. This method can break if new entries are added to your GRUB menu.

Two other approaches you could use which might serve you better are:

Set GRUB_DEFAULT= to the title of the menu entry you want as your default. That method is described in this answer to the question above.
Set GRUB_DEFAULT= so the default is to boot the operating system you booted the last time (also referred to as the "saved method"). This is discussed in this answer.

Please check the version of GRUB used on your computer

According to this section of the Ubuntu GRUB documentation, you can check the current version installed on your system ... from the command line by opening a Terminal and entering the following:

  grub-install -v

Grub 2 should display a version number of 1.96 or later. Grub Legacy is version 0.97.

Please also take a look at the version information displayed on your GRUB boot menu. It's pretty easy to find, but I provided an image to illustrate anyway. :-)

Another thing you could do which would help is to install the Boot-Repair tool and use it to Create a Bootinfo summary.

To do this you would first install the tool using apt-get. The terminal commands to do this are

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

When this completes (successfully), enter the command boot-repair to start the tool.
After a slight delay, boot-repair will prompt you to download the newest version. Since you just downloaded & installed the tool there is no need for this so answer No.
If boot-repair requests to install the pastebinit package, respond with Yes.
The tool will now scan your system and (eventually) display the window shown in the image below. For now just click on the box/button to Create a Bootinfo summary. This will collect information about your system's boot configuration, but will not make any changes.

When the bootinfo summary has been created, boot-repair will display a message containing a URL like this: http://paste.ubuntu.com/123456/. Please add this URL to your question. The information this link points to will allow us to better understand how GRUB is set up on your computer.


Ubuntu booting to black screen after selecting install

I would try
1) installing while selecting each of the options under F6 Other Options.

2)If no luck, I would guess there is an issue with your hardware or BIOS configuration.

That boot screen is not the OS. Try selecting Live Mode (Try Ubuntu without installing). I bet you get the same blank screen but if you get in try installing from there. I had the same thing happen yesterday... Turned out I had dust or other particulate in the RAM slot. PC booted and got boot screen... No live mode or install... until I cleaned out the slots.


Changing Network Settings with Blueman Bluetooth Manager (ev3dev Lego Mindstorms)

Ok, solved it. Making the above change to NAP settings you need the ifconfig utility from net-tools
To install
sudo apt-get install net-tools

Note: if that still doesn't work for you other users reported that they had to install the additional packages: net-tools, dnsmasq (Source on github.com/ev3dev)


That's a "nouveau" problem, the nvidia open source driver causing this problem. if you add nouveau.modeset=0 as a boot-up kernel perimeter it will boot with the intel card only which will allow you to install the proprietary nvidia driver.
I have the same laptop and had the same issue in Fedora and this fixed the problem for me.


How to Manually Add Wireless Profiles Ubuntu Server 16.1

This is not a complete answer but this problem is found here:

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

And the error with wpa_supplicant was never fixed to allow wireless profiles to be saved and used. So for a user to readily connect wirelessly using DHCP they must do this every time:

sudo iwlist wlp3s0 scanning | egrep 'Cell |Encryption|Quality|Last beacon|ESSID'

Found here How do I scan for Wireless Access Points?

Then set your /etc/network/interfaces file as such:

auto wlp3s0
iface wlp3s0 inet dhcp
wpa-ssid YOUR_ESSID
wpa-psk YOUR_PASSWORD

Get your hex generated password using this command if you need to use the wpa_supplicant.conf file for whatever reason:

sudo wpa_passphrase YOUR_ESSID YOUR_PASSWORD

You can find the name and state of your network interfaces using this command:

ip link show

Which will tell you the name of wlp3s0 or wlan0 or whatever yours is. But as for actually using wpa_supplicant.conf and keeping track of what wireless networks you use, maybe someone can answer that.


Unmet dependencies installing gnome-shell-extension-weather

in your terminal (CTRL+ALT+T)

sudo -i
dpkg -i --force-overwrite  /var/cache/apt/archives/libwayland-client0_1.2.0-0ubuntu1~13.04~ricotz0_amd64.deb
dpkg -i --force-overwrite  /var/cache/apt/archives/libwayland-cursor0_1.2.0-0ubuntu1~13.04~ricotz0_amd64.deb


Some basic questions about installing PHP on ubuntu

That depends on which script/php-framework do you want to run. For example,
if you want to run a Laravel application you have to enable/install the following PHP-extensions:

OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension

Additionally you can read here Laravel official documentation that you need PHP >= 5.6.4 to ensure that everything will work properly.

So it depends on what kind of framework do you use.


KDE's OwnCloud software should work nicely for you.

Here's an article on how to set it up: http://www.webupd8.org/2011/10/owncloud-2-your-personal-cloud-server.html


How can I delete an artist or album in Rhythmbox?

Rythmbox, like most players, reads and uses ID3 tags (metadata) in the audio files and presents that in the library view instead of the files names.

Renaming the files doesn't change the metadata.

In Rythmbox you have the option to edit the files properties: Right-click on the track and select Properties. Edit can be made in the window as shown below, kindly provided by Elder Geek. Changes will be saved when closed.

Alternatively, you can edit the files' metadata directly.
EasyTag (pictured below) is a tag editor available in Ubuntu repositories:

sudo apt install easytag


how to uninstall emacs from command line?

emacs is actually a virtual package, provided by emacs23-lucid or emacs23-nox. It's these that should be removed:

sudo apt-get remove --auto-remove emacs23-lucid emacs23-nox

The --auto-remove removes any packages which were installed to fill a dependency, but are no longer needed. In this case, it will remove packages like emacs23-bin-common.


Is there a way to unmask the login password in Unity?

Do you use the shell switching functionality on the login screen? If not, you could enable automatic login and pass the login screen altogether. See: http://www.liberiangeek.net/2011/03/automatically-logon-ubuntu-11-04-natty-narwhal-typing-passwords/


For the backlight to work I have to type in sudo modprobe -r apple_gmux everytime

To run a script as root on startup, simple edit /etc/rc.local file and add the script as separate lines to it, before the exit 0 line. Remember that you need root privileges to edit that file.

gksudo gedit /etc/rc.local

and note that sudo is not needed when inserting commands in this file, i.e. only add:

modprobe -r apple_gmux
modprobe apple_gmux


Click package validator is missing from Ubuntu SDK!

If you are running Ubuntu 14.04 LTS, you will need to ensure that you have the Ubuntu SDK PPA installed on your system. If you do not have the PPA, you can install it by running the following command in the terminal,
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update && sudo apt-get dist-upgrade

When you open your project in Qtcreator and navigate to the publish tab, you should see something like,

You can either choose to create a new click package which will automatically check the validity of the click package. You could also validate any other click packages you might have in your system by pressing the validate click package button which should show a file picker dialog where you can choose your click package.


I see you're using e1000 module so you're using the latest driver.

Maybe you're hit by a weird issue i face from time to time: if I plug a gigabit network card on a 10 Mb ethernet port (hub, modem...), the card connects/disconnects all the time.

Do you have a 10/100 switch around there? A good try could be connect your computer to the switch and your dsl model to the switch, and see if you have that problem. Of course, get another cable to try it too ;-)


I want to remove ubuntu 11.10 and try kubuntu 11.04 but I can't get my Kubuntu live disc to work

There is no need to remove Ubuntu before you install Kubuntu; Its installer will offer you to use the old Ubuntu partition on the hard drive.

If you want to check which hard drive and partition this is, in Ubuntu, go to System → Administration → Disk Utility. Find your hard disk and parition and look for the "device" field. The openSUSE installer will let you install there, and wipe out all of the data that was there before. It will also install a new boot-loader and detect all of the operating systems on your computer.

or try

You can install on top of the Ubuntu installation without any preparation. Simply insert the disk, boot it, and when asked to partition, select "Replace existing Linux installations" or similar. It works like a charm


Show recent modified/created files using Terminal

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

find ${1} -type f | xargs stat --format '%Y :%y %n' 2>/dev/null | sort -nr | cut -d: -f2-

See Find command

Source:Linux


Partition Deleted Switching from Win8 to Ubuntu

Yeah like Rmano said, you replaced the partition that held Windows 8 with Ubuntu. Unless you have a backup, that is all gone.


Octave 3.8.1 on Ubuntu 14.04: command line does not show text

It was a matter of permissions. I changed them and the problem is solved.
Nevertheless, I am not sure what I exactly did. I changed the permissions for /home/.config/octave directory.


How to remove Ubuntu 12.10 from dual boot with Win 7?

Boot into windows. Remove the ubuntu bootloader from inside windows by reinstalling bcd  - easybcd or visualbcd is a good easy way - I'm more used to easybcd

Install easybcd (the community edition is free for personal use)

Select BCD Deployment, select your partition, and clicking on Install BCD and Write MBR. Its dead simple.

Reboot and make sure bcd loads, rather than grub. Delete the ubuntu partition with disk management and resize as you'd like it.


We have a few web servers, how should we reason regarding upgrades to new versions?

LTS are usually for business, and are usually more stable, and the server version is supported for 5 years.
https://wiki.ubuntu.com/LTS has some pretty pictures.

Cons of upgrading each release

Upgrading each release is

A pain
a small risk; new release may contain bugs that the previous one didn't, or may be less stable

Pros of upgrading each release

You get newer versions of programs though apt-get (Although that is not a problem if you install from source)

Upgrading vs Clean install

I will always prefer clean installs, but this is a personal preference, and doesn't really have a solid grounding. However saying that every time I have upgraded there always seems to be some small annoying problem that a clean install gets rid of.

I suppose a clean install will also allow you to think about what programs are actually needed, and allows you to have  a clean start, installing root kit checkers, etc

I will always use LTS releases for my servers. If I want the absolute latest program I will install from source, but then bear in mind that you will have to update these manually.

LTS may not get the latest and greatest, but will be pretty solid and stable, and will get security updates.

As you would like to benefit of the major version upgrades of MySQL / Apache / PHP I would install these from source.

But again this is all personal preference based on nothing more than a couple of years experience

  How do enterprises usually do?

I would assume they all use LTS as that is who it is designed for!

Final thought

If you do decide to upgrade each release, I would have a 'test' server that I would upgrade first, run for at least a couple of weeks to make sure there are no problems, before upgrading the whole lot.


Can I resize an F2FS partition? Ubuntu 17.04

From your original three partition setup, you simply needed to first expand the partition sda2 to the 452083711 sector, then expand the filesystem.  Adding another partition in the free space will not work, the filesystem has no room to expand.  Now gparted will allow increasing the size of a running filesystem at the end, but not sure if f2fs will work (ext? definietly will).  So use gparted to expand the partition, then run your resize.f2fs like you did.

In gparted, I think you can just drag the right end of the partition into the unallocated space.  The start of the new, bigger partition is the same as the current sda2 start, 2099200, and the end will be the end of what sda4 was, 452083711.  With that start,end, you can run a command line tool like fdisk , (assuming you have already deleted sda4), and edit the end of sda2.  I think it would be OK to delete the old sda2 (note type too), then make a new sda2 with the new numbers.  As long as the start of the partition does not change, the filesystem will be recognized.  Now with a larger partition, you can expand the filesystem, which may have to be done offline for f2fs (ext4 could be left online).

I don't see resize.f2fs in the Ubuntu 16.04 f2fs-tools package,nor any other package. If the documented syntax does not work, you might try the resize with the filesystem unmounted, or worst case, backup, then remake the filesystem full size, then restore.

mkfs.f2fs /dev/sda2 449984511


Try inserting a sleep between wmctrl and xdotool like this:

wmctrl -a " Google Chrome" && sleep 0.5s && xdotool key Ctrl+2

You can play with increasing/decreasing the sleep value if needed.

You could also make your command a little more specific by replacing "chrome" with at least " - Google Chrome". That way, the chances of wmctrl picking the wrong window to raise to focus will be reduced. In other words, the longer the string, the less chance there is that wmctrl may raise and focus a window of some other application that just happens to have "chrome" in the title as seen by wmctrl -l or wmctrl -lx.

A route using only xdotool but still requiring sleep is this:

xdotool search --name " - Google Chrome" windowactivate %1 && sleep 0.5s && xdotool key Ctrl+2

Notes:

Re. the sleep value, I would not reduce it to the minimum that seems to work but keep it as high as convenient for the times when your system maybe using resources for other purposes.
if no units are specified for sleep, the default is seconds but I like to include s in any case.
the basis for requiring sleep when using a keyboard shortcut to run scripts/commands involving xdotool is explained in this answer.


Android x86 6.0 R3 just showing Android logo after booting up from Grub2

thanks for paying attention on my query.. actually I am still learning Ubuntu and GRUB..managed to resolve the thing by myself after changing the grub entry to this:

  menuentry "Android-x86" {
  set root='(hd0,2)'
  linux /android-6.0-r3/kernel quiet root=/dev/ram0 SRC/android-6.0-r3 acpi_sleep=s3_bios,s3_mode
  initrd /android-6.0-r3/initrd.img
  }

Now the Android is booting up just fine..


How can update all the git repositories the next time a user log in?

Save this file in your favorite directory with fileName.sh and add that path in your /etc/rc.local file at the end before exit 0. it will run in every boot or login your system.

if you save this script in your home directory this line would be like this:

 sh fileName.sh &

The script is as following:

!# /bin/bash
function gitall() {
    W=`pwd`    # just replace your directory path with pwd
    for i in $(find . -name .git)
    do
        D=$i
        D=${D%/*}
        cd $W/$D
        pwd
        git pull
    done
    cd $W # ensure we end up on the starting wd
}
gitall

source:
http://blog.sdbarker.com/pro-tip-recursively-updating-all-git-repositories-in-a-directory/ and https://gist.github.com/gfestari/6424835


Just to answer this to help others.

Turned out i had a copy-paste error in the mPanel firewall rules on Syd. that were causing the issue.


Anyone else having trouble accessing dynamic windows partitions from Ubuntu?

I found the answer using my interpretation from the Ubuntu Man pages.

First install ldmtool:

sudo apt-get install ldmtool

Now I just run a few commands on boot and bam! I have access to any windows dynamic disk.

sudo ldmtool scan
sudo ldmtool create all

I created a little script I run every time I log in called mount.sh

If someone knows how to not require the input of the sudo password, and add the script as a startup application, that would be a great help.


Webpages coming broken, not loading properly in 12.04

I solved this problem by changing DNS. I switched to Google DNS.


There are a few reasons for a JAVA and WINE not being available by default in Ubuntu CD. First, for java, there is always an option for users to choose between OpenJDK and Sun's JDK.
A difference is presented in the following website:
https://stackoverflow.com/questions/1977238/why-should-i-use-the-oracle-jdk-over-the-openjdk-or-vice-versa

Regarding WINE, Wine is particularly for those willing to run windows program on their ubuntu flavors. While many use it for games, others are just happy with the fact that ubuntu is the only OS booting their machine and might never use WINE. Alot of alternative applications like GIMP, Audacity, OpenShot, would happily replace Adobe Photoshop and other popular applications in windows.

Next, there is a stuff called AptOnCD available in following link:
http://aptoncd.sourceforge.net/
once you have the software, you can easily create a backup of your current installations and use it for future. You can use the following link of a How-to on aptonCD:
http://www.howtogeek.com/110034/how-to-back-up-restore-your-installed-ubuntu-packages-with-aptoncd/

I would suggest you go for Ubuntu Studio: http://en.wikipedia.org/wiki/Ubuntu_Studio#Software_included

which comes with a lots of softwares regarding audio, video and other stuffs.
You can download it from its official website: http://ubuntustudio.org/

However, the stuffs packed in nearly 700 Mib of our lovely Ubuntu CD doesn't need any dependency on JAVA and WINE for their installation.

Hope this helps.
Regards, WinuxUser


How to avoid re-plug audio jack on startup?

The answer to this question has provided me the clue.  I've run hdajackrepack utility first as root and it seems to have created files with wrong permissions, instead of using sudo hdajackrepack.

Instead of uninstalling PulseAudio and Alsa, I've reinstalled the whole operating system as it is simpler.  As I have separated / and /home partitions, I keep all my settings and personal data after a reinstallation.

Then I've run sudo hdajackrepack and have installed the retasking of the headphone output to line (front).

Restarted the system and now I can hear the sound through the loudspeakers. :-)


unable to load shared object wrong ELF class: ELFCLASS32

I'm not sure where you got functions.so from, but the problem is that it is a 32-bit library, and you are trying to load it into a 64-bit process. You need a 64-bit version of the library, or presumably the 32-bit version of R.


Cron job doesn't read into the shell script function

Your function declaration syntax is wrong. You should use:

do_the_scan() {
    # Load text file lines into a bash array.
    echo "I'm in the function!" >> $output
}

…unless the script is run in Bash since function is a bashism.

This is a demonstration of the error in an interactive shell:

> sh
$ function bar() {
sh: 1: Syntax error: "(" unexpected
$

Anyway, you should capture the error output of your script using a standard error output redirection (e.g. 2> err.log). Put it directly on the command’s line in the crontab, so it can capture the errors produced by the interpreter of the script.

See also

https://www.shellscript.sh/functions.html
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-8.html
https://unix.stackexchange.com/questions/207/where-are-cron-errors-logged


How to delete all files except one named file from a specific folder

I've come with this easy simple great command:

rm !(a.txt)

you can use ! as a negation

Test the glob with echo first i.e.

echo !(a.txt)

If it doesn't work,  for bash you may need to enable this with

shopt -s extglob

If you wanted to keep both a.txt and b.txt, you can use !(a.txt|b.txt) or !([ab].txt).

Edit:

to make rm working recursively just add -r like

rm -r !(a.txt)

and also, it is working with folder. just need to change the name to the dir name, such as for a_dir

rm -r !(a_dir)


No, there are no Pashto language packs in the supported Ubuntu versions. The reason is that there are too few Pashto translations available to motivate the creation of language packs. A threshold is applied, and at least 5% of the translatable strings need to be translated.
You may want to join this team and help improving the Pashto translation coverage in Ubuntu.


How do I configure a displaylink USB monitor?

This may help you get it going.

Displaylink Doublesight DS-90U monitor working

1) Install dependencies required to build displaylink X server...

apt-get install xinit xserver-xorg xserver-xorg-dev xfonts-base libusb-dev xorg-dev git-core build-essential

2) Downloaded and fixed source for xserver-xorg-video-displaylink from Launchpad and extract the source code.

tar xvfz xserver-xorg-video-displaylink_0.3.orig.tar.gz
cd xf86-video-displaylink

Edit src/displaylink.c

#graphical
gedit src/displaylink.c

#command line
nano src/displaylink.c

comment (add a # to the front) out the following lines...

//#include "xf86Resources.h"
//#include "xf86RAC.h"
//      pScrn->racMemFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT;
//      pScrn->racIoFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT;
//      xf86CrtcScreenInit (pScreen);`

3) build and install

./configure && make && make install
sudo cp  /usr/local/lib/xorg/modules/drivers/displaylink_drv.so /usr/lib/xorg/modules/drivers/

4) create /etc/X11/xorg.conf

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen         0  "DisplayLinkScreen" 0 0
EndSection
Section "Device"
    Identifier  "DisplayLinkDevice"
    Driver      "displaylink"
    Option      "fbdev" "/dev/fb0"
EndSection
Section "Monitor"
    Identifier  "DisplayLinkMonitor"
    # DS-90U is 1024x600 9-inch monitor - remove or change the DisplaySize for other devices
    DisplaySize  190 115
EndSection
Section "Screen"
    Identifier  "DisplayLinkScreen"
    Device      "DisplayLinkDevice"
    Monitor     "DisplayLinkMonitor"
EndSection

5) Plug in the Displaylink monitor into a USB port (screen should go green)

6) Reboot or restart X

source

instructions


MPV plays no audio when watching a video

Please forgive me for reverting to basics, but this is what often happens to cause an audio failure.

Shift+LeftClick shows all available sound tracks for a file in mpv. Make sure the sound track you need is selected.

LeftClick by itself toggles mute off and on; make sure it's off.

The mouse wheel dials volume up and down; please dial it up.

Here's a list of those controls and more.

Also, please try videos you know which do have sound tracks, as verified with another app.


Including a custom ACPI DSDT with (K)Ubuntu 18.04 (RC1)

There ended up being a different way to accomplish the same thing.

Extract the CPIO file: cpio --extract < ./acpi_override
Copy the result to /boot: cp kernel/firmware/acpi/dsdt.aml /boot/fixed_dsdt.aml
Create or update /boot/grub/custom.cfg to contain

acpi /fixed_dsdt.aml

Since /boot/grub/custom.cfg isn't managed by apt, this should persist.

Note: If you're not confident you've got the right DSDT, you could end up in a reboot loop. You could instead manually edit the grub.cfg and add the acpi /fixed_dsdt.aml line inside of a boot entry. That way if grub tries to process it and fails, it will do so only after selecting the boot entry (not before showing the menu). Once you are confident that it all works, you can move your edits to custom.cfg.


Intel wireless driver issue - Ubuntu 14.04

Intel 8265 is only supported on Ubuntu 16.10 and above (link).

I was in the exact same boat as yours. I needed to run a collaborator's codes that requires an older version of Ubuntu. If you have a strict constraint on the Ubuntu version, one way around this problem is to buy a USB wireless adapter and plug it in. Make sure that the wireless adapter is supported for the version of Ubuntu that you want to use before buying. Some adapters (such as those from Panda Wireless) are plug-and-play on Ubuntu, which can save you a lot of time. Panda PAU05 from Amazon works perfectly on Ubuntu 14.04 on my new laptop. From the reviews, PAU06 should also work.


Fix touchpad issue/Update touchpad drivers in HP PC Ubuntu 20.04

Try to update the ubuntu along with updating the mousepad driver. Because some times there will error in loading the files.


I have lost or forgotten my authentication password to my ubunutu 12.04 installed PC

If you only need to recover your files you can download Ubuntu and make a bootable Flash Drive. Warning, this may damage your computer but that's very rare!!!

Connect your Flash Drive and restart your computer then press F2 or DEL (Delete) (based on your computer) very quickly to open the BIOS menu.

Then select the BOOT tab.

Move your Flash Drive (Removable Device or some other name associated with your Flash Drive) by pressing + or other key which you can find by reading the right side or down.

Then save settings and exit by pressing F10.

After restarting you might need to set your language. After setting your language click the Try Ubuntu Without Installing. This may take a while to boot, just relax until you see the desktop.

Then create a new folder in the Flash Drive and just copy your files to the Flash Drive (use another one if the first one is full)
Once you copy all your files your going to need to restart your computer and press Install Ubuntu

Then enter your location data and everything else. After everything is installed and you got to your desktop restart your computer and unplug the Flash Drive(s).
Make sure to change your Boot device priority to your Hard Drive (HDD)!!!

If you need full information on how to do these things you can check out these: (sorry but I can only upload two links so I uploaded all the links to Pastebin)
http://pastebin.com/p3bDAKKK


I know this video card is old but I have resolved several older Nvidia card issues using the latest Nvidia drivers.

To install the latest drivers (assuming you have alread installed the proprietary drivers from the Additional Drivers app, do the following:

In the terminal type: sudo apt-add-repository ppa:ubuntu-x-swat/x-updates

Then update your repositories by typing in the terminal this: sudo apt-get update.

Afterwards go to your Update Manager. An updated version of the Nvidia card will appear. Install it and reboot the PC.

If you have not yet installed the proprietary drivers then open your dash and type "Drivers". The Additional Drivers icon app should appear. Install the Nvidia recommended driver from the list and reboot.

From my experience this has solved a Geforce FX 5600 problem I had, a Geforce 6200 problem and another Geforce 6400.


In the upper right corner click on the Network symbol and open Edit Connections...

There choose the Wireless network you don't want to connect to and click Edit

In there you should open the General

Uncheck the first box like this:

Repeat that for the other Wireles-Networks and leave the Wireless-Network you want to automatically connect to checked. (like in Picture 3)


How to change bluetooth timeout settings for bluetooth mouse

You should be able to control this through the IdleTimeout setting in /etc/bluetooth/input.conf. It looks like this:
# Configuration file for the input service

# This section contains options which are not specific to any
# particular interface
[General]

# Set idle timeout (in minutes) before the connection will
# be disconnect (defaults to 0 for no timeout)
#IdleTimeout=30

...

Remove the # and set the timeout to something like 5. If you set it to zero, be ready to charge batteries on a much more regular basis. From there you can sign out and back in again to begin using the setting.


netplan is attempting to restart NetworkManager when renderer is networkd

Had the same problem, realised that apparently it's not enough to simply edit the yaml-file, you also have to run:
sudo netplan generate && sudo netplan try

Hopefully that'll work for you as well!


How do I enable Emacs keybindings in apps, such as Google Chrome?

If you're using gtk3 the settings are in the libgtk-3-common package in /usr/share/themes/Emacs/gtk-3.0/gtk-keys.css and you can enable them with:

gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"

And to switch back:

gsettings set org.gnome.desktop.interface gtk-key-theme "Default"

If you're using gtk2 the settings are in the libgtk2.0-common package in  /usr/share/themes/Emacs/gtk-2.0-key/gtkrc and you can enable them with:

gconftool-2 --type=string --set /desktop/gnome/interface/gtk_key_theme Emacs

And if you want to customize the keybindings you can copy the settings into ~/.themes/ with cp -r /usr/share/themes/Emacs ~/.themes/

ps. so does this mean you've managed to win the battle against Unity to steal all your modify keys back for Emacs to use?! :)


Two different ways of starting a service. Why?

Whatever goes into /etc/init.d is a script that starts a service  and may define appropriate level where the script runs - single user mod, multiuser, shutdown; it's not the service itself.

Whatever goes into /usr/bin is the actual server, it is the executable file.

The analogy from windows world would be .exe files vs scheduled services that call those .exe files


Opening files from networks with Libre office

I'm going to hazard a guess here... you're using an SMB share and when you click on a file in Dolphin, LibreOffice throws an error like "You can only select local files" or something similar.

There is a workaround. You need to comment out a line in all of the /usr/share/applications/libreoffice-*.desktop files. Open each file in an editor and type a pound sign (#) at the beginning of this line (to comment it out):

X-KDE-Protocols=file,http,smb,ftp,webdav

You'll need to do this as root, since root owns these files.

This workaround was reported in LibreOffice bug 67527.


How do I get the Touchpad Settings working on a Dell XPS 13" Ultrabook?

it looks like ubuntu is still fixing this
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/978807


Here is an instruction (kept as easy as possible) on how to install Ubuntu properly ...

Boot from Ubuntu installation media and highlight Try Ubuntu without installing.
On the live desktop press the Windows key and type GParted into the search field.

Open GParted and reduce the Windows partition if there is no unallocated space.
Create two new partitions and format one with ext4 - the other with linux-swap.

Now start the Ubuntu installer from the desktop and choose Something else.
Select the ext4 partition you have created before and choose / as mount point.

Select the same disk (e.g. /dev/sda) on which Windows is installed to install the bootloader
(without a partition number) ... otherwise you won't be able to start into GRUB bootloader ...

Note: In case you have a computer with UEFI:
Boot into BIOS and select Ubuntu to be the default operating system to boot.

Regarding the superuser topic ... read the comment from @ByteCommander :

  Sometimes the installer does not correctly detect other already installed systems, but this has nothing to do with the installation wizard running as superuser (root). This is necessary, because otherwise it could not access the disk with enough privileges to e.g. repartition, format or write to the boot sector. [...] - ByteCommander (link to comment)


Missing dependency packages while installing Viber

For some reason, as @fkraiem describes within the comments, the package libssl1.0.0 is missing in the Ubuntu 19.04's repository. Probably this should be reported as bug to Ubuntu's team. Fortunately, the good news is: you can download and install this package from 18.10's repository.

Go to the download page and click on the link security.ubuntu.com/ubuntu (located on the middle of the page), then an installation dialogue will be started. After that you can install Viber.

All together from the CLI:

sudo apt update

# download and install the dependencies
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu6.2_amd64.deb
sudo apt install ./libssl1.0.0_1.0.2n-1ubuntu6.2_amd64.deb

# download and install Viber
wget http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb
sudo apt install ./viber.deb

# just in case
sudo apt install --fix-broken

The original answer, that is proofed for Ubuntu 16.04 - 18.04:

The the last few times when I was installing Viber, I needed to install some dependencies manually by the option --fix-broken packages of apt... I just tried to install Viber on fresh Ubuntu 18.04 and encountered an error, but it is different from yours. The mentioned approach solved the problem again. Here it is:

sudo apt update
wget http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb
sudo dpkg -i viber.deb
sudo apt install -f


If I mount the ISO where is the kernel initrd for the OS installer

Have a look at the casper directory for the initrd.lz file, in your case

cd /media/iso/casper

should bring you to the correct directory.

You can find a file, if you know part of its name by (for example)

find . -iname "*initrd*"

or if it is in a directory with only 'sudo' permissions

sudo find . -iname "*initrd*"

when you have changed directory to the mountpoint.


Trying to install ubuntu. But my pc wont boot up. Whats wrong?

I have run into this problem before. I think you need to modify your BIOS.

Have a working live USB. If you don't know how to do this, check out the website Karel referred you to, it has links.
Once you have done that, restart the computer with to USB inside. As soon as you restart the computer, start clicking escape.
A menu will pop up- select BIOS.
Go to System Configurations.
Go to Boot Options
Put Internal USB CD/DVD on top.
Put USB CD/DVD from the second to the top.

Note: to change the positioning of your menus, highlight your target; then press f5 to go down, and f6 to make it go up.

When your done making changes, press f10. Save your changes. Your computer will reboot, and start booting the live USB.


Problems with Dual-Boot OS order and GRUB menu [RESOLVED]

Okay, so I tried a bunch of things and this is what worked for me:
I went into the UEFI Firmware settings and put Ubuntu above Windows. Now, instead of pressing esc to go back and then f10 to save, I pressed f10 twice. This saved all the settings and I now get the GRUB menu.


What to do with a terminal launch script

You can use Tilix, which offers a lot of configuration flexibility. First create a profile with two tabs (or split terminals) then save it as, say,  "myDefault".

Then add an alias to your ~/.bashrc

alias myterm="tilix -p myDefault"

then use myterm to launch it.

Hope this helps!


not enough space on /boot for upgrade, even after purging old kernels and clearing files

Have a look here for a good strategy on how to make system backups.  (I use http://CloneZilla.org)
Boot an Ubuntu LiveDVD and use the "try Ubuntu" option and then start gparted from the dash. (Or just boot a gparted LiveCD ).
You will see something like this:

The light yellow colour means "occupied" and the white means "free".  Click and drag one of the more empty partitions and make it smaller ("shrink") then "grow" your boot partition to 1GB.
Click the green check-mark icon (apply) and go to sleep.  In the morning everything should be ready.