How to configure KDE default settings for a new user of a group?

I've ended writing a script which transfers dot files, and after that chowns it all.

Edit:

I re-wrote this script in bash about three years ago. And I had been using this one for some time. However, I haven't used this script in years, and don't maintain this script anymore. I didn't reviewed this script now, but I would imagine it is not of high quality, given that I wrote it long time ago.

The basic idea is to store basic dot files on github, and make script download these and patch the username and assign proper permissions.

#!/bin/bash
# to get description use the -h flag

# You can see the structure of this code in emacs. For that eval the
# following lines:
# (mapc
#  (lambda (language-mode-hook)
#    (add-hook language-mode-hook
#              (lambda ()
#                (make-local-variable 'outline-regexp)
#                (setq outline-regexp "^## ")
#                (make-local-variable 'outline-heading-end-regexp)
#                (setq outline-heading-end-regexp ":\n")
#                (outline-minor-mode 1))))
#    '(shell-script-mode-hook sh-mode-hook))
# this makes use of outline-minor-mode and the default keys are:
# C-c @ C-t    show top level structure
# C-c @ C-a    show all
# for more see the Outline menu.

# TODO:
# update routine documntation?

# exit after a single error:
set -e

# ===========
## preambula:

PROGNAME=${0##*/}
PROGVERSION=4.02
NoColors=false

Dependencies=false
Root=false
Internet=false
Localhost=false
Base=`logname`
Update=false
Source=boris
Autostart=false

usage()
{
cat << EO
Usage: $PROGNAME <user>

This script install bkubuntu kubuntu set of programs and settings. It
assumes the user have x86_64 archeticture.

It does back-up all the configs, but it keeps only the latest back-up
-- so if You'll run this script twice in a row -- You'll lose Your
files. You might want to back up the original thing manually.

All of the options except for -u/--update require root privilages.

Examples
========

To install bkubuntu for Yourself::

    cd /path/to/bkubuntu.bash
    sudo ./bkubuntu.bash -i

To install Your bkubuntu to root::

    cd /path/to/bkubuntu.bash
    sudo ./bkubuntu.bash -r

To install bkubuntu from other user at localhost::

    cd /path/to/bkubuntu.bash
    sudo ./bkubuntu.bash -l -s <that user>

To update Your bkubuntu::

    bkubuntu.bash -u # provided bkubuntu.bash is in the PATH

Add -a if You want to have emacs, firefox, krusader, libreoffice
quickstart to run at start-up.

Options
=======

EO
cat << EO | column -s\& -t

  -i, --internet & fetchs bkubuntu from the internet and installs it for the current user
  -l, --localhost & fetchs bkubuntu from other user (-s)
  -a, --autostart & also turn on the autostart script (starts emacs, firefox, krusader at start up)

  -s, --source & source repository user, default to $Source
  -u, --update & updates Your bkubuntu git repos from the internet (should not be done under sudo)
  -r, --root & transfers subset of Your bkubuntu to the root

  -h, --help & show this output
  -v, --version & show version information
      --no-colors & disables coloring in output
EO
}

SHORTOPTS="hvars:ilu"
LONGOPTS="help,version,no-colors,autostart,root,source:,internet,localhost,update"

ARGS=$(getopt -s bash --options $SHORTOPTS --longoptions $LONGOPTS --name $PROGNAME -- "$@")
eval set -- "$ARGS"

while true; do
    case $1 in

        -a|--autostart)
            Autostart=true;;
        -r|--root)
            Root=true;;
        -s|--source)
            Source=$2; shift;;
        -i|--internet)
            Internet=true;;
        -l|--localhost)
            Localhost=true;;
        -u|--update)
            Update=true;;

        -h|--help)
            usage; exit 0;;
        -v|--version)
            echo "$PROGVERSION"; exit 0;;
           --no-colors)
            NoColors=true;;
        --)
            shift; break;;
        *)
            shift; break;;
    esac
    shift
done

if $NoColors; then
    BLUE=''
    GREEN=''
    RED=''
    BLACK=''
else
    BLUE='\033[94m'
    GREEN='\e[0;32m'
    RED='\033[91m'
    BLACK='\033[0m'
fi

# ===========
## functions:

autostart () {
    if [ -e /home/$Base/.kde/Autostart/bkubuntu_startup_simple.bash ]; then
        rm /home/$Base/.kde/Autostart/bkubuntu_startup_simple.bash
    fi
    if ! [ -d /home/$Base/.kde/Autostart ]; then
        mkdir /home/$Base/.kde/Autostart
    fi
    ln /home/$Base/cmp/devs/bk_automates/bkubuntu/bk_runs_at/bkubuntu_startup_simple.bash /home/$Base/.kde/Autostart/bkubuntu_startup_simple.bash
}

back-up_and_clean () {
    if [ -d "$Base~" ]; then
        rm -rf "$Base~"
    fi
    mkdir "$Base~"

    mv -T $Base "$Base~"
    mkdir $Base
    cd $Base

    echo -e "${RED}${PROGNAME}: ${GREEN}Done with backing up $Base (to $Base~).${BLACK}"
}

rebase () {

    # these files should have ho spaces!
    FILES="\
$PWD/.kde/share/config/plasma-desktoprc
$PWD/.kde/share/config/plasma-desktop-appletsrc
$PWD/.kde/share/apps/kfileplaces/bookmarks.xml
$PWD/.kde/share/config/krusaderrc
$PWD/.kde/share/apps/krusader/krbookmarks.xml
$PWD/.kde/share/apps/krusader/useractions.xml
$PWD/.kde/share/apps/krusader/krusaderui.rc
$PWD/.config/libreoffice/3/user/registrymodifications.xcu
$PWD/.kde/share/apps/kfileplaces/bookmarks.xml
$PWD/.kde/share/config/khotkeysrc
$PWD/.thunderbird/n8fe137g.default/secmod.db
$PWD/.thunderbird/n8fe137g.default/prefs.js
$PWD/.thunderbird/n8fe137g.default/extensions.ini
$PWD/.thunderbird/n8fe137g.default/extensions.sqlite
$PWD/.thunderbird/n8fe137g.default/panacea.dat
$PWD/.thunderbird/n8fe137g.default/startupCache/startupCache.8.little
$PWD/.mozilla/firefox/kkhrci0w.default/secmod.db
$PWD/.mozilla/firefox/kkhrci0w.default/prefs.js
$PWD/.mozilla/firefox/kkhrci0w.default/extensions.ini
$PWD/.mozilla/firefox/kkhrci0w.default/search.json
$PWD/.mozilla/firefox/kkhrci0w.default/extensions.sqlite
$PWD/.mozilla/firefox/kkhrci0w.default/startupCache/startupCache.8.little
$PWD/.mozilla/firefox/kkhrci0w.default/zotero/locate/engines.json"

    # root doesn't have all these files:
    if [ $Base = "root" ]; then
        FILES=`echo $FILES | perl -pe 's/ /\n/g' | perl -pe 's/.*(emacs|libreoffice|autokey|bkubuntu|mozilla|thunderbird).*//' | perl -pe 's/^\n//'`
    fi

    for fileName in $FILES; do
        sed -i "s/$Source/$Base/g" "$fileName"
    done

    echo -e "${RED}${PROGNAME}: ${GREEN}Done with rebasing.${BLACK}"

}

chown_logout () {

    # ------
    # chown:

    chown -R $Base $PWD
    echo -e "${RED}${PROGNAME}: ${GREEN}chown: everything went fine.\n    You may wish to restart now.${BLACK}"
    sleep 1

    # ---------------
    # finally logout:

    secsTilLogout=10
    while [ $secsTilLogout -gt 0 ]; do
        sleep 1 &
        clear
        echo -e "${RED}${PROGNAME}: ${GREEN}Done. Documentation for hotkeys is available at:\n    ~/bks/computer/HotKeyPoetry/index.html\n\n    Unless You kill me with Ctrl-c --\n    I'll logout computer in $secsTilLogout seconds.${BLACK}"
        secsTilLogout=$(( $secsTilLogout - 1 ))
        wait # the point of 'sleep 1 & -- wait' construct is not to take into account the time of `sleep' execution
    done

    qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 0 0

}

# ==========
## internet:

if $Internet; then

    # -------------
    # adding repos:

    echo -e \\n | sudo add-apt-repository ppa:kubuntu-ppa/ppa
    echo -e \\n | sudo add-apt-repository ppa:kubuntu-ppa/backports

    echo -e \\n | add-apt-repository ppa:cassou/emacs

    wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
    # perhaps I should add
    # deb http://download.virtualbox.org/virtualbox/debian precise contrib
    # to /etc/apt/sources.list

    wget -q "http://deb.playonlinux.com/public.gpg" -O- | apt-key add -
    wget http://deb.playonlinux.com/playonlinux_squeeze.list -O /etc/apt/sources.list.d/playonlinux.list

    apt-get update

    echo -e "${RED}${PROGNAME}: ${GREEN}Done with repos.\n    Now the back-up phase...${BLACK}"
    sleep 1

    # -----------
    # installing:

    echo -e \\n | apt-get install emacs-snapshot konsole krusader okular kolourpaint4 smplayer vlc audacious gwenview k3b synaptic kopete keepassx xclip firefox thunderbird procps tree xsel libreoffice wmctrl git virtualbox playonlinux build-essential kubuntu-restricted-extras gfortran parallel sshfs ssh

    echo -e "${RED}${PROGNAME}: ${GREEN}Done with installing prerequisites.\n    Now the cloning stage...${BLACK}"
    sleep 1

    # --------------------
    # preparing the place:

    cd /home
    back-up_and_clean

    # -----------------
    # clonning configs:

    git clone https://github.com/bk322/bk_dots .
    cp -R .bkubuntu/* . # copying dir structure
    git clone https://github.com/bk322/bk_automates /home/$Base/cmp/devs/bk_automates

    echo -e "${RED}${PROGNAME}: ${GREEN}Done with cloning configs.${BLACK}"
    sleep 1

    # parallel:
    # dpkg -i /home/$Base/cmp/repo/parallel*.deb

    # -----------------
    # applying configs:

    # autostart?
    if $Autostart; then
        autostart
    fi

    # ----------
    # XULRunner:

    mv /home/$Base/cmp/repo/.mozilla .
    mv /home/$Base/cmp/repo/.thunderbird .

    rebase
    chown_logout

fi

# =========
## copying:

if $Localhost; then

    cd /home
    back-up_and_clean

    # ----------------------------------
    # cloning configs from user $Source:

    cd /home/$Base
    git clone /home/$Source .
    cp -R .bkubuntu/* . # copying dir structure
    git clone /home/$Source/cmp/devs/bk_automates /home/$Base/cmp/devs/bk_automates

    echo -e "${RED}${PROGNAME}: ${GREEN}Done with cloning configs from $Source.${BLACK}"
    sleep 1

    # -----------------
    # applying configs:

    # autostart?
    if $Autostart; then
        autostart
    fi

    # ----------
    # XULRunner:

    mv /home/$Base/cmp/repo/.mozilla .
    mv /home/$Base/cmp/repo/.thunderbird .

    # -----------------------
    # rebase, chown, restart:

    rebase
    chown_logout

fi

# ==========
## updating:

if $Update; then

    # -------------
    # update repos:

    cd /home/$Base
    git checkout -- . && git pull -u origin master

    cd /home/$Base/cmp/devs
    git checkout -- . && git pull -u origin master

    cd /home/$Base
    echo -e "${RED}${PROGNAME}: ${GREEN}Done with syncing gits.${BLACK}"
    sleep 1

    # ---------
    # rebasing:
    rebase

fi

# ======
## root:

if $Root; then

    cd /
    Base=root
    back-up_and_clean

    Source=`logname`
    cd /home/$Source
    listOfFiles=`git ls-files | perl -pe 's/.*(libreoffice|autokey|bkubuntu|mozilla|thunderbird).*//' | perl -pe 's/^\n//'`
    for File in $listOfFiles; do
        Parents=${File#/home/$Source/}
        cp --parents "$Parents" /root
    done

    # -----------------------
    # rebase, chown, restart:

    cd /root
    rebase
    chown_logout

fi


Loading the operating system to the USB drive for Mac

Follow the instructions here: http://www.ubuntu.com/download/help/create-a-usb-stick-on-mac-osx

You run the dd command in Terminal.  As it notes, make sure you have the right disk (as it'll overwrite whatever is on there).  If your disk is /dev/rdisk3, then the command is:

sudo dd if=/Users/Me/Desktop/ubuntu.img of=/dev/rdisk3 bs=1m


Is that possible to add icons to the login screen top-panel?

I'm on 12.04, but this will work on 13.10 also.

Yes, it is possible to change the indicators for the unity-greeter. We could use GSettings to modify the settings, but because the unity-greeter is only run by the lightdm user, (so it's settings doesn't affect anyone else) it is easiest to just write a .override file.

1. Check the default indicators

You can see your default indicators in the dconf-editor or int the /usr/share/glib-2.0/schemas/com.canonical.unity-greeter.gschema.xml file. In the latter file you will see a key similar to this:

 <key name="indicators" type="as">
  <default>['ug-keyboard', 'ug-accessibility', 'session', 'datetime', 'power', 'soundmenu', 'application']</default>
  Which indicators to load
</key>

, those are the defaults for me. Check your's first.

On 13.10 this key looks like this:

<key name="indicators" type="as">
  <default>['ug-accessibility', 'com.canonical.indicator.keyboard', 'com.canonical.indicator.session', 'com.canonical.indicator.datetime', 'com.canonical.indicator.power', 'com.canonical.indicator.sound', 'application']</default>
  Which indicators to load
</key>

2 . Check the available indicators

You can check your available indicators in the /usr/lib/indicators3/7/ directory, or in the /usr/share/unity/indicators/ directory.

3. Write an override file

Just write a file with similar contents and save it as /usr/share/glib-2.0/schemas/myoverride.gschema.override

For 12.04

[com.canonical.unity-greeter]
indicators=['ug-keyboard', 'ug-accessibility', 'session', 'datetime', 'power', 'soundmenu', 'application', 'messaging']

For 13.10

[com.canonical.unity-greeter]
indicators=['ug-accessibility', 'com.canonical.indicator.keyboard', 'com.canonical.indicator.session', 'com.canonical.indicator.datetime', 'com.canonical.indicator.power', 'com.canonical.indicator.sound', 'application', 'messages']

In the 12.04 version I added the messaging indicator to the default list of 12.04. In the 13.10 version I added the messages indicator to the default listof 13.10.  I simply added them to the default list shown in STEP 1, you can do that too, or remove some from the default indicators if you don't want them to show up on the login screen.  (Watch out for the apostrophes.) IMPORTANT: On 12.04 you have to keep the 'ug-keyboard' and the 'session' indicator in the list, so DO NOT remove them if you have them in the default line, or lightdm will stuck in an endless loop. (like here )

Naming conventions in the override file: For files in the /usr/lib/indicators3/7/ directory the filename's preceding "lib" and the ending ".so" are not important, so for a file named libmessaging.so we could use 'libmessaging.so', 'libmessaging' or 'messaging'. For the files in the /usr/share/unity/indicators/ directory the filename's preceding "com.canonical.indicator." is not important, so for the "com.canonical.indicator.bluetooth" file we could use 'com.canonical.indicator.bluetooth' or simply "bluetooth'.

4. Backup (just in case)

Make a backup of the /usr/share/glib-2.0/schemas/gschemas.compiled file.

5. Compile

After all this run

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

6. Check the results

After this try to logout and see if it worked. Or you can also do a test of the login-screen without logging out, if you try from a terminal:

lightdm --test-mode

or

unity-greeter --test-mode

For me on 12.04 the messaging indicator worked, my printersmenu indicator doesn't. On 13.10 I tested with the messages indicator and it didn't show up, but neither produced erros, so I guessed that it is by design not showing up on the greeter-screen, because it is mostly useless there. So I checked the /usr/share/unity/indicators/com.canonical.indicator.messages file and it confirmed that it doesn't have a [desktop_greeter] section like e.g the session indicator has. So If you wan't the messages indicator (or another indicator without the [desktop_greeter] section) to show up on the login screen (even if it is mostly useless there), you will also have to edit its file in the /usr/share/unity/indicators/ directory, and make a copy of the [desktop] section in that file and rename the copy to [desktop_greeter] section. E.g for the messages indicator I ended up with this file for /usr/share/unity/indicators/com.canonical.indicator.messages:

[Indicator Service]
Name=indicator-messages
ObjectPath=/com/canonical/indicator/messages
Position=50

[desktop]
ObjectPath=/com/canonical/indicator/messages/desktop

[phone]
ObjectPath=/com/canonical/indicator/messages/phone

[desktop_greeter]
ObjectPath=/com/canonical/indicator/messages/desktop

After doing this change in the file, the messages indicator did show up on the login screen for 13.10 also.

If something goes bad and the login screen doesn't come up, just switch to a virtual console CTRL+ALT+F1 and restore your backup gschemas.compiled file. Or remove your myoverride.gschema.override file and run sudo glib-compile-schemas /usr/share/glib-2.0/schemas again. If the lighdtm stucks in an endless loop, and you can't switch to virtual console, just press the ALT+PrtSc+E magic key combo, this will kill lightdm and after this you can switch to the virtual console and do the repair.

Which indicators can you use? I don't know, I have only the defaults, but I guess you can try out any which installs itself to those directories listed above. (Or you could write an own indicator as always.)

Source for all of these? I looked into the code: link and link


How to connect to server with dynamic IP address over VPN

I'm no guru at this, but it appears your two ip addresses for wifi and eth are in different ranges so would need a router for an external pc to talk to it if connected on the same network - also your subnet on the wifi card probably should be 255.255.255.0 which could also be stopping the connection.

Have you tried putting the Wireless card on the same network as the ethernet?

--
This link may help you.
https://unix.stackexchange.com/questions/115893/how-to-enable-two-network-interfaces-both-for-internet-in-ubuntu12-04


Watching YouTube clips on Firefox uses around 20% of CPU power

Linux reports CPU usage per cpu/core/thread, so you can easily have multiple processes reporting 100% if it pegs each core, where Windows divides the usage by the total number of cores so that the total usage adds up to 100%.  So on a quad core (1 thread per core) 20% usage on Linux would show up as 5% usage on Windows.

I easily hit 30-35% usage on Chrome on an HD video with i7-3540M CPU @ 3.00GHz.

As far as memory usage, Firefox has all of its memory in a single process, Chrome breaks it out into multiple processes for each tab and plugin so it is hard to get a good idea of usage between the two.  My Youtube process is about 1G in memory for that tab.


ubuntu 14.04 closes all programs upon awakening

I found this answer to work for me.  I did it earlier today and it seems to be working for me (Ubuntu 16.04).

From the link:

  Create the file /etc/acpi/local/lid.sh.post and add the following to
  it:

#!/bin/bash
grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
/usr/sbin/pm-suspend
fi

  Make the file executable with chmod +x lid.sh.post and your problem
  should be solved.


Can't install HP Deskjet 2540 in Ubuntu 18.04

It should simply work without PPD file. It is not declared in /usr/share/hplip/data/models/models.dat even in latest HPLIP 3.19.3.

So you need to install all HPLIP stuff with

sudo apt-get install hplip-gui hpijs-ppds

and then follow hp-setup wizard.

If hp-setup fails, then try install all known printer drivers with

sudo apt-get install printer-driver-all

and use system-config-printer.


The documentation in your link is for installing the closed source drivers. I have a HD5650 and it works just fine with the open source drivers. There is nothing you need to do since these are the default drivers on the system.

Normally the closed source driver should give better 3D support ( the open source drivers have come a long way and are pretty good at this point ) and better support for the latest graphics cards. In case of the HD5600 series I see absolutely no need to install closed source drivers.


How to install Microsoft Office 2013 on Ubuntu 14.04?

I think you can not install MS Office on wine.

Ubuntu has LibreOffice, it's almost the same, and it supports MS Office document formats.


Cron scripts do not run in your 'normal' environment. The output clearly states:

 /usr/bin/bkp.sh: line 22: p4: command not found

And you said:

  p4 is located into /usr/local/bin

This can mean just that $PATH does not include /usr/local/bin, that's all. So modify your cron script and add this after your shebang:

#!/bin/bash

set -e
PATH="/usr/local/bin:$PATH"

Note: set -e will make your script quit if some commands fail. It is not required to solve your specific problem, but it may solve a lot of headaches in the future. Consider using it in all your scripts.


Running Ubuntu on a Notebook Computer off of the SD Card slot

What you would do is install the file system itself onto the SD card, and install grub onto the root of your main drive.  Or, you could go in your BIOS and set it so that the SD card boots first.  Then you would install grub on the card, too.


Putty key, Works on Win10, but not on Ubuntu LTS 18.04

Convert the key to OpenSSH format (note this will overwrite your existing SSH key if you have one)

sudo apt install putty-tools
mkdir ~/.ssh
puttygen ~/Desktop/name.ppk -O private-openssh -o ~/.ssh/id_dsa
puttygen ~/Desktop/name.ppk -O public-openssh -o ~/.ssh/id_dsa.pub
chmod 600 ~/.ssh/id_dsa
chmod 666 ~/.ssh/id_dsa.pub

Now you can simply use ssh to connect to your server in a regular terminal:

ssh user@host

Also note that if you open your file browser (nautilus, dolphin, etc.) you can use the GUI to browse your server by entering:

sftp://user@host

Where sftp:// means FTP over SSH in this case. There is also the fish:// protocol which also uses SSH but doesn't use any FTP like commands which may be faster.


Bluetooth RT3290 "no Bluetooth adapters found"

I found something that may work
sudo add-apt-repository ppa:blaze/rtbth-dkms
sudo apt-get update
sudo apt-get install rtbth-dkms
Reboot


"[screen is terminating]" Immediately, Never Creates Screen Instance

I googled the error and the first thing that came up was this site which said to try

Use Windows Bash Shell sources for Windows Bash Shell, not native Ubuntu. The 2 systems are not interchangeable. Regarding Bash itself you can get away with it  but tools like "screen" and "tmux" have specific needs that Windows Bash Shell just does not have (yet!). Any command you use in Ubuntu is bound to fail on Windows Bash Shell.

  I'm not trying to use any special programs, not trying to ssh, just want to use screen natively on my bash/Ubuntu console.

Yes, you do: "screen" IS a special program.

You wont succeed to get this running unless you can hack your way around software. "screen" is not supported in Windows Bash Shell (yet!). Windows 10 build 14361 will introduce "tmux" (and I assume "screen" will then work too) and that version seems to be an "insider preview build", not released yet to the general public.


Click on the appropriate link at http://www.hbr1.com/ (it will say "OGG Vorbis", and is under the header "Tronic Lounge") to download an .m3u to add back to Rhythmbox.

To import the file into Rhythmbox, go to "Import File" then select your .m3u file. From there, you can change the name and category of the station.


ubuntu 18.10 broken for a lot of packages? This time libdouble-conversion?

I had a similar problem (program not running on 20.04) where the .so.1 file is not available.
I solved with:
sudo ln -s /usr/lib/x86_64-linux-gnu/libdouble-conversion.so.3 /usr/lib/x86_64-linux-gnu/libdouble-conversion.so.1

After that the program run just fine. Might also be the case for you.


Terminal Closes On Running clear and large output commands

For those who may be reading this thread and having the same issue, I have found a solution.

Turns out the problem was that my /tmp directory did not have the correct permissions. Only root had rwx perms and that caused my terminal to exit or crash whenever trying to issue a command that needed to access /tmp in some way.

To correct this, I sudo su'd into root user and issued chmod 777 /tmp. I logged out of root, closed terminal, reopened as normal user, and as is well.

How I discovered /tmp may be the cause: UbuntuForums


Same problem here, just solved. It's actually quite simple, just didn't think about it.

Just right click over the grey area, you should read something like "close this panel" (translation might not be accurate because I use the italian version of this distro), click on that and the screen automatically
resizes.
I don't know how I managed to create the problem first though.


How did quickly run work to run a software from source?

What you want, may not work even by restructuring it as flat package. Because, it need glib schemas to be installed and other language/theme/icon files to be in place.

You may install it as Python package which is quicker then building DEB package.
python setup.py sdist
pip install ./*.tar.gz


How to see how long a device has been on (For devices that support this)

As you mention, hard drives support this through SMART and you can view that data through Disk Utility:

But past disks, I'm not sure I've ever seen this on other hardware.


Fixed it now!

I installed the program hdajackretask and overwrote the pin ID 0x10 with Internal Speaker (LFE). Install boot override and all works fine.


How to enable Mobile(GSM) network on Ubuntu touch nexus 4

Mobile data support is still being worked on, it is one of the goals for making the phone "dogfoodable" by the end of May.  To keep up with the latest developments, join the #ubuntu-touch IRC channel on freenode where you can talk to developers and porters from both Canonical and the community.


How to make partition on additional drive having already Windows and Ubuntu installed on C drive (dual boot)?

I would highly recommend making a backup (I personally prefer a drive clone) before attempting any repartitioning. After doing that I believe you can do what you seek through the LiveCD containing your present version of Linux, boot with that and use Gparted.


How to solve the Ubuntu 18.04 display issues (lagging, flickering)?

Assuming the nVidia is causing the issue, a workaround is to run on the Intel IGD exclusively.  The following steps achieve this in increasing order of 'exclusivity'. You could check for improvement after each step.

1. Configure Xorg to prefer the Intel

Create file /etc/X11/xorg.conf.d/10-intel.conf (this may require mkdir /etc/X11/xorg.conf.d), containing:

Section "OutputClass"
   Identifier "Intel"
   MatchDriver "i915"
   Driver "intel"
EndSection

2. Disable modeswitching out of IGD

Edit /etc/default/grub and add xdg.force_integrated=1 to GRUB_CMDLINE_LINUX. When done, run sudo update-grub before rebooting.

3. Blacklist the nouveau kernel driver

Edit /etc/default/grub and add modprobe.blacklist=nouveau to  GRUB_CMDLINE_LINUX. When done, run sudo update-grub before rebooting.

4. Uninstall the Xorg nouveau driver

sudo apt remove xserver-xorg-video-nouveau

This will trigger removal of the xserver-xorg-video-all meta-package, which by default is installed. That is alright, as long as xserver-xorg-video-intel remains installed. To be sure:

sudo apt remove xserver-xorg-video-all
sudo apt install xserver-xorg-video-intel


Package 'lib32ncurses5-dev', 'lib32z1-dev' has no installation candidate

TL;DR: sudo apt-get install zlib1g-dev libncurses5-dev

You seem to have attempted two kinds of things:

To install special for a 64-bit system that provide 32-bit libraries (so 32-bit programs can run). These special packages don't exist on a 32-bit system--the regular libraries are 32-bit.
To enable multiarch and install 32-bit packages on a 64-bit system. But multiarch is enabled by default in 12.04 already. Plus, you don't need multiarch to install 32-bit packages on a 32-bit system.

Whatever instructions or suggestions you've been following appear to be directed at users of 64-bit Ubuntu systems. But since uname -m produces i686, you have a 32-bit Ubuntu system.

Therefore, you should just install the regular 32-bit versions of the software for your 32-bit system. This is considerably simpler than anything you appear to have attempted so far.

The packages you probably want are:

zlib1g-dev  (package page, 32-bit file list)
Provides files like libz.a and libz.so, corresponding to lib32z1-dev.
libncurses5-dev  (package page, 32-bit file list)
Provides files like libcurses.a and libcurses.so, corresponding to lib32ncurses5-dev.

One way to install these packages is:

sudo apt-get update
sudo apt-get install zlib1g-dev libncurses5-dev

(If that doesn't fix the problem, then more information will be needed about the problem itself. Almost all the details you've provided pertain to what happened when you tried to solve it, rather than the problem you're trying to solve. In particular, the full output of running build/install-build-deps.sh, or of whatever build command causes that to be run, would be helpful, as well as a detailed description of what instructions you've been following, if any, and all steps done so far to obtain and attempt to build the software. But I suspect installing those two packages will just fix it. Or at least get your further through the build.)


Directly selecting text on hyperlinks? (In Windows with Alternate+Drag cursor, no drag/drop)

I usually position my mouse cursor to the left or right of they hyper-link. Then Left-Click and drag the cursor over the hyper-link.

If you only want a portion in the middle of the of the hyper-link, then you must use winKey+Alt+Left-Click and drag your mouse over the portion you want.


Are kernels from Ubuntu Kernel PPA supported for the same time frame as the version they are intended for?

If you're interested in stability assurance & tech support from Canonical, then a PPA kernel will definitely void that. In https://wiki.ubuntu.com/Kernel/MainlineBuilds they write:

  "The mainline kernels builds are
  produced for debugging purposes and
  therefore come with no support. Use
  them at your own risk."

If you're talking about them continuing with updates, I'd guess they would try - the current LTS is going to have plenty of users, and they don't have to test that much since it's not officially supported. However, some future kernel could include changes that would make it incompatible with 10.04 and they may not bother fixing that.


Why don't captchas work in UBUNTU Browser?

Perhaps you are being routed through VPN, or Tor.  If it senses a weird connection, it asks for captchas.  Try checking your ip address by doing a speedtest.


lsblk

To determine the DEVICE name of SSD, e.g. sda, sdb, sdc, etc.

smartctl -a /dev/DEVICE

Where DEVICE is the name from the first command.  This will produce all the statistics for your SSD.

Typically, Reallocated_Sector_Ct is associated with the count of sectors that have been flagged as bad.

If necessary, smartmontools is the package to install for the smartctl utility.


Port forward to a port on the same machine

iptables -t nat -A PREROUTING -p tcp --dport 25570 -j REDIRECT --to-port 25565

This assumes you're not routing traffic for an entire network through this box and that if you were there's no expectation that traffic destined for other hosts will be on that port


Broadcom wifi won't connect in room router is in but will in another room further away. Although sometimes does connect - but drops later

You can try to use a proprietary Broadcom driver.

Broadcom claims that it works for your adapter, but this claim is not very reliable ;-)

Install it this way

sudo apt-get install bcmwl-kernel-source

It if does not work, you can always remove it by

sudo apt-get purge bcmwl-kernel-source


Most stable filesystem to create a usb startup disk?

When it comes to creating a startup disk from scratch (you want to add all files manually) I'd recommend Ext4, as it basically eliminates all the defrag stuff you need with FAT, it is simple and recognized by most everything UNIX, and has great error recovery support. If you are burning an ISO to create a LiveUSB then it would come with its own (FAT? comment and tell me if I'm wrong on this) format on the disk with an MBR or EFI partition. When it comes to an install disk, it really doesn't matter all that much so long as you don't have it set up to have persistent data across reboots, however if you are installing to the USB Ext4 is what I'd choose, just because in my experiences data integrity is pretty much assured in Ext4 so long as you don't have an unstable medium. in which case it fails completely as it spreads files all over the partition so you can't rely on just partitioning around it and having the free partition space line up with the error.

When it comes to speed and such, I'd refer here as the technology (NAND) is the same for USB drives and SSDs, even if the interface isn't. You may think that the difference in write speed between the two and the bottleneck from USB would limit the stuff here, but what this really measures is how fast a block of system data can be written, regardless of how much writing is actually going on (actually kind of finding how much data has to be put through the port to write a specific amount of data) : http://www.phoronix.com/scan.php?page=article&item=linux_315_hddfs&num=3

I haven't had a ton of experiences with btrfs, though really Ext4 seems like it would be stable enough to really outperform a lot of other filesystems and seems remarkably capable when compared with all (yes, all) filesystems used natively by windows, like FAT, NTFS, and FAT32.

If you are using it for constant writing on a missions critical machine, I would use XFS as Ext4 doesn't do complete metadata/logging of all files and their contents, however for normal use Ext4 is remarkably resilient and doesn't include any unnecessary write requirements for file verification. Once it logs the location of each file and maybe does a hash (on some systems) of a swath of data, it kind of just picks where to write to and does so without going through multiple layers of location verification for each block.


How to bring back my Desktop Icon in Nautilus?

The Desktop icon showed up finally, when I set the dconf path /org/gnome/desktop/background/show-desktop-icons to true (I disabled it with intention before).

This setting controls whether on the Desktop shows the files in the Desktop folder. But I seems also to control the appearance of the Desktop icon in the spaces side bar for whatever reason.

I wouldn't call it a proper answer to my question, but I think that's the best I can do at the moment.


How to hide a specific mate-panel in Ubuntu?

1) Write a script, that toggles the autoHide value. (So the panel is not gone for good, but you get the extra space):

#!/usr/bin/env bash

hide=$(dconf read /org/mate/panel/toplevels/bottom/auto-hide)
# toggling it...
[ "$hide" = "true" ] && hide="false" || hide="true";
dconf write /org/mate/panel/toplevels/bottom/auto-hide $hide

( For some reason that value is not visible in the dconf-editor. )

2) Assign that script to a key in mate-keybinding-properties → custom shortcuts.

(F10 appears like a good choice to me. F9 is often toggling a sidebar, for example in caja and pluma, F11 is also about screen space, toggling FullScreen).

Update: enhanced version

reduce it's size when you intend to hide
and throw from right to bottom (on the right, one is far likely to inadvertily trigger the auto-show when grabbing a fullcreen (or right-side-snapped) windows' scroll bars...

#!/usr/bin/env bash

# contributed to → https://askubuntu.com/q/843027
hide=$(dconf read /org/mate/panel/toplevels/bottom/auto-hide)
# toggling it...

if [ "$hide" == "true" ]
then
  #unhiding
  dconf write /org/mate/panel/toplevels/bottom/auto-hide false
  dconf write /org/mate/panel/toplevels/bottom/size 140
  dconf write /org/mate/panel/toplevels/bottom/orientation "right"
else
  #hiding
  dconf write /org/mate/panel/toplevels/bottom/auto-hide true
  dconf write /org/mate/panel/toplevels/bottom/size 2
  dconf write /org/mate/panel/toplevels/bottom/orientation "bottom"
fi


How to install the printer installer on Ubuntu Server with Openbox?

you can install the system-config-printer like that found in Unity:

sudo apt-get install system-config-printer-gnome

Now you can run it from terminal:

system-config-printer

If you don't have cups installed, you can install it:

sudo apt-get install cups


It looks like you installed libinput. You have two options:

Enable tapping with libinput. It can be done by adding

Option "Tapping" "true"

to the touchpad section of /usr/share/X11/xorg.conf.d/90-libinput.conf.

Tapping in libinput is disabled by defualt.

Remove libinput. That will revert to xorg-synaptics user space driver. It can be done by

sudo apt remove xserver-xorg-input-libinput

libinput is a new user space driver that will replace xorg-synaptics in new distro versions. I do not recommend to remove it.


Software Center requires libkonq5-templates package

To reinstall the package, open a terminal and run:

sudo apt-get install --reinstall libkonq5-templates


Problem setting monitors to native resolution with Dell laptop (Ubuntu 13.04)

see this link :
https://wiki.archlinux.org/index.php/Xrandr
down scrool in title : Resolution lower than expected .
test it .


molden install gives fatal compilation error

You just made a typing mistake, the actual package you want is called libx11-dev (with lowercase x). So the command would be:

sudo apt-get install libx11-dev
sudo apt-get install libx11-6

If you search libX11-dev on Ubuntu Packages, it will return libx11-dev and not libX11-dev (notice the X). Make sure you have type the package correctly before attempting any install command.


kmag as snap-application: labeling missing

I finally could solve my problem.
 After uninstalling kmag as a snap I installed it via apt. Thus kmag was installed plus libqaccessibilityclient0 ("helper to make writing accessibility tools easier").
 This one did the trick. Now kmag works as it should - with all the labeling.


I think the problem might be with the graphics drivers.. i had a NVIDIA graphics card and used open source drivers and the issue occured, then i changed back to NVIDIA drivers and seems to have fixed it


How to remap key with shift and alt modifier using xmodmap?

Just found out, heuristically ! Look at the following :

xmodmap -e "keycode 38 = a A aacute Aacute ae AE ae"

It's basically

a: normal a
A: shift + a
á: altgr + a
Á: shift + altgr + a
æ: [some modifier combination] + a
Æ: shift + [some modifier combination] + a
æ: ???

So just reconfigure the key with the representations you want. For example, I reassigned period + altgr to interpunct (a bit expedient though):

xmodmap -e "keycode 60 = period greater 0x00b7 0x00b7 0x00b7 0x00b7"


How to allow a WAN connection via a forward port?

is there any reason why you are running the iptables firewall and fail2ban inside your internal network, from behind a hardware firewall?
In my experience they are quite tricky to setup and diagnose. especially when you are  running fail2ban, whose explicit purpose is to actually make what you are trying to do difficult.
e.g. If you try to unsuccessfully try to connect to your machine a certain number of times fail2ban will kick in an lock you out.
My suggestion (if you havent tried already) would be

try connecting to the internal machine without the iptables/fail2ban firewall.
once you get that working - setup iptables
once you get that working - setup fail2ban - if you feel you need that level of security inside a local network


Fixed it myself after doing a grep search for the UUID.

Turned out that /etc/grub.d/proxifiedScripts/custom had the old UUID, after replacing them with the new one, update-grub generated correctly with the proper UUID.

If someone could comment on why that happened or how to avoid this for other people would be very helpful. :)


Reset a USB Modem without physical access (KVM virtual machine)

I have tried this http://marc.info/?l=linux-usb&m=121459435621262&w=2 c-programm to reset usb.

$ cc usbreset.c -o usbreset
$ lsusb
Bus 002 Device 003: ID 0fe9:9010 DVICO
$ chmod +x usbreset
$ sudo ./usbreset /dev/bus/usb/002/003

The UMTS Modem disappears for ~20 secs and appears again in the VM.
Fortunately, it is redirected automatically by the qemu manager!

The problem is still NOT solved, as after 3 days even this usb reset will not allow me to establish a well-functioning connection.

A reboot of the VM is my last resort...

@ppetraki:

  The modem does not disappear from the network manager, its
  still there, no connection can be established though.


Nothing comes up when I try to change the SSH port

If the file comes up as blank when trying to edit using nano then the file is being created, as it doesn't already exist. This can also happen if you mis-type the filename.

To check whether the file is there:

cd /etc/ssh

Followed by:

ls -lh

This will output a list of files in the /etc/ssh directory.
If the file doesn't exist, then you may need to reinstall, try:

sudo apt-get update && sudo apt-get install openssh-server


What does a new Ubuntu user need to know about installing on an Acer Aspire a515-51g?

Reference:
Acer A515-51G 15.6-inch Laptop | amazon.in

Yes, this model support linux. Then it will sure support ubuntu.

For bios: Turn off uefi. Keep legacy mode. I had same problem in my acer laptop too. And i solved it by this.


I'm realizing that the name is actually arbitrary.

One can name it anything and it should work as specifics are specified in the config file itself.

Also there is by default a file called /etc/nginx/sites-enabled/default, which is a great to use when you only have an IP address setup.


No, your credentials are not stored or cached anywhere, when you log in. If you want to use single sign-on for access to resources on your machine and a network, then you should set up a kerberos authentication server, and set up your services to use kerberos for authentication. With kerberos, when you log in, the server gives you a session token which is cached, and which can then be used by other applications to authenticate to resources within the domain of the server providing the token.


Lenovo Thinkpad LED Blinking after waking from suspend

Ubuntu 16.04 uses systemd as its init system, we can write a simple script which resets the LED status each time systems wakes from a suspend.

Create a file here:

/lib/systemd/system-sleep/

Name it whatever you want, e.g: led. then make the file executable:

sudo chmod +x /lib/systemd/system-sleep/led

After that write these lines into the file using your desired editor:

#!/bin/bash
if [ "$2" = "suspend" ]; then
    case "$1" in
        pre) /bin/true ;;
        post) /bin/echo 0 on > /proc/acpi/ibm/led ;;
    esac
fi

It says if the event is a "suspend" (e.g: not a "hibernate") and we are in "post" mode (waking from not going into) write the 0 on in /proc/acpi/ibm/led which resets the LED.


How can I get all of the packages repository for Ubuntu server 12.04 (Precise Pangolin)

You can rsync a mirror out. The benefit of this is you can update by just running the command again. The downside is that you're downloading everything... We're talking hundreds of gigabytes.

If you just want to cache updates between lan clients, a caching proxy is probably a better idea.

But assuming you want everything, let's start by creating a directory for our mirror.

mkdir -p ubuntu-mirror/dists

Then we can rsync into that. My version below just gets you the bits you need, rather than syncing every release. If you need -backports or -proposed, add them.

rsync -avz rsync://archive.ubuntu.com/ubuntu/dists/precise{,-security,-updates} ubuntu-mirror/dists/

There is a mirror at the University of Indonesia. They may have a better network and they're almost certainly going to have better latency than a London server for you. Substitute kambing.ui.ac.id in for archive.ubuntu.com. Everything is signed so as long as you aren't spuriously adding keys, you can trust mirrors.

Now that will take about a hundred years to run the first time. I've no idea, it really depends on the server, your connection and how big the repo actually is at that moment in time. It will almost certainly take so long that you'll be out of date immediately. Thankfully updating is faster.

If you find kambing.ui.ac.id has broken packages, use the central server.

But after that, you can just share it however you like and add it to your apt sources. Again, it's all using the standard keys, so you shouldn't need to add anything else except its location to your /etc/apt/sources.list.


How to fix windscribe Json object couldn't be decoded

Hey everyone so I basically figured it out, I uninstalled it and installed it again. It worked.


How can I create a hardened Virtualbox image for PenTesting?

I'm tempted to flag this as a duplicate since there have been several questions  like this asked before, but you ask for specific security-centric things. Therefore in the spirit of helping:

There is an active security audit that's ongoing during every release cycle. It also contains good advice about some basic security measures that are already in place specifically to harden and test your system against unwanted external access.

Configuration

No Open Ports
Password hashing
SYN cookies

Subsystems

Configurable Firewall
Filesystem Capabilities
PR_SET_SECCOMP

Mandatory Access Control (MAC)

AppArmor
SELinux
SMACK

Filesystem encryption

Encrypted LVM
eCryptfs

Userspace Hardening

Stack Protector
Heap Protector
Pointer Obfuscation
Address Space Layout Randomisation (ASLR)
Built as PIE
Built with Fortify Source
Built with RELRO
Built with BIND_NOW
Non-Executable Memory
/proc/$pid/maps protection
Symlink restrictions
Hardlink restrictions
ptrace scope

Kernel Hardening

0-address protection
/dev/mem protection
/dev/kmem disabled
Block module loading
Read-only data sections
Stack protector
Module RO/NX
Kernel Address Display Restriction
Blacklist Rare Protocols
Syscall Filtering

With the list of existing protections in place, lets examine the rest of your question:

In relation to Logging connection attempts, this has been covered, and if you want something simpler to configure there is always fail2ban or denyhosts.
When watching configurations for modifications, there is AppArmor.
As far as indicating on TCP/IP Stack hardening, you would need data to validate the necessity of performing this, but for the paranoid there is a good post on the advantages of blocking SYN flooding. But as you'll notice from the security audit link above, SYN Cookies is enabled by default, and helps mitigate this out of the box.

So it appears that all you really need to do at this point, is ensure the extra applications you may/may not be installing are undergoing active security audits and that you are current with any patches. Have installed any extra AppArmor profiles required to secure your customizations. (or SELinux additions, respective to your particular configuration)

How to detect a SYN attack

It is very simple to detect SYN attacks. The netstat command shows us how many connections are currently in the half-open state. The half-open state is described as SYN_RECEIVED in Windows and as SYN_RECV in Unix systems.

# netstat -n -p TCP tcp        0      0 10.100.0.200:21
237.177.154.8:25882     SYN_RECV    - tcp        0      0 10.100.0.200:21
236.15.133.204:2577     SYN_RECV    - tcp        0      0 10.100.0.200:21
127.160.6.129:51748     SYN_RECV    - tcp        0      0 10.100.0.200:21
230.220.13.25:47393     SYN_RECV    - tcp        0      0 10.100.0.200:21

We can also count how many half-open connections are in the backlog queue at the
moment. In the example below, 769 connections (for TELNET) in the SYN RECEIVED state
are kept in the backlog queue.

 # netstat -n -p TCP | grep SYN_RECV | grep :23 | wc -l 769

The other method for detecting SYN attacks is to print TCP statistics and
look at the TCP parameters which count dropped connection requests. While under
attack, the values of these parameters grow rapidly.

 # netstat -s -P tcp | grep tcpHalfOpenDrop         tcpHalfOpenDrop     =   473

It is important to note that every TCP port has its own backlog queue, but only
one variable of the TCP/IP stack controls the size of backlog queues for all ports.


Move window to a adjacent virtual desktop in KDE

Yo can define you own shortcuts.
Go to settings ->shorcuts -> global keyboard shortcuts and there select the kde component "system settings" seach for window to next screen and choose your shortcut.

Depending of the system / version it could be in diferent subsection of "Global keyboard shortcuts" I have it in "system settings" and in other computer in "KWin" section. So if you don't find it take a look in other places.

System settings

search next screen


Poor graphics performance due to wrong mtrr settings

There is a simple solution for this. Just use kernel boot parameter enable_mtrr_cleanup.

Edit /etc/default/grub config file:

$ sudo nano /etc/default/grub

find a line containing GRUB_CMDLINE_LINUX_DEFAULT and you'll probably see these default params:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

So to use enable_mtrr_cleanup you'll add it like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash enable_mtrr_cleanup"

Then you must update your grub configuration with this command:

$ sudo update-grub2

And reboot:

$ sudo reboot

Then the message will dissappear and you'll see the system has found proper values for MTRR.


Bash function used with command and additional parameter

You have msg="${1}", but $1 is just the first argument to your function call DIALOG_OK which is just --msgbox.

Use "$@" and don't put in an intermediate variable as you will get issues with your quotes:

function DIALOG_OK() {
    local function_name="${FUNCNAME[1]}"
    dialog --title "Fist boot detected !" --backtitle "HeadlineHere" "$@"
}

or maybe an alias is better than a function in your case:

alias DIALOG_OK='dialog --title "Fist boot detected !" --backtitle "HeadlineHere"'


Problem:

Print the second field, the filename without the extension, then the first field.
Separate the output fields with a TAB.
Omit lines containing NO_GROUP.
In the output file, the combination of the first and second field must be unique (they constitute a unique key): any further records having the same key are to be discarded.

Solution:

awk 'FNR == 1 {delete a} !/NO_GROUP/ && !($2 in a) {print $2"\t"gensub(/\..*$/, "", 1, FILENAME)"\t"$1; a[$2]++;}' *.txt

Test run results:

OG5_132922      psychrobacter_aquaticus WP_021815421.1
OG5_128110      psychrobacter_aquaticus WP_021815427.1
OG5_153487      psychrobacter_aquaticus WP_084606284.1
OG5_129150      psychrobacter_arcticus  WP_007394757.1
OG5_130915      psychrobacter_arcticus  WP_010195908.1
OG5_128110      psychrobacter_arcticus  WP_011281115.1
OG5_126760      psychrobacter_arcticus  WP_010196670.1
OG5_128312      psychrobacter_arcticus  WP_010196689.1
OG5_126678      psychrobacter_arcticus  WP_010196702.1
OG5_132922      psychrobacter_arcticus  WP_011281110.1
OG5_126722      psychrobacter_arcticus  WP_010196711.1
OG5_126681      psychrobacter_arcticus  WP_010196728.1

Sorting:

If you want to sort the results, just pipe them to sort or sort -k2,2 depending on the desired output.


Try mv ~/.mozilla/ ~/.mozilla.old/ which pretty much resets your firefox to see if it helps.

Undo using mv ~/.mozilla.old/ ~/.mozilla/ if it did not help


How can I add Delete option to the drop down menu?

nautilus preferences > behavior (open nautilus, click on 'files' in unity panel to get preferences.

or just use gsettings, in a terminal

gsettings set org.gnome.nautilus.preferences enable-delete true


"Port numbers" aren't used in Linux, "device names" are.

First, disconnect all 3 cameras.

Then, in a terminal window:

journalctl --follow

Then connect your cameras, and watch the system's logging.


How can I change theme properties of selected unfocused items, they're difficult to read

I was facing the same issue and now that its fixed, here is the solution:

Go to Appearance Preferences
Select Theme tab and click Customize button.
Go to Colors tab and change the color (which should be white) of Text column for Selected Items row.

Hope this will fix your problem.

Note: As this is Theme change it will be applied in other applications too, so choose your color so that it is visible properly under the Background color in the same row.


Several pitfalls when building HTK with e.g. Ubuntu 16.04 - amd64. a) The new path´s. b) HTK is built with gcc -m32 : i386 build prerequisites are required.
Much easier if CentOS 6.9 - i386 or CentOS 7 - x86_64.

The package htk-tools_3.4.1-ubuntu14_i386.deb was created on Ubuntu 14.04 - i386, the files are from a HTK-3.4.1 build with CentOS 7.

Link : https://drive.google.com/file/d/1Di29AvqoRBEJ4haW2nusPT1wMPkE14B1/view?usp=sharing → Provides /usr/local/bin/{ 37 tools }.

Ubuntu 16.04 - amd64 : Download, and install :

cd Downloads/
sudo gdebi htk-tools_3.4.1-ubuntu14_i386.deb
            // some 32bits dependencies will be installed too


To get a list of all built-in kernel modules, run the following command.
cat /lib/modules/$(uname -r)/modules.builtin

To get a list of all built-in kernel modules containing the string spi, run the following command.
cat /lib/modules/$(uname -r)/modules.builtin | grep spi

You should expect to see some positive results from the second command showing that built-in spi kernel module(s) are installed on your system. Searching for files that end in spi.ko in Ubuntu 18.04 gives the following results, many of which are drivers, for example ethernet and touchscreen.
There are also many spi.ko files in /lib/modules/. You can use dpkg -S <path> to find out what package installed the selected spi.ko file. For example:
dpkg -S '/lib/modules/4.15.0-45-generic/kernel/drivers/iio/common/st_sensors/st_sensors_spi.ko'

I don't type the path, instead I drag the file's icon from the file manager into the terminal and the path prints after the cursor position automatically. Results:
linux-modules-extra-4.15.0-45-generic: /lib/modules/4.15.0-45-generic/kernel/drivers/iio/common/st_sensors/st_sensors_spi.ko

To download the source code of a package that contains a driver run the following command:
apt --download-only source <package_name>


Error executing Xilinx ISE Design Suite .bin file

This error is because you try to install on unsupported operating systems. From their website:

  Linux Support

  • Red Hat Enterprise Workstation 5.8 - 5.10 (32-bit and 64-bit)

  • Red Hat Enterprise Workstation 6.4 - 6.5 (32-bit and 64-bit)

  • SUSE Linux Enterprise 11 (32-bit and 64-bit)

  • Cent OS 6.4 and 6.5 (64-bit)

But the unsupported part comes from the fact that the installer assumes BASH and we use DASH as a shell. This should work:

$ cd /bin
$ sudo mv sh sh.old
$ ln -s bash sh
$ cd ~/Downloads
$ chmod +x ./Xilinx_Vivado_SDK_2014.1_0405_1_Lin64.bin
$ sudo ./Xilinx_Vivado_SDK_2014.1_0405_1_Lin64.bin

(adjust the file name to your download)

Mind you: this will also turn your machine to the bash shell but that is the consequence of using this. You turn back to the regular Ubuntu setup with:

$ cd /bin
$ sudo mv sh.old sh
$ exit

From the xilinx forums


Vivid - broken package using upstart on a systemd install

Seems to be a bug, you should ask the developer. In the meantime remove the package.

Check the file /var/lib/dpkg/info/dnscrypt-proxy.prerm, the pre-removal script and search for the command to stop the service, anything like service … stop. Comment the lines out and try it again. I will check this later at home to give a better explanation.
sudo apt-get purge dnscrypt-proxy


How can I reload video driver after black screen?

I don't know if this will solve your issue, you might have a different problem to mine. In my case, the black screen happens when the computer has been left alone for a while and the screen has turned off. While moving the mouse or pressing a key wakes it up, the screen remains black.

My workaround is to run an xrandr command that sets up my screen again. In your case, the command would be:

xrandr --output LVDS1 --auto

If that does not set up the correct resolution, use this one instead:

xrandr --output LVDS1 --mode 1280x800

However, that's hard to type on a black screen. So, make a little script that runs this command:

echo -e '#!/bin/bash\nxrandr --output LVDS1 --mode 1280x800` > ~/bin/fix_screen.sh

The command above will create a file in your $HOME/bin directory (if the directory does not exist, create it with mkdir ~/bin) called fix_screen. Now, make the script executable:

chmod +x ~/bin/fix_screen

Finally, assign a shortcut to it. Open the Settings dialog:

Then, go to Keyboard => Shortcuts => Custom Shirrtcuts and click on the + sign:

And then enter this:

Finally, choose a shortcut for it. Just click on Disabled and then type the shortcut you want:

Now, the next time you have this black screen issue, just use the keyboard shortcut and everything should be fine.


Normally this would be caused by a hardware failure. If you have replaced the cables try a different monitor. If the different monitor works, then the problem is the monitor. If a different monitor is still blue, then it's likely the mother board.

A fast way to tell, is the color blue during boot? If so, it's hardware (specially if it's during BIOS POST).


Editing Gsettings unsuccesful when initiated from cron

The solution

It turned out the blind spot was a hole in my knowledge. The reason for not running specific commands in the python script (gsettings set) was because cron uses a very restricted set of environment variables.

To run a gsettings *set* command from cron (in general), it takes more than just running it from your personal cron file; the environment variable DBUS_SESSION_BUS_ADDRESS is needed for correct execution.

For reasons of convenience and flexibility, I solved it, inspired by- and based on the information in this post on stack overflow, by creating an "intermediate" script that both exports the variable and calls the actual script. The actual script edits gsettings. Since (normally) a process inherits the environment of its parent, now the script runs fine.

#!/bin/bash

PID=$(pgrep gnome-session)
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-);/path/to/script.py

(assuming script.py is executable)

Including the DBUS_SESSION_BUS_ADDRESS variable in a python script

To make editing gsettings possible by a python script, run by cron (and make an intermediate script unnecessary) the function below could be included in the script. It should be called before the gsettings set function in the script.

#!/usr/bin/env python3
import os
import subprocess

def set_envir():
    pid = subprocess.check_output(["pgrep", "gnome-session"]).decode("utf-8").strip()
    cmd = "grep -z DBUS_SESSION_BUS_ADDRESS /proc/"+pid+"/environ|cut -d= -f2-"
    os.environ["DBUS_SESSION_BUS_ADDRESS"] = subprocess.check_output(
        ['/bin/bash', '-c', cmd]).decode("utf-8").strip().replace("\0", "")


cant install fglrx (proprietary ATI driver) for HD 8970M

As of fglrx-13.35.1005 the HD8970 works okay now.


Strangely quickly runs but debugger crashes with no exception

Winpdb can't locate the glib settings schema which is used for storing preferences. For example, if you look in the Preferences.py file which Quickly auto-generates, you'll see a call to Gio.Settings("net.launchpad.XXX") which retrieves any locally stored preferences for your application, based on the defined schema.

The documentation for glib-compile-schemas tells us that schemas are searched for in paths matching glib-2.0/schemas/ under the directories in XDG_DATA_DIRS. So, you have a choice. You can either formally install the schema as so:

sudo ln -s $PWD/data/glib-2.0/schemas/net.launchpad.XXX /usr/share/glib-2.0/schemas/
sudo glib-compile-schemas /usr/share/glib-2.0/schemas

Or, much more simply, you can set the variable at execution time:

XDG_DATA_DIRS=$XDG_DATA_DIRS:data quickly debug

Coincidentally, the same advice applies to running your application outside of Quickly, e.g.

XDG_DATA_DIRS=$XDG_DATA_DIRS:data python bin/XXX

Note that the above commands assume you're in the root dir of your project, as you probably are if you're using Quickly.


Why does do-release-upgrade try to upgrade my system to 15.10, and how to I make it upgrade to 16.04?

Before doing the sudo do-release-upgrade -d, make sure that your /etc/update-manager/release-upgrades file ends in Prompt=lts.  This will enable the upgrade tool to fetch the next LTS release (16.04) instead of just the next release (15.10).


You should read all the answers here:

How do I completely remove Samba?

But the solution which seems best is:

sudo apt -y remove --purge samba samba-common cifs-utils smbclient
sudo rm -rf /var/cache/samba /etc/samba /run/samba /var/lib/samba /var/log/samba

If you want to keep samba and only one to uncheck a specific folder see this:

How to remove/disable sharing of single folder [SOLVED]

The share definitions are in /var/lib/samba/usershares. Open it (as root if necessary) and remove the definition files.


enable vibration on receiving calls ubuntu touch

There is no such option on stable (trusty) channel. I suggest you change channel to ubuntu-rtm.

Connect your device to your ubuntu pc through usb. Then open a terminal and run

sudo ubuntu-device-flash --channel=ubuntu-touch/ubuntu-rtm/14.09

After your device has rebooted go to system settings -> sound


How to install ubuntu 14.10 on flash drive

I made a bootable flashdrive using a windows netbook and the program at this webpage.
This worked great for me. I have used it to install on a few computers as well as running Ubuntu Live from the stick itself.


if possible how can i install required software on it?

No. BUT you -never- install software on a disk you want to restore.

about a month ago

That will be impossible. There is only a small limited time after you formatted a partition that you can restore the previous state. One of the things you can not do is use a partition you want to restore. You used it for a month... the old system will be gone.
In the case you managed to avoid writing to those parts of the disk you need to restore ... the way to do this: download Ubuntu on ANOTHER computer and make a bootable live session, install testdisk in it and then use that to boot from to scan your system. Always worth a shot but I seriously doubt it will get you your file back.


G5 quad core will not boot from Ubuntu CD

Only you can workout the openfirmware command as this depends on how your CD drive is connected.  The 12.10 PPC Lubuntu desktop/live ISO has a patch that should allow you to boot using the option/alt key on any CD drive.  If you want to install an earlier version then go via usb https://wiki.ubuntu.com/PowerPCFAQ#How_do_I_boot_from_a_USB_drive.3F .  This http://ubuntuforums.org/showthread.php?t=2051337 method is pretty fool proof.


How to reverse tether the internet connection via wifi

Create the wifi hotspot via "Create new wireless network" from the network connections menu.


Actually, sed could work perfectly well, but here are some more choices as well:

1. sed

sudo sed -i.old -r '/[ \t]\/[ \t]/{s/(ext4[\t ]*)([^\t ]*)/\1\2,user_xattr,acl,barrier=1/}' /etc/fstab

Explanation:

-i.old : Edit the file in place and create fstab.old as a backup of the original file before the changes.
-r : Enable extended regular expressions.
/[ \t]\/[ \t]/{} : If this line matches a / surrounded by a space or tab (if this line describes the / mountpoint).
s/(ext4[\t ]*)([^\t ]*)/\1\2,user_xattr,acl,barrier=1/ : s/pat/replacement/ is the substitution operator, it will replace pat with replacement. Here, we are matching ext4 and any following space or tab (needed to anchor the match, if your file systems are not ext4, you'll need to change that) and then capturing (that's what the parentheses do) the longest stretch of non-whitespace characters after that. In other words, capturing the options field of fstab. We then replace those with \1 (the first captured pattern), \2 (the 3nd capturef pattern, the original options) plus the extra options you wanted to add.

2. Perl

sudo perl -i.old -pane 's/$F[3]/$F[3],user_xattr,acl,barrier=1/ if $F[1] eq "/"' /etc/fstab

Explanation:

-i.old :  Again, this will cause the file to be edited in place and a backup called fstab.old will be created.
-pane : -p means print each line, -a automatically splits input lines into fields on white space and saves them as the array @F. -n means read line by line and -e lets you pass a script on the command line.
The actual script will add the extra options to the current value of the 4th field ($F[3],1st field is $F[0]) only if the second ffield ($F[1], the mount point) is /.

3. awk

sudo cp /etc/fstab /etc/fstab.old &&
 awk '($2=="/"){$4=$4",user_xattr,acl,barrier=1"}1;' /etc/fstab.old | sudo tee /etc/fstab

Explanation:

Most versions of awk don't allow in place editing so the first command will create a backup copy. The awk will then check if the 2nd field is / and if so, will add the required text to the 4th field, the options. The 1; is awk shorthand for "print the line". The sudo tee is just a trick to allow printing to /etc/fstab since simple redirection won't work with sudo.

4. pure bash

sudo cp /etc/fstab /etc.fstab.old
while read fs mp ty op du pa; do
    [[ $mp = "/" ]] && op="user_xattr,acl,barrier=1,""$op";
    printf "%s %s %s %s %s %s\n" "$fs" "$mp" "$ty" "$op" "$du" "$pa";
done < /etc/fstab.old | sudo tee /etc/fstab

Explanation

while read fs mp ty op du pa; do ...; done < /etc/fstab : Read each fstab line and split into the relevant fields.
[[ $mp = "/" ]] && op="user_xattr,acl,barrier=1,""$op"; if the mount point is /, add the extra options to $op.
The printf just prints each line correctly.


Easy way to create movie DVDs? DVDStyler QDVDAuthor DeVeDe No Go

Here are a couple other alternatives you can try:

Bombono DVD - It seems that some users report that it cannot be run from the Unity dash, however the terminal command bombono-dvd will open it once installed.
KDE's KMediaFactory - This installs and runs fine for me, and like all other KDE software, it seems to be quite complete in design and runs fine. You will have to install all the KDE base libraries, but if you're not concerned about disk space that will not be a problem.
Mistelix - This seems to be more targeted towards users desiring to create homemade slideshow-type projects, but it may achieve your goal anyway.
Tovid GUI - It has been described as "archaic". However, upon installation it seems that this is probably the most complete and feature-rich software available for the intended purpose. You will be presented with a plentiful array of options. However, this is also meant to be run from the terminal, with the command tovid gui.


Firefox bookmarks in the Ubuntu files system

The easiest thing to do would be copying the Firefox profile folder over

~/.mozilla/firefox/xxxxxxxx.default

http://kb.mozillazine.org/Profile_folder_-_Firefox#Linux

The bookmarks are actually stored in bookmarks.html if you just want that.


It's likely that you have caused the machine to use the backup nouvou or vga drivers if your nvidia configuration failed.

You need to reassert the old xorg configuration:

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
sudo cp /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf

Then restart your computer to take effect. If you don't solve this issue wit this, please post your configuration and your dmesg log. Also consider posting a bug report as to why you needed to configure nvidia in such a way as to potentially make it fail.


How to install times new roman, calibri, courier fonts on ubuntu 17.04/Libre Office 5

You simply need to install ttf-mscorefonts-installer by opening a terminal (easiest way to do is pressing ctrl+alt+t) and typing:

sudo apt install ttf-mscorefonts-installer

After you typed in this command you will be prompted for your password which you should supply.

In some cases the installation will print out an error message about a font not being able to be accessed by _apt, means the install partially failed.

Then do the following line by line on terminal (lines beginning with # are comments and you can leave them out). You can copy the lines here with ctrl+c and paste them into the terminal by ctrl+shift+v but make sure you copy the whole line each time.

# create a temporary directory
cd "$TMP"

# check and download the fonts
awk '/Url/ {system("wget "$2)}' /usr/share/package-data-downloads/ttf-mscorefonts-installer

# re run the installation
sudo /usr/lib/msttcorefonts/update-ms-fonts "$TMP"/*
sudo touch /var/lib/update-notifier/package-data-downloads/ttf-mscorefonts-installer

# clean up the temporary directory
cd ..
rm -r "$TMP"

you can close the terminal now by clicking on the 'X' on its top-bar or by typing exit. The fonts should then be available within LibreOffice.


kernel.yama.protected_nonaccess_hardlinks is an unknown key

While you already solved your issue by rebooting, I'm posting in hopes that someone else will benefit. I know I would have.

It seems that the sysctl was changed somewhere between the kernels used in Ubuntu 12.04 and 14.04. The new sysctl key is fs.protected_hardlinks. There is also a config for this (and the similar key fs.protected_symlinks) in /etc/sysctl.d/10-link-restrictions.conf that will enable this by default at boot, so be sure to edit this file as well.


A better/easier way than using expect is SSHPASS, which sends a password through with an SSH request:

sshpass -p <PASSWORD> ssh <USER>@<SERVER> <SSH Command>

PASSWORD is the password to be entered when prompted, USER is the username, SERVER is the server IP Address (eg. 10.8.100.100) and SSH Command is the command you want to execute.

For your example:

sshpass -p <PASSWORD> ssh qbadmin@10.3.2.0 mkdir <full path for new dir>

To install SSHPASS:

sudo apt-get install sshpass

If you are wanting the SSH session to remain afterwards than you can use expect with the following,

#!/bin/bash
##Enter Username and Password Details:
userName=<UserName>
password=<Password>

expect -c "
    spawn ssh ${userName}@10.8.100.100 ##put your own IP here
    expect "password: " ##or whatever password prompt you get
    send "$password\r"
    expect -re "Last Login: " ##or whatever the end of your welcome message is
    send "su -i"
    expect "password for <UserName>"
    send "$password\r"
"

This will leave the root access logged in, however until the script sends a return statement it will hold control until you hit Ctrl+c.  But this should answer your question.


Is it safe to do symlinks for the entire machine?

No. That would render your virtual machine unbootable. The NFS system is loaded at a certain point in the booting process. Before this point, no files on the NFS will be accessible.  This means that the machine won't be able to access the files it needs in order to boot. These include (but are not limited to) the kernel itself, the default shell /bin/sh and everything under /bin which includes the commands needed in order to mount the NFS share.

So no, this is not a good idea. More importantly, it isn't necessary. Most of the directories in / are not very big. Just identify the one that is taking up the space and put that one there. You should be able to move either of the following with no major issues:

/var/cache
/usr/local
/usr itself can also usually be moved but make sure nothing essential is in /usr/local/bin. It probably won't be, but check.

Those are probably the ones taking up the space anyway.


There are many history settings available via the builtin command set -o or environment variables, see bash's documentation on its history facilities.  From that, it follows that HISTFILE=/dev/null will let bash save the history into the void.


Apps started slowly once when I started them as a user

This is most likely caused by the problem discussed here, [Some applications on Ubuntu 19.10 very slow to start

Along with the previous answers, I found the problem doesn't happen if you choose to Upgrade using the Release-Upgrade method. An easy method would be to install 18.04.4, then from that system install 20.04 by running sudo do-release-upgrade -d
In my case the Internet Upgrade would take about 15 to 20 minutes and afterwards there wasn't any trouble with some Apps starting with a 25 second delay.


How to successfully restart a network without reboot?

You can run this command to take down all interfaces:

sudo ifdown -a

Then run this to bring them back up again:

sudo ifup -a

Hope that helps!

See also:

How to restart the networking service?


Sharing internet between Mac mini (with Ubuntu) and Android

Ah, nevermind.

The problem was that I didn't select "Share with other computers" at the wired connection settings.

(see: http://narnicles.wordpress.com/2011/06/17/sharing-your-internet-connection-in-ubuntu-through-wifi-and-ethernet/ )


How to get deb packages for Ubuntu wallpapers

You can find a compressed folder with all of the Ubuntu 15.04 wallpapers here.


Problem with installing Steam on Ubuntu 15.10

Run the following in a shell:

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

And steam should start to work:

steam

This worked for me. (source)


Emojis Stop Working After Restarting Ubuntu (fonts-noto-color-emoji)

Here is a topic related to a bug that you described.

https://bugs.launchpad.net/ubuntu/+source/fonts-noto-color-emoji/+bug/1859926

I fixed it using denshigomi's suggestion:

  So far it seems a permanent workaround is to create a symlink to the noto color emoji files in the current user's ~/.fonts directory:

$ shopt -s dotglob; mkdir -p ~/.fonts/truetype/noto; ln -s /usr/share/fonts/truetype/noto/* ~/.fonts/truetype/noto


How add/find options of a custom executable programm

Create a file here:

/etc/bash_completion.d/

name it whatever you want, e.g: myscript.

Add these lines into it and save it:

_my_script_comp ()
{
  local cur # A pointer named "cur" to current completion word.
  COMPREPLY=() # Array variable storing the possible completions.
  cur=${COMP_WORDS[COMP_CWORD]}

  # Show it for every possible combination
  # we could do "s*" to only complete words starting with "s"
  case "$cur" in
    # Generate the completion matches and load them into $COMPREPLY array.
    *)  COMPREPLY=( $( compgen -W 'start status stop' -- $cur ) );;
  esac

  return 0
}

complete -F _my_script_comp script.sh

Now you've got your bash completion for /usr/local/bin/script.sh.

My source.


How to fix “The system is running in low-graphics mode” error?

I found that deleting the file ~/.Xauthority and rebooting fixed the problem for me.

To do this, press CTRL+ALT+F1, log in with your username/password & then run these commands:

rm ~/.Xauthority

sudo reboot


This is from notes I took when installing an Arduino. It was very helpful when I had to go through the same thing with other computers.

Install Sketch which is used to program Arduinos.
Use one of the following methods.

sudo apt-get install arduino

or

sudo apt-get install arduino-core

or
Open "Ubuntu Software Center"
Search "arduino"

Set up the vendor ID.
Without Arduino plugged in

lsusb

This is what I got

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Again with Arduino plugged in.

lsusb

This is what I got

Bus 004 Device 003: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Look at the addition line.
It will look something like this

Bus 004 Device 003: ID 2341:0043

Insert the numbers that you have in the command below.

sudo modprobe usbserial vendor=0x2341 product=0x0043

Let's get the serial port to work

cd /dev

Without Arduino plugged in

ls

Again with Arduino plugged in.

ls

Look for the additional tty* NAME. Mine was ttyAMC0, yours may be ttyUSB* or ttyS*.

Now we know which port it is trying to use.

The following is used to log the serial input from the Arduino. You may not need it.

sudo apt-get install minicom

//It may be already installed on your computer.

sudo minicom -s

You will get a setup menu.

Change first line with /dev/ttyAMC0 or whatever you found in your /dev/ directory.

Save setup as dfl.

I don't know what this does I just read it somewhere and it worked.

It is on ttyACM0. When I looked at the directory /dev I found that ttyACM0 would come and go when the Ardunio was plugged in or taken out.

Install kst //This program will take a your ascii file and put it on chart.
sudo apt-get install kst

newer version will be available at some date.

Install GtkTerm

sudo apt-get install gtkterm

Configure GtkTerm to the port which Arduino is connected to. The Arduino needs to be plugged in and the serial reader in Sketch can't be on.

You should be seeing the ascii numbers scrolling on GtkTerm.

Configure the GtkTerm to log the information to a text file.

If you open the text file now you should see the data in the file. I can't remember if GtkTerm needs to be pause to read this.

Open kst.
Use Data wizard to connect to the data text file with ascii.
The data should be column 1.
From here your on you own.


You should see the specifications that Gnome proposes for the creation of themes.

I leave you the link of: Icon Theme Specification

You can search in a theme that you like in Github, or another repository, to see how make it and is built.


Take a closer look at the cmake command in that tutorial. At the end is the path /usr/local (the directory to install the compiled program to), followed by a space and .. (which indicates the parent directory, presumably as the directory containing the source code).

So if you want to compile the program to your /home/michael/opencv-3.1.0/ directory, all you need to do is add a space and two dots to your original command. Like this:

cd ~/opencv-3.1.0/release

cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/home/michael/opencv-3.1.0 ..

Please let me know if that helps, if you're still getting the same error, or if you have additional questions. Good luck!

--Nick


Is there any method to have the Update Manager ignore kernel versions older than the one currently installed?

Pinning may be the answer: How to skip kernel update?
I'd still appreciate any other suggestions.

The trouble is that I cannot get pinning to work. The Update Manager is still offering to install 2.6.32-x kernel versions, even when I "lock" my version 2.6.38 using Synaptic. Suggestions?


I found a solution to my own endeavor here:
 Ubuntu 16.04 Sound Won't Unmute

In short, this fixed my issue

Make a backup first

cp -r ~/.config/pulse ~/.config/pulse_bak

remove the pulse config

rm -rf ~/.config/pulse

Done.


How can I execute searches via submitting URL (may be with special syntax)?

Typing

https://www.google.se/?gfe_rd=cr&safe=off#safe=off&q=mamas%20and%20papas

... in the address bar launches the search in firefox.

The same from bash:
firefox 'https://www.google.se/?gfe_rd=cr&safe=off#safe=off&q=mamas%20and%20papas'
... note the use of '-quotes, as & and # are special to bash.

%20 is the hex code for a space. Example: echo "Test text" | od -t x1z - will tell you what the codes are for "Test text" and the appended linefeed.


In LibreOffice, what is the shortcut for italics?

There was none, but there is a shortcut for italic now.

To use the shortcut, user must have installed at least LibreOffice 5.4. The addition of markup italic and strikethrough is noted in LibreOffice 5.4 release note.

Type *bold* to make strong text i.e. bold
Type /italic/ to emphasize text i.e. italic
Type -strikethrough- to strike text i.e. strikethrough
Type _underline_ to underline text (not shown here due to limitation on SE)

Where to check

The shortcuts are handled by AutoCorrect in LibreOffice and AutoCorrect in OpenOffice. To see the option, go to Tools > AutoCorrect > AutoCorrect Options and select "Options" tab.

AutoCorrect has now improved options for bold, italic, strikethrough and underline. In LibreOffice 5.3 and older, the options were limited to bold and underline (bottom half).

The following limitation applies:

User can only enable or disable the shortcuts all together or none, but not individually.
User can not change the existing in-line shortcuts to something else.

What about MediaWiki syntax

Some users may think of text formatting markup by MediaWiki. LibreOffice does have an extension for MediaWiki, which is available in the repository or the local repository.

$ apt-cache search libreoffice wiki
libreoffice-wiki-publisher - LibreOffice extension for working with MediaWiki articles
libobasis5.3-extension-mediawiki-publisher - MediaWiki publisher extension for LibreOffice 5.3 .0.3

Unfortunately, MediaWiki extension is for publishing purpose.

The indended use is to export styles and formatting in LibreOffice to MediaWiki format and not the other way round. So users who expect ''italic'' to become italic or '''bold''' to become bold would be not possible in LibreOffice.

Using keyboard shortcut

Alternatively, LibreOffice Help explains that applying text formatting while you type for italic is possible using the keyboard shortcut.

  To apply italic formatting

  Select the text that you want to format.
  Press Ctrl+I.
  You can also press Ctrl+I, type the text that you want to format in italic, and then press Ctrl+I when you are finished.

Tested using LibreOffice 5.3 and LibreOffice 5.4 in Xubuntu 14.04.


more is used for pagination. Say you need to read some long output by page and press enter to goto next content. If this is what is meant by your question then yes more is the option. [more manpage].

try man grep & man grep | more - you will know the difference.

grep is used for filtering. [grep manpage]


Loop over json files inside subdirectories

You haven't referenced the "dir" from your for line in your do line, so bash doesn't know where to look for the *.json files that are in "$dir"

You could simplify by just matching the files:

for jsonfile in /data/Mydata/*/*.json ;
do
    mongoimport --db MyApp --collection logs --file "$jsonfile" --type json
done;

And thanks @terdon for fixing this so you don't have to parse ls, which is a very bad idea - avoid that in future!


Can't comment on YouTube videos in Chromium

It has to do with blocked cookies

In Chromium, click on the weird C with an X on it.

then click on the show cookies and other site data, it will bring up this window.

click on the blocked tab and then click on each item and allow it(mine had about 5) They will still be there, but when you hit close, it will ask you to reload to apply new cookie settings, and presto, you can now comment, I went to the icon again afterwards and repeated this just in case.


Restoring Windows after installing Ubuntu

Restoring Windows from one PC to another is ... a Windows problem, not Ubuntu problem. I guess it can be done. This site does not offer Windows support. Perhaps you should looks for such backup support on Windows sites.

As for dual-boot, i always find easier to first install/restore Windows and then install Ubuntu. Less trouble, less problems (Ubuntu recognize Win OS, but WinOS doesn't recognize Ubuntu, etc).


20.04 LTS won’t boot after 03/16/21 update

Looked at the similar posts and the suggestions didn’t work, and even the new update that fixed this for most people didn’t seem to work, but the new update + turning off secure boot did. Probably obvious to most people but hopefully this helps someone else having similar issues.


Overclock NVIDIA GPU to achieve undervolting

The procedure you are describing to enable the overclock is correct. Usually I prefer to directly edit the configuration file in the X11 folder but there should be no difference in the two methods. I suggest to edit the coolbits to the value of 28.
If you wish to undervolt your GPU it will be less stable at high clock rates. Only in some special cases an undervolt enables extra clock rate (e.g. when the voltage is too high and causes overheating). In your case If you want to undervolt you should not increase the clock rate, you should leave it as default or lower a little bit until the system is stable.
Keep in mind that not all Nvidia GPUs are able to change the voltage, especially notebook GPUs won't allow voltage tweaking.
If you want to stop throttling of the GPU you should lower the temperatures by ramping up the fans rpm and possibly allow an higher power usage if the option is enabled in the nvidia-settings menu.
The possible risks of overclocking are:

System instability with sudden screen freezes and random reboots.
Overheating of the components with the possibility to lower the life span. Modern GPUs have some "self protection" capabilities so you aren't likely to immediately ruin it. A higher GPU temp means also higher CPU temp if the case has no airflow.
Overclocking leads to a higher power usage that could stress your power supply if you exceed the rated maximum power allowed.

For some simple testing +100 MHz on the Core clock and +300/500 MHz for the VRAM are a safe starting point.


How to get to know the information about a package before installation in terminal

Use

 apt-cache show PACKAGE

to see the description and some other information about package after its installed

 dpkg -L package_name

to see what files the package contains.


How to play YouTube videos in VLC Player?

Well, I'm not sure how you got that URL in your question, but just copying the Youtube URL for the video (eg https://youtu.be/VoeCcCQuJrM) either from the URL bar or from the share box:

worked just fine for me in VLC 2.2.0 Weatherwax.

You should be able to just copy either URL and paste it into VLC via Media -> Open Network Stream. I believe by default it streams 720p.

If that doesn't work, then try updating the Lua script for Youtube parsing, as mentioned in this answer here.


Just run the command

apt-get install php70-dev


Install the missing dependencies using apt instead of via the Backup application. Open a terminal and:

sudo apt install python-gi duplicity

This seems to be a deb packaging glitch introduced with 18.04. deja-dup should have a dependency on python-gi.


MathType and LibreOffice Math comparison

Sorry for providing question instead answer and slightly hijacking, but why is choice limited to LibreOffice Writer?
There are just too many ways on Linux AFAIK to include math notation in a document.

One familiar and light option would be AbiWord, which accepts LaTeX notation and editing:

Other tool (abandoned unfortunately, which I compile from source) that offers LaTeX transcript in many formats through simple drag&drop functionality is ekee:

Hope this post is useful


Unable to update from Ubuntu 20.04 ro 20.10

try synaptic package manager (sudo apt install synaptic) and updating from there, it sometimes update packages that cannot be updated through command lines, hope this solves the problem


Is bash scripting the same as shell scripting?

Bash (bash) is one of many available (yet the most commonly used) Unix shells. Bash stands for "Bourne Again SHell", and is a replacement/improvement of the original Bourne shell (sh).

Shell scripting is scripting in any shell, whereas Bash scripting is scripting specifically for Bash. In practice, however, "shell script" and "bash script" are often used interchangeably, unless the shell in question is not Bash.

EDIT: Actually, the default scripting shell in Ubuntu is dash, while the default interactive shell (what you get if you pull up a terminal) is Bash. Nonetheless, the two terms are still mostly interchangeable.


Why is there no Chromium for 64 bit Ubuntu Mate?

Software boutique only contains a handfull of software chosen by the ubuntu mate developers because of how well those applications integrate in the mate desktop environment. If you want a graphical way to install all applications I suggest installing gnome software.


How can I add my username to the top panel in Xenial Xerus?

The standard (and easiest) way to display your user name in the Unity panel is to launch System Settings and go to User Accounts.

You can see a checkbox at the bottom of the window that says

  Show my login name in the menu bar

Simply enable that checkbox and your display name appears in the top right corner of your screen.


Read only file system -Truecrypt volumes

I just experienced the same issue.

The resolution for me was:

Boot into a Windows machine, mount my Truecrypt volume, then disconnect the volume.

I must not have done the disconnect last time the drive was connected which caused issues with Linux being able to mount it read/write.

I also did a partial chkdsk /r if that matters but I think the important bit was mounting in Windows then safely dismounting.


What to do when Juju machine 0 has got "agent-state: not-started" state

Seems like I experienced the following bug: https://bugs.launchpad.net/juju/+bug/995823

Workaround is to run sudo restart jujud-machine-0 after ssh-ing into it directly using ssh ubuntu@[public IP], where public IP is found from the machine list (juju status).


NVIDIA driver couldn't find libnvidia-ml.so and can't install cuda successfully

I soloved this problem.
remove all cuda and nvidia-drivers

sudo apt-get --purge remove nvidia-*
sudo apt-get --purge remove cuda-*

and then
auto install drivers

sudo ubuntu-drivers autoinstall
sudo reboot

to check drivers are successfully installed

nvidia-smi

then, install cuda-10.0(i'll use tensorflow=1.13.1)

sudo apt install nvidia-driver-418
sudo apt-get install cuda-10.0

install cudnn

echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" | sudo tee /etc/apt/sources.list.d/nvidia-ml.list
sudo apt update
sudo apt install libcudnn7-dev=7.5.0.56-1+cuda10.0

setting path

sudo cp -a cuda/lib64/* /usr/lib/cuda/lib64/
sudo cp -a cuda/include/* /usr/lib/cuda/include/


Ubuntu 20.04 Hangs when "Try ubuntu" on install

I tried "Install ubuntu (safe graphics)" in grub and it worked


What happens with the source code when submitting an application

The source code is not published for commercial or proprietary apps submitted to My Apps. You choose an application to be commercial by specifying a price, and proprietary by choosing a non-open-source license.

Regarding the Python question, my guess is that you're asking because Python app packages generally install the source files. You could distribute a bundle with the bytecode instead of the source files, but with the caveat that it can be decompiled. You could also try obfuscating the code, but while it seems that obfuscating Python code is not hard to do, also the efectiveness might be limited. You can learn more here, for example.

In any case, only users who have purchased your app will be able to access whatever it installs, but you should decide which type of license to use before submitting the app. You could even make it a commercial open source app!


Internet singificantly slower when using wifi

About the only couple things you can do is have the wifi access point set to WPA2 with no WEP or TKIP, check the results from iwlist scan for your connection.  And with the intel card gksudo /etc/modprobe.d/iwlwifi.conf and see if there is a line options iwlwifi 11n_disable=8 if a line exists that shows 11n_disabled=1 change it to 8, save, exit and reboot


The issue was solved removing removing video drivers from Nvidia:

sudo apt-get remove nvidia-experimental-304 nvidia-experimental-310
sudo aptitude purge ~c


Using awk:

$ awk -F- '{n = substr($2, 2)} (n - prev) != 1 {for (i = prev + 1; i < n; i++) print i} {prev = n}' input-file
2
4

-F - sets the field separator to - (so S1, E1, etc. become different fields).
Then we extract the episode number (n = substr($2, 2)), by taking everything but the first character from the second field ($2).
If the episode number is not the previous episode + 1 ( (n - prev) != 1), we print all the numbers in between.
We save the current episode number in prev for the next iteration.

If the output isn't sorted, split up the extraction and check to insert a sort in between:

awk -F- '{print substr($2, 2)}' input-file | sort -n | awk '{n=$1} (n - prev) != 1 {for (i = prev + 1; i < n; i++) print i} {prev = n}'


Asus Transformer Pad TF103C ubuntu android dual boot?

As far as I've seen, there is currently no way to boot linux. The TF103 doesn't use BIOS, and instead uses Droidboot as it's boot loader.

There isn't much information on Droidboot with Bay Trail devices, or my google-fu isn't the best. Either way there doesn't appear to be easily accessible information about how droidboot on the TF103 works or how one is even able to modify it to boot different OSes.


Why ubuntu 12.04 Operating System too slow..?

Not talking about 100% cpu here but this bug is responsible for significant cpu usage on 12.04:

https://bugs.launchpad.net/ubuntu/+source/unity/+bug/803943?comments=all

Fix is URGENTLY needed. But until that is available, no solution seems to help.


Using an APT proxy for downloads during installation

If you are using the Live CD, Apt is not set to use your proxy, you may be able to configure apt on the live CD to use the proxy. If you want to make this more permanent you could use a custom live CD or set your network to use the proxy by default for all connections.

personally I just use squid and cache all .deb files for about a month

from ubuntu help

  Updating clients to use your proxy server
  apt clients need the /etc/apt/sources.list file to be reconfigured to point to the new apt-proxy server instead of the outside world. Configuration of the sources.list file looks similar to the config for normal apt repositories with the exception that the backend section has to be appended to the path:

example of changes

  deb http://apt-proxy:port/backend dist component
  Replace mentions of specific repository URL with references to your server and the backend for it; such as:

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

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

would become

deb http://server:9999/ubuntu dapper main restricted

deb http://server:9999/ubuntu-security dapper-security main restricted universe

A sources.list corresponding to the apt-proxy-v2.conf above may look like this:

apt-proxy entries for standard modules

deb http://localhost:9999/ubuntu dapper main restricted universe multiverse

deb-src http://localhost:9999/ubuntu dapper main restricted universe multiverse

apt-proxy entries for security patches

deb http://localhost:9999/ubuntu-security dapper-security main restricted universe multiverse

deb-src http://localhost:9999/ubuntu-security dapper-security main restricted universe multiverse


Ubuntu under proxmox with plesk installed, can't get to receive traffic from two interfaces at same time

If you have two public IPs on two separate interfaces and you want each of them to be used globally, you need to use a routing policy as described on https://netplan.io/reference/#routing.


Package libprotobuf was not found in the pkg-config search path

Why do you want to build the protobuf-c Ubuntu repository package from source? It's a good practice and more convenient to prefer installing Ubuntu repository packages with apt instead of downloading them and compiling them. protobuf-c gets automatically updated when an update becomes available if you install it with apt. So you see it's more secure to install it with apt both ways.

To install Protocol Buffers C compiler (protobuf-c) in all currently supported versions of Ubuntu open the terminal and type:

sudo apt install protobuf-c-compiler

In Ubuntu 18.04 this command installs version 1.2.1 of protobuf-c, and in Ubuntu 19.04 this installs version 1.3.1.

Protocol Buffers are a flexible, efficient, automated mechanism for serializing structured data - similar to XML, but smaller, faster and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages. You can even update your data structure without breaking deployed programs that are compiled against the "old" format.


Get root privileges for nautilus on sftp connection

Hya, bad news for you. The short answer is that you can't — you get the privileges of the user you logged in as.

The long answer follows herewith… The 'connect to server' option is nothing but a pretty gui that issues simple sftp commands under the hood, once connected to a server via an ssh like transport protocol. A list of these commands is available if you enter a terminal window and enter man sftp. You'll see the commands available to 'connect to server' in the section 'interactive commands' of the manpage.

They are limited to bye cd chgrp chmod chown df exit get help lcd lls lmkdir ln lpwd ls lumask mkdir progress put pwd quite rename rm rmdir symlink and !. You may recognise many of them from ftp, if you ever command-line ftp'd. Some new cool additions, but as you can see none of them supports the concept of RunAs, or sudo.

Gaining elevated privileges was simply never designed into the protocol.


I wish that I could find the article(s) that blindly recommended setting vm.swappiness=10 to improve performance. Too many users blindly change this value without really understanding what they're doing, and system performance usually suffers.
In short, vm.swappiness values approaching zero favor RAM usage, and values approaching one hundred favor swapping.
With 4G or 8G RAM, you should leave vm.swappiness=60 (the default) alone, or maybe change vm.swappiness to around 80 to encourage more swapping.
With 16G or more RAM, or in a server environment, you could set vm.swappiness=10 to favor RAM, reduce system latency, and discourage swapping.


Running a Python Script in the Background after Accepting INput

Yes, launch your script, and when you're done, use Ctrl+Z to pause it. Once paused, running bg will send it to the background where it will continue running. For example:

$ myscript.py
Enter a number: 2
^Z
[1]+  Stopped  myscript.py
$ bg
[1]+ myscript.py &

The ^Z is when I pressed Ctrl+Z. Now, if you want to bring the script back to the foreground, run fg.

If you want to do this for multiple scripts, you can use jobs to list backgrounded jobs:

$ jobs
[1]-  Running                 myscript1.py
[2]+  Running                 myscript2.py

The numbers in the brackets are the job ids. To bring a specific one back to the foreground, use its ID:

jobs 2

The command above will bring the second one. Use 1 for the first, 3 for the third and so on.


Have you tried booting Ubuntu through BIOS, before Win10 boots?
If that works, maybe just change the boot cycle so that Ubuntu is booted first.