How to log access to a specific folder and changes in its contents?

I assume you need to know the (clock-) time the folder is opened in e.g. nautilus, not the time it takes to access the folder.

Using the window list

You can get the window list from the command wmctrl -l, and see if the folder's name occurs in the list. The loop to check would however take at least a split second to notice the folder is opened.

You'd have wmctrl to be installed:

sudo apt-get install wmctrl

In the example below, the script runs a command when a folder is accessed for the first time, and exits.

How to use:

Paste the script into an empty file
Save it as access_time.py
Change in the head section of the script "<command_to_run>" by your command (between quotes)
Run it either with the command:

python3 </path/to/script> <foldername_without_path>

or, if you made it executable:

</path/to/access_time.py> <foldername_without_path>

#!/usr/bin/env python3
import subprocess
import sys
#--- replace "<command_to_run>" with your command (between quotes):
command = "<command_to_run>"
#---
foldername = sys.argv[1]
while True:
    try:
        test = subprocess.check_output(["wmctrl", "-l"]).decode("utf-8")
    except subprocess.CalledProcessError:
        pass
    if foldername in test:
        subprocess.call(["/bin/bash", "-c", command])
        break

Edit

You can however make it work "all-in-one", so you do not need another script. The script below creates a file in your $HOME directory with the time your folder was accessed.:

#!/usr/bin/env python3
import subprocess
import sys
import os
import time
home = os.environ["HOME"]
foldername = sys.argv[1]

#--- the path your file is saved to (change if you want to, but use full paths)
path = home
#---

while True:
    try:
        test = subprocess.check_output(["wmctrl", "-l"]).decode("utf-8")
    except subprocess.CalledProcessError:
        pass
    if foldername in test:
        with open(path+"/time_data.txt", "a") as out:
            out.write("the folder "+foldername+" was opened "+time.ctime()+"\n")
        break

Use it just like the first option (but obviously you don't need to set the command)
Place a dot before the filename to make it a hidden file (press Ctrl+H to toggle visability):

If you want that, change:

with open(path+"/time_data.txt", "a") as out:

into:

with open(path+"/.time_data.txt", "a") as out:

(Mind the indent!)

Edit 2

From your comments, and the discussion in chat, I understand that you are actually looking for a tool to log access to a folder (e.g. by nautilus) and changes in the contents of it.
As an extra option, a comprehensive log script that records in two different threads:

All occasions the folder was accessed by e.g. nautilus, logged in a file access_log.txt
All occasions that the folder's window was closed, also logged in access_log.txt
All files that where either added to (recursively), or removed from the directory, logged into a file directory_log.txt

These events are logged in two different files, because the logs have different refresh times. Real-time "recording" of what happens to a large directory with a lot of subdirectories is not something you would want to be done every 5 seconds or so. The consequence is that:

the access log has (as I set it) an accuracy of 0.5 seconds
the directory log (adding/removing files) has an accuracy 10 minutes. Events will be reported within 10 minutes after taking place, with a time stamp accuracy of 10 minutes.

I tested it on a (network-) directory of ~800 GB. If your directory is much smaller, the directory log- cycle can be (much) smaller as well. I tested it for example on a 20 GB directory, with a (directory log) cycle of 10 seconds.

Example output access_log.txt:

---------------Thu Feb 19 21:01:09 2015---------------
folder opened

---------------Thu Feb 19 21:01:27 2015---------------
folder closed

Example output directory_log.txt:

---------------Thu Feb 19 21:14:24 2015---------------
+ /home/jacob/Afbeeldingen/Downloads/2023.pdf
- /home/jacob/Afbeeldingen/Downloads/History-journal
- /home/jacob/Afbeeldingen/Downloads/google-earth-stable_current_i386.deb

The script:

Set it up like the scripts above with an important difference:

instead of using the foldername as an argument, set the complete path+the foldername in the head of the script (see example in the script)

The command to run it then is:

python3 /path/to/script.py

#!/usr/bin/env python3
import subprocess
import os
import time
import difflib
from threading import Thread
home = os.environ["HOME"]

# The folder to watch:
folder = "/home/jacob/Afbeeldingen"
# the path your log files are saved to (change if you want to, but use full paths):
path = home
#---

for f in os.listdir(path):
    if f.startswith("dr_check_"):
        os.remove(path+"/"+f)

dr_data = path+"/directory_log.txt"
access_data = path+"/access_log.txt"

for f in [dr_data, access_data]:
    if not os.path.exists(f):
        subprocess.Popen(["touch", f])
foldername = folder.split("/")[-1]

def check_windowlist(foldername):
    while True:
        try:
            if foldername in subprocess.check_output(["wmctrl", "-l"]).decode("utf-8"):
                return "folder opened\n"
            else:
                return "folder closed\n"
            break
        except subprocess.CalledProcessError:
            pass

def check_directory(directory, outfile):
    with open(outfile, "wt") as out:
        for root, dirs, files in os.walk(directory):
            for f in files:
                out.write(root+"/"+f+"\n")

def run_accesscheck():
    while True:
        ch1 = check_windowlist(foldername)
        time.sleep(0.5)
        ch2 = check_windowlist(foldername)
        if ch1 != ch2:
            with open(access_data, "a") as out:
                out.write("-"*15+time.ctime()+"-"*15+"\n"+ch2+"\n")

def run_directorycheck():
    last = 1; outfile_name = "dr_check_"; last_outfile = ""
    while True:
        outfile = path+"/"+outfile_name+str(last)+".txt"
        check_directory(folder, outfile)
        if last != 1:
            changes = []
            diff = difflib.ndiff(
                open(last_outfile).readlines(),
                open(outfile).readlines()
                )
            for item in diff:
                if item.startswith("-") or item.startswith("+"):
                    changes.append(item)
            if len(changes) > 0:
                with open(dr_data, "a") as out:
                    out.write("-"*15+time.ctime()+"-"*15+"\n")
                    for it in sorted(changes):
                        out.write(it)
                    out.write("\n")
            os.remove(last_outfile)
        last_outfile = outfile; last = last+1
        time.sleep(600)

Thread(target = run_directorycheck).start()
Thread(target = run_accesscheck).start()


How to let an icon in the launcher wiggle?

Check out the Python example in the Unity developer documentation, and try hello-unity (only compatible with Ubuntu 12.04). These are good places to start.

Here's some bit of Python code that will make your app's icon wiggle in the launcher. It's for Ubuntu 12.04, but looking at the API documentation, it should also work for 11.10.

from gi.repository import Unity

self.launcher = Unity.LauncherEntry.get_for_desktop_id("myapp.desktop")
self.launcher.set_property("urgent", True)


Can the System Drive Be Spun Down After Certain Idle Time?

I did a bit of research, from what I can tell, there are not really any benefits. My system seems to be drawing only ~10 W anyway, most of it from the network card. Cycling the drive can actually wear it out more quickly. I suppose if you are running actual server hardware with a vast number of drives, then it is actually worthwhile.


I suggest you to use Audacity software. It is open source software and allows multiple track recording, stereo or mono, mixing, and editing the files with filters to add echo or filter noises...
I think you will not be dissapointed. It is very easy to use.

Hope this may help you.

Best regards,

Jose.


This is a permission related issue. Found excellent solution from Ubuntu forums. Just after logging into the desired user who you want to give the access enter the following command

sudo chown -R username:username /media/username/partitionname

This should works like charm.


ubuntu 12.04 pxe boot fail with message "IP-Config: no response after *** secs - give up"

I have spent a lot of time in this problem. So today I fixed it. Try to edit /etc/initramfs-tools/initramfs.conf and change:
DEVICE=
to
DEVICE=eth0

See ya.


5.1 Soundsystem - How to move LFE only to the Subwoofer?

There is an option for lfe-crossover-freq= in pulse-daemon.conf.
Here's what man pulse-daemon.conf says about it:
   lfe-crossover-freq=  The  crossover  frequency  (in Hz) for the LFE filter. Set it to 0 to
   disable the LFE filter. Defaults to 0.

Instead of altering the settings under /etc/, I'd recommend that you copy these files to your user's home folder. (If you've already changed them, copy from your backup of the original files):
cp /etc/pulse/daemon.conf ~/.config/pulse/daemon.conf
cp /etc/pulse/default.pa ~/.config/pulse/default.pa

Add the following line to ~/.config/pulse/default.pa:
load-module module-combine channels=6 channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe

Add (or uncomment) the following lines in ~/.config/pulse/daemon.conf:
remixing-produce-lfe = yes
remixing-consume-lfe = yes
lfe-crossover-freq = value

Replace value with the desired crossover frequency (in Hz).  Frequencies below this value will be sent to the LFE channel.
Restart pulse with pulseaudio -k.


Running Excel on Ubuntu: Solver & Macro crashes

Libre Office online help mentions the incompatibility with MS Office macros. (Using Microsoft Office and LibreOffice):

  With a few exceptions, Microsoft Office and LibreOffice cannot run the
  same macro code.

Nevertheless, they suggest some macros may still work:

  The most recent versions of LibreOffice can run some Excel Visual
  Basic scripts if you enable this feature at LibreOffice -
  PreferencesTools - Options - Load/Save - VBA Properties.

However, I suspect your macros are pretty complex.  This is one of the issues converting to Linux 100%-- the rest of the world still uses the MS Office suite, it does its job well, but is not fully open standards compliant.  I hate to suggest this, but have you considered installing Windows as a virtual machine (such as VirtualBox) inside Ubuntu just to use Excel?  VirtualBox is available in the Ubuntu Software Center, and you will need a licensed Windows CD and MS Office CD to install them in Virtual Box.


is it possible to proxy secure applications?

The simplest solution would be to use NAT at the network edge.  However, this is not a proxy solution.  A firewall could route some traffic via NAT, and route other traffic to a transparent proxy.

Proxy aware applications can as for a CONNECT which allow them to connect through the proxy.  The proxy will transfer data without looking inside.  Normally, it will log the connection endpoint.

The proxy can transparently accept the connection, and then proxy it much likely a non-transparent proxy. There can be issues with creating the connections.  It is not possible to handle all cases.  The proxy flows begin before the encryption has been negotiated, so there is no man-in-the-middle vulnerability.

The proxy can provide a key for the target site, and perform a man-in-the-middle attack.  If you trust the proxy, this may be acceptable for lower risk connections.  For connections to Banks and other connections requiring higher levels of security, the proxy can act transparently as described above.  This would be a relatively transparent proxy, but provides a ready made place for a man-in-the-middle attack.


SOLVED:

Restore to default workspace:

xrandr --output DVI-0 --primary --mode 1280x1024
xrandr --output HDMI-0 --off
xrandr --output HDMI-0 --mode 1600x900 --right-of DVI-0
xrandr --output HDMI-1-1 --off

Cinema mod:

xrandr --output DVI-0 --primary --mode 1280x1024
xrandr --output HDMI-0 --mode 1600x900 --right-of DVI-0 --scale-from 1920x1080 --output HDMI-1-1 --mode 1920x1080 --same-as HDMI-0


How to change input language in login to XRDP?

I'm not sure that is can solve your problem but we have found the info on http://c-nergy.be/blog/?p=5305

To set Keyboard layout at the xrdp Login screen, perform the following steps
As explained above, with no special configuration, the xrdp login screen keyboard layout is set to english by default.  if you need to change it to another keyboard layout, you should proceed with the following actions

This is the command you should issue in order to change the keyboard layout to be used during xrdp sessions…

Step 1 : You go to the /etc/xrdp directory

Step 2 : you issue the command setxkbmap -layout <%your layout%> to define which keyboard map/layout to use

Step 3 : create a copy of the km-0409.ini file into the same directory. It seems that this is the default file used by xrdp to define the keyboard layout. You will need to use sudo in order to be able to write into the directory

Step 4 : Check that you have a backup of your file by typing the dir or ls command

Step 5 : update the file by issuing the following command sudo xrdp-genkeymap km-0409.ini

give it a try and see if this works

See ya


Xen 4.3.0 does not boot. No files in /boot/xen/

use sudo checkinstall -y instead of sudo make install

see https://help.ubuntu.com/community/CheckInstall

the xen kernel will be installed in /boot unless you have overridden the default install locations


Using netstat, you can use the -p option to include program name/PID. Something like this should work.

netstat -a -p


Ubuntu 16.04.1 tells me my DNS server is 127.0.0.1

Put /etc/NetworkManager/NetworkManager.conf back to its original setting.

Don't edit /etc/resolv.conf.

Instead, go to the network icon in the top panel, and select Edit Connections. Assuming that you're using an ethernet connect to your computer, edit the script called Wired Connection. Select the IPV4 tab, change the 'Method' from 'Automatic (DHCP)' to 'Automatic (DHCP) Addresses Only' using the dropdown, and enter your desired DNS servers, comma-separated, into the box DNS Servers.

You can also enter the new DNS server information directly into your wifi router.

Cheers, Al


No sound from mic in conferencing software (skype, teams, telegram)

Tell your system, where you mic is. For this I use pavucontrol, which is a gui frontend for pulse audio. (sudo apt install pavucontrol).
First set the Port:

And check the configuration: (You might have different entries...)


Wrong keyboard layout in Remmina and Windows Server

I solved this issue enabling the following option at Remmina: Preferences / RDP / Use client keyboard mapping


HDD overheat on AC power, Ubuntu 20.04 installed on SSD

Generally speaking, when something inside a notebook shows higher temperatures when plugged into power, it's because heat cannot escape fast enough. Below is an image of a typical HP Pavilion x360:

There are a couple of things to note here:

the hard drive is immediately beside the battery
the hard drive is the farthest device from the air circulation mechanisms (the vents at the bottom of the case are under the motherboard near the primary exhaust fan, making them practically useless for the hard drive)
the case is plastic, which traps heat rather than transfers it
rechargeable batteries get hot when they're being charged

2.5" Western Digital spinning disks are generally rated to operate between 10˚C and 45˚C. Unfortunately, your question does not say what temperature is being reported but, so long as it is under this temperature, then you should be good. A 2.5" drive that is not spinning can tolerate temperatures that are a bit higher.
What I would recommend is that the notebook not be lying flat on a desk or on fabric while charging, as this will trap further heat, exacerbating the problem.


Installing TeXLive 2011 on Ubuntu 11.10

You will need a script from here

Open terminal, go to the directory where you downloaded the script and make it executable with
Code:

chmod +x install_update_texlive.sh
Execute the script with
Code:

./install_update_texlive.sh

A window will pop up. The choices there are self explanatory.

~3 GB of data will be downloaded
After a short while a window appear with different settings. Again, self explanatory. Choose your languages, packages. I chose to download all of it so there are no hiccups later. Click next.
All you have to do now is wait. For the impatient there is a progress bar.
Attached Files
File Type: sh  install_update_texlive.sh

source


"Prefix found" error while extracting RAR file with Archive Manager

This problem depends on missing "unrar" package.
To solve on "debian like" system:

sudo apt install unrar

or

sudo apt install unrar-free


Before uninstalling Ubuntu (along with GRUB), try using boot-repair. You can get it in 2 ways, on a live CD and on Ubuntu and probably some other Linux distros:

1st option:

get a CD including Boot-Repair here

boot the CD and choose recommended repair

2nd option:

open a new Terminal, then type:

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

Press Enter and then type:

sudo apt-get install -y boot-repair && (boot-repair &)

Press Enter

type boot-repair into Terminal and choose Recommended repair

Source

If that doesn't work out, get GParted Live CD and delete partition(s) on which Ubuntu is installed (look for ext4 and swap). You can then use that empty space to form new partitions or extend existing ones.


Citrix Receiver requires OpenMotif v2.3.1 or greater to use the Graphical User Interface.

The first step is to install OpenMotif 2.3.1.  You can download OpenMotif from Launchpad.  Once downloaded and installed, download Citrix Receiver. deb file.

Once downloaded, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, navigate to the folder where the file was downloaded (probably the Downloads folder), and run the command(s) below:

sudo dpkg -i <file_name>.deb

For more info visit Citrix

Edit

If you get the eeror below installing the 64bit

dpkg: error processing icaclient (--install): subprocess installed post-installation script returned error exit status 2 Errors were encountered while processing: icaclient

Try this:

Install the .deb and let it fail
Edit /var/lib/dpkg/info/icaclient.postinst
Replace the line that says echo $Arch|grep "i[0-9]86&quot; >/dev/null with *echo $Arch|grep -E "i[0-9]86|x86_64" >/dev/null (note the -E after grep!)
Run sudo dpkg --configure icaclient

Source for Edit:Citrix Forums


What is the difference between a sudo and a root user?

root - is a user (with no restrictions)

sudo - just command which give you rights to run another command with root user privileges. sudo must be run every time before the command, which you want to execute as root user.


How to enable GRUB menu on Ubuntu 12.04 server?

Here's the relevant portion of your pastebin'd /etc/default/grub:

Please comment out these lines in /etc/default/grub by adding a # in front:

GRUB_HIDDEN_TIMEOUT=10
GRUB_HIDDEN_TIMEOUT_QUIET=false

Save, and then run sudo update-grub
The menu should now appear on every run, with a 10 second timeout for the default entry (0); we just "un-hid" the menu during the timeout countdown.


I do a grub-install and let it discover the locations on it's own. More info here: http://www.gnu.org/software/grub/manual/html_node/Installing-GRUB-using-grub_002dinstall.html

but harisibrahimkv has a good way too. More than one way to skin a cat.


Suppress Cyrus SASL log messages in Apache log file

This is a known bug in Cyrus SASL, reported in the mail thread upstream.

It is already fixed in the upstream fork in github, nut it probably didn't made it to the Debian package.

With the above patches, the caller of the cyrus-sasl library (appache) should be able to filter the non-relevant log messages using callback log functions as described in the first mail thread.


Try these steps:

Boot into LiveCD:
Do the following to be able to make changes:

a. Press Ctrl+Alt+F1

b. sudo mount /dev/sda1 /mnt

c. sudo mount --bind /dev /mnt/dev

d. sudo mount --bind /proc /mnt/proc

e. sudo mount --bind /sys /mnt/sys

f. sudo chroot /mnt
Then re-enable the bluetooth with:

rfkill unblock bluetooth

Restart it with:

sudo systemctl restart bluetooth

Note:

I assumed your root filesystem is on /dev/sda1 yours might be elsewhere find with command sudo fdisk -l

UPDATE

Based on your update try these steps to fix Xserver:

Run sudo dpkg-reconfigure xserver-xorg or sudo X -configure

Source:

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

How to reset the Xorg / xserver?


14.04 Graphics/Windowing Problem - icons and window text disappear!

I had a very similar problem with disappearing text, especially in synaptic. In my case the problem disappeared (and the text reappeared) after switching "Subpixel-Geometry" to be found in the font menu of Appearance from whatever it was before to "none". Unfortunately, I dont know any explanation for that, because I just found it by trial-and-error.


Install (or reinstall) the Ubuntu 'light-themes' package.  From a terminal prompt, issue the following command:

sudo apt-get install light-themes

That should put you back in business.


Add more disk space for linux from windows in a dual bootable machine

The way to solve this problem really depends on how much you care about your windows partition.
Option 1 - you don't really care about your windows partition:

Shut down your PC with the DVD drive open

Put the Ubuntu live DVD in and boot from the DVD

When your trial Ubuntu boots up start the program called "gparted"

Use gparted to increase your Ubuntu partition. The software is pretty easy to figure out. Right click on the partition of interest and select "resize/move". Make sure you are cognizant of where the partition has data (data is yellow and "assumed" empty is white) and avoid shrinking any partition where there is no white space left!

If at this point your Windows becomes broken, you can always use your Windows install cd/dvd to repair the Windows O/S (on your Windows partition).

NOTE: you may run Gparted from your Ubuntu partition, but then it may give you a hard time because you are trying to do work on a live partition (you have to unmount, the drive you are using, etc...). So you might get away without using a live CD, but why mess around when a live CD is the better way to go? (opinion only)
Option 2 - you really care about your Windows partition:

I don't use Windows 10, but in Windows 7 there is a way to shrink the size of your partition. Right-click "my computer", then select "manage" and from there you go to the "Storage" and open "Disk Management". There you will want to reduce the size of your windows drive. this is important to make sure you create empty HDD space for your Ubuntu to grow onto.

follow the steps outlined in the section above.

NOTE: The Windows work you do may create space on the other side of the hard disk. In that case you will need to use gparted to move the partition, or grow it in the other direction and then shrink it back to the original size.
NOTE: before you do anything back up your data!!! You will grow your Ubuntu partition and that will be easy. If your windows breaks, use the Windows install DVD to fix it - easy. BUT if you overwrite your data that is held by Windows... you will never get it back.
More info can't hurt. Here's another guy with a very similar issue: Give more Hard disk space to Ubuntu


Use Intel built-in graphics for monitors while still running NVidia drivers for GPUs

This question duplicates several much older questions.  Just posting so anybody looking at this can more easily refer back to the old answers.  In short, it's doable but somewhat complicated:

2018: Intel for display, NVIDIA for computing
2018: How to configure iGPU for xserver and nvidia GPU for CUDA work
2018: Use integrated graphics for display and NVIDIA GPU for CUDA on Ubuntu 14.04
2017: How to run both Intel and Nvidia graphics card driver on dual monitor setup?
2016: How to configure igpu for xserver and nvidia gpu for cuda?


no display when remote Ubuntu 14.04 from windows

This fixed the issues for me. Found it further below in askubuntu.

http://c-nergy.be/blog/?p=5305


While I don't believe this is a question with a viable answer, here goes nothing:

Some drives in my experience have failed because they were bad out of the box, others because of age. I usually recommend WD for disc drives because I haven't had many issues. If you were to ask for help installing Ubuntu can gave the errors you were having maybe someone could better assist.

That said, I have only ever seen the Tux-Approved logo ONCE and that was on a Toshiba drive in 2008. Once again I believe this question would be better placed in Meta AskUbuntu


iptables -A FORWARD -p tcp -d 10.1.8.1 --dport 1008 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 1008 -j DNAT --to-destination 10.1.8.1:1008

I was able to do it with iptables.


How to change mouse pointer size and appearance in GNOME (18.04)?

One immediate way is to use dconf to set cursor size at the command line:

dconf write /org/gnome/desktop/interface/cursor-size 25

A better way is usually to install and use the dconf-editor

sudo apt-get install dconf-tools

dconf-editor   # brings up ui tool

Navigate to: org/gnome/desktop/interface/cursor-size

You will then be able to change the cursor size, e.g.

To change the type of cursor, for example this red pointer

Use Ubuntu's tweak tool:


Make a preview render for a piece of the video in Kdenlive

You could just press Render (or Ctrl+Enter) anyway - removing the 2 pass option, and reducing the video and audio bitrate should make it a bit quicker:

Selecting 'play after render' may help as well, it will open the finished video in the video player set for that format in KDE's System Settings (e.g. MPlayer)

There sadly does not seem to be anything under 'Settings' > 'Configure Shortcuts' that could be used to set a shortcut to export a preview.

Edit: this might solve your problem:


Why doesn't my Dell XPS wifi (iwlwifi) work with kernel 4.15.0-64?

This may be a kernel bug. The easiest way is to upgrade to a HWE kernel.

Run in a terminal

sudo apt install linix-generic-hwe-18.04

and reboot.


How to Install debian package within ubuntu installation?

Just double click and the deb package and click install. Ubuntu uses the same package format and system. (In fact, Ubuntu is based off Debian. It just has some of it's own changes added). The difference is that some of the packages are slightly modified. Also, Ubuntu has their own repository servers to serve the modified versions of the packages.

So, the packages like OpenOffice would be installed after being downloaded from Ubuntu's package repository servers. They would be installed using the same methods Debian's package management system uses to install Debian's packages.


If you're root account is not disabled, you should be able to become root:

su -

After that you should be able to change the ownership of /usr again.

If that doesn't work (because you did not enable a root account + password), you can boot from a live cd (a usb stick or CD you might still have lying around from your ubuntu installation will work).

Boot it, and mount your current hard drive (maybe at /media/raring-root-disk). Then change the ownership of that mounted partition:

chown -R root:root /media/raring-root-disk/usr
chmod -R a+rX /media/raring-root-disk/usr

Note: I didn't test this, so the live-CD approach (though favoured by me) might not work. However, I can not see how it can harm your situation. Make sure you have backups since you might need them anyway if you find you'll be re-installing this all...


Setting microphone input volume using the command line?

If you are using ALSA, amixer can be helpful for your script programming.

When dropping the amixer --help command in a terminal you will see something like this:

Depending on your soundcard, levels may be different than mine, but you can use alsamixer in the terminal in order to check which levels and which features in your sound card you can call in a command to set the volume as you wish.

In my example, with my principal sound card (I have 2: the embedded and a PCI audio card), levels are from 0 to 100, this way I can change the volume of a desired input/output in my soundcard by dropping in a terminal the next command:

amixer -c 0 set Front 50DB
amixer -c 0 set Front 64DB

In the first command, the result will set the Front panel output to 78% level and the second one will set the Front panel output to 100% level.

In order to gather information related to your mixer controls, drop the amixer command with no parameters and you will get a list. Or indicate which audio device you wish to see a list of controls with amixer -c X (where "X" is the number of your audio device).

BTW: Remember that DB values are calculated logarithmically and not linearly.


Matlab 2013a installation error on Ubuntu 14.04 LTS

I got the exact same problem. The quick fix is to deselect "Simulink 3D Animation Toolbox" during intallation provided that you don't need it.
From: Matlab install error: Simulink 3D Animation Toolbox


List files appended with an order number

From the terminal use the following command:

ls -a | cat -b


Uninstall OpenCV - Ubuntu keeps asking for permission

Quick solution

Remove the -i flag from the rm command invoked from find -exec.

Elegant solution

Don't use -exec rm at all but the -delete action of find instead.

Advice for both cases…

You should probably run find without a destructive action like -exec rm or -delete first to verify that it won't delete precious files.

What you really want…

is to uninstall a botched OpenCV installation. The deinstallation procedure depends on how it was installed in the first place. Please open a new question for that and line out how OpenCV was installed.


Getting a new hard drive - Running Linux/Windows in a Virtual Machine

Actually, neither is better.

Either way you twist it, running in a virtual machine gives a serious performance and feature penalty for either OS, and for the native OS it also steals resources. Your best bet is to dual boot, and only when you have to, run either one in a virtual machine on the other.


To make the desired font the default for rendering Phoenician characters, this is a way:

Open a terminal window with Ctrl+Alt+T
Create the directory ~/.config/fontconfig/conf.d:

mkdir -p ~/.config/fontconfig/conf.d

Open the Text Editor:

kate ~/.config/fontconfig/conf.d/10-prefer-phoenician.conf

and copy the below contents and paste it into the Text Editor:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
        <alias>
                <family>sans-serif</family>
                <prefer>
                        <family>Noto Sans Phoenician</family>
                </prefer>
        </alias>
</fontconfig>

Save the file.

That should make your system prefer Noto Sans Phoenician over other fonts you have installed which claim to be able to render Phoenician.


How can I show the week numbers in the calendar shown at the top in GNOME Shell?

If you have dconf Editor, launch it and navigate to /org/gnome/desktop/calendar/show-weekdate. Then disable Use default value and set Custom value to True.

Alternatively just open Terminal and run

gsettings set org.gnome.desktop.calendar show-weekdate true


Unable to fetch file(openfoam240) from sourceforge

I think I found a solution:

there is a mirror which contains the Deb Files for this version of OpenFoam (2.4.0)
Here is the link:

University of Kent Mirror Service


Going from Windows XP to Ubuntu 12.04/13.04

Yes all external hard drives can be used as normal. Just click on them in Ubuntu to mount them. Ubuntu can read/write to NTFS and you can just use your files as normal.
You need to check the WineDB for what programs are supported. Also checks versions and what functions aren't supported, everything doesn't work with wine.
Yes the dual boot system does not affect anything outside of Ubuntu. Everything can still be used. I would try Ubuntu (or what flavour you want) on a Live-USB/CD to see that you like it before you install. Since your computer is now running XP (which is quite old) you might have to look at lighter versions of Ubuntu like, Xubuntu or Lubuntu. It depends on how much RAM you have since Ubuntu(12.04/13.04) is using more RAM than Windows XP.

I've listed some usefull questions on this topic below.

How do I install Ubuntu?
How can I dual boot Windows and Ubuntu?
How do I find out which version and derivative of Ubuntu is right for my hardware in terms of minimal system requirements?


Force ubuntu to access internet through proxy

Instead of doing an export, put this in file /etc/environment:

http_proxy="http://proxy.example.com:8080"
https_proxy="http://proxy.example.com:8080"
ftp_proxy="http://proxy.example.com:8080"
no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
HTTP_PROXY="http://proxy.example.com:8080"
HTTPS_PROXY="http://proxy.example.com:8080"
FTP_PROXY="http://proxy.example.com:8080"
NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"

and reboot your server/vm.


I think your question should be more appropriate in StackOverFlow but to answer shortly:

you could achieve that using network to communicate the output of a program to another one or you can use a shared folder that you output the result of one program and the other one grab that output, assuming you're running applications in a virtual machine for each one.

Another way is to run Flower on Windows also since it says it is compatible to run on Windows according to that site: http://sourceforge.net/projects/openflower/


Problem with VPN and MTU size in UBUNTU 18.10

To properly determine the correct MTU setting for your LTE modem (Wireless)...

There's a MTU setting in Ubuntu's network configuration, and a WAN MTU setting in your router.

For DSL, a common MTU setting is 1492. Just go ahead and try this value first and see if your web sites are now accessible.

To determine the correct setting, start with all MTU settings = 1500 and VPN = off. (VPN requires different testing).

In terminal:

ping [-c count] [-M do] [-s packet_size] [host]

The options used are:

c count: number of times to ping
M hint: Select Path MTU Discovery strategy.  may be either do (prohibit fragmentation, even local one), want (do PMTU discovery, fragment locally when packet size is large), or dont (do not set DF flag).
s packet_size: Specifies the number of data bytes to be sent.

You should always start at 1472 and work your way down by 10 each time. Once you get a reply, go up by 1 until you get a fragmented packet. Take that value (last good value) and add 28 to the value to account for the various TCP/IP headers. Eg. let's say that 1452 was the proper packet size (where you first got an ICMP reply to your ping). The actual MTU size would be 1480, which is the optimum for the network we're working with.

ping -c 4 -M do -s 1472 8.8.8.8 # this will probably show fragmentation

ping -c 4 -M do -s 1462 8.8.8.8 # may show fragmentation

ping -c 4 -M do -s 1452 8.8.8.8 # no fragmentation?

ping -c 4 -M do -s 1453 8.8.8.8 # still no fragmentation?

reference: How to determine the proper MTU size with ICMP pings


If you use Anaconda, your python3-dev equivalent is already installed in $CONDA_PREFIX/lib/pythonX.Y where X.Y is the python version (example, 3.6).


WiFi keeps dropping out but still shows as connected

You can install a better driver for that chip. Run these commands.

sudo apt-get install git
git clone https://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
make
sudo make install

And reboot.


Update nvidia drivers with xorg-edgers ppa

Try this procedure:

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-337

The package name was wrong.


Terminator Split Screen with uneven split

On layouts settings click on the "Type" -> "Window" -> "Terminal" and chose the profile you want to link with this layout.

You can also use:

terminator --layout customname

to run terminator with specific layout.

or

terminator -s

to get the selection box so you can select specific layout.

With these command you may also add an keyboard shortcut in Ubuntu keyboard settings.


Your notes are not deleted, Ubuntu One has removed notes web view.

For more on this, take a look at the Official Ubuntu One Blog post on the topic.


Missing file /usr/share/proj/epsg on Ubuntu 20.04

The package structure seems to be changed upstream. You can compare package contents with table below:

Ubuntu version
proj-data package version
File list

18.04 LTS
4.9.3-2
https://packages.ubuntu.com/bionic/all/proj-data/filelist

20.04 LTS
6.3.1-1
https://packages.ubuntu.com/focal/all/proj-data/filelist

The epsg file may be obtained from 18.04 LTS package or from https://salsa.debian.org/debian-gis-team/proj/-/blob/debian/5.0.0-4/nad/epsg . To get official details - check the https://proj.org.


After booting, GRUB loader appears but no login screen. just a blank screen stays. Tried almost all methods of ubuntu desktop repair

Has the system worked in the past or is it a new installation?
You may try to see if the base system starts by hitting ctrl-alt-F1. This will give you a text login. Login as user, use sudo su to change to root and then the command dmesg will dump the most recent startup log. Look if something looks bad.


Ripped mp3 files show wrong track lengths

Starting around Ubuntu 12.04, when you rip CDs in Ubuntu using Rhythmbox or Sound Juicer the default settings will create VBR MP3s, but the VBR headers don't get added, so just about any program you open the MP3s with will show the incorrect track length, including the default music player (Rhythmbox) and the default file manager (Nautilus).

The easiest solution is to add the VBR header to the MP3s after ripping them:

Install vbrfix by running this command in a terminal:

sudo apt-get install vbrfix

Now CD to the folder where the mp3s are that you need to fix:

cd /path/to/mp3s

Run this command to add the VBR headers to the mp3s:

find . -type f -iname '*.mp3' -exec vbrfix {} {} \;

Vbrfix seems to leave behind a couple of temporary files, so clean them up:

rm vbrfix.log vbrfix.tmp

An alternative solution is to change the default preset so that the CDs are ripped as CBR instead of VBR MP3s. There's a pretty good explanation here: https://askubuntu.com/a/154933/18665

A profile like this ought to do the trick (change the bit rate as desired):

[mp3-cbr]
name=lamemp3enc
target=bitrate
bitrate=192
cbr=true
encoding-engine-quality=high
mono=false

As with any bug, if you're experiencing this problem I'd highly recommend you go to the bug report and mark that it affects you (near the top left), so that it gets more attention. The bug report is here: Rhythmbox does not add VBR headers when ripping CDs to MP3


Bluetooth AR3012 0489:e076 doesn't find the devices

This adapter 0489:e076 is not supported by linux kernel yet.
It is AR3012.

In case you have a similar problem, when some hardware is not supported, just report it to launchpad.

When you report issues correctly, you help all people who use same device.

Bug reported is created by running

ubuntu-bug linux

Then create a launchpad account, if you do not have one and follow instructions in browser. Apport will collect necessary information about your system and will add it to the report.

Unfortunately it does not add important information about usb devices.
So I recommend to add also output of usb-devices command if the report relates to usb.

This specific issue has been reported to launchpad and I made a fix.

The patch will reach stable Ubuntu kernels in a month or two.

In the meantime you can install a fixed driver from launchpad

You will also have to upgrade linux-firmware package to get new Atheros firmware. I also added it to launchpad.

So you need to download and install these two deb files, then turn off computer and on.

Bluetooth will work.

Thanks Igor Bagayev for testing!

The temproray solution will work only for this specific device. If you have another code in lsusb create your own bug report.


problem with aisleriot solitare since upgrading to 12.04

Have you tried uninstalling and re-installing? If you don't have any saved games/statistics you need, try:

sudo apt-get remove --purge aisleriot
sudo apt-get install aisleriot

The above command will attempt to remove all config files associated with the game, which may be causing the issues. If you have saved games/statistics you want to keep, try:

sudo apt-get remove aisleriot
sudo apt-get install aisleriot

If that doesn't work, please provide a screenshot of the issue.


In hope of getting interesting log messages:

Turn of network,
wait 2 seconds,
turn on network.

This should be situation where you don't have IP (check it please).

Post relevant sections of dmesg and /var/log/syslog.

Get ip with sudo dhclient -4 eth0.

Post updates to dmesg and syslog.


Planning to purchase a new computer with Ubuntu-supported hardwares

try to see here:

http://linuxhardware.net/linuxhardware/notes/

http://hardware4linux.info/

https://wiki.ubuntu.com/HardwareSupport

http://www.ubuntu.com/certification/


You can make a script which calls other scripts in an organized way, like following,
This is your cron file,

30 6,14 * * 1-5/home/user/scripts/A-B-C.sh

Then the script A-B-C.sh is defined as,

#!/bin/bash
# Run script A,B,C

# execute script A
./home/user/scripts/A.sh

#execute script B
./home/user/scripts/B.sh

enter code here
#execute script C
./home/user/scripts/C.sh

If you want to \ do not want to run script B.sh and C.sh in cases where script A.sh has some error, then you can include error tracking using variables, whose value you can keep as 0 or 1. Then in case the previous script does not finish as expected you can take necessary decision about what to do with the next script.
An example is the following,

#!/bin/bash
# Run script A,B,C

# Exit code and default run code initialization
exit_A=0
exit_B=0

def_B=1
def_C=1
#----------------------------------------------

# execute script A
. ./home/user/scripts/A.sh $exit_A #make sure to change the value of exit_A to 1 if A finishes as expected.

if [$exit_A==1] && [def_B==1] #only if A finishes without error and B is ok
then
#execute script B
. ./home/user/scripts/B.sh $exit_B
else
<do something like log>
fi

if [$exit_B==1] && [def_C==1] #only if B finishes without error and C is ok
then
#execute script C
. ./home/user/scripts/C.sh $exit_C
else
<do something like log>
fi

now="$(date +'%d/%m/%Y-%T')"
#make a log in a file (print can be used for better formatting)
echo -e $now,$exit_A,$exit_B,$exit_C >>  /home/user/log/script_log.txt

In the above script, variables are being passed across scripts. Use with caution and test before using the code.


Maybe this can help you, http://www.atareao.es/ubuntu/sincronizacion-de-notas-en-la-nube/

Basically, the trick is to set a symbolic-link from the folder where the notes are saved to a synchronized folder (in the example it's Dropbox, but I'm doing it with Seafile, that is Free Software under AGPL, and it works perfect, http://seafile.com/en/home/ ).

The page linked is in spanish, if you need some translation, let me know :)

Best regards!


Setting an admin user via the GUI - command line equivalent?

For Ubuntu prior to 12.04 assuming the user already exists

sudo  adduser username admin

For 12.04 and later

sudo  adduser username sudo

Replace username with the name of the user.

If you check the sudoers file sudo cat /etc/sudoers you will see this (from 12.04) or similar

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults    env_reset
Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

The line %sudo ALL=(ALL:ALL) ALL says members of the sudo group have administration privileges.  The commands at the beginning of this answer add the user to the sudo or admin group as appropriate for the version of Ubuntu you are using.  There is more information here:

RootSudo - Community Ubuntu Documentation.


When piping output to a file, why are stderr and stdout in the wrong order?

STDERR is automatically flushed after printing a line, STDOUT is not. The STDOUT buffer is flushed only if it's full. To force autoflushing also on STDOUT use

STDOUT->autoflush(1);

(If you have an older perl, then the above may not work, instead you have to use something like $| = 1;)


How do I create a Multiboot USB that is compatible with both BIOS and UEFI?

MultiBoot USB Stick from Scratch

(Modification of How do I boot an ISO file from my drive using grub2 on UEFI machines?)

GParted

Create a gpt partition table on a USB stick.
Create partitions as shown above, select unformatted for partition 2.
Create a casper-rw file:

sudo dd if=/dev/zero of=casper-rw bs=1M count=512

sudo mkfs.ext3 -L casper-rw -F casper-rw

(where count=512 is the persistence size in megabytes, with a max of 4GB).

Persistence Partition

Create an uniquely name folder for each OS, (that requires persistence), on the USB-PRST partition.
Add a casper-rw file, (and optional home-rw file), to each persistence folder. A home-rw file can be made by renaming a casper-rw file. A home-rw file is like a separate home partition on a Full install, it can be reused after version upgrades.

Data Partition

Create a folder for the ISO files on the NTFS USB-DATA partition.
Add some ISO's to the isos folder.

Boot Partition

Open the latest ISO file and copy the boot and the EFI folders to the USB-BOOT partition. Add rmmod tpm to grub.cfg above the first menuentry
Install grub

sudo mount /dev/sdx3 /mnt

sudo grub-install --boot-directory=/mnt/boot /dev/sdx

Edit grub.cfg to loopmount the ISO files. Include: persistent persistent-path=/<persistent-folder-name>/ if you want multiple persistence.

if loadfont /boot/grub/font.pf2 ; then
    set gfxmode=auto
    insmod efi_gop
    insmod efi_uga
    insmod gfxterm
    terminal_output gfxterm
    rmmod tpm
fi

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray

set timeout=5

menuentry "ubuntu-19.10-desktop-amd64.iso" {
    set root=(hd0,1)
    set isofile="/isos/ubuntu-19.10-desktop-amd64.iso"
        loopback loop $isofile
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile persistent persistent-path=/persist-1/ splash --
        initrd (loop)/casper/initrd
}
menuentry "lubuntu-16.04.3-desktop-amd64.iso" {
    set root=(hd0,1)
    set isofile="/isos/lubuntu-16.04.3-desktop-amd64.iso"
        loopback loop $isofile
        linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile persistent persistent-path=/persist-2/ splash --
        initrd (loop)/casper/initrd.lz
}

Grub.cfg example

sudo parted -ls  /dev/sdx

sudo lsblk -f  /dev/sdx

If the above is used as a USB stick it can be used to boot ISO's stored on a Windows only computer. Grub is not required on the internal drive.


How can I resize an ext root partition in Ubuntu 16.04 with GParted?

In order to change the root file system you will need to boot from live media, such as GParted Live so that the root file system is not in use.  Then you might consider move/shrinking the home partition (sda4) by dragging the left edge of the partition to the right.  Then in the unallocated space you could grow the root partition (sda3) by dragging the right edge to the right into the recently freed up unallocated space.

WARNING:  Be sure to have a backup of your data in case anything goes wrong due to power outages, hardware failure, or software bugs.

For an example see Moving Space Between Partitions.


How can I get a Windows game to run in windowed mode in Wine (when even explorer /desktop=[resolution] doesn't work)?

first install Play on Linux

There is a similar question that may help you
How to start a PlayOnLinux game windowed

If you have any further problems see

follow this guide
and also this one


Stucked to Black Screen After installing Ubuntu 20.04 , an underscore is blinking for a long term

I've fix this just few minutes ago. It was due to Nvidia driver.
After going into recovery mode and opened the root terminal.
sudo apt-get remove --purge nvidia*
and then
sudo reboot
for rebooting the ubuntu.
It rebooted with the Xorg graphics.


Boot failure: failed: command IDENTIFY PACKET DEVICE

I just built a new computer and bumped into the same issue - and found an answer to it.

Most people seem to have symptoms of slow boot-up times, but I could not boot 90% of the times. When the system did boot, it seemed to work. If you do manage to boot, you should be able to trigger the problem with command: /lib/udev/ata_id --export /dev/sr0. Beware, if that truly is the problem, your system will freeze.

The command will send an ATAPI command to the optical drive. The problem is, the SATA controller (ASM1061 in your case) does not support these ATAPI commands, resulting in a frozen system.

There are two solutions to the issue:

Copy the file /lib/udev/rules.d/60-persistent-storage.rules to /etc/udev/rules.d/60-persistent-storage.rules so that edits are not overwritten from updates.
Remove the warning message at the top about not editing the file.
Find the line containing word "ATAPI".
Comment out the next line.
This way, udev will not touch ATAPI.
Save and run the command update-initramfs -u to finalize the changes.
Change the SATA port for the optical drive. I used this method, as booting any Linux other than one with the modified udev rule results in freeze otherwise.

In my case, the motherboard is ASRock Z77 Extreme4 with the same ASMedia ASM1061 chip for two SATA3 ports. I had a DVD drive in one of them and got the error. Switched the DVD drive to a SATA port handled by the Z77 chip and everything works.


Sudo command is not asking password from stdin. And Failing

The man sudo is saying (Source)

-S, --stdin Write the prompt to the standard error and read the password from the standard input instead of using the terminal device. The password must be followed by a newline character.

and you need to specify the user that this password is used for
The correct command is
PASSWORD="abc\n" #The \n is for newline character
echo $PASSWORD | sudo -S -u <username> <command


How to install .exe file on Ubuntu without using Wine?

There is a Linux version of MATLAB. Installing it is fairly simple.

What you have (the .exe) is an installer for the Windows version. Even if you could run it without Wine, its contents are for Windows, not Ubuntu. It's not going to work.

With Wine, it should be possible to get this working, but it's very likely going to be slower than a native install. If you're doing big things, that's going to be a real disadvantage.

I'd focus on getting hold of the right version. For MATLAB it appears the same license to any platform so if you have one, it should be possible (I'm not sure how feasible this will be in practise) to get hold of the right installer. Talk to MathWorks or your supplier and see if they can help.


Yes, correct full server hostname or FQDN suppost to be something like server.domain.com

Ff your server's hostname is server, its FQDN is server.domain.com,
then to you have to make sure host -t mx domain.com returns server.domain.com as MX record for domain.com


How do I lock the desktop screen via command line?

You can lock the computer by running gnome-screensaver-command with the -l flag like so:

gnome-screensaver-command -l

However this will only work if you have Gnome Screensaver running for your session (should be - unless you've disabled it) you can start that from the commandline with:

gnome-screensaver


I agree with other comments that this looks like a hardware fault.

Given that you can sometimes power in for 2 seconds before it may be time to breakout the manual for the mother board of PC/Laptop.

If you get the model name and number of your motherboard you can try to get support from the manufacturer and/or research on Google to see if other customers have had similar issues.

Best of luck with it!


It's not Ubuntu specific question.
You can read mod Minecraft on the page where you downloaded that mod. Usually you just open minecraft.jar as zip archive and put downloaded .class files there.

I recommend that you try out MagicLauncher.  This allows you to install and enable/disable Minecraft mods really easily.

Once you run it click on Setup. You will be presented with this dialog:

Then to add a mod click Add and select the zip of the mod you want to install. Really simple!


gnome-power-manager is necessary to spin down hard disks?

Yes, you do need software like gnome-power-manager to spin down hard disks. Modern hard drives sometimes have features like SMART, but this only collects information. Psusi mentions another great utility, hdparm, that plays with power settings (among many other things). Hdparm is more powerful and more advanced, gnome-power-manager is likely easier. More than one way to skin a cat.


Safari favorites export to Firefox:
In Safari, open the File menu and choose Export Bookmarks. Save bookmarks.html somewhere handy.
In Firefox, open the Bookmarks menu and choose Show All Bookmarks.
In the Library window, click the Import and Backup button and choose Import Bookmarks from HTML. Pick the bookmarks.html file you exported earlier.


How do I use netplan to configure PPPoE?

I've configured my PPPoE router running Ubuntu using netplan for the regular Ethernet interface and directly using systemd for the PPPoE interface.

For the PPP part, I left the PPPoE interface out of netplan entirely and created a /etc/systemd/system/ppp.service file as follows. ens7 is my interface that is connected to my PPPoE modem, which you'll need to change (every occurence) to your case. I'm also using baby jumbo frames by setting my MTU to 1508. If your NIC or ISP can't handle this, then you should remove that line:

[Unit]
BindsTo=sys-subsystem-net-devices-ens7.device
After=sys-subsystem-net-devices-ens7.device

[Service]
ExecStartPre=/sbin/ip link set mtu 1508 dev ens7
ExecStartPre=/sbin/ip link set up dev ens7
ExecStart=/usr/sbin/pppd call provider
Type=forking
SuccessExitStatus=5
PIDFile=/run/ppp-pppoe.pid

[Install]
WantedBy=sys-subsystem-net-devices-ens7.device

My /etc/ppp/peers/provider looks like this. Again, ens7 is my PPPoE interface; you'll need to change it to your own one below, along with my_username_with_my_isp. If your hardware (or ISP) can't handle baby jumbo frames and you deleted the mtu line above, then also change mtu and mru below to 1492. I'm also enabling ipv6 here. Add usepeerdns if you want your ISP's provided DNS servers to be used (instead of having them statically configured).

user my_username_with_my_isp
plugin rp-pppoe.so
ens7
noipdefault
defaultroute
hide-password
lcp-echo-interval 20
lcp-echo-failure 3
noauth
persist
maxfail 0
mtu 1500
mru 1500
noaccomp
default-asyncmap
+ipv6
linkname pppoe

My /etc/ppp/chap-secrets looks like this. You may need to use /etc/ppp/pap-secrets instead if your ISP doesn't support CHAP.

* * my_password_with_my_isp

To put it all together on 18.04:

Install the ppp package.
Create/edit /etc/systemd/system/ppp.service, /etc/ppp/peers/provider and /etc/ppp/chap-secrets as above.
Run sudo systemctl daemon-reload, sudo systemctl enable ppp and then sudo systemctl start ppp.
Use systemctl status ppp and view /var/log/syslog for PPP status.


Microsoft Office 2013 installation via PlayOnLinux crashes

Microsoft does not support this and does also not acknowledge WINE so does not include that in their support options. The link is likely searching for a confirmation you are using an official Windows on your system that WINE does not provide.

I would advice to start using LibreOffice (LO) or OpenOffice (OO). The only thing these 2 can not do is use Visual Basic.You use python for that and would need to re-do macro's so they work with python. For all other purposes it works. You can open and create Windows documents. Things work a little different so it needs a bit of experience. I myself have been using LO for several years (on both Windows and Linux) and have yet to run into something that was not compatible with Windows. Even if you get it to work MSO in WINE will be a worse experience than using LO/OO.

If that is not an option I would advice to install Windows either as a dual boot or virtual in Ubuntu (using VirtualBox or VMWare). This will let you use the link and will provide a far better experience than with using WINE. It also lets you use chemdraw and connect it with MSO. Since with both methods are actually using Windows.
It will require a legitimate Windows to be official.


Transmission and deluge handle this without problems. Probably qbittorrent is not set as a "magnet link capable" software.

Anyway, if you search for some of your key words on askubuntu you would end up with this:

How do I assign magnet links to use qbittorrent?


Select "Create desktop entry" from the menu on Welcome Dialog


The answer by the OP is very useful but it's missing some key pieces.  In particular how to determine the complete caldav URL by substituting the XXXX above.

Credit for my answer is due to this blog post (note: I use Thunderbird/Lightning as my caldav client but this is irrelevant) .

The format of an iCloud caldav URL is as follows:

https://pXX-caldav.icloud.com/<DSid>/calendars/<pGUID>

To determine the relevant parameters, first logon to your account on icloud.com, then launch the Firefox web debugging console (F12).  The steps are depicted on the below screenshots which show the web debugging console below the iCloud calendar page.  With the "Network" tab selected -step (1)- generate some traffic against desired calendars (eg: create a dummy appointment). Look for the corresponding POST (or GET) interactions.

The DSid parameter is some sort of numeric userID so it will be the same for multiple calendars/tasklists owned by the same account.  Flip to "Parameters" -steps (2) & (3)- to reveal it.

The pGUID varies from calendar to calendar (it could simply be "Home" or "tasks" if you don't have multiple calendars/tasklists setup).  It can be peeked from the same interactions, but using the "Response" tab -steps (4) & (5)-  You may have to drill down in the JSON structures a little to discover it.

That's all well and good.  However it all stopped working quite recently and the comments at the bottom of the aforementioned blog post thankfully pointed to the source of the issue: since June 2017 Apple is migrating iCloud accounts to enforce app-specific passwords as a very sensible security measure.  This means it's no longer possible to just use the main iCloud password for authentication when syncing calendars.

Once migration has happened to your iCloud account (you'll notice your calendar sync fails) the following steps are required:

Enable 2-factor authentication on your iCloud account
Generate an app-specific password and use that in your caldav client
It's quite likely your caldav server will have changed as part of the migration (mine went from p03 to p40) so URLs need adjusting.

This news item (in German, use Google translate if necessary) has the background info on app-specific passwords.

BTW: I don't think calendars have to be shared in order to be accessed in this way.


Is it possbile to make files with a certain word be automatically moved to a specific folder?

To get a list of files that have a certain word in it simply run this command:

ls | grep certain_word

then you will get all the files that have that word in their name then you can create a script that loop on the output and each result get copied to the different folder you want the example for the for loop you need and i think it will work with you after you do a script file is the following :

    for OUTPUT in $(Linux-Or-Unix-Command-Here)
    do
       command1 on $OUTPUT
       command2 on $OUTPUT
       commandN
    done

check this link for more info about bash scripting :

http://linuxconfig.org/bash-scripting-tutorial


How to install mono 4.0.5.1 (not latest) on Ubunty 16.04 LTS?

Had a similar problem recently. The issue here is that even if you specify a lower version of mono-devel, apt-get will still try and install the newest versions of its dependencies which, of course, will not work.

One can circumvent this by digging deeper into apt's internals and use the 'apt_preferences' mechanism.

For me, placing a file into /etc/apt/preferences.d with the following content solved the issue:

$ cat /etc/apt/preferences.d/mono
Package: /libmono.*/
Pin: release l=xamarin*
Pin-Priority: 990

Package: /^mono.*/
Pin: release l=xamarin*
Pin-Priority: 990

To explain the details briefly - for all packages that contain 'libmono' in their name or begin with 'mono', distributions with the label 'xamarin[1,2,...]' are preferred.
This has the effect of ignoring ubuntu's newer (e.g. 4.2.1) packages for everything related to mono.


Method 1: Assuming you're running <=14.0.4,

sudo su
xhost +SI:localuser:lightdm
su lightdm -s /bin/bash
gsettings set com.canonical.unity-greeter draw-user-backgrounds 'true'
gsettings set com.canonical.unity-greeter background 'path-to-image'

Worked for me. Also, you might need to chmod 644 your background.

Method 2

Copy the picture file to this location

/usr/share/backgrounds/

Change the file name to warty-final-ubuntu.png

(The image must be a PNG obviously)


If I switch to Ubuntu on a mid-2014 Macbook Pro (with integrated graphics) will I lose graphics performance?

According to intel webside, intel did make drivers for Intel iris graphics so there should not be any noticeable performance lose.


"Okay" in what sense? Are you "evaluating" the software? If so, then carry on evaluating until you can make a decision on whether to use it or not. If you have already decided you are going to use it, and have moved from evaluating it to using it, then you've broken the usage terms and you are a bad boy or girl and will go to whatever place of damnation awaits you according to your belief system.

You can prevent that eternal damnation by shelling out $59 - sounds like a good deal to me.


SMART status - Disk failure is imminent [Reallocated Sector Count Failing]

This is not a software or configuration problem. It's a hardware problem, and nothing you can solve repartitioning your hard drive. The hard drive failing is /dev/sda, where the Ubuntu installation is in /dev/sda1, while the other partitions /dev/sda5 appear to be an unused partition. This secondary partition is not formatted.

About using gparted in the damaged hard drive /dev/sda, I wouldn't recommend it, since it's not going to solve anything and it can make things much worse, accelerating the process.

I suggest you use an external unit like an USB or DVD recorder to make a backup of all important information you want to keep because soon your disc is going to stop working completely and you'll have no access to the system at all. By the number of reallocated sectors I can tell you that more than 3712 MB (about 3,6 GB) have been damaged already, so the disc fail is quite serious.

If you can't install a new hard drive but you still want to be able to use your PC, I recommend you download an Ubuntu iso and make a bootable USB or DVD so you can boot in live mode. Not a perfect solution but at least you'll have still some use for the computer while you get a new hard drive.


Add search engine to web browser in Ubuntu Touch

You can add custom search engine definitions in the form of OpenSearch
XML files.
Just drop those custom definitions in
~/.local/share/webbrowser-app/searchengines/, you should then be able
to use your favourite search engine from within the browser.

As an example, if your favourite search engine is startpage.com, you can just download this file and save it as ~/.local/share/webbrowser-app/searchengines/startpage.xml.


How to update Adobe's software unattendedly?

It seems that for the partner repository, you need to add something like this:

"deb http://archive.canonical.com/ubuntu ${distro_codename} partner"

The original line is this:

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


Ubuntu 16.04 black screen after a while - Windows works perfect

You need to install Nvidia drivers. Run in a terminal

sudo apt install nvidia-340

Then reboot and disable Secure Boot in the BIOS if it is UEFI.


I had the same problem. Found a "solution".

sudo apt-get install unity-tweak-tool
Open the Unity Tweak Tool either from launcher or command line
Select "Panel" from the menu
Slide the "Transparency level" slider all the way to the right
Close the tool and enjoy having no more lines :-)


Get the audio from Line-in to output to the speaker

Try use the pulse audio: module-loopback, this module loops all incoming audio back through your outputs ,that isn’t enabled in Ubuntu by default.

#manualy start the module-loopback
pactl load-module module-loopback

#configure your system to load module-loopback on startup
#this places load-module module-loopback at the end of
#the /etc/pulse/default.pa pulseaudio configuration file.
sudo sh -c ' echo "load-module module-loopback" >>  /etc/pulse/default.pa '

This solution is copied from:
http://thelinuxexperiment.com/guinea-pigs/jon-f/pulseaudio-monitoring-your-line-in-interface/


ImportError: No named '_tkinter', please install the python3-tk package

sudo apt-get install python3-tk Installs tkinter for Python3.x.x

Sources:

https://stackoverflow.com/questions/6084416/tkinter-module-not-found-on-ubuntu
https://pythonprogramming.net/python-3-tkinter-basics-tutorial/


Try adding noplymouth to that line, then updating grub with sudo update-grub.
On the second thought, if you just want to see what it says, try the recovery option from Grub.


Hi there has been several updates to skype in span of a day, try to do a --purge remove skype and reinstall. you can also install skype-bin if this doesn't work. It will give you latest skype.


Ubuntu 14 no way to install Nvidia drivers or get suspend working

Finally solved! It turned out that the Nvidia GeForce 8400M GS (luckily installed as an MXM card instead of being soldered on motherboard) was defective as many other 8400M, I did the oven trick, now it works flawlessly with full hardware acceleration.

The oven trick consists of removing the defective MXM GPU module and leaving it into the oven at 200°C for 10 minutes (maybe with some SMD flux under the GPU BGA, but it worked fine for me even without flux).


I think your USB is not bootable. If you search on the web you will find many source to know how to do so.

If you must do it in OS X, this is the official guide be ubuntu: How to create a bootable USB stick on OS X


Virtual screen larger than 4096x4096 using xrandr

You'll need to find the correct Screen-Display SubSection in your existing xorg.conf and add the Virtual entry. If the entry does not exist, you'll need to create the rest of your configuration as well.

Section "Screen"
  …
  SubSection "Display"
    Depth 32
    Virtual 8192 8192
  EndSubSection
EndSection

See http://x.debian.net/howto/use-xrandr.html for more details. Beware that some graphics drivers may have hardcoded virtual size limits.

(Added by myself, authentication didn't pick up, so shown as anonymous modification)


You can play the game using Wine.  But according to the Wine program Database, the game was tested on Ubuntu 12.04, and everything works.

It hasn't been tested with 13.04.


How to set windows 10 to boot first instead of Ubuntu?

IF GRUB menu doesn't already show on boot, hold down the LEFT SHIFT key from cold boot and the GRUB menu should appear. You can select which OS to boot from there. (normal GRUB selection process).

If you'd like to make Windows the default OS, you need to first start Ubuntu and on its terminal, you can type:

sudo -H gedit /etc/default/grub

You'll see some of GRUB's settings near the top of the file. Just change the line GRUB_DEFAULT=0. This selects which item in the GRUB menu is the default boot OS.

Change the 0 to a 1 or 2 or 3... (0 equals first, 1 equals second and so on). Do a GRUB update by typing:

sudo update-grub

Now restart and the selected OS will show as highlighted and then start automatically.


I use mutt (sudo apt-get install mutt) to read it from the command line on my local machine.

You can also forward the mail onto a "real" email address. I have three servers that all do their system error reporting to the root mailbox. I forward these all to my GMail account by editing /etc/aliases and adding:

webuser: root
root: oli@my-email-domain.com

Obviously you'll have a different setup but if you just want your user's email, stick your username in there with your real email address.


There's no reason for a bash process to be running there. The display manager, LightDM or GDM or something else, may use a shell to start the user session (LightDM does, GDM, doesn't), but they don't need to run bash to start Xorg. Not everything is a script.


How to play Windows' Steam games from Linux?

Steam have no native version in Gnu/Linux. Maybe you want to install it by Wine or PlayonLinux. Your Steam games are installed on your Windows partition, because Steam did it. Of course, you can mount your Windows partition on Ubuntu, and launch your game manually by double-clicking on the .exe which will be using Wine. In my opinion, if you run on a dual-boot, it is better to run your Windows Steam games on Windows, because Wine is a good solution for apps like Office 2007 or Internet Explorer which does not require a good configuration, but if you want a good experience when playing a game, just don't use Wine, and play on Windows.


Trojaned version of file "egrep" detected by OSSEC HIDS

I have OSSEC installed on some 14.04 servers, but I never got such notification.

It turns out that until Ubuntu 14.04 /bin/egrep is an ELF executable, but in 14.10 and later it is a shell script. Probably OSSEC was not updated yet to reflect this change.


How do I force Wubi to install a 32-bit version?

Actually, WUBI knows it better than you do. Toshiba Satellite A-215 S581 comes with the  AMD Turion64 CPU, definitely a 64b processor.

You wouldn't be able to run the 64b OS on a 32b machine, but you are -- since you could run uname -a.

If you really want a choice, for whatever reason, then drop WUBI, install Ubuntu on a dedicated partition and use CD / USB stick image which you can choose to be 32b rather than 64b. In any case, what is wrong about having the 64b system?


Ubuntu - One process running - Tons of memory used

The fact is WUBI has memory leak bug as reported here https://bugs.launchpad.net/ubuntu/+source/gnome-panel/+bug/576751 . So thats obvious.

Unused RAM is wasted RAM.

Linux uses RAM very different then Windows. According to your output of free -m the majority of my RAM was tied up in caching data.So

Flush file system buffers for safety

sync

Become root

sudo bash

And for clearing cache mem use -

echo 1 > /proc/sys/vm/drop_caches

for watching running proccess use-

top

Dont worry mine output is similar to yours.


Is it possible to use a TP-Link Archer T8E wireless card on Ubuntu 14.04?

It will work with proprietary Broadcom driver. Make sure your PC is connected to LAN and then go to Additional driver and you will see the Broadcom listed there, enable it and reboot.


Is there a bug in LaTeX or Texmaker as the didn't show the reference at first time?

The solution was to remove * from the equation environment. So

\begin{equation}
\label{D}
\tag{D}
w''+e^{-z}\cdot w'+\alpha \cdot w=0
\end{equation}

works well.


What does functional_qml_application_uses_friends mean?

The Friends API is being dropped from the supported frameworks, and friends-service will also be dropped from the framework definition for 14.10.
The friends-service on the phone will be available as long as the 14.04 framework is supported, but it will not be allowed by the SDK when targeting 14.10.


IOError: [Errno 13] Permission denied. FEniCS JIT compiler

You shouldn't compile stuff as root. Compiling doesn't need root. root is only to install and if you are going to install in your $HOME directory you shouldn't use root since it's your $HOME, not root's. You should just change the permissions of the stuff you compiled as root.

sudo chwon -R $USER:$USER ~/.instant


Dual boot with Windows 8.1 - no installed OS

Your PC might be having fake raid drivers or GPT partitioning.. Check the BIOS and disable the option "Intel Rapid Start" & Intel Rapid Storage. Then again boot into USB with ubuntu and install gparted via software center and check the partitions showing up.

Then I think you can delete the raid drivers by sudo dmraid -rE

Now fire up the installation and it should find the installed OS.


How do I get an Xbox One controller to work with 16.04 (not Steam)

OP's solution to their own problem:

  First, I read that with kernels later than 4.1* (I checked and I have
  4.4*), xboxdrv no longer works with, specifically, the xbox one controller.

  It seems xpad got love from Steam so it's not as outdated as it used
  to be. I don't know what it loses to xboxdev but I just want the
  controller to work.

  My controller is the newer firmware version called Covert Forces
  Edition. Because of its new firmware it needs a patch which I found
  here.

sudo apt-get install git
sudo apt-get install dkms
sudo git clone https://github.com/paroj/xpad.git /usr/src/xpad-0.4
sudo dkms install -m xpad -v 0.4

  All seemed fine. But I hit lsmod and xpad still wasn't loaded. To
  load it I entered:

sudo modprobe xpad

  This gave me a new error that it could not insert because the required
  key is not available. This is solved by turning off secure boot in
  your BIOS.

  I put sudo modprobe xpad in again and there were no confirmations
  but no complaints. I looked under lsmod and lo and behold, at the
  top of the list was xpad! I'm guessing it's the mod version because
  now under the joystick menu in settings it comes up as a 5th
  controller and the damn thing responds. The "X" is lit up and buttons
  work.


Programmatically sync dropbox without daemon running

Using @Rat2000's suggestion, I did this. In one terminal,

while true; do dropbox status; sleep 1; done;

In another terminal:

touch ~/Dropbox/test

The first terminal shows approximately the following output:

Idle
Idle
Idle
...
...
Updating (1 file)
Indexing 1 file...
Updating (1 file)
Indexing 1 file...
...
...
Downloading file list...
Downloading file list...
...
...
Idle
Idle

So we can define a script, using expect, to do a one-time dropbox sync at controlled times, assuming that the dameon does not report "Idle" until it has finished syncing.

Edit:

This solution seems to work for me:

#!/usr/bin/python
import subprocess, time, re

print "Starting dropbox daemon"
print subprocess.check_output(['dropbox', 'start'])

started_sync = False
conseq_idle = 20
while True:
    status = subprocess.check_output(['dropbox', 'status'])
    print status
    if re.search("Updating|Indexing|Downloading", status):
        started_sync = True
        conseq_idle = 20
    elif re.search("Idle", status):
        conseq_idle-=1
        if not conseq_idle:
            if started_sync:
                print "Daemon reports idle consecutively after having synced. Stopping"
                time.sleep(5)
            else:
                print "Daemon seems to have nothing to do. Exiting"
            subprocess.call(['dropbox', 'stop'])
            break
    time.sleep(1)

Notes:

Depending on your Dropbox release you might have to replace

elif re.search("Idle", status):

with

elif re.search("Up to date", status):

To reduce the impact on system performance you can experiment with utilities such as nice, ionice, and nocache, e.g.:

print subprocess.check_output(['nice', '-n10', 'ionice', '-c3', 'nocache', 'dropbox', 'start'])

Setting the script up with anacron

Of course, I schedule this script to run via anacron, like this:

1 10  dropbox_do_sync  su myuser -p -c "python /home/myuser/scripts/dropbox_do_sync.py" >> /home/myuser/logs/anacron/dropbox_do_sync


Dropbox Sync Folder - Dual Boot - Win 7 and Ubuntu 14.04

The Problem was solved:

1- Allow ubuntu to rename the existing folder to "Dropbox (old)" and create a new one "Dropbox"

2- exit Dropbox.

3- delete "Dropbox" and rename "Dropbox (old)" to "Dropbox"


Can't find freshly installed package / application

From the website manual, it says to type "swipl" into the terminal (without quotes).

https://www.swi-prolog.org/pldoc/man?section=quickstart

Hope it helps.


How can I duplicate my existing software packages on a new system?

this is one common way to duplicate a package set. On the old machine:

sudo dpkg --get-selections "*" > packages

Copy the file packages to the new machine (a pen drive is a good option. Then run this:

sudo apt-get update
sudo dpkg --set-selections < packages
sudo apt-get -u dselect-upgrade

This doesn't get you only the packages you installed. It also gets their dependencies, etc.

SOURCE


Ubuntu 13.10 64bit installation problems with hp elitebook 8540w

This is not a Ubuntu version and/or 32bit or 64bit issue but caused by how Nvidia hardware (NVIDIA Quadro FX 1800M - 343.22) in the HP Elitebook 8540w is handled by Ubuntu during Live CD or plain install. I would call it a bug but it is there for quite some time. It can be fixed though. There is another site mentioned on this thread but it is a bit too complex since it proposes to edit Grub, which isn't necessary and tricky since Grub2.

Further I found that downloading the driver .run file from the official Nvidia site certainly was NOT the right driver and caused problems, whereas the standard (-current or -340) as available through the Ubuntu repositories was fine.

Here is the straightforward procedure (I tried distro Zorin 9, recommended for WindowsMovers, but assume Ubuntu 14 is the same)

Load a Zorin9 (Ubuntu14) LiveDVD into the DVD reader or connect a Live USB
stick and (re-)boot from it
Pess any key when you see the first screen with the * / keyboard
Pess F6 and then ESC - allowing you to edit the boot
command with the Arrow keys and typing in or over the existing command
Navigate to quiet splash and replace that with  nouveau.modeset=0
Continue boot with F10.
In live CD you will be using the Xorg 1024x768 driver and you cannot update the driver in live CD mode. So wait until CD booting is ready (no strange distorted screen now!)
From there install on HD. Dont forget to have an internet connection or install will hang
Reboot (from the HD)
At the boot screen (Zorin or Ubuntu) press E and again here replace quiet splash with  nouveau.modeset=0 and boot with F10

(off topic) (In case (as mine) your password is not accepted even when you are sure it is correct, you need to reboot in Advanced-recovery-root mount as rw (see below for the command) and check if there is a home directory, or change the access rights, since that didnt happen well in Zorin...)

Update your driver by Software Center/Dash, or in terminal mode as below, which for the 8540w means looking for nvidia-340 or nvidia-current.
Reboot. You should see the Nvidia logo shortly and you know you are fine!

Alternative commandline from point 8:

Reboot
Select Advanced and then recovery
Select networking (have a wired internet connection!) and then root
sudo mount -o rw,remount /
sudo ubuntu-drivers devices
Look at which driver will be recommended. you can then

sudo apt-get update
and then
sudo apt-get install nvidia-340
or sudo apt-get install nvidia-current

Reboot

You should be fine now.

In terms of usability I find the HP8540 OK with Ubuntu but it seems to me the power/heat/fan control is not at the Windows driver level. Nevertheless, still a great laptop especially if free.


Bootable Ubuntu install on external drive for Mac *and* PC

Okay I installed Ubuntu on an external drive and booted it simply by in stalling rEFIT on my Mac. It probably also boots on my PC, since I did a full normal install on the drive without further modifications.


How to prevent logs from getting too big?

Usually you should only log the activity you care about and should configure the program to be less verbose if possible.

As suggested, using logrotate is the usual way of dealing with logfiles. But instead of adding content to /etc/logrotate.conf you should add your own job to /etc/logrotate.d/, otherwise you would have to look at more diffs of configuration files during release upgrades.

Here is an example I created for a php script:

/var/log/some-php-app/*.log {
        daily
        rotate 10
        delaycompress
        compress
        notifempty
        missingok
}

/var/log/some-php-app/*.log - Is the path where the log file(s) is located and it's name. As you can see, you can also use wildcards to apply the rule to more than one logfile.
daily - Rotates logfiles daily. Alternatives: hourly, weekly, monthly, yearly, maxsize, maxage
rotate count - Files are rotated count times before being removed or mailed to the address specified in a mail directive.
delaycompress - Postpones compression of the previous log file to the next rotation cycle.
compress - Compresses old versions of log  files with gzip. You can use zless instead of less to view the files.
notifempty - Does not rotate the log if it is empty.
missingok - Goes on to the next rotate job without issuing an error message, when the log file is missing.

Have a look at the logrotate manpage for more options.


tmux: error while loading shared libraries: libevent-2.0.so.5

As @guiverc commented - both tmux and libevent are well-packaged on Ubuntu Bionic Beaver 18.04 LTS (and other versions).

You should remove locally-installed tmux with one of the following methods:

Check version of locally-installed tmux:

tmux -V # or from `man tmux`

Then clone this version from its github repository, compile it again and run

sudo make uninstall

Simply remove your self-installed tmux with

sudo rm $(which tmux)

Note: running sudo rm $(which tmux) looks safe because of the fact that even official package do not have shipped other binaries or libraries.

And install package from repository:

sudo apt-get install tmux


dpkg error processing linux-image after upgrade from 16.04 to 18.04

Honestly, I would suggest that you re-install Ubuntu MATE 18.04. Since you have started making a backup I would suggest that you would continue to do that and then reinstall. You could potentially find a solution but it seems like a lot of work and not worth your while.
You can download the disk image here and then you have to make a bootable media using a USB or DVD. And lastly, install Ubuntu MATE using the bootable media.
Good luck!


invoke a script on fail of a bash script

Within the script, you can use trap:

err_handler () {
   /path/to/error/handling/script.sh
   exit
}

trap err_handler ERR

Since ERR is trapped, if any command exits with an non-zero exit code, err_handler function will be run.

You can think of set -e as doing this:

trap 'exit $?' ERR


Using recursion with a command loop. What's the syntax?

Create a file ~/bin/flac2mp3 with the contents:

#!/bin/bash
file="$1"
flac -cd "$file" | lame --preset fast extreme - "${file%.flac}.mp3"

Then run find . -name '*.flac' -exec ~/bin/flac2mp3 '{}' \;

It can be done without using a separate file for ~/bin/flac2mp3 but I think using a separate file is simpler and more clear.


no "single crack" mode rules found in john.ini

I ran into this issue too on ubuntu 12.10 ..
Yes, your use of unshadow is correct, but note that the location of the resultant file does not matter .. as long as you supply the correct path to the file when you run john.
It turns out that /etc/john/john.conf makes references to $JOHN
With the default apt install of john on ubuntu 12.10,  $JOHN is /usr/share/john ..
/usr/share/john is also where the john.log, john.pot and the passwords list reside.
Fix: ln -s /etc/john/john.conf /usr/share/john.ini
The symlinked john.conf file has all the default config settings, including the 'single crack' switch.


How to have launcher on non-primary screen?

It's quite really simple: go to System Settings... →  Displays, choose Launcher placement and click Apply:

Note: click on the images to enlarge.


Try to copy your files as root of your Live-Ubuntu-drive

Open a terminal and type

sudo -i
nautilus

to open the file manager as root. When done, in the terminal type

exit

to drop privileges.


package 'gdm' is not installed and no information available

The greeter for Plasma is sddm rather than gdm. Please try

sudo dpkg-reconfigure sddm

In any case why do you want to change the user in order to re-install? It would be easier to just boot from a live usb and do a clean Ubuntu installation.


Manipulate csv file using bash script or python, converting certain columns into rows

Here's an awk approach:

$ awk 'NR>1{for(i=1;i<=NF;i++){ if((i%4)==0) printf "\n"; printf "%s%s",$i,FS;}printf "\n"} END{printf "\n"}' input.csv
chr16 2697996 2697997
chr16 2086192 2086193
chr5 112801382 112801383
chr5 138445682 138445683
chr15 26869333 26869334
chr8 119416385 119416386

Assuming the "Columns" is present in the file, it'd be easier to process the file without them, hence NR>1 part. After that is a simple for-loop, which inserts a newline whenever there's no remainder in integer division by 4 in the column number ( the (i%4) == 0 part ). This is a very common trick to deal with short counters or data that needs to occur at specific intervals. Newline is necessary because we're printing data via printf directly as plain string, not a full line.

Since you've requested python, here's a python script as well:

#!/usr/bin/env python3
import sys

with open(sys.argv[1]) as fd:
    for index,line in enumerate(fd):

        items=line.strip().split()
        if index == 0:
            print(" ".join(items[:len(items)//2]))
            continue

        left = items[:len(items)//2]
        right = items[len(items)//2:]
        print( " ".join(left) )
        print( " ".join(right) )

Works as follows:

$ ./break_columns.py ./input.csv
Column1 Column2 Column3
chr16 2697996 2697997
chr16 2086192 2086193
chr5 112801382 112801383
chr5 138445682 138445683
chr15 26869333 26869334
chr8 119416385 119416386


System requirements for ubuntu 12.04(Will it run on 512MB RAM?)

Based on the "Minimum Hardware Requirements" mentioned in the  "Installation Guide" for PowerPC, the answer is YES.

Nevertheless in the real world, a one core microprocessor with less than 1GB RAM will result in a less efficient computer "feeling" slow in many aspects.

You must consider seriously what is mentioned in the given page, specially what refers to the graphic desktop environments, as follows:

  The actual minimum memory requirements are a lot less then the numbers
  listed in this table. Depending on the architecture, it is possible to
  install Ubuntu with as little as 20MB (for s390) to 48MB (for i386 and
  amd64). The same goes for the disk space requirements, especially if
  you pick and choose which applications to install; see the section
  called “Disk Space Needed” for additional information on disk space
  requirements.

  It is possible to run a graphical desktop environment on older or
  low-end systems, but in that case it is recommended to install a
  window manager that is less resource-hungry than those of the GNOME or
  KDE desktop environments; alternatives include xfce4, icewm and
  wmaker, but there are others to choose from.

Anyway, there are lightweight desktop environments and several distributions based on ubuntu (lxde and lubuntu comes to my mind), which makes a difference in "speed" at the very moment that you use the computer to do something, apart from the boot itself.

You must remember that the "speed" of a computer is a sensation. Something you "feel" based on several things, not only the speed of the microprocessor and RAM.

Recapitulating:

The fast answer is YES, it will run. But you may expect a slow performance computer after all.

Good luck!


how to establish a phone call remotely via ubuntu?

yes ubuntu can do this task. I'm sure there are several applications that will allow you to make "calls" to another computer.

My personal favorite is sflphone its an ip telephone client.
It has an ip to ip call function wich does exactly what you want.

It also allows you to call to real telephones if you get an account at some local ip telephone provider and configure your sflphone to use it.

http://sflphone.org/


With EFI there is no traditional boot manager loaded from the MBR that is responsible for booting every OS on the disk. Instead each OS places its bootloader in the EFI partition, which can then be selected from the EFI boot menu.

In your case the EFI partition is /dev/sda2 and according to boot-repaircontains the Windows bootloader as well as Grub.

How to enter the boot menu depends on the manufacturer of the firmware. I would guess there is a prompt at boot time, hinting at which key to press.

As far as I can see from grub.cfg, there is an entry to boot Windows 8 from Grub, by chainloading the Windows bootmanager from the EFI partition. This way you might be able to set Ubuntu as the default OS to boot in the EFI settings and still get the opportunity to boot Windows.


Calibre crashes with "Segmentation fault" (core dumped)

can be closed. updating calibre and stopping to rely on original sources did the trick. now I am running a binary from calibre itself.

just go here, download the library and stop hoping that the version within the ppa-system will work again: https://calibre-ebook.com/download_linux


If you remember any of the files,

sudo find / -name "name of file"

This might take a while.


Intel HD4000 slow graphics performance on external display

I've set up two displays in a computer with intel hd graphics 4000 + mvidia geforce 710M (bumblebee installed). I've just plugin and configure them by the display settings of unity...And it's working.

The only difference with yours is I'm using VGA cable instead of HDMI. Maybe you could try plug-in through a VGA cable.


How to show volume names/labels in nautilus' "Other Locations" view?

Each logical volume contains a file-system. If the file-system has a label, Nautilus will display the file-system-label instead of the file-system-size. So you need to give your file-systems labels (names). The commands to do that depend on the file-system-type.

Gather information about the filesystems with

lsblk -f

This will give you the device names and the used file-system-type

Here the commands for the most used file-sytem-types:

For ext2/3/4 use

sudo e2label /dev/??? YOURLABEL
or
sudo tune2fs -L YOURLABEL /dev/???

For NTFS use

sudo ntfslabel /dev/??? YOURLABEL

For FAT use

sudo fatlabel /dev/??? YOURLABEL


How do I get postfix and dovecot to connect to outside domains?

Google compute engine does not allow sending email - but offfers a free relay service thru sendgrid:

https://cloud.google.com/compute/docs/tutorials/sending-mail


After using my system for some time, it appears one of my programs caused the file to be created at ~/.config/mimeapps.list

sudo find / -name "mimeapps.list"

cat ~/.config/mimeapps.list

[Added Associations]
image/jpeg=gimp.desktop;
text/x-java=eclipse_eclipse.desktop;
application/json=sublime_text.desktop;
application/rdf+xml=sublime_text.desktop;
text/x-python=sublime_text.desktop;
video/mp4=vlc.desktop;
application/octet-stream=org.gnome.Software.desktop;
application/pdf=evince.desktop;
text/html=org.gnome.gedit.desktop;
text/plain=firefox.desktop;

[Default Applications]
application/ppdf=FoxitReader.desktop
application/octet-stream=FoxitReader.desktop
application/pdf=FoxitReader.desktop


A countdown timer that minimises to tray?

Have a look at Alarm Clock. It is an alarm clock and a timer and minimise to tray.

Installation: sudo apt install alarm-clock-applet


Display 'cd' accessible path to mtp device in Nemo

To be usable as a path you have to URL-encode the string that you get from Nemo.

To do so the following oneliner should return the command to use to cd into your mtp device:

echo -n mtp://[usb:001,007] | python -c "import sys,urllib; \
print 'cd /run/user/1000/gvfs/mtp:host='+urllib.quote(sys.stdin.readline().replace('mtp://',''))"

it returns:

cd /run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C007%5D


How to install Dropbox on Kubuntu 14.10 with QT problems?

After several failed attempts to install Dropbox on the Plasma 5 GUI, I decided to install plain Kubuntu with Plasma 4 and install Dropbox first. Now I am going to try to install Plasma 5 on top of this to see if it works.

But a short answer is that the problem probably lies with Dropbox and Plasma 5.

EDIT: If you install Dropbox on Plasma 4, the icon shows up in the dashboard below (in KDE), and Dropbox works fine. NOW if you install Plasma 5 on top of it using the instructions given on http://www.kubuntu.org/news/kubuntu-14.10, the Dropbox daemon works in the background and keep syncing stuff, BUT the icon is no longer visible in the notification area anymore.

So the problem now is: how does one restore the Dropbox icon in the notification area in Plasma 5 KDE?


Evolution isn't particularly light-weight, HOWEVER imho it's the best email program out there and you should be using it anyway.

Evolution synchronizes your Google Calendar and you can see your next 5 appointments (or at least I currently see 5 appointments there, I don't know whether it only shows a maximum of 5 appointments but also with a time limit past which appointments are ignored) when you click on the date in the upper right corner of you screen.

Notice that Evolution has an option to add Google Calendars which worked when I set up Evolution for Ubuntu 14.04. However, it doesn't work with the version currently in the Ubuntu 14.04 repositories because it can't load the page it tries to load. So probably Google has changed something.

But you still can add your calendars. Add a calendar of the type CalDAV with these parameters:

URL: https://www.google.com/calendar/dav/[your email address]/events
User: [your email address]
Email: [empty]

The rest is self-explanatory.


How do I get Adobe Reader to print more than one page in 13.10 Saucy?

I had this problem, see https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1247935, for me the fix was to purge cups and start again defining printers from scratch; I'd copied the config files from a previous Ubuntu and something had obviously not liked it.


A straightforward way to extract video from the camera is to use the dvgrab tool.

Install it with sudo apt-get install dvgrab.

There is a tutorial on how to use it on Ubuntu Documentation.

Give that a try, and if you get stuck, edit your question to describe what you have tried and what went wrong.


Thunar - Make the drag and drop menu pop up by default

I'm reasonably sure this can only be achieved through a source code change.

Thunar does have custom actions (like Nautilus) but they only appear as context menu entries whereas you're trying to change under what circumstances an entirely different context menu is opened.

I'm not aware of any other plug-in system in Thunar.


Ubuntu should work with no problems. I did that many times. There is nothing specific with Intel or AMD CPUs that need attention.
The only issue that can arise is GPU driver. if you installed some 3rd-party driver like Nvidia and changed this hardware to something else, you need to uninstall the driver first.
The same applies to other drivers if you installed any manually.
If you don't have 3rd party drivers, the system should boot on another MB without any issues. Linux systems don't store hardware information on disk, like Windows.


Notepad doesn't open files created by Gedit?

It's true that Notepad is not a good editor and that it's basically Notepad's fault. But the actual problem is this:
Line ends are stored differently among operating systems. Unix (Ubuntu) usually use the symbol "LF" and Windows (Notepad too, because of that) "CR+LF".
You can set the line ends to CR+LF in Gedit (you need to search the option yourself, you should find it somewhere) and Notepad will be happy.
But in the long term you'll be happier with Notepad++ or I think Geany runs on Windows too.


Headset microphone is not working in ubuntu 20.04

This is not a solution for Bluetooth headset
I also recently changed from Ubuntu 18 to Ubuntu 20.04 LTS and had a similar problem, just that I use headset with a 3.5mm jack.
I resolved it by:

Searching https://www.kernel.org/doc/html/latest/sound/hd-audio/models.html for my laptop model Acer Aspire, I got aspire-headset-mic (Headset pin fixup for Acer Aspire);
Opening /etc/modprobe.d/alsa-base.conf file in VS code;
Adding options snd-hda-intel position fix=1 (on line 44) and options snd-hda-intel model=aspire-headset-mic (on line 45);
Saving the file, restarting the laptop.

Next time I plugged-in the headset, I got the window asking me Select Audio Device (Headphones / Headset).
*Found that link on the second answer from Headset microphone not working on Ubuntu 20.04.
**The video that you posted here also helped me, together with the 1st comment (from user Insp3ctorJon3s) on the video.


installing vmware-tools for windows guest

Latest vmware-player version (6.0.2) is able to download and install the vmware-tools for all guest platforms supported automatically but I need to install vmware-tools in the guest manually from ISO image to a virtual CD in the Windows guest. The image location in Linux /usr/lib/vmware/isoimages


Invalid SSL certificate on Steam with Wine

Install the 32-bit libldap and openssl libraries:

sudo apt install libldap-2.4-2:i386 openssl:i386

No need to add the -no-cef-sandbox.

It only worked after reboot and deleting the wineprefix folder.


Ubuntu installer thinks my drive is empty, does not see windows partitions

If there is a remnant of the old partition table left then it's easy to get rid of it. Just run a dd like so:

dd if=/dev/random of=/dev/sda bs=1 count=512

Only run this if you are sure you want to erase all partitions and start over. "sda" is the harddrive you're working with.

If you do this you will have to reinstall Windows 7 again. I'd recommend creating the partitions with the Ubuntu Live CD, that way the Windows installer doesn't create the 100MB System Partiton anymore, and you can be sure that the partitions are actually there. Good luck.