get package names (untouched) after a fresh install of Ubuntu OS.. Reinstall the initial packages and remove the additional packages those are added

I have written a Python 3 script which uses Python functions as well as some Bash commands.

Pre-requisite:

Ubuntu should be installed. Script isn't modified for Kubuntu, Lubuntu or other flavors.
curl should be installed. If not installed, install it using:

sudo apt install curl

User must be using a version that is currently supported, i.e., it should have reached end of standard support.
If you are using LTS version, it should be updated to latest point release. For example, at the time of writing this answer, 18.04.3 is released. So, you should be running the same since it's hard to find the manifest for 18.04, 18.04.1 or 18.04.2.
Internet connection is required to download the manifest.

Python 3 Script:

#!/usr/bin/env python3
import os
import subprocess
def main():
    #Find release number
    a=str(subprocess.check_output("lsb_release -sr", shell=True))[2:7]

    #Check if it is LTS
    if(a[3:5]=='04' and int(a[0:2])%2==0):
        print("Since you are using LTS release, is your Ubuntu up to date? Enter 'yes' to continue.", end=" ")
        b=input()
        if(b!='yes'):
            return
        b=str(subprocess.check_output("lsb_release -sd", shell=True))[9:16]

        #Download manifest and extract the package names by removing architecture and version string
        l = os.system('curl -s http://releases.ubuntu.com/' + a + '/ubuntu-' + b + '-desktop-amd64.manifest > 1.txt; sed -i "s/\t.*//g" 1.txt; sed -i "s/:.*//g" 1.txt')
    else:
        l= os.system('curl -s http://releases.ubuntu.com/' + a + '/ubuntu-' + a + '-desktop-amd64.manifest > 1.txt; sed -i "s/\t.*//g" 1.txt; sed -i "s/:.*//g" 1.txt')

    #Get default packages in a set
    packages_initial={line.strip() for line in open("1.txt", 'r')}
    l=os.system('apt list --installed > 2.txt 2> /dev/null; sed -i "s/\/.*//g" 2.txt')

    #Get currently installed packages in a set
    packages_installed={line.strip() for line in open("2.txt", 'r')}

    #Packages that are manually installed
    l=packages_installed-packages_initial

    #Converting list into a string separated by space to pass to APT commands
    to_be_removed=' '.join(l)

    #Package count to be removed
    print(len(l), "packages will be removed.")

    #Removing those packages
    os.system('sudo apt purge '+ to_be_removed+'; sudo apt autoclean; sudo apt autoremove')

    #Install any default package that might have been deleted because of dependencies
    os.system('sudo apt install '+' '.join(packages_initial.intersection(packages_installed)))

    #Cleanup
    os.system('rm 1.txt 2.txt')
main()

I have also uploaded this script to GitHub. You can download and run that using

wget https://raw.githubusercontent.com/kulfy1/remove-manually-installed-packages/master/script.py
chmod +x script.py
./script.py

Explanation:

The above script will download the manifest file which contains the name of packages installed by default. A list will be created which contain those package names. Another list will be created which would contain currently installed package names. APT will remove the packages that were installed manually and are not in the earlier list. After removing the packages, the packages that were common in those lists would be installed, if removed due to some reasons.

Footnote:

The prompts of APT commands (such as password and confirmation to remove/install packages) are expected to be handled by the user and aren't being handled in the script since it may happen that user don't want to really remove those packages. Since script isn't run with sudo privileges, thus, no package would be removed by the script unless password and "Yes" are provided when prompted by the APT.


How do I save a file to a subfolder of home?

Your home directory is at /home/your_username/

Depending on your Ubuntu and Gimp versions, respectively: your home directory is propably represented by your own username (usually in the left pane of file picker dialogs).

Optionally, you can access it by choosing "file system" from the places list (left pane) and navigate to /home/your_username/your_subdir. Most file picker dialogs also allow you to edit the path in the location bar (usually at the top, maybe after clicking on it or pressing Strg+L) directly.


How I can configure my Intranet-connecting VPN connention not to be used for connecting into anything outside of it?

(For Greek System Language look into the screenshots)
On the network manager settings select your VPN connection

Then go into IPV4 Settings -> Routes

:

And then select the "Use this connection only for resources on its network".

Press OK and recconect into VPN.


3.0.0-13-lowlatency-pae, where can I find its source

Firstly, can you confirm that you are using the PPA at
https://launchpad.net/~abogani/+archive/ppa ?

Do you have both lines in your sources.list, the deb and the deb-src, ie (for 11.10):

deb http://ppa.launchpad.net/abogani/ppa/ubuntu oneiric main
deb-src http://ppa.launchpad.net/abogani/ppa/ubuntu oneiric main

If so, that should work - and does, for me.

My complete output (this was the second run of apt-get source so it had the downloads already):

chris@bun:~$ apt-get source linux-image-3.0.0-13-lowlatency-pae
Reading package lists... Done
Building dependency tree
Reading state information... Done
NOTICE: 'linux-image-3.0.0-13-lowlatency-pae' packaging is maintained in the 'Git' version control system at:
http://kernel.ubuntu.com/git-repos/abogani/ubuntu-oneiric-lowlatency.git
Skipping already downloaded file 'linux-lowlatency_3.0.0-13.21~ppa1.tar.gz'
Skipping already downloaded file 'linux-lowlatency_3.0.0-13.21~ppa1.dsc'
Need to get 0 B of source archives.
gpgv: Signature made Tue 18 Oct 2011 07:36:13 BST using DSA key ID BBA3222D
gpgv: Can't check signature: public key not found
dpkg-source: warning: failed to verify signature on ./linux-lowlatency_3.0.0-13.21~ppa1.dsc
dpkg-source: info: extracting linux-lowlatency in linux-lowlatency-3.0.0
dpkg-source: info: unpacking linux-lowlatency_3.0.0-13.21~ppa1.tar.gz

If yours is different can you paste the entire output (as an edit to your question) please?

EDIT: hmm -pae is only available in i386 (for obvious reasons of PAE not necessary on x64, are you i386? Just noticed your picked package has no -pae prefix (as neither did mine, but I'm on x64).


KDE - Application menu not displaying correct icon

I had exactly the same problem.
It seems that launcher cannot show the svg file.
I solved it with converting .icon.svg file to ico format. Then changed the program icon.


Mysql5.6 and problem of php5-mysql , mysql-common packages

Why do you need mysql-common? Mysql client is already there. I am not sure about Ubuntu 12.10, but on 12.04 its in /opt/mysql/server-5.6/bin.

/opt/mysql/server-5.6/bin/mysql will give you mysql shell. If you do not want to use full path, add /opt/mysql/server-5.6/bin/ to your ENV.

I added it in /etc/environment so my $PATH looks like:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/mysql/server-5.6/bin"

Then just run source /etc/environment command and hit which mysql. You should see /opt/mysql/server-5.6/bin/mysql in output.

For php5-mysql, you can instead install php5-mysqlnd.


You should try installing the catalyst driver, your card is listed as supported.

http://wiki.cchtml.com/index.php/Hardware

sudo apt-get install fglrx fglrx-amdcccle
sudo aticonfig --initial -f

That second command should configure X , if you receive an error message, post it here.

Otherwise reboot.

Additional reference

http://wiki.cchtml.com/index.php/Ubuntu_Oneiric_Installation_Guide


Ubuntu 15.10 GRUB menu option disappeared after updating Ubuntu 14.04

If I'm reading your output correctly, Ubuntu 15.10 is installed in an LVM logical volume called /dev/mapper/ubuntu-vg-root; however, the script has been unable to identify the filesystem on that logical volume. This probably means that either:

The script can't detect Ubuntu 15.10 because of a bug or misconfiguration -- This is the more optimistic cause, but it doesn't really help much because it means you're missing data. You might first try ls /dev/mapper/ubuntu-vg-root from Ubuntu 14.04. If the file isn't present, you may need to install some LVM components in Ubuntu 14.04 (try sudo apt-get install lvm2). If that causes /dev/mapper/ubuntu-vg-root to appear, try sudo update-grub and see if that helps. If /dev/mapper/ubuntu-vg-root is already present, then you could try sudo blkid /dev/mapper/ubuntu-vg-root, and/or try mounting it, to verify that the filesystem is intact.
The filesystem is damaged -- If the filesystem on /dev/mapper/ubuntu-vg-root is damaged, then you're in trouble. If you've got any critical data on that installation, you should first do a low-level backup, as in sudo dd if=/dev/mapper/ubuntu-vg-root of=/path/to/lots/of/space/u1510-backup.img. You can then try sudo fsck /dev/mapper/ubuntu-vg-root to repair it. If the repair is successful, doing a sudo update-grub might bring it back to the boot menu.

An entirely different approach is to try another boot method. In particular, my rEFInd boot manager might help:

Download the USB flash drive or CD-R version of rEFInd from its downloads page.
Prepare a boot medium from rEFInd.
If Secure Boot is enabled, disable it. (You can re-enable it later, if you like.)
Boot to the rEFInd medium. It should show options for both of your Ubuntu installations, although the labels may not be clear. The 14.04 installation will probably refer to booting boot\vmlinuz-3.13-*, whereas the 15.10 installation will probably refer to booting vmlinuz-4.2.0-* (no leading boot\, and a higher kernel version number).
Highlight the 15.10 entry and hit F2 or Insert twice. This will open a simple text-mode line editor with kernel options.
Add ro root=/dev/mapper/ubuntu-vg-root to the boot options.
Hit Enter.

If rEFInd boots Ubuntu 15.10, you can install the rEFInd Debian package or PPA. This will make rEFInd the default boot program. You can do the installation from either distribution, but with different consequences:

From 14.04 -- Both distributions' kernels will show up in the rEFInd menu, so you'll be able to boot either directly; however, you'll need to add kernel options manually when you boot 15.10, at least the first time you do so. (You can run the mkrlconf script, which comes with rEFInd, from 15.10, to create a configuration file that obviates the need to manually modify the boot options. You'll need to copy that script from the 14.04 installation, or at least mount the 14.04 partition in 15.10 so you can access that script.)
From 15.10 -- The configuration file created by mkrlconf will be created automatically by the package installation, so you'll be able to boot 15.10 without modifying its boot options; however, the EFI filesystem driver needed to access your 14.04 kernel will not be installed. Thus, to boot 14.04, you'll need to do so via GRUB, which should appear as an option. You can manually install the ext4fs driver, or re-install rEFInd from 14.04, if you want to be able to boot the 14.04 kernel directly from rEFInd, without using GRUB.

Note that using rEFInd will probably not work if the filesystem for your 15.10 installation is damaged. At best, it will show an option for the 15.10 kernel, but launching that kernel will fail at some point, perhaps with a message about filesystem damage. rEFInd is most likely to be helpful if the root cause is a lack of LVM support in Ubuntu 14.04 or some other glitch in the GRUB scripts for detecting Ubuntu 15.10.


update-alternatives does not work due to /usr/local/bin precedence

To answer your first question

  Why update-alternatives has not created the link in /usr/local/bin for maintaining for proper searching of application ?

This is simply because alternatives for python3 is configured at the moment to create the symbolic link in /usr/bin. From your output above:

sudo update-alternatives --config python3
There are 3 choices for the alternative python3 (providing /usr/bin/python3).
...

It pretty normal for any Linux distribution to search /usr/local/bin before /usr/bin for executables, as this gives you the freedom to put any binaries and libraries into /usr/local without interfering with the dpkg packages.

For you specific problem and from the output of sudo update-alternatives --config python3 I guess /usr/local/bin/python3 is a symbolic link to /usr/local/bin/python3.7

root@host:~# ls -l /usr/local/bin/python3
lrwxrwxrwx 1 root root 25 Sep 22 15:36 /usr/local/bin/python3 -> /usr/local/bin/python3.7

If that is the case, just remove the symbolic link /usr/local/bin/python3 and you should be fine, since when calling python3 only /usr/bin/python3 is found, which should point to /etc/alternatives/python3 which in turn should point to the selected binary.
If /usr/local/bin/python3 is not a symbolic link, rename it and configure update-alternatives appropriately.

While this might save you for now, the next update might render your configuration useless again. The symbolic link /usr/bin/python3 is shipped with the package python3-minimal and by managing this link with update-alternatives the symbolic link is broken from the view of the python3-minimal package. The next update of this package could fix this problem, but then the link is broken from the view of update-alternatives.

To come around both problems, it would be better to configure update-alternatives to use /usr/local/bin/python3 as the symbolic link providing the selected version.
To do so, the steps as follows should do the trick, including fixing the /usr/bin/python3 link.

sudo update-alternatives --install /usr/local/bin/python3 python3 /usr/bin/python3.6 2
apt-get install --reinstall python3-minimal


Can't access git repository of ubuntu 16.04 LTS from another OS

Nope. You should add a right path when using git remote add:

git remote add origin ssh://devloper@192.168.2.3:/opt/lampp/htdocs/Project/code_server


Use your UP/DOWN keys to select/highlight Ubuntu, don't use the mouse arrow/cursor. Besides, check the connection of your keyboard (is it a USB keyboard? if it's so, try plugging it in a different USB port. It's happened to me that a USB Keyboard gave problems at boot because it wasn't being recognized by the system).


How to fix Secure Boot error "Image failed to verify with *ACCESS DENIED*" on startup?

According to https://bugs.launchpad.net/bugs/1528345 this was caused by Ubuntu shipping security updates for grub in an incorrect way, and can be fixed by installing the package grub-efi-amd64-signed, and then reenabling secure boot in the BIOS.  This worked for me.  (I also checked that reinstalling the package caused shimx64.efi to show up in the output of efibootmgr -v instead of grubx64.efi, which was there while the problem was present.)


Installer goes black on Thinkpad T495 with Ubuntu 20.04

Solution - So eventhough BitLocker was not enabled on Windows, the drive was still encrypted. Also, the live USB installation needed to be re-installed as the failed attempt to install messed it up. The solution was to decrypt the drive in Windows and re-install the live USB and install Ubuntu.


Synaptic Package Manager doesn'd know about Snap (Gnome Software Center), and vice versa

Both types of packages already do work side-by-side in Ubuntu Software.

Snap Store is deliberately snap-only. It's intended for other distros that don't use debs. You can use it in Ubuntu, but it's still going to be snap-only. Some folks get confused because LOOKS like Ubuntu Software (they both come from the same codebase), but it has a different intended use.

Synaptic is deliberately deb-only. It's intended for all distros that use use debs, and the developers seem to have no interest at the moment in changing that intent.


You have to install gWakeOnLAN application:
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install gwakeonlan


VNC Server does not show you the login screen - instead it takes you straight to the desktop, after you have logged in. If your goal is make sure that the users can log in remotely with a GUI without interrupting the other users who are already logged in, here is what you need to do.

First, install vnc onto your machine.

sudo apt-get install vnc4server

For each user, you can make them set a vnc password

vncpasswd

that asks for a password. Afterwards, each user can log in remotely (via the command line) and set up their own VNC server:

vncserver

This will output something like

  New 'machine:1 (user)' desktop is machine:1

  Creating default startup script /home/user/.vnc/xstartup
  Starting applications specified in /home/user/.vnc/xstartup
  Log file is /home/user/.vnc/machine:1.log

Once this is done, each user can log in to the GUI of their respective accounts using your machine's ip address and the desktop session number. In the above example, if the IP address of the machine is 10.0.0.1 then you can can put 10.0.0.1:1 as the server to connect to in the VNC client.


How to setup Postfix using ubuntu server to work with " Google Apps for Work" - email

So my answer is that nothing on the server needs to be changed. The MX records still reside on your DNS (not sure in which case it would not), so you change the MX with your DNS even although you do not have a cpanel like setup and you have postfix.

Hope that helps others in the future :)


Wifi not working (Greyed out in NetworkManager)

Try to change the parameter of wireless driver as follows and check the reported issuse.

  change 802.11bgn to 802.11bg.

iwconfig wlan0 modu 11g

  change the wep encryption to just wpa2 (CCMP)(AES) not (TKIP) if you have that option it will work best.

wpa-pairwise CCMP

  Set your wireless channel in the router to 1 or 11 then save the router configuration and reboot it.

iwconfig wlan0 channel #

  Go into network manager at top right corner of the screen and click on edit connections>wireless tab and set IPV6 to ignore.

Now open the terminal CTRL+ALT+_T then copy and paste the following code one line at a time for accuracy:

echo "options rtl8192ce swenc=1 ips=0" | sudo tee /etc/modprobe.d/rtl8192ce.conf
sudo modprobe -rfv rtl8192ce
sudo modprobe -v rtl8192ce

IF the issue persists, try compiling new driver. Hope this helps!


I accidentally unset $PATH. Why did `echo` still work?

echo is a bash builtin. It does not use the $PATH to find the echo program, instead bash has it's own version of echo which is used instead of the echo program located in your $PATH

read more here:
Bash Builtins (Bash Reference Manual)


Unable to open files on Windows Partition from Ubuntu

For some reason, it was only the files which were under 'my documents' in windows 7 do not open correctly. I moved the files which I needed to a different temp folder in the root C:\ and then I can access them correctly from ubuntu.


How do I start my network bridge automatically upon boot?

You could try the following settings:

auto lo

auto eth0

iface eth0 inet static

auto eth1

iface eth0 inet static

auto bridge0

iface bridge0 inet static


Mailspring scroll not working on Ubuntu 18.04

At first you have to inform snap developer about the problem.
Then remove buggy snap'd version with
snap remove mailspring

and download deb-version from the official site and install it instead.

Also note that there are some mature free alternatives like Thunderbird, GNOME Evolution, Geary and others.


You can use Youtube-dlG, a multi-platform GUI for youtube-dl. The GUI lets you download multiple videos at once, can automatically convert downloaded videos to audio, lets you select the video quality and more.

To install it in Ubuntu, you can use the main WebUpd8 PPA:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install youtube-dlg

For more information, see the article on WebUpd8: Multi-Platform youtube-dl GUI: YouTube dlG


My approach assumes that your server has a single NIC, and you need to share that NIC between the host and the LXC guests. This involves using a bridge. The bridge owns and manages eth0. The host now configures its own networking on br0 instead of eth0. The LXC guests are configured to connect to the bridge.

On the host, sudo apt-get install bridge-utils.
On the host, replace eth0 with a bridge:

This is dangerous. Get this wrong and you could be locked out of your server. Be sure to have a local login enabled and that local console access works, so that you can revert this change if you have any problems.

In /etc/network/interfaces:

Replace auto eth0 with auto br0.
Replace:

iface eth0 inet dhcp

with:

iface br0 inet dhcp
    bridge_ports eth0

If you had a static network configuration, then you'd replace:

iface eth0 inet static
    address ...
    netmask ...
    gateway ...
    etc.

with:

iface br0 inet static
    bridge_ports eth0
    address ...
    netmask ...
    gateway ...
    etc.

You're just changing eth0 for br0 and adding the bridge_ports eth0 line.
Reboot the host. If you were doing this locally, then running sudo ifdown eth0 before you started, and sudo ifup br0 afterwards would also do. Note that the bridge can take a little time to come up, so give it five minutes after reboot before you assume that all is lost.

To move a given named LXC container over to a public IP:

Stop the container.
On the host, edit /var/lib/lxc/container_name/config and change lxc.network.link to br0.
On the host, edit /var/lib/lxc/container_name/rootfs/etc/network/interfaces and configure your public IP as you would normally (DHCP or a static configuration as needed). Note that the interface is still called eth0 from the point of view of the container.
Restart the container.

To change the default for new LXC containers, edit /etc/lxc/default.conf on the host and change lxc.network.link to br0.
If you don't need the LXC-provided NAT bridge at all (ie. all your containers will use the new bridge instead), then on the host edit /etc/default/lxc and change USE_LXC_BRIDGE to "false", and then on the host run sudo service lxc restart.


Is there a way to add to the "Recently Used" list (that appears in file dialogs) from the command-line?

A script to do this can be found in the recently_used github repo. Usage is pretty straightforward:

$ recently_used.py foo.txt bar.png

This adds the files foo.txt and bar.png to the recently used list used by GTK+ apps.


Steam using wrong file association for inode/directory (kid3)

The only solution that worked for me was adding ~/.mailcap with following contents:

inode/directory; XDG_CURRENT_DESKTOP=kde dolphin %s; test=test -n "$DISPLAY"


Getting "Failed to download repository information"  error while updating?

Try to change your source list to main server and see to it if it download the files.

Ubuntu Software Center -> Edit -> Software Center -> Ubuntu Software -> Download From and change your server to Main. Reload your sources.


Do you mean you use Ubuntu live on a USB stick? There the user is ubuntu and no password.


18.04.1 LTS Apache Module mod_md needs mod_watchdog

It looks like mod_watchdog is a part of the package apache2-dev. So what I've tried on a virtual machine is:

sudo apt install apache2-dev
sudo apt install libapache2-mod-md
sudo a2enmod md
sudo systemctl restart apache2.service

There wasn't provided any error message. So probably you will be able to use mod_md - I haven't made further tests...

If the above doesn't help, another alternative, that you can try is to extract this module from a package of any other Linux distribution, where it is compiled. Time ago, I was made this for mod_authn_google.so - review section 6 in this answer.

Ubuntu 18.04 Bionic comes with Apache/2.4.29. I found mod_watchdog-2.4.23-1...x86_64.rpm in this repository, and probably it will be comparable with the Apache's version of Bionic. So the steps to deploy this package on your system are:

# Install the dependencies
sudo apt install rpm2cpio

# Download the package
cd $HOME/Downloads
wget http://abf-downloads.openmandriva.org/3.0/repository/x86_64/main/release//apache-mod_watchdog-2.4.23-1-omv2015.0.x86_64.rpm

# Extract the module file
rpm2cpio apache-mod_watchdog-2.4.23-1-omv2015.0.x86_64.rpm | \
cpio -iv --to-stdout ./usr/lib64/apache/mod_watchdog.so > mod_watchdog.so

# Deploy the module
sudo mv mod_watchdog.so /usr/lib/apache2/modules/
sudo chown root:root /usr/lib/apache2/modules/mod_watchdog.so
sudo chmod 644 /usr/lib/apache2/modules/mod_watchdog.so

# Create .load file
echo "LoadModule mod_watchdog /usr/lib/apache2/modules/mod_watchdog.so" | \
sudo tee /etc/apache2/mods-available/mod_watchdog.load

# Enable the module and restart Apache2
sudo a2enmod mod_watchdog
sudo systemctl restart apache2.service


Will this 'find and delete' command work with the asterisk even with quotes?

You need to reformat your command a bit for it to work.

Try this:

find "/home/user/videos folder" -name "*.avi" -mtime +7 -exec rm -f {} \;

Or, in GNU find, to achieve the same thing without -exec:

find "/home/user/videos folder" -name "*.avi" -mtime +7 -delete

The first argument to find is the folder to look in - you shouldn't try and put your entire filter in here, just the starting point. Then use -name to tell it what pattern to look for. You can try this without the -exec or -delete first until you are satisified, then you won't do any damage by trying it.

Enclosing an argument in quotes basically stops the shell from messing with it. If you use -name *.avi, then the argument that find will see could be anything, because the shell will parse it (and replace it with the contents of the current directory that end in .avi) before calling find. This is usually bad and will lead to unexpected results. find knows how to parse * itself.


Ubuntu 14.04 Server, launch jar in screen on boot/restart

I changed

cd /home/teamspeak/sbot

To

cd /home/teamspeak/sbot/

And it loaded into the directory correctly without an error


It's not a (significant) privacy flaw. The browser sends a User-Agent string with each request anyway. For example, Firefox running on Ubuntu sends the following string with each request:

  Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

All the web sites that you visit using Firefox on Ubuntu know that you are running Ubuntu (or a derivative such as Linux Mint).


Porting "import gobject" to use GObject-Introspection. (PyGTK to PyGI and GTK 3)

Think I've cracked the code after dir()-ing everything I could find in the GObject class =>

G_SIGNAL_RUN_FIRST is found in the GSignalFlags enum, which translates to GObject.SignalFlags.RUN_FIRST. This is consistent, so G_SIGNAL_MATCH_ID found in the enum GSignalMatchType translates to GObject.SignalMatchType.ID.

Not entirely obvious, but easy enough once you know what to look for.


Beginner having problem with starting Ubuntu

For the ttySO error I have been searching for forums and I have used these commands
systemctl status systemd-modules-load.service
It has answered me

Active failed

And I have executed the following command
/lib/systemd/system-modules-load
Failed to insert ipmi_si No such device

For the ttySO error I have been looking for forums and I have used these commands
'Systemctl state systemd-modules-load.service'
He has answered me

'Active Error'

And I have executed the following command
/Lib /systemd /system-modules-load
Error inserting ipmi_si No device of this type

Can that be why it does not start?


Write script to open browser at specific URL on login?

For this case I am going to imagine a scenery. First of all let's say I need a script to open a web browser in certain Youtube Video(s) and each time it opens on boot I need the videos to be played with a random different duration.

First of all let's create the file, I am calling this "youtuviewer.sh", inside of which I am going to set this portions of code:

#!/bin/bash
chromium-browser http://www.youtube.com/watch?v=7bLaLJ51rRk http://www.youtube.com/watch?v=OxYSaT_NfjQ &
n=$((RANDOM%90+30))
echo $n
sleep $n
killall chromium-browser
echo "all done!"

I explain it quickly:

Line 1: The executable will invoke bash to interpret the
instructions after which
Line 2: chromium-browser will run (it can be replaced by firefox or
any other web browser). The browser will open the youtube
links in the list in separated tabs, the list should be separated by a space. The ampersand (&) will
instruct that after executing that line, the rest of the script
should be executed and the chromium-browser instance should be left
running meanwhile.
Line 3: We are going to generate a random number, between 30 and 90
and store it in a variable called "n". This will be the number of
seconds that we are going to use in the next lines.
Line 4: We write on the terminal how many seconds will be used based
on the random number.
Line 5: We make the script to "sleep" the "n" number of seconds.
Line 6: We kill chromium-browser in order to continue. This line
will be executed only after Line 5 finishes waiting ("sleeping") the
amount of seconds stored on the "n" variable.
Line 7: We celebrate saying "all done!" in the terminal.

A more complex example can be made with this 7 lines, indeed. You can make it in just one line, everything depends on what you wish to achieve.

We are going to set execution permissions to the file via your favorite file browser (nautilus comes to my mind) or via terminal. See this: How do I run .sh files?

Now we need to setup the file to be run on boot, we can achieve this via cron (see this: How do I set up a Cron job?) or by using the "Startup applications" dialog (see this: How to add application to startup application menu?).

This is the simplest way I find to do what the edits by @ImaginaryRobots let's see.

If you need further assistance don't hesitate to let us know.

Good luck!


To start Anbox type "anbox" in the Dash and click the Anbox icon to start the Anbox Application Manager.
Nvidia proprietary graphics drivers still don't work on Wayland and only work on Xorg in Ubuntu 17.10. In order to enter an X session from the GDM login screen select Ubuntu on Xorg. If you have installed the Nvidia graphics driver it should work if you do this. To prove that it is working you can also install nvidia-settings.


How to group different apps in one launcher in gnome?

One way to work like this is to use workspaces. Open "grouped" applications on one workspace, a different group on the other. You can then switch between groups, aka workspaces by:

Using the Overview
Using Super+PgDn/PgUp or Ctrl+Alt+Up/Dn

You can even assign shortcut keys to quickly move to one desktop aka group. For example,
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-2 "['<Super>F2']"

will allow you to quickly switch to Workspace 2 with Super+F2. Reset to default (no key assigned) with the command:
gsettings reset org.gnome.desktop.wm.keybindings switch-to-workspace-2

Rather than using commands, you can also assign these keys using dconf-editor (not installed by default).
You can use the "Auto move" gnome shell extension to have applications automatically launch on a specific workspace. "Auto move" is an "official" gnome shell extension, that you can install by installing the package gnome-shell-extensions. You need to activate the extension using "Gnome Tweaks" or the "Extensions" tool (newer Ubuntu versions only).
For this to work well, you better move from dynamic workspaces to static workspaces. You can change that in "Gnome Tweaks" on the "Workspaces" tab.


The script has gone to the background and has returned your prompt. The problem is that you aren't redirecting its output anywhere, so that still appears in your terminal. Sending a command to the background just means it will continue running and you can do other things in the parent shell. However, since the command is running, its output (both stdout and stderr) are still connected to your current terminal and that's why you still see them.

So, to send a command to the background and hide its output, you need:

Redirect stdout only so that any error messages are still printed to the terminal:

./leap > leap.log &

Redirect stderr only so that output but not errors still appears on the terminal:

./leap 2> leap.log &

Redirect both so that nothing is printed to the terminal:

./leap > leap.log 2>&1 &

Or (if your shell supports it)

./leap &> leap.log &

In all examples, to discard the output instead of saving to a file, use /dev/null instead of leap.log.


I am trying to do the same and so far as I have heard there is a software which names is Synology, I have not installed it but I may do it. Also I found another software which names is freenasa, you can find it here http://www.freenas.org/,
if I find something that could help us I will let you know, good luck buddy!!!!


SWAP can best be described as "virtual memory" I am not an expert on explaining this, but what it does is create a small partition that your system sees as RAM. It then uses this space BEFORE accessing ram when you are running applications, thus allowing your computer to be faster because applications use less actual RAM.

The recommendations I have seen the most (& that I follow) is create a Swap of approximately half your physical ram (if you have 2GB RAM, create 1GB swap)
Keep in mind however, if you install Ubuntu 12.10, you don't really have to worry about this since the installer can do it all for you. Unless you want to do it yourself of course!


You can do one of two things.

This ppa has not been updated since 2013 so it may be wise to not use it for now. You can however download the most recent version of nitrotasks from https://launchpad.net/~cooperjona/+archive/ubuntu/nitrotasks/+packages and install it manually.

First, to delete the outdated ppa open a terminal and execute the following commands:

sudo rm /etc/apt/sources.list.d/cooperjona-ubuntu-nitrotasks-utopic.list*

Now, update your package list:

sudo apt-get update

Finally, download the desired software directly from the ppa and install it:

wget https://launchpad.net/~cooperjona/+archive/ubuntu/nitrotasks/+files/nitrotasks_1.5-0%7E31%7Esaucy1_all.deb

install it:

sudo dpkg -i nitrotasks_1.5-0~31~saucy1_all.deb

resolve dependencies:

sudo apt-get -f install


This is actually pretty easy to achieve using xmodmap. Simply make a new file, with the following:

keycode  10 = exclam 1 exclam 1
keycode  11 = at 2 at 2
keycode  12 = numbersign 3 numbersign 3
keycode  13 = dollar 4 dollar 4
keycode  14 = percent 5 percent 5
keycode  15 = asciicircum 6 asciicircum 6
keycode  16 = ampersand 7 ampersand 7
keycode  17 = asterisk 8 asterisk 8
keycode  18 = parenleft 9 parenleft 9
keycode  19 = parenright 0 parenright 0

Save it in the root of your home directory as .Xmodmap (capitalization is important). Now, just log off and back in (you may have to reboot), and your keys will be swapped. Keep reading for how I came up with this. The information I used to figure this out came from here. Fire up a terminal and type the following command:

xmodmap -pke

This will spit out a bunch of keycode setting/value pairs, like this:

......
keycode  27 = r R r R
keycode  28 = t T t T
keycode  29 = y Y y Y
keycode  30 = u U u U
keycode  31 = i I i I
keycode  32 = o O o O
keycode  33 = p P p P
keycode  34 = bracketleft braceleft bracketleft braceleft
keycode  35 = bracketright braceright bracketright braceright
keycode  36 = Return NoSymbol Return
keycode  37 = Control_L NoSymbol Control_L
keycode  38 = a A a A
keycode  39 = s S s S
keycode  40 = d D d D
keycode  41 = f F f F
keycode  42 = g G g G
keycode  43 = h H h H
keycode  44 = j J j J
keycode  45 = k K k K
......

The keycode is the key on your physical keyboard, and the value on the right of the equals sign is what gets sent to your PC. The reason there are four is the first is plain, the second one is with shift pressed, and the third (plain) and forth (shift) seem to be enabled once you click the Scroll Lock button. As you can see, this give you a lot of flexibility to do whatever you can dream up to modify your keyboard.

Now, this will only work when you are logged in to X (as in the GUI), hence the name. If you fire up a terminal in Gnome, Unity, etc. you are still good using Xmodmap, but if you want the same functionality in the console (i.e. after pressing CTRL+ALT+1, sshing into a box, working on a server, or a PC with no GUI) you will need to use loadkeys. Although the general idea is the same, loadkeys offers much more functionality and granularity, so it is slightly more complicated. Now, these commands all MUST be done from the actual console, they can not be done with a terminal emulator, or you will receive an error, like this: Couldn't get a file descriptor referring to the console.

First we will need to create our default keymap, like this:

dumpkeys > ~/my_keymap.map

It would be a good idea to make a copy of this in case you really mess it up. Now, we just need to edit it, with our changes. Each key definition looks like this:

keycode   2 = one              exclam           one              one
    alt keycode   2 = Meta_one
    shift   alt keycode   2 = Meta_exclam
    altgr   alt keycode   2 = Meta_one
    shift   altgr   alt keycode   2 = Meta_one
    shiftl  keycode   2 = one
    shift   shiftl  keycode   2 = exclam
    altgr   shiftl  keycode   2 = one
    shift   altgr   shiftl  keycode   2 = one
    alt shiftl  keycode   2 = Meta_one
    shift   alt shiftl  keycode   2 = Meta_exclam
    altgr   alt shiftl  keycode   2 = Meta_one
    shift   altgr   alt shiftl  keycode   2 = Meta_one
    shiftr  keycode   2 = one
    shift   shiftr  keycode   2 = exclam
    altgr   shiftr  keycode   2 = one
    shift   altgr   shiftr  keycode   2 = one
    alt shiftr  keycode   2 = Meta_one
    shift   alt shiftr  keycode   2 = Meta_exclam
    altgr   alt shiftr  keycode   2 = Meta_one
    shift   altgr   alt shiftr  keycode   2 = Meta_one
    shiftl  shiftr  keycode   2 = one
    shift   shiftl  shiftr  keycode   2 = exclam
    altgr   shiftl  shiftr  keycode   2 = one
    shift   altgr   shiftl  shiftr  keycode   2 = one
    alt shiftl  shiftr  keycode   2 = Meta_one
    shift   alt shiftl  shiftr  keycode   2 = Meta_exclam
    altgr   alt shiftl  shiftr  keycode   2 = Meta_one
    shift   altgr   alt shiftl  shiftr  keycode   2 = Meta_one
    ctrll   keycode   2 = one
    shift   ctrll   keycode   2 = exclam
    altgr   ctrll   keycode   2 = one
    shift   altgr   ctrll   keycode   2 = one
    alt ctrll   keycode   2 = Meta_one
    shift   alt ctrll   keycode   2 = Meta_exclam
    altgr   alt ctrll   keycode   2 = Meta_one
    shift   altgr   alt ctrll   keycode   2 = Meta_one
    shiftl  ctrll   keycode   2 = one
    shift   shiftl  ctrll   keycode   2 = exclam
    altgr   shiftl  ctrll   keycode   2 = one
    shift   altgr   shiftl  ctrll   keycode   2 = one
    alt shiftl  ctrll   keycode   2 = Meta_one
    shift   alt shiftl  ctrll   keycode   2 = Meta_exclam
    altgr   alt shiftl  ctrll   keycode   2 = Meta_one
    shift   altgr   alt shiftl  ctrll   keycode   2 = Meta_one
    shiftr  ctrll   keycode   2 = one
    shift   shiftr  ctrll   keycode   2 = exclam
    altgr   shiftr  ctrll   keycode   2 = one
    shift   altgr   shiftr  ctrll   keycode   2 = one
    alt shiftr  ctrll   keycode   2 = Meta_one
    shift   alt shiftr  ctrll   keycode   2 = Meta_exclam
    altgr   alt shiftr  ctrll   keycode   2 = Meta_one
    shift   altgr   alt shiftr  ctrll   keycode   2 = Meta_one
    shiftl  shiftr  ctrll   keycode   2 = one
    shift   shiftl  shiftr  ctrll   keycode   2 = exclam
    altgr   shiftl  shiftr  ctrll   keycode   2 = one
    shift   altgr   shiftl  shiftr  ctrll   keycode   2 = one
    alt shiftl  shiftr  ctrll   keycode   2 = Meta_one
    shift   alt shiftl  shiftr  ctrll   keycode   2 = Meta_exclam
    altgr   alt shiftl  shiftr  ctrll   keycode   2 = Meta_one
    shift   altgr   alt shiftl  shiftr  ctrll   keycode   2 = Meta_one

As you can see, it offers a lot more functionality/granularity. For each key, just swap the shift and regular values, i.e. here would be the swapped one key:

keycode   2 = exclam              one           exclam              exclam
    alt keycode   2 = Meta_exclam
    shift   alt keycode   2 = Meta_one
    altgr   alt keycode   2 = Meta_exclam
    shift   altgr   alt keycode   2 = Meta_exclam
    shiftl  keycode   2 = exclam
    shift   shiftl  keycode   2 = one
    altgr   shiftl  keycode   2 = exclam
    shift   altgr   shiftl  keycode   2 = exclam
    alt shiftl  keycode   2 = Meta_exclam
    shift   alt shiftl  keycode   2 = Meta_one
    altgr   alt shiftl  keycode   2 = Meta_exclam
    shift   altgr   alt shiftl  keycode   2 = Meta_exclam
    shiftr  keycode   2 = exclam
    shift   shiftr  keycode   2 = one
    altgr   shiftr  keycode   2 = exclam
    shift   altgr   shiftr  keycode   2 = exclam
    alt shiftr  keycode   2 = Meta_exclam
    shift   alt shiftr  keycode   2 = Meta_one
    altgr   alt shiftr  keycode   2 = Meta_exclam
    shift   altgr   alt shiftr  keycode   2 = Meta_exclam
    shiftl  shiftr  keycode   2 = exclam
    shift   shiftl  shiftr  keycode   2 = one
    altgr   shiftl  shiftr  keycode   2 = exclam
    shift   altgr   shiftl  shiftr  keycode   2 = exclam
    alt shiftl  shiftr  keycode   2 = Meta_exclam
    shift   alt shiftl  shiftr  keycode   2 = Meta_one
    altgr   alt shiftl  shiftr  keycode   2 = Meta_exclam
    shift   altgr   alt shiftl  shiftr  keycode   2 = Meta_exclam
    ctrll   keycode   2 = exclam
    shift   ctrll   keycode   2 = one
    altgr   ctrll   keycode   2 = exclam
    shift   altgr   ctrll   keycode   2 = exclam
    alt ctrll   keycode   2 = Meta_exclam
    shift   alt ctrll   keycode   2 = Meta_one
    altgr   alt ctrll   keycode   2 = Meta_exclam
    shift   altgr   alt ctrll   keycode   2 = Meta_exclam
    shiftl  ctrll   keycode   2 = exclam
    shift   shiftl  ctrll   keycode   2 = one
    altgr   shiftl  ctrll   keycode   2 = exclam
    shift   altgr   shiftl  ctrll   keycode   2 = exclam
    alt shiftl  ctrll   keycode   2 = Meta_exclam
    shift   alt shiftl  ctrll   keycode   2 = Meta_exclam
    altgr   alt shiftl  ctrll   keycode   2 = Meta_exclam
    shift   altgr   alt shiftl  ctrll   keycode   2 = Meta_exclam
    shiftr  ctrll   keycode   2 = exclam
    shift   shiftr  ctrll   keycode   2 = one
    altgr   shiftr  ctrll   keycode   2 = exclam
    shift   altgr   shiftr  ctrll   keycode   2 = exclam
    alt shiftr  ctrll   keycode   2 = Meta_exclam
    shift   alt shiftr  ctrll   keycode   2 = Meta_one
    altgr   alt shiftr  ctrll   keycode   2 = Meta_exclam
    shift   altgr   alt shiftr  ctrll   keycode   2 = Meta_exclam
    shiftl  shiftr  ctrll   keycode   2 = exclam
    shift   shiftl  shiftr  ctrll   keycode   2 = one
    altgr   shiftl  shiftr  ctrll   keycode   2 = exclam
    shift   altgr   shiftl  shiftr  ctrll   keycode   2 = exclam
    alt shiftl  shiftr  ctrll   keycode   2 = Meta_exclam
    shift   alt shiftl  shiftr  ctrll   keycode   2 = Meta_one
    altgr   alt shiftl  shiftr  ctrll   keycode   2 = Meta_exclam
    shift   altgr   alt shiftl  shiftr  ctrll   keycode   2 = Meta_exclam

The reason for the extra granularity, is because you tend to use a lot more keyboard shortcuts when using the console, due to it's nature.

Now, to test your changes, you can use the following command:

loadkeys ~/my_keymap.map

Play around, use some programs you usually use, and make sure it works the way you want. If you messed up, you can just use the loadkeys command to fall back to the default. To make it permanent, you can add the command to the end of your ~/.bashrc file.


Press Ctrl+Alt+F3 at login screen and login into the shell. once the terminal is open install nvideia driver using the cmd sudo apt install nvidia-384 and reboot the machine the above steps worked for me when i have the same issue but with ubuntu 18.04


Can't install MyPaint on 18.10 from usual repository (not flatpak or snap)

sudo apt install mypaint-data

This command line resolves the problem but it removes Gimp (and installing Gimp after MyPaint will remove MyPaint).


How to know if a pendrive can be safety removed?

When I click safely remove and I no longer see the drive icon on the side menu, I figure the drive has been safely removed, never lost any data assuming this.

I'm quite sure if the drive is still running the icon remains in place and you get a "the volume is busy" warning.

This is confirmed by:

https://help.ubuntu.com/stable/ubuntu-help/files-removedrive.html


Nautilus' remote folder default mount point

Remote folder mounts are only available to other applications which are using the gvfs APIs for file operations, and which claim to support remote file operations when creating the file chooser dialog, to open files.

These folders aren't mounted in the typical sense of the word, as they are virtual file systems managed by gvfs. However, they can be accessed in applications which only support classic POSIX file operation calls, by looking under the ~/.gvfs/ or /run/user/$USERNAME/gvfs directory, where $USERNAME is replaced with your username, to browse the mounts and files within, if you have the gvfs-fuse package installed. You may need to unmount and re-mount the remote directory after installing, or possibly even log out and back in.


Startup-Applications; difference between remove and uncheck

If you remove it, its representation in ~/.config/autostart/ (.desktop file) is deleted.
If you uncheck it, its line in the .desktop file:

X-GNOME-Autostart-enabled=true

is changed into:

X-GNOME-Autostart-enabled=false

In your specific case:

The original of the .desktop file in your example resides in /etc/xdg/autostart, which is the "global" directory for autostart applications. These work for all users.
If you uncheck one of these, a local copy is made, with the changes I described.
The local, "unchecked" one will then overrule the one in /etc/xdg/autostart.


Unnable to acces other drives and partition due to insuficent permissions

I found a thread over on Ubuntuforums that while old, basically covers how to recover from your scenario. You'll want to return your Ubuntu uid back to its original value, which should be 1000 with sudo usermod -u 1000 your_username

This thread on superuser has some options for mounting the Mac partition as read/write, though there may be some issues with having to either disabling journaling on the Mac partition or only having root-level access to it. You might be able to get it to mount with the correct uid with an entry in fstab but I have never seen instructions for mounting HFS+ partitions via fstab.


How to run my C programs with the Bourne Shell?

Typing sh program_name assumes that program_name is a shell script and executes the script (so it must be in a sh/bash language).
If Fortune_Teller_5000 is a binary file (a Compiled C program, or even C source code), running sh Fortune_Teller_5000 will not work as expected.

Here are 2 ways you could do it:

Type sh then ENTER, and then type ./Fortune_Teller_5000 (you may need to cd into the proper directory)
Type sh -c ./Fortune_Teller_5000 or sh -c /path/to/folder/Fortune_Teller_5000


Unable to modify display settings (GUI fails silently)

I ended up solving this issue myself. The solution, for me, was a program called arandr. arandr, as far as I can tell, is a GUI for xrandr -- the command line tool for managing monitor layouts.

I installed the program with:

sudo apt install arandr

It was easy to use and worked perfectly. I'm still not sure why the built-in tool doesn't work, but I'm happy to have the problem solved.

(Presumably, you could also solve this using xrandr if you know what you're doing. Unfortunately, I don't.)


This was answered in a comment by Thomas:

It might be that the USB 3.0 port does not provide enough power for your external drive or the controllers are not compatible. In both cases you could try to connect the external drive via an USB hub, which should have an external power supply to provide more power on the USB bus.

– Thomas Dec 3 '16 at 13:44
When dmesg outputs messages like "device descriptor read/8, error -110", this usually means there is a hardware problem. As waltinator pointed out, this particular set of messages had the more specific suggestion, "Maybe the USB cable is bad?"
The Linux kernel cannot typically distinguish between a bad USB cable and other problems preventing power or data from being transmitted. Besides the cable, it is in general worth checking the connections and ensuring the device is adequately powered.
You found that using a powered hub fixed the problem, which makes sense given the error messages. Future readers who see similar messages would be well served to try this, as well as to consider other hardware problems (some of them easily fixable) that might interfere with data or power.


The location of the X cookie file is indicated by the XAUTHORITY environment variable.
~/.Xauthority is the default location of the X cookie file, when the variable is not present in the environment. If an application looks for ~/.Xauthority when XAUTHORITY is present, it's buggy. ln -s "$XAUTHORITY" ~/.Xauthority should work, though¹. If it doesn't work, tell us what happens: copy-paste the error message; or if you get no error message, tell us the output of ls -l "$XAUTHORITY" ~/.Xauthority.

Note that when you are running commands as root through sudo, the XAUTHORITY variable is removed from the environment. You should avoid running commands as root. For example, don't run gksu "xfce4-terminal" to run a terminal emulator as root. If you really want to run a shell as root, open an ordinary terminal, and run sudo -s inside it.

¹  Unless your home directory is shared (typically over NFS) between several Linux machines.


Add custom application media controls in unity panel volume control

You have to create a MPRIS DBUS interface same as any other player.

MPRIS D-Bus Interface Specification

Some thing else related to the sound indicator, your app should have an .desktop to be identified by the indicator.


how do I make nautilus to automatically suggest the folder 'Documents' for pdf files?

Why...

In this answer I'm concentrating on evince since you mentioned this as your key application in the question.

Looking at the source-code, the Save-As dialog only sets the default filename.  Since no folder is defined, the GTK3 libraries assume that the Recently Used folders is the first folder to be displayed in the dialog.

GTK3 applications have to explicitly set the folder to first search in.

Personally I think the default folder for evince should be defined - as such you should file this on bugzilla as a bug/wish-list request.

How...

The following is one way way to force evince to default to the Documents folder rather than the previous recently used.

In summary, the source is changed to obtain the default Document folder and set this as the default folder for the Save-As dialog.

install the basic development tools

sudo apt-get install devscripts build-essential fakeroot

get the source

cd ~/Downloads
mkdir build
cd build
apt-get source evince
cd evince*

make the change

Open ev-window.c

gedit shell/ev-window.c

Copy and paste the following into the file at the position shown in the image

const gchar *folder;
folder = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (fc),
                             folder ? folder : g_get_home_dir ());

Save and close gedit

give it a unique package name

OK, we need to give the package a unique name to prevent repository updates from overwriting your changed package

gedit debian/changelog

now append +yourname to the top line version and save

i.e. evince (3.2.1-0ubuntu2+fossfreedom)

build the package

sudo apt-get build-dep evince
debuild -us -uc

N.B. this will download 161Mb of dependencies

Go for a coffee... and probably lunch!

cd ..
sudo dpkg -i evince_3.2*.deb

As an aside - to keep this new version of evince from being upgraded in the future, use synaptic to pin this version of evince.


Where do I find archived emails or removed emails to restore them?

You said you were using Thunderbird.

Thunderbird keeps its data in your home directory under ~/.thunderbird/<profile_code>.default/Mail with the profile code being a random set of letters and numbers. You can find mbox-type files there.


Panel and Launcher are missing in Ubuntu 13.04

This worked for me:

dconf reset -f /org/compiz/

then enter:

unity --reset-icons &disown


Ubuntu 16.04 Installation Issue Boots Into Black Screen or Freezes - Nouveau/Nvidia Driver issue 1080ti

I ran into the same problem a couple months later with some additional issues and I was kicking myself for not answering my post.  This time I could not run from the live USB, it gave a "grey" screen and then output the same nouveau driver error.

Created bootable flash drive in Windows 10 with Universal USB Installer (Rufus didn't work for some reason)
Boot up from the USB in the mode that does not have "(UEFI)" in front of it
Press e over the install option, remove hyphens make sure it has nomodeset.  I cant remember if quiet splash was there already or not.  Similar to this Ubuntu Forums thread
Run through set up and make sure that you allow for updates to the system
If you did not do that, you might run into more issues like I did.
I had to boot up in recovery mode and boot up with "quiet splash nomodeset" set link in step 3 but now in grub
Make sure that you update your video drivers using to this PPA

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-384 # or the latest driver

I hope this helps someone else other than me.


How to stop command number incrementation on duplicate command?

Normally \! will increment as you want, but when you reach the history
limit HISTSIZE of lines to keep in memory it will stop. You could try a
much larger HISTSIZE.

Or instead, you could set a larger HISTSIZE and HISTFILESIZE and run a command
before each prompt to save your history:

PROMPT_COMMAND='history -w'

Then in your PS1 you can run a command to count the lines of history in
the file:

PS1='\w #=\# !=\! file=$(wc -l <$HISTFILE) $ '


Driver for Nvidia graphics card on 12.10

You could try the proprietary Nvidia drivers:

sudo apt-get install nvidia-current

also try:

sudo apt-get install nvidia-current-updates

Either of these should also install nvidia-settings which you can run to configure the display.

I have found the default Nouveau driver to work reasonably well however, and have not had much luck with the proprietary drivers on my GeForce 5160SE card so far.

In the case that the nvidia drivers do not work, you can remove them with

sudo apt-get remove nvidia-current

and

sudo apt-get remove nvidia-current-updates

Just for good measure, re-install the nouveau driver and let it re-configure.

sudo apt-get --reinstall install xserver-xorg-video-nouveau


Google chrome not opening in ubuntu 16.04 LTS

I had same issue. By running google-chrome from terminal, I found that it needed a new version of NSS:

$ google-chrome

[6999:7036:1113/200616.549496:FATAL:nss_util.cc(632)] NSS_VersionCheck("3.26") failed. NSS >= 3.26 is required. Please upgrade to the latest NSS, and if you still get this error, contact your distribution maintainer.
Aborted (core dumped)

So I installed libnss3:

sudo apt-get install --reinstall libnss3

and it worked for me :)


The easiest way is to usually have another computer you can log in from via ssh or VNC.  It's a pretty simple matter to apt-get remove the fglrx package or modify your xorg.conf to pull your system back into a working state.

If you really make a mess of things, you can also run a live CD and just use it to mount your hard drive, or boot your system into recovery mode (which you can get to by holding down the shift key before GRUB shows up) which gives you some of the more common recovery options before it tries to load the graphics drivers.


Can an anti-virus protect me from KillDisk, malware for Linux?

The email goes on to describe a piece of software that encrypts the contents of the disk and demands a ransom.

How does it do that? (of course the article does not mention that ...). From the link ...

  The main encryption routine recursively traverses the following
  folders within the root directory up to 17 subdirectories in depth:

  /boot /bin /sbin /lib/security /lib64/security /usr/local/etc /etc
  /mnt /share /media /home /usr /tmp /opt /var /root

  According to researchers, the victim's "files are encrypted using Triple-DES applied to 4096-byte file blocks," and "each file is encrypted using a different set of 64-bit encryption keys."

We need to know how they believe they can circumvent the admin password ...

Does it require a sudo password?
Or does it attempt to brute-force the sudo password? If so how good is your password?
Does it require you to download this malware from the mail and run it? (...) If so... don't :-P

Best method to counter this: create regular backups and keep more than 1 backup  of anything important to you. It is always possible to format a disk and reinstall and to restore a clean backup.

  I feel strongly that an anti-virus is not needed on Ubuntu.

Me too! But a virus is just a small part of all malware. You also got rootkits, and crapware like what you describe above.

  Is that advice now out-of-date with the advent of KillDisk?

No! That advice is the best you can get. At the moment we can consider Ubuntu Software Center free from malware. That article and similar articles I found all lack 1 bit of information: how does it actually encrypt our disks.


Why there are 2 versions of Linux after I upgrade the Ubuntu?

Older working kernels are automatically retained to help you recover in case of several types of possible kernel failure or incompatibility.

Ubuntu typically retains one older kernel, which rotates as new kernels are installed.


You can try setting USB debugging to enabled in the developer options. You should be able to run lsusb then.


pdf comments and insert / delete / extract pages in Evince

I do not know about Evince plans, but used this link to get "pdf-edit" software filtered to Linux platform.

http://alternativeto.net/tag/pdf-editor/?platform=linux

What seems to be a nice app is PdfMod. It is not that you can edit it directly in Evince, but it is probably next best thing regarding "user-friendly-PDF-editing" approach. :-)


RPI4 and Ubuntu 20.04 LTS: Switch between headless and hdmi mode without any changes

The issue is that the start_x configuration item is forcing a dependancy on a display.  The work around is to attach the camera module to a VNC session.
This URL contains a guide to configuring your PI to do exactly that..
https://www.hackster.io/sridhar-rajagopal/raspberry-pi-high-quality-camera-headless-setup-tips-37903c


Ubuntu / Apache2: I cannot open port 443

Remove the IP Address from NameVirtualHost 92.243.16.14:443 (you practically have binded all VirtualHosts on that IP Address) in order to listen on port 443 on all network interfaces (IPs):

NameVirtualHost *:443

Then you can differentiate domain by binding the VirtualHost on a specific IP address like so: VirtualHost 1.2.3.4:443 VirtualHost 1.2.3.5:443 and so on...

To create as many SSL Vhosts as you like on your server with the VirtualHost and ServerName statements to differentiate the domains, you can use the following procedure for more further detailed configurations http://www.bytelinux.com/create-self-signed-certificates-enable-apache-ssl-ubuntu-14-10/

I'm not saying that is wrong to bind on an interface but if that IP Address changes then you wont be able to access your domain anymore and you can't access SSL locally (127.0.0.1).


How do I add an icon to the unity dock (not drag and drop)?

You need to change defaults for gsettings key named com.canonical.Unity.Launcher favorites

You can get it's contents with gsettings get com.canonical.Unity.Launcher favorites
and then replace get with set and add new favorites enclosing them in ".

For example:

gsettings set com.canonical.Unity.Launcher favorites "['gnome-terminal.desktop', 'firefox.desktop', 'chromium-browser.desktop' ]"


It looks like gnome-shell is also installed with nvidia-driver-450. But the prompt does warm about that as you can see here
Type Ctrl+Alt+F3 to switch a terminal (TTY)
Here is an article that explains How To Switch Between TTYs
Edit:
I tested installing nvidia-driver-450 on a Ubuntu server 20.04 and gnome-shell was installed as well.


Make sure you run

sudo apt-get dist-upgrade
sudo apt-get update

for keeping your Packages up-to-date. Try

sudo apt-get purge gdm

for deleting the package with all attached files and then use

sudo apt-get install -f gdm

For installing all again.


I entered terminal as root via restore mode by holding shift down under startup and rebootet.
sudo dpkg --configure -a worked from terminal afterwords.


What's the reason for tying some applications to GNOME?

Both the gnome and gnome-core packages are meta-packages. Removing them does not actually remove any installed programs.

Briefly, meta-packages are a way of bundling multiple packages together. Installing a meta package will install these other packages but removing it will not actually uninstall anything. Synaptic is selecting them for deinstallation because one of their components is being removed. However, you will find that no other packages are removed and you will still be able to use your Gnome desktop.


How to restrict the number of processes a user can start?

This is not the ideal solution because it can interfere with apache upgrades, but it should work.

Edit /etc/init.d/apache2, on the top of the script (new line after the #!/bin/sh) add the required ulimit, example:

ulimit -u 1024


Unable to sync to Ubuntu One after installing lxde and Nautilus

I got the same problem. And in my case I had already synchronized a folder inside the folder I was trying to sync. This was overlapping, I just stopped the sync in the inside folder and then synchronize new folder in the upper level.
Hope this helps


Steam: couldn't find bootstrap ubuntu 16.04

i was with this same issue, try installing libnss-resolve:i386

type on your terminal: sudo apt install libnss-resolve:i386

and see the magic happens ;)

At least, it worked for me, good luck.


How do I play an MP3 file (many tracks in one file) with a cue file attached to it?

You can install "mp3splt-gtk" from software center. With that application you can split the *.mp3 files into single files from the *.cue file.

To split it:

Click browse, and select the big mp3 file. Then click "File -> Import Splitpoints" then select the cue file. Then click "Split". In preference you can select output folder etc.


application locked to launcher without icon

I think that you can open a terminal  and use this command:

unity --replace &

to restart unity without reboot or  logout from the session. You can also use the shortcut ALT+F2 with the dash and use the same command.


Installing Linux and Windows on SSD and HDD from scratch

Your approach is right.

  "In order to put /home in the HDD, should I do it during the
  installation, or later with symbolic links?"

At the time of install - choose something else for custom partitioning. It's not symbolic link but /home will be in it's own partition.

  "Are /var or /tmp worth moving away from the SSD?"

Depends on your current and future needs but it's okay to do so.

  "Windows programs usually install in a Program Files folder outside of
  the User folder. When installing a program, will I have to change
  directory to the HDD every time, or am I supposed to move the Program
  Files folder in the same way I move the contents of User?"

In Linux most of the programs are installed under /usr so you can create a separate partition for /usr also. A lot of folks install apps and programs under /opt. It's also a good candidate for it's own partition.

"40 GB seems to be enough for the Linux SSD partition. Is that right?"

  It's perfectly fine. Entire Linux can be installed in just 10 GB if
  you want.

"Can I place the swap partition in the HDD even if / is in the SSD?"
Yes you can. Swap is not used to a great extent unless you put your computer under hibernation or you are low on memory.

Note : I will advise you to use gparted for partitioning and LVM for logical volumes as they give you a lot of flexibility. You can refer to my earlier question about LVM at here. It has a lot of pointers/references for other resources.


I assume you have a clean install of Ubuntu Server. The apt command is equivalent to apt-get. I've tested all myself (except the first one). If you want a remote desktop like vnc server, you will need at least 3,4,5 or 6. See more info here: https://help.ubuntu.com/community/ServerGUI

Run GUI applications without GUI

sudo apt install xauth

Then any gui application that you install will also install the required dependencies. After you can connect with ssh -X command and run any gui application with X forwarding (never tried it with just xauth installed).
Minimal GUI:

sudo apt install xorg
sudo apt install openbox --no-install-recommends

Run the command startx and openbox will start (you can open a terminal there and run any application you want)
Minimal GUI with display manager:

sudo apt install xorg
sudo apt install lightdm-gtk-greeter --no-install-recommends
sudo apt install lightdm --no-install-recommends
sudo apt install openbox --no-install-recommends

After reboot you will see the lightdm login menu (I don't know how you can make it not to start automatically but I don't think it consumes too much resources when you haven't logged in). Maybe some themes won't appear correct, so if you don't mind more dependencies install all packages in the same order without the --no-install-recommends option.
A more functional minimal desktop environment (the one I use)

sudo apt install xorg
sudo apt install lightdm-gtk-greeter

Install lightdm-gtk-greeter first or it will install unity-greeter as dependency:

sudo apt install lightdm
sudo apt install lxde-core
sudo apt install lxpolkit #(pkexec can't run without it)
sudo apt install lxsession-logout #(logout button doesn't work without it)

A full lightweight desktop environment

sudo apt install lubuntu-core

It will install all dependencies like xorg, ligthdm, alsa and many more things.
A bit heavier desktop environment

sudo apt install xubuntu-core

It will install all dependencies like xorg, ligthdm, alsa and many more things.

You can use the --no-install-recommends option at 5 and 6 but you may need to install additional packages for the full desktop experience.


Trying to Set up VirtualBox with Live Persistent USB made using Mkusb

There may be problems to run VirtualBox in persistent live Ubuntu

The installation of VirtualBox involves compiling some parts of it into the linux kernel. This works well in installed systems.

A persistent live system is booted with the original kernel, and the overlay system, that takes care of the persistence is doing its job later. For this reason I suspect that it can be difficult to make VirtualBox work well in a persistent live system. Maybe it is possible with some other tool for virtualization, but I have no previous experience of it.

If there are problems with secure boot, I suggest that you turn it off.

Lubuntu host and Lubuntu guest

I tested with a Lubuntu 16.04.1 LTS 64-bit host and a Lubuntu 16.04.1 LTS 32-bit guest (because Lubuntu is lighter than standard Ubuntu).

sudo apt update
sudo apt install virtualbox

It worked directly after installation, but I had problems with the graphic rendering after reboot. Maybe it can be made stable with some setting and for example some guest additions or similar.

Click on the screenshot and view it in a big enough window to see it at full size.

After reboot I had problems when starting from a terminal window with the command

virtualbox

but after reboot, there is a menu entry, and when I started VirtualBox that way, the graphic rendering of the Lubuntu desktop worked. But trying once more failed, so the graphics rendering is flaky.

Anyway, the installation worked without issues, and the overall result was better than I expected.

Lubuntu host and Xubuntu guest

The graphics of the virtualized system seems to work better with a Xubuntu 64-bit guest (than with a Lubuntu 32-bit guest). So I think that the previous problem was not caused by running VirtualBox in a persistent live system.

The virtual machine might be slow

Be prepared that the virtual machine might be slow, if the USB drive is slow. See this link,

Notes about speed

You can run VirtualBox in Ubuntu installed in a fast USB3 drive

There is an alternative that I am using: An installed system in a fast USB3 drive with [Windows 10 in] VirtualBox. The light-weight alternative is a fast USB3 pendrive, and a more powerful alternative is a USB3 SSD (either a USB3 SSD box or a standard SATA SSD in a USB SATA to USB3 or eSATA box).

Such a system is portable between computers, but not as portable as a persistent live system. If your computers work without proprietary drivers (for graphics and wifi) or work with the same proprietary drivers, they will probably work with an installed Ubuntu system in a USB drive.

There are detailed instructions at the following link,

Boot Ubuntu from external drive

Edit 1 to answer your comment:

When testing VirtualBox in a persistent live Ubuntu based system

some version may work better. I tried 16.04.1 LTS created from the Lubuntu desktop iso file lubuntu-16.04.1-desktop-amd64.iso
I installed virtualbox from the repositories with

sudo apt update
sudo apt install virtualbox

I selected a suitable 'internal environment' in VirtualBox to match the guest operating system, that I wanted to run,

'General -- Basic -- Version: Ubuntu (64-bit)
enough RAM (2 GB in a computer with 4 GB)
connected the virtual optical drive to an iso file
created a virtual disk
and installed Xubuntu from xubuntu-16.04.1-desktop-amd64.iso

This screenshot shows the installed Xubuntu system in VirtualBox. Click on the screenshot and and view it in a big enough window to see it at full size.

Edit 2, summary about hosts and guests:

I tested also an Artful dot one host, Lubuntu 17.10.1 (64-bit) and it can handle guest versions 16.04.1, 17.10 and also Bionic (to be released soon as 18.04 LTS).

Running VirtualBox in Lubuntu 16.04.1 LTS and 17.10.1, I found that the boot option nomodeset makes Virtualbox render the graphics correctly for Lubuntu 17.10.1 and Bionic guests, but the resolution will be limited to 1024x768 (and lower).

Standard Ubuntu and other Ubuntu flavours as guest operating systems work well.

See details at this link to the Ubuntu Forums.


Create Image on Canonical Distribution of OpenStack Autopilot

I've resolved that as shown in this post

How can I create additional users in Ubuntu OpenStack?

after that with the admin user I can create a new image


Is XVFB (X virtual framebuffer) Open Source?

Yes, XVFB is part of x.org and is licensed under the MIT License.

As I said, it is part of the Xorg project and (AFAIK) there is no separate source code download for it. It shares lots of code with the Xorg display server. You can download all the Xorg source from the mirrors listed here, but it's going to be quite a daunting task to understand it. There is some help in the Xorg Developer Start section.


Testdisk is a useful tool to try to recover data. It is commandline and a bit tricky to figure out how to use, but can do recovery on repartitioned hard disk space very well. It has saved my butt numerous times.


Unable to install CUDA after nvidia driver downgrade on Ubuntu 16.04

This is a new problem:

the NVIDIA-supplied deb file contains driver 396.26 as required by
CUDA 9.2.88.
the Version installed by ubuntu is 396.24.
the ubuntu package system sets dependencies such that an nvidia package, even a newer version, cannot overwrite the one installed by ubuntu.
IF you can get your hands on a pre-release of the ubuntu 396.26 driver package THEN

you could install the ubuntu pre-release (might need to play with it in synaptic to get installed right)
you can do the first three steps in the debnetwork instructions as shown
Instead of sudo apt-get install cuda go into synaptic, search for lower-case cuda (it exists!), mark it to be installed, and update its dependencies.
You will then have all the necessary files added, except the cuda link you clicked on will be broken (because it couldn't install its own version of 396.26).
That's OK: it's a metapackage, it doesn't actually need to be installed, exactly sort of.  Mark it for removal. When you hit apply, synaptic may barf on the remnants of the dead package, which looks bad but has the side effect of removing its corpse.  Try again and if that was the only broken package, the install willl work.
Depending on what else you've installed in what order, you may get to play a similar logic game getting rid of other broken packages, but it's doable.  I strongly suggest not rebooting until you've got them in order.
I'm sure you'll see the official release soon.  If only you could find a pre-release copy, that would be nice...
https://launchpad.net/~bstudent/+archive/ubuntu/nvidia-graphics-drivers-396.26-copy-of-staging-ppa-20180522


USB devices and Flash disks mount as root instead of the user

Make sure you are in the right groups to access removable media.

id -a will show list of groups you are in. If you don't see there plugdev and fuse then you'd better add yourself to these groups by running

sudo usermod -a -G plugdev,fuse USERNAME


Google app engine GUI launcher for Ubuntu 13.04

I searched long and hard on this same issue (couldn't actually open the google app engine launcher (the GUI) in Ubuntu). The following is the step that helped me to be able to open the GUI.

... But I still am having issues running the app - it has errors. I think it is an issue of (under the Edit/Preferrences menu) Python Path, App Engine SDK Path, Editor, and/or Deployment Sever.

http://forums.udacity.com/questions/6004229/google-app-engine-launcher

First you need to install wxPython
open your terminal and type :

sudo apt-get install python-wxversion python-wxglade

Then you need to download the launcher

in your terminal type :

svn checkout
http://google-appengine-wx-launcher.googlecode.com/svn/trunk/
google-appengine-launcher

now type :

cd google-appengine-launcher

and simply run your luncher with this command :

./GoogleAppEngineLauncher.py

or

python GoogleAppEngineLauncher.py


It looks as though Firefox saves the file to the /temp directory as readonly so that users cannot accidentally save a file opened from the browser into the temp directory, edit the file and later lose any edits. I do not see any setting within the the security sections of either Firefox or LibreOffice that would change this.


change snap netbeans to spanish (snap get netbeans saids it has no configuration options)

Last shot:
Fist I saw without doing anything
$ sudo unsquashfs -v -i -ls  /var/lib/snapd/snaps/netbeans_30.snap
then I unsquash the thing.
$ sudo unsquashfs -v -i -li  /var/lib/snapd/snaps/netbeans_30.snap
#change "netbeans_default_options=" adding '-J-Duser.language=es'
make the thing again...
sudo mksquashfs squashfs-root netbeans_30.snap
#umount the thing...
sudo umount /snap/netbeans/30
#copy the thing
sudo cp netbeans_30.snap /var/lib/snapd/snaps/netbeans_30.snap
#reboot (I did not want to fight against the mount...)
check the state of the work
$ cat /snap/netbeans/30/netbeans/etc/netbeans.conf | grep "netbeans_default_options="
netbeans_default_options="-J-XX:+UseStringDeduplication -J-Xss2m -J-Duser.language=es -J-Djdk.gtk.version=2.2 -J-Dplugin.manager.install.global=false
...
another stuff here...
...
exports=java.base/sun.reflect.annotation=ALL-UNNAMED -J-XX:+IgnoreUnrecognizedVMOptions"
the changes remain... but netbeans.... still is in english...   buahhhh


Unzip

tar -xzvf CatlateralDamage_v4.1a_linux.tar.gz

Install step :(execute from program folder)

./configure
make
sudo make install

Hope this helps


How can i edit the nautilus quicklist in ubuntu 13.10?

Maybe the problem is that in newer Nautilus (note: the question is about Nautilus, not the Unity Launcher!) the File menu is almost impossible to find.

In gnome shell you have to click in the upper-panel "File" name to have the menu for Nautilus which is called File now:

Now go to bookmark and edit them at your wish.


Deleted Ubuntu partition in Windows Disk Manager

When you just delete a partition from a partition utility, you can recover that partition and content thanks to testdisk. As soon as you make new partition and override the hard drive, all content is lost and written over. The only way left is using tools like photorec to make empty space scan, useful to recover photo, but I have some doubts that it's working fine on SSD drives.


cannot access/delete folder in Rubbish Bin containing hundred of thousand of corrupted files on 14.04

I solved my problem with the monstrous folder which was by me found in the Trash folder. Nor the folder, nor its files had been corrupted, indeed it was a HDD Bad Blocks problem, which I detected with fsck, by running it from another partition. I'm not expert on Hard Drive, but I can say that fsck detected a problem in the folder structure (probably where the Trash folder reside on the disk).


Lubuntu - Start program without using terminal

I installed Lubuntu 12.04 yesterday, and I just installed wine using sudo apt-get install wine, and once done I was able to find it on the Lubuntu menu.  See image below.


key-mapping - Workaround for keyboard with missing keys (16.04)

This solved it for me : How persistently remap keys in Ubuntu 16.04?

Once I made changes to xmodmap using the key codes from xev
I edited .bashrc and added the line xmodmap ~/.Xmodmap.

Thanks


How to connect to Windows Share Without Password without modifying Windows?

The option sec=ntlm needs to be specified.  The sec specifies the security modem.  ntlm used to be the default mode and didn't need specification.

You can mount the (the HP printer sdcard) device with:

$ sudo mount -t cifs //192.168.15.90/memory_card /mnt/ -o sec=ntlm

This will provide ntlm for password hashing, whereas you won't be prompt for a password to access the mount.


Is it possible to launch applications like Chrome from the terminal?

I don't use google-chrome, but I went to terminal, and typed "goog-" hitting TAB to autocomplete, it stopped without ending in a space so I knew there were still multple options.  I then hit TAB TAB and could see I could type

google-chrome

or

google-chrome-stable

on my box (and I didn't know I had installed google-chrome to being with...  Now i'm off to see when I installed it)


Software Updater will not Update : GPG error : signatures were invalid:

Mediubuntu repository for Ubuntu is no longer available. Mediubuntu has stopped providing that for Ubuntu.

It is the reason for you getting this error.

You can get those needed free packages from a Launchpad repository.

The other probnlem with you is that a Public key for a Launchpad repository couldn't Import.

So to remove that Medibuntu repository and to Import public key for Launchpad repository, follow these commands:

sudo add-apt-repository --remove "deb http://packages.medibuntu.org/ raring free non-free"

sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com 4A272F2B298C62A6

Then run the update.


How do I install additional drivers with both wired and wireless failing?

First purge & remove existing  broadcom packages.

The downloading part,

You can do it with help of print-uri feature of apt-get.

First you need to determine the package name for example say for braodcom you need b43-fwcutter. (This is just example)

Next execute the command,

sudo apt-get --print-uris --yes --reinstall install b43-fwcutter | grep ^\' | cut -d\' -f2 > b43-fwcutter.txt

This will produce the dependent links to the text file. Do this for all the packages required.

Now pass the file in another computer using wget (you can pass a file to wget to download all links using wget --input-file filename.txt) or any other download manager(if in windows) to download the packages.

Once done, copy all the deb packages to your target computer. Open a terminal, navigate to the directory using cd, and use sudo dpkg -i *.deb


Where can I locate the Gnome Classic Panel "Quick Launcher" icons in Unity

Normally, we import in your unity launcher icons existing launchers from gnome-panel, netbook-launcher, unity maverick, your desktop content and some docks like cairo-dock, docky, awn the first time you launch it. It tries to agregate duplicates to have just one icon in the launcher per application (but take into account custom applications path)

You can force that to happen again by:

resetting your launcher icon in unity to default: gsettings reset com.canonical.Unity.Launcher favorites (this is not mandatory, but at least, you start from a well-known base)
reset the migration tag to the first : gsettings set com.canonical.Unity.Launcher favorite-migration "'3.0'"
logout and login in the unity session, unity should trigger the migration tool at start
if you are interested in logs, you will find them at

~/.cache/unity/migration_script.log

(~/.cache corresponding to $XDG_CACHE_HOME if you redefined it)


What distinguishes the files that belong in /usr/share from those that belong in /usr?

/usr/share according to the FHS: http://www.pathname.com/fhs/2.2/fhs-4.11.html

  The /usr/share hierarchy is for all read-only architecture independent data files.
  This hierarchy is intended to be shareable among all architecture platforms of a given OS; thus, for example, a site with i386, Alpha, and PPC platforms might maintain a single /usr/share directory that is centrally-mounted. Note, however, that /usr/share is generally not intended to be shared by different OSes or by different releases of the same OS.

So it has as specific usage.

/usr though has so many different purposes and  it is hard to compare it to a subset of itself. .


Ubuntu crashes when setting maximum resolution on external 4K monitor

Having the same issue with the XPS 9350 (QHD+, BIOS v1.4.4) and external monitor Dell P2415Q. I am using the Plugable USB-C to DisplayPort Adapter Cable.

Upgrading the kernel to v4.8-rc2 seems to solve this problem. I am writing this post on the external monitor running at 3840x2160 60Hz.

Having said that, it is pretty unstable. It crashes often when connecting/disconnecting the adapter and there are some graphical artefacts that appear when moving the mouse and windows around.

My hope is that the final version of the kernel will iron out these issues or at least kernel 4.9 will.

UPDATE: Ubuntu (Gnome) 16.10 works great for the configuration above. No issues so far, except some monitor flickering from time to time.


Changed Permissions, Now Cannot see contents of Drive

OK, I fixed my 250GB drive by running this command...

sudo chmod 775 /media/250GB -R

...and I fixed my Desktop permission problems by running this...

sudo chmod 775 /home/Desktop -R


Looks like a problem with XFCEs settings daemon.

It can be debugged as described in the XFCE docs:

If the --sync parameter is added, too, the daemon seems to continue on errors:

XFSETTINGSD_DEBUG=1 xfsettingsd --replace --no-daemon --sync

Update on my case:

When started with the --sync option, the settings actually get applied and there is an error printed with the screen configuration.

I was finally able to solve this problem by deleting the file .config/xfce4/xfconf/xfce-perchannel-xml/displays.xml


If you want to use Python 3, run python3 instead of just python. You can also use Python 3 for your scripts, if you add

#!/usr/bin/env python3

as the first line.


Because NTFS doesn't store or use "Linux" file permissions the kernel emulates them. You set the entire mount partitions permissions at mount time. You have two option.

Remount the NTFS partition, setting the permissions to something less restrictive. This is the least secure option.
Move the executable to your Linux partition, then chmod it, then run it. There are more steps here but this is the most secure option.

2 is more secure then 1 because you only change the permissions of one file, not the entire partition.


Buttons on a Logitech G300 aren't recognized properly

You can use  Logitech-Gaming-Software. I'm brazil so I can't use the latest version (? occurs this error) but downloading the version an older version all goes right.


Using du:

du -d 0 -hc z*

-d 0: specifies the maximum level of recursion;
-h: prints the sizes in a human-readable format;
-c: prints a grand total;
z*: globbing pattern which is expanded to the list of files / directories starting with z in the current working directory.

$ du -d 0 -hc z*
1,2M    zsh-syntax-highlighting
1,2M    total


Ubuntu is unable to shutdown in Windows Subsystem for Linux

If you want to shutdown the entire computer, apparently Windows has decided it doesn't want to let Ubuntu do that.

If you want to just restart Ubuntu, then from this question on superuser Rebooting Ubuntu on Windows without rebooting Windows? you could:

  Using CMD (Administrator)

  net stop LxssManager
  net start LxssManager

  Or Using services applet

  WIN+R -> services.msc
  Find LxssManager

  Right-click -> Restart

  Since Windows 10 version 1803, closing all WSL terminal windows won't kill background processes by default, unless the file /var/run/reboot-required is present. This file will be automatically created by apt on Ubuntu when an update requires a reboot, but if you want to manually reboot the subsystem, you can create the file yourself:

   sudo touch /var/run/reboot-required

  I haven't tested this on other distributions available in the Microsoft Store. An alternative solution is to kill all processes yourself:

   sudo killall -r '.*'


Ubuntu 18.04 ASUS ZX53VW keyboard shortcuts, backlight not working

I know this isn't what you want to hear, but you might want to wait awhile. HWE (hardware enablement kernels) should be available for the Ubuntu 18 series around April of 2019. It's been my experience with 16.04 and previous versions that these kernels provide better support for newer hardware (as intended).

Sadly ASUS recommends against installing Linux on this laptop and doesn't appear to be interested in driver development for Linux (at least on this platform).

For more information on the various kernels this page in the MAAS docs gives a nice explanation.

A possible alternative to waiting would be to try a more recent mainline kernel the most recent of which can be found here. Be aware that this could result in unintended consequences so it's prudent to have a backup plan in case something goes awry. Considering that the issues that you are having don't make the system unusable, waiting might be the better option.

Edit Sometimes a BIOS Update can help, but none of the recent updates that I could find appear to address your current concerns and updating a BIOS isn't for the faint of heart and can have the unintended consequence of "bricking" your device.

Note: As I do not have your hardware I cannot provide a better answer than this. Hopefully someone with the ability to test (such as yourself) can provide a better answer in the future.


Put this into the Launch Options for your game:

MESA_GL_VERSION_OVERRIDE=4.3 MESA_GLSL_VERSION_OVERRIDE=430 %command%

Replace "4.3" with your version of OpenGL from the OpenGL core profile version string returned from glxinfo | grep version and replace "430" with your OpenGL version multiplied by 100


Cloning a Git Repo from a Windows Dropbox Server

You haven't used the right path. Using '~' in the path won't work in windows. Please use the right path.


How can I disable graphical boot, yet start x during boot?

sudo nano /etc/default/grub

Uncomment GRUB_TERMINAL="console"

And remove quiet splash from GRUB_CMDLINE_LINUX_DEFAULT

then issue sudo update-grub. This will disable graphical boot.


How to get into GRUB on Presario CQ43 hp laptop to change root password without cd drive?

A fix for this is to use SuperGRUB2Disk to look for Os's and list partitions etc.

You can mount it onto a USB it using Unetbootin

Hope this helps


network issues after suspend on Ubuntu 13.04

when this happens type this in terminal

sudo service network-manager restart

it should fix things

I use this on ubuntu 13.10 because it has the same issue but I think it should work with 13.04 too


What is eating the Super+Space shortcut?

If you're using GNOME Shell, then mutter eats all Super keypresses - not just Super on its own, but any keybinding which uses Super.  Or it did last time I checked.  I need to figure out how to detect this and fall back to something like Ctrl+Alt+Space.

In Unity, however, Super+Space should work fine - it does for me ☺.  Although Unity uses just Super to bring up the Dash, keybindings containing Super should still work.


How can I "provide proper authorization" to the KDE Software Updates program?

Earlier : Ubuntu 11.10 with KDE installed does not prompt for elevation for privileged ops in all apps

Few bug reports:

Muon-updater doesn't ask for password / https://bugs.launchpad.net/ubuntu/+source/qapt/+bug/833058
Kubuntu desktop missing dependency on polkit-kde-1 / https://bugs.launchpad.net/ubuntu/+source/policykit-1-gnome/+bug/867737

Do you have the polkit-kde-1 installed ?

The polkit-kde-1:

  PolicyKit-Kde provides a D-Bus session bus service that is used to
  bring up authentication dialogs used for obtaining privileges.


Hyperlinks in received emails always open same document from desktop. How to fix?

To Set Firefox as default browser follow these steps:

Open Firefox.
   In the top left corner there are 6 drop-downs. Open the second Drop-Down called Edit
   and then Preferences at the bottom of Edit.

On the first page at the bottom you will find a button saying
   Make Firefox the default browser

After that your links should open automatically in Firefox.


Why can't I see the character _ while using Nano on Yakuake?

This could be a problem of the font you're using in Yakuake. Try setting a different one; the property can be found in the profile configuration.


xdotool script to perform mouse moves and clicks

Most importantly, a variable is called using $, and y+20 doesn't work that way. However, you don't even need to calculate that, just use mousemove_relative 0 20:

#!/bin/bash
for x in {1760..1895..45}; do
  for y in {760..985..45}; do
    xdotool mousemove --sync $x $y click 3 sleep 0.1 \
    mousemove_relative --sync 0 20 click 1 sleep 0.1
  done
done

Additional changes I made:

substitute the seq subshell using Brace Expansion
use xdotool's builtin sleep function → only call it once
call mousemove with the --sync option to let it wait until the mouse is actually moved


!4.04 still having an amd radeon r9 380. are their drivers still compatible with the latest ubuntu version?

The problem is likely caused by a kernel change. You can try the following:

Add the repository of the version you want to upgrade to.
Update apt
Install the new kernel and headers. dpkg should recompile the video driver for the new kernel.
Be sure to update GRUB, then reboot
If the above succeeded, do:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade


So, what I found when using a DisplayLink USB monitor is that I could start X on the monitor fine, because DisplayLink has support in the kernel, but I (1) couldn't use my graphics card's acceleration, (2) couldn't easily have the display extend from one regular monitor to the DisplayLink. I was able to eventually get it working, sort of, using screenclone but I couldn't move windows between monitors, get compositing to work, or use xrandr at all. See these questions for some details on setting it up:

How do I use a DisplayLink monitor?
How do I configure a displaylink USB monitor?

It looks like there is a project to get this working better called hybrid-screenclone which will make it easier to do some of the hacks I described.

Ultimately, I would advise against a DisplayLink setup unless you're willing to try some hacks and experimental proding, and still possibly be let down. Though the chances if you getting it working if you don't want to also use a regular monitor are much better.


Ubuntu Software Center downloads something when installing from a .deb file

There are two possibilities here. First is that there are unmet dependencies that Ubuntu Software Center is downloading and installing first. The alternate (less likely) possibility is that there is a newer version in the repository and Ubuntu Software Center took it upon itself to use that version instead. (This probably isn't at all likely, I just really hate that program and will assume the worst).

a quick way to check would be to uninstall it, then run

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

and it will only half-install if there are unmet dependencies. You can resolve these with

sudo apt-get install -f

Edit:
Alternately you could uninstall it, clear your apt cache and then disconnect from the internet while installing it and see what USC complains about


How to: Bumblebee with NVidia GeForce GTX 950M, with NVidia's proprietary drivers (anyone confirm it works)?

Yes, Bumblebee should work fine with your card (Bumblebee supports whatever Nvidia or nouveau do). Do not hesitate to seek for help on the bugtracker. They are some known issues, but most of them should be fixed in the coming release (for which a pre-version is available through our testing PPA. You might potentially also have some issues with bbswitch (the power management part of it), but those should be solved soon with the coming 1.0 release.

@Zacharee1: You’ve probably tried to use bumblebee-ui, which is so deprecated that we even deleted the repo to prevent other people trying to use it. The only way to use Bumblebee is through optirun, there is no “add apps to anything” thing. You might eventually edit your .desktop files or create alias in your .bashrc (or .whatevershellrc) to add optirun at the beginning of the appropriate commands. Regarding video games, both Steam and PlayOnLinux allow you to set this easily.


Highlight text color problem in MySQL Workbench 8.0.13 in Ubuntu 18.04

Last days there was an update for Workbench package and now it's solved, at least for the Ubuntu and Gnome of the OP.

Problem solved updating Workbench to 18.04


How can I connect to the Internet using an ADSL modem?

For network connections we have Network Manager installed as the default tool to connect to networks, and to setup connections. There is also a section to setup a DSL/ADSL connection. Additional drivers for your LAN card are most likely not needed.

To open network manager setting right click on the panel symbol and choose Edit Connections:

In the window that opens choose the DSL Tab and Add a new connection:

Enter the data your ISP needs to connect in the following window:

If you haven't installed Ubuntu yet best advice is you try out Ubuntu booting from a live CD. There you will have acess to all standard applications including network manager. Just type in your DSL credentials there and enjoy to see your PC connecting.


Execute the Jockey application (jockey-gtk from command line) that will propose you an updated Nvidia driver that may solve your problems. Choose nvidia-current to use the most stable version.

After doing this it may be helpful to save and then replace your /etc/X11/Xorg.conf file.

First save your old config file with:

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.old

Then:

sudo nvidia-xconfig

After that please reboot.

(Instructions below the line are from the follow-up comments).


Jupiter works fine with my Dell Latitude E6530 and Ubuntu 12.04.

Apparently Lucid (10.04) has only an older release of jupiter (0.0.53-2). The next versions of Ubuntu have an updated version 0.1.2-1. The first thing to do is to update your Jupiter version.

You may want to contact the webupd8 team and kindly ask them if they could provide an updated version for Lucid.

If they won't do that, you could try to install it from source but it seems a bit more difficult.


Ctrl+Alt+D will hide the windows and show the desktop.

For having a look at all opened windows, you might want to use "Scale" compiz plugin, which should be assigned to Shift+Alt+Up.


vivid - failed to connect to upstart: connection refused

Ubuntu switched to systemd as its service framework starting in 15.04 for all flavors, including Desktop and Server. The recommended practice is to change your upstart jobs to systemd jobs (see the wiki article for more info). You can also switch back to upstart if you want, which is certainly the quicker fix. I recommend you read the first few sections of the wiki article to weight the pros and cons.

Recommended Fix

Refer to the wiki article to transition your upstart scripts to systemd.

Discussion and coding guide: Systemd For Upstart Users

Quick Fix (for 15.04 only)

To permanently switch back to upstart just run:

sudo apt-get install upstart-sysv
sudo update-initramfs -u
sudo reboot

EDIT: The wiki article only recommends this for 15.04, but some users have found it helpful on 16.04 too.


LibreOffice Menus appear in poor contrast

the problem is known, look here :

https://bugs.documentfoundation.org/show_bug.cgi?id=92776

to be continued ...


grub rescue when trying to fix dualboot with Windows 8, what can I do?

Steps To Fix Windows 8 Boot

Boot from Windows CD/DVD and choose “Repair” when it shows up.
Choose Command Prompt on the resulting screen and run the following two commands:

bootrec /fixmbr
bootrec /fixboot

You are done!