How to find all dependent (dependency walker) packages before installing a .deb file?

You can have a look packages.ubuntu.com. The apt-get install linux-{headers,image}-generic command installs two packages:

linux-headers-generic
linux-image-generic

1. linux-headers-generic
depends on linux-headers-3.11.0-18-generic, which depends on:

libc6, which depends on libgcc1
linux-headers-3.11.0-18, which depends on coreutils

2. linux-image-generic
depends on:

linux-firmware
linux-image-3.11.0-18-generic
linux-image-extra-3.11.0-18-generic

2.2. linux-image-3.11.0-18-generic
depends on:

dpkg
initramfs-tools
module-init-tools

2.3. linux-image-extra-3.11.0-18-generic
depends on:

crda or wireless-crda
linux-image-3.11.0-18-generic

And there you have found how the kernel .deb file is depending upon wireless-crda.


Size of icons on Ubuntu 12.04 with GNOME 3

In case anyone errs here as I did in search of a clue to tune down (or up, as it also happens) the size of the icons in the applications grid, here is a hint:

https://askubuntu.com/a/450749/271033

As mentioned by Maksim, the changes in the gnome-shell.css file affect the size and padding of the container, but the size of the icons must be changed separately in the /usr/share/gnome-shell/js/ui/iconGrid.js file. Or at least this is what worked for me.


How do you change Window Control Position in the Unity Panel?

Can you file a bug for this over at https://bugs.launchpad.net/unity


Just insert Live-CD or Live-Usb and install new one. When the install manager asks you what to do choose Replace  option.It will automatically remove your current system and install a new one.

You can also choose Do something else option to manage partitions.


Ubuntu Server 14.04 LTS includes unknown SFTP server

SFTP is not FTP
It stands for SSH File Transter Protocol
Server users often remotely connect to the server using Secure Shell (SSH), also known as OpenSSH. Open SSH is part of the default Ubuntu server installation. SFTP is an extension of the Secure Shell protocol (SSH) version 2.0 to provide secure file transfer capabilities.
You can remove the openSSH server from your Ubuntu server, but then you will lose the ability to log into your server remotely using SSH protocol. If you are sure that you will never remotely connect to the server, and want to do this use the command:
sudo apt-get remove openssh-server

Alternately you may disable SSHD to auto-start when your server starts up. See How do I disable SSHD from starting automatically?. Thanks to David Foerster for the link.
You may also want to learn about How to harden an SSH server? so that it is not easy for a hacker to gain access to your server remotely.
Hope this helps


Goto Preferences > Default applications for LXDE > Autostart and disable Abiword. Also regarding lubuntu-desktop, from `Synaptic:

  This metapackage package depends on all components of Lubuntu Desktop
  system.

  It is also used to help ensure proper upgrades, but it can be safely
  removed if you want to remove some applications installed by default.

As it is just a meta package, so, removing it will not harm your environment at all. If you are still worried about the meta packages, then goto Ubuntu:

  One of the handy features of apt (the packaging system used by Ubuntu) is the use of metapackages. These packages do not contain actual software, they simply depend on other packages to be installed. This setup allows entire sets of software to be installed by selecting only the appropriate metapackage. For example, an Ubuntu user can install the Kubuntu environment (KDE and all its associated programs) by selecting "kubuntu-desktop."

In there, it says that meta packages do not contain actual software. And in this list it says lubuntu-desktop is a meta package.

So, do not worry, go ahead and remove it.


Lubuntu is a free, Linux-based operating system that supports a wide
  range of computers and hardware. It’s fast, safe and secure (Linux
  doesn’t require virus software, for example) it’s also really easy to
  use, and there are thousands of applications available for it.

Check this excellent article on OMG Ubuntu.

I'm suggesting Lubuntu simply because your system is pretty old (Pentium 4) and you'll have a better user experience with Lubuntu than Ubuntu (Unity).


This is the full error message and you gave us only two lines (bold in the message below)

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  avg2012lms*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 157 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 515099 files and directories currently installed.)
Removing avg2012lms (2012.1795) ...
Failed to stop avgd.service: Unit avgd.service not loaded.
invoke-rc.d: initscript avgd, action "stop" failed.
dpkg: error processing package avg2012lms (--purge):
 subprocess installed pre-removal script returned error exit status 5
Errors were encountered while processing:
 avg2012lms
E: Sub-process /usr/bin/dpkg returned an error code (1)

A similar error might see when you install the package. In other words, the whole thing was not running.

Therefore

Open the file /var/lib/dpkg/info/avg2012lms.prerm

sudo nano /var/lib/dpkg/info/avg2012lms.prerm

and replace this

case "$1" in

    remove|deconfigure|upgrade)

       if which invoke-rc.d >/dev/null 2>&1; then
           invoke-rc.d avgd stop
       else
           /etc/init.d/avgd stop
       fi

with this

case "$1" in

    remove|deconfigure|upgrade)

#       if which invoke-rc.d >/dev/null 2>&1; then
#           invoke-rc.d avgd stop
#       else
#           /etc/init.d/avgd stop
#       fi

and now again

sudo apt-get remove --purge avg2012lms
sudo apt-get install --reinstall ubuntu-desktop

Finally you should search running avgd processes and kill them.


How to get the default desktop environment while using RDP

If you have performed a manual xrdp installation and no post configuration actions, this would be an expected situation.  To get the same look'n feel as your Ubuntu GNome Desktop with dock, you would need to perform some additional actions.
Option 1 - Manual Option
Try to create and populate the file ~/.xsessionrc with the following content
export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg

Please note that the .xsessionrc file is a hidden file (located in your home directory)
This would be for a single user. If multiple users need to perform remote connection, each user would need to have this file created in their profile
Option 2 - Automated install
You can also use the xrdp-installer script that basically perform the installation of the software and perform some post configuration actions that would provide you the same look'n feel when remotely connected as the one you have when connected to local console
the script and how to use it can be found here
Hope this help
Till next time
See ya


GRUB does not load, only shows a blinking cursor

Use your usb to reinstall. You are not going to salvage the interrupted installation.


As was said comments, we can remove MongoDB with the following command:

sudo apt-get purge mongodb-enterprise*

Then for most of the use-cases you can use Remmina from main pocket of repositories.

So you have to remove the PPA with

sudo apt-get update
sudo apt-get install ppa-purge
sudo ppa-purge ppa:remmina-ppa-team/remmina-next

and install Remmina from ordinary main repository:

sudo apt-get install remmina remmina-plugin-rdp remmina-plugin-secret remmina-plugin-spice


Install SIS Graphics Driver to be used as a dual monitor

I've stuggled with SIS graphics cards on Ubuntu, so I know your pain.  Arch Linux has got SOME support for SIS graphics card users, depending on what SIS chipset you are using.  You may not want to use Arch Linux, but the information here may be helpful as it has got some information on setting up the x.org config file for dual head display. https://wiki.archlinux.org/index.php/xf86-video-sis


Does gparted list the device?
If so and recovering the data is unimportant to you, or you fail doing so, you can format the drive to a suitable standard. For Unixoid systems as e.g. android this could be ext2/3 or a a universal standard NTFS or FAT 32. In the last case you should select yout format depending on the data you plan to save on the sd-card:
In case you don't intend to save files bigger than 4GB or the sd-card by itslef is limited to a memory of under 4GB you can select the simple FAT32, otherwise you should select NTFS. Ubuntu can handle both formats while windows will not recognize ext-filesystems.


Disabling the assistive technology may do the trick :

sh
sudo sed -i "s/^assistive_technologies=/#&/" \
/etc/java-11-openjdk/accessibility.properties

Remark : use the right property file for your config, here it is for openjdk v11.


How to find and back up only files not part of a package

Cannot understand why you want to backup such files, but you can have such a list with a command like this:

#!/bin/bash
export LC_COLLATE=C
join -v1 <(find / -mount | sort) <(cat /var/lib/dpkg/info/*.list | sort -u)


How to specify the current kernel's header in the debian/control file?

Well, this is not a complete solution. It does not cover if the user want keep an older kernel.
Instead of headers only
Depends: ${misc:Depends}, build-essential, linux-headers-generic | linux-headers-generic-pae | linux-headers-lowlatency | linux-headers-lowlatency-pae

Put kernel & headers as requirement
Depends: ${misc:Depends}, build-essential, linux-generic | linux-generic-pae | linux-lowlatency | linux-lowlatency-pae

So this way:

If the kernel is last version, it will install its headers.
If the kernel is old version, it will install both the last version kernel with its headers.


How to fix your problem:

Open up the program named "terminal" on Ubuntu, and type this:

sudo apt-get install friends-app -y

This will install the friends-app, and it will come back.

~Regards


Folder Permissions for new partition - can't move files

In addition to Mina's answer, it would seem you don't have 'ownership' of the area. To solve this we'll use ´chown´ (change owner) and ´chgrp´ (change Group)

Type ´sudo chown /media/ian/Media ian' this makes you the owner, rather than it being 'owned' by the ´root´ account.
Type ´sudo chgrp /media/ian/Media $x´ where $x is tour group name. (It's likely just ian. If it's not, you probably already know what it is.) If you are unsure of your group name type ´ls -l ~´ and your group name will be the second 'name' column, next to 'ian'.

Note: In Linux Mint 17(and probably in Ubuntu 14.04) the owner-name and the group-name comes first i.e.

sudo chown ian /media/ian/Media

&

sudo chgrp $x /media/ian/Media


How can I pgrep a bash script without detecting the pgrep itself?

Since pgrep uses an Extended Regular Expression, you could use a regexp that doesn't match itself, e.g.
pgrep '[m]y_php_program.php'

Read man pgrep.


How can I prevent an antivirus software form uninstalling wine applications?

On ubuntu, av software is usually not all that necessary so long as you don't install programs all that often outside of the official repos and use a sandboxed browser such as chrome. If you desperately need to remove a virus, or want something on hand, really just use something like malwarebytes boot disk or something, otherwise it is mostly unnecessary to run it and will mainly just cause errors and system lag.


How to keep Secure boot when dual booting ubuntu 16.04 with windows 10?

I think I fixed my problem. The initial problem was that I unintentionally installed my ubuntu in Legacy mode. I uninstalled ubuntu OS and started from scratch by making another bootable USB via Rufus. When I booted this said USB into live mode, I found out that the pc was booting it in legacy mode despite my bios being set to UEFI.

What worked for me was to make a bootable USB via disk part in the windows command line and mounting the ISO then copying the contents into the USB. This booted into UEFI mode. I then proceeded to manual install ubuntu. I chose the windows EFI partition as the device where I place ubuntu bootloader. After that, I had to force grub to show by means of bcdedit command. All was well after that.

This case is quite weird for me and I would be glad to hear from you guys why rufus did not work. I use an Acer aspire E 14 E5-475G-30KY. The firmware installed is InsydeH2O v1.01.


Here are the steps

Use xrandr to make sure that the new mode can fit within the maximum framebuffer size

xrandr | grep maximum

  2. Use gtf to create a mode line

gtf 1920 1080 60

  3. Add new mode using xrandr

xrandr --newmode "1920x1080_60" 173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync

  4. Add this newly added mode to the desired output (VGA/LVDS etc)

xrandr --addmode VGA 1920x1080_60

  5. Choose the new mode

xrandr --output VGA --mode 1920x1080_60


Can I upgrade Mailman to the latest release via apt-get?

You can use utopic's Mailman 2.1.18 package on trusty. (Source: I am using it, for precisely this reason, see Background below.)

To install it via apt-get, do the following:

First, configure the utopic repository by creating a file /etc/apt/sources.list.d/utopic.list with these contents:

deb http://archive.ubuntu.com/ubuntu utopic main restricted universe multiverse

Next, configure the system so that it does not automatically install packages from utopic (since otherwise you will upgrade to utopic the next time you run dist-upgrade). Create a file /etc/apt/preferences.d/utopic with these contents:

Package: *
Pin: release a=utopic
Pin-Priority: 100

Finally, install the mailman package, explicitly instructing apt-get to use the utopic version:

apt-get update && apt-get install mailman/utopic

Caution

Using packages from a newer release on an older release is not supported. If something goes wrong with this process you will likely be on your own bug-wise. However, I can confirm that my Mailman lists work after doing this.

Upgrading

You should remove the /etc/apt/sources.list.d/utopic.list and /etc/apt/preferences.d/utopic files before attempting any upgrade to a new version of Ubuntu from trusty.

Sources

These are based on the Ubuntu Backport instructions, substituting "utopic" for "trusty-backports"

Background

I also wanted 2.1.18, because the "ALLOW_FROM_IS_LIST = Yes" feature in 2.1.16 is list-wide. I don't want to re-write everyone as "from is list", just Yahoo users and others with a DMARC p=reject policy. 2.1.18 has a per-sender feature accessible from Privacy options → Sender filters in an individual list's admin interface.


You can try HP Linux Printing and Imaging System (HPLIP)

Just go to the software center and search hplip

The basic packages may already be installed, Make sure to scroll down and check the extras!


How to add packages to a squid-deb-proxy cache?

You could use apt-move (from the package of the same name) to create a local apt repository from the files in your laptop's apt cache. Then use rsync to keep a synced copy of this repository on your LAN. Finally, point other LAN machines to your LAN copy of the local repository at the top of sources.list, so that apt prefers the local repository over remote ones.


Ubuntu SSH client not connecting to VPS, however putty is?

Since you cannot even get the ssh client to connect, you can rule out things like password/key auth, root logins, etc. Possible reasons why you cannot connect:

Wrong port. Maybe you misread you PuTTY configuration.
Locked out of your VPS because of too many failed connection attempts (firewall rules, Fail2ban)
Port knocking daemon. Maybe your VPS firewall configuration requires you to send data to certain ports before the SSH ports opens. (not sure if PuTTY is that advanced though).
VPN required. Perhaps you could connect to your VPS because it was tunnelled through a VPN connection which was activated on Windows, but not on Ubuntu.
IP mismatch. Ensure that you are connecting to the same IP address. The IP address could change if you override it in /etc/hosts (or the Windows equivalent) or have a strange DNS server.
Outbound blocking. You have a router that is very restrictive and had to add a rule for the Windows IP address to allow for connecting/forwarding to that SSH port. On your Linux installation, you got a different IP address.


Is my network connection just extremely slow or is ubuntu not optimised for games?

No, there is no specific setting for that.
First of all, make sure you are using a wired connection and not wireless.
Try doing a speed test to see what your network connection is actually capable of. Be sure to repeat it several times at different times of the day.
Use a system monitor such as gkrellm or conky to verify that your network is not saturated by anything else while you're trying to play.
If your network connection is fine, then it is almost certainly just a matter of connection to the server you happen to play on. A server that was fine one day may be laggy the next. Even if it appears to be due to the OS, it usually is not.


Ubuntu 13.04 64 bit install with Win 7-64 - no OS found

I had similar issue which I fixed with boot-repiar:

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

I have Ubuntu Raring + Windows8 both working fine.

Good luck.


How to configure Backuppc in ubuntu 12.04?

Outline

Installation
BackupPC web user
Client Connection Preparation - Setup SSH-KEY
Configure BackupPC to backup Client's /home directory
Adding Client
Backup Schedule

1. Installation

Install via Ubuntu BackupPC package

    sudo apt-get install backuppc

This will install BackupPC and configure the following automatically

    Linux User   : backuppc (home directory /var/lib/backuppc)
                   BackupPC daemon will run as this user

    HTTP User    : backuppc (For web gui http login)
                   Password is located in /etc/backuppc/htpasswd (See Step 2)

    Config file location : /etc/backupc
    Data file location   : /var/lib/backuppc

    Apache will be configured
    Web Interface URL    : http://<hostname/IP>/backuppc

This guide is base on the above installation method and information.

If manual installation is used, in config.pl, look for following line

    set $Conf{CgiAdminUsers}     = '';

and change to

    set $Conf{CgiAdminUsers}     = 'backuppc';

2. BackupPC web user

HTTP Login/User backuppc

To have full administrative right in BackupPC web interface, one have to login as backuppc and password. (This is not the same as the linux user.)

The web interface user(http login) backuppc is created with a random password during installation. If you forget to write down the password, use htpasswd to change it as follow

    sudo htpasswd /etc/backuppc/htpasswd backuppc

Additional User

To add additional user

    sudo htpasswd /etc/backuppc/htpasswd <username>

In Step 5 Add Client, put < username > into moreUsers field. When < username > login web interface, will only see client they are assigned to.

3. Client Connection Preparation - Setup SSH-KEY

Client SSHD Configuration

To keep it simple, client machines sshd should allow root login. For each client /etc/ssh/sshd_config, make sure following options are there and un-commented

    PermitRootLogin yes
    PubkeyAuthentication yes
    AuthorizedKeysFile  %h/.ssh/authorized_keys

This should be done on all clients to speed up the next step, as scp will be used.

Server SSH KEY Creation and Deployment

On server, login as user backuppc

backuppc@server$ sudo su - backuppc

Generate SSH Key Pair with Empty Pass Phase

backuppc@server$ ssh-keygen

When asked for phasephase, leave it empty(press enter)

Enter passphrase (empty for no passphrase):
Enter same passphrase again:

That will generate 2 files in /var/lib/backuppc/.ssh: id_rsa and id_rsa.pub. You only need to generate one pair of key.
Deploy Key To Client Machine

Copy id_rsa.pub to client machine

backuppc@server$ scp /var/lib/backuppc/.ssh/id_rsa.pub sudo-user@<client machine>:/home/sudo-user/backuppc.id_ras.pub
backuppc@server$ ssh sudo-user@<client machine>

sudo-user@client$ chmod 600 backuppc.id_ras.pub
sudo-user@client$ sudo mkdir /root/.ssh
sudo-user@client$ sudo chmod 700 /root/.ssh
sudo-user@client$ sudo mv backuppc.id_ras.pub /root/.ssh/authorized_keys
sudo-user@client$ sudo chown root:root /root/.ssh/authorized_keys

Test ssh connection(On server, as Linux user backuppc)

backuppc@server$ ssh root@<client machine>

It should not ask for password.

It is important to do the test because this will also add client machine fingerprint to backuppc(linux user) .ssh/known_hosts list. Otherwise when BackupPC(the software) connect(via ssh) to client machine, it will be prompt for fingerprint confirmation, which it cannot handle, and the backup process will fail.

Repeat step 3 for all client machines.

At this point, server user backuppc should be able to ssh into all client machines as root, without being prompt for password nor fingerprint confirmation nor passphase.

4. Configure BackupPC to backup Client's /home directory

Open BackupPC web GUI
On left panel, Server section, click Edit Config
On right panel, click Xfer tab
In Xfer tab, change following, then click Save on top

XferMethod: rsync
RsyncShareName: /home

(Assume only backing up user home directories)
This will automatically apply to all clients.

5. Adding Client

Open BackupPC web GUI
On left panel, Server section, click Edit Hosts
For each machine, fill in hostname or IP address under host, and always use backuppc for user, click Add for more rows. Remember to click Save on top when finish.
Delete localhost from the list

The situation become tricky if dhcp is used for desktop machines. There are a few ways to work around this

configure dhcpd to assign static IP to them
change desktop machines to use static IPs
configure dynamic dns update

In any case, server need to be able to reach(ssh) each client machine consistently either with an IP address or a hostname.

6. Backup Schedule

Open BackupPC web GUI
On left panel, Server section, click Edit Config
On right panel, click Schedule tab
Nothing to be done, the default schedule will perform

Full Backup every 7 days (FullPeriod: 6.97 day)
Incremental Backup everyday (IncrPeriod: 0.97 day)

7. Adding Audit Interface

Adding an Audit Interface to BackupPC has instruction to add an audit only interface to BackupPC.

However the index.cgi in Ubuntu BackupPC package is compiled. /usr/share/backuppc/lib/realindex.cgi should be used to generate audit.cgi mentioned in the blog.


Ask your friend for the web address and enter it into Firefox. You can browse pictures online that way, but only if the folder your in allows you to (e.g. public website or your apple id).


Ati 5470 problem with compiz effects. After reboot blackened parts of screen(bottom and right)

Gedas answered the question himself (but in a comment):

  You just need to enable the auto detect function in compiz general menu.


On ubuntu touch device, How to launch a console app in libertine?

You'll want to install a terminal emulator in the container such as terminator or gnome-terminal, and then launch the application directly from that terminal. To install the terminal emulator:

$ libertine-container-manager --id your-container --package terminator

where your-container is the id of your container. Then just tap the "Terminal" icon in the Desktop Apps scope to start it and type the name of the command you want to run (obfsproxy).

As one of the comments mentioned, you could create a .desktop file in the container's .local/share/applications which launches the terminal app within the emulator when you tap its icon. You can find the bind-mounts and home data for your container in /home/phablet/.local/share/libertine-container/user-data/your-container (let's call this $CONTAINER_HOME). You'll want a file like $CONTAINER_HOME/.local/share/applications/obfsproxy.desktop* which might look like this:

[Desktop Entry]
Name=obfsproxy
Comment=Obfuscate the fact that your traffic is generated by OpenVPN
Exec=terminator --execute obfsproxy --log-file=obfsproxy.log --log-min-severity=info obfs2 --shared-secret=<some-random-key> socks 127.0.0.1:10194
Icon=
Type=Application
Categories=System;

Of course, you can change the command after terminator --execute to do anything.

* There may currently be a bug preventing the scope from finding applications in this directory. If your .desktop file does not show up in the results, you can move it to /home/phablet/.cache/libertine-container/your-container/rootfs/usr/share/applications/.

Note: Although there was work being done to launch Terminal apps directly through the Scope, that work is on hiatus as some redesign is being completed.


You need to mount the encrypted directory (either by logging in with the user account owning it or with ecryptfs-mount-private) and run Disk Usage on the mount point. Then you will see the file names.


Ubuntu 18.04.1 LTS keeps killing my Ethernet connection when it cannot find an Internet connection

I solved my problem by just setting the static IP address using the ifconfig command as opposed to doing it through the GUI settings. Much easier.


Rhythmbox is the default media player in Ubuntu. But just like windows media player can't play DVD natively, you have to add some extra software.  In Ubuntu make sure that you have Ubuntu Restricted Extras installed.  If not you can install by just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install ubuntu-restricted-extras

Or you can use VLC.  To download, and more info visit the Website


Try the following steps:

Go to settings.

Search for 'Reset this PC'
Reset the PC

If this doesn't work, download the Windows ISO and install windows again


Only 12.04 works on this with newer video stack, its the AMD graphics that causes this issue. None of the mainstream distros including Fedora, SUSE will install either, only distro that works perfectly is Arch based Chakra, it installs and works flawlessly after dist upgrade and Catalyst works fine on it as well.


The duplicate question explains it. I wrote an answer with Gufw in mind, and if you replace all occurrences of gufw there with gparted-pkexec, that solution works for GParted too.


You have spaces where you should need a tab (and no: 4 spaces do not equal a tab).

This will show tabs (shown as ^I) and spaces:

 cat -e -t -v {Makefile}

4th line:

1 CFLAGS=-Wall -g
2
3 clean:
4     rm -f ex1

Remove the spaces in front of rm and make it a tab.


Script doesn't work when it is run using '#!/bin/sh'

Your friend on another computer probably uses an OS which has /bin/sh linked to /bin/bash. In Ubuntu (actually, Debian and most Debian derivatives), /bin/sh is not linked to /bin/bash, but to /bin/dash, which doesn't support many bash-specific features, but is considerably faster.

On Arch Linux:

$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Sep 28 15:26 /bin/sh -> bash

On Ubuntu:

$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Feb 19  2014 /bin/sh -> dash

The right thing to do

If you use a shebang, mean it. Since your script contains bash-isms, use /bin/bash in the shebang. Or write portable, POSIX-compliant code.

You can speed up this process by using the checkbashisms program mentioned in this LWN article. It's part of the devscripts package, so install it first:

sudo apt-get install devscripts

Thus:

checkbashisms /path/to/script.sh || sed -i '1 s;/bin/sh;/bin/bash;' /path/to/script.sh

You can convert this to a script (say convert.sh):

#! /bin/sh

for i
do
    checkbashisms "$i"
    if [ $? = "1" ]
    then
        sed -i '1 s;/bin/sh;/bin/bash;' "$i"
    fi
done

The specific return code of 1 means that checkbashisms found a possible bashism, and other return values indicate other problems (file not readable, missing shebang, etc.), so we can check for that particular return value.

And then call it with:

./convert.sh /path/to/first/script.sh /path/to/second/script.sh
# or
./convert.sh *.sh
# or
find . -iname '*.sh' -exec ./convert.sh {} +

The wrong thing to do

Replace /bin/sh with a symbolic link to /bin/bash.

Recommended reading:

Bashism - compares bash and dash syntax and shows changes needed.
Dash as /bin/sh - similar.


JAVA is causing this, there's a quick workaround just launch Libbre Office itself "not" the Writer with any app launcher that you're using click Tools --> Options --> Advanced and remove the tick to use Java Runtime


Which ATI driver should I use for a Radeon Xpress 200M?

Uri Herrera's answers are correct.

Note that some Xpress 200M have weird oddball bugs and glitches, that are only solved by adjusting the AGP values in BIOS.  But sounds like -ati is working fine so no worries.


Tried every solution but my monitor resolution is still stuck at 640x480

I've had a very similar problem and I got it working reliably by following these steps. Give it a try!


sh calls the program sh as interpreter and the -c flag means execute the following command as interpreted by this program.
In Ubuntu, sh is usually symlinked to /bin/dash, meaning that if you execute a command with sh -c the dash shell will be used to execute the command instead of bash. The shell called with sh depends on the symlink - you can find out with readlink -e $(which sh). You should use sh -c when you want to execute a command specifically with that shell instead of bash.
You can use this syntax (the -c flag) with other interpreters too. One classic use of it (pointed out by @edwinksl is to get around the problem of redirection not working with sudo (here you could use bash -c or sh -c)
sudo sh -c 'echo "foo" > /home/bar'

will write the file bar containing the text foo to /home/, while sudo echo "foo" > /home/bar fails as explained very well here
It's important to use 'single quotes' around the command string, otherwise the current shell will try to expand it before it's passed to the interpreter you called. For example with python:
$ python3 -c print (35/7)
bash: syntax error near unexpected token `('
$ python3 -c 'print (35/7)'
5.0


What alternatives to MS Access exist for database management on the Ubuntu platform (LibreOffice Base isn't cutting it)

I used MS Access a lot when working. Since retiring I looked for something like Access but did not find anything. Just for info what I have done.

So I decided to learn python. But the learning curve seems pretty steep, maybe oldfred is not so young anymore. But it did not become just learning python, but learning a python editor - geany, learning first gtk and its editor and then I switched to qt4 and its editor-qt4 designer and a separate sql editor -sqliteman to create or test sql code. I am using sqlite, but the connector code is just a little different.

So MS Access is an integrated enviroment and works together. Just about everything else is not. You have to choose a language, a database, a gui, and a sql editor. And there is no report writer, but you can manually create pdf or HTML code for reports. I just export csv files and import to a spreadsheet as that is an easier way to create sub-totals and grand totals.

If a hobby like I am you can experiment, but if this is a business I cannot really recommend trying to roll your own MS Access.

The navicat suggestion looks interesting, but have not tried that. If I was still working I might spend the money to try it. Maybe someone has more info?


How can I convert videos for my Sansa Fuze?


RAID 5 reassemble stating wrong homehost?

As a safety feature the kernel will only allow automatic assembly of arrays it is part of the same host. This is checked by the metadata field 'homehost' on the array. If it does not match the current hostname, it will refuse to start.

To force the array to start on your new system, you have two options:

Update the homehost metadata on the array to match your new hostname.

Use the --update=homehost option for mdadm on assembling to update the field with the current hostname on each drive.
Tell mdadm to use the hostname of the old system when scanning for arrays.

Use the option --hostname=myhostname when working with mdadm.

or, specify an HOMEHOST=myhostname entry in /etc/mdadm/mdadm.conf.


Chrome browser taking up abnormal CPU on Macbook Pro

The issue was from Chrome.

I solved the issue by disabling hardware acceleration in Chrome. No negative side-effects have been noticeable.

In Chrome, click the 3 dots at the top-right corner.
Select "Settings"
At the bottom, click "Show Advanced Settings"
Scroll to the "system" section
Uncheck "use hardware acceleration when available."
Restart all Chrome windows.


Your best bet would be to file a bug against the langpack-locales package: https://launchpad.net/ubuntu/+source/langpack-locales/+filebug


How do I automatically remap buttons on my mouse at startup?

I have a Logitech mouse with 9 buttons, and pressing the "middle button" (#2) involves clicking the scroll wheel. I dislike this because I'm clumsy and typically end up scrolling the window I'm in when I try to click the wheel. So I wanted to automatically remap the top side button (#9 in this case) to the middle button (#2). I also wanted to map the bottom side button (#8) so that it executes a double-click of the left button (#1).
Though my aims were specific, the solutions below can be generalized to any situation in which you want to automatically remap mouse buttons at startup.
Mapping Mouse Buttons to Other Mouse Buttons
You will need xinput installed for this task. This can be done entirely in your .xsessionrc file. First, use xinput to discover the name that is assigned to your mouse, which is then correlated to an input device ID. Below is some sample output from my laptop:
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer            id=4    [slave  pointer  (2)]
⎜   ↳ Logitech USB Laser Mouse              id=11   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard           id=5    [slave  keyboard (3)]

My mouse calls itself Logitech USB Laser Mouse and is shown as id=11. Your mouse will have a different name; figuring that out is left as an exercise for the reader.
While you still know the ID of the device in this session, find out how many buttons the input handler thinks your mouse has, by using xinput list deviceID. This may be different from the number of buttons that is apparent on the device.
Logitech USB Laser Mouse                    id=11   [slave  pointer  (2)]
    Reporting 7 classes:
        Class originated from: 11. Type: XIButtonClass
        Buttons supported: 16
        Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" "Button Side" "Button Extra" "Button Forward" "Button Back" "Button Task" "Button Unknown" "Button Unknown" "Button Unknown" "Button Unknown"

With my mouse, there are only 9 obvious physical buttons, but xinput reports 16.
Given the nature of USB, this ID can change every time you restart, so it's not enough to script something that's statically keyed to an ID you discover once. You'll have to dynamically parse this at startup and execute your re-map based on the current ID.
Now that you know its name, you can use xinput test deviceID to figure out which key to remap. Press the mouse buttons you want to map from and to, in order to get their indices. (For reference, 1, 2, and 3 "always" (i.e., usually) refer to the left, middle, and right buttons of a 3-button mouse. A common re-map reverses these to make the mouse left-handed.)
button press   2
button release 2
button press   9
button release 9

In this case I found that I want to map button #9 (side, top) to button #2 (middle).
Now that you know what your mouse is called, and which buttons you want to change, you can write an ~/.xsessionrc script that invokes xinput to execute the button re-mapping at startup. Below is my complete script.
# Map button 9 (top side button) to button 2 (middle button)
my_mouse_id=$(xinput | grep "Logitech USB Laser Mouse" | sed 's/^.*id=\([0-9]*\)[ \t].*$/\1/')
echo $my_mouse_id > ~/temp/my_mouse_id
xinput set-button-map $my_mouse_id 1 2 3 4 5 6 7 8 2 10 11 12 13 14 15 16

The first line here sets a temporary session variable equal to the ID of the mouse as reported by xinput. This is done by greping for the known name of the mouse in the report from xinput, then using sed to extract the ID number from that id=xxx token in the report. This value is then used in an xinput set-button-map directive, which executes the re-mapping. In the example above, the only change is that button #9 is being re-mapped to mimic button #2. All others remain at their default setting.
Update: As @Lokasenna points out below, if your device reports itself as both a mouse and a keyboard, you may need to limit the result count of the grep using -m 1.
Mapping Mouse Buttons to Arbitrary Functions
See also this answer.
You will need xinput, xbindkeys, and xautomation (including xte) installed for this task.
Use xinput list and xinput test to discover your mouse's device ID and the number of the button you want to assign. In my case, I wanted to map the bottom side button (#8) to a double-click of the left button (#1).
Create or edit ~/.xbindkeysrc. The format of this file is a series of paired lines. The first line is a command to be executed for an event; the second line is the event description. We will use the xte component of xautomation to send events directly to the input handler.
To create a double-click event when a button is released, I added the following:
"/usr/bin/xte 'mouseclick 1' 'mouseclick 1' &"
b:8 + Release

This configuration maps a sequence of two mouse clicks on button #1 to the release of button #8. (In theory I guess you could map any command to a mouse button, but this is the most common case. See this answer for other practical examples.)
Update for 16.04 Ubuntu
For users with multiple mice attached to your system, you need to also pass in the ID of the device. This may not apply to all users and was discovered on Ubuntu 16.04 with Unity.
xinput list

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Kensington      Kensington Expert Mouse   id=9    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=13   [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=14   [slave  pointer  (2)]

Then modify the .xbindkeysrc file by referencing the id= value from the command output (id=9 in this example):
"/usr/bin/xte -i 9 'mouseclick 1' 'mouseclick 1' &"
b:8 + Release


You haven't told us anything about what your server is running. OpenSSL is a library. It can take various options which are fed to it via the application that is using it - so configuration depends on the application. Assuming you are using Apache with mod_ssl then you probably want to look at the SSLProtocol directive. This is probably the easiest way to do it.

It is also possible to configure OpenSSL without SSLv3 at compile time. Obviously that means you have to compile it and install it yourself rather than using the out-of-the-box ubuntu version. To do that download the latest version from the OpenSSL website. Unzip and untar the source file and move into the created openssl directory. Enter the following:

./config shared no-ssl2 no-ssl3 no-ssl3-method
make
make test
make install

By default that will install into /usr/local/ssl. You will need to configure your application's LD_LIBRARY_PATH to pick up the libraries from this location rather than the default system version.


This was reported on GitHub and there is a solution here


access ecryptfs disc from ubuntu 19 with ubuntu 18

You may want to reboot with a Ubuntu 19 live CD, mount the partitions with your ecryptfs password, and then instruct it to decrypt the filesystems and reconvert them to unencrypted ext4fs. Then dismount the volumes, and reboot in Ubuntu 18.

But may be you could also install ecryptfs as an addon on Ubuntu 18. Basically this should work provided you have the correct minimum kernel version (Linux kernel versions are independant of the Ubuntu distribution which just requires a minimum supported kernel, which can be updated separately of other packages supported by the versioned Ubuntu environment.

Note: I've not checked if ecryptfs was backported in the list of packages supported in Ubuntu 18. And anyway most changes in the new default Ubuntu 19 distribution can be reverted, including the desktop manager if you don't like the new one as Ubuntu 19 supports almost all packages built for Ubuntu 18. This is done in many other Ubuntu-based distros that make other choices of default packages.

Make sure also that Ubuntu 18 uses the updated kernel: go to the Software manager, select the Kernels versions menu, and apply the newest one.


Deb packages directly downloaded and manually installed will not usually get updated as most of the time they don't even exist in the Ubuntu repositories.

However for Chrome, it's a bit different as during the package installation (even with a low-level package manager like dpkg -i) a new entry is created in /etc/apt/sources.list.d to set up the update process:

$ cat google-chrome.list
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb http://dl.google.com/linux/chrome/deb/ stable main

Finally it only depends on the package itself but consider Chrome as an exception.

Usually when I need to manually install deb packages using dpkg it's because it need to install new package versions on older releases and I know that they won't get any (backport) updates. It's rare and should be reserved for experienced users.


Why do all my folders have ! or ? or a bomb sign on them after I installed rabbitvcs?

Try this solution found here:

Kill the checkerservice.py Process under rabbitvcs
Run ps aux | grep rabbitvcs
Use command kill -9 <process_id_of_checkerservice.py>
Restart the Nautilus and the solution worked.


How to prevent saving bash commands *with* space in front

I guess somehow at your first Ubuntu machine, the HISTCONTROL's value has been compromised with.

Open ~/.bashrc in an editor, add a this at the end of file:

HISTCONTROL=ignoreboth

Now if yo open a new terminal, it should ignore saving commands to history when they start with an space.

man bash

  HISTCONTROL

  A colon-separated list of values controlling how commands are saved on the history list. If the list of values includes ignorespace, lines which begin with a space character are not saved in the history list. A value of ignoredups causes lines matching the previous history entry to not be saved. A value of ignoreboth is shorthand for ignorespace and ignoredups. A value of erasedups causes all previous lines matching the current line to be removed from the history list before that line is saved. Any value not in the above list is ignored. If HISTCONTROL is unset, or does not include a valid value, all lines read by the shell parser are saved on the history list, subject to the value of HISTIGNORE. The second and subsequent lines of a multi-line compound command are not tested, and are added to the history regardless of the value of HISTCONTROL.


What music player works with ipod nano 7th generation?

Apparently Apple changed the FS type in the more recent iPods, e.g. Nano 7G, so that it is not compatible with gtkpod which is the engine for many of the Linux based players. The link below outlines a workaround to the issue. Note though that it involves tweaking the Nano's FS.

http://sourceforge.net/p/gtkpod/mailman/message/30329260/


Why can't I make a file association in Nautilus?

I had the same issue with Nautilus not allowing me to set acroread as
the default for pdf files.  Perhaps you can use something like I did
to fix things up.  Like you, mimeopen worked fine.

xdg-mime query default application/pdf         # show current association

xdg-mime default /usr/share/applications/acroread.desktop application/pdf

This also made firefox open my pdf links with acroread, which was my real goal,
because the default evince "Document Viewer" doesn't open up tab panes and opening
up 10+ separate viewers with the Unity desktop is r-e-a-l-l-y painful.

Maybe a similar use of xdg-mime can fix your setup too?


You have dependency problems.
Fire up the terminal by using Ctrl + Alt + t.

Here are the commands you should use:

sudo apt-get clean

sudo apt-get -f install

then run:

sudo dpkg --configure -a

again:

sudo apt-get -f install

If you still have a problem please add a comment to this question or edit you answer.


Can't see content of My Passport Ultra 3TB

Well now a days OEM provides some additional layer of security which makes it difficult to use it with ease. So I recommend to format the whole Passport using Gparted - Graphical application which you could be able to install it via control center. By using terminal you can issue the following command to install the same.

sudo apt-get install gparted

Then format your Passport to ext4  and use it trouble free.

If somehow you fail to format it using gparted or after that issue persists,  its better to format the Passport using Windows and then connect it again to Ubuntu , then you should be able to see and mount it. Then use gparted to format using ext4.


GTK theme does not work properly on Qt Startup Applications

What made it work
Added a 1 second startup delay to the autostart desktop files (in ~/.config/autostart/):
[Desktop Entry]
...
X-GNOME-Autostart-Delay=1

This made the apps to start after the X session has properly initialized itself after login. Nothing else was needed (apart from the initial setup).
Notes

The QT Configuration tool (shipped in qt5ct apt package) is viable but not necessary.

If installed it addes an X session config /etc/X11/Xsession.d/99qt5ct that sets the QT_QPA_PLATFORMTHEME to qt5ct if unset.
It enables a wider configuration of Qt theming. I used a minimal ~/.config/qt5ct/qt5ct.conf:

[Appearance]
icon_theme=Numix-Circle
standard_dialogs=gtk2
style=gtk2

For debugging the env of the apps can be checked with this shell command (note, I use fish and not bash): strings /proc/(pidof keepassxc)/environ | grep QT

To investigate where environment variables are set one can use these commands:
# system wide - this was quick
grep QT_QPA_PLATFORMTHEME --recursive /etc/*
# per user - this was super slow on my system (*khm* steam *khm*)
grep QT_QPA_PLATFORMTHEME --recursive ~/*

Sources:

Comments under this question
How to determine where an environment variable came from?
How can I delay a specific program on startup?


Cannot be owner of newly formated ext4 drive

I usually mount all my non OS drives into /media. So you could mount your drive in /media/mydrive/ (change mydrive to anything you like).

sudo mkdir /media/mydrive

Get the UUID of your drive

sudo blkid

Make an entry in your fstab to mount your drive to /media/mydrive

sudo nano /etc/fstab

Add the entry, something like this

UUID=<the UUID from blkid>   /media/mydrive    ext4    errors=remount-ro    0   2

Take ownership of the mount point

sudo chown -R yourusername.yourusername /media/mydrive

sudo chmod +r /media/mydrive

Reboot


Launchpad and source versioning while targeting different series of Ubuntu

Ok, it seems I figured out how to set up the control file to get the deb build via pbuilder-dist for both trusty (14.04) and groovy (20.10) on groovy machine.

Create debian/compat file with 9 inside. (old way of declaring compatibility)
Remove debhelper-compat (=9), from Build-Depends:  (it's incompatible with old way of declaring compatibility)
Leave debhelper (>=9.0) in Build-Depends:

I have ${shlibs:Depends} in Depends:


Can't write to smbclient-mounted network disk without sudo

And what happens when you cange your mount expressions to this:

sudo mount.cifs -v //network_disk/G ~/G  --verbose -o user=myuser,domain=MYDOMAIN,uid=myuser

CIFS mounts set the owner to root with write access only to root. uid=myuser replaces root with you.

The myuser in "user=myuser" is the user name the server is expecting.
The myuser in "uid=myuser" is your local Linux user name.


How to add System user that not be shown in lightdm login screen window or User Accounts?

Use this command:

$ sudo adduser --no-create-home --disabled-login --shell /bin/false --system --uid 1001 media
$ sudo addgroup --gid 1001 media

When running the test, using the man pages for the arguments, the -gid in the adduser command is suppose to create the group by the specified name and supplied number.  However, in this functionality has apparently changed without the docs being updated.  On the test, specifying the --gid fails with the error: adduser: The GID 1001 does not exist.  So I dropped the --gid to create the new number when creating the user, and added a second command to create the group for the new user.

Update:

Edit a file by the UserID in the /var/lib/AccountsService/users dir to include these lines:

In this case run this command:

$ sudo nano /var/lib/AccountsService/users/media

Then ensure to include these two lines:

(If the user has logged on this the file should automatically be created.  If the user hasn't logged on, then it won't exist.  You can manually create it with the commandline above.)

[User]
SystemAccount=true

Now either reboot or restart the lightdm services (depending on your Ubuntu version):

(To avoid logging out you can restart Lightdm by with Ctrl+Alt+F2.  Then run the command below from the console.)

$ sudo service lightdm restart

or (Ubuntu 16.04 and higher)

$ sudo systemctl restart lightdm

Note:
By default, a USERID below 500 is automatically hidden.

Some information in the update can be found in the /etc/lightdm/users.conf file.


Why xrandr ignores setting DPI in Zenbook of 12.10?

I am not entirely sure if this is what you want, but as a workaround you can use Ubuntu Tweak's 'Font scaling' tweak to change the dpi of the fonts in your GUI, thus resizing a lot of elements and therefore having more screen real estate.


It has been removed from ubuntu repositories as message says. you can install it by doing following procedure

sudo apt-get install build-essential
sudo apt-get install libssl-dev
wget http://download.aircrack-ng.org/aircrack-ng-1.1.tar.gz
tar -zxvf aircrack-ng-1.1.tar.gz
cd aircrack-ng-1.1

In the aircrack-ng-1.1 directory there is a file called common.mak, use your favorite editor to open the file and scroll down till you see the following line:

CFLAGS ?= -g -W -Wall -Werror -O3

Delete the -Werror variable, so that the line now looks like the following. Save and exit.

CFLAGS ?= -g -W -Wall -O3

Run make and sudo make install in terminal to get aircrack-ng up and running."

For build-essential go to update manager > settings > ubuntu softwares and see if top main is checked.


Shut Down the Kali in the virtual box and go to the settings again. If OS is working in the virtual box, settings doesn't enable.


How to boot to a Ubuntu 12.04 installation which is not listed in grub2 anymore?

Yes, you can update GRUB. Boot a LiveCD, and then follow this guide: https://help.ubuntu.com/community/Grub2/Installing#ChRoot to chroot into your install of Ubuntu, and then run 'update-grub'.


How do I install update the BIOS of my Acer Aspire 4820TG laptop?

Yes it is possible to update the BIOS without installing windows.

UbuntuForums has an excellent tutorial which you should consult.

Since it looks like Acer does not have a linux friendly way of updating the BIOS, then use the FreeDOS method described in the tutorial together with the DOS BIOS exe that Acer supply.


Is any way to connect mtproto client ubuntu 18.04?

At this moment mtproto is only available for telegram Cloud chats (server-client encryption), please check following link and read about it.
Mtproto - General Description


The Ubuntu Desktop download is and .iso file which can be directly written to a CD or DVD. You should not convert it to a .img before burning it.


What exactly does kactivitymanagerd do and why would I want it running?

You should remove the package associated with it.

sudo apt remove kactivities

After that, the popup about kactivitymanagerd doesn't show up by ejecting external disks. I don't see any unpleasant difference in behaviour.


BIOS/Grub2 not showing windows : BOOT to win10 after attempt to install

Here's the problem: Legacy (why, oh why did you changed to legacy?). If you had to CHANGE then the factory installed Ubuntu was in UEFI MODE (as it should be).

I understand that if it was the other way around, installing Ubuntu after Windows, begginers my be tempted to do that because of wrong assumptions about desktop Linux or because following some old guide no longer applicable to UEFI computers. But explicitly enabling Legacy/CSM to install Windows 10? It's a textbook definition of insanity!

How to do it correctly is the enable UEFI, preferably "UEFI only", and assure the Windows USB media is booting in UEFI mode beaches how it boots is how it installs. Disabling Legacy/CSM (AKA UEFI only) is the best way to assure it boots and installs in the correct mode.

Yes, there are methods to convert Windows to a UEFI installation but at this point it's better, safer and probably faster to just reinstall Windows in the correct mode.

Warning: After the Windows installation has finalized it likely will change the UEFI boot order to "Windows bootloader manager" and boot Windows directly. Just open the UEFI settings and change it back to "Ubuntu". You will then boot Ubuntu. At this point Grub will NOT show Windows as an option. For that you need to open the terminal and run suro update-grub.


Installed script with pip: Run like a command

Add the path ~/.local/bin to the PATH environment.

Open the file .bashrc in a terminal

nano ~/.bashrc

and add

:$HOME/.local/bin

at the end of the PATH definition

e.g.

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$HOME/bin:$HOME/.local/bin

and add the line:

alias my_app="scdl - l <link>"

to start your command scdl - l <link> with the alias my_app.

Replace my_app with a name of your choice.

Start the command to read the configuration

source ~/.bashrc

That's all.


I will copy and paste from my previous AskUbuntu answer but skip some details, ...

Unmount the NTFS partition ...
Create a custom mountpoint ...
Check your userID's uid number ...

Mount the NTFS partition

Example 1 (without execute permissions for files, no access for 'others'),

sudo mount -o rw,user,uid=1000,dmask=007,fmask=117 /dev/sdxn /mnt/sd1  # general syntax
sudo mount -o rw,user,uid=1000,dmask=007,fmask=117 /dev/sdb1 /mnt/sd1  # modify to match your case

This way I think the files and directories in the Windows partition (which I assume has an NTFS file system) should be readable (and writable) by the main user ID, with the number 1000 (and I guess the name 'tiago'). Modify if there is another user ID.

dmask is the mask for directories and fmask is the mask for files. These should be the octal inverse of the permissions that you want (770 and 660).

Check also that you point to the correct device (modify /dev/sdb1 if necessary).

See man mount if you want more details about the mount options.

When this works (maybe after some modifications), you can put the commands into a file (make a bash shellscript), make it executable and run the shellscript in order to mount the Windows partition in a convenient way.


Graphics driver problem: GTX 1050 - Ubuntu 18.04

I have the same issue and returned back to using the default xorg-xserver this has the down-side that the laptop screen is slow in response and the HDMI port and brightness settings do not work anymore... At least I can use my laptop again. Going back to older kernel versions did not seem to help (some other update is also blocking the nvidia drivers from working properly). Also tried nvidia driver 410.

This happened just after installing the updates yesterday and now I am running kernel 4.15.0.38.


I've solvedthe login problem of duplicity on mega with these steps:

I've create the .megarc file in my $HOME

[Login]
Username = myuser@mydomain.com
Password = the-relative-password

see megarc (5) manual

Then I call duplicity with fake user:

duplicity my_local_dir mega://myuser@mega.nz/MEGA_REMOTE_DIR

duplicity check the existence of .megarc and ignore the login params.
Unfortunately the login params is expexted (at the release 7.16) and if it miss duplicity make a mess with path calculations.


I will warn you now, there are a good amount of reports that Webapps is experiencing some first day bugs. In my personal experience on two computers, it works ok.

There are however a few things you can do to get them to work awhile we wait for patches to come through the Software Updater.

First, open Fire Fox, click Edit>Preferences In the General tab at the bottom, you will see Desktop Integration, make sure it is checked. There is a button that says "Exceptions...", click it and make sure there are no exceptions:

For this second tip, here isn't much documentation on if this works or not, but I find it helped me. Open the Ubuntu Software Centre, and search for "Webapps". At the bottom of the search, you will see something like "Show 57 technical items", click that. Now you will see all the Webapps, you can install the ones you want one by one. Alternatively, you can install them all by using this command,

  sudo apt-get install unity-webapps-*

Lastly, to install the Chromium extension for Unity Webapps (I didn't manage to get a single Webapp to work in Chromium), use this command:

  sudo apt-get install unity-chromium-extension

Remember thought that this is all new to Ubuntu, and that the bugs will be ironed out in the next few week through updates. Enjoy!


LTSP clients stopped recognizing USB keys

Don't know if this would help but I've found that I've had to add a few extra modules for some USB drives/phones to be connected.

Add the following to your /var/lib/tftpboot/ltsp/i386/lts.conf file.

# Required so clients can mount HTC Desire phones as disk drives
MODULE_01 = "usb-uhci"
MODULE_02 = "usb-storage"
MODULE_03 = "sd_mod"


App can't find libs even though they exist

I am almost sure that you get this error because you try to run a 32-bit (libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6) executable on a 64-bit (/lib/x86_64-linux-gnu/libuuid.so.1) operating system. Run file test to check this. Thus, the following Q&A may help you:

How to run 32-bit app in Ubuntu 64-bit?


Actually, you probably already have four primary partitions on your hard drive.  HP have got in the habit setting up the computer with a partition for the bootloader, a recovery partition, a HP tools partitions, and the partition where they install Windows proper.  All of these have been done as primary partitions, not leaving any options for creating new partitions since four is the maximum allowed on an MBR partition table.

The solution normally involves deleting one of the partitions and creating an extended partition which can in turn contain many more partitions.  You can verify that this is the case by booting the Ubuntu LiveDVD and running Gparted.  You can get more of an idea what to expect and how to fix it by looking at this previous question.

Alternatively you can install Ubuntu as a wubi install.  This is not quite as good as installing alongside Windows because it runs off a virtual disk inside the Windows file system, however it will get you started until you are ready to make some changes to the hard drive.  Before doing any installation or other changes to your hard it is vitally important that you make backups of all of your important data.


Well startkde is located at /usr/local/bin/startkde in the chroot (/usr/local/chroots/CHROOTNAME/usr/local/bin/startkde) but the crouton startup script tries to run /usr/bin/startkde.

That would explain /bin/sh: 0: Can't open /usr/bin/startkde

Try this: sudo enter-chroot -t kde xinit /usr/local/bin/startkde

If that works, then the problem is the startup script. To fix it permanently run sudo sed -i 's/\/usr\/bin\/startkde/\/usr\/local\/bin\/startkde/g' /usr/local/bin/startkde from outside the chroot.


lsof -i -a username | grep ^gvfs

-i
only list network connections (see manpage for more options)

-a username
only list files opened by a specific user

grep ^gvfs
only list files opened by gvfs


No, the ram is only reserved while the VM is running.


How to enable boot messages to be printed on screen during boot up?

You'd need to remove the kernel boot parameters quiet and splash from the linux line in GRUB:

Start your system and wait for the GRUB menu to show (if you don't see a GRUB menu, press and hold the left Shift key right after starting the system).
Now highlight the kernel you want to use, and press the e key. You should be able to see and edit the commands associated with the highlighted kernel.
Go down to the line starting with linux and remove the parameters quiet and splash.
Now press Ctrl + x to boot.

To make this change permanent:

From a terminal (or after pressing Alt + F2) run:

gksudo gedit /etc/default/grub

and enter your password.
Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT and remove the parameters quiet and splash.
Save the file and close the editor.
Finally, start a terminal and run:

sudo update-grub

to update GRUB's configuration file.


Cedarview drivers boot to a blank screen

The driver is available in the Ubuntu repositories, so no need to add PPAs. You can remove the PPA and the installed packages with

sudo apt-get install ppa-purge

sudo ppa-purge ppa:sarvatt/cedarview

Then install the driver.

Hope it works.


How to install Ubuntu on Second internal drive on mac?

It seems to be entirely possible, this guide seems to be sensible. From what I've read on other tutorials, it's essential to install a utility called rEFInd, as Macs need their EFI boot loader to be modified correctly.

There are also some brief notes from a user who has completed the process earlier this year here.

This link has details on installing rEFInd, near the bottom of the page it has instructions for installing on another disk.


Problems with 12.04 LTS to 14.04 LTS upgrade

To resolve the second issue, I proceeded this way :

sudo mv /etc/update-manager/release-upgrade{,.back}
sudo dpkg -i --force-overwrite ubuntu-release-upgrader-core*.deb

At last, sudo apt-get -f install worked.

I ran

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

After reboot, to solve the problem Failed To Start Session. I followed the first part of the solution proposed here ItsFOSS.

sudo apt-get install --reinstall ubuntu-desktop

The next step was a problem with Unity not properly loading. This topic was already discussed here: Unity doesn't load, no Launcher, no Dash appears

Finally I uninstalled Unity and installed Gnome Shell.

sudo apt-get install gnome-shell ubuntu-gnome-desktop


Is there a text editor that can run shell scripts?

Option 1: use vim, emacs, geany, and many more!

In vim and use :!bash file.sh or just create a shortcut for it in .vimrc

In Emacs, you use M-!. So you hold down Alt and then press !. You can even pass text in your current buffer to a command by selecting what you want to pass to a command and then pressing M-|. So you can highlight your code and pass it to the command bash.

Every tool has it's own way!

Option 2: use find and entr

Run this command so whenever ANY .sh file in the directory changes, it'll be run again automatically:

find . -name '*.sh' | entr -cs file.sh

Option 3: use combination of tmux, vim, and entr for live coding

I wrote this long ago for c++ and then used it more in other languages and now you can use it for shell programming as well.

Here's how it'll look like:

for the program to run all I have to do is to save it in vim (:w) and it'll run.

Save this in ~/bin/ide:

#!/usr/bin/bash

tmpdir=""
template="simple"

for i in "$@"
do
case $i in
    -t=*|--template=*)
        template="${i#*=}"
    shift # past argument=value
    ;;

    -n=*|--name=*)
    dir="${i#*=}"
    mkdir -p ~/cppshells/$dir
    tmpdir=~/cppshells/$dir
    shift
    ;;

    -h|--help)
    echo "-n=*|--name=* \t\t the name of the project"
    echo "-t=*|--template \t\t the template to use"
    exit;
    ;;

    *)
        # nothing to do
    ;;
esac
done

if [ -z "$tmpdir" ]; then
    tmpdir=$(mktemp -d)
fi;

tmpdir=$(realpath ${tmpdir});
window="cpp-$1-$((1 + RANDOM % 10000000))"

if [ -z "$EDITOR" ]; then
    EDITOR="nvim";
fi;

template_dir="$(dirname $0)/templates/${template}"

if [ ! -d $template_dir ]; then
    echo "The specified template ($template) does not exists."
    exit;
fi;

tmux new -s ${window} -d -c "${tmpdir}"
tmux split-window -t ${window} -h
tmux select-pane -t ${window}.right
tmux resize-pane -t ${window}.right -R 18
tmux send-keys -t ${window}.left "cd ${tmpdir}" C-m
tmux send-keys -t ${window}.right "cd ${tmpdir}" C-m

# copy files if the directory does not exists
if [ `ls -A ${tmpdir} | wc -m` == "0" ]; then
    cp -nr $template_dir/* ${tmpdir}/.
fi;

# run build commands
if [ -f ${template_dir}/Makefile ]; then # make
    tmux send-keys -t ${window}.right "find . -name '*.cpp' | entr -cs 'make -j8 && ./a.out'" C-m
        tmux send-keys -t ${window}.left "${EDITOR} ${tmpdir}/main.cpp" C-m
elif [ -f ${template_dir}/CMakeLists.txt ]; then # CMake
    mkdir -p ${tmpdir}/build
    cmake -G "Unix Makefiles" -B${tmpdir}/build -S${tmpdir}
    tmux send-keys -t ${window}.right "find . -name '*.cpp' | entr -cs 'make -j8 -Cbuild/ && ./build/a.out'" C-m
        tmux send-keys -t ${window}.left "${EDITOR} ${tmpdir}/main.cpp" C-m
elif [ -f ${template_dir}/main.py ]; then # Python
        chmod +x ${tmpdir}/main.py
    tmux send-keys -t ${window}.right "find . -name 'main.py' | entr -cs '${tmpdir}/main.py'" C-m
        tmux send-keys -t ${window}.left "${EDITOR} ${tmpdir}/main.py" C-m
elif [ -f ${template_dir}/main.sh ]; then # Bash
        chmod +x ${tmpdir}/main.sh
    tmux send-keys -t ${window}.right "find . -name 'main.sh' | entr -cs '${tmpdir}/main.sh'" C-m
        tmux send-keys -t ${window}.left "${EDITOR} ${tmpdir}/main.sh" C-m
fi;

tmux select-pane -t ${window}.left
tmux attach -t ${window}

Then create ~/bin/templates/simple directories and put a simple main.sh file in them which will be your starting point when you run ide command. You can also create more and more templates (each one in a different directory in ~/bin/templates/ directory).

Add /home/$USER/bin to your path so you can run ide.

To run the script you can use these 3 ways:

For simple tests: ide (it'll create a temp directory with mktemp -d command
To save the file in ~/cppshell/[something]/ dir: ide -n=something
To use a different template(starting point): ide -t=not-simple -n=some_name

As I said you could use this script to make shell like tool for running python, C++, bash, or even add your own.


Ubuntu 12.04 no longer boots on Toshiba Satellite after Windows upgrade

It's possible that the Boot Repair utility will fix this problem; however, it's important that you boot this tool in EFI mode. (Running it from a live CD is fine.) Booting it in BIOS/CSM/legacy mode is likely to either not work or create a very hackish fix that might create more problems than it solves. To ensure that you've booted in EFI mode, open a Terminal window and look for the directory called /sys/firmware/efi. If it's present, you've booted in EFI mode; if it's absent, you either haven't booted in this way or you're using a distribution that's configured strangely.

FWIW, recent versions of Ubuntu do support Secure Boot, at least well enough to get GRUB booting with Secure Boot active. I can't be positive, but my suspicion is that you actually installed Ubuntu in BIOS/CSM/legacy mode and were switching between that mode and EFI/UEFI mode. If the Boot Repair fix I've suggested works, then you should end up booting both OSes in EFI/UEFI mode, with GRUB to switch between them.

Another option is to disable Secure Boot but ensure that your firmware is booting in EFI/UEFI mode. (How to do this depends on your firmware's user interface, so I can't provide specific instructions.) If an EFI-mode version of GRUB is installed, you should then be able to select it from a boot menu and run it; or you can install another boot loader or boot manager. Installing my rEFInd from Windows, along with an EFI filesystem  driver for whatever filesystem holds your Linux kernel, should work pretty well. Using this option with Secure Boot enabled is also possible, but requires extra configuration.


Broken package fix after installing 18.04 from 17.10

I was able to resolve this issue, after doing the update through Software and Updates. Then I followed this link

Trying to install nvidia driver for ubuntu Desktop 18.04 LTS

One should check this file:

/etc/modprobe.d/disable-nouveau.conf
blacklist nouveau
blacklist vga16fb
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
blacklist amd76_edac
options nouveau modeset=0


You cannot unmount a partition wich has open files. The usual way to do this is to boot in single user mode, or using a live system like you mentioned.

Then you can proceed with enlarging the partition and raid array, and the instructions you link seems to cover that quite well.

Note that you obviosly need free space on the drives to follow that procedure. To add drives, the process is slightly different.

Also note that a file server should run very well without swap. Swap is not used for caching, and the amount of swappable software on a NAS will be low. A box I have for storage has 2GiB RAM, and has swapped 86MiB - while using 700MiB of RAM for caching. Removing the swap totally would have negligible performance impact.

To disable the old swap space, edit /etc/fstab. You'll typically find a line like this:

/path/to/swap   none    swap    sw    0   0

Simply edit that line to point to the location of your new swap file, and ubuntu will use the new one on next boot. This can safely be edited before doing anything more, as Linux will run happily without swap.


Nokia Lumia 625 won't mount in Ubuntu 14.04

I have a similar issue with my LG optimus L5. My problem was about some libraries that got broken. To solve this, I runned:

$ sudo apt-get -f install

Then, update, upgrade, reboot and it was solved.

Hope this helps.


Trying to install firefox on Linux on Crouton but cannot bypass user agreement

On that type of screen, you move the cursor around by pressing the Tab key.  When it reaches the field you desire, press the Space bar to make an selection.


The latest version of openjdk and icedtea plugin work with Juniper VPN. Removing older and other versions of Java may also help.

See Could anyone provide a step by step for getting juniper netconnect and citrix?

This is one place where I found command line works better than the Ubuntu Software Center

First remove older versions of Java, both Oracle (Sun) and OpenJDK. For example, if you have OpenJDK 6 installed, type in a terminal:

sudo apt-get remove openjdk-6-jdk icedtea-6-plugin

Remove the Sun Java as well. If you have installed just the JRE, rather than JDK change the commands accordingly. Then install the OpenJDK-7 and corresponding plugin by:

sudo apt-get install openjdk-7-jdk icedtea-7-plugin

Open Firefox and test the version of Java is being used by going to this site http://www.java.com/en/download/testjava.jsp

Note: As of Chrome 35 , the Java support for the Chrome on Linux has been discontinued. You have to use Firefox to make Java (and therefore Network Connect) work.

If you see version 7 is running, you are ready to try Juniper VPN. If not you may have to remove the other version of Java. Hope this helps.

Update: for 64bit Ubuntu 12.04 to 13.10

From 7.3 onwards, Juniper SA devices support 64-bit Ubuntu for Network Connect.

First, install the 64bit jre/jdk and icedtea

sudo apt-get install openjdk-7-jre icedtea-7-plugin

Second, install the 32bit jre

sudo apt-get install openjdk-7-jre:i386

Note, do not install the 32bit icedtea. Make sure the 64bit is the default java. As long as the 32bit jre exists, Juniper will find the files it needs and run.

Tested on Ubuntu 13.04 64bit.

See Juniper Network Knowledge-base for details.

Update 2: for 64bit Ubuntu 14.04

Network Connect is looks for update-alternatives in /usr/sbin/ and there seems to be no symlink pointing to the right directory like 13.10 had.

In addition to the steps above for 64 bit Ubuntu 12.04-13.10, add symlink to /usr/sbin/ by:

sudo ln -s /usr/bin/update-alternatives /usr/sbin/

The 14.04 issue is explained in more detail at How to install Juniper VPN on Ubuntu 14.04 LTS?


adobe update caused my foxtabs quit working!

I was playing with this same problem just this morning. The fix I discovered is as follows.
on any flash video playing or when you click on foxtab...right click to open global settings, then click on advanced tab, click on add trusted locations, click add folder, then add folder...home/usr   then restart firefox. Mine is working fine now.


How to get the tags for the installed software in ubuntu?

You can use dpkg-query and format the output to get the binary name and its Debian section:

dpkg-query -W -f='${binary:Package} (${Section})\n' firefox

For firefox it will simply return firefox (web) (the same section used when querying packages.ubuntu.com)

Of course you can also use the same command without a package name:

dpkg-query -W -f='${binary:Package} (${Section})\n'

See the dpkg-query man page for further details.

To get the categories as shown in the Software Center you need to parse files in /usr/share/applications like this:

$ grep Categories /usr/share/applications/* | grep firefox
/usr/share/applications/firefox.desktop:Categories=GNOME;GTK;Network;WebBrowser;

To get only the most specific applicable category, you could try this:

$ grep Categories /usr/share/applications/firefox.desktop | awk -F';' '{print $(NF-1)}'
WebBrowser


Can you use variables when setting up restrictions on addresses that ssh server listens on?

Custom image

You can build a custom image/cd for installation of Ubuntu.

It's not an overly simple process.

simple-cdd

You could also try simple-cdd


Unable to reset root Ubuntu user password via GRUB as it prompts for password when selecting "drop to root shell" in Grub advanced options

Try this:

Boot your machine with Ubuntu Live-CD/USB and select Trying Ubuntu without installation option when it is prompted.

When you get complete desktop ready.

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo -i
fdisk -l

Suppose fdisk say: / is /dev/sda1, continue running:

mount /dev/sda1 /mnt
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
passwd

And change your root password and try not to forget

Finally run

umount /mnt
reboot


How to fix a permissions problem on www folder?

run this command in the terminal after navigating to www folder:

    sudo chmod 755 *


.desktop file running sh script "There was an error launching the application."

To figure out what exactly is the error as you asked

  What do I need to change in my desktop file to make this work?

After a lot of research, I found that you can indeed validate your desktop file with this command

desktop-file-validate your-file-here.desktop

This was the hidden command I was trying to find since hours. This, Saved my day :-)

This command will show you warning and errors wherever you have gone wrong.
Credits : ubuntuforums


How to access a device with Arduino IDE Flatpak

The problem is that the app starts with flatpak and that by default blocks devices. See Accessing Serial Ports with an Application Runs in Flatpak
by adding --device=all you get it work, but see comments on link.

Most likely that's because Flatpak is blocking access to the serial
device.
Unfortunately at the moment I don't think there is a way to give
access specifically to the serial devices, so you'd need to give
access to all:
flatpak run --device=all com.xamarin.MonoDevelop

What this does is essentially mount the host's /dev inside the
sandbox, so the app has full access to it.


Is there a way to clear password mid-entry?

In bash, following will clear your input before the cursor: Ctrl+U.

Same applies for passwords, i.e.: my-wrong-password Ctrl+U my-good-password


unable to write in a directory by ACL users granted with write permission

Instead of

chown 755 /home/user1/htdocs/

You have to run

chmod 755 /home/user1/htdocs/


What is the best way to automate my linux setup

For system-wide config, etckeeper is a nice tool that integrates git.


The AMD Radeon R5 M240 seems to require at least Kernel 3.15 and Mesa 10.3. So you have the following options:

Update to Ubuntu 14.10 or newer.
Install a fresh Trusty point release 14.04.2 or
Update your kernel and mesa with LTSEnablementStack, e.g. (using aptitude)

sudo aptitude install linux-generic-lts-utopic  libgl1-mesa-glx-lts-utopic libegl1-mesa-drivers-lts-utopic

See the bug 1410205 and the explanation of LTSEnhancementStack.


parole player gives Gstreamer error when CD/DVD played in XUBUNTU

parole & audio cd playback is bugged, see here - https://bugs.launchpad.net/ubuntu/+source/parole/+bug/1322384

Comment 4 may work for you, you can test by putting an audio cd in & then from a terminal

parole --device=% cdda://

For dvd's make sure libdvdcss2 is installed -

sudo apt-get install  libdvdnav4 && \
sudo /usr/share/doc/libdvdread4/install-css.sh

As far as other players many better than parole are available, search around.

audacious is good for audio, vlc is good for dvd's, ect.


How to download previous Ubuntu wallpapers?

You can install wallpapers from past Ubuntu versions (or other Ubuntu flavors) by installing the packages that contain the wallpapers.

For example:

sudo apt install ubuntu-wallpapers-raring

or

sudo apt install ubuntu-wallpapers-natty

etc.

You can get the full list by searching in synaptic (you may need to install it) or from the command line with

apt search wallpapers


Ubuntu offerered way back when a list of 3d party software, can I still find that today?

I guess it's Synaptic, which is mainly a visualized version of apt command.

https://help.ubuntu.com/community/SynapticHowto


Ubuntu 16.10: Certain USB-Ports Disconnecting

I was able to solve a similar problem (in my case with a usb sound card which would disconnect after working for a few seconds, bricking the port to which it was connected) by installing a more up-to-date kernel:

4.9.0-040900rc3-generic

I simply downloaded the .deb file for my architecture from,
http://kernel.ubuntu.com/~kernel-ppa/mainline/
and installed it with the software updater.

After rebooting, the usb device was back to its normal behavior.


You are right that the if statement appears to be unnecessary.  My guess is that the two branches of the if statement did different things in an older version, but the two branches were modified to their current form at some point.

If it bothers you, I'd suggest filing a bug.


Installing printer driver for Epson TM-T20ii on Ubuntu 16.04

I see that Epson supplies a driver called "TM-Intelligent Printer" that seems to cover all the bases. It comes down as tmx-cups-2.0.3.0.tar.gz so if you save it to your Downloads folder.

Copy each line of command below; paste into a terminal; hit the Enter key after each paste; move to the next line. The commands to install:

cd Downloads
tar -zxvf tmx-cups-2.0.3.0.tar.gz
cd tmx-cups
sudo ./install.sh

If you delete what you have in your Printers folder for the TM before you start the above as you say the existing icon does not work. We hope the above does. Copy the above commands and paste them into a terminal.


How to assign an input parameter for a function including awk?

Awkk's -v argument takes a name=value pair, allowing you to use name as a variable inside your awk program. So

tt() { r=$(j | awk -v id="$2" 'FNR=id && NR {print $1}'); jj $r; }

(TBH I'm not sure why the && NR is necessary here, or why you're distinguishing between NR and FNR when you are only passing a single input (stdin) to awk.)


Gnome theme rejects Dark Theme selections, shows dark version but quickly switches back to light theme version on selection

Turns out the Gnome layouts tool was applying a redundant dark mode which was screwing up the Gnome Tweaks settings. This solution fixed my issue perfectly.
https://forum.manjaro.org/t/dark-theme-not-applying-in-morning/28433


You have upgraded the C compiler, but not the C++ compiler. They are separate binary packages. You need to also install the g++-4.8 package to get the new version of the C++ compiler.


OpenSSL not picking up CAs in certs folder by default

Please try using -CAfile instead of -CApath and point to the single concatenated CA certificates file. E.g.:

openssl s_client -connect secure.ogone.com:443 -showcerts \
                 -CAfile /etc/ssl/certs/ca-certificates.crt

This works for me, showing verify return:1 and a full certificate chain.

Background information: This /etc/ssl/certs/ca-certificates.crt is managed by the update-ca-certificates command, simply concatenating all system-wide installed certificates, including those manually installed in /usr/local/share/ca-certificates/.


GRUB messed up after plugging in external hard drive


Application does not open in the same workspace when switched during loading

That's not configurable, but it may be a bug. I would report it if I were you. Launchpad.net is the place to do so.


How to get rid of this message about a failed install

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

sudo dpkg -r oracle-java7-installer
sudo dpkg --purge oracle-java7-installer

If the preceding does not work, you may try the following more aggressive method. Be aware, however, that it uses the rm command, which will completely remove files immediately and permanently from an important directory. Be extremely cautious.

sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get clean
sudo apt-get update


How much diskspace do I need for Ubuntu 14.04?

8 GB space is fine enough for installation


Help I want to install Ubuntu 14.04 LTS on a Desktop beside windows XP

Real Dysky,

You can run Ubuntu 14.04.1 LTS without install it. During boot,the first question is if you want to install or run an instance to test it, then you can certify the compatibility of hardware before install it.

I hope that this procedure gives you the security required for a definitive installation.

kind regards and success!


"No default Matlab path found" When trying to install packages

To use the matlab-support package, you need to download and install matlab.

If matlab is installed, run the following command to show your matlab path:

which matlab

This is the path you will need to input when you get the popup window.

If matlab is not installed, you have two options. Option one: you could install matlab (download and unzip the installer and then run the "install" file, you may need to use sudo to run the file). Option two: you could uninstall the matlab-support package.

sudo apt remove matlab-support

As for the VPN package, openvpn is already installed and up to date. The installation error is unrelated.


What are the best antivirus soloutions for scannining USB drives for Malyware and Viruses?

Install ClamAV - this AntiVirus and AntiMalware tool is available in the Ubuntu repositories.

ClamAV® is an open source antivirus engine for detecting trojans, viruses, malware & other malicious threats.

Open a terminal and execute :

sudo apt-get update
sudo apt-get install clamav clamtk clamtk-nautilus

clamav is the anti-virus toolkit.
clamtk is the graphical front-end, a graphical user interface for clamav.
clamtk-nautilus is a Nautilus file manager plugin to allow
right-click support for scanning.


Stream VOB files from DvD rips over my network

On the server side:

vlc -I http --http-src /path/to/your/vobs

By this will serve videos using HTTP over port 8080, which might not be terribly efficient. If this becomes an issue, take a look at this superuser question for RTSP solution: Using VLC as RTSP server.

VLC can also act as a client for your vobs:

vlc http://localhost:8080/filename.vob

assuming /path/to/your/vobs/filename.vob exists and is playable by VLC.

Note! I could not get this to work with files that have spaces in their names.


this link solved it !

Ubuntu GNOME 17.04: wi-fi not working -- mac address keeps changing?

Thanks and sorry for the inconvenience!


Am I supposed to remove cloud-init once the server has been created

Embarrassingly the answer I was looking for is in the docs (I swear it wasn't there at the time I asked the question):
https://cloudinit.readthedocs.io/en/latest/topics/boot.html#first-boot-determination

cloud-init has to determine whether or not the current boot is the first boot of a new instance or not, so that it applies the appropriate configuration. On an instance’s first boot, it should run all “per-instance” configuration, whereas on a subsequent boot it should run only “per-boot” configuration.

So the answer to my question is that cloud-init (potentially) behaves differently depending on whether the cloud/VM instance is booting for the first time, or a subsequent time.
Furthermore, cloud-init doesn't disable itself (it just runs different steps), and does not need to be removed once its completed its initialisation/installation stage (first boot).

By default, cloud-init attempts to determine which case it is running in by checking the instance ID in the cache against the instance ID it determines at runtime. If they do not match, then this is an instance’s first boot; otherwise, it’s a subsequent boot. Internally, cloud-init refers to this behavior as check.

Thus changing the machine id (/etc/machine-id) will most likely cause cloud-init to re-run the initialisation stage. As will removing the cache (sudo rm -rf /var/lib/cloud/*)


Problem solved.

The issue was the 'Run in Terminal' box was checked when I created the launcher. I don't remember checking it, but must have done so by accident, because that's not the default in Xfce.

Sorry, that was really stupid.


Problem in installation in my system which preilstalled XP

Verify the MD5SUM of ISO file. Look this:

https://help.ubuntu.com/community/VerifyIsoHowto

Or you can try booting from USB. ;) (If your BIOS have support!)


Mouse cursor blinking after Ubuntu 14.04 installation

Do System Settings > Displays
And turn-off / disable Unknown Display.


Ubuntu Server - Available options for various post installation customization?

I followed shvahabi's advice here How can I make "rc.local" run on startup?. Basically, I'm enabling and using rc.local on the ubuntu box. Rc.local is normally not used on debian. It's very similar to Window's registry run keys. Ultimately I'll have my first boot configuration script AND the custom rc.local file in a custom deb package that places the files on the box at installation time (custom deb lives on the ISO itself). Then, on every boot, the rc.local will run my script and I can put a check in so that it only runs on the first boot.

Important note: edit and use "/etc/rc.local" to place a line to run your script... NOT "/etc/init.d/rc.local". The second one is actually controlled by another package and will NOT let you install a custom version of it from a custom deb file during installation. The init.d version's sole purpose is to call the "/etc/rc.local" one anyways.

I'm not using systemd or upstart because you need to type in commands to start the services first. This needed to be hands free. HOWEVER, I believe all those commands do is make link files, but I didn't feel like figuring out where to place those. Two files in a custom deb package is easiest.


LibreOffice icons missing from Unity task panel

You can simply drag them from the dash onto the launcher. I have had this same issue with other programs (namely Gimp) where the program does not appear on the launcher or in alt-tab. It is a known bug (https://bugs.launchpad.net/ubuntu/+source/bamf/+bug/995916). The only way to get back to them is to either use SUPER+W (the super key is the Windows key, if you didn't know) or keep the shortcut on your launcher. According to the bug, it should have been fixed, so try updating too.


That's just a warning message you can disregard.  This said, if you WANT to fix the issue...

  NOTE: All commands specified for "go into" or "run" are to be run in the Command Line.

Go into your /etc/apt/sources.list.d folder.  Run grep -r 'dl.google.com' and it will show you which file(s) contain that string.

Edit each of those files (with sudo before your chosen text editor on the command line) and where you see deb at the beginning of the lines replace that with deb [arch=amd64] so that your strings look like:

deb [arch=amd64] http://dl.google.com/linux/earth/deb stable main

Then run sudo apt-get update again.  It should then cease with the warnings.

You will also need to edit /etc/cron.daily/google-earth-pro and edit the line REPOCONFIG="deb [arch=amd64] http://dl.google.com/linux/earth/deb stable main" otherwise it won't work and will overwrite things.  (Thanks to heynnema for that info.)


Pidgin Repository / Packages for Ubuntu 14.04LTS

Even the latest Pidgin does not work with Google's new security standards, which require you to login to a Google app authentication portal from inside the app.

I do not believe there is a solution to fix this at this time.


Is having swap on hard drive or sd card better?

If you're unconcerned with damage to your SD cards then it really depends purely on speed. Your 7200rpm internally is likely slower than your SD card's internal read/write speed, but actually getting data to drive will likely be the biggest bottleneck. Unless your SD card reader is very new, the 7200rpm HDD connected with a SATA should be significantly faster.

Your SD card is unlikely to have a decent microcontroller to address spent/damaged memory very efficiently (how SSD's address increased memory failures), so you'll more than likely not notice any failure until you get a catastrophic failure for the SD card.

If you're using anything "mission critical" on this system, then you should definitely not be going with the SD cards.


Have you tried updating grub from Ubuntu? It should detect all the OS's in the disks:

sudo update-grub


I test out this, if you just copy in to CKEditor4 directly from libreoffice calc the result is:

Instead if you initilizate a table before in the editor and past from calc in to it result is:

which is formatted a bit better. But in both case it is past it as a text.
I do this operation with libreoffice:

Version: 6.1.4.2
Build ID: 1:6.1.4-3
Browser: Chromium 72.0.3626.7

OS: Debian codename=Buster (actual testing branch)

Update
As per the comment the "issue" was caused by the Firefox web browse, apparently it is unable to past from Libreoffice as text, with chromium (and we can suppose also chrome) it works!


Boot Repair won't finish running because commands won't run

Input/output error

generally means that the hardware (HDD) is failing.
You probably want to backup your documents onto an external disk (USB or DVDs), then check/fix your HDD. Once your HDD is ok, reinstall your system.


Libreoffice 4.1 not integrated into launcher properly

Yes. 4.1 doesn't seem to play with this version of Unity. You need to downgrade to 4.0, then download the menubar folder into a LO folder. If I try exactly this with 4.1 it crashes every time I touch the menu bar. But 4.0 seems fine.

See this thread:

http://ubuntuforums.org/showthread.php?t=2113397&page=3

I downloaded it from:
http://www.ubuntuupdates.org/package...sed/lo-menubar

On 12.04 wit LO 4.0.4.2 (download from archive), it works for me if I just copy whole folder CONTENTS/usr/lib/libreoffice/share/extensions/menubar to...well /usr/lib/libreoffice/share/extensions/ .
no reset necessary.
was looking for a quick solution, didn't want to reinstall 4.xx from repos. which may be 'cleaner', but heij... it works o_O


Maybe the swap is still active when reaching "Target shutdown"; My solution was to force swap deactivation before reboot :

swapoff -a
swapoff /dev/md6

after that, the reboot went fine for me without any pause.


How to check if an alias ran successfully in shell scripting?

Your script fails because neither an alias nor a shell function is accessible from within a bash script. In scripting, use either the original command instead of the alias, or include the function definition in the calling script. Eventually, you may source the code for the function into the script from another file if you want to use the same function in multiple scripts (see help source in the terminal).

To learn how to check whether a command succeeded, see How to check if a command succeeded?.


Your question leaves a bit to be desired, but from what I interpret you are asking for IDEs with C# support that can run on Ubuntu.

I would highly recommend Visual Studio Code (link)

Alternatively you have JetBrains Rider, which is a fabulous, but paid IDE.

If your question is if you can run Visual Studio on Ubuntu, the answer is no.


Found the error. I added an extra space after a closing parenthesis. If you are making any changes to the gnome-shell-theme.gresource i assume that the way it is written has to remain the same except for values such as color hex values.
#lockDialogGroup {
  background-color: #ffffff; }x

the extra space causing the problem was where the x is


Why don't windows of the same application behave as they should?

Application in the front does not have the focus:

you might want to look into these questions and bug reports:

Window focus confusion in unity
How do I set focus follows mouse?
Switching to application with multiple windows alternates the target windows

See all the windows of one application:

I'm not sure what exactly you want. To see all windows of e.g. the terminal, I can click on the launcher icon twice. This results in this image:

There is also the application switcher (Alt+TAB) where you can use the arrow keys to show all the windows of one application:

All windows of one application disappear when one of them is closed

This seems to be the default behaviour when you first have the focus on application A, then click in the launcher on application B with windows B1, and B2. Then both B1 and B2 come to the front, but only one of them gets the focus. If this window is closed, the focus goes to the application which had the last focus, in this case A, which then comes to the front.

I do not know how this could be changed.


Your TV doesn't support the resolution you are sending it.
go to your control center and open monitor settings.

Select a resolution for the TV, and press apply. Try different settings until you find one you are happy with.

Note: Some resolutions have multiple frequency settings. Changing the frequency can change the display.


To establish a server in Ubuntu which version should I install Desktop version or the server edition?

If you are looking for just using ubuntu for a server then it would be wise to use ubuntu server edition. If you are looking to do other stuff including using a server, you can install ubuntu desktop. It is not necessary to use ubuntu server for a server.

If you going to use ubuntu desktop, then using this tutorial, you can get a server up and running.


Ubuntu Server Ubuntu 16.04.3 LTS reboots instead of shutdown

Use

sudo shutdown -r now

This will restart the computer instantly.
And if you another problem please post the terminal input in full


How to force an entire partition to be recognised, after writing a smaller partition image onto it?

You need to resize the filesystem to fill the partition:
sudo resize2fs -p /dev/sda7

This will work while booted into the OS. Take a look at man resize2fs for further details.


Error in make install: "cannot copy file"

Try sudo make install.

To access the /usr directory of your installation to store system-wide files there, the installer needs root privileges. Therefore you can not just run plain make install as your normal user account but need to use sudo to elevate privileges.


Quad monitors is unfortunately always a tricky proposition and will almost certainly require a bit of fettling with the xorg.conf file. I had it all working fine under 11.04 but after upgrading to 11.10 things went down hill. There is a description of the problems I had here : Upgrade To 11.10 - Issue With Quad Monitors

I am using two different ATI cards and the xorg.conf I had used to work fine. However, under 11.10 things seem a lot trickier. I have achieved varying levels of success and I did manage to get four monitors working temporarily but the system constantly froze and X would restart every 5 minutes or so.

I have since had a chat with the chaps over on #radeon on irc.freenode.net and they have assured me that my config is correct (which would seem to be correct as it worked under previous versions). They suspect a bug in Gnome or X is causing the problems.

Anyway, long story short. If I was in your position I would not expect even two identical cards to work by simply plugging them in and it all magically works. Expect to have to put a bit of work in getting your X configuration perfect manually. It is quite possible that there is a configuration out there that will work out of the box but until you have seen someone do it, plug the cards in and boot up with all four monitors on, be prepared for a bit of a hard time...


Will apt-get download the same version of a package manually added to /var/cache/apt/archives?

Yes it will, but only if the package is part of any lists that where downloaded while doing a apt-get update, eg:

You get a package that comes from a PPA that you want to use and you add the package manually to /var/cache/apt/archives, because the version of the package is not present on any package list from your sources it will not be used.

Packages are also signed, so if the signature from the package does not match the expected signature then it will be downloaded again, package identification does not depend on the name of the file only.

Making it short: if the manually added package version and signature match anything in your sources package list then that package will be used, else it will be downloaded again.