Ubuntu + TrueCrypt + Dropbox + Desktop PC with WIndows 7 + Netbook with 12.04

Follow this steps for a propper installation:

For 32 bit systems:

$ wget http://www.truecrypt.org/download/truecrypt-7.1a-linux-x86.tar.gz

For 64 bit systems:

$ wget http://www.truecrypt.org/download/truecrypt-7.1a-linux-x64.tar.gz

Extract the archive:

$ tar -zxvf truecrypt*.gz

Install TrueCrypt:

$ sudo ./truecrypt-7.1a-setup-x86

To uninstall TrueCrypt, do this:

$ sudo truecrypt-uninstall.sh

To run it, just type truecrypt in the terminal:

$ sudo truecrypt

If you prefer to install from a ppa you can use this one for Ubuntu 12.04 or higher

$ sudo add-apt-repository ppa:michael-astrapi/ppa
$ sudo apt-get update && sudo apt-get install truecrypt

After installing you need to select "slot" or create volume and "mount" the partitions that have files for encryption.


Boot-Repair I think this can solve the problem.

Log in into Ubuntu and Install Boot Repair and hopefully running that should fix the problem.


Installing the below packages alone will auto-mounts your exFAT formatted drives ,

sudo apt-get install exfat-fuse exfat-utils

Or you may try to mount it manually after installing the above packages,

sudo mkdir /media/exfat
sudo mount -t exfat /dev/sdxx /media/exfat

/dev/sdxx - your exfat partition.

In Ubuntu 14.04, exfat-fuse and exfat-utils packages are available in Universe repository. So enable this repository inorder to install these two packages on Ubuntu 14.04.

sudo add-apt-repository universe

And don't forget to update all repositories,

sudo apt-get update


Looks normal to me. If in doubt, you may compare with process list in Htop that I have filtered with lightdm keyword on my 32-bit and 64-bit systems.

On Xubuntu 16.04 32-bit system:

  PID USER      PRI  NI S CPU% MEM%   TIME+  Command
 1245 root       20   0 S  0.0  0.6  0:00.03 ├─ /usr/sbin/lightdm
 1324 root       20   0 S  0.0  0.7  0:00.02 │  ├─ lightdm --session-child 12 15
 1330 root       20   0 S  0.0  0.7  0:00.00 │  │  ├─ lightdm --session-child 12
 1329 root       20   0 S  0.0  0.7  0:00.00 │  │  └─ lightdm --session-child 12
 1264 root       20   0 S  0.0  2.2  0:10.38 │  ├─ /usr/lib/xorg/Xorg -core :0 -
 1254 root       20   0 S  0.0  0.6  0:00.00 │  ├─ /usr/sbin/lightdm
 1252 root       20   0 S  0.0  0.6  0:00.00 │  └─ /usr/sbin/lightdm

On Xubuntu 16.04 64-bit system:

  PID USER      PRI  NI S CPU% MEM%   TIME+  Command
  811 root       20   0 S  0.0  0.5  0:00.05 ├─ /usr/sbin/lightdm
 1022 root       20   0 S  0.0  0.4  0:00.03 │  ├─ lightdm --session-child 12 19
 1026 root       20   0 S  0.0  0.4  0:00.00 │  │  ├─ lightdm --session-child 12
 1025 root       20   0 S  0.0  0.4  0:00.00 │  │  └─ lightdm --session-child 12
  839 root       20   0 S  0.7  1.6  0:01.34 │  ├─ /usr/lib/xorg/Xorg -core :0 -
  876 root       20   0 S  0.0  1.6  0:00.02 │  │  └─ /usr/lib/xorg/Xorg -core :
  833 root       20   0 S  0.0  0.5  0:00.01 │  ├─ /usr/sbin/lightdm
  831 root       20   0 S  0.0  0.5  0:00.00 │  └─ /usr/sbin/lightdm

Note that the "Command" field has some text cut-off at certain width because I have copied the output from Terminal without maximizing the window.

For the program lightdm on the same release of Xubuntu, the 64-bit system has relatively more processes than the 32-bit system counterpart (8 against 7 processes).


How to avoid loss of dual boot menu due to Windows 10 update

I think the only way is to have one OS in virturalbox, or have two separate hard drives(or two computers), removing the one with Ubuntu on it during windows updates.  I had asked similar question few months ago about protecting linux partition from windows.


The 'Start button' doesn't always work in Ubuntu Studio 14.04

They call it Dash. Maybe it is related to this bug https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1371590 that has something to do with the activation area. If not maybe you can create a bug report with screenshots.


.desktop launches app with custom icon. why not shell?

There arises no reason to do this. That's exactly why it is not possible. If you are going to pass arguments other than the arguments allowed, then you will be invoking it from a command line, in which case there is not reason to have an icon. In that case, you wont be using a .desktop file, but a script directly.
Add...  Accepts...
%f  a single filename.
%F  multiple filenames.
%u  a single URL.
%U  multiple URLs.
%d  a single directory. Used in conjunction with %f to locate a file.
%D  multiple directories. Used in conjunction with %F to locate files.
%n  a single filename without a path.
%N  multiple filenames without paths.
%k  a URI or local filename of the location of the desktop file.
%v  the name of the Device entry.

These are the allowed arguments, which are passed from within the GUI, like for example, by dragging a file to the .desktop file.
Here is an example usage.


Can I uninstall Seahorse from Ubuntu 12.10 without side effects?

For Ubuntu 12.10

From the description of seahorse

apt-cache show seahorse

  Description-en: GNOME front end for GnuPG  Seahorse is a front end for
  GnuPG - the GNU Privacy Guard program -  that integrates to the GNOME
  desktop. It is a tool for secure  communications and data storage.
  Data encryption and digital signature  creation can easily be
  performed through a GUI and Key Management  operations can easily be
  carried out through an intuitive interface.

Also when you attempt to unistall seahorse you will se that ubuntu-desktop will uninstalled.

But ubuntu-desktop is a metapackage that is not recommnded to unistall it

from the description of ubuntu-desktop

apt-cache show ubuntu-desktop

  This package depends on all of the packages in the Ubuntu desktop
  system  .  It is also used to help ensure proper upgrades, so it is
  recommended that  it not be removed.

, so you have to install it again with this command

sudo apt-get install ubuntu-desktop

but when you attempt to install ubuntu-desktop again you will notice that seahorse package will be installed.
Depends each other.
So I assume is not a good decision to remove seahorse.


How can I encrypt my internet traffic so I can use public wifi securely?

Remote access

Most public wireless access points (encrypted or not) use client isolation so there's no way another network client can communicate with your device. If clients can communicate, just make sure to (temporarily) disable or secure all network services running on you device (like httpd, ftpd, sshd, smbd), as you will likely not need them during your stay in the hostel anyway. If you consider yourself a “layman“ as per your comment, you don't need to worry, because Ubuntu doesn't have any network services enabled by default. Of course a more savvy friend could have enabled them per your request, but I suspect you would know about that.

Wireless packet sniffing

Since the network is encrypted with WPA2, an encryption protocol without publicly known vulnerabilities, you're safe from wireless packet sniffers too, because the wireless access point assigns a different session key to every client. Even if all clients share the same password, they won't be able to decrypt each other's network traffic (with reasonable effort). This part is only true for WPA2-EAP.

I have since learned that an attacker with knowledge of the pre-shared secret (likely for a semi-public wireless network) and a record of the WPA2-PSK authentication handshake (reauthentication can be provoked with a deauthentication attack which only requires knowledge of the PSK) can decrypt all subsequent traffic.

Conclusion: Don't rely on the privacy of public wireless networks encrypted with a pre-shared secret. Refer to the following sections for solutions.

Upstream wire tapping

If you're concerned that the hotel staff abuses their access to the unencrypted “upstream“ network (i. e. between the wireless access point (AP) and their internet service provider (ISP)), you need to use HTTPS/TLS¹ or a VPN to encrypt your network traffic throughout that section depending on you needs. See my first comment for things to consider and update your question accordingly, so I can go into the correct details.

VPN

To set up a VPN you need to find a VPN provider that offers VPN protocols with Linux support – preferably with setup instructions, even better when they're for Ubuntu. An alternative would be a public peer-to-peer based VPN like Tor or I2P. Find or ask another question if you encounter problems with either of those, since this would lead a bit too far from the original question.

¹ Most popular web sites use HTTPS by default or optionally to protect against session stealing and man-in-the-middle attacks. Many more do so at least during authentication to protect your password.


Ubuntu 13.04 doesn't show confirmation dialog for shutdown

I finally found the solution!
Apparently the setting of /org/gnome/gnome-session/logout-prompt is ignored in newer Ubuntu versions, the right key was /apps/indicator-session/suppress-logout-restart-shutdown.
So to fix this, do dconf write /apps/indicator-session/suppress-logout-restart-shutdown false in terminal. It should take effect immediately without restart.
It seems that sometimes this value is set to „true“ by upgrade or third party applications.


Try the following command in a terminal:

steam --restart

From the Steam-Support article Refresh your Steam files

  You will see the following: Installing bootstrap
  /home/[username]/.steam/steam/bootstrap.tar.xz
  Reset complete!
  Restart your computer.
  This should remove and download new Steam files for your Steam client.

The article also says:

  This process will not affect your currently installed games.

You might still want to backup your data. Steam stores it at ~/.steam and ~/.local/share/Steam. The games are usually stored at ~/.local/share/Steam/SteamApps/common


Astropy can't download files after changing username

I know of no way to completely avoid this, i.e. to make Python skip the nonexistant cache. However, there is one simple way to get your programs working again, and that is to make it appear that there is a cache (or whatever resource) in the /home/jill folder. You do this by creating a symbolic link called /home/jill to the (real) /home/jpsotka:

sudo ln -s /home/jpsotka /home/jill

That's all. Of course, if there is another user jill on the system, the directory /home/jill will already exist, and so the link can't be created.

I suppose that after a while, the files in the cache will be completely replaced, and you can remove the link:

sudo rm /home/jill

Notice that this does not  remove the folder that the link points to, just the link itself.


How do I reinstall/change to another linux destribution?

If your goal is to try different flavor of Ubuntu or different distribution entirely, I suggest you install that in VirtualBox. This will save you trouble on installing-reinstalling, and possibly going back to Ubuntu if you chose so.

However if you insist, here is a general guide on installing different OS on your machine

Download *.iso of the desired Linux distribution
Use Startup Disk Creator or another app of your choice in Ubuntu to create a bootable USB or DVD
Reboot your machine and on the initial screen with your manufacturer logo, and press the key assigned to changing boot order. Most commonly the button is F12, but depending on your BIOS it may be different.
Select your installation media as the boot device.
Follow installation instructions for your desired Linux distro. This should be provided on the distro's website


error: checksum failure file: sources/expat-2.1.0.tar.gz

Try downloading the tar file directly from the link and move the downloaded file to /rtems-source-builder/rtems/sources


Writing to disk using `pv` seems to be fast at first and slow at the end

I found your post while looking into a similar issue trying to write an image to an SD card (via USB reader/writer). Using pv, it would show 100% almost immediately, but take several minutes afterwards to actually complete.

I found a solution to my issue using dd, pv and pipes, and setting the write dd to direct mode. This also has had the effect of improving the write speed quite a lot. I don't know if there's any down sides of using this method (I read the image back and performed a checksum - and all appears ok).

My example is using an image of raspbian (2017-09-07-raspbian-stretch-lite.img), which is 1854590976 bytes (1.8GB) in size. I've shown a couple of other methods and you can see the differences in time taken.

So, using dd | pv | dd with direct mode, it took only 2 minutes 57 seconds:

dd if=2017-09-07-raspbian-stretch-lite.img ibs=1M status=none | pv -s 1854590976 | dd of=/dev/sdX obs=1M oflag=direct status=none

(setting status to none stops dd messing up the pv display).

Using pv by itself shows 100% immediately, but then took 8 minutes 28 seconds to actually complete:

pv 2017-09-07-raspbian-stretch-lite.img > /dev/sdX

Using dd by itself without any progress view, took 8 minutes 15 seconds:

dd if=2017-09-07-raspbian-stretch-lite.img of=/dev/sdX bs=1M

Using the same dd above but adding oflag=direct makes it 2 minutes 54:

dd if=2017-09-07-raspbian-stretch-lite.img of=/dev/sdX bs=1M oflag=direct

I've tried loads of different combinations, which are either far slower (some take up to 12 minutes!), or again show 100% immediately.

One caveat of using pv this way is that you need to find out the size of the image first, and specify it with the -s option. If you're scripting things like me, it's easy enough to determine the file size at the same time.

Hope it helps someone.


how to shutdown my ubuntu-server 16.04.2

The proper way to shutdown, is to use the shutdown command.
e.g.:
sudo shutdown -P now

info about shutdown

shutdown man
nix Craft

shutdown [OPTION]... TIME [MESSAGE]
-h Requests that the system be either halted or powered off after it has been brought down, with the choice as to which left up to the system.
-H Requests that the system be halted after it has been brought down.
-P Requests that the system be powered off after it has been brought down.


How to convert script command output into plain text

If you checkout the:

man script | grep -i bugs -A 2

You can see that:

  script places everything in the log file, including linefeeds and backspaces.  This is not what the naive user expects.

What I came up with is a combination of tr and sed to get what we want.

Most of those characters are indicating colors, to remove most of them we can use this sed command from here:

sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g"

However it's still not enough... because as we saw in script's man there are other not printable characters we should get rid of. To remove those we can simply use:

tr -dc '[[:print:]]\n'

Now we are almost there, the other problem in my test was that prompt being repeated twice, so to remove that start script with dump and TERM's value TERM=dump.

Final result:

To capture commands:

TERM=dump script my_output

To remove unnecessary characters:

sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" my_output | tr -dc '[[:print:]]\n' > new_output

For second part of your question, the output file is just a text file so we can't change the font or size of specific lines of it, however your output contains your prompt so you'll know which line is the command and which one is the output.


How do I get rid of old encrypted home folder?

type into a terminal "sudo su" then "sudo nautilus" then go into the /home/ directory and delete the folder from there.


Which version should I give to a custom Ubuntu deb package

You can use any alphanumeric character string you like that achieves your goal. You are not limited to specific strings.

The purpose of the Ubuntu0 string is simply to make clear the origin of the package - that it's an Ubuntu-specific rebuild (usually due to a patch) instead of a new upstream version.
Note that the Ubuntu0 is simply an alphanumeric string, not a magic incantation.  It's higher than Uakari and lower than Uckerland.

For example: If you want your custom package to be overwritten by the next security upgrade, then set the version number rather low: fail2ban 0.10.3.1~A-Franks-Custom-Build-2018Sep

Since ~A is higher than nothing, it will supersede the current 18.04 Ubuntu package. However, a potential future Ubuntu security or bugfix version ~Ubuntu0 is higher than ~A, and will supersede your custom package.

For example: If you don't want your package to be overwritten by a security upgrade, but do want it to be overwritten by the next release-upgrade, then set the version number higher: fail2ban 0.10.3.1~X-Franks-Custom-Build-2018Sep. ~X is higher than ~U, so Ubuntu updates won't supersede. But the next upstream release of 0.10.4 will supersede your custom package.

If you don't want any package to ever supersede your custom package, then use apt-pinning or apt-marking or Snaps instead of mucking with version strings.


How to enable transcluency in Kvantum with fractional scaling?

I found a comment on GitHub, where the author of Kvantum says it is deliberately disabled to prevent artifacts in some places.
Follow these steps to enable it.
Kvantum Manager → Hacks → Disable translucency with non-integer scaling (uncheck it).
I could not notice any glitch in Plasma 5.19.5 after enabling translucency.


You have 3 possible solutions

Use Ethernet (connect a cable to the router and to your PC) then go to settings manager -> additional drivers and look for where it says use Broacom driver (something like that)
If you didn't find that driver. Then do this solution sudo nano /etc/modprobe.d/blacklist.conf and then add blacklist b43 and remove brcmsmac from being blacklisted. then go to sudo nano /etc/modules and add wl or brcmsmac. The latter works on my PC. I have broadcom too but not the same one.
If none of these solutions work, then upgrade to Ubuntu 13.10, connect to Internet using Ethernet and then go to additional drivers and you will find a Broadcom driver for sure.

`


How can I switch the Firefox user interface to German?

Have a look at this site: https://addons.mozilla.org/de/firefox/addon/deutsch-de-language-pack/

you can disable or enable those packs via the firefox preferences..


How do I remove WINE as a virtual package?

I installed wine using wine_5.7~bionic.orig.tar.gz instead of sudo apt install wine-stable. After extracting the tar file I got a folder wine-5.7/ and from there I did the further installation i.e. ./configure followed by make and make install. It installed wine completely but when I wanted to remove it completely I go to wine-5.7/ folder and typed sudo make uninstall to remove wine virtual packages completely.


Get exitcode from a background process in bash

If you don't want to wait on the child which will hang your process until the child completes, you can use the "trap" command for signal SIGCHLD. This way your parent process can continue doing things until the child terminates at which time the "trap" statements are executed. Then based on the result, you would take whatever action you need.


Wifi not connecting automatically on boot

You have this problem, because you installed b43 driver.

It can be fixed by

 sudo apt-get install --reinstall bcmwl-kernel-source

This package will blacklist b43 permanently.


When will the Python 2.7.9 upgrades be available from apt-get for 14.04LTS?

The upstream version of Python 2.7 in Ubuntu 14.04 will always be 2.7.6. However, the distribution version (8 in 2.7.6-8) will change. Instead of looking for Python 2.7.9, check the changelogs to see if the fixes have been backported. Since 2.7.9 will be part of Ubuntu 15.04, I'd expect an update around the time 14.04.2 releases, if ever. The corresponding Launchpad bug is as yet unassigned.


I'm not sure what happened with your apt-get, but if you're unable to use it, you might want to use apt from Ubuntu repositories (simply downloading and installing via sudo dpkg -i package_name)

the functionality of apt is pretty much similar to what you get with apt-get.


How to Run Cinnamon on XRDP With Ununtu Server 20.4 LTS

I solved this as follows:

Remove and purge all xfce packages (this got me a blank remote desktop BTW).

To ensure originally installed files, remove, purge, and reinstall xrdp (may not be necessary though).

Do this: http://catch22cats.blogspot.com/2018/05/xrdp-blank-screen-with-ubuntu-1804.html

This is the bottom of my /etc/xrdp/startwm.sh file:
 unset DBUS_SESSION_BUS_ADDRESS
 unset XDG_RUNTIME_DIR
 . $HOME/.profile

 test -x /etc/X11/Xsession && exec /etc/X11/Xsession
 exec /bin/sh /etc/X11/Xsession
 #cinnamon-session

Many of the guides will tell you to add the command to start the remote session to the end of /etc/xrdp/startwm.sh. This is uneccessary in my case (note that "cinnamon=session" is commented out), perhaps because I am running Cinnamon on the local desktop too. If you use different local and remote desktops, you may need to specify the local desktop here.
Note what did not work in Server 20.4 LTS, contrary to much of the online tutorials will tell you:

You do not need to create, edit, or make executable ~/.Xclients or ~/.xsession.  They are not used now.
You do not need to comment out or delete the "test" and "exec" line of /etc/xrdp/startwm.sh (see above).


Ubuntu releases

The Saucy 'end of life' day was: July 17, 2014 - https://wiki.ubuntu.com/Releases

Try current releases: Precise, Trusty, Utopic, Vivid


delete duplicate rows with same values (image attached)

Step 1

Let's keep track of the order of your columns. Fill the first empty row at the bottom (I assume that's row 37) with 1, 2, 3, etc. We're going to need this later. Don't use a formula -- each cell must have a value. See:

https://help.libreoffice.org/Calc/Automatically_Calculating_Series]1

Step 2

For this step, I assume row 36 contains the 350's, and that none of the columns you wish to keep have the number 350 in row 36. Based on your image, that seems a reasonable assumption.

Ctrl + A
Data > Sort > Options > Left to right
Data > Sort > Sort Criteria > Sort Key 1 > Row 36 (Descending)

Step 3

All of your "0-350" columns are now on the left. Delete them.

Step 4

Put your columns back in their original order.

Ctrl + A
Data > Sort > Options > Left to right
Data > Sort > Sort Criteria > Sort Key 1 > Row 37 (Ascending)

Step 5

Delete the last row -- the one we created in Step 1.


You can't just downgrade to previous version of Ubuntu.

But you can copy all your files to Windows partition, remove Ubuntu 16.04 partitions from Windows and install Ubuntu 14.04 from LiveCD or WUBI.


Virtualbox, How do I change guest (precise) resolution to 16:9 (1920x1080) instead of default 4:3?

Go to the File menu and activate Environment setting or, in more recent versions, Preferences.
Select Display and change the setting for Maximum guest screen size to “hint” which allows you to set an arbitrary size for both width and height (e. g. 1920 and 1200).
Reboot the virtual machine and enjoy it.


Grep a line which start and end with a pre defined character

This should be enough:

grep '^>.*
$' input-file

The ^ and $ ensure that those parts are anchored at the start and end of the lines respectively.

You can also do:

grep -x '>.*
' input-file

-x looks for an exact match: the whole line should match the pattern (which implies ^ and $ is wrapped around the pattern).


I see 2 questions here:

1) The no talloc stackframe at ../source3/param/loadparm.c:4864: You can solve this issue by sudo apt-get remove libpam-smbpass OR by running pam-auth-update and deselect "SMB password synchronization" option in the pam-auth-update UI. (ref. https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1257186)

2) mount error(13): Permission denied: This is your Windows that is not allowing the mount. You should post this question on superuser.com and give all the information on how the network share has been set up.


How to manually configure Nameserver without breaking Ubuntuone?

What you should do is to configure your system to override the default nameserver (given by DHCP), in a way that it is compatible with NetworkManager.
And the way to do this is to add your selected nameservers in the dhcp client configuration file, at /etc/dhcp3/dhclient.conf.

One way to do this is to uncomment the prepend domain-name-servers line.
Make it look something like

prepend domain-name-servers 1.2.3.4 1.2.3.5;

If you are really interested in speedy DNS lookups, you can cache the DNS requests using, for example, dnsmasq. Ask a new question for this, use as title How can I speed up the DNS requests with caching.


Permissions problem when copying files to /usr/share/tomcat6

You do not own the files, neither do you have the permission to write to /usr/share/tomcat6/webapps. The following command will change the ownership of the webapps folder and files recursively to yourusername. That enables user yourusername to write to that directory.

sudo chown -R yourusername /usr/share/tomcat6/webapps


How to install Ubuntu from DVD to Hard Drive without partitioning, that has DOS & no Windows?

A live CD can do both, you can run it in memory, or you can click the icon in the GUI to install it to a hard drive.

During your installation of Ubuntu, you'll have the ability to set up partitioning to how you want it.  Assuming you're not going to keep FreeDos and you don't intend on installing windows later, you can let Ubuntu handle the partitioning and use the entire disk.


I have an error while I try a "benchmark" on gnome disks utility

This is absolutely expected - you can't run write benchmark from GNOME Disks on the mounted and system drive.

Write benchmark will work only for unmounted and non-system drive. It needs access to the whole drive (from zero sector to its end).

If you want to run full (read and write) benchmark internal drive of your laptop - boot from LiveCD/USB and run GNOME Disks from it.


Below the state numbers, a bar shows how often the processor was awakened in one second (Wakeups-from-idle per second). The smaller the figure, the better. If you use the Gnome desktop, you can theoretically reduce this to three wake-ups per second, although realistically a value below 20 is pretty good. The color of the bar also indicates good and bad values: A bright red bar means that you really need to take some action; amber means an acceptable energy-saving situation.

source


That's Unix Timestamp / Epoch time - number of seconds passed from January 1st, 1970.

If you convert it to datetime, you will get:

$ date -d @1570201804
Fri Oct  4 18:10:04 EAT 2019

In UTC it is 10/04/2019 @ 3:10pm (UTC) but since I am in East Africa, we get +3 time difference coming to 10/04/2019 @ 6:10pm (UTC)

I guess your timezone is +5:30


How can I get the installed ALSA version?

To find out the version of alsa you are using, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

cat /proc/asound/version


How can I get uget downloads to start immediately?

In the "all the details of that download" window, make sure "Runnable" (instead of "Pause") is selected under "Status".

Also, the "green start button" starts/resumes only the selected download(s), not the whole queue.


Can I automatically change the desktop wallpaper everytime I log on

Introduction

The script below takes a directory as argument ( preferably only containing images ) , selects random item form its contents, and sets the item as wallpaper. It is intended to be started on user's login, although can be used by itself just as well.

Setting up and Usage

First of all, the script must be stored somewhere on the system. Preferably, it should be placed into your ~/bin directory. If you don't have bin directory in your home directory, then just create one.

Next,ensure the script has executable permissions. You can use either chmod +x ~/bin/set_random_wallpaper.py or do it the GUI way by right clicking on the file and checking Allow executing file as program in the Permissions tab of the Properties menu.

The script requires a directory as argument. Preferably, you should give it full path. For example:

set_random_wallpaper.py /home/JohnDoe/Pictures/wallpapers/

If you are doing it via command-line, then you can give relative path, Pictures/wallpapers/ , but for setting it up to run upon login automatically , use full path.

To make the file run upon every login, open Startup Applications program and click "Add" button. Use full path to command and to folder:

/home/JohnDoe/bin/set_random_wallpaper.py /home/JohnDoe/Pictures/wallpapers/

That's it !

Script Source

The script is also available on GitHub:

#!/usr/bin/env python3
"""
Author: Serg Kolo , <1047481448@qq.com>
Date: December, 21,2016
Purpose: Sets random wallpaper from a given directory
Written for: https://askubuntu.com/q/851705/295286
"""
from gi.repository import Gio
import os,sys,random

def gsettings_set(schema, path, key, value):
    """Set value of gsettings schema"""
    if path is None:
        gsettings = Gio.Settings.new(schema)
    else:
        gsettings = Gio.Settings.new_with_path(schema, path)
    if isinstance(value, list):
        return gsettings.set_strv(key, value)
    if isinstance(value, int):
        return gsettings.set_int(key, value)
    if isinstance(value,str):
        return gsettings.set_string(key,value)

def error_and_exit(message):
    sys.stderr.write(message + "\n")
    sys.exit(1)

def select_random_uri(dir_path):

    selection = random.choice(os.listdir(dir_path))
    selection_path = os.path.join(dir_path,selection)
    while not os.path.isfile(selection_path):
        selection = random.choice(os.listdir(dir_path))
        selection_path = os.path.join(dir_path,selection)

    selection_uri = Gio.File.new_for_path(selection_path).get_uri()
    return selection_uri

def main():
    """ Program entry point"""
    if len(sys.argv) != 2:
       error_and_exit('>>> Script requires path to a directory as single argument')
    if not os.path.isdir(sys.argv[1]):
       error_and_exit('>>> Argument is not a directory')
    img_dir = os.path.abspath(sys.argv[1])
    uri = select_random_uri(img_dir)
    try:
        gsettings_set('org.gnome.desktop.background',None,'picture-uri',uri)
    except Exception as ex:
       error_and_exit(ex.repr())

if __name__ == '__main__': main()

Technical details and theory of operation

The script itself works in pretty simple way, but I spiced it up with a few functions of my own. The main function checks if there is an argument and if that argument is a directory - otherwise it quits. If everything is OK, we proceed to get absolute path of the directory, and give it to set_random_uri() function.

As you may or may not know, the wallpaper is set in dconf database, which can be accessed and altered with gsettings command. The simple command line way is

gsettings set org.gnome.desktop.background picture-uri file:///home/JohnDoe/Pictures/cool_wallpaper.jpg

The file://... part is the file's URI (which is essentially a encoded path of the file, and is quite useful if your system uses different locale than English). First, we need to select random file and get its URI. That's simple - we use random.choice() to select from list and os.listdir() to get list of items in directory. What if our random selection happens to be a directory and not a file ? Well, that's what while loop is for in select_random_uri. Once we're happy with the selection, we get its

Well, from there that is pretty much the same thing that is happening in gsettings set command, but I'm using custom-written gsettings_set() function, avoiding the need to call an external command, and it has been useful for other projects, such as Launcher List Indicator.

That's it ! Have fun coding and enjoy Ubuntu responsibly !

Additional resource

Bash version of such script has been implemented before, see: https://askubuntu.com/a/744470/295286


When you boot, at the boot splash, edit the boot line (usually hit the tab key) and edit (remove) the quiet and splash options.


Does Ubuntu 20.04 installer skip creating a swap partition?

Swap is now a file

Ubuntu 20.04 creates a swap file during installation. Swap partitions are not required anymore. This is irrespective of SSD or HDD.

Ubuntu started using a swap file instead of a partition from the version 17.04. See Default 17.04 swap file location for more.

Swap is still needed

The suggestion that you should disable or remove swap from SSD is rather old. it comes from the old time when SSDs would get corrupt with too many writes. Modern SSDs are more robust. So, it is okay to keep a swap file (or a swap partition, if you really need it) in the SSD.

I would keep the default swap file as is in the SSD unless you have some special needs and requirements. If you have enough RAM the swap file may not be used much and won't "speedup" the death of the SSD by any significant time. On the other hand, if you edit videos or work with lots of open tabs in Firefox the swap file will prevent your computer from crashing if it runs out of RAM.

Hope this helps


How do I install php in unattended mode in Ubuntu 18.04

Found it.

The prompt is being caused by tzdata. To stop it from prompting I just need to execute

  export DEBIAN_FRONTEND=noninteractive

Before running apt install. I can just set the timezone after installation.


Ubuntu is not listed in boot menu after Wubi installation Win 7

Since you used Wubi, Ubuntu will appear in the Windows boot menu. Press F8 when booting Windows and you should see a menu similar to the image below:

Select Ubuntu and you are done. Very different from actually installing Ubuntu from the LiveCD where you would have the system completely separate from Windows. For example if something happens to the Windows system like a virus, corruption, boot error, etc.. any problem that eliminates the possibility to boot windows then you will be left temporally without Linux or Windows.
In the case of the LiveCD installation like the image below:

It is less prone to virus/corruption problems.


Internet connection working only on home WiFi

Ok the ip is assigned , now just check this

1) the routing table is populated ?

  route -n

do you have the default route added ?

  Destination     Gateway

  0.0.0.0         0.0.0.0

if you are too lazy and the network is open , just try to ping an ip address, use google public dns , is mnemonic simply 8.8.8.8

if you ping it you are online and the routings are ust fine

2) the point 1 is ok ? now check the dns

  cat /etc/resolv.conf

this will output lines like this

  nameserver XXX.XXX.XXX.XXX
  some times the XXX.XX... is the IP of your router / AP or the DNS server of you ISP

if nothing present , just add manualy one

  sudo echo "nameserver 8.8.8.8" >> /etc/resolv.conf

I think that these 2 steps solve your issue.


I uninstalled Python without realizing it's really important. What should I do?

To answer my real question, uninstalling Python entirely broke the desktop.  I was not even able to open text-only mode. I'm not sure how it remained functional for a while; maybe everything was cached.  It is not necessary to reinstall the OS.

Following the advice of Timo, I booted in recovery mode following instructions in this tutorial: RecoveryMode.  I enabled networking before opening the root shell.  I was not able to get online over wifi; I had to use ethernet.  Then I ran

sudo apt-get install ubuntu-desktop
sudo reboot

Now my desktop is fixed!


Ubuntu 16.04 guest OS on a Windows 10 VirtualBox host won't boot

I had the same issue.   After fighting with VBox for 4 hours, finally I won.  The change I had to do was enable back 3d acceleration and thing which I think made it workis the "Version" mentioned in "Settings->General->Basic".  I set it to "Ubuntu (64-bit)" instead of the 32 bit version, and voila, it worked.


Install video drivers by running in terminal

sudo apt-get install fglrx-updates

and reboot.


Install Ubuntu but keep Local disk D and its content

Don't click on Replace Ubuntu option.Just click on the something else option and select the partition(in your case it's c) then format it to ext4 filesystem.

Now install Ubuntu on the formatted partition.It doesn't affect other partitions.


Keyboard work for bios, grub, ubuntu live usb, but not the ubuntu 18.04 loaded on the computer

following this suggested link I was able to fix the problem.
Why my laptop's keyboard screwed up since kernel 5.4.0-47 till 5.8.0-20
By adding the line "blacklist intel_vbtn" to /etc/modprobe.d/blacklist.conf (I put it at the end.) prevents the kernel from thinking it is a tablet with an on screen keyboard.


That lag might be caused by an outdated Mesa driver.First tell me what version of Mesa are you running? The default one in 14.04 is Mesa 10.3.2 which is very out of date compared to the latest Mesa release.In case you are running 10.3.2 you can easily update it to 10.6.3 by installing the xorg egers ppa.In order to do so type this in the terminal

sudo add-apt-repository ppa:xorg-edgers/ppa

After that type this in the terminal and your Mesa driver should be updated.

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

After that reboot and check if the latest Mesa version is installed by using Glxinfo if it's not already installed.Then just install it by this into the terminal

sudo apt-get install mesa-utils

After Glxinfo is installed you can now check the Mesa version by typing this into terminal(It should say 10.6.3 now)

glxinfo | grep "OpenGL version"

The fps lag in Chromium should now be gone If I assume correctly.


Internal HDD is not recognized during boot but recognized after suspend/wakeup

Since the hard disk is successfully recognized after suspension and followed wakeup, the workaround is to force the suspend before mounting / file system. The kernel built with CONFIG_PM_TEST_SUSPEND=y and booted with test_suspend=mem kernel parameter does it.
About CONFIG_PM_TEST_SUSPEND=y from kernel sources help:

This option will let you suspend your machine during bootup, and make it wake up a few seconds later using an RTC wakeup alarm. Enable this with a kernel parameter like "test_suspend=mem".

To install Linux on such laptop you need to:

Boot from live-USB
Suspend the laptop and wake it up
Install Linux onto the internal drive
Chroot into recently installed OS
Download kernel sources
Build and install the kernel with CONFIG_PM_TEST_SUSPEND=y
Set test_suspend=mem into bootloader
Reboot

More about some of the steps

Chroot into recently installed OS

Except of bind mounting /dev, /dev/pts, /proc and /sys do not forget to do it for /run to allow access to the internet from chroot (if you need it).

Set test_suspend=mem into bootloader (In case your bootloader is grub)

To do it, open /etc/default/grub (from chroot, of course), find row beginning with GRUB_CMDLINE_LINUX_DEFAULT= and replace quiet splash with test_suspend=mem. Then run
update-grub


DHCP connection does not set default gateway automatically

I'm experiencing the same issue on Ubuntu Server 16.04.  After troubleshooting, my issue stems from my DHCP server also providing a Classless Static Route (DHCP option 121, rfc3442-classless-static-routes in ISC DHCP), from a Microsoft DHCP server (Windows Server 2008 R2).

Looking at /sbin/dhclient-script, if at least one classless static route is provided to the DHCP client, it disregards the router setting, hence no default route set.

# if we have $new_rfc3442_classless_static_routes then we have to
# ignore $new_routers entirely

My "fix" is to add another classless static route to the Windows DHCP server.  So:

Destination: 0.0.0.0
Network Mask: 0.0.0.0
Router: 192.168.1.1

(once added, the Network Mask is automagically changed to 255.255.255.255)

I do have short DHCP lease expiry (15 minutes) and have not had any complaints from other Linux or Windows users on the network since adding the new route, so I figure the change should not cause major issues.

As I'm too new to comment:

@t11z My lease file is /var/lib/dhcp/dhclient.ens32.leases, option routers is present and valid.
@Jos Although a workaround, your suggestion defeats the purpose of utilizing DHCP to provision network settings. If the default gateway IP address changes in the future, affected machines will need to be updated manually.


How can I play a sound clip (.ogg file) at startup?

There are a lot of places that you can think of, one of them  can be /etc/profile for all users and ~/.profile for each user.

Another thing you can do is to add a startup command, open dash search for "startup" and add your command there:


Enable UART communication on Pi4 Ubuntu 20.04

I had a bunch of trouble talking to a roboclaw motor on an rpi4 (model B) under Ubuntu 20.04 (64 bit). I was able to resolve it, though I had to disable Bluetooth to get there. Unfortunately, I'm not sure at this point how to get there without disabling Bluetooth. Reader beware.
Confirmed this works with 5 roboclaw motor controllers on the same serial bus.
That said, here's how I did it (note that this is cliffsnotes of this procedure):

Disable serial-getty@ttyS0.service
sudo systemctl stop serial-getty@ttyS0.service
sudo systemctl disable serial-getty@ttyS0.service
sudo systemctl mask serial-getty@ttyS0.service

Setup udev rules

put below content in new file /etc/udev/rules.d/10-local.rules
KERNEL=="ttyS0", SYMLINK+="serial0" GROUP="tty" MODE="0660"
KERNEL=="ttyAMA0", SYMLINK+="serial1" GROUP="tty" MODE="0660"

Reload udev rules: sudo udevadm control --reload-rules && sudo udevadm trigger

Add user to tty group: sudo adduser ubuntu tty
Delete substring console=serial0,115200 from /boot/firmware/cmdline.txt
Add newline dtoverlay=disable-bt to /boot/firmware/config.txt (I put it right under the cmdline=cmdline.txt line)
Restart
(Optional) Feel free to test with this script: https://github.com/nasa-jpl/osr-rover-code/blob/foxy-devel/scripts/roboclawtest.py

Note that after this set up, you need to use ttyAMA0 (or alias serial1), not ttyS0. The first uses the full hardware UART, the second uses a "mini-UART" implementation that seems to not work so well under Ubuntu 20.04 (at least with the roboclaw, in my hardware setup. YMMV.). Some more discussion here on GitHub.


ETPS/" Elantech Touchpad fails detecting single finger

Here is a small explanation on how to set the sensibility of the touchpad.

Set the values for FingerLow and FingerHigh to 15 and 20. Original value seemed to be 25 and 30.

synclient FingerLow=15
synclient FingerHigh=20


What packages do I install for ffmpeg and libmp3lame?

sudo apt-get install ffmpeg libavcodec-extra-52

If package not found try:

sudo apt-get install ffmpeg libavcodec-extra-53

you can also try to install the libmp3lame0 package:

sudo apt-get install libmp3lame0


Is it safe to upgrade Ubuntu from 16.04 LTS to latest LTS version with working web-applications running in production?

There are several risks you run. Just to name 2: you say web applications so I assume a web server and a database are present. What if there is a setting that is deprecated that you are still using? Finding that issue and solving it might take a long time. I doubt there is (since I have been upgrading google cloud instances from 16.04/18.04 to 20.04 for 5 months) but there will be more situations like this.
edit: I have a real life example. The date format in MySQL has gotten an update.
A compare with a date "2000-00-00" is still valid but "2000-01" is no longer allowed. You must have mm and dd in a date where in older version this was warned about but now is mandatory. The ! in future release will also be removed from MySQL (we must use NOT).
So no, it is never safe to do anything like that on a production server. Even with backups. A simple power cut could be fatal. The downtime could then run into several hours.
The way to do this could be ...

Get a 2nd server and set it up. Install a backup of the production server onto that server.
Test 2nd server until satisfied.
Make 2nd server production server.
Make old production server 2nd server.
Rinse, repeat for the next upgrade.

I do understand that it is not always possible to have a backup system.
So another method could be to clone your system onto an external disk and then do the upgrade. If the upgrade goes wrong you clone the contents of the external disk back to your system. That makes it certain you can restore your currently working situation in the least amount of time.
Whatever method you choose: don't just upgrade. Prepare For Failure.


Please add acpi=off to the kernel command line -- it's just slightly different than doing it with the LiveCD:

Press the Shift when booting up, to get the Grub menu. Use the arrow keys to navigate/highlight the entry you want (usually the first one).

Press e to edit that entry, which will show you the details:

Find the linux entry as shown above, use the arrow keys to get to it, and then  press the End key to get to that line's end (which may be on the next line!). Enter acpi=off as shown, and press Ctrl+X to boot.
You can make this workaround permanent by:

sudo nano /etc/default/grub
Change line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=off"
Ctrl-X, press Y and then Enter to save and exit.
sudo update-grub
Reboot and you should no longer have the black screen problem.

See also:

How do I add a kernel boot parameter?


Should I always restart the system when I see "System restart required"?

Should I restart when prompted?

Yes, you should. For most cases, a restart is required when an update to the Linux kernel has been installed. These updates are usually security updates, and then only come into effect after a reboot. Updates to normal applications such as Firefox come into effect after you restart the program. Firefox should prompt you to do this automatically, but other programs may not, so it's something to bear in mind.

How to restart:

To restart the computer in Ubuntu 12.04, click the power icon in the upper right corner of the screen, and select "Shut down...". In the dialog that appears, a "Restart" button should be visible. In Ubuntu 12.10, the restart option appears in the power menu directly.

Where is the restart option?

To restart from the command-line, run this command:

$ sudo reboot

The downsides of restarting:

On the whole, restarting is a very safe operation, and I would not consider it in any way unsafe. Of course, when you restart the computer, you lose all the information in RAM, so make sure you save all open documents and files before shutting down your computer. While you are restarting, your computer will of course be offline for a few minutes. If you're running a server, it will be down for a few minutes. If you have an open SSH session, it will be terminated.


While netserver's behavior seems to be somewhat unusual on Ubuntu, I think that you may find the netserver service to be already running.
If you run a ps -ef | grep netserver, you may find the process already running and you should be able to perform netperf queries against it.

Upon installing netperf on my local machine, I was able to run netperf with several flags set and get results back.


most likely you didn't put your connection on auto....
for example, if your wifi is called 'homeinternet', you can
go up to the wifi icon on the top and select 'auto homeinternet' by hovering over
'homeinternet'.


How can a command with arguments be fed to Bash?

First of all, the shortcut that you are trying to set CtrlShiftD is often used by other programs, so I'd recommend you use something else.

Second, on my system, when I run the command you specified, it outputs error warning, specifically this:

xvkbd: Mode_switch not available as a modifier
xvkbd: although ISO_Level3_Shift is used instead, AltGr may not work correctly

so we might want to get rid of that one using 2> /dev/null redirection.

As for setting keyboard shortcut itself, it's sufficient to do

bash -c "xvkbd -text $(date "+%Y-%m-%dT%H%MZ" --utc) 2>/dev/null"

and set it to a key combination that won't interfere with apps. Personally, I'd use Ctrl+Super(Win key)+J , which is unused, but the choice is up to you. I for example bound mine to Ctrl+Super(Win key)+P


Nemesis is not available in PPA now, you can still install it by following these steps :

Install dependencies

sudo apt-get install libdnet-dev libpcap-dev

Download nemesis-1.4.tar.gz-Click to download

Extract the archive and install

tar xzvf libnet-1.0.2a.tar.gz
./configure --with-libnet-includes=/usr/include/ --with-libnet-libraries=/usr/lib
make
make install

Here is nemesis

/usr/local/bin/nemesis

Click here for complete tutorial


Mouse Flicker on Triple Monitor setup Ubuntu 14.04

Install this PPA, it will add the patch to Compiz to fix the screen refresh issue often seen on ATI based graphics.

sudo add-apt-repository ppa:townsend/compiz-nvidia-refresh-test
sudo apt-get update
sudo apt-get dist-upgrade

Source


how to unlock screen when booted from usb?

Leave the password field blank and press enter.


I installed the jdk just fine. Here's what I did.

Get the .rpm file from Oracle's website.
Open up a terminal and type this command:sudo apt-get install alien
Wait for alien to install.
Type: sudo alien -i -c <path to the file>
Wait for that to finish installing.  It will look like it's not doing anything for a while, but it is.
Test the installation with: java -version
You're done!


HP envy dv6 overheating after installing ubuntu 15.04

Your both video adapters work at the same time. That is why the computer overheats.

Install Nvidia drivers from System Settings -> Software & Updates -> Additional Drivers.

Or from terminal

sudo apt-get install nvidia-346 nvidia-prime

And reboot.

You will be able to switch adapters in Nvidia application.


Ubuntu server 14.04 doesn't boot, desktop does

I've had the same issue before. I believe the problem rests in the installer CD/DVD software. For that install, I went ahead with the desktop install then using aptitude removed everything gnome-ish or unity-ish etc etc. The root of the problem I had was that the server installer seemed to lag a few generations behind the Desktop. Example: like when Core i3 was brand new, there's a type of error that "everyone knows is common and the work arounds for it". This is the kind of problem I had last year trying to load server on one of our boxes.

And speaking of USB drives... I've had Dell C521s that we ran linux from USB drives that were inside the case. There was a spare USB header on the motherboard, so I ziptied the cable and thumbdrive to the side somewhere.

Now that USB3 is pervasive, it seems* to work as well as any HDD. *-that is anecdotal, didn't perform any speed testing. Now makes me want to see if there's a spare USB header on my Lenovo RD430 server... then I can have the OS on a stick and a backup ready to go.


Update fails. Can't install any software !

Issue this command:

 sudo rm /var/lib/apt/lists/* -vf && sudo apt-get update

It will fix your problem.


Ubuntu 14.04 Ralink RT 3290 wireless lan hard blocked

My problem is fixed by the command:

echo "options asus_nb_wmi wapf=1" | sudo tee /etc/modprobe.d/asus_nb_wmi.conf


Help configuring display settings: Ubuntu 20.04 and old (of course) desktop w/NVIDIA GeForce 7050 graphics card

i think that the NVIDIA proprietary driver may not be supported anymore for the latest kernels > 5.4
try to use instead : xserver-xorg-video-nouveau
please see After an update and reboot in Ubuntu 20.04 I can no longer complete the boot
and The installation of the NVIDIA display driver 340 fails in Kubuntu 20.10


sm-msp-queue says: unable to qualify my own domain name (xxx) -- using short name

If you have a fully qualified domain name for your server, this message should go away.
In /etc/hosts, you can define a FQDN like ubun.somedomain.tld :

127.0.0.1 localhost
127.0.0.1 ubun.example.com ubun

To apply the new host name without rebooting the system type (after having changed the /etc/hosts file) :

$ sudo hostname ubun.example.com

Then check you have the FQDN :

$ hostname -f

smmsp at the place you show it (in /etc/cron.d/sendmail is not the command name but the username to use to run the command that follows. The rest of the line is the command (testing if sendmail is present and executable and then run it with a specific option for executing actions to do in crontab).

If run at the terminal the command seems to do nothing (print nothing on the screen) this doesn't mean that she doesn't do something.

By the way, this command is run at regular interval to do the submission of mails waiting in the queues of Sendmail. So if you disable it, mails will never be delivered.


I discovered how to recover the files (I still could not use the Restore function of BIT). I found that the problem with recovering my .thunderbird folder was caused by the permissions (owner: root and read-only).  Once that was fixed, I was able to recover that. It was not as critical to me, but I was also able to recover my .mozilla folder by fixing the permissions.


Cannot execute nor locate sublime-text-3 after installing via ssh terminal

The way you proceeded, Sublime text editor should be installed and working.

Try using the command subl on the terminal, to see if it will open Sublime.


Browser freezes frequently. Will it be a swap problem?

It's most likely not a swap problem, with 16 GB of RAM, it is quite unlikely that you run out of it. USB pendrives are simply not fast enough for this workload. Why don't you install the OS on a disk?

And regarding the swap question. AFAIK use of a swap has nothing to do with how modern an operating system is. The question is, do you need a swap for your workload or not. With 16GB, I would say, you most likely do not.


Sharing files between Ubuntu 14.04 and Windows 7

You can install ssh server on your Windows Machine and connect by this protocol. This is a tutorial how to do it.


Many places in Ubuntu touch pressing and holding a word does select the word and bring up a context menu with options such as select all, copy etc. just like other mobile OSes. For example the Ask Ubuntu app I'm writingbthis in behaves that way.

The Notes app on my M10 does not. I'm tempted to say it's a bug.


Is there a solution for scanning several photos in one go and save them in several files?

I think that running gscan2pdf with your scanner in batch mode(continuous) is the fastest way. You can set the scan geometry to match your picture. You will hardly be able to keep up with the scanner as you swap pictures. Faster than placing 2-4 pictures, hitting the button, running the tool and clearing the pics and starting over.


Update: The solution, I found, is to un-mount the camera after it has been connected to the computer. To do this, call up the Home Folder, and right-click on the link to the Nikon camera. There's an option to un-mount it there.

Now to figure out how to stop Ubuntu from automatically mounting the camera.


What Book-Library  Organizing Programs are available?

I successfully added this Greek z39.50 source to Tellico, and executed some searches. I don't know whether the coverage is enough for the books you have, but you might want to give it a shot.

http://irspy.indexdata.com/full.html?id=Z39.50%3A193.108.161.35%3A210%2FADVANCE

ΕΛΛΗΝΙΚΟ ΑΝΟΙΚΤΟ ΠΑΝΕΠΙΣΤΗΜΙΟ
Host: 193.108.161.35
Port: 210
DB: ADVANCE


You have to choose the option "Something else". Then, look for the partition you want to dedicate to Ubuntu. Choose to use it as ext4 partition, check the checkbox to format it, and choose to mount it at /.

You will get a warning that the data on the partition will be lost when formatting. Double-check that you chose the correct partition, then confirm.


Compose sequences with multicharacter result don't work

To access all the characters in en_US.UTF-8/Compose, you need to enable XIM as input method (can be done from System Settings -> Language Support) and relogin (or possibly reboot).

Please note that XIM does not work on Wayland - can't tell if it's a bug or intentionally - so for Ubuntu 17.10 you need to log in to an "Ubuntu on Xorg" session.


To change the password, select boot recovery mode from the grub menu.

When the menu appears select "drop to root shell prompt".

Next change the password:

passwd enrica

Reboot the machine and try it:

reboot

You might want to force a check of the filesystem system since the problem appears to have been an incorrect shutdown.  There may be other problems.

If you don't get a grub menu at the start (single boot machine, usually) then hold down the shift key while starting the machine.  It should start up grub and give you the recovery mode option.


nautilus browse network remove stored password?

Open Passwords and Keys and search in the search field on the top right corner for the host name of your Windows machine.

You can remove the entry with a right-click. If there is no entry the password is not stored.

To save username and password you have to use the check box in the connection dialog in nautilus.


Service initialization scripts: upstart?

Where can I read some brief information about upstart in ubuntu?

The Upstart Getting Started page might be useful (just skip to the Writing Jobs section). Or the DigitalOcean tutorial.

  How can I add my own service?

Bare basics:
Create a .conf file in /etc/init. It should have:

A valid start on stanza (and if it is a service instead of a short-lived task, a valid stop on stanza)
An exec line or script-end script block with shell commands to start the actual command.

For example, see the tty5 service:

$ cat /etc/init/tty5.conf
# tty5 - getty
#
# This service maintains a getty on tty5 from the point the system is
# started until it is shut down again.

start on runlevel [23] and not-container

stop on runlevel [!23]

respawn
exec /sbin/getty -8 38400 tty5

  What's the difference between /etc/init and /etc/init.d in Ubuntu?

The former is for Upstart service configuration files, the latter for the older sysvinit scripts.

  Will Ubuntu move to systemd initialization in future?

Yes.

  Is service command deprecated?

Not so far. service covers both Upstart and sysvinit services. I'm not sure what form it will take in 15.04.

  Why some files in /etc/init.d contains these lines: ...
  It seems that Ubuntu has 2 different initialization systems. Am I right?

No, Ubuntu has only one init system: Upstart. Upstart can load and run sysvinit services. The creators of some packages provide both Upstart and sysvinit service files, since the packages maybe used in a system without Upstart (such as an older version of Debian). This way, the package creator doesn't have to provide two packages for both init systems. If the Upstart service is running, the sysvinit service shouldn't be, which is why that check is in place.


What does the form field »Enter Auth username« during the boot proccess mean?

I encountered this same issue and managed to resolve it. I first opened the OpenVPN init script with:

sudo nano /etc/default/openvpn

And uncommented the line:

AUTOSTART="none"

This should stop all OpenVPN connections on startup and thus resolves the issue without actually removing OpenVPN.


We do have an issue where we don't support the "Accept" header correctly and send compressed pages to clients that don't support it. We're working on fixing it, but it's pretty involved and doesn't affect a lot of our users, so it isn't high on our priorities. Having said that, it is broken, and we will fix it as soon as we can.


MATLAB com.jogamp.opengl.GLException: X11GLXDrawableFactory error

In Linux command line, type matlab -softwareopengl, it will start Matlab with normality. To make this default, inside Matlab command line, type opengl('save','software').
It works with Matlab R2019b on Ubuntu 18.04.


How to import a vcf file into LibreOffice Calc

You can use Thunderbirds addressbook as workaround:

Tools->import the VCF-File into Thunderbirds adressbook

it will show up as a new addressbook in the list. Due to a bug, you have to select another addressbook and then the new imported addressbook again to see the content.

If you are happy, then select that adressbook and select

Tools->export into a CSV file
open the CSV-File with LibreOffice Calc


Installing vlc 3.0 on Trusty through ppa still gives version 2.1.6

You can't install vlc-3 on ubuntu 14.04. you have to be upgrade either 14.10/15.04/15.10/16.04. Because vlc only have the 3.0.0~~git20160413+r64193+39~ubuntu for these version. Sorry to say you can't install vlc-3 in ubuntu 14.04 right now.


Load_Cycle_Cont increase quick / green hdd dead

I once had the same problem and also lost a hard drive a while back. To fix this, I set hdparm to prevent spindowns alltogether to prevent this problem. Here's how it can be done. Open a terminal and execute the following commands:

echo "hdparm -B 254 /dev/sda" | sudo tee -a /etc/pm/power.d/90_hdparm

Now, make the file executable:

sudo chmod +x /etc/pm/power.d/90_hdparm

Make a copy to sleep.d

sudo cp /etc/pm/power.d/90_hdparm /etc/pm/sleep.d

Finally, your laptop will switch to a powersave mode everytime you unplug the AC and go to battery power. To prevent this from changing hdparm settings, use gedit to edit the file /etc/hdparm.conf:

sudo gedit /etc/hdparm.conf

and copy/paste the following to the end of the file:

/dev/sda {
    apm = 254
    apm_battery = 254
}

Save the file in gedit and exit.

Reboot and check to verify the changes with the following command after you reboot:

sudo hdparm -B /dev/sda

source: Making hdparm setting permanent

Also, make sure hdapsd is not running:

sudo service hdapsd stop

and uninstall thinkpad drivers if they are installed and not needed:

sudo apt-get purge tp-smapi-*

Click here form more info on this issue and disk parking.


Uninstall Calibri font, installed from Windows' font directory

You have to update the font cache:

fc-cache -rv


How to tell if wifi is connected and to which wifi network. Ubuntu MATE 17.04

Open the Control Center (e. g. through the application dash, the settings menu of your desktop environment) and from there open the network settings. It will display a list of known network connections (wired, wireless and virtual). If you select individual network connections from the list you will see their state in the status pane next to the list. For wireless networks it will include the SSID of the access point if associated to one.


Unity Freezes when i change the brightness of notebook screen on an Acer Timeline 4810T

Recovering Unity Without Restarting

Press Ctrl+Alt+F1 to switch to a virtual console. Log in with your username and password. As you enter your password, you won't see anything change, but that's OK.

You'll get a shell prompt (which ends like $ _). Run this command:

compiz --display :0 --replace

Then press Ctrl+Alt+F7 to go back to the GUI. If that doesn't work, switch back to the first virtual console (Ctrl+Alt+F1) and run:

unity --reset

Then switch back to the GUI (Ctrl+Alt+F7).

One of those will probably work. You don't have to log out in the virtual console, but if you want to (for example, so that people can't switch to it when you're logged out or have a locked screen), you can do that by running the command exit in it.

Restarting Safely, If You Have To

If you find you do have to restart your computer, you should avoid hard resets. Instead, you can switch to a virtual console Ctrl+Alt+F1, then reboot with Ctrl+Alt+Delete.

If that doesn't work, you can do something that is nearly as powerful as a hard reboot, but which decreases the risk of data loss and other possible negative outcomes of hard rebooting. Hold down Alt and SysRq and, in order, press R E I S U B. (Hold down Alt and SysRq the whole time, but release each letter key before pressing the next one.) See this page for a simple explanation of what that does, and this Wikipedia article for more detailed information.

Reporting the Bug

Since you've found a bug, I recommend reporting it--this should help get it fixed sooner, plus there might be workarounds you can use to fix it yourself on your computer, which you'd find out by searching for the bug (or by reporting it and finding that your bug is a duplicate of an existing one).

Ubuntu's community documentation explains how to report bugs properly.


KDE Plasma 5 Missing Removable Devices Option

Short answer

Changing the /usr/share/kde4/services/kded/device_automounter.desktop line from

> X-KDE-Kded-phase=1

to:

> X-KDE-Kded-phase=0

Starting 'Removable Device Automounter' from the Service Manager using

kcmshell4 kcmkded

Picking the right options from the KDE 'Removable Devices module usinc

kcmshell4 device_automounter_kcm

Explanation

KDE System Settings (5)

The Kubuntu 15.04 is using KDE System Settings that can show KDE Control Modules (kcm) for the KF5/Plasma5. The removable devices kcm is from the KDE4. You could launch the KDE Control Modules from the command line, i.e. the following command will launch the module:

kcmshell4 device_automounter_kcm

Daemon must be running

The 'Removable Device Automounter' Service, another KDE(4) control module, needs to be running. Check with:

$ kcmshell4 --list | grep kcmkded
kcmkded                    - KDE Services Configuration

As default the Removable Device Automounter is not running by default, open the windows and start the serice:

kcmshell4 kcmkded

Configure KDE Daemon start-up

the KDE(4) Daemon (kded) desktop files are in /usr/share/kde4/services/kded/ ;
the device_automounter.desktop has line

  X-KDE-Kded-phase=1

From HOWTO Make KDED Modules:

  The exact way autoloading works is
  controlled by X-KDE-Kded-phase=, which may be 0, 1 or 2 (the default).
  Kded phase 0 means the module is always loaded by kded, even outside
  of KDE session. It should used only by kded modules which must be
  always running. Kded phase 1 modules are loaded right after kded
  startup, but only during KDE startup, i.e. it is for modules that are
  always needed by the KDE session. Phase 2 modules will be loaded
  later.

Maybe the KF5 KDE is not detected as proper KDE?

We need to change the device_automounter.desktop line to:

> X-KDE-Kded-phase=0

The Removable Device Automounter service will be running after a reboot.

Edit

solid-device-automounter Port to KF5: https://git.reviewboard.kde.org/r/124730/

  Review Request #124730 - Created Aug. 13, 2015 and submitted 8 months
  ago

Is part of the Plasma desktop 5.5 or later.


Not able install paint tool in ubuntu 10.10

Try removing any PPAs you added, and switching from the Indian mirrors to another mirror using the Software Sources tool.


This installation will still require a phone capable of receiving SMS.
sudo snap install --devmode --beta anbox
sudo snap install viber-unofficial
sudo apt install android-tools-adb

You will need download a copy of the x86_64 Viber APK, once you have done that start Anbox and run
adb install <PATH TO VIBER APK>

Now open the desktop version of Viber (the one you installed via Snap), it will ask you if you have Viber installed on your phone, select 'yes' and enter a phone number.
You should now see a QR code, below it there should be a link that says 'My camera is not working. What can I do?', click on it, it will ask you if you want to copy the link, click 'copy'.
Now go to Anbox, click on Viber, go through the regular setup process, entering a real phone number that can recieve text messages. Once the setup process is complete, create a contact, and send them the previously copied link and click on it. Viber desktop should now ask you if you want to sync, click yes on both the desktop and mobile version of Viber.
Now that the setup process is complete you can uninstall Anbox and adb:
sudo snap remove anbox
sudo apt purge android-tools-adb


How do I get sound working in Unreal Tournament 2004?

If you were to try and play this game with audio in 15.04 you would need to actually symlink for the current libopenal.so.1.15.1 file to the ut2004/System directory replacing the default openal.so file that resides there.

Essentially running something similar to the following:

ln -s /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1 /home/itnet7/ut2004/System/openal.so

(Please make sure you adjust the path to reflect your installation, and username)

Once I created the symlink, I was able to launch UT2004 normally (without using aoss or padsp) and sound worked.

To install the game, I used my backup from many years ago, extracting the main UT2004 installation directory to my user account's home directory and upon launching it ran into some of the issues with libstdc++5 and libSDL mentioned here. I discovered that link after getting I was able to get the game running, and it helped me fix the sound. I'm posting it here in case it helps save someone else some time that might be looking for it as well.


Cannot open Virtual Box 6.0 after an interrupted update

Partially solved!

In this post Virtualbox 6.0, crashes immediately on ubuntu 18.10
 they found what the problem is. Apparently, this failure to start Virtual Box occurs when the laptop is connected via HDMI to a second monitor. So, doesn't use a second monitor solves the problem, Virtual Box starts with no problem then.
Now we should find a solution to allow to work with Virtual Box having two monitors connected...


The audio on my computer isn't working after installing Ubuntu. sudo alsa force-reload isn't working. How do I fix it?

Is not an answer, but I can't write on comments. I had a similar problem before, and always the solution was: on pavucontrol > Configuration > Turn off HDMI audio controller. It seems that in my case the problem is the HDMI output of the video card, it did not detect that it is not connected.

I don't know if your problem is the same.


How to install CUDA 8.0 on Ubuntu 16.04 with Nvidia GeForce GTX 1080

From reading your log, it appears you are attempting to install your Cuda driver whilst your start X is running and thus using your gpu.

You need to stop it from using your GPU first:

Remove the current drivers: sudo apt-get purge nvidia-cuda*
(optional) - If you want to install the drivers too, then run: sudo apt-get purge nvidia-*
Logout from your GUI(Your not logging out  is the reason you are getting the error message). To logout, press ctrl + alt + F2.
Stop lightdm: sudo service lightdm stop
Now you can go ahead and install the drivers, in your case you will have to run something like: sudo sh cuda_8.0.18_linux.run (replace cuda_8.0.18_linux.run with your .run file's name).
NB: You need to make sure that you select/agree the option to create a symbolic link.
when the installation finishes, reboot your machine: sudo reboot


Make sure that you have Clamtk installed.  ClamTk is an easy to use graphical front-end for Clam Antivirus.  If not just install it using synaptic, or use sudo apt get install clamtk in terminal, then Search for it in Dash, search for clamtk, or just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

clamtk


Problems Installing Display Link on Ubuntu 20.04

To run the file, you first must make it executable.
Extract the file and then open the containing folder in your terminal. Run:
chmod +x ./displaylink-driver-5.3.x.x.run

(Change the name to match the file downloaded.)
Then just run the file from the terminal with:
sudo ./displaylink-driver-5.3.x.x.run

(Again changing the name to match the file downloaded.)
Enter your password as requested and follow the on-screen prompts.


How do I make Ubuntu 14.04 unreachable from physical Ethernet ports?

the ifdown command can turn off your ethernet adapter.


The drivers for RTL8723DE were released recently on github. Visit this link and : RTL8723DE drivers

and clone the folder.

Follow the instructions using root privilages:

git clone https://github.com/smlinux/rtl8723de.git -b 4.15-up
dkms add ./rtl8723de
dkms install rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414
depmod -a
reboot


How to have the type of boot detected by the kernel and written to a file (perhaps in /proc)

The way a computer is started is not saved and not passed onto the operating system.

  and Skype goes online, people may think I'm there when I'm not

I would assume it would be less trouble to start Skype with your status set to "off line" or "invisible".

  and start messaging me but get no reply from me.

I do not see a problem here. If you do not respond you are not there.


How do I bring back the "Lower" option when middle clicking on the title bar in Ubuntu 15.04?

Okay awesome I figured it out for anyone else. Running this command updates the value and fixes it:

dconf write /org/gnome/desktop/wm/preferences/action-middle-click-titlebar "'lower'"


How to deal with dpkg error while installing Battle of Wesnoth?

Probably the archive is corrupted,
delete that deb and run sudo apt-get install -f

sudo rm /var/cache/archives/filename.deb


Short Answer: Upgrade to Ubuntu 16.04 LTS.

Medium Answer: Upgrade to 16.10 only if you are certain there is something in 16.10 that you can't have in 16.04. For example, your hardware is not fully supported in 16.04, so you need the newer kernel in 16.10 for all your hardware to work.

Long Answer: Upgrade to neither. Do a clean install of 16.04 in a spare partition. A good set-up will be:

Make a separate /home partition, if you haven't done so already with 15.10.
You will end up with 4 partitions: swap, root0 (15.10), empty root1 (16.04) and home.
root partition don't have to be big, about 10 to 16 GB each will be enough.
install 16.04 to the empty spare root partition. Point to the existing /home partition during installation. Make sure to tell the installer NOT to format the /home partition. Specify a different user name if you want to keep 15.10 data untouched by 16.04.

The beauty of this set-up is you don't ever have to ask this question again. You can install the newer version while keeping your current installation. This allows you to take your time customizing and/or evaluating the newer version. It also ensures that you have a working system if something goes wrong with the newer installation.

Assuming you finally migrated to the newer version, the old root partition now becomes your spare partition. When a newer version is released, you can repeat the same process over and over again, ad infinitum.


firefox - this browser does not support video playback

You should -

make sure that gstreamer1.0-libav plugin is installed
then in firefox address bar go about:config, search mediasource & enable
media.mediasource.webm.enabled &  media.mediasource.enabled

That should allow playback on twitter as long as the 1st. 2 mentioned below are not enabled or you enable all 3

If you want full coverage in Firefox as seen in https://www.youtube.com/html5, (all 6),  then in about:config in addition to above search media & enable
media.fragmented-mp4.exposed & media.fragmented-mp4.ffmpeg.enabled & needed to not break facebook media.fragmented-mp4.gmp.enabled

As they say proof is in the pudding -


How do I get an Atheros AR242 / AR542 wireless card working?

I'm not sure if this is the answer but it was the answer for me when I had trouble with Broadcom. I used the Synaptic tool to update wireless components and that may help. However, the actual Kernel could help most. You can use the synaptic tool to download a newer kernel by searching for linux image. Then choose the generic and the latest.

I had even recompiled the mainline kernel (from kernel.org) in order to get all of my devices to be fully supported and for the system to run super fast. That would be a part II solution and I would refer you to my blog.

Kernel compiling on Ubuntu

This may seem like an over-kill answer but I've had wifi problems too on various systems and these were my fixes. Hope this helps!


How do applications open from/save to smb shares?

The problem is the applications themselves aren't necessarily using gvfs to do their I/O. Using smb:// should work in Firefox though, but not work by using the File Open dialog. Typing the URL directly into the location bar should work though, assuming that Firefox wasn't recompiled without the "GNOME" integration support.

Apps which do not use gvfs directly to do file I/O will need to open the file via the gvfs mount point (~/.gvfs/ or /run/user/$USER/gvfs/) to be able to interact with it. Opening a file in Libreoffice from within Thunar probably works because it's using the mount point path, rather than an smb:// URL to the file.


Can't open photos stored on Android system from Ubuntu

On the Phone side:

Ensure device is unlocked

Try changing usb connection options:

Connect the Samsung Galaxy Note to the computer using the USB cable.
Touch and drag the notification bar down.
Touch Connected as a camera.
Touch the required option (e.g. Media device (MTP)).

On the Ubuntu side:

You may need to install the libmtp packages:

sudo apt install libmtp-common mtp-tools libmtp-dev libmtp-runtime libmtp9

General Troubleshooting

Try a different USB cable

Try a different USB port

Use a powered USB hub


How come when I view a website, like Adobe or Godaddy Jolly Wallet pops up?

This is probably because you've installed Webpage Screenshot Capture, a popular Chrome extension with malware.

They do say this on the Extension Download Page

  【Ads】* Webpage Screenshot not inject ads or change content of any site!
  We are testing new feature. Small amount of the users may see the jollywallet bar on some e-commerce websites. This is not an ad, This is a cash-back platform. You can disable it from the settings page without losing any features as well. Existing users will get notified about this change. More info: http://goo.gl/yWkk3b

Simply uninstall Webpage Screenshot Capture.

This app embeds all kinds of awkward includes when you view these sites and should be viewed as a security concern,

  http://api.jollywallet.com/affiliate/jsquery2?dist=197&sub=2&ver=1&aff_ref=0&r=0.09166263858787715


How to execute an script as daemon with nohup?

In bash, the latest backround process' PID is stored in $!:

nohup <command> & pid=$!

To send a process a signal you can use kill:

kill -<signal> <pid>

Putting the pieces toghether, to start e.g. a background watch -n1 echo foo process and send it e.g. a SIGTERM signal later:

nohup watch -n1 echo foo & pid=$!
# ...
kill -15 $pid


How to give directory and file permissions to a web server

Make sure you're looking at the same directory. Nautilus (the GUI) and ls (in the terminal) will show the same permissions. Where did you end up putting the gosmer directory? Usually this needs to be /home/USER/public_html/gosmer for the webserver to see it as http://localhost/~USER/gosmer/. To enable public_html, use sudo a2enmod user_dir.

Finally, is your webserver configured to run the language that gosmer uses? For example, PHP would need libapache2-mod-php installed, and if gosmer uses CGI, you'd need to enable the CGI module (sudo a2enmod cgi) and allow it (add ExecCGI to the Options directive for your virtual host in the Apache configurations. For example:

<Directory /somewhere>
  AllowOverride All
  Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec ExecCGI
  IndexOptions NameWidth=*
<Directory>

This may need to be done in /etc/apache2/mods-available/userdir.conf if you're using public_html as the target.


In the meantime I could solve the mystery. With the help of ondoho from linuxquestions.org. If anyone is interested here´s some background info:

  File: ~/.config/openbox/lxde-rc.xml

  please have a look at that file. (warning! XML is hard to read without
  syntax highlighting!) the name might differ slightly, but you'll find
  it (*). you will notice that most app launch entries have a section
  that says something like this:

<startupnotify>
        <enabled>yes</enabled>
      </startupnotify>

  startup notification is a mechanism that displays the background activity pointer until it is able to recognize
  that the application started. unfortunately, sometimes it is not able
  to recognize that, so the background activity pointer just stays there
  until it times out.

  that's what you're seeing; it does not mean that there actually is any
  background activity, or that the launched application has a problem.
  it simply means that the mechanism that displays the background
  activity pointer is broken. and your system remains perfectly usable.

  a small annoyance, but harmless.

Source: https://www.linuxquestions.org/questions/linux-newbie-8/mouse-pointer-symbol-background-activity-4175626657/


apache2 Creating multiple sites under same domain name in https

If you want exactly this, you should store mywebsite2 inside mywebside1 like this:

/var/www/mywebsite1/site2

To connect to web that use 443 with ssl you should go to:

https://www.mywebsite.com/site1

If you don't put https or http like you did, it use http that use port 80.

Check next link to edit the root directory of apache to /var/www or put all inside /var/www/mywebsite1 that is probably your root directory. Will look like:

/var/www/mywebsite1/site1

/var/www/mywebsite1/site2

or set root directory to /var/www and should look like

/var/www/site1

/var/www/site2
https://www.tecmint.com/change-root-directory-of-apache-web-server/


Unable to connect - Apache2 in Ubuntu 12.04 VirtualHost

You must enable listen on port 8081 for apache.

sudo nano /etc/apache2/ports.conf

add

Listen 8081

Restart apache


Synaptic Package Manager -E-"cache open", E - Default-Release not available

Edit the file /root/.synaptic/synaptic.conf. You will find a line referring to precise-updates. Remove that and restart Synaptic.

I have opened a bug report at https://bugs.launchpad.net/ubuntu/+source/synaptic/+bug/1521672


How to install gTile and other gnome extentions in Ubuntu Gnome 14.04 - cannot detect copy of GNOME on this system

First, make sure you are using Firefox and not Chrome. Chrome does not support the Gnome integration any longer.

In Firefox, go to Menu->Add-ons. In Add-ons Manager, click on Plugins.

If you see Gnome Shell Integration, click on the drop down next to it and select "Always Activate". This should correct the problem. Just refresh the extensions page and you should see the toggle switch.

If you do not have Gnome Shell Integrations plugin installed in Firefox, I think there are more complex steps to be followed to get the plugin installed on your system. There are a few threads out there in the past few months that I found. My OpenSuse 42x installation contained the plugin.


Can I delete a disk encryption password I have forgotten?

Hi by dumping your header you can see what keyslots are in use - "0" is always the first entered key - the command for this is cryptsetup luksDump /dev/sdXx. After this you should be fine with running cryptsetup luksDelKey <key slot number> - it will ask you to verify the process by typing a password already set.


Is is possible to create Linux portable applications?

Let's list the reasons, why upon running on some other GNU/Linux distro, an app wouldn't work:

Missing shared libraries
Shared libraries of the wrong version
(in case you used them) missing command line utilities
Breaking change in kernel API

To fight the problem with libs you can simply link everything statically upon build. It would increase the size of the app significantly, but yeah, it'd decrease a number of runtime dependencies.

The command line utilities might be fought by targeting some specific standard, e.g. POSIX.

You can't fight a change in kernel API though, but it is (the userspace part) very stable anyway — stable enough that you may simply not worry about it.


Only file owner can change Windows Read-Only attribute thru Samba

File permissions are decided by the 'create mask' setting in your smb.conf file.

So 'create mask = 0755' will mean a file with permissions of rwxr-xr-x while 'create mask = 0775' will mean rwxrwxr-x


Simply use OS-Uninstaller from a liveCD or liveUSB disk.


How to install php8.0-mbstring for php8.0? It keeps installing to php7.2

Figured it out thanks to  Michal Przybylowicz's comment.
The website's repository: https://launchpad.net/~ondrej/+archive/ubuntu/php needs to be added to Ubuntu's package system. The site lists the commands to do:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update

I also did:
sudo add-apt-repository ppa:ondrej/apache2
since I run apache2. After that Laravel said that I need the 'dom' extension as well. That was solved by:
sudo apt install php8.0-dom
After that Laravel finally installed! Thanks Michal!


Thinkpad W510 with default graphics drivers shows weird brightness issues

Press Alt + F2 to get the run dialog → type gnome-power- preferences and click on Run

On the On AC Power tab there is an option Dim display when idle that does exactly what it says → untick it and click on Make Default:

On the On Battery Power tab there is above mentioned option and another one (Reduce backlight brightness) for automatically reducing backlight brightness when on battery → untick both and click on Make Default:

There's another thing that was getting on my nerves with my ThinkPad T510: different backlight levels for GDM and session → read this question to find out how to completely stop gnome-power-manager from manipulating the backlight brightness.


After login I just get an orange screen that says Ubuntu 14.04, no sidebar or desktop

One possible solution is to log in as a guest user and see if it lets you into the desktop. If it does, then you can backtrack the things you have installed or any settings you may have changed.

I recently had the same problem caused by incorrectly adding an environmental variable in my .profile. If you are in fact able to get into the guest account, use the terminal to ssh into your user account and start troubleshooting.

ssh my-user@localhost

Good Luck


Upgrading Ubuntu 18.04 final freeze to stable

For a productive system, I recommend not rushing anything. Pre-release versions are not supposed to be stable and may contain many bugs.

Start testing 18.04 on a separate machine once it is officially released in a week. You should probably not consider upgrading your productive system before 18.04.1. By default, the do-release-upgrade tool will not offer the upgrade before the first point-release is out anyway.

For a development system, you could of course do it however you want. If you need it immediately, using the 18.04 beta instead of 17.10 or 16.04 for a week might be more reasonable. Keep in mind that you might encounter bugs though.


How to "snap-split" windows top and bottom?

A few year ago I wanted to achieve the snap window function in Lubuntu 14.04. I think you need openbox for this to work.

Take a look at https://github.com/lawl/opensnap

Below is a summary of the installation procedure quoted from that page:

Installing

If you want to install opensnap from source first make sure you have git installed. (Or fetch a zip file: https://github.com/lawl/opensnap/archive/master.zip)

Fetch via git:

git clone https://github.com/lawl/opensnap.git

Fetch via zip:

wget https://github.com/lawl/opensnap/archive/master.zip

unzip master.zip

Make sure you have all prerequisites:

sudo apt-get install build-essential libx11-dev libgtk-3-dev wmctrl

And finally build and install it:

cd opensnap*
make
sudo make install

And now start opensnap with

opensnap

or

opensnap --deamon

if you want it to daemonize.

If I remember well, there was a bug when trying to unsnap the snapped window. Take a look at https://github.com/lawl/opensnap/issues/4  there is a workaround described.

In my case Lubuntu 14.04 I had to modify /home/user/.config/openbox/lubuntu-rx.xml
The code between the tags <mousebind button="Left" action="Drag"> and </mousebind> has to be exchanged by:

  <mousebind button="Left" action="Drag">
    <!-- Unsnap if snapped-->
    <action name="if">
      <maximizedvertical>yes</maximizedvertical>
      <then>
        <action name="Unmaximize"/>
          <direction>vertical</direction>
        <action name="MoveResizeTo">
          <x>center</x>
          <!-- we center windows in order to mitigate discrepancies
          between window placement and mouse cursor -->
          <y>current</y>
        </action>
        <action name="Move"/>
      </then>
      <else>
        <action name="Move"/>
      </else>
    </action>
  </mousebind>

Make sure that you are inside the tags of <context name="Titlebar">


Ubuntu 16.04 keyboard and touchpad does not react after suspend

Ok I have the solution (but not the reason) of the problem! (@Zanna - yes, 10 times or something like that and with that annoying mouse problem and no solution)
Resetting the Motherboard

Take of battery pack (and disconnect from current source) for min. 5 minutes, then press the power button (without the battery or current source) for 30 seconds. Then put the battery pack back, press power -> it works now perfectly like the day before  .... halleluja


Not an answer exactly but a workaround.

Install Unity Tweak Tool (sudo apt install unity-tweak-tool)
Launcher tab | Appearance section
Set Colour to Custom


Unable to create file /tmp/testfile: No space left on device

The only folder which gets cleaned at every reboot regardless of the running processes, which might handle their temporary files differently, e.g. by storing them into other places and / or by removing them from /tmp or from other places during the execution, AFAIK, is /tmp, so it's likely (but indeed not sure) that it's /tmp that got cluttered.

What I'd suggest you to do is to check /tmp's size from time to time and to see if it gets cluttered, and then try to dig out which process / processes are causing the problem checking the biggest or most numerous files.

I don't think the webapp itself might be causing this tough, unless it's starting some external process or unless it's the webapp itself that is putting the temporary files in /tmp; just to be sure, I'd also monitor the folders in the webapp's scope to check if a process started from the webapp itself is cluttering one of those.


Broadcom 4365 wireless driver with 3.4 / 3.5 kernel

Updated, some additional fixes, and kernels 3.6.x now also supported

http://jas.gemnetworks.com/debian/pool/main/w/wireless-bcm43142/wireless-bcm43142-dkms_6.20.55.19-1_amd64.deb

You may also want to look at notes and changelog here:

http://jas.gemnetworks.com/wireless-bcm43142/

If you have problem loading this module under stock Ubuntu 12.04 kernel 3.2.x there might be problem with installed backported modules. In my case it's linux-backports-modules-cw-3.4-3.2.0-* containing cfg80211 and lib80211 modules which conficts with stock kernel ones. I need this package because it contains alx driver for my ethernet network adapter.
If you try to modprobe wl it tends to load dependencies from backported cfg80211 and lib80211 drivers and fails to load with
    FATAL: Error inserting wl (/lib/modules/3.2.0-34-generic/updates/dkms/wl.ko): Invalid argument

I've solved it by creating modprobe configuration /etc/modprobe.d/wl.conf which forces loading of stock kernel modules

install cfg80211 /sbin/insmod /lib/modules/`/bin/uname -r`/kernel/net/wireless/cfg80211.ko
install lib80211 /sbin/insmod /lib/modules/`/bin/uname -r`/kernel/net/wireless/lib80211.ko


How do I define the primary monitor in XFCE?

If you have a Nvidia based video card you can use the Nvidia X Server Settings(if you don't have it, you can install it from the synaptic package manager, I think it's called "nvidia-settings-304" in there)

In the X server Display Configuration of Nvidia X Server Settings window you should be able to see all the monitors, change the resolution set the Hz of them. but what's important is that you should see a check box setting stating "Make this the primary display for the X screen". I'm not too sure what the X screen is exactly(I'm not exactly a "rocket scientist" when it comes to computers.) but I know this is what from experience is pretty much what sets the "primary monitor". So basically what ever monitor you have set as the X screen is pretty much the computers "primary" screen and usually denotes what monitor fullscreen games will launch on.

But be warned, some desktop environments like Unity have some less than desirable consequences when setting the X screen to the desired monitor.

Just to let you know, just from previous experience, Unity's launcher can only be on the monitor that is set as the primary display for the x screen. Other desktop environments/shells can also suffer from this problem as their "default" panels and whatnot will jump to another screen if you change what screen is the primary X screen. But I found this to not be as much of a problem as with Unity since most other desktop environments are more flexible with their customization and usually allow users to add panels and whatnot(or could possibly simply allow you to move them like you can with Xfce) on the position and screen you desire or remove them if they are where you don't want them to be.


"The following packages have been kept back:" Why and how do I solve it?

According to an article on debian-administration.org,

  If the dependencies have changed on one of the packages you have installed so that a new package must be installed to perform the upgrade then that will be listed as "kept-back".

Cautious solution 1:

Per Pablo's answer, you can run sudo apt-get --with-new-pkgs upgrade, and it will install the kept-back packages.

This has the benefit of not marking the kept-back packages as "manually installed," which could force more user intervention down the line (see comments).

If Pablo's solution works for you, please upvote it. If not, please comment what went wrong.

Cautious solution 2:

The cautious solution is to run sudo apt-get install <list of packages kept back>. In most cases this will give the kept-back packages what they need to successfully upgrade.

Aggressive solution:

A more aggressive solution is to run sudo apt-get dist-upgrade, which will force the installation of those new dependencies.

But dist-upgrade can be quite dangerous. Unlike upgrade it may remove packages to resolve complex dependency situations. Unlike you, APT isn't always smart enough to know whether these additions and removals could wreak havoc.

So if you find yourself in a place where the "cautious solution" doesn't work, dist-upgrade may work... but you're probably better off learning a bit more about APT and resolving the dependency issues "by hand" by installing and removing packages on a case-by-case basis.

Think of it like fixing a car... if you have time and are handy with a wrench, you'll get some peace of mind by reading up and doing the repair yourself. If you're feeling lucky, you can drop your car off with your cousin dist-upgrade and hope she knows her stuff.


ppa:mc3man/trusty-media

From the PPA description:

  Upgraded, advanced or not normally available multimedia packages for Trusty

It contains the latest version of VLC, ffmpeg, and some other popular video players and important media libraries. The PPA is pecifically for users looking for media updates without ditching the LTS release.


I looked into the ppa, and there seems to be build failures (the red X),

launchpad.net/~ubuntu-mozilla-daily/+archive/ubuntu/firefox-aurora/+packages

I suggest that you wait until there is a successful build, and try again (or try another version of Firefox).


after updating packages, unity launcher is not showing up

I resolved the issue by re-installing Nvidia drivers. For some reason, every time I update core packages I have to reinstall the video drivers. This time for some reason, I was made to believe I didn't have to because Nvidia logo was showing up when launching X.


Software recommendations for graphics-centric Ubuntu system?

The "Pay what you think it’s worth" page is for statistical analysis on what you think is worth most in terms of further Ubuntu development only. It will by no means configure your Ubuntu or even change anything on the applications that are installed for free. The page you see asks for a voluntary donation, not more not less. You still can download Ubuntu for free.

Ubuntu and most of the software included are Free and Open Source Software which means they are really free in terms of monetary costs but also are free in terms of usage.

Read more on this here:

Ubuntu: Our Philosophy

As for applications to process graphics and multimedia the same holds true. The most useful applications will be included for free with every Ubuntu distribution. Below applications - to name only a few - are only a mouse click (and some internet bandwith) away once you had installed Ubuntu:

Gimp  - A powerful graphics processor highly extendable with plugins. Comes close to Photoshop in functionality.
Inkscape  - full blown vector graphics application similar to Illustrator.
Blender  - a 3D modeller which can produce professional results.
ImageMagick  - unbeaten versatile command line tool for almost all graphics file manipulation and conversion.
Audacity  - a great sound processor.
OpenShot  - easy to use video editing software but with somewhat limited professional capabilities.
Cinelerra - not in the official repositories due to stability issues but once running stable it is an ambitious video editor.
and there are many many more.

But if you are seeking paid software with widespread use by professionals, paid support, paid courses and paid tutorials you may be wrong here. This is where the products on Microsoft and Apple platforms still are better.

You also may find it hard to switch to an Ubuntu application after you had learned how to do things with the software you mentioned. This also would be a good reason to stay with the system you already have.

Last not least we still occasionally have issues with import from or export to proprietary file formats of paid software. This is being resolved step by step but we will never beat the originals.

So you should try out these Open Source softwares which often are available on your Windows or MacOS too. If you find them useful, and if you do not miss anything from your proprietary paid software then you are safe to make the switch. But if you expect all softwares to work identical to their paid counterparts you should propably better stay with Windows or MacOS.

Few professional Windows software may run flawlessly on Ubuntu but this is not the case for most. Software made for Apple computers will not run on Ubuntu.