when trying to install package, upgrade or update, I get the same probleme: E: Sub-process /usr/bin/dpkg returned an error code (1)

It seems udev is not installed all the way or has an error in the package.

Using sudo dpkg --configure -a should attempt to fix the problem.

If that should not work, find the udev package in  /var/cache/apt/archives/udev... and use that .deb in
dpkg -i --force-all /var/cache/apt/archives/udev... that will for the install of udev and should solve the problem you are having.

excerpt of the Questions log file

  Setting up udev (219-7ubuntu6) ...
  Job for systemd-udevd.service failed. See "systemctl status systemd-udevd.service" and "journalctl -xe" for details.
  invoke-rc.d: initscript udev, action "restart" failed.
  dpkg: error processing package udev (--configure):
   subprocess installed post-installation script returned error exit status 1
  dpkg: dependency problems prevent configuration of systemd:
   systemd depends on udev; however:
    Package udev is not configured yet.


I don't think there can be a guide since you did not post your PC motherboard type or laptop model. From what I know a USB wake up is made from bios.


Ubuntu "Wubildr.mbr is missing or contains errors."

Unfortunately wubi is no longer supported and the absolute most reliable way to install is by booting a livecd/usb that you have burned. On windows 8 based systems wubi has been proven to not work at all.


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

sudo umount /dev/<device_id>

addition/correction (if you want to go by device uuid, i.e. not something like "sda3" but rather its unique long numeric/hex string like "366A52F225612...") use

sudo umount /dev/disk/by-uuid/<device_id>

Or you can use udisks.

sudo udisksctl unmount /dev/<device_id>

You can get the device ID using sudo fdisk -l command

To install udisks if not installed, just do

sudo apt-get install udisks

For more info see the udisks manpage


Failed loading skin error message with Spotify

Open the terminal and type:

sudo spotify

Use ctrl+z to divorce the Spotify session from the terminal. If this worked the problem is that the Spotify client needed files that were put in a folder owned by the root user. For some reason or another it lost permission to get those files. Same thing happened to me.


just follow these points and you should have a successful installation of Ubuntu in no time!

Step 1

Download the iso file. To install Ubuntu, one needs the iso files, please go to this link. The downloads page shall have two options, to download 12.04 which is the latest LTS version of Ubuntu or 13.10 which was released last month. For the sake of this question, I suggest you download the LTS version, i.e 12.04.

Step 2

Make a bootable USB. The easiest way to install Ubuntu is via the bootable USB option. Now, I assume that you're on Windows so go this link and download the Windows version of Unetbootin.

Step 3

Now, our real work would start.

Open Unetbootin
Under the option for image files choose the iso file that you've downloaded
Under the option of choosing the drive where it would be installed choose your USB drive. Please be careful, choose only your USB drive
Let Unetbootin make the Bootable USB now.
Once that is done, reboot your machine and enter the Boot Order Menu. Here, choose your USB drive.
Now,  in a few minutes you should be able to boot into Ubuntu, but, we haven't installed Ubuntu yet, you're merely trying it out.
On your Ubuntu Desktop you should be able to see an option called Install Ubuntu.Choose that option and the loader shall start working.
Depending on your choice, you may choose to Install Ubuntu and Replace Everything else or Install it alongside Windows or A custom Setup, choose whichever one suits you best.
Let the installer do it's magic and soon enough, you'll have a successful installation of Ubuntu upon rebooting.


Automatically opening Jupyter notebook at http://localhost: instead of file://

In the configuration for Jupyter Notebook, disable c.NotebookApp.use_redirect_file.
To do so, edit ~/.jupyter/jupyter_notebook_config.py and add the following line:
c.NotebookApp.use_redirect_file = False

Note that this option was added as a security measure, according to the official documentation.


how do i solve the dependency problem? in ubuntu 18.04 lts

It looks like you have a broken Ubuntu install.
I know that this may not be the most elegant solution, but the best way to resolve this issue, is by simply reinstalling Ubuntu.


I had this problem, with this laptop and Ubuntu 18.04.  These steps work for me.  They also work for me on Ubuntu 20.04.
Start up PulseAudio Volume control (pavucontrol). In the "Recording" tab, set "Show:" to "All Streams". In the "Input Devices" tab, set "Show:" to "All Input Devices". Change "Built-in Audio Analogue Stereo" to "Port: Internal Microphone", and click the lock icon so that "Front Left" and "Front Right" sliders appear. Move the "Front Left" slider for "Internal Microphone" so it lines up with "Base", and move the "Front Right" slider so it lines up with "Silence".
Follow the link to the Google Meet event. If prompted, allow Google Meet to access the microphone (called something like "Monitor of built-in audio analogue stereo"), and the camera.
Back in pavucontrol, go to the "Recording" tab. Change "Firefox: AudioCallBackDriver from" to "Built-in Audio Analogue Stereo". Move the slider so it lines up with "100%".
Join your meeting.


Installing mysql-workbench in Ubuntu 19.04

For the people not willing to wait, You could try using DBeaver. I can confirm that it works on Ubuntu 19.04. If you insist on Workbench, it is also possible to run the Windows version through wine (performance does not seem to be impacted).


Different Aspect Ratio for Laptop + External Monitor

Yes, for each monitor you can specify whatever supported resolution you require.


(X)Ubuntu some graphics only render on 2/3 of screen

The reason it is saying temporarily unavailable is because you are stopping the process by clicking the [x], when it is running and you let it run for a couple of seconds you see the frame rate in the terminal, right?  When you stop the process then it cannot tell you the frame rate, therefor the resource becomes unavailable, nothing to worry about.


Thanks everyone for your valuable suggestions.
I got a solution for my problem, but there may be some perfect answers for my problem.

What I did is booted a live windows cd &  reached the point where to install Windows on HDD. I formated the entire hard disk and quit the windows installation procedure.
Now I have a fresh HDD (1tb free space).
Then tried installing Ubuntu 64 bit in uefi mode, the installation process was perfectly completed and have my edubuntu 14.04.


Can't mount moto e(android phone) on usb 2.0 as media device

You should check if your device/USB vendor is supported by libmtpfs.

Please post the output of lsusb -v or google something like "libmtp supported device moto e" plus vendor ID. You will find entries like http://sourceforge.net/p/libmtp/bugs/1053/ which indicate support is not available for that combination.


Wrong battery state reading cause brutal shutdown

It's probably a calibration problem. I used to face a somewhat similar problem on my laptop too. Back when I was using Windows 10, I used to enjoy about 4 to 5 hours of battery life and after switching to Ubuntu, my battery life came down to about 3 hours. I did some research online and found tons of advice, but none of them seemed to be as effective as recalibrating. Here's what you gotta do...

Charge your laptop to 100% and let it remain plugged in for about 30 to 40 minutes.
After that, unplug it and make sure to use your laptop until it shuts down
After this try switching it on, if it doesn't switch on, then well and good. However, if it does switch on, then that would mean that there is still some charge left in your battery.
Make sure that your battery is fully drained.
Wait for up to 2 to 3 hours and then plug it back in and let it charge all the way up to 100 percent.

After this you should be good. This is a manual recalibration. This will probably fix your inaccurate battery meter readings.


how to install the iso file of ubuntu 14.04 into VirtualBox in means of command line, which is installed in the linux server from windows using putty

Create a VM from command line
We can fully create and control Virtual Box from the command line using VBoxManage. This involves all of the follwing steps nicely outlined in the Virtual Box Manual:

Create and register a virtual machine making sure the ostype is correct.
Make appropriate machine settings (RAM, VRAM, CPU, network, etc.)
Create a virtual hard drive VDI for this machine
Add an IDE controller for this drive
Add the virtual hard disk VDI to this IDE controller
Attach the boot .iso file to the VM
run the VM to install from the CD .iso file
optionally install the guest additions for shared folders support

You may want to use an RDP viewer to be able to view the machine's outputs.
Export and import an existing VM
We can see that the above involves quite a lot of single steps to define and set up our virtual machines. In case we are not so familiar with Virtual Box it may be much easier to create, set up, and test a virtual machine on a computer with a graphical interface, export the running and tested VM to then just import the virtual machine on our remote computer:

Importing and exporting virtual machines
Importing a virtual machine using VBoxManage


Do these packages really exist? If these commands return no luck then your packages don't exist in Ubuntu's repositories or your PPAs. Try

sudo apt-get update

and try again. If that doesn't work then try

sudo apt-get install --fix-missing

and try again. If that does not work, then this means that your packages are not available in Ubuntu's repos or your PPAs.


Problem with automatic virtual desktop switching in Kubuntu KDE desktop

After relentless investigating, it turned out that either Quick Tile 2 or Quarter tiling was somehow seems to be causing the issue. After removing it from kwin script now everything is back to normal again in my case. Hope this helps if someone ends up having similar case.
Quick Tile 2
https://store.kde.org/p/1187647
Quarter Tiling
https://store.kde.org/p/1187647


Street view goes to black in google maps

Go to "chrome://flags" in your browser. There, under Experiments enable "Override software rendering list" and enable the "Disable WebGL" option and relaunch the browser.


ubuntu 16.04 LTS 64bit - screen goes black every 15 seconds

I have solved this issue. I have no idea why the problem was triggered. I don't know what the problem actually was. I don't know why or how my solution works.

I guessed that the problem was arising because of Display Power Management Signalling, or DPMS. I guessed that DPMS had been turned on by something I'd installed and that it was operating at a default setting of 15 seconds. I guessed that DPMS was turning off the display through the X server after 15 seconds (a default value) of zero activity in order to "manage power". I opened a console and typed

xset -dpms

This turns off DPMS permanently, not just for the session. The problem promptly went away.


Solution:

1) Add a new entry to fstab, e.g.:

# TMP
none /tmp tmpfs nodev,nosuid,noatime,mode=1777,size=4096M    0    0

The size parameter can be different according to your needs.

2) Edit Google Chrode .desktop file, then add to the end of Exec= lines the following:

--disk-cache-dir=/tmp/chromecache

3) Save, then restart your browser.


Need to change the text in a lot of files at once

The easiest way would be to use sed, for example:

sed -i 's/192.168.0.1/localhost/g' *.php will take all of the PHP files in your current folder, and replace (globally) the IP address "192.168.0.1" with "localhost".

Edit: This might not be helpful, come to think of it - I'm not overly familiar with PHP, so am not sure if the data within is stored in plaintext. If it is, then this will help; if not, then I don't know for sure how to go about it.


How to enable to hot-corners function on Lubuntu20.04?

As far as I could find, Gnome has adopted hot corner's for their desktop environment. However Lubuntu 20.04 uses LXQt which is meant to be a sleek and light-weight desktop env.
You could install Gnome desktop env. to your Lubuntu and add the Gnome-tweaks extension which seems to allow Hot corners functionality easily.
Edit: My apologies as guiverc stated the link I provided will be for legacy LXDE Lubuntu, not focal 20.04
It seems that there is hotcorners for LXQt named tip-skippy I would further look into this page: lubuntu tip-skippy article


How can I hide the decoration of maximized windows?

To do it with compiz

Install compiz config settings manager

sudo apt-get install compizconfig-settings-manager

Warning: What are some of the issues with CCSM and why would I want to avoid it?

In CCSM select window decorations
Change decoration windows from any to !(state=maxhorz and state=maxvert)


This could be due to running the Nouveau drivers rather than the proprietary Nvidia drivers. Have you verified if you are running on the proprietary drivers?


How do I get suspend working on my Dell Precision 5530, running Ubuntu 18.10 and nVidia proprietary driver 390?

I have the same device since yesterday but with the P1000 and Ubuntu 18.04.

I've run into the same problem.

The only working solution for me was using the free Nouveau driver.


How can I fix the broken edge flipping feature?

According to the FAQ this question is not valid, beta is beta, there is a reason its called beta, its not finished! You just will have to wait for the bug to be solved or add unity --replace as suggested to your start up (or add it to any startup script you might have) ;)

If you want to add it to a script on your start up programs search for the program Startup Applications.

Save this (or add it to your startup script) on your home folder or somewhere you have permitions:

#! /bin/bash
unity --replace

you will need to use chmod 755 <nameofthescript.sh> to make it executable. Add the scrip to the Startup Applications list and that should be able to fix it until a new package comes.

If you dont have a startup script just add unity --replace to your start up applications list.


GUI tool to securely overwrite whole hard drive

March 30 Edit:

By looking at this question it turns out there exists a GUI front-end to dd called GDiskDump.

Installation is fairly simple ( steps i followed myself ):

sudo apt-get install git
git clone https://github.com/screenfreeze/gdiskdump.git
cd gdiskdump/deb/  && sudo dpkg -i *.deb ; you likely just want dpkg -i gdiskdump_0.8-1_all.deb

After the deb package has been installed and configured , run by calling sudo gdiskdump. Note , as every other disk utility , this one requires root privillege

Original post

You could overwrite your disk with zeros multiple times using dd command

dd if=/dev/zero of=/dev/XdY bs=1M && zenity --into --text="DONE"

where X and Y denominate the path to the device file of your drive (use lsblk to find out which one it is). Note, the dd commands takes a long time.

Alternatively you can perform the shred command:

shred -vfz -n 10 /dev/sdX

Note: here, the number of iterations is 10 which may be a bit of an overkill. Refer to man shred for the meaning of each flag.

The closest  tool for erasing a drive I found so far would be nwipe, which uses ncurses and which you can install using sudo apt-get install nwipe.


You can either install Ubuntu from the disk you have and then install the lubuntu-desktop meta-package.

Or just grab and install from a Lubuntu CD. The bandwidth required will be similar.


muito bom so coloca o arquivo origem na frete hdiutil converter -format UDRW /Users/NAMEZ/Downloads/ubuntu.iso -o /Users/NAMEZ/Downloads/ubuntu.img
funciono no MAC OSX


how to recover files from an .img of VMware ESX?

See man 8 mount, especially The Loop Device. It says, in part:

THE LOOP DEVICE

       One further possible type is a mount via the loop device. For  example,
       the command

              mount /tmp/disk.img /mnt -t vfat -o loop=/dev/loop

       will  set  up  the  loop  device  /dev/loop3  to correspond to the file
       /tmp/disk.img, and then mount this device on /mnt.

However, in spite of what the man page says, I suggest you mount your disk image someplace other  than /mnt.


2nd HD added to laptop. Eating battery life

Rather than removing the drive entirely, which would certainly work, why don't you set some energy saving settings like the ones suggested  here
.


Adding Repository

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list

Install MongoDB

sudo apt-get update

sudo apt-get install mongodb-org

or

sudo apt-get install mongodb-org=2.6.0 mongodb-org-server=2.6.0 mongodb-org-shell=2.6.0 mongodb-org-mongos=2.6.0 mongodb-org-tools=2.6.0

Start/Stop MongoDB Service

sudo service mongod start

sudo service mongod stop

Verify MongoDB Installation

mongo --version


There is an easy fix to this:

Start up your Live CD again and choose "Try Ubuntu Before Installing."
Press Ctrl+Alt+T in to open Terminal.
Type sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update.
Press Enter and let the command run.
Type sudo apt-get install -y boot-repair && (boot-repair &) and press Enter.
Choose the "Recommended Repair"
Follow the instructions you are given.
Reboot when done.

Good luck with your install!


Ubuntu Application Installation Exit Codes

Exit statuses are integers between 0 and 255. Under certain circumstances, the shell will use special values to indicate specific failure modes. For the shell's purposes, a command which exits with a zero exit status has succeeded. A non-zero exit status indicates failure.source

List of common exit codes for GNU/Linux

| Exit Code | Description                                       |
| --------- | ------------------------------------------------- |
| 0         | Success                                           |
| 1         | Operation not permitted                           |
| 2         | No such file or directory                         |
| 3         | No such process                                   |
| 4         | Interrupted system call                           |
| 5         | Input/output error                                |
| 6         | No such device or address                         |
| 7         | Argument list too long                            |
| 8         | Exec format error                                 |
| 9         | Bad file descriptor                               |
| 10        | No child processes                                |
| 11        | Resource temporarily unavailable                  |
| 12        | Cannot allocate memory                            |
| 13        | Permission denied                                 |
| 14        | Bad address                                       |
| 15        | Block device required                             |
| 16        | Device or resource busy                           |
| 17        | File exists                                       |
| 18        | Invalid cross-device link                         |
| 19        | No such device                                    |
| 20        | Not a directory                                   |
| 21        | Is a directory                                    |
| 22        | Invalid argument                                  |
| 23        | Too many open files in system                     |
| 24        | Too many open files                               |
| 25        | Inappropriate ioctl for device                    |
| 26        | Text file busy                                    |
| 27        | File too large                                    |
| 28        | No space left on device                           |
| 29        | Illegal seek                                      |
| 30        | Read-only file system                             |
| 31        | Too many links                                    |
| 32        | Broken pipe                                       |
| 33        | Numerical argument out of domain                  |
| 34        | Numerical result out of range                     |
| 35        | Resource deadlock avoided                         |
| 36        | File name too long                                |
| 37        | No locks available                                |
| 38        | Function not implemented                          |
| 39        | Directory not empty                               |
| 40        | Too many levels of symbolic links                 |
| 42        | No message of desired type                        |
| 43        | Identifier removed                                |
| 44        | Channel number out of range                       |
| 45        | Level 2 not synchronized                          |
| 46        | Level 3 halted                                    |
| 47        | Level 3 reset                                     |
| 48        | Link number out of range                          |
| 49        | Protocol driver not attached                      |
| 50        | No CSI structure available                        |
| 51        | Level 2 halted                                    |
| 52        | Invalid exchange                                  |
| 53        | Invalid request descriptor                        |
| 54        | Exchange full                                     |
| 55        | No anode                                          |
| 56        | Invalid request code                              |
| 57        | Invalid slot                                      |
| 59        | Bad font file format                              |
| 60        | Device not a stream                               |
| 61        | No data available                                 |
| 62        | Timer expired                                     |
| 63        | Out of streams resources                          |
| 64        | Machine is not on the network                     |
| 65        | Package not installed                             |
| 66        | Object is remote                                  |
| 67        | Link has been severed                             |
| 68        | Advertise error                                   |
| 69        | Srmount error                                     |
| 70        | Communication error on send                       |
| 71        | Protocol error                                    |
| 72        | Multihop attempted                                |
| 73        | RFS specific error                                |
| 74        | Bad message                                       |
| 75        | Value too large for defined data type             |
| 76        | Name not unique on network                        |
| 77        | File descriptor in bad state                      |
| 78        | Remote address changed                            |
| 79        | Can not access a needed shared library            |
| 80        | Accessing a corrupted shared library              |
| 81        | .lib section in a.out corrupted                   |
| 82        | Attempting to link in too many shared libraries   |
| 83        | Cannot exec a shared library directly             |
| 84        | Invalid or incomplete multibyte or wide character |
| 85        | Interrupted system call should be restarted       |
| 86        | Streams pipe error                                |
| 87        | Too many users                                    |
| 88        | Socket operation on non-socket                    |
| 89        | Destination address required                      |
| 90        | Message too long                                  |
| 91        | Protocol wrong type for socket                    |
| 92        | Protocol not available                            |
| 93        | Protocol not supported                            |
| 94        | Socket type not supported                         |
| 95        | Operation not supported                           |
| 96        | Protocol family not supported                     |
| 97        | Address family not supported by protocol          |
| 98        | Address already in use                            |
| 99        | Cannot assign requested address                   |
| 100       | Network is down                                   |
| 101       | Network is unreachable                            |
| 102       | Network dropped connection on reset               |
| 103       | Software caused connection abort                  |
| 104       | Connection reset by peer                          |
| 105       | No buffer space available                         |
| 106       | Transport endpoint is already connected           |
| 107       | Transport endpoint is not connected               |
| 108       | Cannot send after transport endpoint shutdown     |
| 109       | Too many references                               |
| 110       | Connection timed out                              |
| 111       | Connection refused                                |
| 112       | Host is down                                      |
| 113       | No route to host                                  |
| 114       | Operation already in progress                     |
| 115       | Operation now in progress                         |
| 116       | Stale file handle                                 |
| 117       | Structure needs cleaning                          |
| 118       | Not a XENIX named type file                       |
| 119       | No XENIX semaphores available                     |
| 120       | Is a named type file                              |
| 121       | Remote I/O error                                  |
| 122       | Disk quota exceeded                               |
| 123       | No medium found                                   |
| 125       | Operation canceled                                |
| 126       | Required key not available                        |
| 127       | Key has expired                                   |
| 128       | Key has been revoked                              |
| 129       | Key was rejected by service                       |
| 130       | Owner died                                        |
| 131       | State not recoverable                             |
| 132       | Operation not possible due to RF-kill             |
| 133       | Memory page has hardware error                    |


Marlin file browser is still in development and it means that you can miss some features.

Marlin can search files. but only on the folder that you are viewing, to do that you only need to type the name and then a textbox appear in the right botton edge of the program.

Do not forget to report bugs and ask for features in the marlin lauchpad to help the project.

Other option is to write a plugin but i don't know if there are an api or something to do that.

https://launchpad.net/marlin


is upgrade ubunto 19.10 to 20.04 now not available on ubuntu 19.10?

Yes, Ubuntu 19.10 is not supported anymore. You could change the repos in /etc/apt/sources.list from eoan to focal but that might be risky if your system crashes halfway. Or you could follow the guide at How to install software or upgrade from an old unsupported release?. The guide might be outdated. I did the first method and it worked fine.


How can I add a wine program in PCManFM 1.2.4 as an option to open files of a file type?

You need to add %u or %U (probably the uppercase one) to the end of the command as an argument - that passes in the URI of the file to open so it knows what file to read.  See the little text blurb above the command line you're editing.

So if my executable was foo.exe and my file was in /tmp/blah.txt, then the %U argument would end up being /tmp/blah.txt and the system would execute foo.exe /tmp/blah.txt instead of just launching foo and opening the application and not the file.

A warning: You might need to make this wine /path/to/PDFXCview.exe %U if it doesn't load up normally - sometimes executing inside of Wine works when it otherwise wouldn't.


Cannot Add Hidden Network Before Installing Ubuntu 19.10

Since there is no option to choose wifi settings while installing ubuntu from "install ubuntu" menu

you can quit the process which will automatically take you to "try ubuntu" mode.

then choose the wifi settings and configure your hidden network.

Alternatively you can directly choose "Try Ubuntu" option while booting the live ISO


How do I check which years are leap years?

You can make use of date's exit code to check for a leap year, relying on date's behaviour of generating a non 0 exit code for an invalid date, obviosuly there's no 29th of Feb in a non-leap year:

date -d $year-02-29 &>/dev/null
echo $?

as a function:

isleap() { date -d $1-02-29 &>/dev/null && echo is leap || echo is not leap; }

Usage:

$ isleap 2019
is not leap

$ isleap 2020
is leap

Regarding your question:

  How can I find out which are leap years between 2014 and 2020 in a Linux terminal?

echo "Leap years between 2014 and 2020:";
for y in {2014..2020}; do
    date -d $y-02-29 &>/dev/null && echo $y;
done


Is it possible to change the repository that a package is updated from?

If you add the ppa to your system and the version of the app in the ppa is newer, when you run sudo apt update your system will point to the newer version and when you do sudo apt upgrade it will upgrade to it.
You do not need to uninstall the current version except for some edge cases like video drivers.
You can use the command apt policy [packagename] to see the available versions before and after you add the ppa.
Here is an example of one such package on my system
apt policy rhythmbox
rhythmbox:
  Installed: 3.4.3-1ubuntu1~ubuntu1804
  Candidate: 3.4.3-1ubuntu1~ubuntu1804
  Version table:
 *** 3.4.3-1ubuntu1~ubuntu1804 500
        500 http://ppa.launchpad.net/ubuntuhandbook1/apps/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
     3.4.2-4ubuntu1 500
        500 ssh://[local mirror]/us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages


Cron is still processing the jobs in the background even after I stopped the cron from running

Open the terminal and run

sudo service cron stop

And if it is not stopping the cron, you can backup the crontab and remove it's entry.

crontab -l > cron_backup.txt

crontab -r

Note that it will remove all crontab entries from machine. If you don't want to remove it and just want to disable it, adding a # in front of crontab entries would also do the job.

To restore the crontab

crontab cron_backup.txt

OR

You may use the pkill command to kill the cronjob by providing the process id.

You will get the process id from the following command.

ps -e | grep cron

Use the process id in the following command.

pkill <process id>


Can someone recommend me a backup solution that can be used for an educational institution?

Supposing that you are using Linux in your system, in the scenario presented the best would be a userless solution. I would do it using a backup server (simple fileserver, nothing fancy), and rsync over ssh. The rsync would run from cron.

Steps:
Set up ssh keys (to can use cron passwordless):

cd ~/.ssh
ssh-keygen -t dsa
ssh-copy-id -i ~/.ssh/id_dsa.pub user@yourserver.com

Test it with ssh user@yourserver.com. It sould not require a password anymore.
Now you can use the rsync -atvz ~/local-directory/ user@youserver.com:remote-directory/ command in crontab.


Create default home directory for existing user in terminal

Use the following (as root, or with sudo if not root):

mkhomedir_helper username

For this to work, folder /home/username must not exist.

For X-related folders (Desktop, Downloads, etc), you will need to login in a graphics environment; they will be automatically generated the first time you login.


How do I install xtreme download manager in Ubuntu 14.04

To install xtreme download manager in Ubuntu 14.04, please follow these steps

Open a terminal window.
Type in the following commands, then hit Enter after each:

sudo add-apt-repository ppa:noobslab/apps
sudo apt-get update
sudo apt-get install xdman


Ubuntu 13.10 - i am running in KIOSK train station public place, but this autoupdate window is annoying every day. How to remove it please?

Edit the configuration at /etc/apt/apt.conf.d/50unattended-upgrades to comment out the line:

Unattended-Upgrade::Allowed-Origins {
        "${distro_id}:${distro_codename}-security";
//      "${distro_id}:${distro_codename}-updates";
//      "${distro_id}:${distro_codename}-proposed";
//      "${distro_id}:${distro_codename}-backports";
};

Remove the second line that ends with -security

Unattended-Upgrade::Allowed-Origins {
//      "${distro_id}:${distro_codename}-security";
//      "${distro_id}:${distro_codename}-updates";
//      "${distro_id}:${distro_codename}-proposed";
//      "${distro_id}:${distro_codename}-backports";
};

That should disable automatic updates since there is no location for it to pull updates from after commenting the location out.


"enter license" still exists after Sublime Text 3 deletion

This can (also) be caused by having added the development branch to your apt sources by mistake, instead of the stable releases.

make sure that

/etc/apt/sources.list.d/sublime-text.list

contains

deb https://download.sublimetext.com/ apt/stable/

and not

deb https://download.sublimetext.com/ apt/dev/

The development branch is only available to licensed users as stated on their wobwob:
https://www.sublimetext.com/docs/3/linux_repositories.html

"Builds listed in the dev channel are only available to licensed users. Users who are evaluating Sublime Text before purchase will need to use the stable channel."


How to start anydesk in ubuntu using command prompt

The following worked for me on Ubuntu 18.04 (both client and remote)
Kill anydesk
sudo killall anydesk

Start the anydesk service
sudo anydesk --service

Source: https://support.anydesk.com/Command_Line_Interface


What is the must customizable desktop environment?

All DE's are capable of changing icon sets that you can download in their respective "Appearance", or "Look and Feel" menus. You can also manually change each one in file property windows by clicking the icon on the properties page, and choose any icon you want.

To specifically change only Skype's system tray icon, see the answer here : Change skype tray icon


How do I set up a semi-encrypted Ubuntu installation?

Possibly the easiest way to achieve what you ask is to do an install without encryption and afterwards set up ad hoc encryption on specific folders. The Community documentation suggests encfs for the task. A plugin exists to integrate encfs with Nautilus.

Ecryptfs is an alternative that facilitates the specific encryption of users' home folders.


How to delete a non-working kernel after update?

If the latest kernel update break things (Original question), the best option for most is to fall back to the previous working kernel (provided that you keep at least 1 fallback option).

Otherwise, use @ZAB 's solution to install a specific version of the kernel version provided via the apt package manager.

In generic, to remove the unwanted out-dated kernels, open a terminal session and run the command:

IMPORTANT: If /boot is NOT on its tiny partition (running out of space), avoid explicitly purging old kernels. Consider them backup / fallback options when upgrade introduces problems (hardware driver modules, etc.).

Good read on kernel upgrade and preservation mechanism: How does apt on Ubuntu decide how many old kernels to keep

TL;DR: Take a look at /etc/apt/apt.conf.d/01autoremove-kernels file generated by postinstall hook (script).

Snippet from Ubuntu 20.04 LTS running 5.4.0 for a better understanding:

// DO NOT EDIT! File autogenerated by /etc/kernel/postinst.d/apt-auto-removal
APT::NeverAutoRemove
{
   "^linux-.*-5\.4\.0-28-generic$";
   "^linux-.*-5\.4\.0-29-generic$";
   "^linux-.*-5\.4\.0-31-generic$";
   "^kfreebsd-.*-5\.4\.0-28-generic$";
   "^kfreebsd-.*-5\.4\.0-29-generic$";
   "^kfreebsd-.*-5\.4\.0-31-generic$";
   "^gnumach-.*-5\.4\.0-28-generic$";
   "^gnumach-.*-5\.4\.0-29-generic$";
   "^gnumach-.*-5\.4\.0-31-generic$";
   "^.*-modules-5\.4\.0-28-generic$";
   "^.*-modules-5\.4\.0-29-generic$";
   "^.*-modules-5\.4\.0-31-generic$";
   "^.*-kernel-5\.4\.0-28-generic$";
   "^.*-kernel-5\.4\.0-29-generic$";
   "^.*-kernel-5\.4\.0-31-generic$";
};

Find the kernel package name

dpkg -l | grep linux-image

At the time of writing, on amd64/x86_64  architecture the image name was: linux-image-$(uname -r)-generic

For unsigned kernel images, like those created by nvidia drivers, the image could be: linux-image-unsigned-4.20.17-042017-generic

Remove (purge - remove all configuration files as well)

sudo apt-get purge linux-image-3.5.0-40-generic

If you want to do a deep clean (leftover package configs...), USE WITH CAUTION:

dpkg -l | awk '/^rc/ { print $2 }' | xargs apt-get purge -y
dpkg -l | awk '/^rc/ { print $2 }' | xargs dpkg -P

NOTE: For Ubuntu 18.04 LTS or later, you may also want to remove any linux-modules or linux-headers packages of the same version to save disk spaces / keep you system lean.

Update - 2020-05-21

Explicitly purging old kernels may cause unexpected results. Not recommended unless /boot is on its own tiny partition (out of space).

Refer to @ZAB 's approach to get rid of the latest kernel update which introduces bug (break things).

Ubuntu wiki on Removing old kernels

There is no (I personally haven't found) easy equivalent to Fedora/RHEL/CentOS approach by setting installonly_limit=2 to tell DNF or YUM to only keep latest 2 kernels.


Ubuntu sdk-cannot create click package and cannot create emulator

You have two problems:

Click package creation is possible only for phone or emulator target. The click package reation is disabled when your target is the desktop.
You have a broken emulator on your machine. It is a know and fixed bug: https://bugs.launchpad.net/ubuntu/+source/qtcreator-plugin-ubuntu/+bug/1409596 The today's release contains the fix for it.


ubuntu 12.4 dualboot installation problem

Ubuntu Wubi is not longer supported since 12.04 version and actually it is practically unuseful. You can observed Wubi.exe into the newer iso images of Ubuntu but it doesn't work because you can not install it or Wubi crash when you try to actualize it a newer versions. It's highly recomended that you install Ubuntu in a different partition of your hard disk drive by using the new version available as iso image (CD, DVD, USB pendrive). You can use too a virtual machine in your Windows System.


You have an uncommon configuration. We may correct it.
Boot from a Live CD and use the pre-installed partition tool to:

Check if the partitions are contiguous (in sequence; if they are, you can continue).
Wipe (delete permanently) the three partitions. In the free space, create a new big partition and format it as Linux SWAP space.

If the point 1 fails, reboot in you HD linux distro and follow THIS GUIDE (CLICK HERE) to create a swap file. (after that your can still delete the three swap partitions and format them as EXT3 to use them as free space ;-) )
Let us know any problem by commenting under here.
If I'm useful press the up arrow on the left and mark as useful response.


Intel driver has a good option for tear free rendering:

sudo nano /etc/X11/xorg.conf

under the Section device which use intel driver add the following option:

   Option      "TearFree"    "true"

If you do not have the xorg.conf file you can easy generate them for you using nvidia-settings or using Xorg

Look at this

I hope it helped you.


Google changed the icons without advertisement. New version of My-Weather-Indicator was released to fix this problem.


cannot get latest charm revision when ttying to deploy a local charm

It's worth double checking that your metadata.yaml file is correct. First check that it's valid yaml and then double check that it follows the same format as some of the existing charms in the charmstore


I solved the problem with help from @chaskes:

xmodmap -e "keycode 115 = Multi_key End"

remapped the first level of End to the compose key, but allows me to press Shift-End to send an actual End keypress.
I made this permanent by putting it in my ~/.xinitrc.

Other sources:
https://unix.stackexchange.com/a/109472/
https://askubuntu.com/a/24930/


Trouble generating wifi hotspot in ubuntu 18.04

If you create the Hotspot with the Network-Manager GUI, it creates the file /etc/NetworkManager/system-connections/Hotspot. In that file it is possible to edit the SSID and the password.

sudo vim /etc/NetworkManager/system-connections/Hotspot

The content of the file is:

[connection]
id=Hotspot
uuid=0bf627gd-8e34-48c6-865a-06f898b4y1hb
type=wifi
autoconnect=true
permissions=
secondaries=

[wifi]
hidden=false
mac-address=YOUR_WIFI_INTERFACE_MAC_ADDRESS
mac-address-blacklist=
mode=ap
seen-bssids=
ssid=SSID_NAME

[wifi-security]
group=ccmp;
key-mgmt=wpa-psk
pairwise=ccmp;
proto=rsn;
psk=YOUR_WIFI_AP_PASSWORD

[ipv4]
dns-search=
method=shared

[ipv6]
dns-search=
method=auto

To enable autostart you have to set the parameter autoconnect to true. Then restart your computer because the command: sudo systemctl restart NetworkManager for network restart seems not to work correctly.

After restart you can use the nmcli command to start the access point.

nmcli con up Hotspot ifname YOUR_WIFI_INTERFACE

YOUR_WIFI_INTERFACE you can find out with the command iwconfig.

Make sure you install network-manager and its dependencies to use nmcli.


Ubuntu 16.04 - Applications becoming very unstable

I personally have had several problems with both Nvidea and the 16.04 upgrade tool. Try installing a different desktop environment. That way, you will know if it's Unity messing up on you or Ubuntu itself. I recommend Gnome.

Open a terminal (Ctrl+Alt+T) and type **sudo apt-get install gnome**
Now you must investigate. There could be a few things that happen now: all files failed to "fetch", in the download process, the system asks about adding an entry to unity-greeter, or the operation completes successfully.
A. Try typing ping google.com. If that doesn't work, check your internet connection and try again. If it still doesn't work, check Ubuntu Software Center. If that doesn't pull up, try again later or, if your dual-booting, try the Internet in the different OS.
B. If it asks about adding an entry, click yes. This is very important. You can now continue on.
C. Continue on if it is successful.
Type sudo reboot.
Now you should see a bar above your name in the login screen that may say Default or Unity or something else. Click it, and select Gnome.
Try using some of the applications that crashed before, except now, use them in gnome. If they work fine and don't crash, open a terminal in gnome and type sudo unity --reset. If that doesn't work, a more risky approach would be sudo apt-get install --reinstall unity. If they crash the same, try reinstalling Ubuntu from a bootable USB or CD.
If that didn't work then there could be an error in your installation ISO. Download a new one, and then try. If it still doesn't work, open up your PC (physically) and check to make sure any components aren't broken. You should also check on the PC if the memory is messed up with memtest, or try seeing if any information is available with lm_sensors.

If you need any other help or if I didn't make myself clear please let me know, as I am very willing to help.


Wifi not working with Asus X551 and Ubuntu

It looks like "Wi-Fi is disabled by hardware switch" and following links have solved it for me

WiFi not working on Asus U32 with Ubuntu 14.04

http://forums.fedoraforum.org/showthread.php?p=1680490

As root, create a file named e.g. asus-wifi.conf and put it in in /etc/modprobe.d/
Insert this line in it: options asus_nb_wmi wapf=1
Reboot and see if wifi works.

I had same problem using Fedora F19, F20 and Ubuntu F14.04


new monitor has 1920x1080 but only show 1366x768

Have you installed the lastest drivers for your graphics card? If you haven't, then follow this steps:

Click on the Dash
Search for Additional and click Additional Drivers
Wait a bit, and you'll see a list with all the compatible drivers for your computer.
Check if your graphics card name appears at that list, select the entry for it (I usually select the "post-release" entry, or the one that has [Recommended]) and click Activate. After a while, you'll have to restart your computer.

Maybe this will work to you, be sure to have all the updated drivers before of doing anything! Hope it works to you and tell us soon.

(Sorry for the duplicated answer, the original by me can be find here.)


The only way to improve quality of the print is to do the research of reverse engineering the specific driver related instructions and updating the pixma foomatic driver. Currently we don't have any Canon documentation to work from to get printers working.

I have a Canon iP5000 and have a limit of 600dpi too. Unfortunately it's a lot of work to reverse engineer hardware protocols and we're not likely to get much support from Canon or Canonical in patching the holes.


I don't know if lubuntu keymapings are the same with ubuntu but the way to do it is hold down the Super/Windows Menu key and the keyboard shortcuts list will pop out. In ubuntu you can do it with Super+ 1-9.


How to change partitioning - may involve conversion of a partition from primary to extended

OP has solved the problem and posted as a comment,

  I have solved the issue already, using the second method I described
  in my question. Everything went fine


What happened

That can be looked up in the man pages. rm deletes files and with the arguments -r (for recursively) and -f (for "forcefully").

In short it that command deletes every file (and directory) which is a child of that path. In your case /

Usually there should have been a warning about deleting your root directory (--no-preserve-root flag), though as I have never run that command myself (yet) I can't confirm if that happens everywhere.

How can I recover from an rm -rf

Data recovery isnt just running a few commands and be done with it. As the answer below states data recovery is a science.

Usually your best shot  (best as in getting the most databack) if in fact everything was deleted is bare-metal recovery, though if it is financially viable is up to you to  decide.

See this question over on serverfault for waht next steps to take:
https://serverfault.com/questions/587102/monday-morning-mistake-sudo-rm-rf-no-preserve-root


Deleted Ubuntu partion within windows and now computer won't start

You'll need Your Windows boot DVD.  Boot up on that DVD, and select Boot Repair.  This will remove GRUB and restore the windows boot loader.

If you would like to continue using Ubuntu on that machine, make a Live USB stick, and boot up off the stick whenever you would like to use it.  You can even bring use it on other computers and bring all your settings and files with you that way.  This method makes no changes to the host computer, so your parents shouldn't be able to complain.

Edit: Just saw the issue with the windows USB stick.  You have to follow very precise instructions to get Windows installation media to work from a USB stick.  Best done from a working Windows computer.  Please check out this site:

http://bootableusb.net/install-windows-7-usb-drive-easy-way/


Why can I no longer (un)install packages via apt-get after doing a partial dist-upgrade?

Running

cp /usr/share/grub/default/grub /etc/default/grub
update-grub
sudo apt-get -f install

seems to have fixed the issue.  I'm still not exactly sure why things got screwy in the first place, but hopefully this might save someone else's butt...


How can I get the programmes I use everyday to auto start at boot in the specified Workspaces?

1) Install Compiz Settings Manager.

2)  Open it (Alt + F2 and type ccsm)

3) Go to "Windows Management"> "Place Windows" > "Fixed Window Placement"

4) At "Windows with fixed viewport" choose "New" and add the program you want to the viewport you want.


Is there a way to login to a network without a GUI?

In the end this is the one that works for me, I use this eventhough it takes quite a while to connect. https://github.com/systematicat/hack-captive-portals


Installing Ubuntu 15.04 along side Windows 8.1

Have you tried using Windows to resize the partition? I have done this several times with Windows 8.1 and it works very well. It will tell you, if resizing is not possible.


Why difference in image resolution between firefox and chrome on Ubuntu?

The image in question (https://www.thehindu.com/static/theme/default/base/img/logo.png) is 547 pixels wide and 46 pixels tall. When displayed in its natural size, the image looks the same in all browsers.

For reasons unknown, the designers of the website have decided to display it with a width of 480 pixels.

This means that the browser must scale the image down. Each browser uses its own scaling algorithm; as you have noticed, Firefox and Chrome use different scaling algorithms, which give visually different results.

Morality: use bitmapped images at their natural dimensions, or else users of different browsers will see subtly different pictures.


Some system tray icons invisible in Gnome Classic 12.04

The solution is to add the Notification Area applet.
Taken from this question No Banshee notification area icon in Gnome 3 classic session


How can I know how long `dd` cloning will take?

Typical. When I ask something I then find the answer somehow (even if I looked for hours.. but magically I find it AFTER creating the question -.- ). Anyway for what I checked with dd --help which mentions at the end of the help (I can't really believe I did not see THAT) the following:

Sending a USR1 signal to a running `dd' process makes it
print I/O statistics to standard error and then resume copying.

   $ dd if=/dev/zero of=/dev/null& pid=$!
   $ kill -USR1 $pid; sleep 1; kill $pid
   18335302+0 records in
   18335302+0 records out
   9387674624 bytes (9.4 GB) copied, 34.6279 seconds, 271 MB/s

What this means is that in another terminal you would run the following line using the Process ID of the DD you want to check. For example in my case is Process Id 4112. You can see the process ID by typing ps -e and looking for dd or just ps -e|grep dd and looking at the number in the front. Take note of that number and then type in another terminal window kill -USR1 4112; sleep 1; This will give me the time, seconds elapsed since it began and how much is has copied. At least now I know it takes about 8 hours to copy 1TB of information at about 40MB/s.


sudo apt-get install cryptsetup
sudo modprobe dm_crypt

For more info, visit here


Openstack Node post-installation failure using conjure-up 'cloudinit'

There were 2 issues.  Hopefully this helps someone who is burning hours trying to figure out MAAS networking. YMMV

Although both the private and public VLAN's were enabled and set up under the subnets tab in MAAS, I needed to route the private VLAN (subnet) to the external internet (to download packages for deployment) and to an upstream dns (to resolve package ip addresses) accessible within my routed subnets. The dns needed to resolve quickly to eliminate timeout issues as well.

I am sure there are several ways to do the NAT'ing including using iptables.

One other issue, when I tried to let MAAS manage the public subnet, (DHCP, Auto-assign) it wouldn't assign a dns or gateway although it did assign an IP, and without dns/gateway nothing was getting routed on the public subnet (host/address not found/unreachable).

More documentation on how MAAS actually works behind the scenes relating to networking would be beneficial IMO.

My Solution

I enabled the private subnet route along with an internal upstream dns in my upstream router, which I believe makes it a flat network and no longer private.  The public subnet is unconfigured in all nodes.

MAAS handles DNS and provides DHCP on the private subnet for my scenario
Additionally, the private subnet still had to be both routed to an external internet and upstream DNS for deployment of nodes.

To test in MAAS I deployed a single Ubuntu node and ping'd the host name from the MAAS node.

After successfully pinging the Ubuntu node, I ssh'd into the Ubuntu node from the MAAS node using the host name and then I then ping'd google.com from within the deployed Ubuntu node.

This may not be the correct way, but as no one answered, I found a method that is working.

I would prefer a split-network with the private subnet being truly private and without using my MAAS node for routing to the public internet if there is a way.


Problems installing Ubuntu 13.04 on Windows 8 PC

are you trying to install Ubuntu via wubi, so inside windows? than I have bad news for you, it will probably not work in windows 8 (check the answer to this question). try booting from a live cd/dvd, create a separate partition for Ubuntu and install it there. here is more info about installing Ubuntu on a machine with UEFI (which is probably the case with a windows 9 computer)


You can download the Ubuntu .iso file and burn it in a CD or DVD. Normally we burn the version "CD" .iso in a real CD but you can burn it in a DVD or using unetbootin and an USB (>=1GB) to make a bootable Usb. It's okay. But if you download a DVD images of Ubuntu, then you must burn it in a DVD (or use an USB > 4G).

I vote for a bootable USB. You can try it. Read more: http://unetbootin.sourceforge.net/


Unable to locate package libssl-dev and I cant find a solution

Use

apt-cache search libssl

to find out if it is available for you.

Also, make sure, your repositories are correctly configured:

19.10 sources.list
18.04 sources.list
16.04 sources.list

Kali is not supported here, but the same is applied to it also: make sure your repositories are configured correctly

After repositories correction, use sudo apt update and then recheck.

On 19.10 with correctly configured repositories apt-cache search returns:

$ apt-cache search libssl-dev
libssl-dev - Secure Sockets Layer toolkit - development files
perl-openssl-defaults - version compatibility baseline for Perl OpenSSL packages

20.04 sources.list:

$ cat /etc/apt/sources.list | grep -v "#"

deb http://archive.ubuntu.com/ubuntu/ focal main restricted

deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted

deb http://archive.ubuntu.com/ubuntu/ focal universe
deb http://archive.ubuntu.com/ubuntu/ focal-updates universe

deb http://archive.ubuntu.com/ubuntu/ focal multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates multiverse

deb http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse

deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

deb http://archive.canonical.com/ubuntu focal partner


xkill keyboard shortcut does not work on Ubuntu 13.10

You probably moved on by now. For other people to reference...

I had the same issue in version 12.04. Heres how to do it:

System Settings->Keyboard->Shortcuts
click the '+' button
type 'xkill' for name
type 'xkill' for command

I assume you were typing 'Ctrl+Alt+X' for the command (thats what i was doing). However, 'command' does not refer to the shortcut keys, but to the actual command used to run the program. I know, im a newb.

Then press apply and click where it says 'disabled' next to the new xkill command and press the keys you want to use for your shortcut. Now you should be able to use that shortcut to execute the 'xkill' command.

From reading other forums, it appears as though logging out and then logging back in becomes necessary in version 13.10 in order for shortcuts to take effect.


I had to edit my monitor config and change the framerate. By default mine was set to 60.169086456298828.

open terminal and run the following:

sudo gedit ~/.config/monitors.xml

edit this line:

<rate>60.169086456298828</rate>

set it to be lower than 60 as mentioned by 4levels, I used 59.96.


SVN Client (stand alone) to auto get stuff from our real SVN

svn from the command line, package name subversion.
You can create a cron job, something like this:

*/5 * * * * svn update --username USER --password PASS  /path/to/your/working/copy

or

create a script to commit:

cd /path/to/your/working/copy
svn commit -m "Cron commit of code"

and call that script from a cron job.


Xubuntu 18.04 LTS Ristretto does not open image.ascii.pgm files

For your first question: There is a bug report on this issue. It seems that it is fixed in the 0.8.4 version.

For your second question: I am highly recommending nomacs image viewer. You can install it by running:
  sudo apt install nomacs

To set it as default for a specific file type, right-click the file you want to have opened with nomacs, then Properties... → Open With: → nomacs.


Error detected while processing /home/kiran/.vimrc:

There are stray $ characters in your .vimrc. Run this command to clean them up:

sed -.bak 's/^[$]//' ~/.vimrc

You can also do this manually by vim ~/.vimrc. After vim shows the error message, press Enter to continue.


how to parse watch command output to last 5 digits?

You wouldn't parse the watch command, you'd parse whatever command watch was running. I pimped your search to match a wider range of possible output from ifconfig:

$ ifconfig eth0 | grep -Eo '[0-9\.]+ [PTGMK]i?B'
164.8 GB
142.6 GB

This is made possible by grep's -E argument which allows a wider syntax and -o which only outputs matching strings.

If you want to loop that, you can but you have to wrap it in a shell so the pipe is interpreted correctly:

watch -x sh -c "ifconfig eth0 | grep -Eo '[0-9\.]+ [PTGMK]i?B'"

But in my opinion, this isn't wildly useful as it is... watch is really only good for a real person watching the screen. If that's the case, you're all done but if you want to do something with these numbers on a regular basis, you're probably using the wrong tool.


Bluetooth speaker doesn't show up in output devices list

I had the same issue. In this post is pointed this solution.

Basically, you have to create/edit the file /var/lib/gdm3/.config/pulse/client.conf

And add the following configuration lines

autospawn = no
daemon-binary = /bin/true

And give to GDM the ownership

sudo chown gdm:gdm /var/lib/gdm3/.config/pulse/client.conf

Retart GDM and it is solved


How do I convert a x86 RPM to a x86 DEB within a x64 system?

The process is quite easy, in short you need to modify the control file and that's it.

sudo alien -g package-name.rpm
cd package-dir/
sudo vi debian/control

Now change the architecture (i386 in my case) to be the one you need. For example,
I added the amd64 archicture and this is how the line ended up:

Architecture: i386, amd64

Last step:

sudo debian/rules binary

This will produce the .deb file.

References:

Using Alien to convert .rpm packages to lpia .deb


Is there a whatsapp client for linux desktop?

WhatsApp doesn't have an open API. Some open source projects have reverse-engineered the protocol, but they still need a client token which WhatsApp doesn't give out to 3rd parties.


How to install lightscribe for CD burning?

32-Bit Installation

If you have a 32-bit system, you should be good to go!  Just install the debs, like so:

sudo dpkg -i lightscribe*.deb
sudo dpkg -i 4l*.deb

Now I haven’t tested this because I do not have a 32-bit system so if you have trouble, let us know in the comments!  I can always cook up a VM to test this in properly.

64-Bit Installation

If you are using a 64-bit operating system, which I would wager to guess that that is true, you will have to force the software onto your system.  This is never recommended, but i can’t imagine that the impact of the software is significant enough to cause any damage to your install.  The Ubuntu help page however, gives the following warning;

So, that said, here are the commands!

sudo dpkg --install --force architecture lightscribe*.deb
sudo dpkg --install --force-architecture 4l*.deb

Now, let’s run it.

If you want to create a disc with an image covering the surface:

sudo 4L-gui

If all you need to do it print a little text on a disc:

/opt/lightscribeApplications/SimpleLabeler/SimpleLabeler


Updated for Ubuntu 18.04

Click on the icons on top right corner and select Screwdriver & Wrench icon at the bottom of the drop-down menu. Then select the Devices from the left panel. Then select the Keyboard from the left panel. This will bring you to the table of keyboard shortcuts.

Scroll down to the Typing section and find two entries:

Switch to next input source Super+Space
Switch to previous input source Shift+Super+Space

Select Switch to next input source and follow the instructions on the screen and press the keyboard shortcut you want to use such as Ctrl+Space.

Select Switch to previous input source and follow the instructions on the screen and press the keyboard shortcut you want to use such as Shift+Ctrl+Space.

Original Answer

Click on the power/Gear icon on top right corner and select System Settings... Then select the Text Entry icon under Personal. Make sure Persian is listed. If not, add it by clicking on the + sign.

I find it hard to use any combination with Alt as it brings up the HUD. To change this return to Text Entry as before and click on the space under Switch to next source using: where it says Alt+Shift and enter another combination such as Cntrl+Space.

Next click on the space under Switch to previous source using and enter another combination such as Shift+Cntrl+Space.

Hope this helps


To make the text cursor thicker in a GTK3 based desktop (including standard Ubuntu, Budgie, XFCE), edit or create a configuration file .config/gtk-3.0/gtk.css and add the line:
* { -GtkWidget-cursor-aspect-ratio: 0.05; }

You can make the cursor even thicker by changing 0.05 to a higher number (0.1, 0.2, ...).
I did not find a method to change the color of only the text cursor.
Source


Maas isn't showing Trusty as a deployable Distro

To allow later versions of Ubuntu to show up in MAAS <= 1.4 you would need to edit the file /usr/share/pyshared/maasserver/enum.py to add the new release names to the MAAS web UI.

For example, you would need to change the DISTRO_SERIES class as follows:

class DISTRO_SERIES:
    """List of supported ubuntu releases."""
    #:
    default = ''
    #:
    precise = 'precise'
    #:
    quantal = 'quantal'
    #:
    raring = 'raring'
    #:
    saucy = 'saucy'
    #:
    trusty = 'trusty'

DISTRO_SERIES_CHOICES = (
    (DISTRO_SERIES.default, 'Default Ubuntu Release'),
    (DISTRO_SERIES.precise, 'Ubuntu 12.04 LTS "Precise Pangolin"'),
    (DISTRO_SERIES.quantal, 'Ubuntu 12.10 "Quantal Quetzal"'),
    (DISTRO_SERIES.raring, 'Ubuntu 13.04 "Raring Ringtail"'),
    (DISTRO_SERIES.saucy, 'Ubuntu 13.10 "Saucy Salamander"'),
    (DISTRO_SERIES.trusty, 'Ubuntu 14.04 LTS "Trusty Tahr"'),
)

You do have to make sure you have also downloaded the boot images into /var/lib/maas/ephemeral/ so they are available.
But then you should be able to select each version from the MAAS web ui as a deployment target.

If you are using Juju to deploy, then make sure you also update your environments.yaml file's default-series parameter to select the series you want to deploy.


thanks for your interest into Ubuntu Core!

Ubuntu Core is really a small set of an Ubuntu system, as you said, lightweight. It doesn't come by default with a desktop environment or with apt-get (use snappy instead!)

I really encourage you to get familiar with the documentation (https://developer.ubuntu.com/en/snappy/). I think I may duplicate this one to What is Snappy Ubuntu Core? which has better answers to your question.


Package dependendency error, even though the package is the correct version

OK, here's where it gets tricky and EXTREMELY confusing.
Yes you do have libarchive installed BUT you have the wrong version of the proper version. For reasons thst I never understood Ubuntu puts the word ubuntu into most lib files.

What you need to do is, do an online search and libarchive13 version 3.1.2.9 without the Ubuntu suffex, download and install IT. The fact that you now have 2 versions of the same thing usually doesn't matter as to the OS they're different.

I really wish the different distributors quit this kind of crap, it just makes it harder for the user.


When you boot up the Ubuntu disc, you will see in the top right corner that it lists you as connected to the internet, disconnect then begin the installation, you can install any updates you want after the installation is complete.


Variant on the NotWakingUpAfterSuspend problem

If you're having trouble with the Gnome screen-saver, replace it by the X Screensaver (which is what I did when I ran into a similar kind of issue:

get rid of gnome-screensaver by:

sudo apt-get purge gnome-screensaver
sudo apt-get purge light-locker

Note: The light-locker purge should be automatic with the gnome-screensaver but as you were having trouble with that, added in as well.

Install the X screensaver by:

sudo apt-get install xscreensaver xscreensaver-data xscreensaver-gl
sudo reboot

The reboot is in principle not necessary, but will ensure a "clean" system.

(It's just a workaround and not a real "solution" but it works for me and is definitely better then shutting down and restarting)


Windows 7 not recognised in installation

Maybe this another post can help you with.
The problem seems almost the same:

Windows 8 not recognised - AskUbuntu Topic


How do I cd the remote server directory mounted through File/Nautilus?

Nautilus (and other file managers) have their mounts in /run

Try to search unter /run/user/<UID>/gvfs/<mount>/.

If you regularly need CLI commands, I'd suggest mounting from CLI, too.


How to set directory permission in linux which prevents users (except owner) to delete file but allow them to modify content?

I would  fiddle with idea of "Creator Owner" vs "other users" permissions and instead of files permissions in some folder go for Creator Owned folders/dirs and perhaps create different "exchange" files some readable, some writable. This depends on what you actually want to achieve.

SElinux may help too, but it seems that combination of SElinux and Samba would rise more questions than solve them. Rock-bottom: applying more rules create more quirks one could easily overlook.

My experience with this kind of problems shows that if you need more fine-grained access than OS/File System allows you to do it is often wiser to think of a custom security model and write an application that has access system you need. Perhaps use databases.

I am also curious if someone else resolved this problem in some acceptable way and if s/he did what would be conceptual boundaries.

here is a question that would bother me: if someone else can edit my file (effectively being able to delete whole content) - what would be difference between this and actually deleting a file?


Using libnotify from a daemon started with upstart

Would you be better off approaching this problem from a different angle?

I'd try run your script on login by putting a .desktop file in ~/.config/autostart and ensure that the script restarts itself if there's a network problem (I assume that's why you're using upstart).

Something like this perhaps:

while 1:
    rc = 0
    while rc == 0:
        rc = client.loop()
    # Check error code, possibly pause for a while
    client.reconnect()


How important is adapting ubuntu with pc parameters?

sudo apt-get install build-essential libgomp1 entering your password and hitting enter to confirm installation should solve your problem. Note that this is a library only.


how do I boot into a LUKS-encrypted environment?

The alternate install has support for Luks-Encrypted LVM roots. It even has a "Guided" partition mode for encrypted LVM

You will need your /boot partition mounted on non-encrypted media. This means either a separate /boot partition (the "Guided" default), or a USB drive holding your boot partition (if using the latter, you can also store your encryption key on it). This is because your computer cannot execute encrypted code. You need some unencrypted code to unlock the encrypted drive. If you use the USB drive option, make sure you have it inserted and mounted at /boot any time you update. (You could probably make a script to remind you, too...)

A special note: Using a separate boot partition on the same drive to store your bootloader code opens you up to the possibility of an "evil maid" attack, whereby someone with persistent access to your computer can modify your bootloader to record your password, then come back and retrieve it after next time you type your password. If you're just using encryption to protect your files in case of theft, then you don't have to worry about this. If this is a concern for you, keep your /boot on a thumb drive, and keep the thumb drive safe.

P.S: I'm writing this from a LUKS-Encrypted Archlinux system, with a drive that looks something like this:

/dev/sda:
    sda1: /boot - ext2 128M
    sda2: LUKS encrypted partition ~300GB
        LVM Physical Volume ~300GB
            logical volume: /root ext4 296GB
            logical volume: swap 4GB

I highly recommend this setup.

Hibernate is working fine, even though swap is on an encrypted partition (but it might not on Ubuntu). If you want a separate /home partition, that's easily done by adding another volume to the LVM. All of this should be achievable from the Ubuntu alternate install.


After migrating from a Wubi install (12.10 x64) I can't mount a USB flash drive

This has something to do with the ACLs (access control lists). I'm not sure when the problem started (I think with release 12.10), but ironically it happened to me last week so I knew what to look for.

Anyway here is the low down... if you check the access control list on the Wubi install it looks like this:

# file: media/bcbc
# owner: root
# group: root
user::rwx
user:bcbc:r-x
group::---
mask::r-x
other::---

Whereas on the migrated install it looks like this:

bcbc@23:34:50:~$ getfacl /media/bcbc
getfacl: Removing leading '/' from absolute path names
# file: media/bcbc
# owner: root
# group: root
user::rwx
group::r-x
other::---

As you can see it's missing this: user:bcbc:r-x

Solution

The simplest solution is to remove the directory as it gets recreated automatically (substituting your username in place of bcbc):

sudo rmdir /media/bcbc

Or you can simply reinstate the ACL by running the following command (again substituting your username, twice):

sudo setfacl -m u:bcbc:rx /media/bcbc

This is what it looks like:

bcbc@23:34:53:~$ sudo setfacl -m u:bcbc:rx /media/bcbc
[sudo] password for bcbc:
bcbc@23:35:42:~$ getfacl /media/bcbc
getfacl: Removing leading '/' from absolute path names
# file: media/bcbc
# owner: root
# group: root
user::rwx
user:bcbc:r-x
group::r-x
mask::r-x
other::---

bcbc@23:35:44:~$

I've marked it as an issue on the migration script (wiki and github) and will fix it in the next release, probably need to add the -A option to the rsync commands to copy across the access control list.


Fixed.
I followed solution 3 from the following guide:
https://itsfoss.com/how-to-fix-no-sound-through-hdmi-in-external-monitor-in-ubuntu/
In pulseaudio controller, HDMI appeared disconnected but HDMI2 was available, so I selected that, and it then became available in the audio settings. Selecting HDMI2 fixed the problem.


Issue with font rendering inside applications

Try Fix it through Unity Tweak Tool.

Click Restore defaults and voila!
Hope it Help.


Wacom Intuos Comic CTH-490 not detected by system settings even after 'get drivers' installation

The device requires a newer version of the wacom driver than was supplied in Ubuntu 14.04, 15.04 or 15.10. To get this device to work you will need the latest driver available from a ppa (package archive) where I have a build available for test:

https://help.ubuntu.com/community/Wacom/LatestDriver

Please follow the instructions there to get the tablet working. Don't forget to reboot and report any errors here.


Clone desktop Ubuntu on a pendrive to run on another machine

It is possible and the best option is to use a live CD like Clonezilla Live.

You could also boot with any Live CD and use dd to clone the disk:

dd if=[disk_with_ubuntu] of=[pendrive] bs=512 conv=noerror,sync

Where [disk_with_ubuntu] is the disk containing your Ubuntu installation (f.e. /dev/sda) and [pendrive] is your pendrive. You have to be very sure about these parameters, otherwise you might overwrite the wrong disk. That's why I recommend using a live CD designed for this precise task.


How to run a script, depending on internet connection

Add your script to /etc/network/if-up.d/.
Name your script without a '.sh' extension.

Also after adding script run chmod +x /etc/network/if-up.d/yourscriptname to give necessary permission.

Make sure the network interface (e.g. wlan0 or eth0) that should trigger your script when turned on is mentioned in the file /etc/network/interfaces.


Ubuntu 17.04 Error when create VPN-connection: No plugin supported adding this connection

Try install network-manager-openvpn and network-manager-openvpn-gnome with:

sudo apt install network-manager-openvpn network-manager-openvpn-gnome

then log out, and log back in, and if that doesn't work, try a reboot. Also make sure openvpn itself is installed:

sudo apt install openvpn


Both the steps to setup a remote desktop and use it over SSH is explained on the remote desktop wiki page.


Can an unmounted USB be infected my malware?

To answer the actual question:

Yes, a software can write to a device directly but contrary to your assumption this doesn't destroy a file system since software also can read directly from the file system. If the software does everything right it would just be like reading and writing the usual (indirect) way. Remember that it just had to do what your system does all the time. Plus, the software wouldn't have to care about any privileges managed by the file system.

However – and here comes the good message – to read or write directly requires read/write access to the device files, for example /dev/sdb. This access is only granted to the super user.

You can try this yourself by entering

dd if=/dev/sda bs=32 count=1

into a terminal. /dev/sda is your first hard drive, replace it with whatever your USB stick is (probably /dev/sdb) if you want to test it for it and not your hard drive.

You will get

dd: failed to open ‘/dev/sda’: Permission denied

as output.

If you did this with sudo or as root it would write the fist 32 byte of your hard drive / your USB stick to the console.

However, you should be aware of the fact that normal users can in fact mount devices. So no direct access to the device is necessary and a malicious software can read and write using the normal (indirect) way.

You can test this yourself by entering the command

mount /dev/sdb1 /some/directory/already/in/place

where /dev/sdb1 is the first partition of your USB stick.


Will installing 12.04 delete contents on a hard drive?

When doing a new install instead of an upgrade to an old version you need to have a dedicated partition for the new system. The old data in that partitioning will be overwritten in the system install process. If you don't have an available partition make it with gparted from unused disk area. If you don't have unused disk area you may get it by resizing some of your old partitions.


check your pc manual to make sure jack has headphone socket (3-way connection) or headset (4-way connection).
only use jack plug with same number of connections or get an adaptor cable.

If the jack connections are ok but you still hear sound from microphone, it could be an internal laptop microphone. go to Pulseaudio Volume Control or alsamixer and mute microphones or other recording devices to find out which one is causing problem.
If the problem microphone is not used, leave it off.
If you need to use the microphone some of the time, need more details to  explain your problem better - with screenshots if you can


On Ubuntu Bionic, I seem to be running networkd and wpa_supplicant. I found that I could run:

sudo wpa_cli -i wlan0 list_networks

The current network will be marked [CURRENT]. However, the interface must be supplied with -i, as the default interface is not the one that is actually in use.


WIFI status icon can't sync with my WIFI status in the upper status bar!

Okay, here is an answer that should work. To disable the wifi card, you can disable the kernel module by running the following command:

sudo modprobe -r iwlwifi

If this works, the icon will usually update immediately.

To re-enable the kernel module to bring the device back up, run the following command:

 sudo modprobe iwlwifi


How to remove installed GNOME user shell themes

there are two possibilities.

when you installed themes via scripts provided by author or zip files, they would either copied into
~/.local/share/themes/ or /usr/share/themes/

you need to go to those folders and find the corresponding theme names to delete them.

please be careful, this themes folder contains GTK+ themes also.


Driver for VFS5011 Fingerprint Reader on Dell Vostro 3550

I had the same issue and this worked for me:

sudo add-apt-repository ppa:fingerprint/fingerprint-gui
sudo apt-get update
sudo apt-get install libbsapi policykit-1-fingerprint-gui fingerprint-gui

This works for many fingerprint readers including 138a:0011 and 138a:0018 as well.

from “Fingerprint readers integration” team on launchpad


Officially there is no support as mentioned here.
It is a windows only printer.


dpkg: error processing linux-generic unmet dependency error

I've had a similar problem, myself, that made it impossible to add or remove packages. Essentially, it was a broken package. If a broken dependency is the issue for you, try following these instructions to flush it out:

Run the command, sudo dpkg --configure -a. This will return an error, but don't worry.
Look at the error from the previous command. It should list broken package(s). Type sudo dpkg -r PACKAGE_NAME to remove each one. Some will probably fail to be removed. Add them to a list.
Run sudo dpkg --configure PACKAGE_NAME for each package in your list. This should repair them and return no fatal errors.
Finally, run sudo apt-get install -f to fix dependencies.

Now, you should be able to install your kernel. If this version is for the channel you're on, this can be done with a simple, sudo apt-get upgrade. Good luck!


Keyboard shortcut to un-focus form controls

While there isn't really a shortcut to what you asked, there are workarounds, the easiest being hitting F6 twice. The first time will take you to the URL-bar, the second will go back to the page (works in Firefox 3.6.16, didn't try Firefox 4 yet).

I know this it not really satisfying but you'll get used to it fast.

See http://support.mozilla.com/en-US/kb/Keyboard%20shortcuts#w_current-page.

Another thing mentioned on http://support.mozilla.com/en-US/kb/Accessibility#w_html-access-keys and the "proper" way is

  HTML Access Keys
  On some web pages, keyboard shortcuts are assigned to different elements on the page. To move the cursor directly to one of these elements, press Shift+Alt+AccessKey.
  Which key AccessKey is depends on the website. It is determined by the website author, not Firefox.

It's declared like this <input type="text" size="40" value="Feld" accesskey="f"> so if you have this problem on a particular site just grep for accesskey in "Site Information" (STRG + I on german keyboard  layout).


I can confirm that Zoom works with success using the browser web client instead. It works with both cam and audio. You may use that instead of the Zoom installed client and even save some disk space. I use Firefox under 20.04.1 with no problems. Using the web client removes these install and update issues from the end user. You always have the latest working version.


sort filename | uniq > output is not removing the duplicates

Most likely you have trailing spaces which are causing the non-unique designation.  Try stripping them out with xargs, like:

sort file1 | xargs -n 1 |uniq


I've DD'd a drive, lost the files and want to get them back - how would you do it?

I wanted to give an update on this, with my findings:

creating a disk image does take a long time, but seems to be the safest method of performing this work (photorec can be pointed at the image, instead of the USB drive).

It makes sense to be specific about the kinds of files one wants to recover, instead of selecting all file types: it speeds up the process.

Run the photorec software at the maximum block size, if possible. This is the third run I have performed, and this seems to be a very important discovery. In previous runs, i did not consider block size, so the files that photorec spat out where around 500 blocks.

I am really impressed so far, as the software has found a pdf file from the disk image - it's not all there, but I can get it from source, after completion.
More updates to follow.


How to write a script to send messages over telegram-cli?

To write a script to send messages over telegram-cli, you need to do the following:

Move to the directory where telegram-cli is:
Open telegram-cli with your key
Load your contact list with -W
Send the message to anyone on your contact list previously loaded

To achieve that:

cd /path/to/tg && bin/telegram-cli -W server.pub -e "msg contact message"

or

cd /path/to/tg && (sleep 1; echo "contact_list"; sleep 1; echo "msg contact message") | bin/telegram-cli -W -k server.pub

More info here: https://github.com/vysheng/tg


'Whereis python' gives me a bunch of directories that does not exist

You can see some details about the paths when run python3 --help on the terminal.
Such as:
PYTHONSTARTUP: file executed on interactive startup (no default)
PYTHONPATH   : ':'-separated list of directories prefixed to the
               default module search path.  The result is sys.path.
PYTHONHOME   : alternate <prefix> directory (or <prefix>:<exec_prefix>).
               The default module search path uses <prefix>/lib/pythonX.X.
PYTHONPYCACHEPREFIX: root directory for bytecode cache (pyc) files.


Disable automatic network profile creation

From the comments...

There was no ethernet cabled plugged in, yet Network-Manager kept creating new Wired Connection profiles. It shouldn't have. Depending on your specific ethernet hardware characteristics, it may have thought a cable was connected, and repeatedly tried to make a connection.

We set the Wired Connection not to connect automatically, and deleted the other Wired Connect 2/3/4/etc profiles.


axel support is gone with apt-fast 1.8.1 because axel does not support following features:

multiple mirrors per file
continuation of partly downloaded files

But if you want to use axel anyway (and make sure you don't use the MIRRORS option - which is disabled as default) you can simply set up the following custom command:

 cat "${DLLIST}" | xargs -l1 axel -n "${_MAXNUM}" -a


After updating 12.04 login time has shooted up drastically?

You should first get some data, using bootchart ( http://www.freetechie.com/blog/visually-seeing-your-boot-speed-with-bootchart-ubuntu-10-04-lucid-lynx/ ). So you can see what is taking time.

Then, once you have a rough idea, you can either :
- disable service that are useless for you
- try to see what take time

I would recommend to check before removing anything, of course. Removing snmp is harmless removing something like dkms may let you without working X if you use nvidia driver.

Do not act in hurry :)


Files sizes differs from windows to linux

To expand on whatever you missed in the original answer... they ARE exactly the same size.  The sizes are being displayed using different metrics.  The units they are counting are different.  In the post you linked in a comment the person answering even mentions how you can get the "du" command in linux to display using the same metric as windows is using which is actually a Kibibyte, Mebibyte, or Gibibyte depending on what you are looking at.


Installing Ubuntu (Dual Boot) with MAC OS 10.9.2

You will need to partition your hard drive to dual boot your pc. This is an excellent tutorial on how to dual boot your computer.
http://www.everydaylinuxuser.com/2013/09/install-ubuntu-linux-alongside-windows.html
It should walk you through everything on how to correctly install whatever other operating system you are interested in installing. Hope it helps!
Matt


Delete all but newest file of format 08-20-2018_01:24-PM

First I would suggest to use date and time format that will be parsed more easy. For example:

$ date '+%Y-%m-%d_%H:%M'
2018-08-21_21:41

Then you can use something as the follow, to keep only the newest file  (reference):

#!/bin/bash
TARGET_DIR='./'
REGEX='[0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{2}:[0-9]{2}'   # regular expression that match to: date '+%Y-%m-%d_%H:%M'
LATEST_FILE="$(ls "$TARGET_DIR" | egrep "^${REGEX}$" | tail -1)"
find "$TARGET_DIR" ! -name "$LATEST_FILE" -type f -regextype egrep -regex ".*/${REGEX}$" -exec rm -f {} +

If you want to delete a number of files that are older than a period of time you could use something as this (source of the idea):

#!/bin/bash
TARGET_DIR='./'
MAX_AGE='3 days ago'
AGE="$(date '+%Y%m%d%H%M' --date="$MAX_AGE")"

for file in "$TARGET_DIR"/*
do
    CLR="$(echo $(basename "$file") | sed -e 's/-//g' -e 's/_//g' -e 's/://g')"

    if [[ -f $file ]] && [[ $AGE -ge $CLR ]] 2>/dev/null
    then
        rm -f "$file"
    fi
done

Another option is to use find and delete the files older than a period of time, based on their date of creation. For example the next command will delete all files older than 2 days:

find /path/ -mtime +2 -type f -delete

Ideas for complete backup scrips could be found at:

https://github.com/pa4080/simple-backup-solutions


A good example is that, by default the Apache web server runs as user and group www-data.

Your user ID is not www-data, nor is your default group ID.  You can't arbitrarily change your user ID and retain the integrity of your access, but you can add your username to a group and have access to files that are not normally available to a normal user.

You could add your user id to the www-data group with the command:

$ sudo adduser [username] [groupname]

After that command the user with the username will have access to files with the groupname.  By the way, you won't use the brackets.  The brackets in the example is to show you a variable that can be replaced.

Now you could create files on your web server that you could edit.  The server itself would be able to make updates to the files also

By the way you can remove a user from a group with:

$ sudo deluser [username] [groupname]

There are many other group access examples that you could find just by looking at the various groups that are available by default.  You can check the group list with:

$ less /etc/group

You'll probably notice that your username has access to a number of system features such as plugdev (the feature that give access to usb devices that you might attach to your computer).  You'll may also notice that you have access to the cdrom device (the cdrom group).

An important one is the sudo group, which allows you to use the elevated/super user commands.

An for using the www-data group access

I used www-data as an example.  By default the web files are owned by root.  They are not available to be edited by other users.  You can specify the files to a different group according to who you want to have access to be able to edit the files.  Then you can give access to those people (including the web server) access.

Since the web server  is running under the user and group ID, www-data, you could give the web server access to making changes to files by changing them to that user or group.  By default your web server can't make changes to any of the web files.

If you had a reason for your server to make changes to certain web files (or folders) that would be an occasion to change the files (or folders) to that specific user or group.

Creating a group

Thank in consideration that you might also have an occasion where you want to give specific access to particular files or folders to yourself and to other userID's.  You can create a group specific for that and add access to that group with the commands above.

A commandline for creating a group is:

$ sudo addgroup <groupname>

There might be an occasion where you might write a program to perform specific task.  You could create a user and group ID for that program.  Place the files and folders that the program will be accessing (reading and writing to) in that group with the command above.

The FTP daemon and protocol is an example.  If you wanted to allow people to upload files to your computer, you would create a specific directory and give write access via user or group to that directory so that the FTP daemon can write to it.

You wouldn't want the FTP daemon to be able to write anywhere on your system.  So you would specify by user or group access where the FTP daemon can read or write.

Note

Notice the $ in front of the terminal commands.  This is an indicator of the command prompt from a normal user's login session.  If the command was coming from the root login the default prompt is the # symbol.
When logged in as a normal user, yuo have to prefix your command with the sudo command to elevate the access to the super doer.  This isn't necessary it you're logged in as root.  Also it's easy to look at the text and see with commands needs to be elevated, such as adduser.  Notice teh /etc/group is (by default) world readable, so you don't need the elevated command (root access) to read the content.  You would need it to write to it.


Does order of precedence with ENV variable changes which program to use?

For me, this is logical: the $PATH is searched from the beginning to the end and the first matching executable will be run.

See the following Q&A's on the same topic:

Order of files to be executed in linux and how to change it
How to correctly add a path to PATH?
How does unix search for executable files?

So, first found, first used!


Only login page is not being displayed in required 1080p resolution(ubuntu 14 lts)

Try this

dconf reset -f /org/compiz/

then

setsid unity.

You need to type these commands in terminal(Ctrl+Alt+T) or Ctrl+Alt+F1.


Why is hostname resolution different with root/sudo?

This occurs if /etc/hosts is a symlink with target permissions and ownership -rw-r--r-- 1 root root. In order to include the file from another location, I use mount/bind now.

I'm not sure whether this is a bug...


Running tasks in remote server via SSH - life cycle?

When you kill your connection to your server, the task will end. I use Tmux for this kind of stuff.

You can install it in the normal manner.

sudo apt-get install tmux

The idea is you ssh into your server, then from with your shell start tmux and attached to a tmux virtual console. Start your stuff going from within the tmux virtual console, detach from it then kill your connection to the server.

The tmux virtual console will remain running, and so will all your stuff within that conole. You can connect to your server and attach to / detach from tmux consoles at will.

Tmux has a half decent man page, but here are a few keys to get you going.

tmux ls list running tmux sessions.

tmux attach -t 0 attach to 0.

ctrl-B c create a terminal.

crtl-B d detach a termianl.

ctrl-B " split terminal vertically.

ctrl-B % split terminal horizontally.

arrows navigate panes.

0-9 selects windows.

s switches sessions.

Hope that helps as a starter.


How can I force my machine to get an IP Address from my router?

Make sure all dhclient processes are killed:

sudo killall dhclient

See below for why I think this is needed on your system in the state it's in.
Leave the interfaces file alone for the moment.
Bring the interface down.

sudo ifdown eth0

Reconfigure the interfaces file to this:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

Bring the interface up again:

sudo ifup eth0

Done.

The networking "service" seems to be an outdated way to reconfigure the network. It's important not to change the order of doing the above when changing the configuration for an interface. One of the issues that can occur is that a dhclient process is started when bringing the interface with dhcp up, but when you change the configuration to static or something else, that process will not be taken down anymore, ever! The result is that your interface configuration is being managed by a split brain. So, please: ifdown, edit, ifup.


How can I install Laidout in Ubuntu 16.04?

How to install Laidout in Ubuntu 16.04 (Source)

If you are unaware of what the terminal is, please see this question first:
What is a terminal and how do I open and use it?

1. Install dependencies

Open up the terminal and type this command to install Laidout dependencies.

sudo apt install g++ pkg-config libpng-dev libgegl-dev libreadline-dev libx11-dev libxext-dev libxi-dev libxft-dev libcups2-dev libimlib2-dev libfontconfig-dev libfreetype6-dev libssl-dev xutils-dev libcairo2-dev libharfbuzz-dev libsqlite3-dev libgraphicsmagick++1-dev zlib1g-dev mesa-common-dev libglu1-mesa-dev libftgl-dev

2. Download and extract Laidout

Download Laidout from Github as a compressed file and save it in your desktop.
Using your terminal go to your desktop, extract it there and then enter into the Laidout folder. Run these commands one at a time.

cd ~/Desktop
tar xvfj laidout-0.097.tar.bz2
cd laidout-0.097/

3. Install Laidout

Make sure you are in the Laidout folder in the terminal and then run these commands one at a time:

./configure --prefix=/usr/local
sudo make
sudo make install

4. Open Laidout

If the above steps produce no error, we can now open Laidout by typing in the terminal:

laidout

This should open a Laidout window where you can create new documents or open existing ones. The screenshot below I have opened one of the example files, monkey.doc

5. Uninstall

If somehow you want to uninstall Laidout from your system, follow these steps.
Enter into your extracted Laidout folder in your desktop, then run this terminal command:

sudo make uninstall


How do I setup my Conexant USB modem type 0572:1340 in Ubuntu 18.04 to send and receive faxes?

I used 2 commands: sudo adduser <user name> dialout and sudo usermod -a -G dialout $USER. I can now send and receive faxes.


Choose whether to output audio from speakers or headphones?

To keep headphones plugged in, set auto-mute option in ALSA to off

preferable initial state is to have both speakers and headphones playing audio

Get exact names of ALSA control elements (Case sensitive) from alsamixer or use terminal command:

amixer -c 0

Create launcher buttons to toggle mute on or off on desktop,panel,dock etc

launcher command is

amixer -c 0 [name] toggle

replace [name] with correct name of ALSA element to mute/unmute


GTK 3 How to enter file location manually in open/save dialog permanently

Unfortunately, it may not be possible to display the path bar by default. Still, there is not always a need to press Ctrl+L first. As soon as you type / or ., the path bar will open and you can continue entering a path, helped by some autocompletion facility.
If you have an absolute path available in the clipboard, pasting that (pres Ctrl+V) will open the path bar and enter the path.


Found this option and it did what I wanted - It scaled everything down so its as if I increased the resolution but without the pixel loss.


Login as different user in Gnome if you are have root privileges

Become root

sudo -i

As root, sudo to the other user

su other_user

If you want to run X applications, take a look at xhost


How do I fix initramfs not finding root?

I followed this specific guide and the thing that fixed it for me was following these instructions:

Find out which of your partitions contains your system. You can do this by typing ls to see all of your drives, and then ls (hdX,gptX) to see the contents of one of the partitions.
Once you've determined the correct partition (mine was (hd3,gpt3)) the next thing is you need to make sure that your prefix is set correctly. You can do this by typing in set to display all of the set variables. The tutorial shows an example where the prefix was set incorrectly.
If your partition was not set correctly, set the correct partition with set prefix=(hd3,gpt3)/boot/grub. Use your partition details.
Afterwards, set root value with set root=(hd3,gpt3). Use your partition values.
insmod normal - Not sure what this does, but his tutorial says it loads a module.
The next part is to do linux /boot/vmlinuz-XXXXXXXXX root=/dev/sdd3 ro depending on whatever is on your machine.

⚠ The value that you should set to root varies, depending on which partition on your hard drive you installed your operating system on.
In my case, I cut up my hard drive into 5 parts, and I used parts 3, 4, and 5 for my Ubuntu machine. Part 3 had the operating system, Part 4 had my swap files, and Part 5 had my hard drive data. (If you were in the desktop session already, you can check this using lsblk to see how the files were partitioned and what sizes they were assigned).
I used sdd3 because the partition that held my OS is on the third partition of my drive sdd. This appears to be the missing part which caused me to get brought to initramfs with root not being specified.

Then do initrd /boot/initrd-XXXXXXX.
Finally, boot.

If there are other unix/linux/ubuntu specialists there who could give more clarity on what I may not have explained clearly, please feel free to edit this message.


I can't install gnome schedule on Ubuntu 16.04

gnome-schedule is indeed not in the official Ubuntu repositories for Ubuntu 16.04.

However, at https://bugs.launchpad.net/ubuntu/+source/gnome-schedule/+bug/1576060/comments/23, Kartik (kartik-arora95) has kindly compiled a .deb package for version 2.3.0 of Gnome Schedule that is reportedly working for Ubuntu 16.04. Download the .deb package provided at the aforementioned link and then install it using:

sudo dpkg -i gnome-schedule_2.3.0-0ubuntu16.04_amd64.deb


2 MAAS region controllers one database hot_standby read only errors

Here are the videos and content on how I solved my HA issues.

HA site