How can I play mp4 files from a USB live iso?

I imagine you'd have to first change your sources lists first. Medibuntu is how I used to do it.

sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update

Once you've done this you should be able to install ubuntu-restricted-extras.


FTP client with cyberduck like 'open in your editor' functionality

All text editors with GVFS (e. g. Gedit, Gnome's default text editor) or KIO (e. g. Kate, KDE's default text editor) support can open files on "virtual" file systems including FTP network resources.

In addition you'll need a file manager than knows about GVFS/KIO so it can browse virtual directories and knows how to tell GVFS/KIO-enabled applications to open resources on such file systems. Examples for such file browsers are

Nautilus, Ubuntu's/Gnome's default file manager,
Thunar, Xubuntu's/Xfce's default file manager,
Nemo, a fork of Nautilus,
Dolphin, Kubuntu's/KDE's default file manager,
Konqueror (also KDE).

You can instruct those file manager to access FTP directories as outlined in this answers about SFTP – just replace all instances of sftp with ftp.

This works for all file types for which you have GFVS/KIO-enabled viewers/editors. Examples are Eye of Gnome, Totem, and Evince, Ubuntu's/Gnome's default image viewer, multimedia viewer and PDF viewer, respectively.

A nice thing about this approach is that the application doesn't need to transfer the whole file before it can be viewed if a partial view is possible (and implemented), e. g. for long video files. Even seeking within a file is possible like this.

P.S.: I just tested this with Nemo and noticed the following detail: if a text file doesn't have a file name extension that hints to its textual content (e. g. .txt or .log) file browsers normally try to guess its content type based on the actual content. However that is infeasible for remote files. Hence you'll need to tell your text editor explicitly to open that file, e. g. by dragging it from the file browser onto the text editor window.


Consolas not visible in IntelliJ Idea on Ubuntu 12.04

Consolas font is not just one file, you need to copy all 4 font files into JDK_HOME/jre/lib/fonts:

consolaz.ttf
consolai.ttf
consolab.ttf
consola.ttf

Then the font works just fine:


Why am I getting this error when trying to install wine 1.4?

Depends: wine1.4-i386 (= 1.4.1-0ubuntu1~precise1~ppa3) but 1.4.1-0ubuntu1~precise1~ppa3 is to be installed

It looks like you're trying to install an outdated version of Wine from some PPA. Please remove the PPA from Software Sources, update, and then try to install Wine again.


How do I connect to wireless network with hidden SSID on Ubuntu Touch?

First, connect your phablet to PC and copy over your connection info:

  # phablet-network -n
  /etc/NetworkManager/system-connections/YourSSID.conf

or just create new .conf file on the phablet at /etc/NetworkManager/system-connections/YourSSID.conf.

Start adbd as root

  # adb root

Enter shell

  # adb shell

Edit file (if you don't like vi, you can always use ed :), not sure if there is any other editor available. You could also edit this file directly on your PC)

  # vi
  /etc/NetworkManager/system-connections/active_ws_connection.conf

under [802-11-wireless] add:

  seen-bssids=00:00:00:00:00:00;

replace with MAC address of your AP.

Save file and reboot the phablet.


I've the same problem. Third party services like Dropbox seem to be more reliable. Restarting Ubuntu One service may help:

u1sdtool --quit
u1sdtool --connect
u1sdtool --refresh-shares
u1sdtool --status
u1sdtool --current-transfers

For debugging purposes logfiles are located at: ~/.cache/ubuntuone/log. I think they're a bit confusing.


Can I have the I-beam (mouse) cursor more visible in gtk3 apps?

The file to be edited is gtk-widgets.css in usr/share/themes/theme_name/gtk-3.0 or in ~/.themes/theme_name/gtk-3.0. To adjust the width, the code to be inserted is this:

 -GtkWidget-cursor-aspect-ratio: 0.3;

or other suitable value.


Steam is not working: SteamUpdateUI: An X Error occurred

The instructions on this page worked for me (Ubuntu 18.04, GTX 1650s): https://github.com/lutris/docs/blob/master/InstallingDrivers.md
Nvidia:
To get the latest Nvidia drivers it is necessary to add the Proprietary GPU Drivers PPA:
sudo add-apt-repository ppa:graphics-drivers/ppa
Enable 32 bit architecture (if you haven't already):
sudo dpkg --add-architecture i386
Update to refresh packages:
sudo apt update
Warning: Please ensure your graphics card is supported by the 430 driver before installing. For a list of supported GPUs click here: https://www.nvidia.com/Download/driverResults.aspx/149138/en-us
Install the 440.82 driver:
sudo apt install nvidia-driver-440 libnvidia-gl-440 libnvidia-gl-440:i386
Install support for Vulkan API (will be functional only if you have a Vulkan capable GPU):
sudo apt install libvulkan1 libvulkan1:i386
Reboot to apply changes.


I had two Bluetooth devices showing up in the “bluetooth settings menu” but that weren’t in the “Bluetooth Settings” list.

I was able to remove them buy using the terminal prompt and “bluetoothctl” - bluetooth control tool. It lists all devices in the bluetooth settings meny and their unique key number.

Open a terminal and type:

bluetoothctl

It will show a list of all devices appearing in the menu.

Step 2 type:

remove aa:bb:cc:dd:ee:ff

Where you insert the number for the wanted device to remove instead of aa:bb:cc:dd:ee:ff
The device removed should no longer be in the menu.

Quit the bluetoothcl by typing exit


How do you limit root to no more than 1 login at a time?

One way would be to limit the terminals through which root login is allowed. This is done by editing /etc/securetty. Just let securetty contain any two TTYs and you're done.


sudo apt autoremove

solved problem for me. It seems that with frequent updates something was colliding.


Windows use NTFS partitions; Linux, ext4... Linux is able to read and write NTFS without need of any tweaks, but our loved Windows is unable to do the opposite: it does not support natively ext4 partitions. But don't dismay, because it can be fixed using Ext2File, an open source Linux ext2/ext3/ext4 file system driver for Windows systems... you can find it here.

When you're installing, you can make it start automatically when Windows boots... I suggest you not to enable write support in order to avoid any troubles: first, ext4 writing support is not ready yet; second, windows could do messy things. With this application you can assign a letter to any Linux partition.

There is a blog that talks about this utility usage, it's on spanish but it has some pictures you could use as a guide. Hope it works for you as it did for me.

Abraham Medina

PD: Linux names NTFS partitions with its storage capacity... something like "329 GB volume". You won't see your Linux partition this way, but "File System".


Ubuntu 20.04, running HDMI to display. Switching display inputs to another box and back results in a black screen

Same issue here. But my monitor is a Samsung U32J590 32'' 4K UHD and NVIDIA GeForce GTX 950. Everything works fine until you change the source on the monitor.

neofetch
OS: Ubuntu Hirsute Hippo (developmen
Kernel: 5.11.0-13-generic
Uptime: 16 mins
Packages: 1908 (dpkg), 10 (snap)
Shell: bash 5.1.4
Resolution: 3840x2160
CPU: Intel i7-3770 (8) @ 4.100GHz
GPU: NVIDIA GeForce GTX 950
Memory: 2273MiB / 7896MiB

I solved the problem changing the driver of NVIDIA from 460 to 390
enter image description here
Now everything is working fine.


Create a progress bar in bash lists approaches to get a progress bar, so I'll concentrate on the How to fake part here. I'll use 2 seconds instead of your 60 here just for testing, adjust the sleep value to your exact needs.

Using dialog, whiptail or zenity (GUI)

for i in {1..100}; do sleep 2; echo $i; done | dialog --gauge 'Running...' 6 60 0

This for loop loops1 over the numbers one to hundred and echos them every 2 seconds, the output is then piped to dialog, which shows the number as the progress on a progress bar. This approach works for whiptail and zenity --progress (GUI) as well. dialog's output looks like this with a colored progress bar using 'curses' in text mode:

Using pv

for i in {1..100}; do sleep 2; echo; done | pv -pWs100 >/dev/null

This  loop is very similar, just that it prints only a newline (=1 byte of data) every 2 seconds, pv is then told to expect exactly 100 bytes of data and show a progress bar. In a terminal window with a width of 80 characters the output looks like this:

[===============>                                                          ] 22%

Constructing your own progress bar

With a simple loop you can also construct your own progress bar. Here are some examples that just print 100 # in one line, one per 2 seconds:

# number signs only
$ for i in {1..100}; do sleep 2; echo -n \#; done; echo
####################################################################################################

# with progress in % on the right
$ for i in {1..100}; do sleep 2; printf "%0.s#" $(seq 1 $i); printf "%0.s " $(seq $i 100); printf "%3d%%\r" "$i"; done; echo
######################################################                                                54%

# with progress in % on the left
$ for i in {1..100}; do sleep 2; printf "%3d%% " "$i"; printf "%0.s#" $(seq 1 $i); printf "%0.s " $(seq $i 100); printf "\r"; done; echo
 39% #######################################

1 Look, a Polyptoton!


Does /lib/modules folder must be on root device?

No, it does not have to be on the root device.

There are 2 things to consider:

/lib/modules needs to be available to the system at the same time as / is so it would not make sense to put it elsewhere. You can not guarantee that another partition is up and ready if it is on another disk.
It should be on the root system to guarantee easy recovery from a corrupted system though.

  But when I modprobe any module, it returned without error

That means it got loaded. General rule in Linux: if it goes well report nothing back, if it goes wrong show a notice.

  and did not load that module.

I doubt that has anything to do with partitioning. If that was an issue I would expect you would not be able to boot at all.


Why does clicking Install in the Software Center do nothing?

Try using terminal to update.
Open a Terminal and type sudo apt-get update && upgrade
Hopefully this will install any needed patches as it may just be stuck.


Automatically indenting text that wraps to the next line in Gedit

kate has this features, but unfortunately it brings with it several packages, if you're not running kde already, and this is not what you asked for.

Another great editor gtk-based that has this feature is geany.

Just two editors I tried.


White Text on White Background When Saving Files in Brave

try
brave://settings/appearance
you might get lucky with toggling between Light and Dark themes.
at worst, you might have to scroll all the way to the bottom and choose
    Reset settings
    Restore settings to their original defaults


When I upgraded from 13.04 (Evolution v3.6.4) to 13.10 (Evolution v3.8.4), I found 13.10 'broke' too many critical functions necessitating a downgrade back to 13.04. I had tar backups of the necessary Evolution folders (.local/share/evolution, .config/evolution, .config/dconf) as well as backups using Evolution's internal 'Backup Evolution data' option.

I chose to preserve the 'broken' 13.10 O/S until the downgrade was complete so I did a clean install of 13.04 in a separate partition, installed Evolution 3.6.4 and attempted to restore Evolution's internal backup (taken prior to the upgrade) using Evolution's 'first run' Startup Wizard.  User accounts, email, calendar, tasks, and memos all restored correctly EXCEPT for the addressbook. After the Startup Wizard restore, the address book was empty and produced the same error you received ('table folders has 8 columns but 6 values were supplied').

I tried restoring a tar backup. It produced the same address book table error. I also tried exporting the ubuntu 13.10/Evolution 3.8.4 address book as a vcard (.vcf) file and importing into ubuntu 13.04/Evolution 3.6.4, also without success.

Finally, to confirm the address book even worked, I created one new record in the empty ubuntu 13.04/Evolution 3.6.4 address book. Evolution allowed me to create that one record. I again attempted to import the vcard list and this time the import was successful.


Why are the login boxes on the left and how can I easily move them to the center?

My opinion is that it was a design decision that had to do with showing the wallpaper.  For detailed wallpaper the "focus" for the image is typically the center.  Placing the login box centered would obstruct the view of the wallpaper.

If you really prefer it old-school, just install the "old" display manager, GDM, via sudo apt-get install gdm. Example:


Sharing folders between Ubuntu(guest) and Windows 7 (host) using VirtualBox

If you get Permission denied when accessing the mounted shared folder, run the following command:

sudo adduser <yourUsername> vboxsf

Substitute <yourUsername> by your actual username (e.g. john or whichever is yours).

Then restart and you should have full access.


Installing ubuntu 12.04 LTS alongwith windows xp in two different HDDs

Change your boot device in BIOS to the second drive. This should cause GRUB to boot, and RUB will boot Ubuntu. I don't know if you can boot the other drive from GRUB.


It seems setupcon doesn't run automatically, so you'll have to either run it manually or put it in your .(ba|z|fi|etc)shrc or something like that. If you use Byobu, put it immediately before the Byobu line and add 2>/dev/null to keep it from complaining every time you open a new shell.


anbox modprobe ashmen installed to different lib (128 and not 112)

You have not rebooted since a kernel update was installed. You need to reboot the computer so that it will be running the new 4.15.0-128-generic kernel.


Before you start uninstalling/reinstalling software, it wouldn't hurt to buy a can of compressed air at a computer store, and spray the dust out of the graphics card's heat sink. Hold a fan blade in place with your fingers to keep it from turning fast, so you don't damage the fan's bearings when you spray it with compressed air.

Open the terminal and type:

apt-cache depends nvidia-driver-396 # if nvidia-driver-396 doesn't work try nvidia-driver-390

The results of the above command list the dependencies installed by nvidia-driver-396. Look for dependencies installed by nvidia-driver-396, that is packages that have both nvidia and 396 in their package names. Check if they are installed or not using apt policy <package-names>. Uninistall nvidia-driver-396 and its installed dependencies with sudo apt remove <package-names>.
Reboot.

sudo reboot

Install nvidia-driver-410.

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-driver-410 nvidia-settings
sudo reboot


How to install Ubuntu server 14.04 on LVM RAID?

I'd recommend this guide, it seems reasonable: http://blogging.dragon.org.uk/installing-ubuntu-14-04-on-raid-1-and-lvm/


Dpkg is trying to install a deleted deb file and errors appear

You have two packages half installed. Every time you run apt or dpkg it tries to finish the install on those packages. Try:

sudo apt-get --purge gens
sudo apt-get install -f

Then try to install mupen64plus


How do I identify and/or downgrade all packages that only have /var/lib/dpkg/status as their source?

I had a similar problem as the OP.  I'm trying to install libsdl2-dev, which fails because
$ sudo apt install libsdl2-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help resolve the situation:

The following packages have unmet dependencies:
 libsdl2-dev : Depends: libasound2-dev but it is not going to be installed
               Depends: libegl1-mesa-dev but it is not going to be installed
               Depends: libgl1-mesa-dev but it is not going to be installed
               Depends: libgles2-mesa-dev but it is not going to be installed
               Depends: libglu1-mesa-dev but it is not going to be installed
               Depends: libmirclient-dev but it is not going to be installed
               Depends: libpulse-dev but it is not going to be installed
               Depends: libudev-dev but it is not going to be installed
               Depends: libxkbcommon-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

This seems to be happening because a lot of installed packages don't have a repo.
$ sudo apt policy libxcb-present0
libxcb-present0:
  Installed: 1.13-2~ubuntu18.04
  Candidate: 1.13-2~ubuntu18.04
  Version table:
 *** 1.13-2~ubuntu18.04 100
        100 /var/lib/dpkg/status
     1.13-1 500
        500 http://ca.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

aptitude is able to automatically downgrade packages that are blocking installation of libsdl2-dev.  Not exactly what OP is asking for. But was useful to me, and should be useful to others.  For me, when I first run aptitude, it gives this as the first resolution
# aptitude install libsdl2-dev

<snip>

The following packages have unmet dependencies:
 libdrm-dev : Depends: libdrm2 (= 2.4.100-3~b~padoka0) but 2.4.101-2~18.04.1 is installed
              Depends: libdrm-intel1 (= 2.4.100-3~b~padoka0) but 2.4.101-2~18.04.1 is installed
              Depends: libdrm-radeon1 (= 2.4.100-3~b~padoka0) but 2.4.101-2~18.04.1 is installed
              Depends: libdrm-nouveau2 (= 2.4.100-3~b~padoka0) but 2.4.101-2~18.04.1 is installed
              Depends: libdrm-amdgpu1 (= 2.4.100-3~b~padoka0) but 2.4.101-2~18.04.1 is installed
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     libdrm-dev [Not Installed]
2)     libegl1-mesa-dev [Not Installed]
3)     libgl1-mesa-dev [Not Installed]
4)     libgles2-mesa-dev [Not Installed]
5)     libglu1-mesa-dev [Not Installed]
6)     libsdl2-dev [Not Installed]
7)     mesa-common-dev [Not Installed]

Accept this solution? [Y/n/q/?]

Say no to this solution. A side note.  It could be acceptable to just keep the current installed version. But I felt it was safer to stick with the official Ubuntu packages, or from repos that I want to use.
The next solution is to downgrade packages to versions that are part of know repos.
The following actions will resolve these dependencies:

      Downgrade the following packages:
1)      libdrm-amdgpu1 [2.4.101-2~18.04.1 (now) -> 2.4.100-3~b~padoka0 (bionic)]
2)      libdrm-amdgpu1:i386 [2.4.101-2~18.04.1 (now) -> 2.4.100-3~b~padoka0 (bionic)]
3)      libdrm-intel1 [2.4.101-2~18.04.1 (now) -> 2.4.100-3~b~padoka0 (bionic)]
4)      libdrm-intel1:i386 [2.4.101-2~18.04.1 (now) -> 2.4.100-3~b~padoka0 (bionic)]
5)      libdrm-nouveau2 [2.4.101-2~18.04.1 (now) -> 2.4.100-3~b~padoka0 (bionic)]
6)      libdrm-nouveau2:i386 [2.4.101-2~18.04.1 (now) -> 2.4.100-3~b~padoka0 (bionic)]
7)      libdrm-radeon1 [2.4.101-2~18.04.1 (now) -> 2.4.100-3~b~padoka0 (bionic)]
8)      libdrm-radeon1:i386 [2.4.101-2~18.04.1 (now) -> 2.4.100-3~b~padoka0 (bionic)]
9)      libdrm2 [2.4.101-2~18.04.1 (now) -> 2.4.100-3~b~padoka0 (bionic)]
10)     libdrm2:i386 [2.4.101-2~18.04.1 (now) -> 2.4.100-3~b~padoka0 (bionic)]

Accept this solution? [Y/n/q/?]

There you go.  Now at least the orphaned packages that are blocking the install of libsdl2-dev have been downgraded to versions that are known to repos.


force 'uget' to download from a particular link

My personal preference is JDownloader, which does work perfectly fine on your link/file, as the screenshot shows.

  JDownloader is a free, open-source download management tool with a huge community of developers that makes downloading as easy and fast as it should be. Users can start, stop or pause downloads, set bandwith limitations, auto-extract archives and much more. It's an easy-to-extend framework that can save hours of your valuable time every day!

To install, use either Ubuntu Software-Center,
or follow this link on their homepage

  JDownloader requires Java Runtime Enviroment (jre/jdk) 1.5 or higher. If possible, you should use the latest Java version.

How to automatically download added links:

You have to mark and copy control+c the url of the file you intend to download though, which will then copy it into JD.

From there it autostarts the download, if you checked the option start downloads after adding in Addons -> AddonManager -> Linkgrabber.


Getting error when running CUDA sample after installing CUDA 8.0 in Ubuntu 16.04

Uninstall any nvidia drivers you have now, check that all the "blacklist nouveau" lines got removed from all files in /etc/modprobe.d, reboot and you should be using the nouveau drivers.  Now use the Software Updater to select the Nvidia 375.66 and when it finishes, reboot again, and you should be running that Nvidia driver.  Now a CUDA install (with the two recommeded PATH and LD_LIBRARY_PATH mods) will find the libraries it needs.  I'd uninstall the CUDA packages too, so you can reinstall them with the Nvidia in place, but try a compile before doing that.

Check that the "missing" libraries are actually in /usr/lib/nvidia-375.  Check that your .../cudaDecodeGL/findgllib.mk has the line

 UBUNTU_PKG_NAME = "nvidia-375"

Check that your PATH variable starts with /usr/local/cuda/bin:
and that your LS_LIBRARY_PATH starts with /usr/local/cuda/lib64
(or wherever you install cuda).  That  should be all that's necessary to run the make for cudaDecodeGL.  Many of the other samples do not even require this fix, like the marchingCubes.  If your link still can't pick up the library,
Check that /etc/ld.so.conf.d contains a file named cuda-8-0.conf with the contents of:

   /usr/local/cuda-8.0/targets/x86_64-linux/lib

(or wherever instead of /usr/local you installed cuda).  That creation should have been automatic, the .deb file installation does it, can't say if other methods do.


Reboot freezes at end of Ubuntu 18.10 installation

I have exactly the same problem on (probably) the same laptop (in my country it's shipped simply as Dell Inspiron G3 15' with varying specs):

Intel Core i7-8750H,
NVIDIA GeForce GTX 1050Ti,
32 GB DDR4 RAM,
dual disc SSD + HDD.

I may add that it came with Windows 10 pre-installed, but I didn't want to keep it, so I didn't even try to set up a dual boot, I've just  formatted the whole disc. Although I did need to change a BIOS setting (RAID to AHCI) for Ubuntu to be able to see the SSD disc.

So if I may add a few points:

First I've tried to install Ubuntu 18.10. It has installed fine, but then froze after hitting the restart button on the box saying that the installation is over. I've done a hard reboot and tried to run the OS. It has worked fine, I was able to log in, but immediately after logging in it froze on an empty, this pinkish-violet screen.
Then I've tried to reinstall Ubuntu 18.10. I've formatted the disc again and did everything as before, with the exception that I've waited for a few minutes after hitting the restart button on the aforementioned box. And in fact that changed something, because that black screen which OP posted above appeared with exactly the same messages. They've appeared gradually, not all at once, sometimes taking quite a long time, but after that one about "psmouse serio1" at the bottom nothing more happened for over half an hour, so I did a hard reboot again.
Then I've decided to install Ubuntu 18.04 LTS. Again I've formatted the disc, again the installation went fine until that very last step when it again froze upon hitting the restart button. This time however, after doing another hard reboot, the OS started fine, I've successfully logged in and was able to work for a minute or two. Unfortunately, after that time the OS froze again and this time I'm out of ideas about what I should do next.

EDIT: I've installed Ubuntu Gnome 16.04 LTS and it seems to be working fine, although the touchpad lost the ability to recognise "taps", so if one wants to click using it, one needs to physically push it, taps won't do it. For the time being it must suffice, but half-usable touchpad and outdated software notwithstanding, support for Ubuntu 16.04 ends in 4 months, so this isn't a long-term solution.


Next images maybe will give you an idea:

So, the software sources must to be the same on all computers about that you speak if you want to find the same things everywhere in those computers in Ubuntu Software Centre.

To open and select software source, search for Software & Updates in Dash.

Also, for troubleshooting, a good general procedure not only for Ubuntu Software Centre is to run next set of commands from terminal:

sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade

sudo dpkg --configure -a
sudo apt-get install -f

More about: https://help.ubuntu.com/community/Repositories/Ubuntu, https://help.ubuntu.com/community/UbuntuSoftwareCenter.


Can't mount NTFS partitions, and don't have Windows installed to fix them

First of all, install VirtualBox and then head over to the official Microsoft VMs website. Download a VM (for instance, you might chose IE8 on Win7) and then unzip the file.

Then you need to:

import the OVA file (just double click on it and VirtualBox will open a wizard)
set up USB 2.0 in the VM properties (you will need to add the proprietary extension pack in VirtualBox)
boot the VM
connect the hard drive and attach it to the VM
in the virtualized Windows environment, open the prompt as administrator
type chkdsk /f E: where E: must be replaced with the correct drive letter
cleanly turn off the VM
from Ubuntu run sudo sync

Disconnect the drive from your computer and connect it again.

If you encounter other error related to hibernation, please check this answer:

https://askubuntu.com/a/145904/271


Converting mp3 with avconv keeping folder structure

There is a scriptable method that may be useful:

#!/bin/bash

# Define the old location and the new:
OLD_PATH="$HOME/test"
NEW_PATH="$HOME/alt_location"

# Create the directory structure in a new location:
find "$OLD_PATH" -type d -exec mkdir -pv "$NEW_PATH{}" \;

# Make the conversion and create the output filename and
# correct path. The cut '-f' setting matches the path
# structure and may need adjustment for your own needs:
find "$OLD_PATH" -type f -iname *.mp3 \
      -exec avconv -i {} -threads 0 -c:a libmp3lame -q:a 0 -vn \
      $NEW_PATH$(readlink -f {} | cut -d"/" -f 5-)/{} \;

This gives the highest vbr available, some more reading on mp3 settings in my references:

References:

FFmpeg MP3 Encoding Guide


Why would you try to open a PDF reader as root? Please think about whether this is really necessary. Remember that PDF and PostScript files can contain viruses, which exploit bugs in the reader software (although they are most often targeted at Adobe's Acrobat Reader, as it is the most far spread PDF viewer).

Please do not run any GUI application with sudo. It could mess up your permissions in your home directory. Use gksudo instead. You may have to install the package gksu before. Then you can open Evince (if you really decide that it is necessary) with

gksudo evince


How to create a launcher to execute a terminal command?

Well you could create a new document on your Desktop, name it something.desktop like ping1.desktop

Then put this in, Name= & Icon= lines can be whatever you want (usually best to full path Icon=) or you can leave Icon= blank

[Desktop Entry]
Version=1.0
Type=Application
Terminal=true
Exec=ping www.google.com
Name=whatever you want
Icon=

After creating right click on the launcher > Properties > Permissions > & check the Execute: box

(- you could also extend it's use to other pings if you use in unity's launcher  via added quicklist entries in the .desktop


Cannot browse Horizon "openstack-dashboard"

Ok it turns out that OpenStack  is not compatible with django 1.5
I've removed it and installed 1.4 and everything worked normally.


Trying to start zoneminder 1.28 on ubuntu 12.04

Old question, but not many straight forward answers out there so...

Every reboot I have to do this, but it gets Zoneminder running.

sudo mkdir /var/run/zm -p && sudo chmod 777 /var/run/zm/

Or
sudo mkdir /var/run/zm -p && sudo chown www-data:www-data /var/run/zm/

Then start

for me, its not a real risk to do either one of these, but you should check your own security needs before choosing.


How do I shutdown Oracle automatically every Friday at 10pm?

Back up /etc/crontab and then edit it to add this line:

0 22 * * 5 root /opt/scripts/backup.sh

(This assumes the script has execute permissions. If not, then put sh  in front of the command.)

If the script is to be run by some user other than root, replace root with the appropriate username.

By the way, I highly recommend man 5 crontab, which documents the full format for crontabs. (Also available online.)


Trailing mouse and other small graphical glitches, unable to install proprietary drivers in 14.04

I think your computer has Optimus technology.

There are two solutions:

Nvidia prime

The binary Nvidia driver added partial Optimus support in the 319.17 update.
You can install this by typing

sudo apt-get install nvidia-319 nvidia-settings-319 nvidia-prime

in the terminal to install the binary Nvidia driver. Prime will disable the Intel card, so you will only be using Nvidia. Nvidia prime is still work in progress and changing will be added. This works perfectly for me, and I have Ubuntu 14.04 with Optimus technology.
Bumblebee

The open-source project Bumblebee  tries to provide support for graphics-chip switching.
To install it, type

sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update
sudo apt-get install bumblebee bumblebee-nvidia primus

in the terminal. This works also very well. Before prime, I used this.

I hope this will fix the issue. If not, you can report this as a bug. Remember that Ubuntu 14.04 still is in beta stage.

EDIT:
A flickering mouse: Mouse cursor flickering and disappearing


Where can I access man pages for "aptitude" if it is not on my system?

Go to http://manpages.ubuntu.com/#navigation and search for "aptitude-curses". I do not know why there is no results for plain "aptitude", but the man page for "aptitude-curses" seems to have same content.

Alternatively in terminal:

cd "$(xdg-user-dir DOWNLOAD)"
wget http://manpages.ubuntu.com/dman
chmod +x dman
# now the dman script is ready to use in the current directory

./dman aptitude-curses
# also possible to tell release name, if not the currently used is wanted
./dman --release bionic aptitude-curses

UPDATE:

I suppose the best way is to install "debian-goodies" and use the provided dman; also a package called "bikeshed" provides the same command, so if you have it installed, you do not need to install "debian-goodies":

sudo apt install debian-goodies
dman aptitude


Minimum brightness level is brighter than the levels just above it

This is a bug in how ACPI backlighting is handled on your platform. Please install 'fwts', run the full suite, or just the backlight tests, and upload the results to a new launchpad bug.

See https://wiki.ubuntu.com/Kernel/Debugging/Backlight

Thanks.


Is there a keyboard shortcut to duplicate a line in gedit?

There actually is a 3rd party gedit plugin (compatible with gedit version >= 3.14) that adds a keyboard shortcut to duplicate the current line or selection. Here is how to enable it:

Download and extract the zip file containing the plugin from this GitHub repository: https://github.com/hannenz/duplicate
Alternatively you can use git (install it running sudo apt install git) to download it in your ~ folder using:
git clone https://github.com/hannenz/duplicate.git ~/duplicate

Copy the contents of the extracted or cloned (depending on how you downloaded) folder (duplicateline.plugin and  duplicateline.py) to ~/.local/share/gedit/plugins. If the folder does not exist, create it using your file manager or by running:
mkdir -p ~/.local/share/gedit/plugins

Then open gedit → click the hamburger menu (the icon with the three lines on the top right) → Preferences → Plugins and check Duplicate Line.

You can now use the Ctrl+Shift+D shortcut to duplicate the current line or selection.

To uninstall the plugin follow step 3 and uncheck Duplicate Line and also delete the files duplicateline.plugin and  duplicateline.py from ~/.local/share/gedit/plugins.


The block ramdisk module is called brd and can be loaded as follows:

sudo modprobe brd rd_size=100000

where rd_size is the number of blocks. After this step you have a device /dev/ram0 that you can put a filesystem on:

sudo mkfs /dev/ram0

and mount.


will cron.hourly prevent my ubuntu pc from sleeping if my suspend setting is for 1 hour?

No, the "suspend after one hour" is really a desktop thing and is just looking at human actions (keystrokes and pointer moves). You can check that the detection of inactivity works by using a different action (for instance, dimming/turning off the screen).

There are applications that can explicitly prevent the PC from going to sleep, typically file downloaders and torrent clients, so you have to review what you are running.


How do I open VMware Horizon View Client on Ubuntu 16.04 LTS?

Zach,

Open a terminal and type in:

vmware-view

This should open the VMware Horizon Client Gui where you can add your Server or Connections.

You will notice in the Unity Launcher an Icon for View, right click and select Lock to Launcher

Next time use the icon to launch it, hope this helps.


I don't use that tool but I suppose that even if it doesn't backup to the same directory, it needs to store some logs or temporary data somewhere on it.

Apart from the fact that having your root filesystem full is a bigger issue that needs solving first, I'll suggest a generic idea for finding out where it writes to.

Free up some space on your root filesystem. Find logfiles under /var/log that might have grown too large and haven't been modified in the last, say 3 days:

find /var/log -xdev -mtime +3
Move them elsewhere outside of your root fs or compress them (gzip/bzip2)
Set deja dup to back up a small directory
Create a file in /tmp: touch /tmp/tstamp
Run deja-dup
Find files which it modifies with find / -xdev -newer /tmp/tstamp

If it's the temporary files it needs to created on your root filesystem somewhere, you'll probably need to run the last find command during the execution of your backup.

Otherwise, if it's just the logfiles, you could probably find them after you run your backup. But ultimately, you need to free up space on your root FS.

Do you have separate partitions for /home, /tmp, etc.?


Unable to find hadoop-env.sh in hadoop folder

Run following command on terminal to find it :

find hadoop/ -name hadoop-env.sh

Replace hadoop/ with your hadoop folder name


ppa-purge will not work for you.

If you manually added that line to your /etc/apt/sources.list file you must manually delete that line from the file and then run the following command to update your package list:

sudo apt-get update

Then, run

sudo apt-get dist-upgrade

here's an example:

sudo gedit /etc/apt/sources.list

here's another example:

sudo nano /etc/apt/sources.list

When the file opens, locate the line "deb http://packages.bodhilinux.com/bodhi trusty main", delete the line or comment it out and save the file before closing the file. Then, run sudo apt-get update.

One way to find out what packages need to be downloaded it to run the following command:

dpkg -l | grep <whateveryouwanttosearchfor>

example:

dpkg -l | grep bodhi1

The subsequent output will list all the packages that need to be downgraded.

Also, this command will list all the bodhi packages installed:

dpkg -l | grep bodhi

To uninstall all those packages with one command run the following:

sudo apt-get purge bodhi*

or

sudo apt-get purge bodhi-*

edit: as provided by BCqrstoO

Open synaptic and select the "origin" filter on the left to determine which packages need to be downgraded.


Gnome shell does not log out properly in Ubuntu 11.10

If you are using Gnome 3.4 then be ready for it because 3.4 is not fully supported by 11.10
You will have broken packages,etc.

I have experienced it on my 11.10 and now also experiencing the Awesome performance with no problem in 12.04

Also you can try reconfiguring lightdm by entering the following command in the terminal:

sudo dpkg-reconfigure lightdm

Hope it solves the issue.


Ubuntu 14.04.1 howto set a short non complex password for very kiddies?

Just open terminal

Type

sudo passwd username

Then type your old password then new password.

Retry

And done


I recently upgraded from 64-bit XUbuntu 14.04 "Trusty" to the 64-bit XUbuntu 16.04 "Xenial" and then I experienced the same issue.

Here's the command that fixed this for me (run it on the cups server):

sudo mv /etc/systemd/system/multi-user.target.wants/cups.path /etc/systemd/system/multi-user.target.wants/cups.service

...then restart your server computer, or alternatively run this command:

sudo service cupsd restart

...and use your client machine to check if the problem is gone.

Now the explanation:

On *Ubuntu systems, there must be a cups.service file working as a symlink (a symbolic link) that points to /lib/systemd/system/cups.path. In other words, the correct should be this:

  /etc/systemd/system/multi-user.target.wants/cups.service ->
  /lib/systemd/system/cups.path

However, it seems that the most recent *Ubuntu builds are coming with a misconfiguration that has this:

  /etc/systemd/system/multi-user.target.wants/cups.path ->
  /lib/systemd/system/cups.path

...which causes the rc.d scripts not to work properly at bootup (system initialization / startup).

Renaming the extension of the symlink file from cups.path to cups.service (and then restarting the computer or the cups daemon) thus fixes the issue.

If the above solution doesn't solve the problem (or if such error is not present in your system), then another possible reason is the HostnameLookups parameter is set to Off argument instead of On. In order to fix it, just run this command on your cups server machine:

sudo sed -i -e 's/HostnameLookups Off/HostnameLookups On/' "/etc/apache2/apache2.conf"

...and then restart your computer. If you wish to force it to restart, run this command:

sudo telinit 6

After rebooting the server, use your client machine to check if the problem is gone.

If after all this the problem is still there, remove the cups init script links from your cups server machine:

sudo update-rc.d cups remove

...and then add the links back with their default settings:

sudo update-rc.d cups defaults

...then restart your server computer:

sudo telinit 6

...and use your client machine to check if the problem is gone.

If after this the service still isn't loading, maybe the symbolic link to cpus.service is missing. In order to fix it, first become superuser (run the command below the shell/terminal emulator):

sudo su

...and then run the supercommand below in order to create the symbolic link and start the service right after:

sudo ln -sf /lib/systemd/system/cups.service /etc/systemd/system/multi-user.target.wants/cups.service ; systemctl enable cups.service


You could also use regular expressions, which in my opinion make this more concise and gives you better control:

find . -regextype posix-egrep -iregex '.*(pdf|mp3)$'

This finds all files (or directories, unless you specify -type f) that end in pdf or mp3.


Amazon Kindle (Paperwhite) not recognized

I've stumbled upon the same problem. After installing mtpfs all worked fine.

sudo apt-get install mtpfs

Don't forget to remove and insert the usb cable again.

FYI: Mine is a Kindle Touch.


How do I install BeautifulSoup in Python2.7.12 in Ubuntu 16.04?

I'm not sure if this helps, but beautifulsoup needs a different version for python2.7 than it does for python3.6.  bs4 is for python 3.6 and bs3 is for python2.7.


Unable to reinstall missing package after update to 20.04

I'm also trying to run these same Heasoft tools off Ubuntu 20.04.
I tried to manually install libreadline7 with the muon package manager however this solution did not work.
Instead, I manually installed libreadline7 from https://packages.ubuntu.com/bionic/amd64/libreadline7/download then ran the usual sudo dpkg -i libreadline7_7.0-3_amd64.deb
You may have to install any missing dependencies but I didn't have any issues.
Xspec now runs perfectly!
$ xspec

        XSPEC version: 12.11.0
    Build Date/Time: Mon Apr 13 23:49:18 2020

XSPEC12>


Possible Solutions

While inserting your 16 GB USB Drive press F2 or Del to go to Bios and under Boot Device Priority section move Removal Drive to the top. If possible disable other boot options to check if it boots from USB or not. Save and restart your system.

Again While inserting your 16 GB USB Drive boot from Universal USB Installer that you used to install Ubuntu 12.04.3, this time chose Try Ubuntu instead of Install Ubuntu. Once started use Boot Repair to repair your MBR or Grub Menu.

I hope either 1st or 2nd way will solve your issue..


.deb Wps office 2019 only runs as root [kubuntu 21.04]

wps is available from snapcraft, you can install it through:
sudo snap install wps-2019-snap


Is it Safe to dual boot windows 10 and ubuntu in single ssd?

Windows files will not be damaged. The most common way that happens is when people mount the C: drive and accidentally delete windows system files as they are visible in Ubuntu even if they are not in Windows.

Before you install, make sure you shrink your partition using Windows. You can use Disk Management, Diskpart or a 3rd party app for this.
During install, select "Install Alongside Windows" option. This will automatically detect and install Ubuntu in the free space.
Finish the installation and you are done.

This does not usually run into issues but it is always safe to have a backup of important data.


How to disable physical mouse buttons below touchpad

Ok, as described in https://unix.stackexchange.com/questions/156949/how-to-keep-the-touchpad-but-want-to-deactivate-the-buttons, it's possible to deactivate the hardware buttons in a laptop using xinput. The basic steps are the following:

Get the name (or id) of your touchpad

xinput list

With that name (or id) you can disable you touchpad totally like this,

xinput --disable 12

being 12 the id of your touchpad, or you can disable only some buttons, using

xinput list --long 12

to get a map of the different buttons and then the option --set-button-map to remap them. For example,

xinput --set-button-map 12 0 0 0 4 5 6 7 8 9 10 11 12

disables the first three buttons in my touchpad, that is, left, center and right.


Best service to backup from ubuntu server

Have you considered CrashPlan? They support Linux (I'm running it from my Ubuntu 14.04 server) and they offer unlimited storage for a reasonable cost. If you're in the USA they also have the option of shipping a seed drive so you don't have to upload that 1 TB of initial backup.

They have 2 encryption options, one where your account password is your encryption/decryption key, another where you have a separate encryption/decryption key. It doesn't play well with local encryption from what I can tell.

I've been using it for the last 5 years. I've had no issues with backups, or restores.


Run this command from command line:

$ WorldOfGoo


The Enable keyboard LED option should show the corresponding applet on the MATE Panel with the Indicator applet added:

If it is not shown, try to toggle with:

gsettings set org.mate.peripherals-keyboard-xkb.general duplicate-leds false
gsettings set org.mate.peripherals-keyboard-xkb.general duplicate-leds true

and/or reinstall corresponding packages with

sudo apt-get install --reinstall libmatekbd-common libmatekbd4

The message about wnck is not related to the discussed problem, it is related to Workspace Switcher applet.


To force the grub screen to appear when booting the install, try holding down a key like shift or tab after powering on.

Once you get to the grub screen, type "e" to edit (instructions at bottom of the screen) and add the "nomodeset" word in place of the "splash quiet" words on the line starting with "linux". Then control X to boot.

The first thing to do is add the proprietary video drivers so you can boot without the nomodeset. Run "Software Updater" select the Settings button, and the Additional Drivers tab to select a driver. If you have wireless problems too, maybe use an ethernet cable until you get the video fixed.


There're lots of variables at play here, and you provided way too little information.

First of all, I would check if you can repartition your drive at all. Chances are there no GTP/MBR on the disk. In this case, you are out of options and should go with mounting additional EBS volumes.

Second, you might or might not have volume groups. Check with vgs/vgdisplay.

Third, you might or might not have software RAID array. Check with cat /proc/mdstat or mdadm --detail.

After exploring your current setup you'll have a better idea about what to do next. Safe approach: just create new EBS volumes and attach them to your instance.


http://en.wikipedia.org/wiki/Serial_ATA explains what you should expect from the SATA interface.

By the benchmark you should a have SATA 3 interface on the motherboard.

That's is a test made on my pc (SATA 2) with a Samsung SSD using Ubuntu 13.10

  EasyNote-TJ71$ sudo hdparm -Tt /dev/sda

  /dev/sda:  Timing cached reads:   3162 MB in  2.00 seconds = 1581.37
  MB/sec
  Timing buffered disk reads: 730 MB in  3.01 seconds = 242.69
  MB/sec

Installing time and loading time of webpages is capped by network speed.
Check http://www.speedtest.net/ to test network speed.


I'm using hashdeep to verify backups/restores and occasionally to check for file system corruption in a RAID.

The speed depends on which hash functions you use (some are more CPU intensive than others) as well as the read speed of your disks. On my system hashdeep can process or verify around 1 TB/hour with md5 and 300 MB/s read speed.

Example on calculating checksums and storing them in a file:

cd my-data
hashdeep -rlc md5 . > ~/checksums.txt

Parameters:

r – recursive
l – use relative paths
c – specify hash function
. – recursive starting at the current directory
> – redirect output to the specified file

See the man page.

Example on verifying checksums and printing a list of differences:

$ cd /mnt/my-backup
$ hashdeep -ravvl -k ~/checksums.txt .
hashdeep: Audit passed
          Files matched: 40914
Files partially matched: 0
            Files moved: 0
        New files found: 0
  Known files not found: 0

Parameters:

a – audit (compare with the list of known checksums)
v – verbose (to get a listing of mismatches, multiple vs means more verbose)
k – file of known hashes

Note that as of March 2016 hashdeep appears to be abandoned.


How to make a d-link dwa-123 wireless n 150 work on ubuntu 13.10 (saucy)

Type the following code in the console:

sudo apt-get install git build-essential
git clone https://github.com/lwfinger/rtl8188eu.git
cd rtl8188eu
make all
sudo make install

Then remove previously manual installed modules:
 eg:- sudo modprobe -r rtl8192cu

sudo modprobe 8188eu

Unplug , re-plug you should get going.

Tested on Dlink DWA-123  rev D1
Speedtest results : http://www.speedtest.net/my-result/3477686124


When creating the package, you have a debian directory, which contains the data needed for making the package (the control file, the rules, the changelog, etc.). dpkg-deb is not the usual way to make a package - it just offers a quick way to assemble one. You usually usedpkg-buildpackage instead.


WiFi how to automatically connect back to a preferred SSID when available

Create a new script with :
sudo nano /usr/local/bin/back-wifi-main

Paste the following content (replace  by your Wifi password)
#!/bin/bash

## Get the current Wifi
current=$(iwconfig 2>/dev/null | grep ESSID | cut -f 2 -d \")

if [ $current == "Emerg" ] ; then
    # Check if Wifi is back
    if nmcli d wifi list | grep '^\ ' | grep "Main" ; then
       # Reconnect to your wifi
        nmcli d wifi connect Main <password>
    fi
fi

Make it executable
sudo chmod +x /usr/local/bin/back-wifi-main

Finally add this script into a crontab
sudo crontab -e

and paste the following content to check every 5 minutes
*/5 * * * * /usr/local/bin/back-wifi-main


Why Firefox asking for the master password frequently?

There is a similar question asked over at support.mozilla.com. A couple of users feel that disabling sync or unregistering the particular machine from sync may help.


Yes, it is possible to install either the 32-bit and 64-bit versions of Ubuntu on a 64-bit computer. Ubuntu has been released with both options since the very beginning (e.g. warty warthog from november 2004).

The version with an i386 in the name is the 32-bit version and the one with amd64 is the one for 64-bit computers. Don't let the "i" or "amd" confuse you, it's the numbers that matter.

Also take a look at Ubuntu Certified hardware and the user-feedback at the Ubuntu Friendly pages.


Change multiple file names in sub directories in single line

for f in backup/*/filename.txt; do mv "$f" "$(dirname "$f")/someothername.txt"; done


Unable to connect to internet with Ubuntu 12.04 LTS

Change following settings on your vmware.. See the image below. To access the settings, select the virtual machine. Before you click " Play virtual machine", click the option " Edit Virtual Machine settings" below it.

Select following settings:

Click on " Network Adapter" and

Under Device Status > select connect at power on
Under Network Connection: Select>  NAT: Used to share the host....."

save the settings and start the virtual machine.

Hopefully that solves your problem, reply if you still have issues.


Desktop refuses to spread across dual monitors

The AMD (ATI) propietary drivers does not support multiple screens in Ubuntu 11.10 (Not yet) I'm waiting for a new release as well :(


Ubuntu 12.04 is stuck at startup after upgrading, now I wanna install a new copy of 13.10

yes,you can access windows 7 in the new bootloader after installing ubuntu 13.10 in the formatted partition.

If not,then boot into ubuntu 13.10,openup the terminal and run the below command to update grub,

sudo update-grub

After restart you will see both windows and ubuntu option on the grub menu.


How can I make a desktop wallpaper slideshow with my own images?

You might want to check out Variety.

  Variety is packed with great features, yet slim and easy to use. It
  can use local images or automatically download wallpapers from lots of
  online sources, allows you to rotate them on a regular interval, and
  provides easy ways to separate the great images from the junk. Variety
  can also display wise and funny quotations or a nice digital clock on
  the desktop.

To install -

sudo add-apt-repository ppa:peterlevi/ppa

sudo apt-get update

sudo apt-get install variety


Has the update process changed in 16.04?

apt has got rather better at producing less junk in its output than it used to, and various server-side changes also mean that it needs to fetch fewer files. [...]

So, yes, this is the new and expected behaviour.

Source:  This comment by Colin Watson


Dual Boot win 10 and ubuntu 16.04.1 / Grub2 failed to load windows boot loader

Turn off secure boot, and try again.  That's bug 1091464, still a problem on some machines apparently -- for the first time I did see a successful secure boot enabled Windows boot from grub this month, so maybe a fix is in the works.


How to remap keyboard permanently - Letters, not CapsLock or Num Lk

You may potentially wish to put this into /etc/rc.local.  rc.local runs during the boot process, specifically at the end of the boot process.  It permits you to run certain commands at boot, but before you login.

This may be one option for making these changes.  However, note that this isn't a permanent solution later - if /etc/rc.local is changed or overwritten, you will have to put this back into /etc/rc.local of your own accord.

You will need superuser to edit this.  Either sudo nano /etc/rc.local for editing it in a command line, or pkexec gedit /etc/rc.local to edit it from the GUI program gedit.

Caveats:

You must make sure to keep exit 0; at the end of rc.local!  This is to ensure that it 'exits' with a 'no failure' code, otherwise you could have other tiny but annoying issues crop up during the boot process (such as errors in dmesg or otherwise indicating you had a problem during boot).


Seek to a random point and play for some seconds in a video

Haha, the first person who answers this question is the person who asked it.

I use VLC, my video is a MP4 file. This works for me:

$ DIS=$( ffmpeg -i "the_path_of_your_video" 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,// | awk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 }' | cut -f1 -d. ) # get video Duration In Seconds
$ COS=  # a integer: the Count Of Seconds to play every time
$ RTP=$( expr $DIS - $COS ) # Range To Play is from 0 to $RTP
$ while true; do cvlc --start-time $(( ( RANDOM % $RTP )  + 0 )) "the_path_of_your_video" --run-time $COS vlc://quit; done

In case in the question:

$ DIS=60
$ COS=2
$ RTP=58 # 60 - 2
$ while true; do cvlc --start-time $(( ( RANDOM % 58 )  + 0 )) "the_path_of_my_video" --run-time 2 vlc://quit; done
$ # A in the question is $(( ( RANDOM % 58 )  + 0 ))
$ # Close  terminal window to kill this proccess


Apache 2 virtual host pointing to index.html

You shouldn't just drop stuff into sites-enabled.  You should use a2ensite to enable the site configuration in Apache.

The syntax is a2ensite [site].


Why is vim's colorscheme not coloring the entire window?

If your terminal supports 256 colours then set this in your .vimrc se t_Co=256 If you're not sure or didn't work then set this in your .vimrc se t_Co=16.

Let me know if it worked ;)


sudo dhclient eth0 | sudo: unable to resolve host ubuntu | Maybe DNS issue

Your problem is no default route is available as you see (route commanr response). This isobviously because of dhcp failed. So now you can set your network manually or read dhclient man.

Ok manually:

Set your interface ip an mask

sudo ifconfig eth0 <ipinsideyournrtwork> 255.255.255.0

ip inside your network can be 10.0.0.4 or 192.168.0.4 .
Now you can set default route toyour gateway (router)

But you must get router ip first. Fortunately you set your interface ip and this is where your network address comes from (ip masked by netmask). To get your router ip requires change the address end .4 to some common number like 1 or 138 or 254. The router ip and client ip must belong to the same network to get ping functional.
So try: ping 10.0.0.1 first when you set your ip 10.0.0.4, etc.
If you can ping your router then set the default route:

sudo route default add gw <yourrouterip> eth0

Cool you can check your default route with the route command.
The last step is set your dns server. But check your default route before, just try ping some ip outside your network, like google dns server 8.8.8.8 .


How do I fix "unresolvable problem occured while calculating the upgrade" (from Ubuntu 18.04 to 20.04)

ppa-purge is a package that you can install,
sudo apt install ppa-purge

then, read the documentation (man ppa-purge) to see (if) it can help you.


Why does root get "Permission denied" when trying to create this folder?

The answer is right there in the lsattr output:

# lsattr ..
----i--------e-- ../web2

The folder is immutable, even by root.


How to rename photo filename to include the date?

Krename is one possible tool for what you are trying to accomplish.

Install with:

sudo apt-get install krename

Then:

Select the files you want to rename
Choose rename input files in the destination path
Enter [creationdate;yyyy-MM-dd]$ in the advanced Filename template.

If creation date (of the file) is not what you want, krename can also use exif data.


I have the same issue if I want to install Ubuntu on my HP Folio 13. The issue is that your brightness is turned off. Try to shine a lamp to your screen and select Live Mode, and then set the brightness up.

If this works for you, you can Install Ubuntu and add this line to your /etc/rc.local file

echo 1666 >> /sys/class/backlight/intel_backlight/brightness


How do I make Broadcom Corporation BCM43142 wifi card work with Netgear WNR614 N300 Wi-Fi Router on Ubuntu 16.04?

Have you installed wl?  This is the broadcom proprietary driver.

According to this link, your driver is supported by wl (broadcom sta driver) but not b43 (reverse engineered driver firmware extractor).

http://linuxwireless.org/en/users/Drivers/b43/#Supported_devices

To activate wifi for your BCM43142:

sudo apt install bcmwl-kernel-source


That's because bash thinks the prompt is longer than it is. The escape sequence \e[0;31m for instance, gets sucked up by the terminal, which in turn turns the following text red, but bash doesn't know that. So, you have to tell bash that that sequence of characters should not be counted in the prompt's length, and you do that by enclosing it in \[ \]. I also recommend using tput instead of hardcoding terminal escape sequences.

red=$(tput setaf 1)
reset=$(tput sgr0)
PS1='\[$red\][\W]\$\[$reset\] '

See BashFAQ 53 and Terminal codes (ANSI/VT100) introduction for more.


How do I make the login screens and boot splashes match when installing different desktops?

You can remove the Lubuntu splash screen in several ways.  If you want to change splash screens every once in a while you can run:

sudo update-alternatives --config default.plymouth

You will be presented with a screen like the following:

In this case, entering a 0 or a 1 will set the splash screen to the Kubuntu logo, while entering 2 will set it to the default Ubuntu logo.

If you want to get rid of the Lubuntu logo permanently, you can remove the package using:

sudo apt-get remove plymouth-theme-lubuntu-logo plymouth-theme-lubuntu-text

Replacing lubuntu with the desktop environment you installed.

You might be asked to remove lubuntu-desktop that's OK, as its a meta package.

If you've configured gdm using sudo dpkg-reconfigure gdm you shouldn't have a KDE (KDM) login screen.  If your login screen looks something like this:

Then try configuring gdm again.  If that doesn't work you can remove kdm with:

sudo apt-get remove kdm

Again, you might be asked to remove kubuntu-desktop.  Its also a meta package, so go ahead and remove it.


how to prepare a flow chart using libre office writer

I would strongly suggest you use Libre Office Draw or Impress, not Writer, as it handles shapes much better. Impress also includes connectors. However, if you want to use Writer:

First click View -> Toolbars -> Drawing.

Then click on the flowcharts button, on the drawing tool bar. (For ease of use, drag the 3 lines at the bottom to make it into a permanent window.

Hovering over each item will show you what it does.

Click on one, and draw it on the page, then double click on it to type in it.

Then click on the Block arrows (Drag that off as well if you like).

And draw an arrow.

Repeat

My pronouns are He / Him

However, Libreoffice Draw is probably better for this. The icons are all the same, but it is better at handling the shapes than text - if you type something in text it will mess it up, but draw will be okay.


You just need to boot frem the Win XP CDRom and format you Disk with the NTFS Filesystem during the XP INstallation process. Do I missunderstand your question? Please give more information of what you have done yet.


Putting su at the top of the script, and then running the commands normally will work just fine. The reason you have to use sudo su instead of just sudo is because sudo only works on the main program, the redirection (>) is run without root privileges.


How to make title bar buttons invisible and visible on mouseover?

You'd need to make a custom theme where the buttons are not drawn unless the mouse pointer is hovering over them.


It should work with Ubuntu without additional setup. But kernel driver for this adapter may work unstable. I suggest to install a better driver from source.

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

This answer is applicable to hardware version 3.0 of this adapter with a Realtek chip. Previous versions should work well out of the box.

I packaged this driver to DKMS format and added it to ppa. If you instal it from there, you will not need to re-install it after kernel upgrades. It can be installed by

sudo add-apt-repository ppa:hanipouspilot/rtlwifi
sudo apt-get update
sudo apt-get install rtl8192cu-dkms


manipulate files with wildcard characters in filename

You need to either escape or quote the wildcard:

rm '*.txt'
rm \*.txt


Why isn't the Printscreen button working in Gnome?

Actually it's working if you hear a sound. You screenshots are saved to the picture folder.

The Gnome guys changed the default behaviour, take a look at the Launchpad bug or at the upstream bug report for more details.


User permission denied to follow Softlink in root's home

As mentioned in the comments, the /root is missing the execute permission. If the upper folders do not allow the execution, you cannot look inside the sub-folders (even if you have permissions for this folders)

So add execute permission to the root folder with:

$ sudo chmod a+X /root

And it will work.

Word of advice, don’t store anything in the /root folder! There is no good reason for it. It is the home of the root user and should not be used for anything else. So after you tested that it works, remove the permission with sudo chmod go-X /root/


This  may help you. It's a bug, I think, I'll have to search but this method will let you pass the login screen.


How to mount and sdb and move /home directory to sdb

First you have to create a new partition on sdb with fdisk. You have to format this partition with ext4 (or any other filesystem type you want).

To move all the data I recommend you to boot from a LiveCD/LiveUSB. Mount sda2 in /mnt/sda2 and sdb1 in /mnt/sdb1. Then copy all the data from /mnt/sda2/home to /mnt/sda2. Finally you have to edit the /mnt/sda2/etc/fstab to automatically mount the /home filesystem:

UUID=37xxxxxxx /home           ext4    defaults        0       2

you can get the UUID with blkid

$ sudo blkid /dev/sdb1
/dev/sdb1: UUID="379xxxxxx" TYPE="ext4" PARTUUID="0006a6c7-06"


The Samsung Unified Linux Driver might be appropriate. I haven't tested it driver, but this installation guide looks up to date.

I hope this helps point you in the right direction.


Triple boot Windows 7 64 bit, Windows 7 32 bit and Ubuntu

". . . whereas there are 3 partitions already set up . . . and Ubuntu can only hv 4 partitions due to which I am unable to make what I need!!!"

Last I checked 3 was less than 4. Make an extended partition and put anything you want in logical partitions inside it.

Ubuntu does not limit the number of partitions, that is the nature of your hardware. Anyway it is only a limitation on the number of "primary" partitions, not of total partitions.

From Windows, shrink your windows partitions as much as practical. If you need to shrink them more than they will shrink easily, there are ways to to defeat the stuff MS does to make it difficult, and shrink them further, but that is another subject. At any rate shrink them ENOUGH. For whatever you want to install.

Then boot an Ubuntu live disk and use the program "gparted". Make an extended partition of all available space (if you didn't shrink Windows efficiently you may waste some hd space, but you can fix that when it becomes pressing). Then make "logical partions" as you wish for what you plan to install. Or you can put that last step off and do it as you install each OS if you plan on more than 3.


Your script should look like:

# description "Starts HMA VPN"
# author "Me <myself@i.com>"

start on runlevel [2345]

stop on runlevel [016]

respawn

expect fork

exec sudo /usr/local/bin/hma-vpn -p tcp London

To start it, use:

sudo service hmastart start


Ubuntu 18.04 Copy contents of multiple directories to external server

Précis of comments under the OP.

I would recommend the use of rsync where you can set parameters as required to delete source files files after a successful transfer to another volume.

Referring to rsync Linux Man page here the command line rsync --remove-source-files -rte 'ssh -p23' {directory1,directory2,directory3} /mnt/share/Backups/ works having referenced this link which outlines the specific arrangements for deleting source files after transfer.

This can be automated of course by using a cron job to schedule it.


How to remove/delete Podcast feed in Rhythmbox?

Under Podcast within Rhythmbox highlight the one you want to remove and then move the mouse up to the top left hand menu. Under edit there should be delete

Just tested this and I can right click individual feeds and delete them also from the small right click menu that pops up


How to create daily offsite backups of a server, prepared on the server then pushed/pulled offsite?

This will be a 2 part solution,
1- install FSArchiver

sudo apt-get install fsarchiver

the way to use it can be found at www.fsarchiver.org/QuickStart

The next step is to install an ftp server on the remote machine where you want to save your backup image.

you can then use cron jobs to create the image and to upload it to the ftp server.


Black screen with sound when starting Counter Strike Source

Please ask in the Steam for Linux community group or on https://github.com/ValveSoftware/steam-for-linux/issues
It is advisable that you use the latest proprietary drivers for Steam for Linux.


Radeon Open Source Drivers Configuration

Did you try system settings --> Display?


what does php use if multiple MTAs are installed?

This can be configured via php.ini but by default it will use sendmail Most MTAs replace the sendmail binary with their own copy, so whatever package is providing the sendmail binary is the one that php is using, providing you made no config changes.

As a side not do not install multiple MTAs. There's almost no away they will all work.


It doesn't matter what your system specifications are. If you are willing to install ubuntu, go with the 64 bit . It is always better. For yor ram though, 32 bit will work ok. Choose what you want, i would go with 64 bit.


dependency error while installing openssh client

Running apt-get install openssh-clients is preferred way as already mentioned, but I just wanted to answer your questions:

From repository using apt-get you will get not only the actual package (deb), but also dependencies (dependent packages). This can't happen when installing using dpkg, because dpkg does not have any information about your repositories and just install what gets as a file. The dependent packages are in different deb files you would have to provide separately.

  works on one machine and why it doesn't work on another.

The reason why it does work for you on different machine is probably simple that you have libssl already installed on the one machine, but not on the other.


Shutting down with power button without x11-session

... aborts the script when no gui-power-manager is found ...

The opposite is true. When any user with any gui-power-manager is running, the script is aborted.

It seems that when you switch to another console and log in as the same user that runs the X11 session, the script assumes that you are on the X11 session and that the g-p-m will handle the key press; probably the gui-power-managers nowadays are smart enough to understand that they are not the active console and ignore the key.

(edit) Just tried it:

The script only shut down on a console, when no x11 session is present, regardless of the users logged in
It will even fail to shut down when only lightdm is presenting its login prompt.

You should file a bug or add a 'me too' to an existing one.


Connecting Mac and Ubuntu through LAN for audio

Airplay on Mac and Shairplay or ShairPort on Ubuntu.

Alternatively,

The Kodi mediacenter has native stream and receive features of Airplay audio.


Please, find a Decent Audio Driver for Lenovo Y50-70 in Ubuntu 14.04 LTS (has JBL Speakers, but Linux unable to use max potential)

it seems that for ubuntu subwoofer doesn’t work out of the box, I got my Y50-70 subwoffer working by changing two config files:

/etc/pulse/default.pa
 add this line at the end: load-module module-combine channels=6 channel_map=front-left,front-right,lfe

/etc/pulse/deamon.conf
 modify ; enable-lfe-remixing = no to enable-lfe-remixing = yes (remvoe the ';' to uncomment the line)

references:
  http://www.andreagrandi.it/2013/06/22/how-to-make-subwoofer-work-in-ubuntu/

This should have this sorted for you, if later you have any issues with directly controlling the subwoofer volume, install "pavucontrol".


My Ubuntu Disks won't boot. What am I doing wrong

Are you sure you are "Burning an image to disk", and not "creating a data disk" that contains the ISO?


How do I find my network IP address, netmask, and gateway info?

I have this command as an alias for "ipconfig" (up to 14.04):

nmcli dev list iface eth0 | grep IP4

An example listing is:

IP4-SETTINGS.ADDRESS:                   192.168.1.110
IP4-SETTINGS.PREFIX:                    24 (255.255.255.0)
IP4-SETTINGS.GATEWAY:                   192.168.1.1
IP4-DNS1.DNS:                           208.67.222.222
IP4-DNS2.DNS:                           208.67.220.220

If eth0 doesn't work, you may need to use eth1, eth2, ... depending on your configuration.

EDIT: 2/8/16

Note that this only works in versions before v15.04 (or possibly before v14.10; I have v14.04). For newer versions, you can use this:

 nmcli dev show eth0


Ubuntu bypassing the login screen after reboot

remove those lines starting with "autologin" from /etc/lightdm/lightdm.conf
This should resolve your first problem: it won't log you in automatically anymore.

Just for reference - my lightdm.conf in 16.04 looks like this:

[SeatDefaults]
greeter-show-manual-login = true
greeter-hide-users = false
allow-guest = false

In the next step have a look at various logfiles for clues on why you are logged out again:

/var/log/lightdm/*.log
/var/log/Xorg.?.log


1/ Firstly

sudo dpkg --configure -a
sudo apt-get update && sudo apt-get upgrade -y

2/ if it does not work:

sudo apt-get install -f
sudo apt-get update && sudo apt-get upgrade -y

3/if it does not work:

sudo dpkg --force-all --configure -a
sudo apt-get update && sudo apt-get upgrade -y

4/ if it does not work:

sudo dpkg -P --force-all bluez
sudo apt-get update && sudo apt-get upgrade -y


Memory size reported by /proc/meminfo is less than my physical RAM

It's a common practice on laptops. The Graphic memory is usually shared with the main RAM of the system and it is dynamic, which means it increases and decreases on demand.

It can grow until 1,7 GB, and this value seems standard if you have a system with 4,0 GB of RAM, on Intel systems it's called DVMT:

  Dynamic Video Memory Technology (DVMT) is a method for dynamically
  allocating system memory for use as graphics memory to balance 2D/3D
  graphics and system performance. If your computer is configured to use
  DVMT, graphics memory is allocated based on system requirements and
  application demands (up to the configured maximum amount). When memory
  is no longer needed by an application, the dynamically allocated
  portion of memory is returned to the operating system for other uses.

  Many graphic-intensive applications (especially games) require a
  minimum amount of video memory in order to run correctly (or to run at
  all). Video memory is allocated based on the amount requested by the
  operating system. When the memory is no longer required, it is
  returned to the operating system for use by other applications or
  system functions.

  DVMT allocates memory based on system needs. Some newer systems have
  an option in the system BIOS that adjusts the amount of memory
  available for DVMT. Memory can be allocated up to the maximum limit
  set by the graphics driver. Unlike previous operating systems, Windows
  Vista* and Windows 7* have greater control over memory management and
  determines the amount of the graphics memory together with the Intel®
  Graphics Driver.

Source: http://www.intel.com/support/graphics/sb/CS-029090.htm


The write(1, ... call writes to the standard output.
Change it to write to a file.

(And this program lacks error handling for all the set functions.)


How do I boot from USB in Ubuntu, to install Windows 10?

Most modern computers with a UEFI BIOS will jump directly to the first installed boot loader, and not give you any time to choose an OS.
Make sure your boot device is plugged in - and bootable - meaning it just needs the right files on it - either a UEFI Boot file, in a FAT file system, or formatted with a legacy boot sector with boot files compatible with that boot sector. (Eg. in your case just a plain Windows install disk, on a medium that Windows has built in drivers for, and will be able to read once booted.)
With the drive inserted, there are two fool-proof ways to select your boot device:
Option 1: Enter the BIOS and select the boot device from there.
Most modern BIOSes let you select a boot device from its main page, by simply pressing ENTER on the relevant device.
You can also change the boot order here - but be sure to save your selection by pressing F10 or whatever the on-screen instructions say - otherwise any changes you made will just be ignored.
Option 2: Enable CSM Compatibility Mode
Most modern UEFI BIOSes, in order to speed up the boot process, don't usually load drivers to read USB devices and legacy boot sectors - and this has to be selected and enabled manually. Without this enabled, the BIOS won't even see USB devices during the boot process, and it will just load the OS that it is programmed to load without looking at anything else.
Option 3: Tap DEL INS F1 F2 F8 F10 F11 F12 or whatever the boot selection hotkey is
For most BIOSes you have to, from the moment you press the power button, repeatedly tap the correct boot selection key, for which there is no standard - and you can usually find it through a bit of patience and trial and error. Just tap one of the above keys repeatedly for at least 30 seconds after power up, and see what happens. If nothing happens, reboot and try the next key.
To make things simpler, many BIOSes have an option to wait a few seconds on boot-up - and to display the relevant keys - when you do get into the BIOS, take your time to look through all the settings, and I'm sure you will find it.
If it still doesn't work...
The drive you selected might just not be bootable, because it might be too old, too new, or just not formatted properly, or damaged. It can be painstaking and frustrating to get it right, so be very systematic and write down the steps you tried and what happened.
I noticed from the guide you linked that they say you can choose GPT or MBR. I can tell you now that GPT won't work, so reformat it and make sure you choose MBR. I also didn't see any recommended filesystem - but I can also tell you that anything other than FAT32, VFAT or FAT are unlikely to work either, and that those are the only filesystems I've seen UEFI support.


Script to open terminal and show the output of the running commands

I want to run 1 script. Basically I want on login to have terminal automatically open, and then have apt-get update/upgrade/dist-upgrade run, showing the output in that screen. That's all.

Make sure your script is executable and add this command to Startup Applications:

gnome-terminal -e 'bash -c "sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade; exec bash"'

This will open gnome-terminal, which will start a non-interactive bash shell (which will run sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade) and will later replace the current shell with an interactive bash shell.

If you have sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade already in a script, it would probably be more pratical to set Startup Applications to launch the script and maintain the script instead of the command in Startup Applications:

gnome-terminal -e 'bash -c "/path/to/script.sh; exec bash"'


teamviewer 10, ubuntu 14.04 , connection problem

The answer is in your question , Open your terminal and type or paste

sudo apt-get install winbind

then try to launch again.


How can I always show the close, minimise & maximise buttons into their own windows?

This command brings menus and controls to their own windows:

sudo apt-get remove indicator-appmenu

This moves the controls into the window, but only when the window is restored. When maximised, the controls go back at the top, but that's OK because it's maximised anyway.

Removing the menu entirely (same answer):

How do I enable or disable the global application menu?


Log in as unix user using password stored in htpasswd

The Linux system normally uses the sudo passwd userid tool for setting the password.  A connvenient way to have the same password for both htpassword/htaccess and the Ubuntu System's login accounts is to set the passwords as the same.

A Linux account can't have two different passwords for logging in.  However, the same password can be set for two different accounts.  To achieve what you have described you would have to set the same password for the two different account... the Linux account and the htpasswd account (which is the web server account).

Performing the latter is often done for convenience.


I also have an hp zbook studio g5 x360 which I've been struggling to get things working in Ubuntu (also tried Mint). To get it to boot, at the grub boot menu, remove quiet splash and replace with nomodeset. This allowed me to boot and install Ubuntu.

Some other issues you may run into:

Display resolution issue (I have the 4k screen): Manually install Nvidia drivers
Touchpad not working: I have not been able to resolve this yet but there are a couple kernel bugs filed that are related and one other question here on AskUbuntu about this that does not yet have a solution. One thing I have found as have others is that if you suspend Ubuntu and then wake it back up, the touchpad will partially work. I'm using a bluetooth or usb mouse until I get this resolved.
Display brightness can't be adjusted in settings: The only thing I found for this is to install xbacklight ( sudo apt-get install xbacklight ) and use that to control the brightness percentage ( xbacklight 20 )


Cannot play internet stations with media player (Lubuntu 13.04)

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

sudo apt-get install gecko-mediaplayer


Ubuntu 18 libreoffice not dragging to sides

I track down that issue occurs with installed libreoffice-gtk3 package. Remove this package and libreoffice windows should works fine.


Steam won't launch properly without terminal command

Edit the wrapper which starts steam:

Open a terminal (ctrl+alt+t) and enter the command

sudo nano /usr/games/steam

go down 5 lines (after the line which says "set -e") and enter your string from above:

LD_PRELOAD='/usr/$LIB/libstdc++.so.6' DISPLAY=:0 steam

This should be on a line by itself.

Now press ctrl+o to save the file, and ctrl+x to exit nano.  Steam will now run without needing that line typed.


how do I uninstall Ubuntu, when the traditional ways fail?

If you have already gone to Start > Control Panel > Programs > Programs and Features and Ubuntu not listed there , probably something went wrong with the uninstall. (or install)

One suggestion is to Install it again and try to Uninstall it (again).

Another suggestion might be to correct the boot-loader (if the issue is in boot-loader "Ubuntu" entry comes up) . Correct the boot-loader with a CD/DVD of Windows Version you have , by "Repair" option.

Thanks


Having two partition of Home on ubuntu, increasing home

For option 2
A LiveCD or similar media is required because it is not recommended to manipulate a mounted partition.
Boot into the LiveCD and run gparted.
Delete the "D" partition, then make a swap partition there.
Click on partition --> information, and write down the UUID of the new swap partition.
Use a text editor to edit /etc/fstab. The entry for the swap partition will look like this:
UUID=<UUID>  none    swap      sw    0       0

Rplace the UUID with the one for the new swap partition.
Again in gparted, delete the old swap partition, then grow home to fill the empty space.
For Option 3
Live media is not necessary for this option.
Run gparted. Delete the "D" partition and create an ext4 partition in the free space.
Click partiton --> information. and write down the UUID of the new partition
Now create a new folder in your home folder.
For auto mounting, edit /etc/fstab to add the line:
UUID=<UUID> /home/<username>/<newfolder>  ext4   default     0       2

replace UUID, username and newfolder as appropriate for your system.
and reboot
note: be sure when copying the UUID to /et/fstab as a wrong number will cause a boot error.


How to install hashcat-utlis into the system 18.04?

Most unix applications will look for other applications in your PATH environment variable. Once it's copied to one of the PATH directories most applications should find it.

View your PATH env variable with the following command:

echo $PATH

More about the PATH env variable: https://kb.iu.edu/d/acar

Some applications may also allow you to specify the path for applications they use. Check their configuration files or command line options.


How can I run a command at start-up on Ubuntu server not as root?

See /etc/crontab

You can set it up to start something with a "user" and have options

string         meaning
------         -------
@reboot        Run once, at startup.
@yearly        Run once a year, "0 0 1 1 *".
@annually      (same as @yearly)
@monthly       Run once a month, "0 0 1 * *".
@weekly        Run once a week, "0 0 * * 0".
@daily         Run once a day, "0 0 * * *".
@midnight      (same as @daily)
@hourly        Run once an hour, "0 * * * *".

Default on any Ubuntu machine:

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )

So basically you want somerthing like:

@reboot {your_user} {your_script}


How Do I Add iHeartRadio Stations to Radio Tray?

Many of the iHeartRadio stations are streamed through Akamai via akacast.akamaistream.net or similar.  However, there are several different streams (yes, multiple streams) available.  To get the station streams using Chrome:

browse to your iHeartRadio station to listen
right click the page and select View page source

There are several key javascript variables (as of this writing) used to identify the station and its streams.

search (ctrl-f) for "streams"

The relevant text should be in a section of javascript in a variable "window.__store" (also near variable "BOOT").  The data is encoded using JSON.  The "streams" area is a compound list of streams for the radio station as "streams":{"key":"value",...}.  These key-value pairs list the stream type (key) and its stream (value).

You can use any of these streams that suit your purpose.  For example, I get (formatted for clarity):

"streams" : {
  "hls_stream" : "http://c4.prod.playlists.ihrhls.com/3379/playlist.m3u8" ,
  "shoutcast_stream" : "http://kzps-fm.akacast.iheart.com/7/775/20092/v1/auth.akacast.akamaistream.net/kzps-fm" ,
  "secure_rtmp_stream" : "rtmp://cp20092.live.edgefcs.net/live/Dal_TX_KZPS-FM_OR@152687" ,
  "secure_hls_stream" : "https://c4.prod.playlists.ihrhls.com/3379/playlist.m3u8" ,
  "secure_shoutcast_stream" : "https://kzps-fm.akacast.akamaistream.net/7/775/20092/v1/auth.akacast.akamaistream.net/kzps-fm"
}

Now, you're good to go.  I've tested all these streams by adding them as stations in Banshee.  All but the "secure_rtmp_stream" work.  If you want to use RTMP, you'll need to use other tools such as vlc, ffplay, rtmpdump, and flvstreamer.


For assign certain key to other, you need two tools, already available in ubuntu: xev and xmodmap

With xev you can output some information about the pressed key, or with

xmodmap -pke

you can read all the configured key, keycode and action.

With xmodmap you can change key map.

For example, this command assign tab action to backspace key (keycode 22):

xmodmap -e "keycode 22 = Tab"

to reassign to backspace is natural function, type:

xmodmap -e "keycode 22 = BackSpace"

These change will be lost after reboot. if you want that the changes are always loaded, you must create a file containing the keyboard mapping and load when the session start:

xmodmap -pke > ~/.Xmodmap (create file configuration .Xmodmap in your home directory)

then create file .xinitrc in your home directory (if not exists) and add this line (or append if file exists):

xmodmap .Xmodmap

this command loads the configuration at the start of each session.

You can create keyboard shortcuts by installing AutoKey from software center.
After install, run autokey and create new phrase like this:

the key combination  Alt+a  will emulate the tab key.


Sounds like the problem might just be in the modified /etc/environment file; since you said you modified this, why didn't you post the contents?

Most likely, it is something fairly simple, like a space or spaces around the equals sign.  If you put something like export foo = bar instead of export foo=bar, then the shell will attempt to export 3 variables:  "foo", "=", and "bar".

Why are you modifying that file?  Normally, you should modify $HOME/.bash_profile unless you have multiple users who need the same path.  If you are administering a system for multiple users, then you need to be more careful in making changes.

Also, you should be more careful about posting quoted error messages; you misspelled "identifier".  It's better to actually cut and paste errors to get them exact.


apt-get update gives 404 error on all main ubuntu mirrors

thanks @Doug Smythies for pointing that ubuntu 19-04 disco is now EOL (End Of Life) so when this happens, one should upgrade to the latest "10" version with command:

sudo do-release-upgrade

https://www.omgubuntu.co.uk/2020/01/ubuntu-19-04-end-of-life


Search for text in a file, then rename the file with that text

An awk command that reads the file and renames it:

awk -F '[:)]' '/ProcID/{printf "echo mv %s %s.txt\n", FILENAME, $2 | "/bin/sh"; nextfile}' O*.TXT

Since the ProcID line is actually:

JOB 04508907 (ProcID:0000019324) START AT 22.12.2016 / 09:10:45

To extract the I,P we need to split on both : and ), which will give us 0000019324 as the second field.

Remove echo to actually execute the move. Use this only if the filenames and ProcID don't contain spaces or special characters.

This command gets the ProcID by splitting on : to get the second field, then uses it and the special variable FILENAME to construct the command. GNU awk's documentation suggests the printf ... | "/bin/sh" method. Then we skip to the next file.


Remote access a dynamic ip address on a 3g dongle?

Yeah it's possible to have remote access using a 3g dongle. To get started, open up the terminal on the machine you want to remotely access and type ifconfig and note the ip address under the pppoe section. This will be the ip address of your machine on the internet. Then you can just ssh user@ip_address from your other machine and you're good to go.

However there are some problems with this method.

Your ip address might change every time you reconnect the dongle since it uses dhcp to get its ip address from its server. So you might have to perform ifconfig every time which defeats the entire point of remote access.
Since your dongle probably doesn't use NAT, all your open ports are exposed to the internet which could be potentially dangerous. I'd suggest you use iptables or some other firewall to close up the ports which are not required.


Try this first:

Go to settings -> software updates -> additional drivers.
Wait while Ubuntu searches for compatible drivers.
If NVIDIA 361.45.11 is available then select it and click the Apply Changes button.
If it is not available, use the newest compatible NVIDIA driver that is listed.

Alternatively, try this:

Use the steps shown on the website below to download the drivers directly from Ubuntu's repository:

https://linuxconfig.org/how-to-install-the-latest-nvidia-drivers-on-ubuntu-16-04-xenial-xerus

Final note: Use the newest compatible drivers only. I highly recommend picking a driver from the list under Additional Drivers rather than manually intalling one to avoid issues that may be caused by potentially incompatible drivers.


4 steps are needed:

1) install the drivers

2) Register the printer (PPD)

3) Register the printer in the ccpd daemon setup file

4) Start ccpd daemon

STEP ONE
go here http://support-asia.canon-asia.com/contents/ASIA/EN/0100459601.html and download and save what will be linux-capt-drv-v271-uken.tar.gz

open a terminal; copy each command below; line by line; paste it into the terminal; hit ENTER key after each paste;

cd Downloads
tar -zxvf linux-capt-drv-v271-uken.tar.gz
cd linux-capt-drv-v271-uken/64-bit_Driver/Debian
sudo dpkg -i cndrvcups-common_3.21-1_amd64.deb
sudo dpkg -i cndrvcups-capt_2.71-1_amd64.deb

Now we assume you have only one usb printer; and that is the LBP2900;

STEP TWO

sudo /usr/sbin/lpadmin -p LBP2900 -P /usr/share/cups/model/CNCUPSLBP2900CAPTK.ppd -v ccp://localhost:59787 -E

STEP THREE

sudo /usr/sbin/ccpdadmin -p LBP2900 -o /dev/usb/lp0

STEP FOUR

sudo /etc/init.d/ccpd start

then you should be able to open LibreOffice or some programme and see if you can print


Unable to get updates, how do i resolve the problem?

Hmm, a 404 Page Not Found error. I'd recommend starting off with some basic internet troubleshooting:

If you're using Wi-Fi, disconnect then reconnect.

If that doesn't fix it, try rebooting the router.

Can you load any pages at all? If not, get the bugs worked out of your internet. When you can reliably browse the web, try again.

If basic internet troubleshooting isn't cutting it, try temporarily changing your DNS (don't worry; this is not permanent, and is much easier than it sounds!)

Go to the Network Connections manager. (Click on your connection icon in the system tray and choose Edit Connections. The one accessable via the System Settings panel doesn't have what we need.)
Go to the appropriate tab (Wired/Wireless) and click New. Name it something like "Home Wi-Fi (OpenDNS)" or "McDonald's Wi-Fi (OpenDNS)" or "Auto Ethernet (OpenDNS)".
Enter the details of your connection, but don't click Save... just yet.
After you have all the appropriate details set up, go to the IPv4 Settings tab. (This procedure is identical for both Wired and Wireless.)
Choose Automatic (DHCP) addresses only.
Okay, brace yourself, this is the really, really hard part, I mean it:
Under DNS Servers, enter 208.67.222.222, 208.67.220.220. Now click Save....
Disconnect from your internet, then (re)-connect to the connection you just created.
Now, type:

sudo apt-get update
sudo apt-get upgrade

After you're done, go back to your "Normal" connection, or, just stick with OpenDNS. It is faster in most cases.

If all that still didn't fix it, perhaps you added a software source with a typo? That happens to the best of us... (aka me :P)


Problems with booting ubuntu after formatting boot partition

You've been digging yourself into a deeper and deeper hole. Fortunately, I think you can still recover. Both to warn off others and to help you learn, I want to point out a few of your mistakes:

Re-installing Ubuntu because of a boot problem is almost always overkill at best, and runs the risk of destroying your user data at worst. You say that your data still exists, so you may have just wasted some time, but I want to point this out because it could have gone very badly, with lost user data to add to your boot problems.
Attempting to run Boot Repair from a BIOS-mode boot on a computer that was originally set up in EFI mode was a mistake. You probably didn't even realize you were making this mistake, but you did -- the fact that Boot Repair was complaining about the need for a partition with a "bios_grub flag" was a clue about this mistake. (This complaint from Boot Repair is clearly not very informative to anybody but experts, sadly.)
Changing the flag on /dev/sda1 from boot to bios_grub was a mistake. In parted and GParted terminology, the "boot flag" identifies an EFI System Partition (ESP), which is a partition that holds EFI boot loaders. A "bios_grub flag," OTOH, identifies a BIOS Boot Partition, which holds second-stage GRUB boot loader code for BIOS/CSM/legacy-mode boots. When you re-installed GRUB in BIOS mode, it overwrote the first few sectors of /dev/sda1, thus damaging the data on the partition. It sounds like your problems began with accidentally trashing this partition, so you probably didn't really do any more damage (except possibly to your /etc/fstab file), but this was definitely the wrong approach to take. If your problem had had a different cause, this mistake would have made recovery even more difficult.
Telling Boot Repair to treat /dev/sda1 as a separate /boot partition was also a mistake. You ended up telling it to treat that partition as two mutually exclusive things: as a separate /boot partition and as a BIOS Boot Partition. This could have messed things up even further, but it looks like it didn't really have much of an effect.

As further background on EFI booting, you may want to read my Web page on the subject, the Ubuntu community wiki on EFI booting, and/or Adam Williamson's blog explaining EFI issues. All three of these pages provide background information that may help you deal with this type of problem in the future.

As to the solution: There are several approaches, but I recommend you begin by fixing some of the problems that must be dealt with for any solution:

Boot a Linux emergency disc.
Use GParted or parted to change the "flag" on /dev/sda1 to boot. Alternatively, use gdisk to change the type code on this partition to EF00.
Create a fresh FAT32 filesystem on /dev/sda1. You can do this with GParted or by using the command-line mkdosfs or mkfs utility.
Mount /dev/sda6 and edit the /etc/fstab file on it. You must add an entry to this file to mount /dev/sda1 at /boot/efi. It should look like this:

.

/dev/sda1      /boot/efi   vfat        fmask=133       0 0

Alternatively (and preferably, in some ways), you can change /dev/sda1 at the start of that line to UUID="XXXX-XXXX", where XXXX-XXXX is the "UUID" (really a serial number) value for the partition, as reported by blkid. This value will only be valid after you've created a fresh FAT filesystem on the partition, so it's unknowable as I write this answer.

Once you've made these changes, you must install a fresh EFI-mode boot loader. Several choices are available. The two that are likely to be easiest to install are:

rEFInd -- You can install rEFInd by booting into Linux using whatever method works, verifying that /boot/efi is mounted, and installing the Debian package, available from the rEFInd downloads page.
GRUB 2 via Boot Repair -- The Boot Repair tool should re-install GRUB; however, you must run the program when booted in EFI mode. Check for the presence of a directory called /sys/firmware/efi. If it's present, you've booted in EFI mode and you can run Boot Repair. If it's not present, you've probably booted in BIOS mode and Boot Repair will be useless at best. If you've booted in BIOS mode, go into your firmware setup utility and disable BIOS/CSM/legacy support; or use your firmware's built-in boot manager to select a boot option that includes the string "EFI" or "UEFI." Unfortunately, I can't be more specific because firmware setup utility and firmware boot manager details vary so much from one computer to another.

It might be necessary to wipe the BIOS-mode GRUB code from the first sector of your hard disk. If you complete the repair and still can't boot from the hard disk, try booting to Linux and typing the following command in a Terminal:

sudo dd if=/dev/zero of=/dev/sda bs=440 count=1

Be very careful when typing that command; a slip-up, especially if you omit or specify the wrong value for bs= or count=, can do serious damage to your disk. That's why I didn't include this in the main recovery procedure.

Good luck!


bluetooth not detecting devices (firmware error

The broadcom BCM43142 Bluetooth adapter needs an additional (updated) firmware to function correctly.

Look at Bluetooth not working on ubuntu 14.04 with dell inspiron 15-3521 for instruction on how to do that.

In short, you need to extract the firmware from the Windows driver and copy the resulting .hcd file into /lib/firmware/brcm/BCM43142A0-0a5c-21d7.hcd