Ubunu 18.04 server, unable to login to server

I don't think what you're trying to do is actually possible with a fresh install.

By default, the root account is accessed by sudo. Password for root is not set in Ubuntu which means the root login is disabled by default. This is good security practice to not permit remote logins to root on your system.

To login, leverage the username and password you provided during the install to login as that user, then sudo su - if you really want to run as root.


Your guess is correct - it is invoked automatically. Usually daily. From here http://manpages.ubuntu.com/manpages/lucid/en/man8/updatedb.8.html


Can I use Ubuntu One to sync data fiies between two remote computers

If the folders are synchronized on both computers, and thus subscribed on both computers, then Ubuntu One will keep them in sync, while they are connected to the service. This is exactly what Ubuntu One is designed and built to do.


How to connect to WiFi from the command line?

I think you want to keep using managed interface (by NetworkManager). nmcli is a command‐line tool for controlling NetworkManager.

To see list of saved connections, use (<SavedWiFiConn>)

nmcli c

To see list of available WiFi hotspots (<WiFiSSID>)

nmcli d wifi list

or:

sudo iwlist <WifiInterface> scanning

To see list of interfaces (<WifiInterface>)

ifconfig -a

Just change <WifiInterface>, <WiFiSSID>, <WiFiPassword> in the following commands to reflect your setup. If WiFi info already saved, easier way using <SavedWiFiConn> name of connection as it was saved in NetworkManager.

Ubuntu 16.04

##disconnect
nmcli d disconnect <WifiInterface>

##connect
nmcli d connect <WifiInterface>

Another way:

##disconnect
nmcli c down <SavedWiFiConn>

##connect
nmcli c up <SavedWiFiConn>

Ubuntu 15.10 & previous

##disconnect
nmcli d disconnect iface <WifiInterface>

##connect
nmcli d wifi connect <WiFiSSID> password <WiFiPassword> iface <WifiInterface>

Another way:

##disconnect:
nmcli c down id <SavedWiFiConn>

##connect:
nmcli c up id <SavedWiFiConn>

If your password isn't automatically recognized type this:

nmcli -a c up <SavedWiFiConn>

Reference: man nmcli


Just type open a terminal and run sudo -H nautilus. It'll open a file browser as root and allow you to edit those files.

Alternatively, you can open a terminal and run sudo chown yourusername /path/to/file.txt. For a folder: sudo chown -R yourusername /path/to/folder.


Problem of display menu until "stop unity-panel-service" command

This behaviour seems to be a wide spread problem introduced with Ubuntu 16.04 and which is not fixed for everyone at this time (2016-12-14).

Check: https://bugs.launchpad.net/ubuntu/+source/bamf/+bug/1532226


Ubuntu 14.04 + Gnome 3.10 = cannot open settings

Firstly, I ran:

sudo dpkg-reconfigure gnome-control-center

It didn't help so i ran this one and it solved my problem:

sudo apt-get -f install --reinstall gnome-control-center

I hope it will help someone in the future.


"General error mounting filesystems" after upgrade to 13.04

May be the upgrade is'nt complete yet.
I find same problem and trying this:

Boot on LiveUSB
mount /dev/sda1 /mnt
chroot /mnt
sudo apt-get update
sudo apt-get dist-upgrade


Font hinting is lost in Chrome-like browsers (for some languages )

The fix:
sudo nano /etc/fonts/conf.avail/69-language-selector-ja.conf

change on line 8 family to lang
<test qual="all" name="lang" compare="contains">

TL;DR:
I began the test with replacing all Ubuntu *.conf files in the /etc/fonts/conf.d directory with Manjaro's to test whether it was  a config bug (I thought it was in the freetype library). New configs worked well. Further investigating revealed that the specific issue is in the /etc/fonts/conf.avail/69-language-selector-ja.conf file. This file had at line 8
<test qual="all" name="family" compare="contains">

which seems to be wrong, since the family was already selected. It should be lang instead. Editing line 8 fixes all the annoyance.
<test qual="all" name="lang" compare="contains">

Hope, it will help some people like me. I filed a bug report in launchpad here. I encourage people to test the bug and click on "This bug affects me" link if this answer helped you.


Iptables is the way to go.
sysctl -w net.ipv4.conf.eth0.route_localnet=1 # to enable redirecting to localhost
EXTERNAL_IP=8.8.8.8 #change this line to reflect external ipaddress
sudo iptables -t nat -A OUTPUT -d ${EXTERNAL_IP} -j DNAT --to-destination 127.0.0.1

Breaking it down

-t nat allows you to refer to 127.0.0.1 as a valid destination.

-A OUTPUT, appends to the OUTPUT chain of iptables. This is a built-in chain. Other built-in chains exist like INPUT, which applies to incoming packets and PREPROCESSING, which applies to all incoming packets before any other bulit-in chain gets to them. You can also make your own chains and append them to one of these built-in chains for better management of your settings.

-d ${EXTERNAL_IP} filters on the destination IP-address of packets going through OUTPUT chain.

-j DNAT sets the target of the rule to DNAT, which allows you to modify destination address of packets.

--to-destination 127.0.0.1 is parameter to the DNAT target that specifies what to change about these matching packets.

You can also limit redirected ports of an address by using --dports ${ORIGINAL_PORT_NUMBER} after -d ${EXTERNAL_IP} and have them re-route to specific port by appending port to 127.0.0.1 like so 127.0.0.1:${FINAL_PORT_NUMBER}.
Removal
use the following to remove from iptables.
# note: -A is replaced by -D
sudo iptables -t nat -D OUTPUT -d ${EXTERNAL_IP} -j DNAT --to-destination 127.0.0.1

and check iptables listings with sudo iptables -t nat -L -n -v where -t nat allows you to look at iptables mappings including ones that pertain to NAT.
Further actions
You may also need to masquerade or redirect packets from your postgres server to match external IP addresses and expected port if you plan to communicate with the application and the application checks source IP address and port.
Related

Using iptables to redirect all traffic to my localhost
solution adapted from this and this.
maybe relevant if you need to communicate with app (iptables solution) and (postgres xinetd solution).
read more about iptables architecture.


How can I configure my mouse side buttons to control volume?Ubuntu 16.04

You can use xbindkeys and xdotool to do this.

Install

sudo apt-get install xbindkeys xdotool

Create a a default ~/.xbindkeysrc

xbindkeys -d > ~/.xbindkeysrc

In the ~/.xbindkeysrc, add these lines:

# Adjust volume with mouse buttons
"xdotool key XF86AudioLowerVolume"
    b:8
"xdotool key XF86AudioRaiseVolume"
    b:9

Start xbindkeys

xbindkeys

The buttons will now adjust volume
In Startup Applications, add an entry to autostart xbindkeys on login:

Name: xbindkeys
Command: xbindkeys_autostart


Check if active java version is open-jdk or oracle

You can write a simple bash script to check this out:

Open any text editor (preferrably vim or emacs).
create a file named script.sh (or any name with the .sh extension).
paste the following code in it:

#!/bin/bash
if [[ $(java -version 2>&1) == *"OpenJDK"* ]]; then echo ok; else echo 'not ok'; fi

save and exit the editor.
Execute the code using bash name.sh (The code return ok if you have a openJDK else not ok).


Internet not working properly in DELL XPS 13 9370

I had the exact same issue on my new Dell XPS, but after looking at the post install scripts for dell-xps-9570-ubuntu-respin and testing to replace the drivers for the wifi-card the problem disappeared.

The exact commands I used:

# Install wifi drivers
mv /lib/firmware/ath10k/QCA6174/hw3.0/* ~/BackupDrivers/.
wget -O /lib/firmware/ath10k/QCA6174/hw3.0/board.bin https://github.com/kvalo/ath10k-firmware/blob/master/QCA6174/hw3.0/board.bin?raw=true
wget -O /lib/firmware/ath10k/QCA6174/hw3.0/board-2.bin https://github.com/kvalo/ath10k-firmware/blob/master/QCA6174/hw3.0/board-2.bin?raw=true
wget -O /lib/firmware/ath10k/QCA6174/hw3.0/firmware-4.bin https://github.com/kvalo/ath10k-firmware/blob/master/QCA6174/hw3.0/firmware-4.bin_WLAN.RM.2.0-00180-QCARMSWPZ-1?raw=true


Is it safe to install Ubuntu 64 Bit 12.10 in EFI mode on Samsung series 7 WIndows 8 laptop?

Is it safe to install any OS on Samsung UEFI Laptops ?

Short answer No

As far back as August 2012 in Launchpad Bugs reports began that installing Ubuntu could brick certain Samsung Laptops. Initially this was seen as an Ubuntu problem or perhaps a wider Linux issue.  However, It has since become clear that this is not a problem with Linux or Ubuntu but a problem with the firmware in some Samsung Laptops.

A report by Matthew Garett shows that this is not limited to Linux but is possible in Windows too.  The original belief was that the samsung-laptop driver was doing something that caused the system to stop working. However while changes have been made to mitigate this; and some people have successfully installed Ubuntu; it does not fix the problem.  It just avoids one way of triggering it.

UEFI is supposed to make it easier to record information on system crashes but appears that this information is causing the problem.  Microsoft have requested that there is 64KB available for this and the problem has been seen with 10KB or less of this space used so it likely that if if Windows crashes this will brick your laptop too.

Samsung laptops in the 300E5C, NP700Z5C, NP700Z7C and 530U3C series are affected and there may be others too as it would seem reasonable that Samsung will want to keep the firmware across its range of Laptops as similar as possible. For the moment I would assume that this bug exists in all there Laptops Using using UEFI. Samsung are working on a firmware update but this has yet to be released.

For now the advice has to be do not install any OS on a Samsung UEFI Laptop.  However there does appear to be a work around by disabling UEFI but that will require you to re-install Windows 8 (if you want Windows on your machine) You should then be able to install Ubuntu or any other OS.

Links:

http://www.bit-tech.net/news/bits/2013/02/11/linux-samsung-deaths-2/1

http://www.bit-tech.net/news/hardware/2013/01/31/linux-samsung-deaths/1

http://www.theregister.co.uk/2013/02/01/linux_samsung_laptop_fix_advice/


Disable Unity switch desktop notification overlay?

Open CompizConfig Settings Manager. If you do not have it installed, you can find it in the Software Center or type this into a terminal: sudo apt-get install compizconfig-settings-manager

In the Desktop section, click on Desktop Wall (or just search for the latter). Under the first tab (Viewport Switch Preview), uncheck the box for Show Viewport Switcher Preview. The overlay should no longer appear.


SSH sometimes is refused on domainname but not on ip

The first problem sounds like a DNS issue. If it works sometimes and not others by DNS name but always works by IP, I'd say there is an issue with your DNS zone. Probably mis-matched name servers.

The second problem is hard to answer without more information. Do you have SSH configured to accept connections on random ports? Is there any kind of firewall in front of it? Do you have a dedicated host or is it part of some shared web hosting plan?


Searching for menu entries in desktop environments other than Unity

What you are talking about is the HUD (Heads Up Display) which is a special feature of Unity. At the moment, there's no other desktop or window manager with this functionality.


USB drive partitions change randomly on boot

One way I found to solve this problem is to use the UUIDs, create a mount point for my USB drive and add a listing to the /etc/fstab file so the USB drive is mounted the same every time on boot up.

I have a Seagate 3TB External USB, so this is what I did:

First, created a mount point for the Seagate drive:

Create one mount point for each partition you want to mount.

sudo mkdir -p /media/Seagate_p1

Then I obtained the UUID for the Seagate partition(s):

NOTE: UUIDs do not change unless the partition gets re-created and / or reformatted.

sudo blkid

Example:

terrance@terrance-ubuntu:~$ sudo blkid
/dev/sda1: LABEL="Seagate Backup Plus Drive" UUID="6AAA4323AA42EB61" TYPE="ntfs"

Added UUID entry to /etc/fstab:

UUID=6AAA4323AA42EB61 /media/Seagate_p1 ntfs default,nofail 0 0

Now, every time my system boots the Seagate drive is always mounted at the same mount point.  However, the drive designations are not always the same, i.e. /dev/sda1 now but next reboot is /dev/sdc1.  So using the UUIDs makes it so the mount points are always the same regardless.

Hope this helps!


How to disable anti aliasing in mesa drivers

You've put your finger on something crucial.  Just mentioning, when developing videogames all anti-aliasing modes disrupt development when using non-Microsoft solutions.  Most standard game development platforms including Unreal Engine and the like have that covered as well as Monodevelop.

Not disabling anti-aliasing will destroy the render of your product on low level system development kits, if that's what you are doing.  Anti-aliasing should be achieved internally to your organization.

Anyways, the best way to answer your question is to check your specific API documentation.

In Unreal?  I don't know.


There are a few ways to do it, here are 2 via the command line:

xinput --set-prop --type=float "AlpsPS/2 ALPS DualPoint TouchPad" "Synaptics Coasting Speed" 0 0

Or the more succinct

synclient CoastingSpeed=0


How do I start a installed tar.xz file that i installed through terminal?

Just decrompress the .xz file.
To do this, you may install xz-utils with

sudo apt install xz-utils

This may not be necessary, but if the following doesn't work, execute it.
Then, decompress it with

tar -xvf data.tar.xz

After that, execute the decompressed file from the .xz file.


modprobe: ERROR: could not insert 'rtl8723be': Exec format error [wifi]

I had the same problem, i used to run make, install, mod....etc commands from the same old directory "rtlwifi_new"(which i downloaded a month ago) .

Try a fresh installation by downloading all files again.


How to Install HP Scanjet 200 on Ubuntu 16.04?

Currently the HP Scanjet 200 has no support for Linux. No open-source or proprietary drivers from HP are available.

Source: http://h30434.www3.hp.com/t5/Scanning-Faxing-and-Copying/HP-ScanJet-200-Flatbed-Ubuntu-Drivers/td-p/4996953


How can I make my systemd service wait for a network interface?

See https://unix.stackexchange.com/questions/257888/systemd-wait-for-network-interface-to-be-up-before-running-service

You should be able have a slightly broken version of what you had in the upstart script with something like:

Wants=sys-devices-virtual-net-tun0.device
After=sys-devices-virtual-net-tun0.device

systemd should generate the tun0 'device' file. The only problem is that if the tun0 device isn't created by openvpn quickly enough, your service start will try to 'start' sys-devices-virtual-net-tun0.device which will result in a timeout failure (by default specified by DefaultTimeoutStartSec as 90 seconds usually in /etc/systemd/system.conf). So it might be best to have something to depend on openvpn and then explicitly check for the tun0 device, restarting if it is not found:

# Wait loosely on openvpn service
Wants=openvpnxxxx.service
After=openvpnxxx.service

# Make sure tun0 is up/active
ExecStartPre=/bin/bash -c "systemctl is-active sys-devices-virtual-net-tun0.device"
# Keep restarting till tun0 is up
Restart=on-failure


Thanks for trying to help!
I don't remember exactly what was prompted at first. When I went to recovery mode, using sudo command gave:
sudo: unable to stat /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

I have no idea of what going on. But I did find a solution from a youtube clip.
https://www.youtube.com/watch?v=y9QxdiqWyjs
Basically, it's running a few commands as follows.
/sbin/fsck -fy
/sbin/mount -wu /
/bin/chmod 1775 /
/bin/sync
exit

Some of them didn't work. Some worked. At the end, I can log back in again without knowing what happened...


Youtube videos suddenly all report "Invalid parameters" and won't play

Maybe you already did but, have you tried "flash-aid" add-on for Firefox? It installs the best option for you. It has solved me problems several times after trying for hours by myself with no luck.


Cannot access Apache start page via "localhost" in web browser

I've added the url to /etc/hosts the issue is resolved. such as (wpfa.dev):

127.0.0.1       localhost
127.0.3.1       wpfa.dev
# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


How do I recursively create a folder inside another non-existent folder?

You can use the command mkdir with -p option to create a folder inside another non-existent folder. Consider an example,

mkdir -p "$HOME/a/b/c/d"

Where the folders a,b,c and d do not exist in home before running the command. After execution of the command all these folders will be created recursively inside one another.

You can see from man mkdir

-p, --parents
          no error if existing, make parent directories as needed


The following woked for me on an Asus x50N. Cheers

STOP_SERVICES=""

to

STOP_SERVICES="networking"

in the file /etc/default/acpi-support


How do I safely install an older/newer version of Python?

Run synaptic(through the application lens in unity or System -> Administration if you are using classic desktop )

search for python 2.6 in the filter at the top and mark it for installation by right clicking it, and selecting "Mark for Installation".

It should run alongside 2.7 fine as far as I'm aware, now when you need to use 2.6 invoke it directly, i.e with the command "python2.6 "

This should work, let me know if it doesn't though. :)


Does Ubuntu work properly on a laptop HP Pavilion 15 -CD006LA?

Generally there are not problems with Ubuntu. In my personal experience I only had a problem, with skylake architecture of Intel. It was solved coping two works in kernel line. I left behind others OS because of Ubuntu.


How to prevent commands being removed from history?

I asked something quite similar in Unix & Linux: How to undo changes in the commands-history?.

The great answer I got from Gilles says:

  As long as you've edited a history entry but not pressed
  Enter yet, to go back to the original entry, repeatedly
  press Ctrl+_ — the undo command — until it
  doesn't make any further change. You're back to the original entry.


How do I check only security updates from the command-line?

My question is just about detecting the availability of security updates

Yes, that's doable with the caveat that the normal apt-get update will do a full refresh when you next run it (20 MB means it's doing that anyway).

sudo sh -c 'grep precise-security /etc/apt/sources.list > /etc/apt/secsrc.list
And if you then run the following, you'll see if there are any security updates available (sample output):

sudo sh -c 'apt-get -o Dir::Etc::sourcelist="secsrc.list" \
-o Dir::Etc::sourceparts="-" update && \
apt-get --assume-no upgrade'

This tells apt-get to temporarily use the special security-only sources list, and then runs upgrade, automatically answering no.
If there are any, run proper apt-get update (which will do a full refresh), and then upgrade.
You could make the above a bash script with a simple grep/exit code check at the end if you don't feel like parsing the apt-get output :)


Slow boot after upgrade ubuntu 16.04 to 18.04 LTS

If you are using Network Manager, try replacing it with Wicd. Reboot the system, uninstall network-manager, configure Wicd and enjoy.


Ubuntu 15.04: GUI disappeared after trying to install nvidia drivers

"Ubuntu 15.04 seems to have an issue with nvidia drivers." This is a common problem...

First, lets get Ubuntu to a 'clean' state, without any nvidia drivers installed:

sudo apt-get purge $(dpkg -l | awk '$2~/nvidia/ {print $2}')

Next, let's remove the x-server error - follow this guide.

Now, we'll try to set up the Nvidia GT 630 drivers:

sudo apt-get install nvidia-304 nvidia-304-updates

If it still doesn't work, then try upgrading your kernel

sudo apt-get install linux-generic

And try again...

You can install the latest NVIDIA drivers by adding the new PPA to your system.

To do so:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update && sudo apt-get install nvidia-355

And as OMG! Ubuntu! say:
Remember: if the PPA breaks your system you are allowed to keep both halves. ;D


Change Dekstop Resolution to 1920 x 1080

A TV is a bad choice for a monitor as most TVs don't provide correct resolution frequencies in hardware.

On Windows, this is fixed by hard-coding the resolutions into the drivers, but on Ubuntu, you need to fix this yourself manually or update the TV's firmware... (and complain when the firmware doesn't fix it and wait...)


Xubuntu 13.10: No hibernate button on logout dialog

OK, found a workaround, included in this bug report, kidly filed by the generous Urs Fleisch.

Make a file with nano, leafpad, or some other text editor

  /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

with the following contents:

  [Re-enable hibernate by default]
  Identity=unix-user:*
  Action=org.freedesktop.login1.hibernate
  ResultActive=yes

Note that the action must be "org.freedesktop.login1.hibernate" and not "org.freedesktop.upower.hibernate" as described in Ubuntu's instructions for 12.04 hibernation.


There are many possible causes for performance issues, but for optimization in general i recommend using a Profiler. There is some discussion going on here

Personally i use XHProf/XHGui and did not try the others that much.


Me TV (available in software center)

Me TV is a digital television viewer for GNOME.
Me TV was developed for the modern digital lounge room with a PC for a media centre that is capable of normal PC tasks (web surfing, word processing and watching TV).


Kubuntu 20.04 desktop wallpaper always displays only 1/4 of screen

Maybe this is more of a question to post on the KDE Forum. What is your KDE version? My Kubuntu 20.04 Display Configuration menu has the option to save the settings for a 'For only this specific display arrangement' or 'For any display arrangement'.
Have you tried tweaking those settings? Do you actually change the displays or have multiple monitors?


cat ~/temp_minhakey.pub >> ~/.ssh/authorized_keys

appends the contents of ~/temp_minhakey.pub to ~/.ssh/authorized_keys, it does not overwrite it. This is safe.

You might be confused with a single > which overwrites the file. The next command will overwrite your authorized_keys file:

cat somefile > ~/.ssh/authorized_keys


I think you should try xboard or pychess!
xboard

XBoard is a graphical user interface for chess in all its major forms, including international chess, xiangqi (Chinese chess), shogi (Japanese chess) and Makruk, in addition to many minor variants such as Losers Chess, Crazyhouse, Chess960 and Capablanca Chess. It displays a chessboard on the screen, accepts moves made with the mouse, and loads and saves games in Portable Game Notation (PGN). It serves as a front-end for many different chess services, including:

Chess engines that will run on your machine and play a game against you or help you analyze, such as GNU Chess, Crafty, or many others.
Chess servers on the Internet, where you can connect to play chess with people from all over the world, watch other users play, or just hang out and chat.
Correspondence chess played by electronic mail. The CMail program automates the tasks of parsing email from your opponent, playing his moves out on your board, and mailing your reply move after you've chosen it.

XBoard runs on Unix and Unix-like systems that use the X Window System.

(quoted from http://www.gnu.org/software/xboard/)

You can install it via terminal
sudo apt-get install xboard

or via Ubuntu software center (search for "xboard")

pychess

PyChess is a gtk chess client, originally developed for gnome, but running well under all other linux desktops. (Which we know of, at least). PyChess is 100% python code, from the top of the UI to the bottom of the chess engine, and all code is licensed under the Gnu Public License.
The goal of PyChess is to provide an advanced chess client for linux following the Gnome Human Interface Guidelines. The client should be usable to those new to chess, who just want to play a short game and get back to their work, as well as those who wants to use the computer to further enhance their play.
Features:

Reads and writes PGN, EPD and FEN chess file formats; using the open dialog you can preview and open any position of any game contained in a PGN file and choose the player to play either side

(quoted from http://pychess.org/about/)

You can install it via terminal
sudo apt-get install pychess

or via Ubuntu software center (search for "pychess")

(I'm no chess expert but I googled it a bit. eboard could work too.)


I'm new in Ubuntu and want to know about support lifespan

Your system will remain usable after 9 months, of course, but it will no longer receive bug fixes and security updates, which could leave it vulnerable to security attacks. You should upgrade to 16.04 when it is released, or soon afterwards.


Use horizontal scroll to switch workspace with Compiz

xSwipe should be able to help you. It is able to bind several multi-touch gestures to keybindings (like CTRL+ALT+arrow_keys).

There is one issue with it that is uses older synclient and requires option -m to be availible. Fix to that is to install forked synaptic drivers (instructions)


Firefox 7 starts with an empty "Alert"-Window and browsing does not work

I just googled the whole text from the "Alert-Window" as quoted above and google pointed me to a support page from Mozilla. There you will find 4 solutions to get rid of this problem.

In my case the file cert8.db in the Mozilla Profile folder was corrupted. I deleted it while firefox was closed and started firefox. Èt voilá firefox started without complaining.


Trying to remove chromium getting and getting read only file system error

That's the wrong way to uninstall a snap, as you have discovered.
Try sudo snap remove chromium instead.

Pro Tip: You shouldn't be using rm with ANY files that were installed by a package manager. Doing so is an easy way to break your system quite badly. Always use the appropriate package manager to uninstall software.


This workaround works for me (after a quick test)

function gvim () {
    `which gvim` $* &> /dev/null
}


Ubuntu freezes when it gets locked while playing video on fullscreen

A way to prevent Ubuntu from fading out and locking the screen is a small application called caffeine-plus. It is available from a webupd8 repository.

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install caffeine-plus


The refresh of these applications could be stuck, which would prevent new refresh attempts to start. Type this into your terminal: snap changes. So long as you have a refresh taking place in some state, you might see something like:
ID   Status   Spawn                     Ready  Summary
99   Undoing  yesterday at 09:15 +0900  -      Auto-refresh snap "{name}"

From there you can try to abort the in-progress update with:
sudo snap abort 99

Be sure to change 99 to whatever value you see in ID.
Once this is done, you may be able to perform a sudo snap refresh to manually refresh all of your snaps.
Hope this helps.


One known bug that could be affecting you is this: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/1003842

Try disabling the local forwarding nameserver. In NetworkManager.conf

gksudo gedit /etc/NetworkManager/NetworkManager.conf

or

sudo gedit /etc/NetworkManager/NetworkManager.conf

comment out the line dns=dnsmasq

#dns=dnsmasq

and save the file and restart NetworkManager.

sudo restart network-manager


pdf2djvu conversion of all files in a folder

-o is output options. Output filename should follow after it. So this works for me:

for file in *.pdf; do pdf2djvu -o "$file.djvu" "$file"; done


restricted-extras available in ubuntu 12.10 demo version

Ubuntu uses several repositories and even ppa to package programs.

See https://help.ubuntu.com/community/Repositories/Ubuntu

https://launchpad.net/ubuntu/+ppas

As with an installation, all these packages are available when running a live CD/USB. The "problemes" you might have are that anything you install will be lost when you reboot and you might run out of space if you install a lot of packages or update.

To install restricted extras , see

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

There is even a link you simply click to install

  If you are using regular, stock Ubuntu: Click here to install the ubuntu-restricted-extras package


How do I get the Brother DCP-135C scanner to work?

According to Brother FAQ you may need to copy files from /usr/lib64/ to /usr/lib/.


Internet through WiFi, LAN through ethernet

You have to manually set default route or through Network Manager or via CLI.

The 2 network should have different subnet, i.e.
wlan0 192.168.0.2/24
lan0 192.168.1.2/24

With CLI you can try removing the default lan0 gateway like this

route del default gw 192.168.1.1 dev eth0

Then add the default gateway for wlan0

route add default gw 192.168.0.1 dev wlan0

Remember to check the dns in /etc/resolv.conf

All commands should be run by root.

Sorry if too short but wrote from cell phone


How do I symlink certain directories in /home to an SSD?

You can do it from a Live CD, but if you logout from a graphical session and switch to a virtual console using Ctrl + Alt + F1, you'll be able to move the folders too.

Your steps are correct, some expansion below:

Switch to a virtual console and login
Mount the SSD if needed, that can be as easy as:

sudo mkdir /media/ssd-store
sudo mount /dev/disk/by-label/YOUR-SSD-NAME /media/ssd-store

You can use tab-completion after /dev/disk/by-label/. This only works if your partition has a label, otherwise you need to replace it by /dev/sdXY
create a folder that holds the files from home:

sudo mkdir -p /media/ssd-store/home/jorge

If you've a custom umask setting like 0027, you need to sudo chmod 755 /media/ssd-store. You can check your umask setting by running umask (defaults to 0022)
Change the ownership if needed, so the user can always create more symlinks if needed:

sudo chown jorge: /media/ssd-store/home/jorge

Move the files (add sudo if you do not own /media/ssd-store/home/jorge):

mv /home/jorge/.config /media/ssd-store/home/jorge/

Create the symlink:

ln -s /media/ssd-store/home/jorge/.config /home/jorge/

Notes on the above: you should add an entry in /etc/fstab for automounting the SSD. Use sudo blkid to determine the UUID for your SSD partition and add the next line to /etc/fstab:

UUID=[uuid] /media/ssd-store ext4 relatime,errors=remount-ro,discard 0 2


I have read this comment. Is this possible? hehe.

Believe it or not its the text output.

open a terminal and run:

sudo vi /etc/default/grub

change the line:

GRUB_CMDLINE_LINUX_DEFAULT=""

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet"

run:

sudo update-grub2

It shaved 10 seconds off my 15 second boot time.


You can change the Output driver in SMplayer to the Nvidia vdpau driver.

Open SMplayer and go to Options > Preferences > Video and change the Output driver to vdpau.


Mount my OSX Partition manually and read only

Core Storage is a logical volume management system OSX. Is the basis for Apple's Fusion Drive technology, which presents several partitions on multiple drives as a single logical volume.

The libfvde package contains a library and applications to read the FileVault Disk Encryption volumes, it contains the following tools:     fvdeinfo, which shows information about FVDE Volumes, and fvdemount, which FUSE mounts FVDE Volumes.

How to build: https://github.com/libyal/libfvde/wiki/Building

How to mount partition: https://github.com/libyal/libfvde/wiki/Mounting


Firefox is freezing Ubuntu, how should I go about debugging it?

I had a similar problem. It is weird, but when I deleted the browser history (more than 2 GiB data) the problem went away and has not come back.

I know it sounds crazy but it helped me. I am not sure if it helps you, but I am sharing solution that which solved problem with Ubuntu freezing while using Firefox.


I can't run applet on my firefox browser

Default settings of java control panel is "High". Current security policy of java will never let you run java untrusted applets using a browser. Only applets having a certificate and proper permissions attribute can be ran on a browser.

To test an applet you can use IDE like eclipse or netbeans, that you already did. Other way is appletviewer. It comes with  Java Develop Kit. To use it you need to write a sample html file.

You can run the applet using the html file from a terminal as,

appletviewer /path/to/sample.html

Content of sample.html

<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<body>
    <applet width=300 height=300 code="Appletname.class"> </applet>
</body>
</html>

Here I am assuming your applet name is Appletname.class and it is in the same directory as sample.html. Your applet viewer window size would be 300x300.

How to run applets with firefox

Update your jdk, latest is jdk-7u51
Install/Enable java plugins for firefox, check plugin here
[Never recommend, Do it at your own risk] Open Java Control Panel, Keep your security settings to Medium, it will allow all applications to run except applications that request all permissions.[source]


This is what worked for me using x11vnc:

So apparently Ubuntu 17.10 uses GDM3 and/or Wayland display managers thus there is some compat issues with Wayland.

Do the following:

apt-get install x11vnc
sudo x11vnc -storepasswd
<Enter Password; Saves to ~/.vnc/passwd>

xauth
<Generates .Xauthority file at /run/user/1000/gdm/Xauthority>

nano /etc/gdm3/custom.conf
<Uncomment/Change line to "WaylandEnable=true">

<Logout -> click gear -> select the "Xorg" option>
<Login>

x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth ~/.vnc/passwd -rfbport 5900 -shared
<Or whatever you need>

And Voila... Now to automate some things


How to close all the ports in ubuntu except those I need them

You can use nmap to show you all open ports.

Open a terminal and install the nmap application:

sudo apt install nmap

The nmap man pages can be brought up using man nmap which can show you all the commands you can use after it is installed.

After it is installed, you can scan all the ports that are open on your host with the -p switch of nmap like the following (I set it to scan all ports from 1 to 65535):

terrance@terrance-ubuntu:~$ nmap -p1-65535 10.0.0.100

Starting Nmap 7.01 ( https://nmap.org ) at 2016-10-29 23:28 MDT
Nmap scan report for terrance-ubuntu.local (10.0.0.100)
Host is up (0.00025s latency).
Not shown: 65522 closed ports
PORT      STATE SERVICE
21/tcp    open  ftp
22/tcp    open  ssh
25/tcp    open  smtp
139/tcp   open  netbios-ssn
445/tcp   open  microsoft-ds
902/tcp   open  iss-realsecure
1936/tcp  open  unknown
10000/tcp open  snet-sensor-mgmt
17500/tcp open  db-lsp
32400/tcp open  unknown
32469/tcp open  unknown
33400/tcp open  unknown
33443/tcp open  unknown

You can kill the process that has the port open like webmin (or port 10000) on my list, or you can use iptables to create a simple rule to DROP the packets to that port for the time being until next reboot  (If you want them permanent you might want to install the iptables-persistent package):

sudo iptables -A INPUT -p tcp --dport 10000 -j DROP

Then if you want to add it back for this session, delete the rule:

sudo iptables -D INPUT -p tcp --dport 10000 -j DROP

Examples below:

terrance@terrance-ubuntu:~$ sudo iptables -A INPUT -p tcp --dport 10000 -j DROP

terrance@terrance-ubuntu:~$ nmap -p1-65535 10.0.0.100
Starting Nmap 7.01 ( https://nmap.org ) at 2016-10-29 23:49 MDT
Nmap scan report for terrance-ubuntu.local (10.0.0.100)
Host is up (0.00028s latency).
Not shown: 65522 closed ports
PORT      STATE    SERVICE
21/tcp    open     ftp
22/tcp    open     ssh
25/tcp    open     smtp
139/tcp   open     netbios-ssn
445/tcp   open     microsoft-ds
902/tcp   open     iss-realsecure
1936/tcp  open     unknown
10000/tcp filtered snet-sensor-mgmt
17500/tcp open     db-lsp
32400/tcp open     unknown
32469/tcp open     unknown
33400/tcp open     unknown
33443/tcp open     unknown

Nmap done: 1 IP address (1 host up) scanned in 4.13 seconds

terrance@terrance-ubuntu:~$ sudo iptables -D INPUT -p tcp --dport 10000 -j DROP

terrance@terrance-ubuntu:~$ nmap -p1-65535 10.0.0.100
Starting Nmap 7.01 ( https://nmap.org ) at 2016-10-29 23:49 MDT
Nmap scan report for terrance-ubuntu.local (10.0.0.100)
Host is up (0.00027s latency).
Not shown: 65522 closed ports
PORT      STATE SERVICE
21/tcp    open  ftp
22/tcp    open  ssh
25/tcp    open  smtp
139/tcp   open  netbios-ssn
445/tcp   open  microsoft-ds
902/tcp   open  iss-realsecure
1936/tcp  open  unknown
10000/tcp open  snet-sensor-mgmt
17500/tcp open  db-lsp
32400/tcp open  unknown
32469/tcp open  unknown
33400/tcp open  unknown
33443/tcp open  unknown

Nmap done: 1 IP address (1 host up) scanned in 4.10 seconds

Hope this helps!


I have the same issue, you can slow down the pointer speed by copy and pasting this into a terminal

xset m 3/2 5

How it works

from man xset

   mouse   The  m option controls the mouse parameters; it may be abbreviated to 'm'. Of course, it applies to most pointing devices, not just
           mice. The parameters for the pointing device are `acceleration' and `threshold'. The acceleration can be specified as  an  integer,
           or  as  a simple fraction. Threshold is just an integer. The setting is applied to all connected pointing devices. xinput(1) should
           be used if you need device-specific settings.


Microsoft TechNet explains this better that I ever could. So much for "Simple". Thanks, Microsoft.

You probably have just one regular partition on the disk. You can check this with GParted - if the partition shows up normal, the filesystem type is detected, and the correct amount of used space and disk usage is displayed, that that is the case. You can feel free to install Ubuntu alongside Windows. Otherwise, you will have to repartition Windows somehow.

You can use a third party tool to mount the Linux partition in Windows, but otherwise Windows will be unable to get any information whatsoever from the partition other than that it's there. However, Linux will see and use the Windows partition.


How should I Change Permissions (Dirs & Files) recursively in an mp3 external hard drive?

That's because the NTFS filesystem doesn't support unix-style permissions natively.

In reality Ubuntu and other linux-based distributions are using FUSE to provide a virtual support for this kind of restricted access to the filesystem, in practice you should set this permissions when you mount the HDD, I don't know if there is a GUI or an app in Ubuntu to manage FUSE, but usually it's an fstab-only kind of thing.

more on the subject


Black screen during installation on a Dell Latitude E6510

I have exactly the same problem on my machine, but I figured out that if you select F6 ->> then "x" mark the noraid and nomodeset it will boot and install, but the problem starts after the install completes. I still get the same black screen again. I am not a linux user but I think it has something to do with Graphics Adapter.


How do I disable Xfce display power management in xubuntu 16.04 at the command line?

dpms is the Display Power Management Signalling.  For the xfce4-power-manager to disable it is a simple command mainly just to quit it.

xfce4-power-manager -q

To re-enable xfce4-power-manager it is:

nohup xfce4-power-manager & 2>&1 >/dev/null

To disable the dpms run the following command:

xset -dpms

To enable dpms it is just the opposite:

xset dpms

Hope this helps!


Ubuntu mute sound when laptop lid closed

TL;DR: excution environment is different, hence amixer command returns an error

  The script seems to be called when suspending as new lines are being appended to the "test" file

Yes, it runs, but I've tested your script and the amixer command returns an error (reviewed with sudo journalctl -b -u systemd-suspend.service):

Jan 04 18:46:49 administrator-PC systemd-sleep[12969]: ALSA lib control.c:1373:(snd_ctl_open_noupdate) Invalid CTL pulse
Jan 04 18:46:49 administrator-PC systemd-sleep[12969]: amixer: Mixer attach pulse error: No such file or directory

The issue appears to be the -D pulse part. But simpler command amixer -q set Master mute works. After resume my laptop has the volume muted, error no longer appears.

  twice - which might indicate that the script also runs on resume - can someone confirm this assumption?

Yes, the script runs twice - once on suspend and once on resume; the scripts run with two positional parameters per systemd-sleep(8) and Arch Wiki article. The full script I've used is listed below (note, the parts which call echo and date aren't particularly relevant and were for debugging only; they may be safely removed from the script):

#!/bin/sh

# this will go into journalctl log
echo SUSPEND SCRIPT STARTED
case $1/$2 in
  pre/*) amixer -q set Master mute; { echo Suspending; date >> /suspend_log.txt;}  ;;
  post/*) { echo "Waking up from $2..."; date;} >> /suspend_log.txt ;;
  *) echo foobar;;
esac

As for the reason why the original amixer command works when you run it manually, likely stems from the fact that when systemd runs the script, there is no DISPLAY variable present in environment. By contrast when you use a GUI terminal emulator the variable is present, hence the original command works. The original command can be adapted to use the environment variable via

DISPLAY=:0 amixer -q -D pulse sset Master mute

but I'd still recommend using amixer -q set Master mute as environment-independent command.


It appears to be the NVIDIA drivers.

See this post + answer for troubleshooting:
NMI watchdog: BUG: soft lockup - CPU#2 stuck for 23s! [nvidia-smi:566] and
https://askubuntu.com/a/934850/949723:

At startup, edit the Grub menu entry and append the kernel parameter "nomodeset" or modprobe.blacklist=nouveau to the existing parameters quiet splash.

So I edited the file /etc/default/grub, and edited the GRUB_CMDLINE_LINUX_DEFAULT line to this:

GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"

Afterwards I ran sudo update-grub. That's it, 8 seconds the boot time, no beep sound, I am so happy, no CPU stuck on journalctl anymore! :)

Warning! Adding "nomodeset" permanently to /etc/default/grub will disable NVidia drivers. This option is useful only if the system doesn't boot correctly with Nouveau.

After you install the NVidia drivers, this parameter should be removed.


What command for showing disk usage of specific directory non recursive?

Excerpt of du --help:

-h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)
-S, --separate-dirs   do not include size of subdirectories
-s, --summarize       display only a total for each argument

Running:

du -Shs /path/to/dir

should give you what you want.


Did you try to enable USB 2.0  as in this photo


Ubuntu guest 15.10 and 14.04 font rendering issue on a high-resolution monitor

Have you tried running it on full screen or seamless instead of scaled (Virtual Box Settings, not Ubuntu settings)?

If you are still getting badly scaled fonts when running full screen, see the following link and try changing the hinting and anti-aliasing options.

How do I change fonts and adjust their size?

*Edited to remove Vbox guest additions question as I saw your edit

EDIT # 2

What is the version of VBox that you are running. Looking at their forums, quite a few versions have had issue with DPI settings affecting fonts.

Edit # 3

"Final thing I can suggest, it works on some hosts/guest combinations. Set 3D Acceleration to ON but put the video memory as low as it will allow you."

And for the resolution issue try this from the terminal with your desired resolution instead of 1920x1080

  VBoxManage setextradata global GUI/MaxGuestResolution 1920,1080

EDIT 4

posting update of what worked for top poster,

From VM Menu - > View > Scale Factor > 100% (or 200%


How do I install Archiva as a package (apt-get)?

first install tomcat; follow a tutorial on how to install apache2 and tomcat6 or 7,
you can install these VIA apt-get,
then navigate to localhost:8080/manager/html
download the .war version of archiva
log into the tomcat manager interface VIA the url provided,
at the bottom of the page it'll ask you to upload a war file, upload it now, then select deploy.

it will take about a minute and the page will refresh. then you can go to localhost:8080/archiva

if you know more about apache you can change the web address.

If it fails to start, monitor the logs with

sudo tail -f /var/log/tomcat6/catalina.out


Lubuntu 16.04 isn't properly shutting down

I have Lubuntu 16.04.1 LTS

STEPS I DID TO SOLVE

Press CTRL + ALT + T
In terminal type sudo xedit /etc/modprobe.d/blacklist.conf
At the bottom of the file add:

blacklist dw_dmac
blacklist dw_dmac_core

Save and Quit
Type sudo xedit /etc/default/grub
In the line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" erase quiet
splash
Save and Quit
Run sudo update-grub
Reboot once

I did it and the PC now can PowerOff/Reboot/Suspend and everything.

Notes: This worked for ACER E-11 with previous Windows8.1 and now with Lubuntu 16.04.1 LTS.

Cons: During Start or ShutDown the computer will show only console, but it'll work.


Try installing vim:

sudo apt-get install vim

or you can use a different text editor, like nano, which may be easier to use:

nano env_vars


What is mms protocol and how do I enable it?

https://en.wikipedia.org/wiki/Microsoft_Media_Server

Try audacious or parole for playing mms streams in Ubuntu 18.04.

With some player (such as VLC) you might have luck, if you replace "mms" by non-standard "mmsh" in URI.

Note: Starting of playing mms stream might be slow by audacious: bug report


Why do you see 'removing additional packages' during the Ubuntu installation?

TLDR; It's basically just a apt-get autoremove performed after installation.

Here's what happens on installation time using a desktop installer (this answer is not valid for server or alternate installers):

A sort of preinstalled Ubuntu image (/casper/filesystem.squashfs on the CD) is extracted onto your hard drive. It's like taking a shortcut, because it's all in a predefined state and does not require all packages to be installed one by one (opposed to the debootstrap process in the server/alternate installers).
After extraction of the image, the installer chroots into the target and will apply all changes you entered during installation: user account, language, timezone, etc. It will then also apply updates.
The state of the target filesystem (almost finished installation) after all this will probably result in some packages not needed for your system. E.g. older kernel that is not applicable anymore due to updates, or you didn't choose to use LVM so all packages related to that can be removed. (this is just hypothetical - I did not check if this actually performs the removal of LVM.) It's not much different from applying a large stack of package updates that result in some packages removed using apt-get autoremove.


How do I connect to a PEAP encrypted wifi connection?

PEAP should be available out of the box. There are however a lot of configurations available, though your network manager should figure this out on its own.

If you would happen to be using eduroam, here's how mine is configured:


What is the meaning of : "git+https://github.com/...."?

A URL like git://github.com will mean just the plain Git protocol. To clarify that it should use Git over HTTPS instead, the protocol is written git+https. Now, git itself does not need this, you can do just git clone https://....

For other tools like pip, which can handle many protocols, https://... will indicate that it should do just a GET request for that URL, and git:// would indicate that it should attempt to clone the repo with the plain Git protocol. git+https is used to indicate that it should clone the repo over HTTPS (just as git+ssh is used to indicate it should do so using SSH).


Grub rescue - error: unknown filesystem (all deviations are broken)

I had a 60GB hdd dual booting WinXP and Mate 16.04 perfectly (and painfully slowly). Last week I updated my system to a new 250GB ssd with Windows 7 and Mate 18.

Windows booted just fine, but after the installation of Mate. I got into the exact same situation as you are now.

So, I solved my problem by changing my SSD to a smaller (capacity) model.

I did so because some older partitioning software reported an incorrect SSD size. So, I suspected that I had some BIOS compatibility issue with the bigger SSD.

Now, my system dual boots just fine, with the smaller 128GB SSD.

Hope it helps!
JamMedSyS


How to configure access to Yandex Disk with GUI?

1. Installation of CLI daemon
First of all we need to download CLI-based official Yandex.Disk client from their repository:
cd ~/Downloads
wget http://repo.yandex.ru/yandex-disk/yandex-disk_latest_amd64.deb
sudo apt-get install ./yandex-disk_latest_amd64.deb

Note: the commands above will add the corresponding APT repository to the system to keep Yandex.Disk updated.
For authorization from terminal run yandex-disk token username (where username is your actual username) command and follow its instructions.
2. Installation of GUI indicator
Then to have GUI indicator we need to add special PPA to the system:
sudo add-apt-repository ppa:slytomcat/ppa
sudo apt-get update
sudo apt-get install yd-tools

Finally we can launch the Yandex.Disk Indicator from Applications→Internet menu and follow steps of the wizard. Sometimes wizard need to run twice.
The wizard will create ~/Yandex.Disk folder (default) and will launch indicator in the tray to inform user about updates and to communicate with daemon:

(*) Accessing Yandex.Disk from file manager
For systems without special Yandex.Disk client we have to use Caja file-manager:

Create application-based password on the corresponding page of Yandex.Passport

Open Caja, select Connect to Server and set:

Server → webdav.yandex.ru;
Type → Secure WebDAV (HTTPS)
provide Username (without domain) and application-based Password

and click Connect.
Note: optionally: you can use it directly by pressing Ctrl+L and writing davs://webdav.yandex.ru in the location bar and provide username with application-based password.


Just moved to Gnome on Ubuntu 18.04, how do I make activities always visible?

Figured it out, install Gnome Tweak Tool and enable the Ubuntu Dock.

sudo apt-get install gnome-tweak-tool

Inside the Tweak Tool set-up go into Extensions, then scroll down to Ubuntu Dock.


what can be done if shortcuts stop working?

Go to settings-->keyboard-->Shorcuts.From there you can setting it back.

As an example for Lock. In Shortcuts go to System and Click Lock Screen and set the combination back by pressing the combination key.


Skype has introduced a cloud-based group chat system, which requires Skype 4.3. Possibly that has something to do with it.


Audio not working on new install of 11.10

I had a no audio issue that was because I installed from alternate and it didn't pull in all the alsa stuff.  I also had a 'some flash videos have no audio' problem that had to do with a hosed ffmpeg h264 decoder.

You could try un-installing and re-installing ubuntu-restricted.  For the uninstall you should also autoremove.  That should do it if there's not an overlooked dependency.


Brightness control missing when using Nvidia drivers but re-appears with X.Org

Run:

sudo nano /etc/default/grub

then add:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"


I have foud this solution:

sudo gedit /etc/modprobe.d/blacklist.conf

Add a line at the very end:

  blacklist acer_wmi

sudo gedit /etc/rc.local

Add one line above "exit 0":

  rfkill unblock all

(reboot)


HUD keeps popping up when watching movie in movie player

Totem has a unique feature that it activates Alt every 30 seconds to prevent the screen from going black. But since HUD is triggered by Alt key as well, you see the HUD popping up as you watch the movie.

Possible things you can do to resolve this:

Use another media player other than Totem. But since you don't like VLC, we shall neglect this option.
Disable HUD or change the key that triggers HUD.
Or upgrade Totem's version to 3.5 or later as this "bug" has been fixed in that version. But, I wouldn't recommend that option.

A bug report has already been filed regarding this.

How do I subscribe to a bug?


There's a bug filled into launchpad which describes and solves this problem.

In summary, the quota module (and others) was removed from the virtual kernel. If you are in a Virtual Machine or aws-EC2 this should be your problem.

The solution

On Oneiric and Precise install linux-image-extra-virtual package.
On old versions the modules should be already patched into kernel (just update your system).

After that run modprobe quota_v2 and modprobe quota_v1 in order to get ready to run quotas. Also remember to put the modules on /etc/modules.

Run your quotaon command as usual.


The Public folder is one of the default folders from xdg-user-dirs. It may be used by programs for files you want to share with others.

If you want to remove that folder you also need to change the file $HOME/.config/user-dirs.dirs: Replace the line

XDG_PUBLICSHARE_DIR="$HOME/Public"

with

XDG_PUBLICSHARE_DIR="$HOME"

Otherwise the folder will be recreated the next time you log in.


You can use cd - to go back to your previous location, no matter where that was.


How to make custom shortcuts to open or create any app

Requirements

App or command

Install all of these like sudo apt install wmctrl

xprob
greb
wmctrl

Information

WM_CLASS info of the app.

Instructions

Creating WM_CLASS for any app

To do this, you need to make desktop app.

Type sudo -H gedit /usr/share/applications/<appname>.desktop
And fill these section what you want to do, I suggest you to look these post

#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Appname
GenericName=Appname
Comment=
Exec=
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
Icon=
Categories=
Keywords=
X-Ubuntu-Gettext-Domain=
StartupWMClass=

Getting WM_CLASS of any app

First type terminal to find WM_CLASS of any app xprop | grep WM_CLASS
After ENTER, click the app, which you want to make shortcut for
You will see a return like WM_CLASS(STRING) = "gnome-terminal-server", "Gnome-terminal"
Copy first string which is gnome-terminal-server with CTRL + SHIFT + C

Making shortcut

Open shortcuts with typing shortcut to search panel
Click + icon the bottom of the opened window
Set any name which u want to name section
Type bash -c "wmctrl -xa <wm_class> || <wm_class> to command section
Finally, click shortcut and set your custom shortcut :)


The Software Center may not always work 100%, try using another program like synaptic (GUI, easier to use), or aptitude (terminal, but with menus, "semi-gui", CTRL+T opens the menu, then arrows, or mouse clicks might work), or the command line tools like:

apt-cache search "nvidia"

For me a partial output is:

$ apt-cache search "nvidia"
dmraid - Device-Mapper Software RAID support tool
conky-all - highly configurable system monitor (all features enabled)
xserver-xorg-video-nouveau - X.Org X server -- Nouveau display driver
ubuntu-drivers-common - Detect and install additional Ubuntu driver packages

and after finding some packages (name is the first part, before the "-") a closer look with:

apt-cache show <packagename>

And install with

sudo apt-get install <packagename>

Did you change any Software Repositories? That can cause strange errors sometimes. These links might be useful about changing/resetting them:

Ubuntu Community Help Wiki - Repositories
Ubuntu Community Help Wiki - Repositories in Ubuntu
Answer on Restoring Default Ubuntu Repositories (sources)


Make recipients field of Thunderbird just one line high

Try this Add-on:
https://addons.mozilla.org/en-US/thunderbird/addon/address-widget-lines/

Found the link in a Mozilla bug about this issue:
https://bugzilla.mozilla.org/show_bug.cgi?id=425451


As you need your WiFi card to connect to the Internet, and you have no wired capabilities, you basically have 3 possibilities:  Two are technical and one is not.

Buy an additional WiFi USB dongle that is Linux compatible and has AP (=Access Point) capabilities.  Be careful to mention both capabilities when you buy the card so that you can return it if it's not.
Set the dongle up as an access point and have both your phone and tablet connect to it.
If dad has been smart, he has whitelisted your laptop and this trick will not work.  If not, he has blacklisted both your phone and tablet.  You just have to go to Android Enthusiasts and ask "How to allow MAC address spoofing on my xxx" where xxx is the type / model / OS of your phone and tablet.
Instead of looking for ways around your punishment, you should accept your fate, be nice to dad and ensure this doesn't happen again!  Start by printing off this Q&A, go to dad and say "I'm sorry!"

;-)


Any good utilities for upgrading Kernel for Ubuntu 16.04 LTS?

Have you tried installing the Ubuntu hardware enablement stack?
sudo apt-get install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04

This will give you a 4.15 kernel and update the xserver. More details to be found here: https://wiki.ubuntu.com/Kernel/LTSEnablementStack


ubuntu 20.04 not getting locked after lid close

Yes, changing the display manager to GDM3 worked for me as well.  It was as simple as:
sudo apt-get install gdm3

During the install process a screen pops up that allows you to choose GDM3 instead of LightDM.  Choose GDM3!
Before that though, I made several failed attempts to install other display managers such as SLIM, CDM, XDM, etc.  I spent hours trying to "compile" and "make" (a bit over my head) and they were all dead ends.


Ignore the warning, as I get the same message even though I do have the latest version of Flash installed- what version - as I'm at work and do not have my computer I do not remember.


Installing Trackmania 2 using PlayOnLinux

I don't understand why the answer was deleted. It was correct ! The new version of Trackmania 2 uses DirectX 11 which is not yet implemented in wine: see https://forum.maniaplanet.com/viewtopic.php?f=9&t=40918&hilit=wine for more details. The old version of Trackmania 2 used DirectX 9.


Error with dpkg debconf for every apt command

If the file confmodule is not in /usr/share/debconf/, than you have to reinstall the package debconf via

sudo apt-get install --reinstall debconf


Ubuntu 19.10 feels laggy in VMware yet Fedora doesn't

I figured it out. It turns out although Fedora is also using Gnome 3, they are using Wayland instead of Xorg. I tried Gnome Wayland on Ubuntu and it feels smooth now.


What is the difference between Pinging loopback address and pinging the system's IP address?

When everything is working correctly, they should have the same effect.

The two are on different "interfaces" - the lookback address is on the loopback interface which should be present always (unless you've done something really freaky with your config).  The local IP address is on one of your other network interfaces.

If that interface didn't come up, then that ping will fail but the loopback IP should still work.

Furthermore, depending on how your network interface is set up - specifically whether it's getting an auto IP address via something like DHCP, or whether you've given it a static IP - the interface might come up but not have the IP address you expect, in which case pinging the IP address will also fail.


How can I upgrade to ubuntu 16.04 64 bit from ubuntu 14.04 32 bit?

You can upgrade from 14.04 32 bit to 16.04 64 bit, but not easily and not well. The best solution for you would probably be to back everything up and do a clean install of Ubuntu 16.04 64 bit.

However, if you want to try it anyways, do all the steps in the answer to this question.

How can I switch a 32-bit installation to a 64-bit one?

Then in a terminal run the command below.

sudo do-release-upgrade


fglrx vs open drivers - informations and temperature control

I will try to answer your questions in the same order.

1) Yes there is a way to decrease temperature with open-source driver (radeon). First you should try it from terminal with the following commands

    sudo su -

    echo low >  /sys/class/drm/card0/device/power_profile

    exit

After you confirm that the temperature decreased (check the output of sensors command), you can add the  command echo low >  /sys/class/drm/card0/device/power_profile to /etc/rc.local(before exit 0) to be executed in every reboot.

2) A good and "stable" PPA is considered this => Ubuntu X-Team

3) I think that plymouth is work well with radeon driver too.

4) IMHO yes. If we use the open source drivers and support them , then we will help the developers for a better release in future.


Connect to FTP via Nautilus connect to server

My best guess would be that there is nothing wrong with Nautilus, but something wrong with your network setup or with the setup of the remote computer's FTP server.

I will assume that the computer you try to connect to :

Is connected on the network on the same subnet
Is running :)
Has a ftp server installed (vsftp, for instance)

First, you must ensure that network connection between both computer is OK. First thing is to ping the remote computer (ping 192.168.1.198 in a terminal). If the remote computer is answering to the ping, let's move on. Otherwise, you'll have to set your internet correction correctly so that the two computer "see" each other.

Second, you must check that the FTP server is up and running on the remote computer. Have a look at the configuration in the file /etc/vsftpd.conf to check that everything is setup as it should. In particular, check the port on which the FTP server is running. If you have a line with "listen_port=x" with x being NOT 21, then it is not using the default FTP port. Each time you change something in the settings you must reload it in vsftpd, using sudo service vsftpd reload in a terminal.

In order to check that the FTP connection is working, you can use the simple command line client. Just type ftp 192.168.1.198 in a terminal and it will try to connect. This way you can check if the problem comes from the FTP connection itself. If you have a different port that 21, you must set it here too (look at the man of the ftp command for this).

Hope this helps,

Ben


Steinberg UR824, set it to stereo mode in VLC

Found a solution to this problem in this tutorial:

https://thedarkgod.wordpress.com/2013/08/26/having-pulseaudio-downmix-surround5-1-to-stereo/


Permission for a MySQL user to perform Backups

As seen in http://www.fromdual.com/privileges-of-mysql-backup-user-for-mysqldump

for mysqldump --single-transaction You need: SELECT, SHOW VIEW, RELOAD, REPLICATIOn CLIENT, EVENT and TRIGGER

GRANT SELECT, SHOW VIEW, RELOAD, REPLICATION CLIENT, EVENT, TRIGGER ON *.* TO  'backup'@'localhost';

And for mysqldump --lock-all-tables you need: LOCK

GRANT LOCK TABLES ON *.* TO 'backup'@'localhost';


KDE: Meta+[number] doesn't launch [number]th application Task Manager ("start bar")

The fix for this is to make sure the "Activate Task Manager Entry [number]" (eg. 1) action (shortcut entry) in System Settings > Workspace > Shortcuts > Shortcuts (use the searchbar) is bound.

This was happening to me because in the past I rebound Meta+1 in Custom Shortcuts to use jumpapp (eg. Meta+1 launches or focuses Firefox regardless if it's first or 2nd in Task Manager). That unbound Meta+1 from "Activate Task Manager Entry" because Meta+1 was used elsewhere.


how to add windows 8 entry to grub after boot-repair

According to your link [http://paste.ubuntu.com/8433985/] you installed Ubuntu in /dev/sda5.

Then do the following steps to reinstall grub and recover Windows entry:

Boot from live CD/Flash and do steps:

Open Terminal by pressing Ctrl+Alt+T and type the commands one by one.

Mount /dev/sda5 by the following commands:

sudo mount /dev/sda5 /mnt
for i in /sys /proc /run /dev;do sudo mount --bind "$i" "/mnt$i";done

Now we mounted the /dev/sda5. just run below command to switch to root directory of Ubuntu:

sudo chroot /mnt

And run below command to install grub to main partition /dev/sda:

grub-install /dev/sda

Update grub and exit and reboot your system. it will fix.

update-grub
exit
sudo reboot

I hope this helps.


what is a configuration to allow access to juju-gui in local provider

I finally just used the following IPTABLES commands to forward HTTP and HTTPS access to the LXC container that the JUJU-GUI is running in:

sudo iptables -t nat -I PREROUTING -p tcp -d <host-ip> --dport 443 -j DNAT --to <lxc-ip>:443
sudo iptables -t nat -I PREROUTING -p tcp -d <host-ip> --dport 80 -j DNAT --to <lxc-ip>:80
sudo iptables -A FORWARD -p tcp -d <lxc-ip> --dport 443 -j ACCEPT
sudo iptables -A FORWARD -p tcp -d <lxc-ip> --dport 80 -j ACCEPT

Using the above I am now able to access Juju-GUI running in an LXC container in "local" provider mode from the Internet.

Any charms deployed ... deploy to other LXC containers on the same host.


Fix the bug in Debian Avahi-daemon

The slow WiFi in Ubuntu problem could also be related to a bug in Avahi-daemon of Debian. Ubuntu and many other Linux distribution are based on Debian so this bug propagates to several Linux distributions. To fix this bug, you have to edit the nsswitch configuration file. Open a terminal and use the following command:

sudo gedit /etc/nsswitch.conf

This will open the configuration file in gedit so that you could edit it easily in GUI. In here, look for the following line:

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

If you find this file, replace it with the following line:

hosts:          files dns

Save it, close it, restart your computer. It should fix the slow wireless connection problem for you. If it doesn’t check the other solution.

Works for me. Hope same does for you :)
If it dosen't , try other solutions , from here :http://itsfoss.com/speed-up-slow-wifi-connection-ubuntu/


Do I need to fix my weirdo partitions? I don't have root or /home

From what I can see for linux you have a root / partition and a swap partition. This is enough. /home is quite fine within your root partition. (There are advantages in having them separately but their are not mandatory.) For example my home folder is within the root partition just like yours.

So as far as linux is concerned you are fine.

The 1MiB unallocated space you can ignore. I don't know why somethimes there's space left between partitions but it's so small it's not worth the trouble.

Can't tell what sda4 is but it looks small enough that you can ignore it. You could try asking at superuser site what it is (assuming it comes from the windows side of things).

sda7 I think is so you can bring your laptop to factory default settings. When I tried it on my old asus laptop though it couldn't configure/replace grub so the system didn't boot unless I pointed it to a live USB from the bios. So beware.

sda2 may be something similar - not really sure.

Overall I 'd say your system is ok.


I'm having trouble installing virtualbox 5.1 via the CLI .. my software install is not installing the Deb package

Install gdebi:

sudo apt-get install gdebi

Then download the .deb file and run:

gdebi your_file.deb

(First cd to where your file is.)


How to install wifi drivers from live Cd?

If you want to use brcmsmac on the installed system you can easily do it.

Run

sudo apt-get purge bcmwl-kernel-source

and it is done.

But I am not quite sure that this driver will work for this adapter.


How do I replace Windows 7 Ultimate with Kubuntu without loosing my files in partition D wich is NTFS?

As long as you do not delete your "D" partition you won't lose the DATA on it. Try creating different partitions where you can install Kubuntu. You will need 2 partitions to install kubuntu. 1 for swap and 1 for system file. At the end you should have at least 3 partition (2 for Kubuntu and 1 for your "D") if you haven't deleted your windows partition.

If you can open the partition tool in windows or in linux and take a screenshot/picture it would really help. I would be able to tell you which partiton you can and cannot delete. Linux can access ntfs just fine so you won't need to change anything on your "D" in order to access it from Kubuntu.

itSp4x


Android Studio IDE and tools do not launch after install

Ensure you have downloaded Android Studio from the official site.

Android Studio doesn't have to be installed per se.  It is a self contacted package in a zip file that can be run, just by opening the package and running the start file which is named studio.sh and is located in the bin directory of the package.

Looking at the output of your question, you are running some of the commands as root which is causing problems with some of the file and execute permissions of your personal space.  The application uses your personal space for some of the persistence configuration between sessions.

You can verify this (files not owned by you) by running this command:

$ find ~/ -mount ! -user $(whoami)

If it shows any output, the output is problematic.  It's showing files in your personal space that is not owned by you.

You can fix this by running:

$ sudo chown -R $(whoami):$(whoami) ~/

Now go to where you opened the zip package and find the studio.sh file and run it with this command:

$ ./studio.sh

The package can be unzipped anywhere on your computer.  To make it convenient to run it from the commandline without having to locate and change to the directory where you opened it, you can make a link to it in your execute path with:

$ [[ -d ~/bin ]] && mkdir ~/bin
$ ln -s [full path of studio.sh] ~/bin/studio.sh

If you find your studio.sh file in ~/android-studio/bin the command to add it to your search path would be:

$ ln -s ~/android-studio/bin/studio.sh ~/bin/studio.sh

As far as install go, you can conveniently place the ~/android-studio folder in your /opt/ folder to make it available for other users.  Then the link command would be:

$ ln -s /opt/android-studio/bin/studio.sh ~/bin/studio.sh

Summary
The problem you are having is that you are making unintended changes to your personal space by running applications as sudo.  The resolution is to give proper permissions back to your account and run the commands as your own access.  Use sudo only when you are intentionally making changes to the whole system.  You would also use sudo if you were going to move the zip folder from your personal space to a different space in the system.  But when you actually run a program for usage, never use sudo.  If you have a program meant for regular users that are not for IT maintenance and it doesn't work without sudo that may mean the application or your personal space if broken and the issue should be corrected.

Update:

Verify the jdk installation.  While either will work, this is an alternative installation:

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

Final resolve

The issue was resolved (in chat) by recognizing the GUI was being output to a third monitor which was not currently in view.

Create the launcher:

$ sudo apt install gnome-panel
$ gnome-desktop-item-edit --create-new ~/Desktop

For the new launcher use:

Type       Application
Name       Android Studio
Command    (Click the browse button and browse to the `studio.sh` script.)
Commen     Android Development IDE

Click OK

Now copy or move the new launcher from your ~/Desktop to ~/.local/share/applicatons/

Now you can launch Android Studio from the Ubuntu Dash Search button.


Why Ubuntu kernel will not get major updates?

All Ubuntu supported kernels get bug fixes and security updates backported from new upstream kernels.

LTS Ubuntu versions have an option to get new kernels form non-LTS releases. See HWE Stack.

If you like, you can install any mainline kernel manually from Ubuntu mainline kernel PPA.

In this case you will have to install updates manually.


postinst always fails because of debconf

So I finally got this working. debconf would always fail when getting the first question in my postinst if debconf already had the value. I finally had the (obvious) idea to check out the postinst and config files of other packages on my system and this is the trick:

In your config

. /usr/share/debconf/confmodule
db_input high mypkg/mysql_root_pw || true
db_go || true

That's it. When I request the values in my postinst debconf is happy. Obviously you need to have a handling for when you don't get any values.

Also I added a db_stop to my postinst, I don't know if it's necessary but I'll add it for the sake of completion.

mypkg.postinst

. /usr/share/debconf/confmodule
db_get mypkg/mysql_root_pw
mysql_root_pw=$RET
db_get mypkg/some_other_value
some_other_value=$RET
db_stop
# do something with the $mysql_root_pw and $some_other_value vars

Hope this helps someone else someday.

Cheers


It would appear to me that your NAS is not receiving an IP address from your router.  169 is the private IP range given to devices so that they can directly connect and talk to each other without a dhcp server.  Your first step is going to be getting your NAS hooked up to your router and properly configured.


How to restore the original size of this flash drive?

Try using a different utility (perhaps even on a different OS) to create the new partition table -- even command line fdisk.  If nothing else, you may get an informative error message.

It seems likely this drive has damaged hardware and is no longer writable; with the cost of new small thumb drives (almost free), it's surely not worth putting a lot of effort into recovering this one.


Many people do not understand the nature of swap: it's very slow!

For an old machine with DDR3 1600 memory:

the memory transfer rate is 12800 MB/s,
a HDD rate is around 100-200 MB/s,
a SSD rate is maximum 600 MB/s

So if the memory pressure is so high that swap usage is frequent, everything will still work, but will slow down tremendously because the speed of swap is less than 1/1000 of the normal memory.

Where swap can help us in daily life is that if you're running multiple programs, less frequently used program can be swapped out but are still retained in the system.  You wait 2-3 minutes to allow less active pages to go to swap, then you can use your current Application without much pain.  And in many cases the less active pages never swap back again so there's no further penalty.

But when you talk about simulation, which means your data is huge and swap in/out activities will be frequent, it just looks like your system is freezing, because more than 99.9% of the CPU time is in uninterruptible iowait.

So the solution to your problems is:

Buy more RAM
Have tremendous patience and wait 1000 times longer with your current setup
Add an SSD and still have a lot of patience and wait 100 times longer...


In Ubuntu 12.04, your lightDM background is automatically set to your background image in session as long as your background image is in the /usr/share/backgrounds/ folder. If your background image is not in that folder, you can copy it there via sudo cp /location/of/image/here.png /usr/share/backgrounds/, then add it to your background images in the Appearance Settings and set it as your background image. Now when you log out, you should see your background image as your lightDM background!


That output shows the list of installe packages whose name starts with libgtk. All of those are installed. Whether or not they are actually needed (used) is something else again. An easy way of checking whether a package is needed is to run aptitude why on the package. For example, on my (very old) 14.04.5 LTS system:

$ aptitude why libgtk-3-0
i   firefox Depends libgtk-3-0 (>= 3.4)

You can automate this with:

$ dpkg -l libgtk* | grep '^i.*libgtk-*[0-9]' | awk '{print $2}' | xargs -I{} aptitude why {}
i   firefox Depends libgtk-3-0 (>= 3.4)
i   evince           Depends gnome-icon-theme (>= 2.17.1)
i A gnome-icon-theme Depends libgtk-3-bin
i   firefox    Depends libgtk-3-0 (>= 3.4)
i A libgtk-3-0 Depends libgtk-3-common (>= 3.10.8)
i   firefox Depends libgtk2.0-0 (>= 2.14)
i   firefox     Depends    libgtk2.0-0 (>= 2.14)
i A libgtk2.0-0 Recommends libgtk2.0-bin
i   firefox     Depends libgtk2.0-0 (>= 2.14)
i A libgtk2.0-0 Depends libgtk2.0-common

The awk just prints th 2nd field of each input line. The xargs tool then reads the input, and replaces the {} in the command you tell it to run (aptitude why, in this case) with whatever it read as input. So it will run aptitude why on each of the packages returned by dpkg. Oh, and I simplified your grep into a single call. You could simplify further by using awk alone:

$ dpkg -l libgtk* | awk '/^i.*libgtk-*[0-9]/{print $2}'
libgtk-3-0:amd64
libgtk-3-bin
libgtk-3-common
libgtk2.0-0:amd64
libgtk2.0-bin
libgtk2.0-common


"No key available with this passphrase" with a newly-created DM-CRYPT / LUKS partition

TL;DR - Check if the media is reliable; luksFormat and luksOpen don't.

The problem could be thought of in at least a few ways:

The wrong passphrase is being provided
The passphrase is being given in the wrong way
Something is wrong with essential software, like cryptsetup itself.

Out of curiosity, I decided to do a complete format of the mmc drive (to "start from scratch), but with checking:

sudo mkfs.ext4 /dev/mmcblk0 -cc

mke2fs 1.44.4 (18-Aug-2018)
/dev/mmcblk0 contains a ext4 file system
        last mounted on Tue Mar  5 11:30:02 2019
Proceed anyway? (y,N) y
Discarding device blocks: done
Creating filesystem with 15591936 4k blocks and 3899392 inodes
Filesystem UUID: 0ab72f40-d2a2-408d-b4ca-d5e8fcc27ec7
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424

Testing with pattern 0xaa: done
Reading and comparing: done
Testing with pattern 0x55: done                                                 rs)
Reading and comparing: done                                                 rs)
Testing with pattern 0xff: done                                                 rs)
Reading and comparing: done                                                 rs)
Testing with pattern 0x00: done                                                 rs)
Reading and comparing: done                                                 rs)
Block 0 in primary superblock/group descriptor area bad.
Blocks 0 through 9 must be good in order to build a filesystem.
Aborting....

I could already see where this was going..

Since I've never formatted like that before, I formatted a second storage device (a USB stick) with checking, and it's format concluded successfully.  Going through the same cryptsetup process to format and open that USB stick worked.  This reveals another problem that was happening:

The passphrase is being received in the wrong way

I suspect that luksFormat isn't doing any sanity checking to see that its data can actually be read.

As a followup, I had already done a non-quick format under Windows and it worked fine.  I also performed a complete write-read-compare test and it was also a success.  I have other tests to perform, just out of curiosity, but this may well (somehow) be a Linux-specific issue.  I won't troubleshoot down that rabbit hole, but I'll conclude that it's important to do all the formatting and testing on the specific platform the issue is seen on.


how to move a raw disk image to a pendrive to make it bootable?

The dd command should look like this:

sudo dd if=/home/wojtek/Pobieranie/mydisk.img of=/dev/sdb

...in other words, /dev/sda1 is not the same as /dev/sda.


Sound volume keys sometimes stop working in 13.04

It looks like restarting xfce4-volumed fixes the problem. I guess I just need to create a respective script that will run on startup.


Cant update Grub , /usr/sbin/grub-mkconfig: 1: /etc/default/grub: r#: not found

the solution That works with me is to open the grub and edit the first line from

r# If you change this file, run 'update-grub' afterwards to update

to

# If you change this file, run 'update-grub' afterwards to update


Installing Ubuntu on Oracle VirtualBox without deleting Windows

Thats perfectly fine to choose and will not affect your windows installation in any way, this only sees the allocated file space you have created for the VM.


Installed Ubuntu 16.04 alongside windows 10 but my pc only runs windows

depending on your system OPEN BOOT OPTIONS there you must see an efi entry of ubuntu.

Yup it's related to UEFI, I faced same problem a while ago. In UEFI, first entry of efi file is automatically booted. You must change it for Ubuntu, I used windows graphical tool Easy BCD.

It's free have a look in it, it's very handy to delete efi, change ordering, etc.
Hope it solves issue.


VirtualBox 6.1 and Kernel 5.8.0-34-generic

Yes, this is a perfect solution.
VirtualBox from Ubuntu focal repos doesn't support the 5.8 kernel yet.
But you can get a deb from virtualbox.org site that supports the 5.8 kernel.


Ubuntu 15.04, Asus Flipbook TP500LN No Internet and touchpad did use NDISwrapper

The process used to install the driver is:

sudo apt-get install build-essential linux-headers-generic git
git clone https://github.com/kuba-moo/mt7630e.git
cd mt7630e
make
sudo make install
sudo modprobe mt76xx
sudo depmod -a

It compiled for me perfectly on Ubuntu 15.04. I haven't the device so I can test no further.


Don't worry, there is a quick and safe solution.

How to execute an administrative action

Very quick introduction to sudo

Single command line

In a terminal execute:

sudo SUDOARGUMENTS COMMAND COMMANDARGUMENTS

...after replacing:

SUDOARGUMENTS with the parameters for the sudo utility (obtain a list from sudo --help;
COMMAND with the command to execute as the administrative user (root);
COMMANDARGUMENTS with the arguments for the command to execute as the administrative user (root).

Administrative session

Use only if necessary; always use the previous method if possible.

Execute sudo su to gain the root privileges and be very careful while executing any command.

Terminate the session using exit and never leave a root interactive session active without control.

Example

If sudo is configured correctly you can execute your command with:

sudo chown harishaa sqldeveloper.sh

...it will ask the password of your current user and safely remember it for some minutes.
The command will be executed with higher privileges, execute only commands from trusted sources.

Useful references

If you are the administrator of a multi-user system (for example a PC user by father, mother and two small kids) read the official Ubuntu reference for the configuration of sudo.

Feel free to comment under here if you need more support.


Can't switch to tomcat user after installing tomcat via apt

Your tomcat7 user has no login shell, have a look at /bin/false in the output below

% grep tomcat /etc/passwd
tomcat7:x:134:149::/usr/share/tomcat7:/bin/false

and there is no need to switch your user. To run a command as tomcat7 use

% sudo -u tomcat7 whoami
tomcat7


How to compile latest pulseaudio with webrtc in ubuntu 16.04

I was having the same issue. Just run
sudo apt-get install libsndfile-dev libcap-dev

re-run ./configure, and everything should work as expected.


The computer stops working all of a sudden

We'll increase your /swapfile from 2G to 4G.
Note: You may need to add more RAM.
Note: Incorrect use of the dd command can cause data loss. Suggest copy/paste.
sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile
sudo swapon /swapfile     # turn on swap
free -h                   # confirm 4G RAM and 4G swap
reboot                    # reboot and verify operation

Add this line to /etc/fstab...
/swapfile    none    swap    sw      0   0


In order for the virtual machine to use an IP address within the same IP subnet as the host, you need to edit the VM's Network Settings and change from the default NAT mode to Bridged Adapter mode:


moving text in video with ffmpeg always 3 minute

Try this:

enable='gt(mod(t,60),57)'

This means: every 57 seconds for 3 seconds.


What is the difference between gksudo and gksu?

Both files point to the same place:

$ ls -l /usr/bin/gksudo
lrwxrwxrwx 1 root root 4 2010-09-27 18:23 /usr/bin/gksudo -> gksu

... gksudo is symlinked to gksu. But this doesn't mean they do the same things, far from it.

Applications can detect the command used to run it. This is typically argv[0] in C-style languages or $0 in Bourne-style shell scripts. The application can look at that and in this case, actually it changes how it works. The first indication of this is in the man gksu page:

gksu  is  a  frontend  to  su  and gksudo is a frontend to sudo.

If you look in the source (apt-get source gksu) for run_mode, you'll see how it detects this:

  { /* support gksu_sudo_run */
    gchar *myname = g_path_get_basename (argv[0]);
    if (!strcmp(myname, "gksudo"))
      run_mode = SUDO_MODE;
    g_free (myname);
  }

You can override this with the --su-mode/-w and --sudo-mode/-S arguments (so you can run equivalent commands without needing the gksudo symlink... But that's up to you.

If you want to know how these "modes" really differ, there's only a bit of escaping in gksu. You need to follow it into libgksu. This is the library that actually checks permissions before handing off to the system.

If no mode is specified (eg you call gksu without arguments) by the time it reaches  libgksu, it will check Gconf (as Stefano points out) and if it still can't decide, it'll default to the su mode.


What Causes: "Error: environment block too small. Press any key to continue" Messages?

This may not be a universally applicable solution, but it turns out that the case was bending the power line to that disk bay, and the new SSD liked that less than the spinning disk did. Over time the power would work loose to that disk, causing write failures in use and corrupting everything. The old spinning disk was more resilient to this, for whatever reason.

I only noticed this problem when I ran the computer with the case lid off for 6 months, and had no errors. I ran various trials monitoring SMART diagnostics for temperature, voltage etc, and discovered this intermittent fault.

The solution was to change the arrangement of the disks in the case, and to use a right-angled power lead on the top-most disk power lead.

Hope that helps someone else.


How to install ubuntu on an Asus VivoPC vm60?

If you want 14.04: BIOS -> WLAN -> Disable. This way you'll be able to boot and install Ubuntu.

After that, make sure to install all the available updates because newer kernels got added support to the wireless chip on board.

You don't need anything else to do: just install updates, and re-enable WLAN in BIOS. It will work.


How do I use a second keyboard and mouse - When running a separate X server on the same graphics card

You could always get a KVM switch. This will let you switch back and forth between mice, keyboard, monitors, with the press of a button, but you would need 2 computers connected to the switch.

Check this one out for multiseated device, which is what I believe you are trying to do.


How do I make resizing dialogues and windows stick permanently?

Sure, if you are willing to devote some time to it, I'm afraid. Bug reports to the programs would be a good first step, though.

As a workaround, you can use devilspie as outlined  here, but by setting the size of the window instead ofthe workspace.

A simple script invoked via a hotkey that uses wmctrl could also do the trick.

But I still think you should make feature request bug reports, so that this type of ugly hack is not needed.


Touchscreen not working on Lenovo Ideapad Flex 5

I just bought also an IdeaPad Flex 5 14", and have the exact same issue. I sucessfully compiled and loaded wacom and wacom_w8001 modules, but it didn't help.
Note that on my system - like yours but unlike some other posts, there has never been any elan* driver loaded.
$ dmesg | grep MSFT
[    0.607606] i2c_hid i2c-MSFT0001:00: i2c-MSFT0001:00 supply vdd not found, using dummy regulator
[    0.607617] i2c_hid i2c-MSFT0001:00: i2c-MSFT0001:00 supply vddl not found, using dummy regulator
[    0.772231] input: MSFT0001:00 04F3:3140 Mouse as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-MSFT0001:00/0018:04F3:3140.0001/input/input5
[    0.772281] input: MSFT0001:00 04F3:3140 Touchpad as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-MSFT0001:00/0018:04F3:3140.0001/input/input6
[    0.772317] hid-generic 0018:04F3:3140.0001: input,hidraw0: I2C HID v1.00 Mouse [MSFT0001:00 04F3:3140] on i2c-MSFT0001:00
[    2.261795] input: MSFT0001:00 04F3:3140 Mouse as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-MSFT0001:00/0018:04F3:3140.0001/input/input8
[    2.265094] input: MSFT0001:00 04F3:3140 Touchpad as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-MSFT0001:00/0018:04F3:3140.0001/input/input9
[    2.279085] hid-multitouch 0018:04F3:3140.0001: input,hidraw0: I2C HID v1.00 Mouse [MSFT0001:00 04F3:3140] on i2c-MSFT0001:00

$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 06cb:00be Synaptics, Inc.
Bus 003 Device 002: ID 174f:243f Syntek Integrated Camera
Bus 003 Device 004: ID 8087:0026 Intel Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

$ uname -r
5.4.0-59-generic

$ xinput
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ MSFT0001:00 04F3:3140 Mouse               id=11   [slave  pointer  (2)]
⎜   ↳ MSFT0001:00 04F3:3140 Touchpad            id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ Integrated Camera: Integrated C           id=10   [slave  keyboard (3)]
    ↳ Ideapad extra buttons                     id=13   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=14   [slave  keyboard (3)]

Also, output in Xorg log :
    89.235] (==) modeset(0): Silken mouse enabled
[    89.381] (II) config/udev: Adding input device MSFT0001:00 04F3:3140 Touchpad (/dev/input/mouse1)
[    89.382] (II) config/udev: Adding input device MSFT0001:00 04F3:3140 Mouse (/dev/input/event6)
[    89.382] (**) MSFT0001:00 04F3:3140 Mouse: Applying InputClass "libinput pointer catchall"
[    89.382] (II) Using input driver 'libinput' for 'MSFT0001:00 04F3:3140 Mouse'
[    89.429] (**) MSFT0001:00 04F3:3140 Mouse: always reports core events
[    89.430] (II) event6  - MSFT0001:00 04F3:3140 Mouse: is tagged by udev as: Mouse Pointingstick
[    89.431] (II) event6  - MSFT0001:00 04F3:3140 Mouse: device is a pointer
[    89.431] (II) event6  - MSFT0001:00 04F3:3140 Mouse: device removed
[    89.431] (II) XINPUT: Adding extended input device "MSFT0001:00 04F3:3140 Mouse" (type: MOUSE, id 12)
[    89.432] (**) MSFT0001:00 04F3:3140 Mouse: (accel) selected scheme none/0
[    89.432] (**) MSFT0001:00 04F3:3140 Mouse: (accel) acceleration factor: 2.000
[    89.432] (**) MSFT0001:00 04F3:3140 Mouse: (accel) acceleration threshold: 4
[    89.433] (II) event6  - MSFT0001:00 04F3:3140 Mouse: is tagged by udev as: Mouse Pointingstick
[    89.433] (II) event6  - MSFT0001:00 04F3:3140 Mouse: device is a pointer
[    89.434] (II) config/udev: Adding input device MSFT0001:00 04F3:3140 Mouse (/dev/input/mouse0)

Like others, touchscreen works perfectly on Windows 10 (dual boot). I would say we don't have a good working driver available - yet ?
Alex


Try commenting out like

#GRUB_HIDDEN_TIMEOUT=

Then run: sudo update-grub.
It's been a while, but I believe I remember some conflict between GRUB_HIDDEN_TIMEOUT & GRUB_TIMEOUT. Perhaps no value isn't enough.


If you check the mode used by your wireless card, it is probably 'managed:'

wlan0     IEEE 802.11abgn  ESSID:"my_router"
      Mode:Managed  Frequency:2.462 GHz  Access Point: XX:D7:19:41:54:XX
      Bit Rate=58.5 Mb/s   Tx-Power=15 dBm
      Retry short limit:7   RTS thr:off   Fragment thr:off
      Power Management:off
      Link Quality=46/70  Signal level=-64 dBm

In this context, 'managed' means that the channel, bitrate, etc. are managed by the router. If you wish to change the channel, change it in the administration pages of the router.


The solution lay not in any Ubuntu settings, but in the dual boot with Windows 10. Windows 10 has a fast boot option that hibernates the system instead of shutting it down decently. This results in ubuntu being able to mount the NTFS disk in read-only.

To shut down Windows 10 effectively, press SHIFT + Shut down button or follow instructions in the internet (e.g. this tutorial)

See other posts on this plattform as well, e.g. Why does my NTFS partition mount as read only?


How to install Nouveau driver on 19.10 and use DisplayLink

The gcc-9 compiler seemed to be the issue. After the following, compliling EVDI kernel module with DKMS works (both with Debian DisplayLink and official DisplayLink driver):
https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1830961 suggests this workaround:

sudo ln -fs gcc-8 /usr/bin/gcc

However, Debian DisplayLink allows to see the screen but not to activate it. Uninstalling it an reinstalling the official DisplayLink driver, it works. (I cannot test with more than a display connected to it at the moment, though).
(I guess it should do no harm to revert to gcc-9 if recompiling kernel modules is not needed; but I have not tried).


Ubuntu 9.04 reached end of life nearly two years ago on October 23 2010, as this article describes, so you have had no security updates for a long while. This probably should be a concern by now.

However, even though this is the case you can probably still use the old-releases part of of the Ubuntu site and replace the entries in your sources.list with the old-releases urls; i.e. use old-releases.ubuntu.com instead of archive.ubuntu.com. There is more at the Ubuntu forums on this topic of keeping old versions going.
Please see this official Ubuntu article on end of life upgrades too as that explains quite a lot about the process of adapting your sources.list.

So, there is a way to keep using Jaunty, but I do advise an upgrade soon.


I am trying to download something from the software center and it wont download giving me this error

one of these might help...

Option one

if you go to the website of the software you are trying to install, you can usually find the '.deb' file which is the file type that the software centre uses to install in ubuntu.

Sometimes, the software on the software centre doesn't seem to install correctly (I've had the same issue).

When this happens I usually just download the .deb from the software manufacturers website (if this is possible) and 'double-click' it (which launches the software centre and installs the software).

So, three steps:

go to website
download software.deb
double click software.deb and watch the software centre download it for you.

Option Two

another option is to find the package name of the software you are trying to install and from terminal 'ctrl+alt+t' you can type

sudo apt-get install packagename

where packagename is, hmmm, the package name :P (To do this you will need to be on an admin account and know the password).

Option Three

Third option, try running

sudo apt-get update

before running your install

Hope this helps!

p.s. sometimes the software centre looks like it isn't doing anything or just looks a bit buggy (just leave it alone for a while before you try to cancel anything).


To remove password prompts for commands/apps using sudo:

sudo adduser (your user name) sudo
sudo visudo

Change:

%sudo   ALL=(ALL:ALL) ALL

to

%sudo  ALL=(ALL) NOPASSWD:ALL

Exit visudo- Ctrl+x, y, Enter

Run:

sudo service sudo restart

To remove password prompts for some graphical applications that use policy kit, not sudo see https://askubuntu.com/a/614537/115816.

Done. Bad idea, but there.


Inspired by https://askubuntu.com/a/504402/458355 I created /etc/lightdm/lightdm.conf with the following content:

[SeatDefaults]
user-session=plasma-kde

Now login works.

For the record: The file ~/.dmrc containes the line

Session=kde-plasma-kf5

However, changing this line to Session=plasma was ignored by lightdm.


Script to copy files to folders with the same shared template names

The bash script you are looking for is:

#!/bin/bash

#for loop

for n in {1..3500}

do

cp -r `find /media/first4t/boxes/ -type f -iname $(cd /media/first4t/frames && ls -d 15apr01d_c_000[0-9][0-9]gr_000[0-9][0-9]sq_v0[0-9]_000[0-9][0-9]hl_0000[0-9]ex.frames | head -$n | awk 'END{print}')* | awk 'END{print}'` /media/first4t/frames/`cd /media/first4t/frames && ls -d 15apr01d_c_000[0-9][0-9]gr_000[0-9][0-9]sq_v0[0-9]_000[0-9][0-9]hl_0000[0-9]ex.frames | head -$n | awk 'END{print}'`/

done

Save it as /path/to/anyname.sh & to run it do:

bash /path/to/anyname.sh


Automatically enter a pw for a bit bucket account?

There's a very detailed guide here.

In short, you need to

generate a key pair (check if ~/.ssh/id_rsa.pub exists)
add that public key into Bitbucket>Manage account>Security>SSH Keys>Add Key .
Then you should edit the .git/config file in your project folder, change the https url to ssh format. from: https://accountname@bitbucket.org/accountname/reponame.git
to:   ssh://git@bitbucket.org/accountname/reponame.git