From the Tools menu of the new installation create new desktop and command line launcher and accept to override the old ones when asked by the process. This will override the former configurations and point to the knew configuration for the update.


Why does running pwck show so many directories don't exist?

Each of these userids is used for owning server processes, and NEVER logs in interactively. Therefore, no need for a $HOME directory. You'll also notice that these userids have strange shells, like /bin/false. Read man 5 passwd


I don't know about the applet, but you can always change your layout with a command:

setxkbmap -layout ru
setxkbmap -layout us -variant dvorak
setxkbmap -layout es -variant dvorak

To solve your problem, you can assign shortcuts or application launchers to these commands. However, you will be circumventing the applet, which will revert to the default keyboard after each restart or even screen lock.


reboot
press and hold Shift during boot
choose 'recovery mode' or something similar
you'll enter an interactive shell
Bruno Pereira's comment is correct: Make the filesystem writeable by entering mount -o remount,rw / at the #-prompt
enter passwd your_username at the #-prompt
set your password
type reboot
return to your desktop and retry whatever you were doing.


Install Wekan from Snap locally the easy way

What we are going to install exactly

We are going to install Wekan proper, not any of the versions like
Wekan-ondra. I haven't tested these yet.
We are going to install it on the local network. I have not yet tried
to make it accessible from the outside.
It will run on port 80 and the webserver will be nginx (which is the
default).
It will use the http protocol.

What I am not going to cover

This will be an easy and quick install accessible only from your own LAN / WLAN. I won't cover nginx or Apache2 configs or accessing it from the internet.

The nitty gritty

1. Web server settings

First, we need to make sure that we are running nginx and not Apache:

sudo systemctl list-units | grep 'apache2\|nginx'

If Apache happens to be installed you can remove it or for the purpose of testing the installation just disable it. Up you.

sudo systemctl stop apache2.service
sudo systemctl disable apache2.service

If nginx is installed we need to check that it's working as I have found that sometimes there is a bit of confusion. Check it our with:

sudo systemctl status nginx

If the server is running, you are golden. If you see an error message complaining about not being able to start a high performance web server and referring to /etc/nginx/nginx.conf it means that the installation is not complete. The reason is that there are several packages and this is utterly confusing to say the least as when you run apt-get remove nginx it will tell you that it's not installed. The reason is that the package installed is nginx-common, probably to fulfil some deps. Anyway, get rid of it and reinstall:

sudo apt-get purge nginx-common && sudo apt-get install nginx
sudo systemctl start nginx

2. Install the snap and set the environment

Now install Wekan from snap (it's also available in the Software app.

sudo snap install wekan

Now let's set the basic root URL on port 80. For this we don't need to touch any other env variable:

sudo snap set wekan root_url="http://192.168.2.12"
sudo systemctl restart snap.wekan.mongodb
sudo systemctl restart snap.wekan,wekan

3. Create a user and start kanbanning

Now you should be able to open a browser pointing at 192.168.2.12 (or whatever IP / URL you choose).

You should see the login screen. The first step is to create a user by registering.

This first created user will be the Admin user.

If you get a general server error when registering don't panic. You just need to restart the mongodb, the user will be saved and you will be able to use it later without a problem, no need to create a new one:

sudo systemctl restart snap.wekan.mongodb

and for good measure:

sudo systemctl restart snap.wekan.wekan

That's it. Enjoy.


problems with the "tapping" of the touchpad

You can disable tapping in System Settings -> Mouse & Touchpad


QML dynamic scoping not working (ReferenceError)

Object can't use the properties of other objects directly unless they belong to the root object of the file.

Move property string title to MainView or give an id to Item and use title through the id.


Can another computer connect to my webcam via USB?

There is a way to do USB over IP, but it is propriety, costs money and has some quirks (as a USB packet takes about 3 IP packets)...
usbnet is the package you need if you really want to do USB over IP.
Alternative:
If you just want to stream the webcam on the ground floor to look at your dog from the top floor, VLC is indeed what you need:
Step 1: test video capture

Install VLC if you don't have it.
Start VLC
Open the Media menu
Choose Open capture device
set capture mode to Video camera.

Then choose the correct video device name (usually /dev/video0) and if you stream from one computer to another computer nearby, leave audio off. (to eliminate feed-back)

Click Play

If this works, you're ready to go to step 2.  If not, play with capture device names until it works! ;-)
Step 2: Start streaming

Open the Media menu,
Click on the button Stream
Click on the Capture device tab
Don't change anything as it contains all the settings from step 1
Click the button Stream
Click Next
Choose HTTP, Click Add,  and click Next
Choose Video - Theora + Vorbis (OGG) and click Next
Click Stream

Voilà!  You're streaming!  (the Webcam light should be on)
Now go to a terminal and type ifconfig and write down the IP address (probably 192.168.x.y)
Step 3: look at your stream

Go to the other computer
Open a browser
Enter the address: 192.168.x.y:8080

Voilà: there's the dog!
If you want to look at your dog from work, you'll also need to go into your router and do IP forwarding, or put the webcam computer in the DMZ (dangerous!) etc, etc, but the above should get you up-and-running in no time!


I have ubuntu xenial 16.04 how to get new versions of packages?

backup, backup, backup
then CHECK backup works
! don't forget /etc as well as /home to keep your local settings for reference/restoration
sudo do-release-upgrade (takes 16.04.x LTS > 18.04.x LTS)
sudo do-release-upgrade (takes 18.04.x LTS > 20.04.1 LTS)
OR
Clean install 20.04 and restore your backup. This allows new decisions on eg installed applications and partitions etc.
Most recent packages now available


What is the correct value for LDAPbinddn in Bugzilla LDAP integration?

With the help of 2 guides Openfire and Error description I understood my mistake.

The correct LDAP string should have been:

cn=Administrator,cn=users,dc=Company:password


You need to install a2jmidid and use it to proxy the ALSA and MIDI interfaces, so they may be connected.


How does the system know where to reinstall grub?

Grub always installed at the MBR of the disk where Ubuntu is installed. do-release-upgrade is capable to read this information (where Ubuntu is installed) and it will install grub there. No matter if you have 2 or 3 HDDs the upgrader reads the one where Ubuntu is installed. i.e. I have two disks /dev/sda = Windows and /dev/sdb = Ubuntu. Grub will be installed (or re-installed) in /dev/sdb and not /dev/sda.

Additionally, if you want to see where grub is installed see this answer here.


Since you seem to have internet connectivity from /dev/sda1, the approach I would try first is:

sudo mount /dev/sda2 /mnt
sudo chroot /mnt
  apt-get update
  apt-get install xorg icewm
  exit
sudo umount /mnt


Persistent live USB Ubuntu 14 not working

Sounds like bug LP #1159016.  Persistence not working on UEFI machines.  You can fix this problem by editing the /EFI/BOOT/grub.cfg file and adding the word persistent to the lines starting with linux.


How can I access missing hard drive partitions?

Well, in what you formated your Linux disks?

Default for Windows is only able to handle FAT and NTFS...do you mean the fact, that it may show the partition in Windows 8 partition manager? That is because it can see it, but not recognize the "ext" partition(s).

I found a "open source" software that can do it...not sure about Win 8, as it says only Windows 7 is supported, but it's worth a shot.

"ext2fsd" program link


How do I recreate /dev/shm after removing it by mistake?

/dev/shm is a way processes use to share memory (see man shm_open for more information). Its content is determined by the processes you run, therefore you can't "download" it. You can however re-create it.

On Ubuntu, /dev/shm is a symlink to /run/shm; this is the command that you have to use to re-create it:

sudo ln -s /run/shm /dev/shm

This action is also performed by the /etc/init/mounted-dev.conf Upstart script. This means that (as it was already suggested) rebooting your system without doing anything special is an another way of fixing the problem.


How do I change keyboard geometry from 104 to 105 keys?

It might be, that the wrong keyboard model is selected. To view currently installed keyboard model issue:

setxkbmap -print | grep geometry

If you see pc104 there you will have a 104 key layout where the > < | key is not defined.

In order to use a typical German 105 keys keyboard, you have to choose the "pc105" type, labeled "Generische PC-Tastatur mit 105 Tasten (Intl)" in the German localization of Ubuntu on installation. To change this later you can issue

sudo dpkg-reconfigure keyboard-configuration

or edit /etc/default/keyboard as root. My file looks as following:

# KEYBOARD CONFIGURATION FILE

# Consult the keyboard(5) manual page.

XKBMODEL="pc105"
XKBLAYOUT="de"
XKBVARIANT="nodeadkeys"
XKBOPTIONS=""

BACKSPACE="guess"

On Xfce you can change the setting for your user only as well. The respective option is in Settings/Keyboard Settings/Layout. Nevertheless, since I don't use Unity or Gnome, I have no idea where the respective setting is hidden there (if someone knows: please update this answer).


You can go on by checking if the open source equivalents of the most used drive formats is installed by opening a terminal (ctrl+alt+t) and typing:

apt-cache policy ntfs-3g exfat-fuse dosfstools

Which should if they are installed an output like this:

ntfs-3g:
  Installed: 1:2015.3.14AR.1-1build1
  Candidate: 1:2015.3.14AR.1-1build1
  Version table:
 *** 1:2015.3.14AR.1-1build1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
exfat-fuse:
  Installed: 1.2.3-1
  Candidate: 1.2.3-1
  Version table:
 *** 1.2.3-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status
dosfstools:
  Installed: 3.0.28-2ubuntu0.1
  Candidate: 3.0.28-2ubuntu0.1
  Version table:
 *** 3.0.28-2ubuntu0.1 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status
     3.0.28-2 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages

If one of the installed lines shows (none)instead of a version number you can install the driver by:

sudo apt-get install <package-name>*


What is the default location for rsync uploads?

You miss : after user@ip-address. Without that you will create
user@ip-address file in the directory where you ran rsync.


I don't think this is possible.
However, fallback mode can be quite nice once you configure it right.
sudo apt-get update gnome-session-fallback
You need to alt+rightclick on the panels to configure them, then make it use Compiz instead of Metacity as window manager.

If you have a problem with Alt+rightclick not working, it is because Alt+mouseclicks are used to move/resize the window.
So make it use WinKey instead of Alt.
gconftool-2 --set --type string /apps/metacity/general/mouse_button_modifier '<Super>'


Ubuntu 12.10 doesn't boot after fresh installation

The installation works perfectly fine. After the installation it says it needs to restart and then it just doesn't load. It is stuck on the ubuntu purple screen.


mysql problem : component misspelt in sources.list

The line in etc/apt/sources.list.d/trusty.list that is generating the component misspelt in sources.list error message is for a trusty repository and you are using bionic (18.04). Remove the line in /etc/apt/sources.list.d/mysql.list the contains the string http://repo.mysql.com/apt/ubuntu trusty by preceding it with a # character in order to turn it into a comment. Please don't remove the valid line that contains http://repo.mysql.com/apt/ubuntu bionic.
Open etc/apt/sources.list.d/trusty.list for editing with the following command:
sudo nano etc/apt/sources.list.d/trusty.list

Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location. Use the keyboard combination Ctrl + X to exit nano.
Then try sudo apt update again.


Should that:

wget -P <path> <URL>

Your case:

wget -P /dbfs/FileStore/tables http://prod.publicdata.landregistry.gov.uk.s3-website-eu-west-1.amazonaws.com/pp-complete.csv

More detail: wget

Update:

wget -P /dbfs/FileStore/tables  --no-check-certificate --no-proxy http://prod.publicdata.landregistry.gov.uk.s3-website-eu-west-1.amazonaws.com/pp-complete.csv


How to permanantly change the color scheme of the terminal?

The steps I have used:

$ cd gnome-terminal-colors-solarized
$ ./install.sh

This script will ask you which color scheme you want, and which Gnome Terminal profile to overwrite.

Please note that there is no uninstall option yet. If you do not wish to overwrite any of your profiles, you should create a new profile before you run this script. However, you can reset your colors to the Gnome default, by running:

    Gnome >= 3.8 dconf reset -f /org/gnome/terminal/legacy/profiles:/
    Gnome < 3.8 gconftool-2 --recursive-unset /apps/gnome-terminal

By default, it runs in the interactive mode, but it also can be run non-interactively, just feed it with the necessary options, see 'install.sh --help' for details.

Please select a color scheme:
1) dark
2) dark_alternative
3) light
#?

#? 1

Please select a Gnome Terminal profile:
1) Standard
#?

#? 1

You have selected:

  Scheme:  dark
  Profile: Standard (:4d4a684a-7388-40db-adf1-6ec6b6f9043d)

Are you sure you want to overwrite the selected profile?
(YES to continue)

(YES to continue) YES
Confirmation received -- applying settings

The open the menu EditProfile Settings and Check your settings. It should look something like this (Sorry for the screenshot with German words).

Farben means Colors
Text- und Hintergrundfarbe means Text and background color
Farbpalette means Color palette
Integrierte Schemata means Built-in schemes
dunkel Solarisiert means dark solarized
Solarisiert means Solarized


How to make grub menu appear instead grub minimal bash-like in booting?

Note: If you can't boot Ubuntu at all, use a Live USB to boot Ubuntu, select "Try before installing" and perform steps below.

After booting the hard way, open a terminal with Ctrl+Alt+T and install boot-repair:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Then type boot-repair and a menu will appear:

Select the recommended option.
If your system boots normally after recommended repair great. If not post the link to the problems reported.

Caveats
On some systems this annoyance can occur:

Boot-Repair created too many grub menu entries for Windows

If this happens to you, visit the link for a solution.


Bulk converting images from one format to another?

Try these commands,

mogrify -format png /path/*.jpg

This will convert all the .jpg files into .png files and saves the converted files in the same directory.

mv /path/*.png ~/Desktop/pic

This will moves all the .png files(converted) to the pic directory which resides on the Desktop.


16.10 dnsmasqd snap wont start as a daemon

If you are not running in classic mode, applications started by snapd is not allowed to read/write/modify files outside of its cage.
You can specify the pid file creation inside the jail ($SNAP_DATA e.g. /var/snap/dnsmasqd/current/dnsmasq.pid) with -x or --pid-file option. See man dnsmasq.


in .profile file, why the PATH variable doesn't need to be exported?

Because $PATH is already in your environment. Having $PATH in it makes it add it to the variable.

(Basically somewhere before your .profile is parsed $PATH was already exported).


Why does my filesystem appear to be full to Ubuntu?

When you cancel the copying of file there might appear a problem in the filesystem. So reboot into Windows and run

chkdsk /F <drive>

It should find and fix errors that can't be fixed inside Ubuntu.

Offtopic: I dream about such application that would scan disk in Ubuntu without need to boot Windows…


You can use the cut-command to do what you need.

$ psrinfo -pv | head -1 | cut -f 5 -d ' '
1

-f 5 means the 5-th field, and -d ' ' means use space as field delimiter.


Slow wifi problem on Lenovo Ideapad S340-14API

Check your WiFi MTU, using
ip link

also notice your WiFi interface's name.
The MTU (Maximum Transmission Unit) is the size of the largest packet that can be sent in a single network transmission. If a packet exceeds the  MTU of a link, the data must be split into multiple packets (fragmented). These multiple packets must be sent over the link, received, acknowledged, and reassembled at the far end. If your link is misconfigured, and you have to fragment every packet you send, your actual data transfer rate drops.
Ethernet (wired)  networks use an MTU of 1500 bytes.
Due to additional per packet overhead for WiFi (8 bytes PPPoE header), WiFi uses an MTU of 1492.
Your MTU should be set by your DHCP server, check your router's config.
You can set your own MTU (setting does not persist over restarts) with
ip link set dev name mtu 1492

where "name" is the interface name from above.
Here's an example:
walt@squid:~(0)$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp63s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:24:21:7f:e5:1c brd ff:ff:ff:ff:ff:ff
3: wlxf46d04b1790f: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether f4:6d:04:b1:79:0f brd ff:ff:ff:ff:ff:ff
walt@squid:~(0)$   sudo ip link set dev wlxf46d04b1790f mtu 1492
[sudo] password for walt:
walt@squid:~(0)$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp63s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:24:21:7f:e5:1c brd ff:ff:ff:ff:ff:ff
3: wlxf46d04b1790f: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1492 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether f4:6d:04:b1:79:0f brd ff:ff:ff:ff:ff:ff

My WiFi "interface name" is "wlxf46d04b1790f".


How do I scale page in pdf files in Ubuntu? (GUI)

I wanted to have my DIN A4 document upscaled to DIN A3.
On my computer at work, I don't have pdfpages installed, but I do have pdfjam, so here is an alternative solution for that particular case:

pdfjam --a3paper input.pdf -o output.pdf


Please try to remove and install it again

to remove the vlc

Sudo apt-get remove vlc

to install it again

sudo add-apt-repository ppa:videolan/stable-daily
sudo apt-get update
sudo apt-get install vlc

to install extra packages for VLC

sudo apt-get install libavcodec-extra-53

check and advise with the output


E: Failure running hook [ ! -f /usr/bin/snap ]

The message looks strange, but we can overcome it by creating a temporary replacement for /usr/bin/snap:

cat <<EOF | sudo tee /usr/bin/snap
#!/bin/bash
exit 0
EOF

sudo chmod +x /usr/bin/snap

then install your application with sudo apt install openssh-server.

And finally reinstall Snap daemon to replace our temporary script:

sudo apt-get install --reinstall snapd


How to get Aero Glass effect (transparency in window decorations) in KDE Plasma 5?

I've found how to get the transparent titlebars in Plasma. This setting is stored in color scheme file. As Plasma overwrites default scheme file on each start, it isn't possible to alter Breeze color scheme directly. So let's make a copy of the scheme and alter it instead:

cp ~/.kde/share/apps/color-schemes/Breeze.colors /tmp/BreezeMod

I renamed Breeze theme to BreezeMod (you can use any other name) and omitted ".colors" extension, because it will be added later automatically. Open BreezeMod file in any editor and find [WM] section in the end of the file.

Original parameters:
activeBackground=71,80,87
inactiveBackground=239,240,241
inactiveForeground=189,195,199

Modified parameters:
activeBackground=71,80,87,208
inactiveBackground=239,240,241,208
inactiveForeground=89,95,99

Each parameter represents color consisting of RGB components divided by commas. activeBackground sets titlebar's color of active window, inactiveBackground sets titlebar's color of inactive windows. I added fourth component, representing Alpha channel, which sets transparency. Its value lies within [0-255] interval, higher values mean less transparency. I used 208. I also changed inactiveForeground which sets the color of text on inactive titlebar. This step is optional, but when transparency becomes active text blends with the titlebar and becomes unreadable, so I decreased all 3 components' values by 100, shifting text color from gray to black.
Now this theme should be activated. Open System Settings > Color, press Import Scheme... and open BreezeMod file, then press Apply. Here's the result:

If you wish to change only inactive windows' titlebars, leave activeBackground parameter intact and vice versa. If you wish to play with parameters, alter BreezeMod file and import scheme once again, overwriting the existing one.
Tested in 16.04 with Plasma 5.5.5.


Accidentally formatted data. Please help

@Ex1Le

  Formatting doesn't mean that you have lost your data

First of All please don't use your PC until you recover your whole data because it will over write files on your previous precious data.
Okay Go to another pc download Ultimate Boot CD (UBCD).
Make a Bootable USB.
You can download UBCD from This Link
There are many ways to download from this official link i.e, Torrents,external mirror sites etc.

  UBCD has more than 100 tools for data recovery.
  I hope it will help a lot....
  I also had same problem once and I recovered my 238GB of data using the same.
  Blockquote

  Please let me know if you don not have any experience with this method. I will do my best to resolve your problem Step-by-Step.


Install using a Logitech Keyboard and mouse with bluetooth dongle?

My USB keyboard and mouse is Logitech as well and it works fine during install of 12.10, try enabling legacy support for usb in BIOS.


How do I maximize an already open gnome-terminal window from command line?

You can use wmctrl:

wmctrl -r :ACTIVE: -b toggle,maximized_vert,maximized_horz

or xdotool:

xdotool windowsize $(xdotool getactivewindow) 100% 100%

For more info, see man wmctrl and man xdotool.

If you don't have these packages installed, you can install them using the following comand:

sudo apt-get install wmctrl xdotool


Is there a preferable way of structuring partitions/mounts for /home/userX

I tend to make /home it's own partition. Exactly how big depends on personal preference, but on a simple Ubuntu desktop probably doesn't need more than 20GB of root filesystem space (the desktop across the room from me is using a whopping 6.5GB!); the rest of the drive could become /home if you wanted.

However...

You should remember that not everything pertaining to your user account(s) is stored in /home. There's lots of system-centric stuff in /etc that won't survive a reinstall. In particular /etc/passwd, /etc/shadow, /etc/group, and /etc/gshadow are important. If you reinstall and recreate your users and groups in the wrong order, the UID's and GID's won't match those recorded in your /home filesystem, and your file ownerships will be all messed up.

The solution to this extended problem is a little more complex, since the exact set of files in /etc that you'd need to preserve are likely to be very specific to your system and what you're doing. One option would be to make a protected directory under /home and make backup copies of /etc into it. At least that way you could get back the files that are missing after the reinstall. You might look at etckeeper (yes, it is packaged) as a way to make this more automated. You wouldn't want to restore /etc en-masse, of course: after a reinstall-upgrade there are likely to be major changes and you'll want to restore files from your archive or repository very carefully.


How to move multiple files over network from terminal

Would this work?

find . -iname *.mkv | xargs 'command'

Goodluck.


The docky-core PPA doesn't have a disco release. Their most current is artful. Change your .list file in /etc/apt/sources.list, or in /etc/apt/sources.list.d/, or look for another, more currently supported PPA.

Update #1:

In terminal...

cd /etc/apt # change directory

grep -i docky sources.list # search for docky

If it finds docky, then:

sudo pico sources.list # edit the file

Locate the line that contains docky

Change disco to artful

control+o, then return # to save the file

control+x # exit the editor

You're done.

If it didn't find docky, then:

cd sources.list.d # change directory

grep -i docky *.list # search again for docky

Note the filename when it finds docky

sudo pico found_filename.list # edit that filename

Change disco to artful

control+o, then return # to save the file

control+x # exit the editor

You're done.


Davicom Semiconductor, Inc. 21x4x DEC-Tulip not detected by Wireshark but IP operational

I sourced the issue , PEBKAC , need to run Wireshark as root or alternatively as described here: /usr/share/doc/wireshark-common/README.Debian


IPv6: ping6 from foreign host works, but cannot ping6 on same host

The problem appears to be this:

2a01:xxx:xx:000A::/112        ::                         U    1024 0     0 lo

You have a /112 route which is more specific than the /64 route:

2a01:xxx:xx:000A::/64          ::                         U    256 0     0 eth0

And are telling it to deliver over loopback interface.

It is also curious that you have:

2a01:xxx:xx:000A::2/128        ::                         Un   0   1   202 lo

Can you ensure all these addresses are on the eth0 interface and that if you are adding routes you add them to eth0?


CPU is running significantly hotter after installing gfx driver and using Ubuntu 3D

This is just how ATI GPUs work; they run hot.  You can lower the performance setting to help some though:

sudo -s
echo low > /sys/class/drm/card0/device/power_profile
exit

You can use mid instead of low for a more balanced setting.


Unable to get response from HTTPS Node.js application on Ubuntu 14.04

Turns out the answer was simply to upgrade my version of Node.js - I got the latest version and it all works okay, as on the other machines. At least I got a tumbleweed badge of out it anyway ;-)


Swap should be on SSD or else it might slow down your system when it will be needed (used to happened to me when I was using virtualbox so I have reduced swappiness from 60 to 10 to solve this)
If you want to use hibernation then you will need at least 20GB as shown here: https://help.ubuntu.com/community/SwapFaq.
If you don't use hibernation then with 16GB ram you should be ok with a small swap, so use around 4GB in order to get more space.


The harddisk cannot be deleted while ubuntu is running from it, so you will have to boot a Live CD from a CD or flashdrive.

Method 1: Terminal

You can use a dd comand:

Boot into the Live CD
Check the partitions with fdisk -l
Run dd if=/dev/zero of=/dev/sda (assuming that /dev/sda is your HDD)

Method 2: GUI only

Here we will use gParted:

Boot into the Live CD
Run gParted from live CD. It should come with the Live CD, but in case it does not, run: apt-get update && apt-get install gparted
Delete all partitions on your HDD (not the medium you are booting the Live CD from).
Click the green "Apply All Operations" check-mark.


Is it possible to get the 11.10 Unity Desktop in 11.04?

No, because they are so different. Even if you did manage to update everything you would get the same problems.


Is there a usb device indicator (that ejects it) that works with Lubuntu 16.10?

Yes, there are such indicators. I've written one myself, originally for Ubuntu 16.04 LTS, but it has been tested by multiple users on Ubuntu MATE, Lubuntu, and XFCE. While originally intended for checking disk usage, it also allows opening directories and unmounting the filesystems:

You can install it via two PPAs, one is dedicated to the indicator itself, the other is to all the indicators I write in general.

Steps to installing from my personal PPA:

sudo add-apt-repository ppa:1047481448-2/sergkolo
sudo apt-get update
sudo apt-get install udisks-indicator

Steps to install from the team PPA:

sudo add-apt-repository ppa:udisks-indicator-team/ppa
sudo apt-get update
sudo apt-get install udisks-indicator

NOTE: that the indicator relies on zenity so you need that installed as well.

There are other alternatives,too. In particular there is indicator-diskman , made by Tony George. However, his project isn't supporting Yakety (16.10). I've contacted the developer to update his PPA and once they do I will update my answer. For now, one can grab .deb package for amd64 architecture from the repository itself, and install it manually.

Update: As promised, the answer is being updated to include Tony George's indicator-diskman, who updated the PPA to include Yakety to the list of supported versions.

The indicator-diskman is more minimalistic, but provides exactly same features in a more concise way.

Installation commands:

sudo add-apt-repository ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install indicator-diskman


it's not a rare problem, the problem is runit package, try this simple solution:

$ sudo apt-get purge runit
$ sudo apt-get purge git-all
$ sudo apt-get purge git
$ sudo apt-get autoremove
$ sudo apt update
$ sudo apt install git

Edit: Upstart no longer supported in latest Ubuntu versions.
If for some reason anyone really wants to run with upstart they can install this: sudo apt install upstart-sysv


Start the Rsync daemon to synchronize a directory between two servers

You misunderstand how rsync works. rsync does not automatically replicate changes - it is not like dropbox or similar software. rsync only synchronises files once each time it is run. If you want to synchronise more often, then put the rsync command in a cron script (eg. look in /etc/cron.daily). If you want something that automatically synchronises changes, like dropbox does, then look at a different project, such as Sparkle Share or ownCloud.


Why can't I access my Ubuntu web server or ssh from the internet?

I see that you are getting your router's config page, and this means that your port 80 is not forwarded. Also, you can access it from 192.168.25.1 as that IP is inside your network and never changes(Think of an apartment building that moves around and has its street address change but the apartment numbers are constant). Consider http://freedns.afraid.org to give your network a constant domain name. There is a dynamic DNS link there that gives you a small shell script you can run from a cronjob.

Please enter your router settings and try to use an option like "Port Forwarding" or "Enable Applications". Do not use port triggering. Use static port forwarding. From here, the process is very dependent on you router, so consult its instructions for more help. You can forward the following ports:

80 for HTTP
22 for SSH
443 for HTTPS, if you have a certificate you are using it with


You need to change your theme.

Either via gtk
https://elementaryos.stackexchange.com/questions/1103/how-can-i-make-libreoffice-look-better

Or you install a theme directly
http://www.debugpoint.com/2016/08/quick-tip-change-the-default-libreoffice-look-and-feel/

Most application use the general theme you set. You can change the theme in the kde settings.


Try to check /var/log/boot.log, /var/log/kern.log or /var/log/syslog for crashes or process it hangs on.
I had a similar issue caused by crashing sddm (it wasn't loading GUI) with a certain combination of linux kernel and nvidia driver and got it fixed after one of the recent updates.


HP compaq nx5000 laptop freezes with 12.04, which kernel parameter could fix it?

look in /etc/default/grub

change the line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=off"

and now just update grub with sudo update-grub.

Source.


No, the terminal is not a text editor (even though it can be used as one). The terminal is a program where you can issue commands to your system.

Commands are nothing but binaries (executables in the form of binary language) and scripts located in specific paths of your system. Each command executes one specific task.

There are a few text editors for the command line interface, such as nano (a.k.a. Pico) and vim. For example, if you run nano in your terminal it will open a blank text file that you can edit/save.


No such file or directory when trying to create a file with nano

It seems like there is a typo in your question because there would normally be a blank space between nano and /etc/apt/apt.conf.d/... To create a new file named 02proxy in the /etc/apt/apt.conf.d directory (which normally already exists) open the terminal and type:

sudo touch /etc/apt/apt.conf.d/02proxy

To open the 02proxy file for editing in nano text editor:

sudo nano /etc/apt/apt.conf.d/02proxy

Nano text editor keyboard shortcuts
Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location.
Use the keyboard combination Ctrl + X to exit nano.


I have a Samsung N150 too. I love it.

Add the Voria repository to your list of sources and everything will work perfectly.

If you'd rather not do this I wrote a script to change the brightness.

The script is

#!/bin/bash

if [ $1 == 'FULL' ];then
    v=99
elif [ $1 -gt 99 ];then
    v=99
elif [ $1 -lt 3 ];then
    v=3
else
    v=$1
fi

sudo setpci -s 00:02.0 F4.B=$v

Save it in your path and run it as

sudo brightness x

where x is the percentage brightness.


How do I get Shutter to open the GUI after taking a screenshot

I just tries it.  Go to Edit --> Preferences, and make sure that you have "Present main window after taking a screenshot" checked.  See image below.


You want to allow a user to reboot without using the sudo cammand, add the command to  /etc/sudoers file : add this line to the file :

your-username ALL=NOPASSWD: reboot

A more detailed description can be found here: How do I run specific sudo commands without a password?


I uninstalled the program from PlayOnLinux repo and installed the program from the official repo. The program in the official repo seems to be working properly.


How do I log visited sites (for all users in a system)?

# apt-get install webalizer

  webalizer - A web server log file analysis tool.


how do I send control characters to serial device

The easiest way is to echo -e symbols to /dev/ttyUSB0 or other device.

Example:

echo -e "\027\026" > /dev/ttyUSB0

026 and 027 egual decimal 22 and 23.

But your user needs to be in dialout group. Or use sudo.


I don't know which process normally sets these variables in the environment, but when I set them in my startup, the errors in my question go away:

XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg
XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/
export XDG_CONFIG_DIRS XDG_DATA_DIRS

I'm still getting these warnings at app runtime:

/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:391: Warning: g_object_set_property: construct property "type" for object `Window' can't be set after construction
  Gtk.Window.__init__(self, type=type, **kwds)
/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:391: Warning: g_object_set_property: construct property "type" for object `FooWindow' can't be set after construction
  Gtk.Window.__init__(self, type=type, **kwds)


The Additional Drivers tool in Ubuntu only shows devices, for which there is a proprietary driver, i.e. a driver, which source code is kept secret by its producer.

This tool doesn't show drivers that you installed manually, but proprietary drivers that are available, and lets you choose from them.

For your RT3290 (I got the same), there is no proprietary driver. There is an open source driver on their website, but it only works for older Linux versions. So your best (and in my experience not bad) chance is to keep the preinstalled rt2800pci driver and keep using it as a default.

If you, like me, got the version with Bluetooth, don't even try. The module you'd need is called rtbth. After applying various patches, I managed to set it up in DKMS, only to learn that the driver doesn't work properly. You can find Bluetooth devices and they can find you, but you can't pair with them. So if you need Bluetooth, get a Bluetooth USB Dongle, like I did.

Now to your Graphics Card: There certainly IS a proprietary driver for most nVidia chips. It is indeed strange that the card doesn't show up. As you pointed out, it bay be a bug, that the combination of your card and the proprietary nVidia driver is not detected automatically, and is therefore not shown.


How can I read a HPFS/NTFS (Bootable) partition on Ubuntu (15.10)?

To begin, NEVER run fsck on a partition when you don't know that doing so is the right course of action. The problem is that fsck is a repair tool, and as such, it's likely to write data to the disk. In your case, you applied it before you even knew what filesystem was in use on the disk. This is extremely dangerous, since the repair tool might have become confused and made matters worse rather than better. Such an outcome is unlikely, but possible. You probably did no harm, but there's a slim chance that you've done more damage to the disk by using fsck on it.

To learn what sort of filesystem is on the disk, use blkid, as in:

$ sudo blkid /dev/sdb3
/dev/sdb3: UUID="493344495F520D15" TYPE="ntfs"

Of course, your output is likely to be different, but this example does show an NTFS volume. If you get no output whatsoever, that means that blkid couldn't identify the filesystem, which in turn means that it's very badly damaged. If there is output but TYPE= shows something other than ntfs, then that means that it's not an NTFS volume. Maybe the output will be obvious and you can proceed from there, or maybe you'll need to post back with details for more advice.

With the filesystem known, you can use filesystem-specific mount tools, and possibly repair tools. You've already tried mounting with the likely tools (NTFS and exFAT). The type code for the partition (0x07) was once commonly used for HPFS, but that would be likely only if the disk had been used with OS/2, and you say it was used with Windows 7.

Before using potentially destructive repair tools, it's wise to do a low-level backup, as in:

sudo dd if=/dev/sdf1 of=/path/to/lots/of/space/sdf1.img

This command backs up /dev/sdf1 to the file sdf1.img in /path/to/lots/of/space/. Be sure that there's enough free space to hold the entire partition -- about 233 GiB in your case. Making this backup will give you a way to recover if a repair tool makes matters worse, as does sometimes happen.

My hunch is that the disk uses NTFS but that it's damaged and/or was not properly shut down. If so, you must first repair it with Windows tools. The Linux ntfsfix utility is poorly-named; it does only the most minimal checks and then flags the disk as needing attention in Windows. There is no Linux support for NTFS in fsck, so you should not try to use fsck on an NTFS volume.

It's also conceivable that there's something more exotic going on. For instance, the disk might have been used in a RAID array, in which case you might not be able to recover anything without the other disk(s) from the same array. (Specifics would depend on the type of RAID used and other details.)

In a worst-case scenario, you may be able to use PhotoRec to recover individual files.

One more point: In your comments, you said you ran GParted on /dev/sdf1. This is useless -- and even potentially dangerous. /dev/sdf1 is the partition, but GParted is meant to be used on the whole disk -- that is, /dev/sdf.


Can i install lubuntu on a netbook only with my usb?

You will need to download your preferred version of Lubuntu (I recommend the LTS version) and then create a boot usb with the downloaded image file.

Once you have created the boot usb insert it into your laptop and boot it up. Different laptops use different keybindings but look for a setting that says something like "select boot device" and press (and hold) the corresponding key during the boot-up process. If you don't see any text like that it will likely be f10, f11, f12 or escape, try each of these.

From there the Lubuntu installer will start and you should be able to follow the on-screen instructions from there.


How to install sun-gridengine in ubuntu 14.04?

Try to find it in installed packages:

dpkg -S startmpi.sh

I think that it has been moved to examples: /usr/share/doc/gridengine-common/examples/mpi/startmpi.sh


What does the double slash mean in `${f// /_}`?

Thats a replacement pattern using bash parameter expansion.

In ${f// /_}:

The double slashes // are for replacing all occurrences of space with _, if you put one slash /, only first space is going to be replaced
The space is there because you are replacing space (with underscore)

So the pattern basically is:

${parameter//find/replace}

Check man bash to get more idea.

To get to the Parameter Expansion section of man bash at once:

LESS=+/'Parameter Expansion' man bash


I use Kubuntu 18.04 which has Gwenview as its image viewer. It's available in the repositories but it may pull in quite a few dependencies if you haven't already installed other qt-based applications. Run apt install -s gwenview to see if you're comfortable installing it.

Gwenview doesn't display a text file and the corresponding image together but it has a sidebar in which you can enter a description of your image by typing or pasting content in the Description box.

In the following composite,

the first image has the description area blank
the second, third, and fourth images have small descriptions.

Gwenview uses something called "extended file attributes" to store information you enter in the Descriptions box. I learned that here.

If you decide you want to extract all the descriptions, you can. First install xattr from the Universe repository.

  Description: tool for manipulating filesystem extended attributes

Then, run

xattr -l *.png

from the folder containing your images, assuming them to be .png.

You'll get a consolidated output like this:

01-default.png: user.xdg.comment: This is the default color scheme of the Ranger file manager.
02-jungle.png: user.xdg.comment: Jungle is another color scheme included when you install Ranger.
03-snow.png: user.xdg.comment: This is snow, the third color scheme included with Ranger.
04-solarized.png: user.xdg.comment: This is solarized. This color scheme isn't included with Ranger.

I haven't addressed the following issues because I don't understand much about extended file attributes myself:

where this information is stored
whether the information can be accessed by other programs
the maximum length of material you can include in the description

but the following links could be of use:

Extended File Attributes Rock!
where are extended attributes stored?
Differences between purposes of inode, fork and extended file attribute?
How to View & Remove Extended Attributes from a File on Mac OS


How can I keep my custom entry in /etc/hosts?

This is not normal but shows up for some systems. Here is a bug from Launchpad.
So, you can upgrade Network Manager using this PPA. But I don't know how good it is and even necassary.

You can simply use this after changing the file:

sudo chattr +i /etc/hosts

So, it will be closed for any changes. If you want to change it in the future use this:

sudo chattr -i /etc/hosts


Can't locate package (gimp) in terminal, and in the software center says 'not found'

Can you install other packages? What country are you residing (I mean, set during installation?) May be you have broken regional mirror? open your /etc/apt/sources.list file. It will be full of lines like

deb http://ru.archive.ubuntu.com/ubuntu/ trusty main restricted

Change the regional code to some nearby country and run sudo apt-get update


Is Gnome2.x going to be completely obsolete from all Linux distro?

When you refer to Gnome 3 and Gnome 2.x, it seems to me that you're talking about the shell, but Gnome is far more than its shells. It includes Nautilus, Evolution, Gedit, Totem, Banshee, Rhythmbox and many other applications. Lots of stuff. Unity is only one of many shells for Gnome and Ubuntu will move to Gnome 3 in 11.10, which is scheduled to be released in October this year. Using Gnome 3 does not mean you have to use Gnome Shell or Unity and so many GNU/Linux distros will use other shells by default. There is also work being done to port Gnome Panel to Gnome 3.

Ubuntu Classic does not use the global menu by default, although you can install and use it if you wish. Gnome 2 will be supported by Ubuntu at least until April 2013, but the differences between Gnome 3 compared to Gnome 2 will not be as big as you seem to think, since Gnome Panel will still be available for it.

Also, if you like the old school shells, then you might want to try out Xfce.

Edit:

Now that 11.10 with Gnome 3 has been around for a while, I thought I'd add a screenshot of my Gnome Panel 3 desktop, AKA "Gnome/Ubuntu classic". As you can see, you can still use good, old Gnome Panel in 11.10 :)


Two-finger scrolling not working since ubuntu 17.10+

The answer here by @hpotter40 worked for me:

$ sudo modprobe -r psmouse
$ sudo modprobe psmouse

This was taken from comment #16 of this bug report: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1722478/comments/16

Update for a more persistent solution:

Based on comment #44 and #45 of the same bug report above, this should also work. Open the file /etc/default/grub and edit the value of the GRUB_CMDLINE_LINUX_DEFAULT variable. By default this has the value of "quiet splash". The value "psmouse.synaptics_intertouch=0" could be added to it so that it becomes like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash psmouse.synaptics_intertouch=0"

Then update GRUB by executing:

$ sudo update-grub

Reboot your system and this setting should survive even after suspends. As a note, all these answers are simply workarounds until the kernel error could be identified and patched.


It appears that the Munin upgrade is borked. It leaves /etc/apache2/conf.d/munin (softlinks to /etc/munin/apache.conf) in the now unused conf.d folder.

Move your softlink into the new folder
mv /etc/apache2/conf.d/munin /etc/apache2/conf-enabled/

This will still die, but for another reason. Apache 2.2 -> Apache 2.4 upgrade, which no longer uses Order allow,deny and Allow from .....

Find all the above in /etc/munin/apache.conf and do something like this:

Old values

Order allow,deny
Allow from localhost 127.0.0.0/8 ::1

New values

Require local

If you actually want to access it from some other network, eg, 192.168.0.0/24 then replace it with this:

New values

Require local
Require ip 192.168.0.0/24

That should get you working.


How to change Ubuntu's default login screen for gnome ubuntu login screen?

Run any one of the following commands -

sudo dpkg-reconfigure gdm or sudo dpkg-reconfigure lightdm

Select the display manager you want to use by default and hit enter. Then, restart your computer.


Spotify metadata through DBUS with track_notifications disabled

Spotify has two repositories available stable and testing. See http://repository-origin.spotify.com/dists/

From the OP comment above, the testing package resolved the freeze bug. Hence no need to disable track notification:

ui.track_notifications_enabled=false

in ~/.config/spotify/Users/USER/prefs
While the OP install it manually from: http://repository-origin.spotify.com/pool/non-free/s/spotify-client/. Here the formal method:

Add the Spotify repository signing key to be able to verify downloaded packages

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D2C19886

Add the Spotify repository

echo deb http://repository.spotify.com testing non-free | sudo tee /etc/apt/sources.list.d/spotify.list

Update list of available packages

sudo apt-get update

Install Spotify

sudo apt-get install spotify-client

Reference: Same instruction explained here in Spotify for Linux, just replacing stable with testing


USB Audio card fails to initialize after turning it off and on again

Sorry to tell you this but it might be a ALSA/PulseAudio module bug, and a regression to boot. You should report it to launchpad, using apport-bug alsa, then the program will guide you through all the process. There have been several posts about similar behavior with USB's sound cards among all the distributions of Linux.

As test bed, I would try to use a LiveCD/USB and reproduce the problem, if it's still there you might want to report the problem, if it's not, then is a problem with your current system configuration that makes ALSA/PulseAudio/udev fails. If that's the case, reinstalling from scratch may fix it. Again, I'm pretty sure is a bug rather that a configuration issue.

You could give a look to the method to report bugs too.

References:

https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1071854
https://bbs.archlinux.org/viewtopic.php?id=79776
http://ubuntuforums.org/showthread.php?t=1409936
http://lists.freedesktop.org/archives/pulseaudio-bugs/2011-March/004532.html
http://forums.gentoo.org/viewtopic-t-889870-start-0.html


Equivalent to command prompt's "tree" command?

Same command exist. To install, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install tree


Copy files from a directory to a sub-directory (excluding the sub-directory itself)

Assuming you are using bash as your interactive shell, you can enable extglob which allows you to specify "all files except these ones".

shopt -s extglob
cd Parent
cp !(Child1) Child1/


Hello there & welcome to ask ubuntu!

The problem here as you've successfully figured out thus far, is that your boot-loader doesn't have entries for all the operating systems installed in your computer's drives.

Open a terminal and type    sudo grub-update.

It's quite likely this will resolve the problem. You can find more info about this method here.

If the problem persists after sudo grub-update you can use os-prober (official package here / sudo apt-get install os-prober)

Otherwise, you can deep-dive into linux and do it manually (it's not that hard, if you're into linux, you can give it a shot). More about that, in this Unix & Linux community question.

Hope this helps!


Umake - permission denied when installing outside home directory (even as root)

Okay, turns out this is a (pretty long-standing) issue with Ubuntu Make.

There are a couple of workarounds suggested by one of the devs in the above link.

First (preferred) solution:

sudo -s
unset SUDO_UID
unset SUDO_GID

Then run umake to install your application as normal - you should now be able to install to any directory you want. Works flawlessly.

The second option is to create the desired installation folder beforehand and set permissions for the install directory so it can be written by non-root users, but I experienced issues using this with some applications even when permissions were applied recursively and umake was executed using sudo. I'd stick to the first method.


I don't see iBus and can't install Korean (Hangul)

open Language Support.
Click Install/Remove Languages..., there will be pop-up.

Choose "Korean" from the list, tick the checkbox, apply then, and wait.

If the process is done, make sure you log out here and log back in otherwise you'll missing "Korean (Hangul)" option on Text Entry.
Hit Super (windows key) and open "Text Entry" application.
Press the + sign and then type "Korean" and select it.  Then you’ll see a screen like this. Choose Korean (Hangul) (Ibus).

You can now select your Hangul mode from language indicator.

행운을 빌어 요 여모훋ㅈㅂ <-- Test only.


How can I stop apps from flickering in 19.10?

I know it's a bit of a cheap workaround, but I have a laptop with touchscreen and tweaks works correctly with the touchscreen but doesn't with the mouse.
That may help devs to find where the problem is and was enough for me to get my extensions activated painlessly.
Hope that helps somehow :)


How to configure domain name on school network

The school will have a fully resolved domain name of the nature “school.edu” and machines on that network will be resolved by the school DNS Server to be “server.school.edu”. This DNS Server will also, probably in cooperation with a DCHP server, allocate the machine an IP address.

For your machine to take part in this the school IT support department needs to make changes to there servers. If they cooperate and depending upon the setup they use your machine might become available on the local network and possibly on the internet with a fully resolved name.

Alternately, as you already had the machine set up at home you could leave it there and access it via the internet.

Or again, if you are willing to work with IP addresses you might get away with a standard DCHP configured machine on the local network and simply connect to the IP address.

Use ifconfig on the server to find its IP address then from another machine try pinging that address or connecting to a service on that machine.


Text size in xfig not working in Ubuntu version 20.04

please install the package gsfonts-x11, e.g. with
sudo apt-get install gsfonts-x11
restart your computer.
Then it should work.


Just kill the relevant processes, this will work even if you don't uninstall first:

killall indicator-sound-service

For example, to get rid of the sound indicator after you've uninstalled it, or to refresh it.

Other services include:

indicator-application-service (for the application menus)
indicator-datetime-service
indicator-me-service
indicator-session-service (for the session menu at the far right)


I have installed ubuntu 12.04.2 64-bit, but it still not opening after installation

You can use the SUPERGRUB2 disk to let search for your bootable OS on you computer.
http://www.supergrubdisk.org/ (Try first)

After succesfully starting your two operating system, you can install a new GRUB in your boot sector (fixing and replacing)


Compare 2 numerals and copy only similar part sed/grep/awk

From Stack Overflow:

  In sed, assuming the strings don't contain any newline characters:

string1="test toast"
string2="test test"
printf "%s\n%s\n" "$string1" "$string2" | sed -e 'N;s/^\(.*\).*\n\1.*$/\1/'

This assumes that the strings themselves don't contain newlines.

Therefore you can do:

printf "%s\n" "${a[1]}" "${a[2]}" | sed -r 'N;s/^(.*)(\..*)?\n\1.*$/\1/'

The (\..*) should eliminate a trailing . from the common section.

The solution involves two parts:

Getting sed to work across two lines. This is done using N, and can be avoided if a character is guaranteed to be not in the input. For example, because spaces are not present in the elements as given, we can instead use:

printf "%s " "${a[1]}" "${a[2]}" | sed -r 's/^(.*)(\..*)? \1.*$/\1/'

Essentially, the character or string separating the two elements in the output should be used after %s in the printf formatting string, and before \1 in the regular expression.
Finding a repeating string using regex. The trick for this is well-known, and is always a variation of:

(.*)\1

.* matches any set of characters, and () groups them for later reference, by \1. Thus (.*)\1 is any sequence of characters followed by itself.


I'm glad you fixed the problem. For future reference, you can use GRUB (or any other EFI boot manager) to switch between two versions of Windows. The way I know to do this requires planning before installing your second Windows, though:

Install the first Windows normally.
Boot to a Linux emergency disk (the Ubuntu installer in "try before installing" mode should work fine).
Change the type code of the EFI System Partition (ESP) to something that Windows will ignore. gdisk is most flexible about this, since you can set the type code to anything you like, such as 8300 (the code used by Linux). You might optionally change the type code of the Windows partition, too, to keep it out of the second installation's boot loader. If you use gdisk, be sure to save your changes with w.
Install your second Windows. The installation should create a second ESP on the disk, and your computer should boot to this version of Windows. (If you did not hide the first Windows by changing its type code, it will probably show up as an option in the Windows boot loader.)
Boot the Ubuntu installer in "try before installing" mode again.
Change the type code on the first ESP back to the right thing (EF00 in gdisk). If you changed the type code of the first Windows partition, change it back (to 0700 in gdisk) at the same time.
Run the Ubuntu installer and install Ubuntu.

When the process completes, you should have GRUB controlling the boot and giving you an option of two Windows installations or Ubuntu. I'm not sure if it will tell you the names/versions of the two Windows installations, though; it might just say "Windows" for each of them.

Many variants of this procedure should work, too, such as installing the second Windows after you install Ubuntu (which will require resetting GRUB as the default boot program). It might be possible to do something similar after installing both copies of Windows by juggling the type codes of the ESPs and Windows partitions and using each Windows version's installation/repair disk to get it to re-install the Windows boot loader on the target ESP.

The key in any of these cases is that you'll have (at least) two ESPs, one for each version of Windows. (Ubuntu doesn't care which ESP it uses.) The dual-ESP setup can cause confusion in the future, though. The Windows 7 installer, for instance, gets confused if it sees two ESPs, so a re-installation will fail. (I don't know if Windows 8 or 10 has the same problem.) Of course, you changed ESP type codes once, so you can do it again if you need to re-install Windows.


Let's look at the available packages in the Ubuntu repositories for libstdc++6:

$ rmadison libstdc++6             // The rmadison command is provided by the 'devscripts' package
 libstdc++6 | 4.6.3-1ubuntu5          | precise         | amd64, armel, armhf, i386, powerpc
 libstdc++6 | 4.8.2-19ubuntu1         | trusty          | amd64, arm64, armhf, i386, powerpc, ppc64el
 libstdc++6 | 4.8.4-2ubuntu1~14.04.4  | trusty-security | amd64, arm64, armhf, i386, powerpc, ppc64el
 libstdc++6 | 4.8.4-2ubuntu1~14.04.4  | trusty-updates  | amd64, arm64, armhf, i386, powerpc, ppc64el
 libstdc++6 | 5.3.1-14ubuntu2         | xenial          | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 libstdc++6 | 5.4.0-6ubuntu1~16.04.10 | xenial-security | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 libstdc++6 | 5.4.0-6ubuntu1~16.04.11 | xenial-proposed | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 libstdc++6 | 5.4.0-6ubuntu1~16.04.11 | xenial-updates  | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 libstdc++6 | 8-20180414-1ubuntu2     | bionic          | amd64, arm64, armhf, i386, ppc64el, s390x
 libstdc++6 | 8.2.0-1ubuntu2~18.04    | bionic-updates  | amd64, arm64, armhf, i386, ppc64el, s390x
 libstdc++6 | 8.2.0-7ubuntu1          | cosmic          | amd64, arm64, armhf, i386, ppc64el, s390x
 libstdc++6 | 8.2.0-12ubuntu1         | disco           | amd64, arm64, armhf, i386, ppc64el, s390x
 libstdc++6 | 8.2.0-13ubuntu1         | disco-proposed  | amd64, arm64, armhf, i386, ppc64el, s390x

Aha. Neither of your two options, 8.1.0-5ubuntu1~14.04 nor 8.2.0-9 is from the Ubuntu repositories.

Now we know the problem: You have unwisely added non-Ubuntu sources that are providing packages that are incompatible with your release of Ubuntu. This is also called a 'version conflict' or 'held broken packages'. They are not really "broken", just wrong version...but they do break your system.

The solution is to uninstall ALL packages from that unwise source, and then to delete that source. Return your system to using packages provided by the Ubuntu repositories. Then MySQL will install.

If you don't know how to uninstall packages from a specific source, then see How can PPAs be removed? for instructions on how to install and use the ppa-purge command.


first install Y-PPA manager:
for this you have to download deb package, you cant install through PPA, since you cant update software list.

click on this link to download deb
then open it and click on Advanced Option.

then click on the second option( try to import all missing GPG keys) shown in image below:

wait for some time. Then click on third option (try to fix all GPG BADSIG errors)
You need to wait for some time untill its shows you notification that its done !
in case you have upgraded your Ubuntu recently, you have to click on "Re-enable working PPAs after Ubuntu upgrade"
then run sudo apt-get update After this you can go back to thing you were trying to do.


What driver should I choose for my graphics card?

Well, this probably isn't the answer you expected... my apologies.

The only "real" way to find out what driver will work with your card/system is to ask someone with real experience with your specific card.  Google didn't help me much with your card..

So lets go break your system shall we ;D

First we need to provide a failsafe in case we break your ability to run Unity.  I usually just install Gnome Flashback so I can tinker with graphics drivers without using any of them.

sudo apt-get install gnome-session-flashback

You should then  be able to log into "Gnome Flashback" from the login screen, but I recommend using "Gnome Flashback (No effects)" as it doesn't use Compiz at all.

Now we are ready to test your drivers.  Go ahead and select one and apply it.  I'd start with the tested and stable ones first.
Reboot and try logging into Unity and see if it works..  Try your games, make sure the graphics meet what you want.  I recommend writing down which driver you tried and how it worked; it won't help to forget later ;)
If a certain driver doesn't work; log out of Unity (Or if you can't, press Ctrl+Alt+F1 login and run sudo reboot) and log into "Gnome Flashback (No effects)" and remove the driver.  You'll find additional drivers in the software center under Edit -> Software Sources in the "Additional Drivers" tab.
Repeat, starting from step one until you get a driver that pleases you.  If you don't find one.. well... I don't think there's anything you can do about it..

This is the method I use to find a good driver.  It has always worked for me.

Good luck!


You can limit PhotoRec to search for a specific file type, for example jpeg files. It saves a lot of time and effort compared to searching for all files. PhotoRec uses typical patterns in the beginning of the data stored on the disk to identify, when a particular file starts, and what type it is.

I don't think it can search for a particular file [name]. So when the file 'is not in the trashcan', and there is no backup, I don't know any other tool than PhotoRec. The problem is exactly that the name and the address to the data is removed, and I know no way to get it back.

And it is very important to stop using the file system at once to avoid overwriting the file data; the location is now marked as 'unused' and available for other files. So shut down the computer. Boot from another drive and do not mount the partition when you run PhotoRec.

-o-

I remember from the old msdos days, that there was an 'undelete' program, but I think that the modern file systems are working in a different way and the work-space for names and addresses are probably re-used (overwritten) soon after a file was deleted. (I would also be happy to learn about an 'undelete' program, that works like the old 'undelete', and it will be interesting to find out if extundelete can recover the file.)


How to block specific apps from opening in specific accounts

A. Configurational options

If the block is meant to block not-so-experienced users from using certain applications, editing (a local copy of) the application's desktop file (as described in [1]) is probably the fastest and easiest way.
Some additional things can be done to create an extra barrier and/or to prevent the fact that the user finds out too easily what we've done to block the application ([2] and [3]).

The set up is not fit for unattended situations with experienced users. In "home" situations with average users it will be sufficient in many cases.

1.Example for blocking gedit by editing (a local version of) the .desktop file

Copy the application's desktop file in /usr/share/applications to ~/.local/share/applications:

cp /usr/share/applications/gedit.desktop ~/.local/share/applications/gedit.desktop

Edit the file: open it with gedit (while you still can :)) by dragging it over an open gedit window.

replace the line

Exec=gedit %U

by:

Exec=zenity --info --text 'You are not allowed to use this application'

remove the (possible) shortcuts, to prevent starting the application from one of the shortcuts:

remove the line (for the gedit example):

Actions=Window;Document;

and the section(s) like:

[Desktop Action Window]
Name=Open a New Window
Exec=gedit --new-window
OnlyShowIn=Unity;

From then on (after log out / log in) the user will see this message if he or she tries to open gedit from Dash, or tries to open a file that is linked to the application:

Hiding the application from Dash (optional measure)

After we made the changes above, having the gedit.desktop file still open, we can add an additional line:

NoDisplay=true

By adding this line, gedit will not even show up in Dash.

Undo

To undo, simply remove the local .desktop file from ~/.local/share/applications

2.Making it a bit more difficult to find out

While, after editing the .desktop file, the application will not show up in Dash any more, Dash search will still show our newly created gedit.desktop file, which might unintentionally give a hint how to escape the application block.

To avoid that, we should exclude the directory ~/.local/share/applications from Dash search and clear the search history.
Open System Settings > "Security & Privacy" > "Files & Applications" (tab). Add the directory ~/.local/share/applications to the list to exclude from search.

3.(Not) using the terminal / command line

Redirecting the gedit command (1)

Editing the .desktop file prevents using the application from Dash, but if the user knows the AltF2combination and the command to run the application, he or she will still be able to start the application, just like with the terminal. A nice and easy to set up extra measure is to create (if it doesn't exist yet) the directory ~/bin and create a small script in the directory:

#!/bin/bash
zenity --info --text 'You are not allowed to use this application'

Make it executable and name it after the application; gedit in this case.

Since ~/bin is in PATH, running the command will call the script instead of the "real" gedit application. As a result, the same You are not allowed to use this application -message will appear

Redirecting the gedit command (2)

Another way (with more limited effect, see note) of redirecting the application's command is to add an alias to the .bashrc file:

gedit ~/.bashrc

add the line (gedit example):

alias gedit='zenity --info --text "You are not allowed to use this application"'

Note: this is only to be used as an extra measure, since it only prevents the application to be called from the terminal directly. Double clicking on a (e.g.) .txt file will however still open the application.

Make the use of terminal difficult or impossible at all

To prevent the use of the terminal, you can also do the same trick on the gnome-terminal.desktop - file as in [1], and/or change the default shortcut key combination to run the terminal (System Settings > "Keyboard" > "Shortcuts" > "Starters")

4. A small tool to automatically create (or undo) an edited version of the .desktop file (as in 1.)

If you run the script below with either the argument block or unblock (you must run it with either one), you will be presented a list with (global) desktop files, representing your installed applications:

Pick one, and your application is blocked or unblocked, depending on the argument you run it with.

Note

You may have to log out / log in to make it work.

The script

#!/usr/bin/env python3

import os
import shutil
import sys

mode = sys.argv[1]

home = os.environ["HOME"]
global_dir = "/usr/share/applications/"

files = [file for file in os.listdir(global_dir) if file.endswith(".desktop")]
relevant = []
for i in range(len(files)):
    file = files[i]
    with open(global_dir+file) as src:
        text = src.read()
    if not "NoDisplay=true" in text:
        relevant.append((file))
for i in range (len(relevant)):
    print(str(i+1)+".", relevant[i])

choice = int(input("\nplease enter the number of the corresponding .desktop file: "))
filename = relevant[choice-1]

local_file = home+"/"+".local/share/applications/"+filename
global_file = global_dir+filename

def block_application(filename):
    if not os.path.exists(local_file):
        shutil.copyfile(global_file, local_file)
    with open(local_file) as src:
        lines = src.readlines()
    shortcuts_section = [i for i in range(len(lines)) if lines[i].startswith("Actions=")]
    if len(shortcuts_section) != 0:
        lines = lines[:shortcuts_section[0]]
    command = [i for i in range(len(lines)) if lines[i].startswith("Exec=")]
    if len(command) != 0:
        lines[command[0]] = 'Exec=zenity --info --text "You are not allowed to use this application"\n'
    with open(local_file, "wt") as out:
        for line in lines:
            out.write(line)

if mode == "block":
    block_application(filename)
elif mode == "unblock":
    os.remove(local_file)

Copy the script into an empty file, save it as block_apps.py and run it by either:

python3 /path/to/block_apps.py block

or

python3 /path/to/block_apps.py unblock

B. Scripted option(s)

Blocking certain applications can also be done by running a script in the background. The script would have to take certain actions if one of the "forbidden" applications is run.

1. Script to manipulate the screen when forbidden applications are used.

The script below offers a flexible way to block user defined applications. It runs with a simple command, with the forbidden applications as an argument, e.g. (assuming you made the script executable):

    /path/to/block_apps.py firefox gedit gnome-terminal

The advantage of blocking applications like this is that it is flexible; even within one account, different settings can be used, simply by using other applications as argument.

What it does

By un- commenting one of the lines:

# action = "xrandr --output "+screen+" --brightness 0"

or

# action = "xrandr --output "+screen+" --rotate inverted"

The script either:

blacks the screen (action = "xrandr --output "+screen+" --brightness 0"):

or turns it upside down (action = "xrandr --output "+screen+" --rotate inverted"):
(who said Unity doesn't allow to put the launcher on the right?)

The script

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

applications = []
i = 1

while True:
    try:
        applications.append(sys.argv[i])
        i = i+1
    except IndexError:
        break

cmd1 = "xrandr"
get = subprocess.check_output(["/bin/bash", "-c", cmd1]).decode("utf-8").split()
screen = [get[i-1] for i in range(len(get)) if get[i] == "connected"][0]

#-- uncomment (only) one of the options below
# action = "xrandr --output "+screen+" --brightness 0"
action = "xrandr --output "+screen+" --rotate inverted"
#--

while True:
    cmd2 = "ps -u "+getpass.getuser()
    applist = subprocess.check_output(["/bin/bash", "-c", cmd2]).decode("utf-8")
    for application in applications:
        if application in applist:
            subprocess.Popen(["/bin/bash", "-c", action])
    time.sleep(5)

How to use

Copy the script into an empty file, save it as block_apps.py, make it executable
run it by the command:

/path/to/block_apps.py <application_1> <application_2> <application_3> etc...

ImportantTo kill the block_apps.py script and restore "normal" settings, use the script below (make it available under a shortcut key combination):

#!/usr/bin/env python3
import subprocess

cmd = "ps -ef | grep block_apps.py"
run = subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8").split("\n")
match = [line for line in run if "block_apps.py" in line]
command = "kill "+match[0].split()[1]
subprocess.Popen(["/bin/bash", "-c", command])

cmd1 = "xrandr"
get = subprocess.check_output(["/bin/bash", "-c", cmd1]).decode("utf-8").split()
screen = [get[i-1] for i in range(len(get)) if get[i] == "connected"][0]

restore_1 = "xrandr --output "+screen+" --brightness 1"
restore_2 = "xrandr --output "+screen+" --rotate normal"

for item in [restore_1, restore_2]:
    subprocess.Popen(["/bin/bash", "-c", item])

As always with scripts, copy it into an empty file, save it as kill_blockapps.py, make it executable and run it by:

/path/to/kill_blockapps.py

You will probably want to have this one under a shortcut key: Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts".
Click the "+" and add the command as above.


Go into Language settings --> Regional Formats, and set to English.


I had the same problem. After years of annoying copying fonts by hand, I finally gave up and wrote my own program for this purpose. I'll be glad if it will be useful for you and other people:

https://danpla.github.io/fontlink


unfocus browser flash player to use shortcuts

These days I can achieve the result by using the full screen shortcut (f).  If you're already on full-screen you need to press it twice, but invariably once you're back in full screen the cursor arrows work as expected.


How to manually update time in time zone?

Set the time manually using the date command or install ntpdate using the software center.


Have tried lots of solutions, but after changin Nvidia drivers now stuck in low graphics mode

This has happened to me numerous times...
If you installed nvidia-prime then uninstall it

First click crtl+alt+f2(if that nothing happens then try a older kernel) then login and type:

sudo apt-get autoremove nvidia-prime nvidia-331 nvidia-331-updates nvidia-319 nvidia-319-updates nvidia-settings nvidia-settings-319

Then after run:

sudo apt-get autoremove

Run autoremove in till there is nothing to remove then run

sudo reboot

And all should be well.

For bumblebee:

First click crtl+alt+f2(if that nothing happens then try a older kernel) then login and type:

sudo apt-get autoremove bumblebee* nvidia-331 nvidia-current nvidia-319  nvidia-331-updates nvidia-319-updates

and then to remove the ppa

sudo apt-get install ppa-purge
sudo ppa-purge ppa:bumblebee/stable

Then

sudo apt-get autoremove

Run autoremove in till there is nothing to remove then run
Last

sudo reboot

And all should be well.


How do I install Ubuntu 12 on a 64bit PC with UEFI and GPT SSD disk, with no current OS?

Did you add a 1MB biosgrup partition at installation? This is usually necessary for the newer GUID partition table for the BIOSes to recognise it or something (remember you are not limeted to four partitions like the Master Boot Record partition table so you can have as many as you want!)


There are a couple of things to note.

Firstly, you cannot go straight from 8.04 to 13.10. You can however jump releases if you are using LTS releases (8.04>10.04>12.04). This is going to take a bit of time, so make sure you're prepared for that. Also make sure you have backed up your important data in case anything goes wrong.

Secondly, you will need to modify your repositories (if you haven't already) to point to the old-releases. Edit /etc/apt/sources.list and change every (xx.)archive.ubuntu.com to old-releases.ubuntu.com

E.g. ://au.archive.ubuntu.com/ubuntu/dists/natty/main/source/Sources would be changed to ://old-releases.archive.ubuntu.com/ubuntu/dists/natty/main/source/Sources

Then run sudo apt-get update and make sure it works without errors. If it does, run sudo apt-get upgrade and then do-release-upgrade to upgrade to the next major version. You can then continue to use do-release-upgrade until you get your system to the version you want.

Note that do-release-upgrade requires update-manager-core to be installed, so you may need to install that before upgrading.

Once you have finished upgrading, you should change your repositories back to the current list if they haven't been automatically, or otherwise just remove the old-releases entries if they are still in there.

You can see https://help.ubuntu.com/community/EOLUpgrades for more information on upgrading releases that are past EOL (End Of Life).

Good luck.


how do you required a user to login using key authentication?

!!!! ONLY DO THIS IF YOU REALLY REALLY WANT TO DISABLE PASSWORD LOGIN FOR SSH DAEMON !!!!

to get this working you must tell the ssh daemon that you do not want passwords, this should be done ONLY if we know key login is possible at all:

you must edit this file:

/etc/ssh/sshd_config

and change the following values:

original:

RSAAuthentification yes

should be:

RSAAuthentification no

original:

#AuthorizedKeysFile %h/.ssh/authorized_keys

should be:

AuthorizedKeysFile %h/.ssh/authorized_keys

original:

#IgnoreUserKnowHosts yes
ChallengeResponseAuthentication yes
PasswordAuthentication yes

should be:

IgnoreUserKnowHosts yes
ChallengeResponseAuthentication no
PasswordAuthentication no

finally restart the sshd daemon:

/etc/init.d/ssh restart


Ubuntu 11.10 will only start in restore mode

Fixed the problem.  Got the restore mode terminal and entered

sudo service gdm start

This brought up Gnome which I much prefer to Unity.


Execute a command stored into a $variable

Instead of using simple strings, build your command using arrays. Arrays provide a convenient interface: If a is an array, then "${a[@]}" (note the quotes) expands into each element of a, without additional field splitting or globbing (so spaces, and things like wildcards, should remain intact).

Example:

$ a=(printf "|%s|\n" "foo   bar" "*")
$ echo ${a[@]}
printf |%s|\n foo bar bin boot dev etc home lib lib64 lost+found mnt opt proc root run sbin srv sys tmp usr var

Note how the * was expanded, and how the extra spaces between foo and bar were lost. But with the "${a[@]}", these are preserved:

$ echo "${a[@]}"
printf |%s|\n foo   bar *

This is ideal for building commands. Now, you can do:

$ "${a[@]}"
|foo   bar|
|*|

See? The arguments were retained perfectly.

So, do:

COMMAND=(/usr/bin/exiftool "$PATH_NAME")
"${COMMAND[@]}"


Files missing from a KDE vault encrypted folder

Something similar happened to me today. I open my Vault, enter my password, and Dolphin pops up, but no files are within the folder…
Although Dolphin did open, the Vault’s icon was missing the green plug on it. Therefore, I thought that the Vault did not mount correctly. I checked the vault storage location and it looked like the encrypted files are still over there. I created a new folder in my Home/Vaults directory. Then I amended the Mount Point in Configure Vault so it pointed to the new folder. This did the trick and now Vault opens with all the files within it.


How do I run PHP file in Ubuntu and fix the permission denied?

the problem that I faced was in permissions so, I have to change the chmod of a directory which I working on so, in this case, I should write the following command:
$ sudo chmod  o+w /var/www/html

The o stands for other and the + adds the permissions w is write.
at this moment the mode of the whole directory will change from reading to writing mode


Encrypt home directory / LVM encryption - Ubuntu Server 14.04 setup

They are completely separate and other then "encryption" they have nothing in common.

LUKS / LVM encrypts everything but /boot.

ecrypts or an encrypted /home encrytps /home/your_user name

With LUKS, everything is decrypted when you boot, /swap, /home, / , etc. You can of course configure this differently , but this is how the defaults work.

With ecrypts, your home direcroy is decrypted when you log in. You would use this if you needed to encrypt your personal data in /home/ separate from the system.

See https://help.ubuntu.com/community/EncryptedHome and When installing I'm given the option of encrypting my home folder -- what does this do?


Why do I get a blank black screen when I try to install Lubuntu 13.04 on a 12" Powerbook?

During the bootup, press tab, then add the following line in your startup script (before the 2 -- at the end) to see if this helps:

nouveau.blacklist=1


How to write a bash script that kills a python program running in terminal

Let's say your script is named test_script.py. You can add an interpreter comment at the start of the script, like so:

#!/usr/bin/env python

def function:
  #example function

#rest of script here

Then, execute chmod: sudo chmod +x test_script.py

And execute it like so: ./test_script.py

Then to kill it, get the id of the script with the command: pidof test_script.py

And it will return the pid, kill it using kill -9 [pid_here]


BIOS Corrupted After A Failed Suspension

This is a longshot, but it sounds like your machine might be making it past the BIOS and then just hanging at boot. My MBP used to do this. Had something to do with not being able to resume from the memdisk when booting from EFI. Every boot would take me to the same screen you're getting.

If this is the case, and you are indeed getting through the BIOS, think you could manage it to boot from CD? If so, you could burn a copy of Super Grub Disc 2 and boot up with that. It'll find your exisiting GRUB install. Edit that to include acpi_sleep=nonvs before the quiet splash params and then boot up. That'll force your Ubuntu to wake from its slumber.


UPDATE: Can't create more than one extended partition (thanks @ByteCommander), so creating a primary partition would still work in this case.

This would be my course of action in your case:

Start up a LiveUSB and open gparted. Alternatively, if your /dev/sda6 partition is bootable and can run gparted, you can do this operation from there too.
Shrink /dev/sda1 by however large you want your new installation to be.
Create a blank ext4 partition in the free space you just took from /dev/sda1. Install to this space here.

So one thing I would suggest is creating a partition dedicated to hosting your /home so that you don't have to have multiple copies or links to your personal files between operating systems. This would also free up some space.

If you wanted to do that, just split the free space between an ext4 partition for /home and another ext4 for your new OS. There are other guides on Ask Ubuntu on how to move /home into that new partition. It is extremely helpful to do, and you keep a lot of customization and settings that you had from the other OS systems.


Through various Compiz plugins (from the extra package, I guess), you can maximize a window (by title), and put it in the background (possibly even making it unclickable). I'm afraid that I forgot what the specific plugins were.

In addition, I never tried this with Unity. I expect results better than before, because the programs menu bar will never be visible, and maximized windows only have controls in the panel -- which will be busy doing other things.


You can't remove LVM so easy. You need to:

Make full backup of all files on in your filesystem(s)
Run live CD
Remove the partition /dev/sda2
Recreate partition(s) (depend of the filesystems, logical volumes
you have)
Restore from backup.
Edit /etc/fstab to reflect the new filesystems and mountpoints
Edit grub config to reflect the swap place and new partitions and
reinstall/reinitialize to reflect changes
Reinitialize swap (disable it from /etc/fstab on 1st boot, reboot, exec
mkswap /dev/sdN, then swapon /dev/sdN to activate it, then edit
/etc/fstab to activate it on next boot)

In general LVM make quite small overhead on disk operations so better keep it.


Open/Filtered is a normal state for OpenVPN, specifically UDP. Here's an output of nmap on my own server (with a working VPN) showing the exact same state on that port:

[+] Nmap scan report for vpn.[redacted].com ([redacted])
Host is up (0.15s latency).

PORT     STATE         SERVICE
1194/udp open|filtered openvpn

As stated in the nmap docs, open|filtered means that NMAP can not determine for whatever reason, but it doesn't think the port is explicitly closed. If this is the case, the best way to actually check would be to just try to use the port, and see if it works or not. So, in this case, connect to the OpenVPN host and see what happens.


Ubuntu Desktop 18 virtualbox unable to change file permissions of shared folder

After hours of work, I figured out my own solution. The permissions problem is related to how virtualbox mounts file systems from the host. My host file system is ntfs in this situation. Despite any commands attempting to alter the volume permissions, the permissions will remain with root as owner and permissions set to 770.

Install guest additions package in your virtual machine. Create a new shared folder with only "make permanent" checked. DO NOT check the auto-mount box. Also, not sure if this is necessary but also install the expansion package for virtualbox on your host operating system.
Create a directory on the guest machine (the operating system running within virtualbox).
Create a .sh file with the following bash script:

sleep 1
 echo '[your password]' | sudo -S mount -t vboxsf -o rw,uid=1000,gid=1000 [share name] [path to  the directory created in the previous step]
Navigate to the "startup applications" manager and create a new startup with the command: xterm -e "/path/to/script/in/previous/step"
Set the file permission to executable: chmod +x [file name].
Install xterm sudo apt-get install xterm.

I realize the security risk of "entering" the sudo password. However, in this situation, I am the only one with access or desire to run this virtual machine. I deemed the risk low. Assess your situation before resorting to this solution. Also, I remember reading that adding a space before the command will prevent the command line from storing that command in the history list.

This solution worked for me on Ubuntu 18LTS. I am aware of rc.local and chron jobs but these vary among distribution versions and it seemed kind of hit or miss. rc.local doesn't even exist in my installation and creating the file manually accomplished nothing.


Setup Windows and Linux, dual boot and a storage folder that can be written and read by both

You can still set it up like the article suggests in 14.04, the permissions have to be set correctly in both OS's.

One very easy way to handle this is to use the GUI in 14.04 and create a folder in the Desktop directory of your Windows partition.

Mine is located on WinPartition:/users/mylogin/desktop.
It is easy, if you have the space on your windows install.

Optionally, pick a neutral partition, set up the folder from Ubuntu, open all permissions and then create a shortcut to the folder in Windows.


Ubuntu 12.04 LTSP Fat clients autologin and no autologin clients

Ok thanks to a greek forum for teachers I found the solution.
You can use:

[Default]
LDM_AUTOLOGIN=True

[teacher_room-mac]
LDM_AUTOLOGIN=False

or the opposite:

[Default]
LDM_AUTOLOGIN=False

[lab-mac]
LDM_AUTOLOGIN=True

The [Default] instructions can be overriden in [mac-address] section.
I chose the first one and works great!


Command line MP3 and OGG tagger with picture support (cover fetcher)

eyed3 (Install eyed3)

This works for mp3 files.
Example usage, where image_name.jpg is the filename of the image you want for the cover art of the  mp3 file test.mp3:

eyeD3 --add-image=image_name.jpg:FRONT_COVER test.mp3

vorbis-tools (Install vorbis-tools)

Vorbis-tools provides the command vorbiscomment which can embed images in ogg files if they are encoded correctly. Unfortunately I can't find out exactly how one can encode an image correctly. See this superuser post.


Where are the settings for 'iwconfig' stored?

If you use Network Manager settings are in /etc/NetworkManager/system-connections/.

In that folder you have all connection, in My case:

Auto router03  Auto router02
Auto router04  Auto dlink_DWR-512
Wired connection 1

After Auto is name of SSID

example

zzz@zzz ~ $ sudo cat /etc/NetworkManager/system-connections/Auto\ dlink_DWR-512
[connection]
id=Auto dlink_DWR-512
uuid=6c358756-06b1-4c5b-9eca-a6c8d52a5456
type=802-11-wireless

[802-11-wireless]
ssid=dlink_DWR-512
mode=infrastructure
mac-address=00:21:5C:8A:60:AB

[ipv6]
method=auto

[ipv4]
method=auto


Cannot install WGET in Ubuntu 12.04.5 lts

Check that you are root when running apt-get. Then if you are:
Try:

sudo apt-get update
sudo apt-get remove wget then install wget
try sudo apt-get upgrade then try all these things again.


You could do it with setfacl, giving permissions to all users you want.
Linux setfacl command help and examples


Persistence Problem in Ubuntu 17.04 Zesty Zapus

Sounds like you have tried just about everything but mkusb,

I would recommend trying mkusb first: https://help.ubuntu.com/community/mkusb

It can create a bootable 'buntu flash drive, with Boot on FAT32 partition, OS on read only ISO9660 partition, persistence on ext casper-rw partition and NTFS partition accessible to Linux and Windows. It works with BIOS or UEFI.

(Persistent partitions are not currently working with syslinux installs such as LiLi and Unetbootin).


To make a launcher .desktop file autostart for all users, simply copy or link the .desktop file to /etc/xdg/autostart.Copying seems  to bee a recommended practice since as you can see, all files under autostart directories are files.
More info about xdg autostart: https://specifications.freedesktop.org/autostart-spec/0.5/ar01s02.html

# sudo ln -s /usr/share/applications/mygui.desktop /etc/xdg/autostart/
sudo cp /usr/share/applications/mygui.desktop /etc/xdg/autostart/
# new files should be root:root, 0644
# sudo chmod 644 /etc/xdg/autostart/mygui.desktop


Ubuntu Start menu Shutdown/Restart have the same function

It's part of the OS. There's nothing more to it. You are asked to choose between restarting or shutting down once again. However, I think there is an answer around here.


You disabled the trusty-update PPA after the installation of libsane.

Open Software & Updates and set a thick for trusty-updates in the tab Updates.

Now open a terminal and execute :

sudo apt-get update
sudo apt-get install libsane-dev


Does running the vanilla Ubuntu 14.04 with MATE D.E. installed provide the same reduced resource usage benefit as running Ubuntu MATE 14.04?

Ubuntu MATE will surely use less resources than just choosing MATE from DE since Ubuntu-Desktop installs many packages with unity and Ubuntu-MATE has very few dependencies.

Thus if you just install MATE DE in default Ubuntu, the packages which were installed with unity will be there and some of them maybe running in background, thereby using more resources than Ubuntu MATE fresh install.

But if you want to convert Ubuntu into Ubuntu MATE without wiping you may follow steps below, it will have the same effect as that of installing a fresh instance of Ubuntu MATE.

sudo apt-add-repository ppa:ubuntu-mate-dev/ppa
sudo apt-add-repository ppa:ubuntu-mate-dev/trusty-mate
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ubuntu-mate-core ubuntu-mate-desktop
sudo apt-get install mate-desktop-environment-extras

Also install gdm by this command :

sudo apt-get install gdm

Then you may remove ubuntu-desktop by following command :

sudo apt-get remove ubuntu-desktop --purge
sudo apt-get remove compizconfig-settings-manager
sudo apt-get remove compiz-fusion-plugins-extra
sudo apt-get remove compiz-plugins-extra
sudo apt-get purge compiz*
sudo apt-get remove unity
sudo apt-get remove unity-2d
rm -rf .config .gnome .gnome2 .compiz .cache

An alternative to Ubuntu MATE is lubuntu which is even light-weight than Ubuntu MATE, choice is yours.


Why is NFS not allowing me to mount a share?

Okay, I've worked it out (or at least, I've made it work, and I think I know what was causing it).

I added the insecure flag to the /etc/exports line on the NFS server, so now it looks like this:

/media/storagedrive 10.0.0.0/24(rw,sync,no_subtree_check,insecure)

This flag allows connections to originate from client ports above IPPORT_RESERVED (1024).

The mount command now works.

My guess as to why the lack of the insecure flag was the problem is that VirtualBox was using NAT to pass the request through to the physical network, so while the port on the Ubuntu guest (AlexDevGuest) may have been below 1024, the translated port on the Windows 7 host (AlexDevHost) was probably above 1024, and therefore blocked. Setting the insecure flag meant it was allowed though.

This problem obviously doesn't affect the non-virtual machine DevMatt.


How to execute a command several times in the terminal with/without a few minor changes?

Yes there is! You can use BASH which is interpreting the commands you type into your terminal.

For example, try this:

for file in {input1,input2,input3}; do java myprogram $file; done

This one-liner is a simple loop which will run myprogram with java on the list of files.

This is 100% equivalent to running:

java myprogram input1
java myprogram input2
java myprogram input3

You can use this syntax with any command you like. For example, you can list all files in your home directory with:

for file in ~/*; do echo $file; done

~/* will expand into a list of all files within ~ directory (except for the hidden files).

Another example: if you wanted to run your program on 100 files, you do not need to list them by hand. Try this:

 for i in $(seq 1 100); do java myprogram input$i; done;

$(seq 1 100) will expand into the output of seq 1 100 command, which provides a list of numbers from 1 to 100. This way your program will be run on all 100 "inputN" files.

It is also fine to use multiple command within the loop, but then it becomes much more convenient to use multiple lines. The following example will run your program on 10 test inputs and will print differences from reference outputs:

for i in $(seq 1 10); do
    java myprogram input$i > temp_out
    diff temp_out output$i
done

As your script grows, it will soon become convenient to save it to a file. Write down your script (typically bash scripts will have .sh extension), and run it with:

sh myscript.sh

or, if you set +x flag on myscript file, and placed #!\bin\sh at the top of your script (which states that this file should be run with bash):

./myscript.sh


How can I set the terminal to not automatically go to the last line if there the output in the terminal has been updated?

Technically speaking, there is no way to make TTY output stuff AND not scroll at the same time. What can be done is to freeze it with Ctrl + S shortcut, and scroll all the text you need using SHIFT+Pg_Up/Pg_Down keys, and then unfreeze with Ctrl+Q shortcut. More historical explanation of this shortcut's purpose can be found here: https://unix.stackexchange.com/q/137842/85039

Alternatively, consider sending output of the program you use to file and use different TTY to read the contents of that file.

If your University has screen program installed, you can enter copy mode with Ctrl+A + [ . In copy mode, the screen doesn't scroll until you exit it.


Image viewer that allows printing more than 100%


Why is packagekit starting up throughout the day

That isn't PackageKit, but rather is a compatible API in aptdaemon such that things written with the PackageKit API to request installation of packages, and do so on Ubuntu, without having to support a different API.

If you look at /var/log/apt/history.log and find the correlating time for when this call happened, you should be able to see what the transaction was at least. If there is no correlating activity in there, it's likely something requesting a check for updates available to the system.

You could use the dbus-monitor tool in a terminal, filtering on the org.freedesktop.PackageKit service, to see what is making the call.


if you have Windows, just use a cooler, or maybe your laptop simply have physical issue
if you have Ubuntu try to use ATI's drivers, in system settings you have special category for that


Packages installed within a certain time frame

This is a script using aptitude (to be installed) and dpkg logs,
change the date variable, in format YYYY-MM-DD:

#!/bin/bash

export LC_COLLATE=C

date="2011-05-31"

join -22\
  <(aptitude -F%p search '?installed?not(?automatic)' |
    sort) \
  <(less /var/log/dpkg.log* |
    sort |
    awk -v date="$date" '$1 >= date && $3 == "install" { print $1, $4 }' |
    sort -u -k2,2) |
  awk '{ print $2, $1 }' |
  sort