Better nice: how can I pause a demanding process completely if the computer is unidle?

An alternative way to manage (pause) a demanding process while the computer is used

I tested the script below in combination with kdenlive, rendering a large video. In the tests, it worked fine. The (background) script itself consumes practically no resources. The only thing it basically does is check once per 5 seconds if the targeted process runs. Only if so, it will check the current idle time. Both mean nothing to your system

The script is based on the usage of xprintidle.  xprintidle keeps track of both keyboard- and mouse events and measures the time there was no activity. If the demanding process starts, it is immediately paused (since the computer is obviously used) with the command:

kill -STOP <pid>

If, subsequently, the idle time exceeds a certain (arbitrary) time limit, the process is resumed, using the command:

kill -CONT <pid>

Subsequently, if idle time returns to below the set time limit, the process is paused again and so on.

cpu usage before/during/after idle time, rendering a large video with kdenlive using melt

About kill -STOP and kill -CONT

Although the arguments -STOP and -CONT are mentioned in man kill, it is not explained, strangely. However, for example here we can read what it does:

Basically kill -STOP 1234 will pause the process with pid 1234, and kill -CONT 1234 will resume it. It’s as if you can sleep individual applications instead of your entire computer.

Thus the demanding process is put to sleep while the computer is used (un- idle).

Finding the process to be paused

The script runs with the process name (you'd like to be paused if you use the computer) as an argument.

The trick is to find the correct process to be paused. It won't be the name of your video editor, since it will certainly use external tools to render. In my case, kdenlive used melt. The script successfully paused melt and resumed rendering after a defined idle time.

You can use the top command if you are unsure about the process name. Run top in a terminal and press Ctrl+M to sort on memory usage. The demanding process will be in the top.

The script

#!/usr/bin/env python3
import subprocess
import time
import sys

limit = int(sys.argv[1])
proc = sys.argv[2]

def get(command):
    return subprocess.check_output(command).decode("utf-8").strip()

def check_runs(proc):
    try:
        return get(["pgrep", proc])
    except subprocess.CalledProcessError:
        pass

pid1 = check_runs(proc)
t1 = int(int(get("xprintidle"))/1000)

while True:
    time.sleep(5)
    pid2 = check_runs(proc)
    # (only) if the process exists, manage its activity
    if pid2 != None:
        t2 = int(int(get("xprintidle"))/1000)
        # if the process just started, obviously the system is not idle ->
        # pause the process (try in case it was killed by user in between):
        if pid1 == None:
            try:
                subprocess.Popen(["kill", "-STOP", pid2])
            except subprocess.CalledProcessError:
                pass
        # If there is a change in time status (breaktime entered or ended)
        else:
            if [t2 > limit, t1 > limit].count(True) == 1:
                if t2 > limit:
                    cmd = ["kill", "-CONT", pid2]
                else:
                    cmd = ["kill", "-STOP", pid2]
                subprocess.Popen(cmd)
        t1 = t2
    pid1 = pid2

How to use

The script needs xprintidle

sudo apt-get instal xprintidle

Copy the script above into an empty file, save it as manage_proc.py
Test- run it by the command

python3 /path/to/manage_proc.py <seconds> <process_name>

where <seconds> is the idle time in seconds before you'd like your process to start.
Startup the consuming process after the script started.
If all works fine, add the script to Startup Applications: Dash > Startup Applications > Add the command:

 python3 /path/to/manage_proc.py <seconds> <process_name>


Based on some internet research:

1) The code of a virus in MBR would be so tiny that it is hard to detect (1).

2) A reasonable approach would be to compare your MBR before and after an infection. That is what some antivirus do (2).

3) You could copy your MBR to a file with something like sudo dd if=/dev/sda of=mbr.bin bs=512 count=1 then check the file, which is a binary, with an Hex Editor like Bless.


What is the most "Ubuntu" way of preventing certain users from shutting down, suspending etc?

As mentioned in the other question, you can control these actions via PolicyKit's local authority system.

If you create a file /etc/polkit-1/50-local.d/restrict-shutdown.pkla with content like:

[Disable shutdown/etc for group restricted]
Identity=unix-group:restricted
Action=org.freedesktop.consolekit.system.stop;org.freedesktop.consolekit.system.restart;org.freedesktop.upower.suspend;org.freedesktop.upower.hibernate
ResultAny=no
ResultInactive=no
ResultActive=no

This will prevent any member of the group restricted from performing the matched actions.  Alternatively, if you want to restrict individual users, replace unix-group:restricted with unix-user:user1;unix-user:user2;....  Any user not matched by this policy should end up with the default behaviour.


Github Push > gnutls_handshake() error after switching to OpenSSL

Evidently, it had nothing to do with what I was doing.  I tried it again a while later and Github gave me no beef.  In other words, there was a temporary issue with Github.


Is there any Widget that can show my CPU and other performances live?

Conky
Conky is a popular light weight system monitor. I have it running on the right side of one of my monitors all the time:

The GIF animation show 2 dozen seconds with youtube running and then closed. Then you'll notice a single core getting most of the activity for the screen recorder itself.
This is the conky code I used (minus the header section which can be desktop specific):
TEXT
#------------+
# Distro     |
#------------+
${color}Today is:${color green}$alignr${time %A,}$alignr ${time %e %B %G}
${color}Distribution:${color green}$alignr ${execi 6300 cat /etc/issue.net} $machine
${color}Kernel:$alignr${color green} $kernel
${color orange}${voffset 2}${hr 1}
#------------+
# i7-6700 CPU|
#------------+
${color2}${voffset 5}Intel® i-7 6700HQ 3.5 GHz: ${color1}@  ${color green}${freq} MHz
${color}${goto 13}CPU 0 ${goto 81}${color green}${cpu cpu1}% ${goto 131}${color3}${cpubar cpu1 18}
#${cpugauge cpu1 20,40}
#${cpugraph 1 15,200 555555 AAAAAA -l}
${color}${goto 13}CPU 1 ${goto 81}${color green}${cpu cpu2}% ${goto 131}${color3}${cpubar cpu2 18}
${color}${goto 13}CPU 2 ${goto 81}${color green}${cpu cpu3}% ${goto 131}${color3}${cpubar cpu3 18}
${color}${goto 13}CPU 3 ${goto 81}${color green}${cpu cpu4}% ${goto 131}${color3}${cpubar cpu4 18}
${color}${goto 13}CPU 4 ${goto 81}${color green}${cpu cpu5}% ${goto 131}${color3}${cpubar cpu5 18}
${color}${goto 13}CPU 5 ${goto 81}${color green}${cpu cpu6}% ${goto 131}${color3}${cpubar cpu6 18}
${color}${goto 13}CPU 6 ${goto 81}${color green}${cpu cpu7}% ${goto 131}${color3}${cpubar cpu7 18}
${color}${goto 13}CPU 7 ${goto 81}${color green}${cpu cpu8}% ${goto 131}${color3}${cpubar cpu8 18}
#------------+
# Temperature|
#------------+
# Next line is for Skylake temperature when none of the other methods work.
#${color1}All CPUs ${color green}${cpu}% ${goto 131}${color1}Temp: ${color green}${execpi .001 cat /sys/class/thermal/thermal_zone7/temp | cut -c1-2}°C ${alignr}${color1}Up: ${color green}$uptime
# Next line is for kernel >= 4.13.0-36-generic
${color1}All CPUs ${color green}${cpu}% ${goto 131}${color1}Temp: ${color green}${hwmon 1 temp 1}°C ${alignr}${color1}Up: ${color green}$uptime
# Next line is for temperature with Kerenel 4.4
#${color1}All CPUs ${color green}${cpu}% ${goto 131}${color1}Temp: ${color green}${hwmon 0 temp 1}°C ${alignr}${color1}Up: ${color green}$uptime
${color green}$running_processes ${color1}running of ${color green}$processes ${color1}loaded processes.
${color1}Load Average 1-5-15 minutes: ${alignr}${color green}${execpi .001 (awk '{printf "%s/", $1}' /proc/loadavg; grep -c processor /proc/cpuinfo;) | bc -l | cut -c1-4} ${execpi .001 (awk '{printf "%s/", $2}' /proc/loadavg; grep -c processor /proc/cpuinfo;) | bc -l | cut -c1-4} ${execpi .001 (awk '{printf "%s/", $3}' /proc/loadavg; grep -c processor /proc/cpuinfo;) | bc -l | cut -c1-4}
#------------+
# Intel iGPU |
#------------+
${color orange}${hr 1}${if_existing /sys/class/drm/card0/gt_cur_freq_mhz}
${color2}${voffset 5}Intel® Skylake GT2 HD 530 iGPU @${alignr}${color green}
${execpi .001 (cat /sys/class/drm/card0/gt_cur_freq_mhz)} MHz
${color}${goto 13}Min. Freq:${goto 120}${color green}${execpi .001 (cat /sys/class/drm/card0/gt_min_freq_mhz)} MHz${color}${goto 210}Max. Freq:${alignr}${color green}${execpi .001 (cat /sys/class/drm/card0/gt_max_freq_mhz)} MHz
${color orange}${hr 1}${else}
#------------+
# Nvidia GPU |
#------------+
#${color orange}${hr 1}${if_match "${lsmod | grep nvidia_uvm}">""}
${color2}${voffset 5}${execpi .001 (nvidia-smi --query-gpu=gpu_name --format=csv,noheader)} ${color1}@ ${color green}${execpi .001 (nvidia-smi --query-gpu=clocks.sm --format=csv,noheader)} ${alignr}${color1}Temp: ${color green}${execpi .001 (nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader)}°C
${color1}${voffset 5}Ver: ${color green}${execpi .001 (nvidia-smi --query-gpu=driver_version --format=csv,noheader)} ${color1} P-State: ${color green}${execpi .001 (nvidia-smi --query-gpu=pstate --format=csv,noheader)} ${alignr}${color1}BIOS: ${color green}${execpi .001 (nvidia-smi --query-gpu=vbios_version --format=csv,noheader)}
${color1}${voffset 5}GPU:${color green}${execpi .001 (nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader)} ${color1}Ram:${color green}${execpi .001 (nvidia-smi --query-gpu=utilization.memory --format=csv,noheader)} ${color1}Pwr:${color green}${execpi .001 (nvidia-smi --query-gpu=power.draw --format=csv,noheader)} ${alignr}${color1}Freq: ${color green}${execpi .001 (nvidia-smi --query-gpu=clocks.mem --format=csv,noheader)}
${color orange}${hr 1}${endif}
#------------+
# Prcoesses  |
#------------+
${color1}${voffset 5}Process Name: ${goto 200}PID ${goto 265}CPU% ${alignr}Mem%
${color}${goto 13}${top name 1} ${goto 190}${top pid 1} ${goto 270}${color green}${top cpu 1} ${alignr}${top mem 1}
${color}${goto 13}${top name 2} ${goto 190}${top pid 2} ${goto 270}${color green}${top cpu 2} ${alignr}${top mem 2}
${color}${goto 13}${top name 3} ${goto 190}${top pid 3} ${goto 270}${color green}${top cpu 3} ${alignr}${top mem 3}
${color}${goto 13}${top name 4} ${goto 190}${top pid 4} ${goto 270}${color green}${top cpu 4} ${alignr}${top mem 4}
${color}${goto 13}${top name 5} ${goto 190}${top pid 5} ${goto 270}${color green}${top cpu 5} ${alignr}${top mem 5}
${color}${goto 13}${top name 6} ${goto 190}${top pid 6} ${goto 270}${color green}${top cpu 6} ${alignr}${top mem 6}
${color}${goto 13}${top name 7} ${goto 190}${top pid 7} ${goto 270}${color green}${top cpu 7} ${alignr}${top mem 7}
${color}${goto 13}${top name 8} ${goto 190}${top pid 8} ${goto 270}${color green}${top cpu 8} ${alignr}${top mem 8}
${color}${goto 13}${top name 9} ${goto 190}${top pid 9} ${goto 270}${color green}${top cpu 9} ${alignr}${top mem 9}
${color orange}${voffset 2}${hr 1}
#------------+
# Storage    |
#------------+
${color1}RAM Use/Free:${goto 148}${color red}$mem ${color red} ${goto 220}${membar 15,100} $alignr${color}${memeasyfree}
${color1}Linux Root:${goto 148}${color red}${fs_used /} ${color red} ${goto 220}${fs_bar 15,100 /} $alignr${color}${fs_free /}
${color1}Ubuntu 18.04:${goto 148}${if_mounted /mnt/clone}${color red} ${fs_used /mnt/clone} ${color red} ${goto 220}${fs_bar 15,100 /mnt/clone} $alignr${color}${fs_free /mnt/clone}${else} ${color yellow} /mnt/clone ${endif}
${color1}${if_mounted /mnt/old}Broken 16.04:${goto 148}${color red} ${fs_used /mnt/old} ${color red} ${goto 220}${fs_bar 15,100 /mnt/old} $alignr${color}${fs_free /mnt/old}${else}Cache RAM:${goto 148}${color green}${cached} ${color1} ${alignr}Buffers: ${color green} ${buffers}${endif}
${color1}${if_mounted /mnt/e}WSL+Linux:${goto 148}${color red}${fs_used /mnt/e} ${color red} ${goto 220}${fs_bar 15,100 /mnt/e} $alignr${color}${fs_free /mnt/e}${else}Swap:${goto 148}${color green}${swap} / ${swapmax} $alignr${color green}${swapperc}%${endif}
#${color}NVMe Win 10:${goto 148}${if_mounted /mnt/c}${color green} ${fs_used /mnt/c} / ${fs_size /mnt/c} $alignr${color green}${fs_used_perc /mnt/c}%${else}${color yellow}/mnt/c${endif}
#${color}${if_mounted /mnt/d}HGST_Win10:${goto 148}${color red} ${fs_used /mnt/d} / ${fs_size /mnt/d} $alignr${color green}${fs_used_perc /mnt/d}%${else}Cache RAM:${goto 148}${color green}${cached} ${color} Buffers: ${color green} ${buffers}${endif}
#${color}${if_mounted /mnt/e}WSL+Linux:${goto 148}${color red}${fs_used /mnt/e} / ${fs_size /mnt/e} $alignr${color red}${fs_used_perc /mnt/e}%${else}Swap:${goto 148}${color green}${swap} / ${swapmax} $alignr${color green}${swapperc}%${endif}
${color orange}${voffset 2}${hr 1}
#------------+
# Network    |
#------------+
#${color1}Network using vnStat "-i", "-w" and "-m"
${color}${goto 5}Today ${goto 100}Yesterday ${goto 225}Week ${goto 325}Month ${color green}
# vnstatd updates database every five minutes
${execi 300 vnstat -i enp59s0 | grep "today" | awk '{print $8" "substr ($9, 1, 1)}'} ${goto 110}${execi 300 vnstat -i enp59s0 | grep "yesterday" | awk '{print $8" "substr ($9, 1, 1)}'} ${goto 220}${execi 300 vnstat -i enp59s0 -w | grep "current week" | awk '{print $9" "substr ($10, 1, 1)}'} ${goto 315}${execi 300 vnstat -i enp59s0 -m | grep "`date +"%b '%y"`" | awk '{print $9" "substr ($10, 1, 1)}'}
${color}Down: ${color green}${downspeed enp59s0}/s ${color}${goto 220}Up: ${color green}${upspeed enp59s0}/s
${downspeedgraph enp59s0 25,190 000000 ff0000} ${alignr}${upspeedgraph enp59s0 25,190 000000 00ff00}$color
Total: ${color green}${totaldown enp59s0} $color${alignr}Total: ${color green}${totalup enp59s0}
#Bit Rate:$color ${wireless_bitrate wlp60s0}
#------------+
# Brightness |
#------------+
${color orange}${voffset 2}${hr 1}
${color1}${goto 5}Rise: ${color green}${execpi 300 cat /usr/local/bin/.eyesome-sunrise} ${goto 155}${color1}Set: ${color green}${execpi 300 cat /usr/local/bin/.eyesome-sunset} ${alignr}${color1}Level: ${color green}${execpi 10 cat /sys/class/backlight/intel_backlight/brightness}

${color orange}${voffset 2}${hr 1}
${color orange}${voffset 2}${hr 1}


iio-sensor-proxy does not detect any sensor

Right now there isn't a fix for this, because it is a driver level issue. I just learned from Phoronix that the new driver will be released probably with the new 5.6/5.7 Kernel, which is approaching completion now.
Obviously this affects only people who have HP Envy models with AMD APU's.
We just have to wait until the release of the new Kernel.


Rsync not working well with VeraCrypt containers

Found the problem ... I need to specify option-t (-u also helps in my case):

-u, --update                skip files that are newer on the receiver
-t, --times                 preserve modification times

Now it does not sync all files every time I run it.


How to disable Gnome-Shell auto-open in Dashboard

I just stumbled upon this (closed) question at stackoverflow (see also this Q&A). The information there enabled me to solve the question - 22 hours before my own bounty ends... :)

Note that this is an ugly solution, because you have change 2 lines in the sources of GNOME shell. It would be better to convert it to an (easy usable) extension. The information given here might lay the basis for an extension, but I don't know exactly how to do this in an extension.

Basically you have to uncomment the command overview.show() in the file /usr/share/gnome-shell/js/ui/main.js (and the if before). It might be a good idea to make a backup of the file before.

$ diff main.js main.js-old
350,351c350,351
<         //if (!overview.visible && showOverview)
<         //    overview.show();
---
>         if (!overview.visible && showOverview)
>             overview.show();

To apply the changes run:

sudo glib-compile-schemas /usr/share/glib-2.0/schemas/

The lines before confirm my suspicion that there is currently no option to change this behaviour.


The conky object you are using gives you the size of the disk partition mounted at /. In your case, that is 41G of which you are using 8.4G. So the conky output is correct.

You have partitioned your hard drive into at least three partitions. sda1 is your /boot and sda3 is /. Presumably, you also have sda2 but it looks like it isn't mounted.


Adding customized window size on the terminal

You can define a new profile, and switch to the defined profile to change the window size. Edit -> Preferences -> Profiles.

EDIT: You can also try using the --geometry flag, see here. Additonally, take a look at gconf-editor, you might find a way to configure it under "Apps".


SSHv1 is obsolete from current openssh. If you want to use this obsolete protocol, you need to install openssh-client-ssh1 package and use ssh1 binary, which has still SSHv1 support.

ssh1 -1 -c 3des user@192.168.0.10

should do the job for you.


Make build directory, cd into it
Download package source codes:

dget http://archive.neon.kde.org/user/pool/main/u/umbrello/umbrello_17.04.1-0neon+16.04+build22.dsc

Unpack them:

dpkg-source -x umbrello_17.04.1-0neon+16.04+build22.dsc

Cd source directory:

cd umbrello_17.04.1

Run (optional: if You want to change package changelog) and edit changelog:

dch -i

Build the package:

dpkg-buildpackage -rfakeroot

of if in case of any error:

sudo dpkg-buildpackage

  Note. For successful build change string usr/share/metainfo to usr/share/appdata in umbrello_17.04.1/debian/umbrello.install file.

In case of error install missed dependencies, in my case it was:

sudo apt-get install kdoctools-dev kinit-dev kio-dev libboost-dev \
libkf5archive-dev libkf5auth-dev libkf5completion-dev libkf5config-dev \
libkf5coreaddons-dev libkf5guiaddons-dev libkf5i18n-dev libkf5iconthemes-dev \
libkf5parts-dev libkf5service-dev libkf5texteditor-dev \
libkf5widgetsaddons-dev libkf5windowsystem-dev libkf5xmlgui-dev \
libqt5svg5-dev libqt5webkit5-dev libxml2-dev libxslt1-dev pkg-kde-tools qtbase5-dev

Build the package again:

dpkg-buildpackage -rfakeroot

Install result package from build directory:

sudo dpkg -i umbrello_17.04.1-0neon+16.04+build22_amd64.deb


As you say, zsh is similar in many respects to bash. It has some features you won't find in bash, and it can be extended in powerful ways. Don't think of moving as a kind of revolution, but rather as a series of evolutionary steps that help you in your daily work. Here are some hints from my .zshrc. Although you say you prefer single pieces of advice, this post is a longish list. Still it is a good idea to go through the points one by one. Just add the interesting bits to your ~/.zshrc and reload with source ~/.zshrc. A final tip: learn the keystrokes of zsh's default ("Emacs") keyboard shortcuts: ^A ^E ^W Alt-F Alt-B Alt-P ^L ^R. You can replace Alt by two separate keystrokes: Alt-P is equivalent to ESC P.

This gives you more extensive tab completion.

autoload -U compinit
compinit

Tab completion from both ends.

setopt completeinword

Tab completion should be case-insensitive.

zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'

Better completion for killall.

zstyle ':completion:*:killall:*' command 'ps -u $USER -o cmd'

Changes the definition of "word", e.g. with ^W.

autoload select-word-style
select-word-style shell

Colors for ls.

if [[ -x "`whence -p dircolors`" ]]; then
  eval `dircolors`
  alias ls='ls -F --color=auto'
else
  alias ls='ls -F'
fi

Shortcuts for ls.

alias ll='ls -l'
alias la='ls -a'

One history for all open shells; store 10,000 entries. This makes this into a useful memory aid to find the commands you used last time for ./configure etc. Use Alt-P (find command that starts like this) and ^R (search in history) liberally.

HISTFILE=~/.zhistory
HISTSIZE=SAVEHIST=10000
setopt sharehistory
setopt extendedhistory

Enables all sorts of extended globbing, such as ls **/*.txt (find all text files), ls -d *(D) (show all files including those starting with "."). To find out more, go to man zshexpn, section "FILENAME GENERATION".

# superglobs
setopt extendedglob
unsetopt caseglob

This is useful to remember commands in your history without executing them.

setopt interactivecomments # pound sign in interactive prompt

Type ".." instead of "cd ..", "/usr/include" instead of "cd /usr/include".

setopt auto_cd

Nice prompt.

PS1='[%T] %n@%m:%~# '

Display CPU usage stats for commands taking more than 10 seconds

REPORTTIME=10

Some commands you use extensively in Ubuntu.

alias 'a=sudo aptitude'
alias 'ai=sudo aptitude install'
alias 'ar=sudo aptitude remove'
alias 'au=sudo aptitude update'
alias 'ag=sudo aptitude safe-upgrade'
alias 'as=apt-cache search'
alias 'aw=apt-cache show'

Lists packages sorted by their size - useful when deciding which packages are taking up you disk space.

function apt-list-packages {
  dpkg-query -W --showformat='${Installed-Size} ${Package} ${Status}\n' | grep -v deinstall | sort -n | awk '{print $1" "$2}'
}


mysql service is stopping and not restarting despite Restart=always

https://stackoverflow.com/questions/30067577/mysql-will-not-restart

Also:
1. Show sql.log
2. Why sql crashed after add new site, maybe they have errors?
3. Check work sql without new site.


Alternative to Dragon NaturallySpeaking?

There is a whole  Article on Wikipedia dedicated to the Problem.

Unfortunately, it seems there's currently no one solution that works well enough, but a massive list of projects that are underway.

You may want to rummage through the list of solutions to see if there's anything that fits your needs.

Platypus:

There's always the possibility to run Dragon Naturally Speaking using WINE. The Platypus Project is creating software to redirect Dragon's output to any Linux / X application, and they are very far along.

You should definitely take a look at this.


hissing noise over headphones only in Ubuntu

This might be the Intel sound card entering power save mode. Check whether power save in currently enabled via:

    cat /sys/module/snd_hda_intel/parameters/power_save

If this returns 1, power save is enabled; it returns 0 otherwise. Check to see if changing this solves your problem by runnning

    echo 0 | sudo tee /sys/module/snd_hda_intel/parameters/power_save

Then play some music, pause it and see if the noise returns. If the problem persists, it's something else.

If this does get rid of the noise, you'll find it's only temporary, since the value can be reset on reboot or on switching between battery to AC power. A few different services could be changing this value, so try configuring each of them:

ALSA

To /etc/modprobe.d/alsa-base.conf, add the line:

    options snd-hda-intel power_save=0

Power.d

To /usr/lib/pm-utils/power.d/intel-audio-powersave, add or uncomment the line:
        INTEL_AUDIO_POWERSAVE=false

TLP

If installed, in /etc/default/tlp, set the following:

    SOUND_POWER_SAVE_ON_BAT=0


All of the previous answers talk about a USB suspend mechanism, i.e. a "logical power-off", they will never physically cut the VBUS +5V from the USB port.

Only a few hubs can actually cut VBUS as described here.

The hubpower tool can do it (if the hub supports it).


19.10 Screen remains black after wake up from suspend - Asus Zenbook

I managed to solve the problem. I had one problem with one of my ppa dependencies and sudo-apt update was actually not doing anything.

Remove the ppa dependency which was causing the problem going to "Software and updates" > "Other software" and unchecking it.
Run sudo apt-get update and see if it is now actually doing the updates
Update drivers by opening the "Updates" program which comes with Linux
Change the driver in use going to "Software and updates" > "More drivers" and select the "X.Org X server - Nouveau display driver"
Change the GRUB_CMDLINE_LINUX_DEFAULT to "nouveau.modeset=0" (without nomodeset, that was what was causing the problem, this way we only run on nomodeset the nouveau driver)
Run sudo update-grub and reboot

That's it, this worked for me perfectly and I have not experienced the same problem since then.


Copying files from Ubuntu 18.04 to Android device

Try turning on your Android device and unlocking the screen (and make sure it stays unlocked / unlock it again) before moving the files.


Very strange bug in Ubuntu (introduced in recent months' updates)

This occurred to me also.

If you turn off the wifi and reboot then this problem occurs.  The enable wireless get unchecked.

Use rfkill unblock all  in such case to enable Wi-fi.

For me, this is better than pressing hardware button twice to bring up the wi-fi, as it was earlier.


How to redirect to axel when downloading and converting it via video downloadhelper

It could be the conversion requires a built-in downloader to do the conversion.

What do you need Video Downloadhelper and Flashgot for? Flashgot can download files from sites like Youtube and such making the other addon unnecessary.

The problem is probably to conversion attempt while downloading...it would be much easier to just download the file and convert it after the fact with ffmpeg, winff, audacity, etc.

You could also use the site http://video2mp3.net that extracts the audio from a video and the provides a download of said audio.


Epson perfection scanner 2580 Photo does not work with Ubuntu 14.04 LTS

Status on sane.

  Model: Perfection 2580 PHOTO
  Interface: USB  0x04b8/0x0121
  Status: Good
  Comments: auto film loader not supported; requires DFSG non-free iscan-plugin-gt-f500; also supported by the snapscan backend; overseas
  version of the GT-F550
  Supported by the epkowa backend (iscan 2.29.1/iscan-data 1.23.0)

Best instructions I have found are in an official PDF from Epson. These are for Redhat so all references to "rpm" need to be translated to the equivalent "apt-get" method though you can expect sane to already be installed.

Regarding installation of software refer to the "install by source" method in the PDF and download the "tar.gz" versions from their website.


Cannot install wifi driver RTL8821cd and no access to ethernet

Your answer is here but the Wifi Driver for the Realtek RTL8821CE is NOT in the official Ubuntu Repositories. So without an internet connection you need to obtain it using another internet enabled PC and copy the file to your laptop.


ubuntu 16.04, wireless keeps dropping every 7 minutes

Open Terminal and run following commands:

echo "options iwlwifi 11n_disable=1" | sudo tee /etc/modprobe.d/iwlwifi.conf
sudo modprobe -rfv iwldvm
sudo modprobe -rfv iwlwifi
sudo modprobe -v iwlwifi

So what it will do :

1) The 11n_disable option disables 802.11n features. Adding it to /etc/modprobe.d/iwlwifi.conf makes the change persist after reboots. T

2) The modprobe -rfv commands are removing the kernel modules iwldvm and iwlwifi

3) And finally the last line modprobe -v is adding iwlwifi back in.


How do i open netedit after installing sumo by the terminal?

After you've, install sumo. on terminal you type netedit.


Here you're a pretty robust script to do that:

#!/bin/bash

FOLDER_WITH_ALL_PICTURES="/home/$USER/Wallpaper" # Output folder.
INPUT_FOLDER="/home/$USER/Pictures"              # Input folder.

mkdir "$FOLDER_WITH_ALL_PICTURES"

function link() {
    if [ -e "$2" ]; then
        link "$1" "$2_copy"
    else
        echo $1 $2
        ln -s "$1" "$2"
    fi
}

find "$INPUT_FOLDER" -type f | while read file; do
    link "$file" "${FOLDER_WITH_ALL_PICTURES}/$(basename "$file")"
done


Ubuntu 14.04, NVidia GTX 750 double DVI output, only one DVI works

Fixed it with the new NVIDIA driver : 340.58 found here

Installation is done as per this post


Install custom Ubuntu iso from network card

PXE is the way to go here , however your device will need to support network booting and have that enabled in the BIOS. Most devices with built in ethernet can do it now but some of the cheaper versions have it disabled.

There are instructions on setting up your PXE environemnt here, its quite involved and tricky to test so i won't both paraphrasing them here.

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

however that site seems to have problems at the moment so here is the google cached version of that page.

https://webcache.googleusercontent.com/search?q=cache:V2iecgLFBSEJ:https://help.ubuntu.com/community/DisklessUbuntuHowto+&cd=1&hl=en&ct=clnk&gl=uk&client=ubuntu


what is the use of -U option in ping command?

As I understand it a standard ping shows network round trip response time and a ping -U shows user to user latency. Response time and user latency can be different due to DNS failures and other network congestion.

In the example you gave .. there wasn't any issues at the time.

This may not be accurate though.... this is what I have determined after some short research

Also another nice switch for ping is the -c switch which is the ping count .. Windows pings 4 times then stops where as Ubuntu will ping until you stop it .. the -c switch will change that .. if you used ping -c 4 google.com it will ping 4 times then stop.


How to check if laptop screen is turn on?

I've ended up with this script:

#!/bin/bash

file=/tmp/display

if [ -e $file ]; then
    rm $file
    sudo vbetool dpms on

else
    touch $file
    sudo vbetool dpms off
fi


How do you enable PointerButtons to work on the keyboard?

Under the settings option you need to enable the Mouse Keys under

All Settings->Universal Access->Pointing And Clicking

The setting is also described at the following question.


awk to compare two files, extract, output to third

You would be much better off if your input is sorted on the first column, since then you can directly use the join command:

$ cat foo
a   1
b   2
c   3
d   4
$ cat bar
b   1
d   4
e   5
n   2
$ join -t $'\t' <(sort foo) <(sort bar)
b   2   1
d   4   4

In any case, I'd recommend sorting - without sorting, you're potentially looking at O(m*n) operations, but with sorting, O(m*log(m) + n*log(n) + min(m,n)) operations - it should save you a while if you optimize your methods instead of the language you use.

With awk, you can get away with a single array:

awk 'NR==FNR { n[$1] = $2; next } ($1 in n) {print $1, n[$1], $2}' foo bar

This should be reasonably fast as well, if $i in n is.


tensorflow is not using gpu and nvidia-smi: command not found

For future reference, please consider adding the text from your terminal to your question post.

Install the GPU version of TensorFlow, by doing

sudo pip install tensorflow-gpu.

However, you should have CUDA installed for the TF-GPU to use your GPU. You may download CUDA from here. I recommend you to use CUDA 9.0 with TensorFlow 1.7


Not a direct answer, but I think you'll have a better luck connecting to AIM using pidgin. It is a very good chat client.

http://www.pidgin.im/download/ubuntu/


The swap partition is not identified in the /etc/fstab file.  Thus when you do a swapon -a, there is no swap file to add.

Based on your blkid output, there is a swap partition present on /dev/sdc2 which is NOT in your fstab listing.

Thus you could add a line such as the following to your fstab:

 /dev/sdc2   none     swap      sw     0 0

Or if you insist on using UIDs:

 UUID=05e01b5a-915c-4fe7-9ed1-5a1c5224fce9   none   swap   sw    0 0


How to boot from USB iso on Ubuntu using VMWare?

In VMware once Ubuntu is up and running.
Load Elastix.iso file into the "virtual cd drive" of Ubuntu.
Then inside Ubuntu run the .iso as normal.
If it doesn't autorun try:
cd /media/cdrom0

Look for a .sh or a executable file
Run ls -l to see what's executable

Finally, ./nameOfFile.sh
.iso is just an image file of a CD or DVD and can be treated as such


In Ubuntu 16.04 and later open the terminal and type:

sudo apt install python-wxgtk3.0 python-wxgtk3.0-dev

Then check if wx works in Python 2.x as follows:

$ python
>>> import wx

Example code

Save the following code as wxPython-window.py
Make it executable.
Change directories using cd to the parent directory of wxPython-window.py
Run the code with ./wxPython-window.py

#!/usr/bin/python

import wx
app = wx.App()
frame = wx.Frame(None, -1, 'win.py')
frame.Show()
app.MainLoop()


Command to change Gnome 3 setting system-wide (for all users)?

See How to make applications pinned in launcher appear for all users? for related question.

Afaik there is currently no solution to globally reset a single dconf-setting. User changes are stored in ~/.config/dconf/user. If you delete this file you reset all dconf keys to defaults.


can't login to FTP after upgrading to 13.04

I met this problem too, then i used Pure-FTPd instead,the Pure-FTPd still work.


Help needed setting up RFC 868 (port 37) time service on Ubuntu 12.04

You don't need to use iptables, the service is working as expected.

telnet connects to localhost at port 37, xinetd sends the 32-bit unsigned integer representing the time (that's the ?g you see at the output) and closes the connection.


KDE Service Menus get list of selected files

You can get access to all the arguments passed to a script using $@ in bash, this means technically you can create a wrapper script that first prepares a fake environment variable like this:

 export NAUTILUS_SCRIPT_SELECTED_FILE_PATHS=$@
 ./real-script.sh

Of course you can also simply modify your script to use $@ like this if you want instead of the original nautilus variable:

for var in "$@"
do
    echo "x" "$var"
done

Also note in your .desktop file for ServiceMenus you'll want to do something like:

Exec=script %F

Notice that %F doesn't have quotes around it.


Is it legal to use Ubuntu name for my cybercafé?

Hmmm.... when you use 'Ubuntu', you could mean the philosophy or something, but using it in that way (as a logo/trademark) it wouldn't be using it that way and would infringe it - sort of like what it says here:

  You will require Canonical’s permission to use: (i) any mark ending
  with the letters UBUNTU or BUNTU which is sufficiently similar to the
  Trademarks or any other confusingly similar mark, and (ii) any

I would contact Canonical for permission... you never know they might even help or something :)

By the way, this site is run by StackExchange - see also [1] [2] [3]


Read man 5 crontab to learn about root's crontab (so you can run your script as root, and not use sudo). Then, after deciding what you want to do when certbot renew fails, put something like this in a script somewhere, invoke it with sudo until it works, then invoke it from root's crontab.

#!/bin/bash
# **warning! ** Untested code
#
# tell nginx to stop
service nginx stop
# did it stop? exit status 0 => running, 3 => not
status=$(start-stop-daemon --status nginx --pidfile=/run/nginx.pid;echo $?)
while [[ $status -eq 0 ]] ; do
    # wait a tenth of a second
    sleep 0.1
    status=$(start-stop-daemon --status nginx --pidfile=/run/nginx.pid;echo $?)
done
# Note: If nginx never stops, this will wait forever.
#
certbot renew
status=$?
if [[ $status -eq 1 ]] ; then
    service nginx start
else
    whatever you do when certbot renew fails
fi


Which 1seg TV tuner is supported? (mobile ISDB-T)

1seg is better known as ISDB-T for cellphones, laptops, etc.
Therefore, google for ISDB-T USB dongle Ubuntu in order to find available products.

You need to load the smsusb and smusbtv kernel modules (if they do not load automatically) and then use a program to scan for the available channels.

Look at http://www.dealextreme.com/ for available products.


Ubuntu 14.04 - 14.10 - 15,04 wifi disconnection

I would do this echo "options rtl8723be fwlps=N ips=N" | sudo tee /etc/modprobe.d/rtl8723be.conf
and reboot to see if it helps.

If can change the router settings, see if the encryption is set to WPA2 only with no TKIP enabled, change it from auto channel to a fixed channel and see if it helps.

In 14.04, I recommend that the 3.19 backports be used as it fixes most issues with the RTL8723BE


SSH does not seem to recognise keys generated on a mac

The issue was caused by LibreSSL 2.6.2, generating a key that was not valid for other versions.  The only workaround was to generate a new set of keys on Ubuntu.


Accidentally created directory named "~" (tilde)

Escape the ~ with \~ or use single quotes '~'.
so you can

rmdir ~/\~

or

cd ~ ; rmdir '~'


I cannot use exfat formatted USB because of mount error

You need to install some software to handle exFAT.

Open a terminal (press Ctrl+Alt+T), and run:

sudo apt-get install exfat-fuse exfat-utils

This worked for me. I have a card reader that came with my mom's Gateway computer with installed Ubuntu where it kept coming up with "error cannot mount volume". Now the card reader works fine for SD cards.


Why Touchpad of Zenbook UX31 not working?

i've installed Linux Kernel 3.2 rc2 today on my ASUS UX31 Zenbook and the Elantech Touchpad i've built in gets detected correctly and works as expected.

it seems that there  are two versions of the zenbook, one with Sentelic and one with Elantech touchpad.


How can I change the icon of a unity web app?

alacarte (Main Menu) can add webapps icon images to app menu items (alacarte needs to be installed)

In 12.04/12.10 I have been finding webapps menu items in the Other category.


You can use

sudo apt-get upgrade

in terminal.

It shows full list of upgraded packages and the progress in MB.


Nvidia GTX250( Ubuntu 12.10 64) after install drivers video change to 1600x1200(without left panel, without borders(file,help,go))

I have the same problem on my Lenovo t410 (Ubuntu 12.10, nVidia gt218 NVS 3100M).
I returned to a normal view as follows:

open a Terminal (Ctrl+Alt+t)
type software-center in it and the sofware center will show up.
Then go to "edit" (close to the file menu...I have it in italian and don't exactly know what it is in english) and look for "software sources". The software source will open.
There you go to the last tab, "additional drivers".
You can change back to the open source driver, which should work.


How do I get my Ubuntu laptop's display on the ubuntu desktop connected to the network?

Use Ubuntu's built in utility called Remote desktop or Share your desktop (settings). Its easy and user friendly.


Trackpad not working after update to Ubuntu 14.10 on Dell Inspiron 15R

In the terminal, type:

sudo vi /etc/modprobe.d/blacklist_i2c_hid.conf

then type the following into that file:

blacklist i2c_hid

Save the file and restart your system, now check whether the touchpad is working fine.


Is it stable to install GNOME 3.8 on Ubuntu 13.04?

I have been running Gnome-shell 3.8 from the Gnome3 Team PPA (https://launchpad.net/~gnome3-team/+archive/gnome3) for a number of months now without issue.

If you already have gnome-shell installed, then running the following commands should upgrade to 3.8:

sudo apt-add-repository ppa:gnome3-team/gnome3
sudo apt-get update
sudo apt-get dist-upgrade

OMG! Ubuntu! has a detailed article on installing Gnome 3.8 in Ubuntu: http://www.omgubuntu.co.uk/2013/04/gnome-3-8-ppa-for-ubuntu-gnome


To answer the initial question, you would pipe through xargs if you wanted to launch something with STDIN as an argument.

ls | ... | xargs gnome-open

Or you could treat the output like an argument directly. This is less useful in very long directories as you might hit the argument limit. xargs is almost certainly faster.

gnome-open $(ls | ...)

But you shouldn't parse the output of ls in commands; both of those are rubbish.
You can roll all your searching and filtering into one command:

find -iname '*book_i_want*' -exec gnome-open {} +

Note that this will recurse into subdirectories by default (different from the ls default) so either account for that or add -maxdepth 1 to the line.


With a 500 error, you'll always want to start with checking your logs, in this case:

tail -f /var/log/apache2/error.log

You commented that the error log indicated:

  PHP Parse error: syntax error, unexpected 'version' (T_STRING) in /var/www/index.php on line 1

This indicates that the content of index.php itself is likely the problem.  Check line 1 for either a quoting issue of some sort (wrong number of quotes?) or perhaps the ; was left off the end of the line.


Is there any way to spin down the GPU fan with the open source drivers for a RadeonHD 5870?

There is some risk of overheating the card (GPU and VRMs) if you turn off the fan completely - keep an eye on the temperatures before and after turning off the fan.  The ATI/AMD control panel should let you check this, and gkrellm also monitors GPU temperature along with many other things.

The RadeonHD 5870 is a very high-end card if you don't run games - you could save quite a bit of power and noise by replacing it with something like an HD 5450 at $50, which has fanless (passive) versions available.  Unless perhaps you boot into Windows for games, in which case ignore this :)


Unable to install timeshift in ubuntu 16.04

It's odd that apt-add-repository couldn't download the public key, as it is available. Does your network block port 11371? I think this is needed to fetch keys, which is what failed.
You can try adding it manually, run this command:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2D0F61F0

then repeat the apt-add-repository command you tried at the beginning, and it should now work because you have the key.

If this still fails, it's likely that as I mentioned your network is blocking the needed port to fetch the keys. In that case, speak to your network administrator and try to get this situation resolved on their side.


Installed mupen64plus package, but can't see it anywhere

In my software center it says that it takes 1,6 MB for download and 6,2 MB for install.

Type Alt+F2 and search for it to see that is there. To use in a terminal try:

./mupen64plus ./m64p_test_rom.v64

You can find here some documentation about this plugin.


2TB Hard Drive acting as 500GB Hard Drive after Clonezilla - Partition Cloning

Yes, you are missing something: Cloning clones the partition including the boundaries.

So you now have a partition of 500Gb on a 2TB disk. That can be 2 things:

you have 1.5 unallocated.
you have 1.5 allocated to another partition.

In either case: use gparted to enlarge the 500Gb to include the extra 1.5Tb or make and use the other 1.5Tb as another partition.

1 extra comment: cloning also copies the UUID. That is going to go bad if you use both disks in the same machine. Gparted can fix that: Pick the new UUID option and apply.

  As per my knowledge I have to run GPARTED Software only when Disks shows some unallocated space.

Or to merge, shrink or enlarge partitions.


How can I show workspace names in unity?

This is currently not possible with Unity in 11.04.


What will occur if apt is interrupted during package install?

You should avoid that situation at all costs. While some packages can be easily fixed, others cant be that easily fixed because your computer might stop booting up and other oddities.

So make sure you're actually on a power supply in case of a laptop, or make sure no one messes with the machine while an upgrade is running.

(see as well)


How to make YOLO algorithm run detection on images automatically and saves them in a separate folder?

Not sure if you still need help, but there's already a command for you to capture the image from the network camera.

./darknet detect demo cfg/yolov3.cfg yolov3.weights (fill your rtsp address here)

In the source code "image.c" you can copy the following line in a commented section of this function void draw_detections_v3(...):

save_image(cropped_im, image_name);

and modify "cropped_im" to "im" to save the whole screen of each frame (you may need a counter to change the saved names) to your local folder.


Identify duplicate lines in a file without deleting them?

This is a classical problem that can be solved with the uniq command. uniq can detect duplicate consecutive lines and remove duplicates (-u, --unique) or keep duplicates only (-d, --repeated).

Since ordering of duplicate lines is not important for you, you should sort it first. Then use uniq to print unique lines only:

sort yourfile.txt | uniq -u

There is also a -c (--count) option that prints the number of duplicates for the -d option. See the manual page of uniq for details.

If you really do not care about the parts after the first field, you can use the following command to find duplicate keys and print each line number for it (append another | sort -n to have the output sorted by line):

 cut -d ' ' -f1 .bash_history | nl | sort -k2 | uniq -s8 -D

Since you want to see duplicate lines (using the first field as key), you cannot directly use uniq. The issue that make automation difficult is that the title parts vary, but a program cannot automatically determine which title should be considered the final one.

Here is an AWK script (save it to script.awk) that takes your text file as input and prints all duplicate lines so you can decide which to delete. (awk -f script.awk yourfile.txt)

#!/usr/bin/awk -f
{
    # Store the line ($0) grouped per URL ($1) with line number (NR) as key
    lines[$1][NR] = $0;
}
END {
    for (url in lines) {
        # find lines that have the URL occur multiple times
        if (length(lines[url]) > 1) {
            for (lineno in lines[url]) {
                # Print duplicate line for decision purposes
                print lines[url][lineno];
                # Alternative: print line number and line
                #print lineno, lines[url][lineno];
            }
        }
    }
}


Advice for a high-end Ubuntu-friendly laptop?

System76 has some great offers that might be up your alley.

Or, you could keep an eye open over at DealNews


How do I install gnome without gdm on Xubuntu 18.04

sudo apt install gnome-shell

And that's it, choose lightdm instead of gdm when prompted.


No NVIDIA settings except Prime Profiles

I have a Dell 7577 with a GTX 1060 and recently updated to 20.04. As with 18.04/10 the nvidia driver/module had problems detecting the 1060. My solution was to use "nvidia-xconfig" to create an xorg.conf file and then specify the Driver and BusID fields...

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia-440"
    BusID          "PCI:1@0:0:0"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection


Why don't popular programs like Photoshop or World of Warcraft support Ubuntu?

I think market share is very important aspect, because producing complicated softwares (like Photoshop) or game (like Warcraft) are too expensive for software production companies and when market share of an operating system (Like Ubuntu) is low then the sell of this kind of software will be low therefore produce this king of software (expensive and complicated) is not beneficial for software production companies.


TensorFlow for Python 3 throws an error when installing on Ubuntu

For now, according to https://github.com/tensorflow/tensorflow/issues/2188#issuecomment-216186066, the solution is to download and rename the wheel and install using the renamed wheel:

wget https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl
mv tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl tensorflow-0.8.0-cp35-cp35m-linux_x86_64.whl
sudo -H pip3 install tensorflow-0.8.0-cp35-cp35m-linux_x86_64.whl

If you are willing to wait a bit, the wheel for Python 3.5 should be out soon according to https://github.com/tensorflow/tensorflow/issues/2188#issuecomment-220363241.


Depending on your intention, you may or may not require to modify the contents of /etc/lsb-release file for your Ubuntu-based custom distro (or likely defined as "remix").

Rationale for lsb-release

From what I understand, the content of /etc/lsb-release mainly used for determining whether you can update your packages from existing Ubuntu repositories or not.

Below are the supporting examples, which include combined output from different distro based on Ubuntu 12.04 release.

kubuntu@kubuntu:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.3 LTS"

xubuntu@xubuntu:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04 LTS"

^ Despite Ubuntu official flavours' name are Kubuntu and Xubuntu, these were never used in the content of /etc/lsb-release file. This is because the Ubuntu official flavours share and retrieve the same packages from the same repositories like Ubuntu does.

mint@mint ~ $ cat /etc/lsb-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=13
DISTRIB_CODENAME=maya
DISTRIB_DESCRIPTION="Linux Mint 13 Maya"

trisquel@trisquel:~$ cat /etc/lsb-release
DISTRIB_ID=Trisquel
DISTRIB_RELEASE=6.0
DISTRIB_CODENAME=toutatis
DISTRIB_DESCRIPTION="Trisquel 6.0"

^ These Ubuntu derivatives' name are Linux Mint and Trisquel and their names were included in the content of /etc/lsb-release file. While they get the sources from Ubuntu repositories, these derivatives host their own packages. Therefore, they can define their own releases.

The combined output above (the one from Kubuntu and Xubuntu) already gave us a hint. Only edit DISTRIB_DESCRIPTION="" and replace the string with "Something 1.0 Else". This means you can still update and retrieve packages from existing Ubuntu repositories.

Trademark issue

Until few years ago, there was "Ubuntu Trademark Policy" but now it is redirected to this page called "Intellectual property rights policy". Few relevant points have been quoted below:

  [...]
  You can modify Ubuntu for personal or internal commercial use.

  [...]
  Any redistribution of modified versions of Ubuntu must be approved, certified or provided by Canonical if you are going to associate it with the Trademarks. Otherwise you must remove and replace the Trademarks and will need to recompile the source code to create your own binaries. This does not affect your rights under any open source licence applicable to any of the components of Ubuntu. [...]

Based on these, if you intend to build custom or modified version of Ubuntu and redistribute it, you must do rebranding. This means not just /etc/lsb-release anymore.

But, if you are not redistributing the custom build and wish to update and retrieve packages from existing Ubuntu repositories, then modifying /etc/lsb-release as explained should suffice. Otherwise depends on yourself; To which extent you would like to customize the build.


Is there an Ubuntu One client for Kubuntu?

12.04
From Precise, there is now an officially supported QT version of the Ubuntu-One client.

how to install
sudo apt-get install ubuntuone-control-panel-qt


Ubuntu 20.04 How to disable mouse hover tooltips over Dock

you are using Yaru-dark as shell theme..
so edit the file /usr/share/themes/Yaru-dark/gnome-shell/gnome-shell.css
sudo -H gedit /usr/share/themes/Yaru-dark/gnome-shell/gnome-shell.css

around line number 1493 add the line as below..
.dash-label {
  background-color: rgba(29, 29, 29, 0.925);
  border-radius: 6px;
  border: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
  color: #eeeeec;
  font-size: 0pt; # Added This new Line
  padding: 6px 8px;
  text-align: center;
  -x-offset: 8px; }

My final edits are
.dash-label {
  background-color: rgba(29, 29, 29, 0);
  border-radius: 0px;
  border: none;
  box-shadow: none;
  color: red;
  font-size: 0pt;
  padding: none;
  text-align: center;
  -x-offset: 8px; }


How can I get wireless to stop disconnecting on my ASUS X201E?

I have the same laptop!

I bought it from amazon, here,
and according to the reviews there, lots of people had problems with wireless. This laptop ships with Ubuntu 12.04, and this problem is fixed by updating to the latest version of Ubuntu, 13.04.

To do this,

hit the super (windows) key, then type "update," then click on "Software & Updates"
select the "updates" tab
at the bottom, next to "Notify me of a new Ubuntu version", select "For any new version" (you'll have to type in your password)
close the window, hit the super key, and launch "Software Updater"
From here, you should be given the option to upgrade Ubuntu from 12.04 to 12.10
After this is finished (should take a couple hours), you'll have to repeat the process to upgrade from 12.10 to 13.04

After you update Ubuntu, there are a couple other bugs that pop up, or at least they did for me: suspend stopped working, and sometimes newly opened apps would open behind the current window. To fix these problems, you can check here and here.

Good luck!


Why does at-spi-registryd.desktop warning appear every time I shutdown?

The problem is that all of the 'assistive technology' stuff like at-spi2-registryd and at-spi-core cannot be removed properly, despite being disabled, without pulling out a whole load of programs. The best way i've found is to stop it from running with:

sudo mv /usr/lib/at-spi2-core/at-spi2-registryd /usr/lib/at-spi2-core/at-spi2-registryd.old

and

sudo mv /usr/lib/at-spi2-core/at-spi-bus-launcher /usr/lib/at-spi2-core/at-spi-bus-launcher.old


How do I monitor bytes transferred in an Internet connection?

Xubuntu 19.04 is EOL (End-of-life) and i strongly recommend update it.
However this works on any recent Ubuntu version (and in multiple flavours):

Using gnome-system-monitor you can measure the amount of data you have received and sent from your PC. You can install it by running this command:

sudo apt install gnome-system-monitor

Then go to the resources tab and you will see the info you need under Network History.
Hope it helps!


Since the game is for Windows, there is no way to run it on Linux directly; for that you are going to need WINE (Wine Is Not an Emulator) in order to make the game run.

You can download it from here and find all the information that you need.


Is there a way to display an icon only while my script is running?

It's sufficient enough to have a script like so:

#!/usr/bin/env bash

while true
do
    if pgrep -f gedit > /dev/null
    then

       printf "\r%b" "\033[2K"
       printf "Script is running"
    else
       printf "\r%b" "\033[2K"
       printf "Script is not running."
    fi
    sleep 0.25
done

This is a very typical way and often used in shell scripts. What this does, is running continuously, and every quarter of a second it checks if your script is running via pgrep -f.  if..fi statements in shell scripts operate on exit status of commands, so pgrep -f returning successful exit status means it found your script's process and it's running. Otherwise, we go to else statement.

In both cases we print a line of text that tells the user if it's running or not. There's also added printf "\r%b" "\033[2K" for printing an escape sequence for clearing the line(just for cleaner output).

From there, the sky is the limit. You can pass that text to another process in terminal via pipe or you can pass the output from the monitoring script to indicator-sysmonitor, which allows displaying custom information in the indicator. It can be installed via

sudo add-apt-repository ppa:fossfreedom/indicator-sysmonitor
sudo apt-get update
sudo apt-get install indicator-sysmonitor

After that just configure the indicator to display a custom command which would be the monitoring script. Example of configuring a custom command can be found here.

Of course, one could write their own indicator in Python, but  this might be just an overkill when there's a tool for that already.


After removing Ubuntu Builder there is still folder in home directory. Why? How to remove it?

Ubuntu builder creates it's own user account to build the new Ubuntu image in. The folder you're seeing is the home folder from this user.

My guess as to why it's still there is that Ubuntu Builder probably creates this user on runtime (when it's launched) and not when it's installed.

You can remove it by pressing Ctrl+Alt+T to open a terminal, then entering this command:

sudo rm -r /home/ubuntu-builder


Can't access to "Online Accounts" with system settings

It's a known bug https://bugs.launchpad.net/ubuntu/+source/gnome-online-accounts/+bug/950352

There is a suggestion there:
open the file

/usr/share/applications/gnome-online-accounts-panel.desktop

you'll need to be sudo in order to do it. Then find the line:

OnlyShowIn=GNOME;

and change it to

OnlyShowIn=GNOME;Unity;

Save&Exit. That's what did it for me, your online accounts icon should be back in the system settings panel.


Is there a Ubuntu in other languages (for example Russian)?

Yes, of course. For example, I use Ubuntu in Romanian. You can select this option when you will install Ubuntu.

Or, you can change the language for every user after install. Go in System Settings > Language Support and install the new language and after go in System Settings > User Account, select the user and change the language. Thus, each individual user can have his own display language.

Depending on how the thing go on Launchpad Translations (and often go well), some languages can have good and almost complete translations and some of them are less good. Therefore, although Ubuntu is set up in a language other than English, it is possible that you'll be seeing some untranslated fields.


"Please install following missing utilities: cvs" Yocto build issue

There isn't too much information about this but i found the answer. You have to download the necessary files, you do this by typing

sudo apt-get install cvs


execv error: Exec format error Running RPCS3

Alright, I seem to have found a workaround. In case anyone else has this very specific issue here is what I did:

Go to the RPCS3 downloads page and click "Download Previous Builds"
Find an older version. In my case I downloaded the 0.0.12-11117 build. You may have to try a couple before you find one that works
Run chmod a+x ./filename to make the file executable
Execute the file. At this point the emulator should open and prompt you to update it. In my case I was able to update it safely and still run it

Hope this helps some stray soul some day


Problems mounting .iso bigger than 4.3 gb on saucy

Try to mount it with UDF instead:

sudo mount -t udf -o loop /home/Downloads/awesomegame.iso /media/1


How can I change my Nautilus and icon themes back to what I had before?

If you install gnome-tweak-tool:

sudo apt-get install gnome-tweak-tool

you can access more customization options, including the theme, by launching 'Advanced settings' or gnome-tweak-tool through a terminal. A good starting point would be to see if the original themes (ubuntu-mono-dark for icons, ambiance for window and gtk+) are still listed in this tool under 'Theme'.


How Do I get steam to Work with nvidia 750 ti and 14.04?

I've got a similar card and no issues at all with Steam in 14.04. if 32 bit libc6 is needed, you can try the following:

apt-get install libc6:i386

Apart from that, have you installed Nvidia's proprietary drivers for your card? I think it's a must if going to play Steam games. I know nvidia's driver version 334 works with your card, but I'm not sure if 331 does (that's the version bundled with ubuntu 14.04). If not, you could use xorg-edgers PPA.


Failed to open \EFI\Microsoft\Boot\grubx64.efi - 80000000000000E

Boot Repair will sometimes copy GRUB to other filenames, including those that are normally used by Windows.

You didn't say whether you're able to boot normally after those errors appear, but your Boot Repair output makes it look like you can; specifically:

=================== efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 3003,3001,3004,2001,2002
Boot0000* Notebook Hard Drive   BIOS(2,500,00)................-.`.......`.A.`........................................
Boot0001* ubuntu    HD(1,800,100000,3c6d1212-54d5-4b03-8eb6-680c74425f10)File(EFIubuntushimx64.efi)
Boot0002* Internal CD/DVD ROM Drive BIOS(3,500,00)................-.g.......g.A.g........................................
Boot0003* Windows Boot Manager  HD(1,800,100000,3c6d1212-54d5-4b03-8eb6-680c74425f10)File(EFIMicrosoftBootbootmgfw.efi)RC
Boot0004* Ubuntu    HD(1,800,100000,3c6d1212-54d5-4b03-8eb6-680c74425f10)File(EFIubuntugrubx64.efi)RC
Boot2001* USB Drive (UEFI)  RC
Boot2002* Internal CD/DVD ROM Drive (UEFI)  RC
Boot3001* Internal Hard Disk or Solid State Disk    RC
Boot3003* Internal Hard Disk or Solid State Disk    RC
Boot3004* Internal Hard Disk or Solid State Disk    RC

This is the output of sudo efibootmgr -v. Don't freak out over it; you can ignore most of the long scary hexadecimal numbers. Pay particular attention to the BootCurrent and BootOrder lines. The BootCurrent line tells you how the OS booted -- in this case, by using the Boot0001 option, which you can see is for Ubuntu. The BootOrder line, however, indicates that the computer is configured to try several other options before that one. These are default boot loaders -- normally EFI/BOOT/bootx64.efi, but it's entirely possible that your computer uses EFI/Microsoft/Boot/bootmgfw.efi for some of these. My hunch is that Boot Repair copied GRUB to one or both of these locations, but with Secure Boot active, GRUB won't launch without the help of Shim (shimx64.efi). Hence your error messages, which I'm guessing come from your firmware.

The most puzzling thing about this is that you booted via the Boot0001 (Ubuntu) entry despite the fact that it's not on the BootOrder list. Maybe your firmware goes off-list when nothing else works, or maybe it's actually on the list but is not being reported by efibootmgr for some reason.

In theory, you should be able to overcome this problem by typing the following command in Linux:

sudo efibootmgr -o 1,3003,3001,3004,2001,2002

This changes the BootOrder line to be what it is now, except with the working Ubuntu entry first. I'd try this before deleting any files. If this doesn't work, though, go ahead and rename the EFI/BOOT/bootx64.efi and/or EFI/Microsoft/Boot/bootmgfw.efi files, or the directories in which they reside. If you can boot after renaming these files or directories, go ahead and delete them. If renaming them makes matters worse, you can use an emergency disk to rename them back to their original names.


How can I enable keyboard backlight on Sony Vaio pro with Ubuntu 13.10

Check also /sys/devices/platform/sony-laptop/kbd_backlight_timeout where:

0(default) = 10 secs
1 = 30 secs,
2 = 60 secs and
3 = unlimited.

Or possibly use a /etc/modprobe.d/sony-laptop.conf file with:

options sony-laptop kbd_backlight=2


How to decrease overall temperature - Ubuntu 18.04 lts?

Under volting helps a lot when there is over heating (and by lot I mean A LOT). To be on a safer side, manufacturers supply higher voltage than required to the CPU (which causes heating), as at very lower voltages CPU doesn't work properly under stress. Under volting is completely safe. It will not void your warranty whatsoever. Under volting is basically removing the excess voltage supplied and giving the minimum voltage required to run the CPU smoothly.
Try intel-undervolt from here on GitHub.
Here is an article on CPU undervolting in Linux which I followed
Some terms in the guide might be deprecated. Refer to the first link for the deprecated terms.
Here is a step by step procedure with the non deprecated terms

install git with sudo apt install git
run git clone https://github.com/kitsunyan/intel-undervolt
sudo su and then enter password
run ./configure --enable-systemd --enable-openrc && make && make install
close the root mode by typing exit and press enter
run sudo systemctl daemon-reload
run sudo gedit /etc/intel-undervolt.conf this will open a text editor
change the value in line 10 (in front of CPU) to -130 like this undervolt 0 'CPU' -130 (recommended -125)
now save that text file and exit
run sudo intel-undervolt apply and then run sudo systemctl start intel-undervolt
use the system for some time, if it looks stable then run sudo systemctl enable intel-undervolt.

As of selecting the offset, I use undervolt 0 'CPU' -130 in the /etc/intel-undervolt.conf file. As a beginner I would suggest you to stick to undervolting the CPU only.
To find the correct offset (unique to each CPU piece. Same CPU but on different computer could have different ideal offset) slowly  lower the offset by small values (I used 10), and at the point where your PC crashes, is the threshold. And set the final value to threshold - 10. In my case it crashed at 140 so I set it to 130.
The only downside (if you don't choose sudo systemctl enable intel-undervolt) is that you will have to apply the settings on every boot. I have created an alias with alias us='sudo intel-undervolt apply && sudo tlp start'. So I just have to type us in the terminal on a boot, and then I am good to go.
Note: the crashing of PC to calculate the offset is completely safe. It will not damage you hardware whatsoever.
Note: Any Intel CPU can go to -125 at least, above that comes the difficult part. If you want to take it to the limit, then only try increasing it step by step. Otherwise -125 will work just fine for any Intel CPU.


In Ubuntu 10.10 there's no longer a ~/.Xauthority file. Instead you'll find the equivalent in

/var/run/gdm/auth-for-<USER>-<RANDOM_CHARACTERS>/database

which will be re-created with new random characters on every session start. You can get its name via the $XAUTHORITY environment variable.

If you need a ~/.Xauthority file to be present, I guess you can simply create a symbolic link to $AUTHORITY on every session start:

Open System > Preferences > Startup Applications
Click on Add :

Name: Xauthority
Command: /bin/bash -c 'ln -s -f "$XAUTHORITY" ~/.Xauthority'
Comment: Creates a symbolic link from ~/.Xauthority to $XAUTHORITY

and add the entry by clicking on Add.
Now every time you log in, it should create the link to the current authority file.


Have no Internet connection over Crosscable

Ethernet crossover cables are only meant to be used to connect two computers. You can't use them to connect a computer with the internet.


What do the numbers in parentheses near the commands mean?

See the manual page for the man command. Ie. man man

  The table below shows the section numbers of the manual followed by the types of pages they contain.

1   Executable programs or shell commands
2   System calls (functions provided by the kernel)
3   Library calls (functions within program libraries)
4   Special files (usually found in /dev)
5   File formats and conventions eg /etc/passwd
6   Games
7   Miscellaneous (including macro  packages  and  convenâ
    tions), e.g. man(7), groff(7)
8   System administration commands (usually only for root)
9   Kernel routines [Non standard]

By the way it is also a dropdownbox on the openssh website:


Terminal lines shown during scrolling, use CLI

If you want to change using the GUI the answers you linked to still apply.
i.e. even though the programs are being run on the server  the output of those programs is still being displayed and stored on your local terminal.
Just follow the instructions given in the questions you linked to.
.
If you are using Gnome-terminal and want to change via command line.

Running this command on your local machine (where the Gnome-terminal you are using is installed) should show you your current config.

gconftool-2 -a /apps/gnome-terminal/profiles/Default

On My Ubuntu 14.04 this gives lots of key value pairs including

...
cursor_shape = block
 scrollback_lines = 10000
 use_theme_colors = false
...

Then this command should set your scroll back history to 60,000 lines

gconftool-2 --set /apps/gnome-terminal/profiles/Default/scrollback_lines --type int 60000

I did this on my system and then tested by running the command

cat /usr/share/dict/cracklib-small

This will output 52,000 lines into your terminal, if you can scroll back to the beginning of the dictionary - it worked.

If you want to set to unlimited, you could try

gconftool-2 --set /apps/gnome-terminal/profiles/Default/scrollback_unlimited --type boolean true


Reinstall GRUB on second disk's EFI partition from running system

I've finally got it to work, as follows (full Ansible playbook at the end).
I copy the original root partition to the new root partition, excluding some special mounts and (more significantly) the /boot directory contents, so I start from a clean slate:
rsync -ahPHAXx --delete --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/boot/*,/mnt/*,/media/*,/lost+found/*} / /mnt/root
Then install grub:
grub-install --efi-directory=/mnt/esp --boot-directory=/mnt/root/boot --removable --target=x86_64-efi
Generate grub config:
grub-mkconfig -o /mnt/root/boot/grub/grub.cfg
This doesn't include the vmlinuz or initrd images for later (assuming an empty boot partition), so copy those over:
rsync -ahPHAXx --exclude="*/" --delete /boot/* /mnt/root/boot
Since the UUIDs are different, I need to update /mnt/root/boot/grub/grub.cfg and /mnt/root/etc/fstab, and replace every instance of the old UUID with the new one.
I also need to edit the ESP grub.cfg (in /mnt/esp/EFI/BOOT/grub.cfg) to look on hd0 instead of hd1.
I also removed reference to these /dev/sdb mounts from fstab, so all that is left is a line to mount the ESP, and one to mount /.
The whole Ansible playbook that does this for me is here:
---
- hosts:
  - deploy
  become: yes
  become_method: sudo
  vars:
    device: /dev/sdb
  tasks:
    - name: Unmount
      mount:
        path: "/mnt/{{ item }}"
        state: unmounted
      with_items:
        - esp
        - root

    - name: Delete partitions
      community.general.parted:
        device: "{{ device }}"
        number: "{{ item }}"
        state: absent
      with_items:
        - 1
        - 2

    - name: Create efi partition
      community.general.parted:
        device: "{{ device }}"
        number: 1
        label: gpt
        fs_type: fat32
        name: EFI System Partition
        flags: [ esp, boot ]
        part_start: "1MiB"
        part_end: "513MiB"
        state: present
      register: part

    - debug:
        var: part

    - name: Create root partition
      community.general.parted:
        device: "{{ device }}"
        number: 2
        name: root
        label: gpt # need to repeat the label here, otherwise the first partition gets overwritten
        part_start: "513MiB"
        part_end: "100%"
        state: present

    - name: Make root partition ext4
      filesystem:
        dev: "{{ device }}2"
        fstype: ext4

    - name: Make efi partition fat32
      shell: "mkfs.fat -F32 {{ device }}1"

    - name: "Get UUID for existing root"
      command: blkid -s UUID -o value /dev/sda2
      register: root_uuid
      changed_when: False

    - name: "Get UUID for existing efi"
      command: blkid -s UUID -o value /dev/sda1
      register: efi_uuid
      changed_when: False

    - name: "Get UUID for new root"
      command: blkid -s UUID -o value {{ device }}2
      register: new_root_uuid
      changed_when: False

    - name: "Get UUID for new efi"
      command: blkid -s UUID -o value {{ device }}1
      register: new_efi_uuid
      changed_when: False

    - debug:
        var: efi_uuid.stdout
    - debug:
        var: new_efi_uuid.stdout
    - debug:
        var: root_uuid.stdout
    - debug:
        var: new_root_uuid.stdout

    - name: Mount root from the other device
      mount:
        path: /mnt/root
        src: "{{ device }}2"
        fstype: ext4
        state: mounted

    - name: Mount efi from the other device
      mount:
        path: /mnt/esp
        src: "{{ device }}1"
        fstype: vfat
        state: mounted

    - name: copy root partition over
      shell: rsync -ahPHAXx --delete --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/boot/*,/mnt/*,/media/*,/lost+found/*} / /mnt/root
      args:
       executable: /bin/bash

    - name: copy boot images over
      shell: rsync -ahPHAXx --exclude="*/" --delete /boot/* /mnt/root/boot

    - name: install GRUB to make it bootable
      shell: "grub-install --efi-directory=/mnt/esp --boot-directory=/mnt/root/boot --removable --target=x86_64-efi"

    - name: Edit grub.cfg to point to hd0
      replace:
        path: /mnt/esp/EFI/BOOT/grub.cfg
        regexp: hd1
        replace: hd0

    - name: Generate grub.cfg
      shell: "grub-mkconfig -o /mnt/root/boot/grub/grub.cfg"

    - name: Edit UUID in boot/grub/grub.cfg
      replace:
        path: /mnt/root/boot/grub/grub.cfg
        regexp: "{{ root_uuid.stdout }}"
        replace: "{{ new_root_uuid.stdout }}"

    - name: Edit root UUID in etc/fstab
      replace:
        path: /mnt/root/etc/fstab
        regexp: "{{ root_uuid.stdout }}"
        replace: "{{ new_root_uuid.stdout }}"

    - name: Edit ESP UUID in etc/fstab
      replace:
        path: /mnt/root/etc/fstab
        regexp: "{{ efi_uuid.stdout }}"
        replace: "{{ new_efi_uuid.stdout }}"

    - name: Remove /dev/sdb references from fstab
      lineinfile:
        path: /mnt/root/etc/fstab
        state: absent
        regexp: '^/dev/sdb'

With these requirements:
---
collections:
  - community.general


See Geany's manual on Virtual terminal emulator (VTE) page and check Execute programs in VTE option:

  Execute programs in the virtual terminal instead of using the external terminal tool. Note that if you run multiple execute commands at once the output may become mixed together in the VTE.


What does "hardy" mean in /etc/apt/sources.list?

Hardy is the name of the 8.04 Release, "Hardy Heron".

Each Ubuntu Release follows the same pattern, year.month numbers for versioning, e.g 8.04 8.10, 10.04 (usually 2 releases every year) and a code name.

Ubuntu Releases are:

4.10 - Warty Warthog
5.04 - Hoary Hedgehog
5.10 - Breezy Badger
6.06 - Dapper Drake
6.10 - Edgy Eft
7.04 - Feisty Fawn
7.10 - Gutsy Gibbon
8.04 - Hardy Heron
8.10 - Intrepid Ibex
9.04 - Jaunty Jackalope
9.10 - Karmic Koala
10.04 - Lucid Lynx

They appear on your sources list to indicate which release(version) of the repository you are using.

PS: You must have also realized by now, that Ubuntu releases follow an alphabetical naming order, always using an adjective and an animal name. The next Ubuntu release (10.10) will be named Maverick Meerkat.

PS2: The oficial Ubuntu page with all codenames, plus some discarded alternatives names can be found here, if you are curious about it.


Unable to change the permission of a file using chmod

I think you're confusing - with +. One adds a permission, the other removes it. Here's a silly little test with a new file that starts with global rwx (aka 0777):

$ install -m 777 <(echo) test; ls -l test
-rwxrwxrwx 1 oli oli 1 Oct  3 13:34 test

Let's remove read permissions with -r:

$ chmod -r test; ls -l test
--wx-wx-wx 1 oli oli 1 Oct  3 13:34 test

And add them back with +r:

$ chmod +r test; ls -l test
-rwxrwxrwx 1 oli oli 1 Oct  3 13:34 test


Due to a lack of hardware we obviously can't test this here but from what we can read

  Logitech Media Player should work with any DLNA certified server software, or any DLNA certified NAS device. Logitech Support Forum

the device should be able to receive content from any DLNA server running on your Ubuntu box. See

What DLNA server to choose?

Personally I recommend MiniDLNA because of it being light and stable.


How to forward serial devices' input to X?

I have used softwedge but there are alternatives, Ubuntu provides some information around the topic at the following url.

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


Try this solution - it works on my Probook:
https://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg4846225.html


I can't install steam-installer on 19.10

sudo dpkg --add-architecture i386

steam needs a bunch of i386 packages.

sudo apt update

and try again.


How to launch DropBox using its python script normally?

It doesn't really matter where you put that script, as long as you add the directory containing it to your PATH. You can do that by editing your .profile (type gedit ~/.profile in terminal) to add the line PATH=/path/to/script:$PATH (replace path/to/script with the correct path).

However, it might be a bad idea to simply add any directory to PATH, because whatever is in it will be added. You might want to create a folder named bin in your HOME and put the script there; I believe it's fairly standard, and it should already be in your PATH if it exists.


You want to change one of these settings in /etc/lightdm/lightdm.conf:

# session-wrapper = Wrapper script to run session with
# display-setup-script = Script to run when starting a greeter session (runs as root)
# greeter-setup-script = Script to run when starting a greeter (runs as root)
# session-setup-script = Script to run when starting a user session (runs as root)

I think that display-setup-script is what you want to modify. Just set it to your script. Turn that xset command into an executable shell script and stick it into /usr/bin. Then the config file will be:

display-setup-script=/usr/bin/xset_script.sh


How may I install the right Java Virtual Machine?

Just install the latest version of Java by opening a Terminal (CTRL + ALT + T) and running

sudo apt-get install openjdk-7-jre


I can suggest the following one-liner (supposing the current directory is the parent of the directories to backup):

for f in */; do tar -czf "${f%/}.tar.gz" "$f"; rm -rf "$f"; done

To change each folder name to lowercase, and substitute spaces with underscore:

for f in */; do f="${f// /_}"; f="${f,,}"; tar -czf "${f%/}.tar.gz" "$f" && rm -rf "$f"; done_


How to install Oracle 18C XE package on Ubuntu 18.04

Alien

Description

  Convert and install rpm and other packages.
  Alien allows you to convert LSB, Red Hat, Stampede and Slackware Packages into Debian packages, which can be installed with dpkg or apt.

It can also generate packages of any of the other formats.

This is a tool only suitable for binary packages.

Install

sudo apt install alien

Usage

alien -d your_rpm_file.rpm

Then install it with apt:

sudo apt install ./your_rpm_file.deb

I would google for a snap or docker image instead of converting a rpm pkg, eg:

https://github.com/oracle/docker-images/tree/master/OracleDatabase/SingleInstance/dockerfiles
https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md

For more info visit:

https://github.com/oracle/docker-images
https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md


Can I install ubuntu on a windows 10 tablet?

What you're trying to do is the entire reason the option Try Ubuntu exists!
So: make the USB drive, boot it up, choose the Try Ubuntu  option and if your hardware does not allow you to even choose that option, shut down the tablet, remove the USB drive and boot it back up as the Try Ubuntu option doesn't change anything on your existing machine and runs solely off the USB stick!
;-)


Why is chromium-codecs-ffmpeg-extra in my 14.04 system?

The package was not installed by default in Ubuntu. You installed the Chromium browser, and it requires that package, so it was also installed. Neither the Chromium browser or the extra codecs package for it are installed by default. Their installation is because you installed them.


Retrieving the proprietary blobs from Android for Ubuntu Touch

To extract the binary blobs, you have to first connect your device to your computer. Make sure adb detects your device.

Then, navigate to device/samsung/n7000 in your build environment and run the "extract_files.sh" script. The script will then automatically find all the binary blobs on your device and copy them to vendor/samsung/n7000/proprietary using adb pull.

See the full script for more information.

Alternatively, if CM is currently not installed on the device, download the cyanogenmod .zip for your device from here and extract it. Assuming you have extracted the zip to ~/Downloads/ ,you now have to edit extract_files.sh in
device/samsung/n7000 and change the line

adb pull /$FILE $DEVICEBASE/$FILE

to

cp ~/Downloads/cm-10.2-<DATE>-NIGHTLY-n7000/$FILE $DEVICEBASE/$FILE

putting the right folder name of the extracted zip of course. Save the script and run it.


Using a samba file server, when using a 3TB drive, clients only see 68.2GB on the network location

Well, stupid me. I forgot to modify the fstab file. This is how I solved it.

Find your drive you want to mount by using

sudo fdisk -l

I found that my device is named /dev/sdb1 so I then typed

sudo vim /etc/fstab

and enter in the following at the end of the page. (press i, make changes, then esc :wq)

/dev/yourdevicehere /yourmountpoint ext4 rw 0 0

Make sure you match your filesystem correctly (ext3, ext4..etc.)


Zipping all files in one archive

You can zip all files with a basename matching *.mp4 found under the current directory into a single archive with the following command:

zip my_mp4_archive.zip $(find . -name "*.mp4")

Zipping each file in an archive of its own

The following script will zip each file individually, in the same directory as the file itself is stored.

files=$(find . -name "*.mp4")

for f in $files; do
  echo "Compressing $f"
  (cd $(dirname $f) && zip $(basename $f.zip) $(basename $f))
done


eth0 is does not connect when plugged into span / mirror port

The "span" mode on a switch is intended to let you connect a standard cable from that port to a normal port on another switch by switching the transmit and receive lines (i.e. so data transmitted by one switch hits the receive lines on the other).  This is generally equivalent to using a cross-over cable to connect two normal ports on two switches.  It doesn't have anything to do with enabling promiscuous mode on a network card

The ports on network interface cards do not expect the transmit/receive wires to be crossed this way, so when the switch tries to send data to your computer, it is arriving on the transmit lines rather than the receive lines and vice versa.

There are some network cards that would work with the setup you've described, but they would just be detecting the cross over and correcting for it, rather than providing any more features over a standard card.


Is it possible to deploy a Ubuntu Cloud in an ESX-server

Found out the answer on - openstack based environments can be installed inside a VM but they are only running in an emulation mode with very low performance.


How to install Processing in Edubuntu 12.04

Download the PDE (Processing Development Environment) from processing.org. Select the appropriate OS type such as 32bit or 64bit.
Then extract the downloaded archive in your home directory. We assume it is in ~/processing directory.
Now execute chmod +x ~/processing/processing to give it execution permission.
You can now run it from a terminal by using commands like this

bash ~/processing/processing

Hope this help you.

Reference: This wiki page on processing forum.


Can't access another Ubuntu on WAN. ssh,ping,tracepath,nmap all fail. How to fix?

I am not sure what was wrong but restarting the router fixed the issue. I think there are settings/configuration at router level that was for some reason preventing it and restarting fixed it.


reduce interface size without increasing the resolution

In Unity, if you go to System settings (the icon is like a cog and spanner in the launcher) and select Appearance you'll see a section for Launcher icon size. The slider there lets you decrease the launcher size within limits. As far as application chromes (title bars etc) go I think Unity's defaults give as much space as possible.


How do I install the Noise Repellent plugin, for Ardour, in Ubuntu Studio 20.10?

Looks like you're missing one of the build dependencies to satisfy the need for fftw3, do this:
apt install libfftw3-dev

You may also need sordi for the sord_validate error.
apt install sordi


Try linking to 70-force-bitmaps instead. 70-yes-bitmaps doesn't seem to have anything in it.  (This is taken from your link.)  This worked for me on Ubuntu 12.04.

The process is like this (Added by a user on 14.04)

sudo ln -s /etc/fonts/conf.avail/70-force-bitmaps.conf /etc/fonts/conf.d/
sudo unlink /etc/fonts/conf.d/70-no-bitmaps.conf # For disabling no-bitmap setting

Then do this to update settings

sudo dpkg-reconfigure fontconfig


Acer Aspire installation of Ubuntu as the one and only OS

if u are using the ubuntu cd or a bootable pendrive then you can choose from different types of install.

One of the options there is to use the complete hard disk for ubuntu. Simply selecting this and clicking forward would erase the whole disk, format it to ext4( format used by ubuntu), and install ubuntu in the whole disk. You wont get any oher partitions. Just one with ubuntu in it.

Hope this helps.


If your cpu gets hot because the heat sink of your cpu ist covered by dust or the cpu fan not working the cpu might be throttled to prevent overheating.
See here


If I'm running a hybrid graphics card, should I disable/uninstall NVidia drivers, and what do I switch to?

The intel video card is perfectly capable of running desktop effects, so Unity should work as well. You cannot use the nvidia card directly (as you may already have noticed) because your notebook is an Optimus laptop (see also Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu? on that).

If you do not run programs that heavily rely on the graphics card, just stick to the Intel iGPU to save power as well. As a developer of Bumblebee, I can tell that work is in progress to get automatic power management working which would disable the nvidia card to save even more power. However, this feature is not mature yet so I'd not recommend it to regular or power users for the reason that you'll need some understanding of ACPI.


Full disk encryption on GPT on BIOS problems

You cannot encrypt the BIOS Boot Partition; the boot process on a BIOS-based computer that uses GRUB to boot Ubuntu (or any other Linux) goes something like this:

CPU powers on and executes BIOS code, which does not understand encryption.
BIOS reads the first sector (MBR) of the hard disk, which is necesarily unencrypted.
The MBR code, which is tiny, reads more extensive boot loader code stored elsewhere -- normally in the BIOS Boot Partition in the case of GRUB on a GPT disk.
GRUB reads its configuration file, normally from /boot/grub/grub.cfg. It may also load additional code from modules stored in /boot/grub.
GRUB reads the kernel and initial RAM disk (initrd) file, then executes the kernel.
The kernel runs startup scripts in the initrd.
The main filesystem is mounted and further startup processes are controlled from there.

Because the BIOS doesn't support encryption, the MBR cannot be encrypted. In theory, the MBR could include encryption code, and so the BIOS Boot Partition could be encrypted; however, in practice this is impractical, perhaps in the extreme, because the MBR boot code is a total of 440 bytes in size (446 bytes if you stretch the definitions a bit). Note that's bytes, not KiB, MiB, or some other value. GRUB uses the BIOS Boot Partition because 440 bytes is inadequate to do anything more than direct the boot process on to this bigger location; cramming encryption software into that space is a hurdle that's beyond the realm of the practical (and maybe totally impossible).

Thus, the earliest point at which encryption is a practical possibility is after the BIOS Boot Partition is read, and in fact, GRUB does support reading encrypted filesystems, so your Linux kernel can be stored on an encrypted filesystem. (At least, that's what I hear; I've never tried it myself.)

Note also that encrypting the BIOS Boot Partition will give you limited or no additional privacy protections. The bulk of what goes there is open source software. It may be tweaked and customized for your particular system, but that's mainly just to identify the partition that holds the Linux root (/) or /boot filesystem, and perhaps to include drivers needed on your particular computer. AFAIK, there are no passwords, usernames, or other sensitive data in the BIOS Boot Partition. If it were possible, encrypting the BIOS Boot Partition might make it harder for malware to take it over -- but in this scenario, the malware would merely need to adjust the MBR to redirect the boot process to its own code, or to completely re-write the BIOS Boot Partition using its own encryption keys.

That said, in theory a whole disk could be encrypted if the disk itself, or the controller to which it's attached, supported this feature. This would require the disk or controller to do the encryption and decryption, "beneath" the level of the BIOS. I'm not sure offhand how a password could be delivered to a disk connected to a standard controller, but if you had a plug-in card with an encrypted disk controller, it would necessarily interface with the regular BIOS, and could therefore prompt for a password at boot time. To the OS, the disk would look like a normal unencrypted disk. I vaguely recall hearing about such solutions, but I've never looked into them, and I don't know if such hardware is readily available today. (I might be remembering claims for vaporware.)

Note also that an EFI/UEFI works very differently from a BIOS; but AFAIK, EFI/UEFI also does not support encrypting 100% of a disk -- the boot loader must still reside on an unencrypted EFI System Partition (ESP). EFI is a lot bigger and more complex than BIOS, though, so I may be unaware of an obscure feature, and it may be easier to add such support to the EFI specification in the future. If you're interested in encrypting the BIOS Boot Partition as a way to prevent tampering from malware, though, the Secure Boot feature of most modern UEFIs is intended to tackle this problem. By signing the first boot code read from the disk and providing a chain of signing through to the OS, Secure Boot (theoretically) prevents tampering.


For some systems it is necessary to kill the pulseaudio process and prevent it from re-loading before restarting ALSA. If the following procedure works, it can be automated.

Set up Pulseaudio so it does not respawn automatically:

mkdir ~/.pulse
echo "autospawn = no" >> ~/.pulse/client.conf

Suspend your computer and wake him up
Restart ALSA:

sudo alsa force-reload

Start pulseaudio:

pulseaudio --start

To revert the changes, delete the file ~/.pulse/client.conf


How do I make java default to a manually installed JRE/JDK?

You can do this with sudo update-alternatives :

# Adding a new alternative for "java".
sudo update-alternatives --install /usr/bin/java java /media/mydisk/jdk/bin/java 1

# Setting the new alternative as default for "java".
sudo update-alternatives --config java

You have to do this for other jdk components too. These components are appletviewer, extcheck, idlj, jar, jarsigner, java, javac, javadoc, javah, javap, javaws, jconsole, jdb, jexec, jhat, jinfo, jmap, jps, jrunscript, jsadebugd, jstack, jstat, jstatd, keytool, mozilla-javaplugin.so, native2ascii, orbd, pack200, policytool, rmic, rmid, rmiregistry, schemagen, serialver, servertool, tnameserv, unpack200, wsgen, wsimport, xjc.

For further information, you can see the man pages for update-alternatives : man update-alternatives.

The command update-java-alternatives sets alternatives for java components and it seems to use update-alternatives for this.

EDIT: The answer above targets Java 6.

For Java 7, you have to add jcmd to the Java 6 list.
For Java 8, you have to add jcmd, jjs and jdeps to the Java 6 list.
For Java 9, you have to add jcmd, jjs, jdeps and jshell to the Java 6 list.


I have not solved this problem on 14.04, but I know that this bug keyboard-indicator. After the change of layout, xmodmap settings are reset. I made a script that resets the settings after changing the layout. I hope it will be useful to someone realties.

#!/usr/bin/env python

import os, dbus, gobject
from dbus.mainloop.glib import DBusGMainLoop

def event_handler(args):
        if args == "com.canonical.indicator.keyboard":
                os.system("xmodmap ~/.Xmodmap")

dbus.mainloop.glib.DBusGMainLoop(set_as_default = True)

bus = dbus.SessionBus()
bus.add_signal_receiver(event_handler,
                        dbus_interface="com.canonical.Unity.Panel.Service",
                        signal_name="ReSync")

loop = gobject.MainLoop()
loop.run()


Increase /home partition with unallocated space

You first need to move your partitions around so that the unallocated space is immediately after your /home partition; only then can you expand it.

Note that moving partitions is a risky and lengthy process, because the data must be physically moved on the disk. Back up your important data, and grab a good book.


I don't think that will be of much help, but when I stumble on this kind of problem (screen freezing), I try to update nvidia, and if it is not enough, I remove the graphic card and remove the dust on it. That helped me a few times.

I remember though that none of these methods solved my problem on Ubuntu 15.10, and I finally downgraded to 15.04 or 14.04 because I could not figure out why. I also changed my computer a few weeks later, and perhaps it is also computer related - I haven't tried Ubuntu 15.10 with this new computer however to figure it out.


Can't sync time to network server on Ubuntu 19.10

This problem occurs because of a conflict between ntp.service and systemd-timesyncd.service. It's a known bug.

Why does this happen? It occurs on systems that have been upgraded to 19.10. ntp.service is carried over during an upgrade, and 19.10's systemd-timesyncd.server won't start in its presence.

more /lib/systemd/system/systemd-timesyncd.service.d/disable-with-time-daemon.conf

[Unit]
# don't run timesyncd if we have another NTP daemon installed
ConditionFileIsExecutable=!/usr/sbin/ntpd
ConditionFileIsExecutable=!/usr/sbin/openntpd
ConditionFileIsExecutable=!/usr/sbin/chronyd
ConditionFileIsExecutable=!/usr/sbin/VBoxService

See the following:

systemctl status  ntp.service

● ntp.service - Network Time Service
   Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enab
   Active: active (running) since Wed 2020-01-15 11:05:12 PST; 1h 21min ago
     Docs: man:ntpd(8)
 Main PID: 28740 (ntpd)
    Tasks: 2 (limit: 4915)
   Memory: 2.0M
   CGroup: /system.slice/ntp.service
           └─28740 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 120:131

Jan 15 11:15:30 Satellite-E55 ntpd[28740]: 184.105.182.7 local addr 192.168.0.10
Jan 15 11:16:28 Satellite-E55 ntpd[28740]: 198.58.105.63 local addr 192.168.0.10
Jan 15 11:17:38 Satellite-E55 ntpd[28740]: 69.10.161.7 local addr 192.168.0.100
Jan 15 11:17:39 Satellite-E55 ntpd[28740]: 66.172.17.62 local addr 192.168.0.100
Jan 15 11:28:55 Satellite-E55 ntpd[28740]: 172.98.193.44 local addr 192.168.0.10
Jan 15 11:28:57 Satellite-E55 ntpd[28740]: 45.33.2.219 local addr 192.168.0.100
Jan 15 11:29:20 Satellite-E55 ntpd[28740]: 91.189.94.4 local addr 192.168.0.100
Jan 15 11:29:55 Satellite-E55 ntpd[28740]: 216.229.0.49 local addr 192.168.0.100
Jan 15 11:31:07 Satellite-E55 ntpd[28740]: 74.6.168.73 local addr 192.168.0.100
Jan 15 11:31:08 Satellite-E55 ntpd[28740]: 69.195.142.11 local addr 192.168.0.10

systemctl status systemd-timesyncd.service

● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; disabled; vend
  Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
           └─disable-with-time-daemon.conf
   Active: inactive (dead)
     Docs: man:systemd-timesyncd.service(8)

Jan 15 07:52:09 Satellite-E55 systemd[1]: Condition check resulted in Network Ti
Jan 15 07:52:11 Satellite-E55 systemd[1]: Condition check resulted in Network Ti
Jan 15 07:52:13 Satellite-E55 systemd[1]: Condition check resulted in Network Ti
Jan 15 07:52:23 Satellite-E55 systemd[1]: Condition check resulted in Network Ti
Jan 15 07:52:24 Satellite-E55 systemd[1]: Condition check resulted in Network Ti
Jan 15 07:52:57 Satellite-E55 systemd[1]: Condition check resulted in Network Ti
Jan 15 07:52:58 Satellite-E55 systemd[1]: Condition check resulted in Network Ti
Jan 15 07:53:00 Satellite-E55 systemd[1]: Condition check resulted in Network Ti
Jan 15 07:54:00 Satellite-E55 systemd[1]: Condition check resulted in Network Ti
Jan 15 07:59:57 Satellite-E55 systemd[1]: Condition check resulted in Network Ti

One visual side effect of this problem can be seen in the Date & Time settings panel. You can't enable "Automatic Date & Time". The switch flips back to disabled.

However, ntp still does the time synchronization with the various ntp servers.

This can be fixed by uninstalling ntp, ntpdate, and sntp, and letting systemd-timesyncd.service perform the time synchronization.

Sources:

https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1858095

https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1848309

https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1849156