Script(s) to rotate focus through monitors

In the setup below, two scripts are involved: one background script to keep track of the history of focussed windows (see the explanation at the bottom to read why that is needed), and one "action" script to place under a shortcut key, to set focus on the next screen. If the next screen currently has no window to set focus on, a message is displayed:

The scripts

Script 1; the background script, save it (exactly) as focus_track.py

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

rootdata = os.environ["HOME"]+"/.focus_history"

def get_screendata():
    return sorted([int(s.split("+")[-2]) for s in subprocess.check_output(["xrandr"]).decode("utf-8").split() if s.count("+") == 2])

def current_windows():
    try:
        return subprocess.check_output(["wmctrl", "-lG"]).decode("utf-8")
    except subprocess.CalledProcessError:
        pass

def convert_format(w_id):
    return w_id[:2]+(10-len(w_id))*"0"+w_id[2:]

def read_data():
    return open(rootdata).read().splitlines()

def get_top(wlist):
    top = convert_format([l.split("#")[-1].strip() for l in \
           subprocess.check_output(["xprop", "-root"]).decode("utf-8").splitlines() \
           if "_NET_ACTIVE_WINDOW(WINDOW)" in l][0])
    return [l for l in wlist if top in l][0]

if __name__ == "__main__":
    open(rootdata, "wt").write("This is an empty line")
    while True:
        time.sleep(1)
        wdata = current_windows()
        if wdata != None:
            wlist = wdata.splitlines()
            # get frontmost window (as in wmctrl -lG)
            top = get_top(wlist)
            oldlist = read_data()
            if not top == oldlist[0]:
                # clean up closed windows
                [oldlist.remove(l) for l in oldlist if not l.split()[0] in wdata]
                # remove possible other mentions of the active window
                [oldlist.remove(l) for l in oldlist if l.startswith(top.split()[0])]
                open(rootdata, "wt").write(("\n").join([top]+oldlist))

Script 2; the action script, save it as next_focus.py In one and the same directory as script 1.

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

# read existing windows and their order (x-wise) from file
windows = [w.split() for w in focus_track.read_data()]
w_data = [[w[0], int(w[2])] for w in windows]
# get position of currently focussed window
currfocus = focus_track.get_top(focus_track.current_windows().splitlines()).split()[2]
# get screendata
screens = focus_track.get_screendata()

def screen_pos(x):
    return [(int(x) > n) for n in screens].count(True)

scr_position = screen_pos(currfocus)
next_screen = 1 if scr_position == len(screens) else scr_position+1
try:
    next_focus = [w for w in w_data if screen_pos(w[1]) == next_screen][0]
    subprocess.Popen(["wmctrl", "-ia", next_focus[0]])
except IndexError:
    subprocess.Popen(["notify-send", "No window to focus on next screen"])

How to use

The scripts needs wmctrl to be installed

sudo apt-get install wmctrl

Copy script 1 into an empty file, save it as (exactly) focus_track.py. The name is important, since both scripts share functions; script 1 is imported into script 2.
Copy script 2 into an empty file, save it as (exactly) next_focus.py in one and the same directory as script 1.
Test- run the setup: N.B. Start the background script before opening (and thus focussing) windows. Windows, opened before the background script starts are not "recorded" untill they are focussed

Start the background script (from e.g. a terminal) with the command:

python3 /path/to/focus_track.py

On your different screens, open windows.
Run script 2 with the command:

python3 /path/to/next_focus.py

The focus should switch to the next screen. If the current screen is the last in the row, the focus switches to the first screen.
If all works fine, add script 1 to Startup Applications: Dash > Startup Applications > Add the command:

python3 /path/to/focus_track.py

and add script 2 to a keyboard shortcut: choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

python3 /path/to/next_focus.py

to a shortcut key of your liking.

Notes

Since the background script keeps track of focus history, for immediate proper functioning, it should preferably start before you start working on your computer, e.g. on log in (using Startup Applications).
The script assumes the screens are set up from left to right, non- overlapping. Their vertical alignment is irrelevant however.
To "save fuel", and make the script's load negligibly small, the script updates the focus history (only) once per second. A window is therefore defined as focussed if it has focus for at least between 0.5 and 1 second.
Although I tested it on a two- screen setup, it should (and I am pretty sure it does) work properly on a setup with 3(+) screens.

Explanation:

What it takes

To switch focus from one screen to another, it is necessary to determine which is the front most window per screen. The major issue is however that windows, spread over multiple screens are actually all in one and the same stack, and thus ordered in one and the same succession (z-wise). The tools we have (wmctrl, xdotool, xprop etc.) in the best case can only determine the currently active window. They give us no information whatsoever about the window order on the other screens, since the windows are below the active window.

Therefore, at first sight, it seems pretty impossible to switch focus from one screen to another.
However:

How to get the information

With a workaround however, there is an escape: if we make a background script keep track of the currently focussed window, and maintain a history record of changes (for as long as the window exists), we actually can conclude what is the z-order of the currently opened windows. If we also keep track of their geometry and position, we have all information we need.

An example:
We have currently five windows: A, B, C, D, E. If their focus changes through D, E, A, C, B, we know the z-order of the windows is: B, C, A, E, D (front to back)

Together with their positions (x-wise) and the screen data (the x-resolution of the screens) we have all information we need. To switch focus to the next screen, we then simply have to look up the first window, located on the next screen.


Problems auto-mounting samba/cifs share with fstab

I think your box is having difficulty resolving the IP of freenas via wins/netbios. Sometimes it is very difficult to resolve.

In your /etc/fstab, use ip address instead of hostname like following

 //192.168.1.100/Server

In your /etc/hosts, add following line

 192.168.1.100    freenas

/etc/fstab, use credential

 //freenas/Media /home/charles/Server cifs defaults,uid=1000,username=<user>,password=<pass> 0 0


How should I write the fail2ban -> apache-badbots.conf rules?

Do you have robots.txt? This is for tellin bots where and how to crawl. There are more then one questions here, so lets see them one by one.

If you want to check if its working, just go to the fail2ban log. To understand HOW its working please go to the /usr/share/doc/fail2ban/README or other docs. In short: fail2ban reads your logfile by the defined filters and creates firewall rules for the problematic IP addresses found in problematic log lines. If the defined bot has one IP address it will be banned after a few attempts. In this particular case there is thousands of requests with MQQBrowser and LieBaoFast from a lots of different IPs. So until they have some IP which is not blocked, there will be new log entries.

These config lines are regular expressions, and this is the short answer for some of the other questions, like:

is there a difference if I write "netEstate NE Crawler" or just "netEstate"? yes the first one is more specific, probably needlessly.
there are \. instead of . cause the plain dot matches any character
spaces, dash and underscore (-,_) are ok but brackets not.

If you realy want to select your clients based on useragent string, you should use .htaccess, BBQ or some other plugin.


How can I fix a 404 Error when using a PPA or updating my package lists?

Automated removal
skip to the bottom of this answer for a scripted way to remove offending software-sources for all ubuntu versions prior to Ubuntu 15.04
What are 404 errors

The 404 or Not Found error message is a HTTP standard response code
indicating that the client was able to communicate with the server,
but the server could not find what was requested.
The web site hosting server will typically generate "404 - Page Not
Found" web page, when users attempts to follow a broken or dead link.

What are the causes of these errors in update-manager
Typically, three main areas cause these errors in update-manager

A user has just upgraded and has re-enabled a PPA software-source that no longer exists

A user has manually typed in a new software source incorrectly

A PPA was added, but the maintainer has subsequently deleted some/all of the PPA

where are these software-sources
PPAs typically are saved in one of two locations

/etc/apt/sources.list
in an appropriately named file with a .list file-extension in /etc/apt/sources.list.d/ for example webupd8team-jupiter-natty.list

This list file typically contains:
deb http://ppa.launchpad.net/webupd8team/jupiter/ubuntu oneiric main
# deb-src http://ppa.launchpad.net/webupd8team/jupiter/ubuntu oneiric main

Note a # at the front of a line of text means that it is commented out and is not checked by the package manager.
How to eliminate these errors
Typically, if you run sudo apt-get update from a terminal or click the details button in Update Manager after hitting the refresh button you will see errors such as:

If the error is due to a PPA - usually unticking the similarly named PPA with the URL shown in the error message will resolve this.

If the 404 error was due to an additional repository that has been added to /etc/apt/sources.list then its easier to add # character to the start of the line to comment out the offending repository i.e.
gksu gedit /etc/apt/sources.list

More info
Here is a bug report on the update manager to solve this problem:

https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/1049046

If you are getting these problems without PPAs, check out this question:

How can I fix a 404 Error using the Ubuntu archives?
Repositories/Ubuntu - Community Ubuntu Documentation - Removing & Disabling Repositories


Make sniqt recognize all tray abilities (or create a working indicator in Qt)

Unity, by choice, doesn't support what you are referring to as "decent tray icons". It's indicators or nothing. From there you have several options:

Make do with the limited indicator capabilities. You can set the menu that will by used by your indicator with the standard QSystemTray.setContextMenu() method.
Detach your app from the systray entirely. As in, turn it into a floating icon on the desktop, that will be able to accept middle- and right-clicks as God and Matthias Ettrich intended. You can find a simple example of how to do this here: http://kde-apps.org/content/show.php/KEyes?content=51493 (Optionally, do this only when you detect that you are running under Unity, i.e. if $DESKTOP_SESSION is set to 'ubuntu'.)
Declare Unity unsupported. This is not a very good option.

Whether you'll want to go with option 1 or 2 mainly depends on what your application does.


Launcher, menubar and window borders disappeared in Ubuntu 16.04

I found the answer from this thread (https://askubuntu.com/a/717860/25131)

Alt + F10 and then open terminal from the menu
that appears
then type ccsm in to the terminal.
in there search for unity plugin and enable it.

It asks several questions because enabling it conflicts with another.
After enabling it the Unity launcher and menu bar should appear.


This particular Atheros wireless card seems to have "a history" with various Linux distributions. Let's first do a test and, if you find that the network speed is satisfactory, later update a configuration file.

Open Terminal (if it's not already open)
Remove the current Atheros driver:
sudo modprobe -r ath9k

Restore the Atheros driver with an additional flag:
sudo modprobe ath9k nohwcrypt=1

Test your WiFi by using the machine for a few hours

If everything proves to be good, then you can modify a configuration file to ensure nohwcrypt is properly set after every reboot.

Open Terminal (if it's not already open)
Create/Edit the /etc/modprobe.d/ath9k.conf file using your preferred text editor and sudo:
sudo vi /etc/modprobe.d/ath9k.conf

Add the following line to the end of the file:
options ath9k nohwcrypt=1

Save the file

Now, when you reboot, the nohwcrypt flag will be correctly set for you.


.desktop file does not show the icon in applications

I had a similar issue and I fixed it by removing a stray whitespace character at the end of the Icon line. It looks like there is whitespace in you paths, what happens if you try

[Desktop Entry]
Type=Application
Name=Oxygen_Eclipse
Comment=Eclipse Integrated Development Environment
Icon=/home/amir/IDE/OXYGEN/eclipse/icon.xpm
Exec=/home/amir/IDE/OXYGEN/eclipse/eclipse
Terminal=false
Categories=Development;IDE;Java;
StartupWMClass=Oxygen_Eclipse


gnome-desktop-item-edit: command not found on Ubuntu 19.10 and later even with the 'gnome-panel' package installed

Yes, indeed it seems gnome-desktop-item-edit is removed from the gnome-panel package, it won't be available for Ubuntu 19.10 (and most likely later releases).
As an workaround you can create .desktop files by hand. Just create a blank text file and add the following lines to it for a simple one:
[Desktop Entry]
Name=<NAME OF THE APPLICATION>
Comment=<A SHORT DESCRIPTION>
Exec=<COMMAND-OR-FULL-PATH-TO-LAUNCH-THE-APPLICATION>
Type=Application
Terminal=false
Icon=<ICON NAME OR PATH TO ICON>
NoDisplay=false

Then rename the file as APPNAME.desktop and right-click and select 'allow launching' (you may also have to make it executable).
Also the .desktop files for installed applications are usually found in your /usr/share/applications/ directory (or /var/lib/snapd/desktop/applications/ for snap applications). You can copy a .desktop file from there.
For a GUI alternative you may use alacarte (aka 'Main Menu'). Install it by running (the 'universe' repo needs to be enabled)
sudo apt install alacarte

It creates a .desktop launcher in your ~/.local/share/applications/ directory by default (and hence it makes the application available in your list of applications, so that you can launch it from your Activities overview or Applications overview). You can copy the created .desktop file afterwards.


I noticed that if I re-installed Kubuntu, I'd get the proper display back. On the last install I did, I decided to look at my display settings again, and realized I didn't have a primary display set, so I used the KDE display settings ( Application Laucher > Computer > System Settings > Display & Monitor > Display ) to set my hdmi output to primary, which immediately caused the issue on the dvi output monitor. Setting back to no primary didn't fix it.

After this I tried setting some things that I hadn't considered before. Looking at the settings for the dvi display, I noticed that the refresh rate ( System Settings > Display & Monitor > Display; under Advanced ) was set to "auto". Simply setting it to 60.00 hz solves the issue.


VLC indicator shows it is not active while playing audio

What audio server are you using to play your audio - ALSA (Advanced Linux Sound Architecture) or Pulseaudio or OSS? By default Ubuntu comes with Pulseaudio, which runs over ALSA, and you should be using Pulseaudio if you have not made any changes. In case you have ALSA as your default or preferred audio server on your active sound card, then as a matter of fact ALSA supports and allows audio only over 1 particular stream at a time. I myself had a lot of trouble playing mp3 files on VLC and html5 videos on the internet simultaneously.

Try closing all other media players and only use VLC to play.

In the system monitor, check whether you are having the Pulseaudio daemon running. If not, then I think you are using  ALSA as the default audio server and you won't be able to play audio over 2 streams simultaneously.

If you are using Pulseaudio, you should be able to play audio on VLC along with the other program as well, and it should indicate that VLC is actively playing audio.


Mythfrontend keeps loosing it's settings on reboot

It could be a couple of things.  First, is your LTSP overlay working correctly?  Are other files saved as appropriate when you reboot?  If not, you'll need to get your overlay working correctly on your server and mounted on your client.  Look into doing a dpkg-reconfigure mythbuntu-diskless-server on your LTSP server.

If it is working correctly, could your just symlink the two files in the client chroot?


How to rename files to exclude the datetime stamp?

You can use the rename command:

$ rename -n 's/ \(.*?\)//' *.png
icon-culture (2015_09_04 06_58_44 UTC).png renamed as icon-culture.png
icon-disk (2015_09_04 06_58_44 UTC).png renamed as icon-disk.png
icon-download (2015_09_04 06_58_44 UTC).png renamed as icon-download.png
icon-drop (2015_09_04 06_58_44 UTC).png renamed as icon-drop.png
icon-file (2015_09_04 06_58_44 UTC).png renamed as icon-file.png
icon-film (2015_09_04 06_58_44 UTC).png renamed as icon-film.png
icon-flag (2015_09_04 06_58_44 UTC).png renamed as icon-flag.png
icon-folder (2015_09_04 06_58_44 UTC).png renamed as icon-folder.png
icon-garbage (2015_09_04 06_58_44 UTC).png renamed as icon-garbage.png
icon-graph (2015_09_04 06_58_44 UTC).png renamed as icon-graph.png
icon-heart (2015_09_04 06_58_44 UTC).png renamed as icon-heart.png
icon-help (2015_09_04 06_58_44 UTC).png renamed as icon-help.png
icon-lock (2015_09_04 06_58_44 UTC).png renamed as icon-lock.png
icon-map (2015_09_04 06_58_44 UTC).png renamed as icon-map.png
icon-media (2015_09_04 06_58_44 UTC).png renamed as icon-media.png
icon-money (2015_09_04 06_58_44 UTC).png renamed as icon-money.png
icon-monitor (2015_09_04 06_58_44 UTC).png renamed as icon-monitor.png
icon-notes (2015_09_04 06_58_44 UTC).png renamed as icon-notes.png
icon-openmail (2015_09_04 06_58_44 UTC).png renamed as icon-openmail.png
icon-phone (2015_09_04 06_58_44 UTC).png renamed as icon-phone.png
icon-photo (2015_09_04 06_58_44 UTC).png renamed as icon-photo.png

s/ \(.*?\)// is a simple, if broad, expression, matching a space followed by parentheses-enclosed stuff. You can pick more precise expressions like:

s/ \(.*?\)\.png$/.png/ - like the previous, but matching only if followed by .png and the end of the filename, or
s/ \(\d{4}(_\d\d){2} \d\d(_\d\d){2} UTC\)\.png/.png/ - matching the date pattern shown in these files, and followed .png.

The -n option is for testing the command. Run without it if you're satisfied with the results.


I have same Lenovo and the same problem. Disabling wake on LAN in the BIOS works in my case.


https://www.youtube.com/watch?v=oYWer86A20s

I imagine tl;dr being: nvidia-settings --assign CurrentMetaMode="HDMI-0:3840x2160_30 +0+0 { ForceFullCompositionPipeline = On }"

HDMI-0:3840x2160_30 is part to change, HDMI-0 from xrandr


Mounting disk drives among different users

Will it work? The answer depends on how the permissions are set on the folder. No matter if it's linked or not, if the user is not privileged to access the directory, the user will not be able to.
Is this safe? It's safe if it does work, but you probably want to do this the correct way.......

How to mount a device so that other users have access to it:
First, with the device unmounted, make an entry for the device on a new line in /etc/fstab, making sure that there is still a final new line at the end of the file. It should look something like:
UUID=<uuid> /media/<mountpoint> ext4 user,defaults 0 1

Or:
/dev/XYZ /media/<mountpoint> ext4 user,defaults 0 1

Replace <uuid> with the UUID of the drive, <mountpoint> with the directory under /media that you want it to mount in, and /dev/XYZ to the device's name.
Second, make a new group and add the two users to it with:
sudo groupadd <group name>
sudo adduser <user1> <group name>
sudo adduser <user2> <group name>

Then make sure the mountpoint is owned by the group:
sudo chgrp -hR /media/<mountpoint> <group name>

Mount the drive with sudo mount /dev/XYZ or reboot.
This method will avoid messing around with symbolic links!


Missing Build Dependencies when upload to Launchpad

libswfdec was removed from Ubuntu & Debian so you will not be able to build that file in your Maverick PPA.

See the Ubuntu source package and the Debian removal bug.

Since this file is still in Lucid you may be able to build it there. See this page for more info about how to push to a different release.


I have this issue as well and think it's because of the new vsFTPd update to enhance security, so in the meantime I use this solution.

I chmod the folder that my FTP user comes in to as he/she first login (root folder) by using this in the terminal: sudo chmod a-w /home/user

You can change /home/user to whatever is your FTP user's root folder.
Create a subfolder within the folder, either by the use of GUI, or if you only have a terminal, it's: sudo mkdir /home/user/newfolder

Now you should be able to log in and read write within the "newfolder". You will NOT be able to write in the root folder itself from the FTP client with the chmod a-w, so that is the reason for the subfolder, and there you can.

I guess there will be a fix in a not-so-long time, but in the meantime I hope this helps.


Since you have a problem installing Intelij I wanted to suggest trying their toolbox app for managing IDEs and their versions. It's really easy to setup.

Go to the official site
Download .tar.gz
Extract it anywhere
Run the binary
Choose the Intelij version that you want and install it


How can I install software on my client using my Ubuntu Server?

Since as per your comment a CLI solution is ok, I'll post a CLI solution which you may use if you don't find a GUI equivalent;

Running ssh on the local host (in this case on the Ubuntu Server installation) you can get an ssh shell running on the remote host (in this case on the Ubuntu Desktop installation) which you can use to install the software via the command-line as you would on the local host (e.g. by compiling / installing or by running apt-get);

First, install the ssh server on the remote host:

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

Then you can run an ssh shell on the remote host by running the ssh client on the local host:

ssh user@host

Where user is the user you want to login as on the remote host and where host is the remote host's name / IP address.

The first time you'll be prompted with a message like this one:

The authenticity of host 'localhost (127.0.0.1)' can't be established.
ECDSA key fingerprint is FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF.
Are you sure you want to continue connecting (yes/no)?

Typing yes and hitting Enter you'll be prompted for your password:

user@localhost's password:

Typing your password and hitting Enter you'll be prompted with a message like this one:

Welcome to Ubuntu 15.04 (GNU/Linux 3.19.0-15-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

240 packages can be updated.
139 updates are security updates.

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

Typing exit and hitting Enter will end the ssh session:

user@user-X550CL ~ % exit
Connection to localhost closed.

While in an ssh session as a certain user you can execute any command the user can run on the remote host.

Installing software on the remote host from the local host using ssh + apt-get can be simplified e.g. by adding an user-defined function in your local host's ~/.bashrc (remember to run source ~/.bashrc afterwards):

function apt-get_install_remote_host {
    ssh -t user@host sudo apt-get install $@
    exit 0
}

And by calling the function:

apt-get_install_remote_host package1 package2 package3

Further Reading:

Is there an SSH client which duplicates commands to multiple terminals?
How to setup passwordless SSH access for root user


The secret is monitors.xml, simply copying your user configuration to the root will fix the issue. Assuming you configure your resolutions with the Gnome Settings Panel, as that will update monitors.xml, while xrandr cli will not.

sudo cp .config/monitors.xml /var/lib/gdm/.config/

http://old-blog.markladoux.com/2013/10/03/fixing-screen-resolution-for-gnome-and-gdm-on-fc19/


How can I force a USB modem to only connect via EDGE and not 3G?

click on network applet > Edit connections.. > Mobile Broadband

select your mobile broadband connection and click Edit

you will see dialog box as below,

change Type: to 2G (GPRS/EDGE)

click Save. now whenever you try to connect to internet it'll use only EDGE even if 3G network is available.


Packaging a header library, header dependencies

In the block for the A-dev binary package, you'd add B-dev to the Depends list.

(Real examples would really help us to help you)


I use EasyTag.

EasyTAG is a simple application for viewing and editing tags in audio
files.
It supports MP3, MP2, MP4/AAC, FLAC, Ogg Opus, Ogg Speex, Ogg Vorbis,
MusePack, Monkey's Audio, and WavPack files.
And works under Linux or Windows.


Why are none of my startup commands being executed?

xbacklight solution

1) Create an executable script file e.g. /home/YOU/.bin/lower-brightness like this:

#!/bin/sh
xbacklight -set 7 &

2) Create a .desktop file e.g. /home/YOU/.config/autostart/lower-brightness.desktop like this:

[Desktop Entry]
Type=Application
Exec=/home/YOU/.bin/lower-brightness
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=Lower Screen Brightness
Comment=Screen brightness is set to 7 at startup
Icon=display


Two Files icons in Ubuntu 20.04 application launcher

As you mentioned in the comments the following information on .desktop files on your system:

/usr/share/applications/org.gnome.Nautilus.desktop:Name=Files
/usr/share/applications/nemo.desktop:Name=Files
/usr/share/applications/csd-automount.desktop:Name=Files

it is clear that you also have a different file manager installed, "Nemo", or at least had it installed at one time. Anyway, its desktop file is still there.

One .desktop file is for file manager nautilus, the default file manager on an Ubuntu desktop. The other .desktop file is for nemo, a different file manager used as default in the Cinnamon desktop.

To avoid having two files icons, either

Remove nemo (never remove your default file manager), which will remove the .desktop file
If you wish to keep nemo, you can change the name of its icon by editing the .desktop file, so you can easily distinguish the icons.

To change the name of the icon for nemo:

Copy the file /usr/share/applications/nemo.desktop to the folder .local/share/applications in your home directory.
Edit the copy with your text editor and change Name=Files to, for example, Name=Nemo File Manager.
Save the file and close the editor.

The changed copy of the nemo.desktop file will override the system wide one. Accordingly, that icon will now appear as "Nemo File Manager".


Can you use an Ubuntu Live CD to fix windows FAT32 problems?

Not sure what the specific problem(s) might be, but try this:

sudo apt-get install dosfstools

This will give you something like the standard disk checking utils for Linux that (as the manpage claims) work on FAT16/32 partitions.  Once installed you can get some info on them via:

man dosfsck

I've never used these myself so I don't know how effective or comprehensive they are, but if an Ubuntu Live CD is going to be of any use, I'd start there.

If the data on the disk in question is very valuable - ie lots of money could be lost if it dies - then you may want to find a data recovery specialist.

Good luck!


I had similar problem, the following solution worked for me - delete the following files.

/usr/local/lib/libwsutil.so.*

/usr/local/lib/libwireshark.so.*

/usr/local/lib/libwiretap.so.*

Hope it helps you


Cannot connect to wireless projector (Samsung LED TV)

For the wireless projection You will need miraclecast to cast your screen over using the wireless display technology. To install miracle cast in Ubuntu via PPA:

sudo add-apt-repository ppa:thopiekar/miraclecast
sudo apt update
sudo apt install miraclecast ubuntu-restricted-extras check

If the apt update fails, it might be because currently, this ppa has no Releases file. With current versions of apt, this blocks the apt update because the ppa is not secure enough. To sidestep this, we can disable this check for this repo. This is an insecure thing to do. Bad actors with access to the PPA could publish malicious code there without having access to the release file signing key. Try at your own risk:

sudo vim /etc/apt/sources.list.d/thopiekar-ubuntu-miraclecast-disco.list

To the first line of this file, add the [allow-insecure=yes] part:

deb [allow-insecure=yes] http://ppa.launchpad.net/thopiekar/miraclecast/ubuntu disco main

Save the file, try the steps above again, from 'sudo apt update'.

To start casting

Shutdown wpa_supplicant and NetworkManager:

sudo killall wpa_supplicant && sudo service network-manager stop

Launch wifi daemon:

sudo miracle-wifid &

Now run miraclecast as a peer (peer is your device that is casting its screen to the TV):
Launch wifi control:

sudo miracle-wifictl

this should give you the miraclecast CLI and a link number. select the link with select link
Enable wifi-direct visibility on the other device (if possible)
From the CLI locate the TV using:

p2p-scan

you get something like

12:34:ab:cd:45:43.

ie the mac address

Then from the CLI initiate connection:

connect <mac addr> [pin]

the pin could be the pin of the tv

Also look at the answers to How can i connect ubuntu 17.10 to my LG Smart TV

The miraclecast project page is also here on GitHub.


How to use a specific DNS on wifi connection?

This Link will give you generic instructions that will always work system wide.

From inside Unity, click the wireless app indicator.
Go to the wireless tab
select your wireless connection
go to the IPV4 settings (assuming your using a pretty standard router)
change the drop down to Automatic DHCP addresse only
then in the DNS servers box put in DNS servers you want to use.

Save and exit, and you should be done.


I am unable to download eglibc 2.14 source through svn as www.eglibc.org seems to be down since the last 2 days. Is there an alternate way?

As stated on wikipedia, features of eglibc have been merged back into glibc, and development on eglibc has halted.

Aurélien Jarno has also noted back in June about Debian switching back to glibc, and the features missing in glibc that have yet to be merged/committed.

As a side note, why are you still using crosstool-ng 1.12.0?


This sentence has all answers:

  This time, When it was done installing, I got a boot error and was
  stuck at the grub recovery screen. I put the CD back in and rebooted,
  and this time I got an option to install Ubuntu over the existing
  one.

Installing over existing once erased Windows and installed Ubuntu over your laptop.

Same happened to me and I am windows free since April 2014. :)


To install the printer in Ubuntu, first you need to install a couple of dependencies:

Install pbmtojbg and inotify-wait:
sudo apt-get install jbigkit-bin inotify-tools

Now download the cups driver:
git clone git@github.com:droidzone/ricoh-sp100.git

Copy the file pstoricohddst-gdi to the directory containing cups filters:
sudo cp pstoricohddst-gdi /usr/lib/cups/filter/
sudo chown root:root /usr/lib/cups/filter/pstoricohddst-gdi

Now open the Printers applet:

Add Printer > Choose Ricoh SP 111 > Choose PPD file

Choose RICOH_Aficio_SP_111.ppd

If you're unable to select the PPD file by the above steps, try the following to add printer from the CUPS web interface:

In your web browser, navigate to http://localhost:631/

CUPS for Administrators > Adding Printers and Classes
Printers > Add a printer

Enter your root username and password

When your printer is connected and switched on Ubuntu should detect it and assign it a name. Select that printer right now. Click next a couple of times until you reach the section where you're asked to select the PPD file.

At this point, choose the file RICOH_Aficio_SP_111.ppd.

Source: My blog


How can I use pygi Webkit on a headless server install?

I followed this article for running a Firefox-based test framework on a server earlier this year. The Xvfb-stuff is pretty simple, we just need to make sure to turn the access controls off so X doesn't get all uppity. Something like this should get you going:

sudo apt-get install xvfb
sudo Xvfb :10 -ac
export DISPLAY=:10
# run your gubbins

Though you should note that this isn't going to provide everything a real desktop session has. If you ever get into that situation (where you need a real desktop) it might be worth separating that out into a virtual machine on top of the server. A little less inefficient but miles more portable.

Edit from Abraham:
I wound up using the methodology, but I wanted it in a python management task.  My implementation did the same thing, but it looked more like this:

from django.core.management.base import BaseCommand, CommandError
import subprocess, os
from multiprocessing import Process

def run():
    sub = Process(target=subprocess.call, args=(('Xvfb', ':10', '-ac',), ))
    sub.start()
    env = os.environ.copy()
    env['DISPLAY'] = ":10"
    tasks = ('random','management','commands','thatneedDISPLAY:X')
    for task in tasks:
        p = subprocess.call(['python','manage.py',task],env=env)
    sub.terminate()

class Command(BaseCommand):
    def __init__(self):
        BaseCommand.__init__(self)

    args = 'none'
    help = '''Run all daily tasks.'''

    def handle(self, *args, **options):
        run()


408 Request Time-out Your browser didn't send a complete request in time.

Basically, these 400s are status codes and are client Error messages
408 Request Timeout
The server timed out waiting for the request. According to HTTP specifications: "The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time."
In other words, your connection with the website "timed out."

First of all, you should check for the target link is right. Then, you can refresh the browser and try to connect the site again. You can successfully access to the targeted site if this is a temporary 404 error.
Try to visit some famous website like Google.com or Facebook.com and see whether you can normally access other pages. If you can successfully open other sites but only has the problem with the targeted site, the error may don’t come from yourself but that site. Just go to other sites.
If you can access to other sites like Google.com, but has a very slow speed, the cause may come from your network. Try to test your connection speed.
If the 408 error happens on a website with huge visits, the reason may be the server problems which are caused by the increased traffic. This situation general leaves when a part of users give up the site. In this case, you can wait for a moment and try to visit the site later.


After running update via terminal on Ubuntu 13.10 I am getting "Failed to fetch" error msgs. fixes?

404 means the files aren't there.
Perhaps the people who put them there made some changes ?


Install the gnome tweak tool launch it and change the cursor from there:

sudo apt install gnome-tweak-tool

In the Appearance tab make your changes. Also to add custom icons to use with your cursor simple down and extract it to the ~/.icons directory then gnome-tweak-tool should pick it up, and a restart may be required.


Vastly different size of directories in deja-dup and back in time?

Deja dup uses deduplication type of backup while BIT does file-based increments. Meaning that the files you modify are not removed from your backups by dejadup as long as you have old snapshots that have references to it. If you just started using BIT then it won't have references to files you may have deleted from your home folder while dejadup does.


Unable to open vim from command line in 16.04lts Server

As AlexP states, your /usr/share/vim/vim74/filetype.vim is completely mangled for some reason. The easiest way to restore it is to reinstall its source package.

To find the source package:

$ dpkg-query -S /usr/share/vim/vim74/filetype.vim
vim-runtime: /usr/share/vim/vim74/filetype.vim

To reinstall it:

sudo apt install --reinstall vim-runtime

In the future, if you want to detect corrupted packages early please refer to Find (and reinstall) packages with corrupted files (without breaking anything).


Cannot login to Ubuntu 12.04 after upgrade with weird keyboard layout

Are you able to login on constole instead of gui? (ctrl+alt+F2) than try to type

sudo apt-get install $(check-language-support -l sv)
sudo dpkg-reconfigure locales

And read this carefully https://askubuntu.com/a/149884/122014


Getting visual feedback of workspace switch in xfce

I wrote a small code that shows a notification on workspace switch action.
This code requires libnotify and libwnck

To compile it use the command:

gcc -O2 -o wsnd `pkg-config  --cflags --libs libnotify --libs libwnck` wsn.c

If you found compiling errors with above command, try this one:

gcc -O2 -DWNCK_I_KNOW_THIS_IS_UNSTABLE -o wsnd `pkg-config  --cflags --libs libnotify --libs libwnck-1.0` wsn.c

To test it from a terminal: ./wsnd

Include it  as XFCE startup application:
In XFCE you need to add it as startup applicaion on settings-manager->session and startup -> Application Autostart

The code:

//////////////////////////////////////////////////////////////////////////////////////
// Workspace Switch Notifier                                                        //
// Shows a OSD with workspace name on workspace switching action                    //
//                                                                                //
// wsn.c -                                                                          //
//                                                                                //
// Authors:                                                                         //
//    Isaac Maia Pessoa                                                             //
//                                                                                //
// This program is free software: you can redistribute it and/or modify it          //
// under the terms of the GNU General Public License version 3, as published        //
// by the Free Software Foundation.                                                 //
//                                                                                //
// This program is distributed in the hope that it will be useful, but              //
// WITHOUT ANY WARRANTY; without even the implied warranties of                     //
// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR               //
// PURPOSE.  See the GNU General Public License for more details.                   //
//                                                                                //
// You should have received a copy of the GNU General Public License along          //
// with this program.  If not, see <http://www.gnu.org/licenses/>.                  //
//////////////////////////////////////////////////////////////////////////////////////

#include <libnotify/notify.h>
#include <libwnck/libwnck.h>

#define N_SUMMARY "Workspace Changed"
#define N_ICON    "dialog-information"
#define N_APPNAME "workspace switch notifier"
#define N_TIMEOUT 2000 /*2000ms = 2s */

static NotifyNotification * m_notification = NULL;

static void
on_active_workspace_changed (WnckScreen    *screen,
                             WnckWorkspace *space,
                             gpointer      data)
{

  WnckWorkspace * active_workspace = wnck_screen_get_active_workspace(screen);
  const char * w_name = wnck_workspace_get_name (active_workspace);

  notify_notification_update(m_notification, N_SUMMARY, w_name, N_ICON);
  notify_notification_show(m_notification, NULL);
}

int main(int argc, char ** argv)
{

   GMainLoop *loop;
   WnckScreen *screen;

   if (notify_init(N_APPNAME))
       m_notification = notify_notification_new(N_SUMMARY, "" , N_ICON);
   else
       fprintf(stderr, "Failed to init notifications\n");
   notify_notification_set_timeout(m_notification, N_TIMEOUT);

   gdk_init (&argc, &argv);

   loop = g_main_loop_new (NULL, FALSE);
   screen = wnck_screen_get_default();

   g_signal_connect (screen, "active-workspace-changed",
                    G_CALLBACK (on_active_workspace_changed), NULL);

   g_main_loop_run (loop);

   g_main_loop_unref (loop);

   return 0;
}


Installed evince-gtk package to view PStoPDF
Link to the package


How to make a ISO image from a Bootable DVD in windows?

Download Imgburn.

Install it.

Now run the software.

Select "Create image file from disc".

Select the "source". It's your DVD writer.

Select the "Destination".

Click this icon.

Wait for your image file to be created. Finally, you get an iso file in the destination folder. Now, burn that to a USB and you are good to go.
Hope it helps you.


any basic app packaging guide for a newbie?

You seem to have a misunderstanding of what a .deb is.  The .tar.gz is the source code that is partly used in the source package, but not the source package for the deb itself.  Start by reading the Packaging Guide, it should be a good starting point for you.


If you have SSD's in your computer...

A shot in the dark suggestion is to check your hard drives and peripherals. I'm guessing that you hard powered off your computer during Windows repair so it may have caused a power problem. If you have any other storage devices like a SSD used for caching, it could have been temporarily damaged so that may be causing Ubuntu to hang indefinitely if its not working correctly.


Ubuntu 14.04 and Win8 problem; no to LiveDVD

To solve this issue, reboot your PC and follow the on-screen instructions to enter your boot menu. Usually this is done by pressing Esc or F12. Then select CD-ROM from the option menu.


Can't write to a file with open-world write access

No, you don't have permissions to write to the file. It's the symbolic link which has rwx-permissions for everyone, but you don't write to the link, you write to the file the link points to.

$ ls -l /etc/alternatives/awk
lrwxrwxrwx 1 root root 13 Apr 28  2018 /etc/alternatives/awk -> /usr/bin/gawk

You can see the link points to /usr/bin/gawk, so look at it's permissions:

$ ls -l /usr/bin/gawk
-rwxr-xr-x 1 root root 658072 Feb 11  2018 /usr/bin/gawk

/user/bin/gawk is owned by root and only root has write permissions,
that's why you get Permission denied.


I had this exact problem. It turned out IT had installed some old version of VMWare tools with non-functioning vmhgfs kernel module.

My solution was to run the configuration with the clobber-kernel-modules setting to overwrite the existing vmhgfs module.

 sudo vmware-config-tools.pl -d --clobber-kernel-modules=vmhgfs

The -d selects all the defaults for you (remove it if you don't want the defaults).


How can I create one logical volume over two disks using LVM?

You should have a look at this detailed answer.

Here's a summary of it:

Create a physical volume on the first hard drive, and another physical volume on the second hard drive.
Create a new volume group, assigning both physical volumes to it.
Create a new logical volume in that volume group.
Create a new ext3 filesystem in that logical volume.

The diagram I copied from this answer visualises this (but with three filesystems, rather than just one):

As you can see, creating an ext3 filesystem is the last step, not the first. If you have an existing ext3 partition that isn't in LVM, you can't migrate it to LVM. You'll have to backup the partition, delete the partition, setup LVM, and then copy the files back.


Flutter installation perplex on Ubuntu 18.04

A current solution is to first remove the Snap app and to install Flutter manually. To remove Flutter, run snap remove flutter from the terminal.
Because the process is subject to change, it's best practice to link to the official directions.
Install Flutter on Linux
NOTE: Before beginning, make sure you meet the requirements for tools, disk space, and libraries.


the packet flow from a network interface to a local process? help!

There is an excellent iptables flow diagram on @bodizazen's web site.

Yes, packets travserse the iptables "chains" as per the diagram. However, one must keep in mind some special cases. For example, the nat PREROUTING table is only consulted once per "NEW" connection, and thereafter subsequent packets traverse the path forged by the first one.

A very good way to assist with learning iptables is to place logging rules, with unique identifiers, throughout your rule set, so that you get feedback on packet flow through the rule set for differing scenarios. Combine that with using a packet sniffer such as tcpdump or wireshark, to gain furhter insight into what is going on.


How can you resize the icons in the Unity Dash?

With Unity tweak tool you can customize several properties. It is available through the Ubuntu Software Center or you can fire up a terminal and type

sudo apt-get install unity-tweak-tool


Failed 12.04 upgrade, recovery mode unavailable with whiptail error

I got zero replies, but I fixed the problem, sadly by re installing from scratch from the Ubuntu-10.10-AMD6 DVD

This time I set up partitions manually to something like this:

/boot    primary     ext4 512MB

/        primary     ext4 150GB

swap                 ext4 100GB

/home   logical      ext4 remaining GBs

Immediately after the install the system warned me that 10.10 was no longer supported and asked me to update and then to upgrade to 11.04. After the updates I rebooted the system, then issued the command

sudo apt-get install nvidia-new

rebooted, and then upgraded to 11.04 . When the upgrade to 11.04 ended, I rebooted, went to system settings/Additional Drivers, where I saw that the nVidia accelarated graphics was activated “but not in use”.  I played to mae the dual-monitor system work,

Then I upgraded to 11.10, rebooted, did the updates, re installed tools I was using.

I am NOT TOUCHING 12.04 until I have evidence that the AMD FX-6100 MOBO works with the nVidia GeForce 550 Ti card works

So I am posting this response hoping to save for other people the countless hours I wasted.


Start openvpn client command from a Desktop File?

Found the mistake, thanks to the suggestions in AlexOnLinux comment.

Desktop File was good, but in the Script I needed to use the absolute path:

sudo openvpn --config /home/david/vpn/Zurich.ovpn

Thanks.


First, a file with a .c extension most likely is a C source file. No use in disassembling it. To verify that a file actually is a program, use the file command:

$ file test.c
test.c: ASCII text
$ file /bin/bash
/bin/bash: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked
(uses shared libs), for GNU/Linux 2.6.24,
BuildID[sha1]=54967822da027467f21e65a1eac7576dec7dd821, stripped

As for disassembling, use objdump instead. From the manpage:

NAME
       objdump - display information from object files.

SYNOPSIS
       objdump [...]
               [-d|--disassemble]

So to disassemble, let's say, a file called a.out, use

$ objdump -d a.out

a.out:     file format elf64-x86-64

Disassembly of section .init:

00000000004003a8 <_init>:
  4003a8:   48 83 ec 08             sub    $0x8,%rsp
  4003ac:   48 8b 05 45 0c 20 00    mov    0x200c45(%rip),%rax        # 600ff8 <_DYNAMIC+0x1d0>
  4003b3:   48 85 c0                test   %rax,%rax
  4003b6:   74 05                   je     4003bd <_init+0x15>
  4003b8:   e8 33 00 00 00          callq  4003f0 <__gmon_start__@plt>
  4003bd:   48 83 c4 08             add    $0x8,%rsp
  4003c1:   c3                      retq
[...] and so on...


Laptop's Internal bluetooth not being recognised by ubuntu: how to diagnose the problem?

First of all check if Bluetooth is turned on in BIOS.

Make sure there are no any more switch to turn it on/off. Not with only Fn+F3

Use lsusb | grep -i bluetooth to see if system recognises you BT device.

p.s. Have you already used BT on this notebook before? Because you may have standard case with BT indicators and switches, but no BT really installed. Just asking.


Look up the missing packages in the Ubuntu package index for xenial-updates (example) and download them for your architecture. Then install them with your favourite package manager. On the the command line that could be:

sudo apt install libboost*_$(dpkg --print-architecture).deb


Windows Host Shared Folder in Ubuntu 20.04

This answer is similar to the one posted by @user1099476 but will apply at boot.
Edit /etc/fstab and add:
vmhgfs-fuse    /mnt/hgfs    fuse    defaults,allow_other    0    0

Make sure the target folder exists. If not:
sudo mkdir /mnt/hgfs

Then remount:
sudo mount -a


'' ("the cache has no package named 'wine-staging-I386'")

Okay, after trying a number of things I have finally figured it out:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A902DDA375E52366

then I ran

sudo apt-get update && sudo apt-get upgrade

BUt ended up getting the same error as before:

The following packages have been kept back:
wine-staging wine-staging-amd64 wine-staging-i386:i386
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

Then I clicked on the error shown in the screenshot attached above -> show updates -> and updates went through okay. Hope adding that key was the right thing to do....? Also, does anyone know WHY did I start getting this error (so I can avoid this in the future)?


Mac OS X, Ubuntu dual installed incorrectly; what is the preferred way to go back and try again?

You probably only need to hold alt/option and select macintosh HD to boot from. From within OS X reinstall refind using the ./install.sh

Otherwise to do this from scratch, use the following instructions:

Reformat the drive completely using gparted.
Install osx yosemite:

in the install phase, use Disk Utility to format your desired space for Macintosh HD using journaled case sensitive. Save the remainder of your HD as "freespace"
2.after install of OS X is complete, bootup and enable the filevault.
after filevault is complete, install refind using the ./install.sh
install ubuntu with the bootable usb from refind
on boot, hold alt/option and select macintosh HD.
reinstall refind ./install.sh

should be good to go. Whenever you install a new linux system you will need to reinstall refind.


Because of possible performance issues you should choose Xubuntu 12.04 32-bit. Xubuntu 12.04 is a Long Term Support release (LTS) that is supported by updates until April, 2015 (Update: the latest LTS release is 14.04). Lubuntu is also an option, but it does not yet have Long Term Support. However Lubuntu 14.04 will be an LTS release which will be supported by updates for three years until April, 2017.


I installed them with the .exe and then moved the .dll to the specified folders. FL recognizes them, it just shows a grey box saying "loading plugin" and I can choose my preset sounds but the GUI doesn't work i.e. can't play keys on piano, knobs wont move.


Logging out then logging back in as a different user, then logging out and logging back in as my regular user fixed the issue. It has to be a full logout/login, not a user switch, and it must be another user, not the same one. Sounds like voodoo, but found the answer here


How can I install Cinnamon on a minimal CLI installation?

In addition to cinnamon and X, you should install a display manager like LightDM or SLiM. I found this necessary when I tried to install cinnamon 1.6 along with the mini.iso of Ubuntu.


Ubuntu extract zip package is flattened, sub-folders are missing

Windows zipped the package using Windows path separators '\'. Ubuntu A (v19) seemed to be fine with it. But didn't work with Ubuntu B (v18). I got around the problem using 7zip instead of the default Windows zip.


Not showing GRUB in windows 10 dual boot

Try running boot repair when you are on Ubuntu or boot into ubuntu from a LIVECD.. It fixed the issue of grub not working in my case :
Follow this:
https://help.ubuntu.com/community/Boot-Repair


+ubuntu +20.04 lsdvd "libdvdread: Could not open /dev/dvd with libdvdcss."

My internal cd/dvd drive was becoming buggy on my Lenovo-ideapad-300-17ISK laptop, so I bought an LG external cd/dvd drive today (model SP80). I expected problems after losing my last fight with getting a Brother scanner/printer to scan and send the image to my laptop. I ended up bringing in a Windows 7 laptop as a workaround, and so I was prepared for disappointment with the new external cd/dvd drive. The new external cd/dvd drive would light up and spin when I put in a DVD, but it would quit without launching my default media player, VLC. I was not sure that my Ubuntu 20.04.02 laptop was even recognizing the new drive. So, I searched the Internet and found some terminal commands for displaying information about the available drives, and I so I set up to execute the commands after starting the new drive again, and I don't think the new drive showed up, but rather only the old internal drive. I thought, 'maybe a less demanding file format might make it through since some posts indicated that audio files got through.'
So, I tried again, but the audio file may have been DRM protected, so I tried a simple no-DRM audio disk (.wav files) and it worked. It took quite a while for VLC to open up and start playing the disk. Even then, it felt wrong because the new drive kept starting and stopping. It felt cheap. Perceptions aside, that may be how they all work, and I just didn't notice before. Some of the Internet posts mentioned that the external drives need to be mounted, and the posts suggested using the default program called "disks." The "disks" utility can apparently be used to mount both files/partitions and media devices, such as my new drive, and my old internal drive is in fact listed in "Disks" as being in dev/sr0 as a directory location. I was hesitant to just follow the instructions in Internet posts for mounting my new drive without understanding anything (though I have done that before), so I wanted to see more information. I set up "Disks" to launch, and then I restarted my new drive (plugging it into the USB anew), and voila! my new drive showed listed in "Disks." However, it, too, has the same directory location as the old drive, dev/sr0, and that bothers me. How are the different drives going to be distinguished under the hood if they do not have separate final directories? The only drive with a disc in it may be enough, but some of the Internet posts talked about creating a new final directory for the new drive. However, given how API's may work in VLC, I am not comfortable with creating my own previously unknown directory and hoping that other programs will correctly find it. This all looks nuts to me. As an aside, I noticed later that when I first plug in the new drive with a DVD in it, the title of the movie briefly appeared in small text, and then disappeared, but I am now having trouble recreating that, although I think that it was briefly appearing in the top bar of VLC. That told me that the movie is available and is being read initially, but something breaks down from there. I don't have the solution to your problem, but I thought that it might help you by seeing how I am approaching it.


Yes, it's possible to “hide” a partition on a removable drives from Windows, since it only looks at the first partition on them. Not all external drive announce themselves as such. If Windows believes, that the external drive is a regular hard drive, it will list all partitions anyhow.

Here's how I did it on my USB flash drive:

Re-partition your external drive (e. g. with GParted):

Shrink the first (and only) partition on your external drive or delete it and create a smaller one in its stead. Leave enough space after its end for Ubuntu (1.5 GB should be enough, if you just want a plain live system that doesn't retain changes between boots). You can put whatever you want on this partition, since it's irrelevant for the Ubuntu live system, that you're going to install later on.
Create a second partition for Ubuntu. If you don't need to access it with Windows, you can format it with ext4 instead of FAT32.

Install UNetbootin and run it. It will ask for a password for super-user privileges.
Select the correct disk image for the Ubuntu live system installation, set the drive type to “USB drive” and select the 2nd partition on it as the drive (here: /dev/sdg2). Note the 2 at the end of the device name. If you have more partitions on the drive, you can select those too, as long as they're not the first.

Click the OK button and let UNetbootin do its job.


You cannot install USC 5.0 easily on 11.04

It will cause unmet dependencies and make you hold broken packages


No Bluetooth connection for keyboard and mouse for Dell XPS M2010

you have to pair the keyboard to work on Ubuntu, but when you revert to windows 7 you have to repeat the procedure, I gave up trying, also I couldnt get sound through the speakers, only via mic.


How can I find lost document created using Lubuntu guest account?

Guest accounts store their home directory in /tmp.

So if you rebooted, the document is absolutely gone since tmp is not stored to disk.

If you didn't reboot, the home directory for the guest is in /tmp, it will be /tmp/guest-XXXXX, where XXXXX is a random string of characters. You can use sudo to look in that directory.

EDIT: Here's a simple way to take ownership of the guest directory so you can poke around in it, substituting the real directory name for XXXXX

 sudo chown -R `whoami`:`whoami` /tmp/guest-XXXXX

Once you do that just cd into that directory and poke around, or you can use Nautilus to look at files.


The problem is usually caused by bad latency and incorrectly set frequency settings in Pulse Audio. it's possible to fix but disabling pulse audio is probably something to look into too.

See this article about all your sound options: https://help.ubuntu.com/community/UbuntuStudioPreparation


What are some known VPN servers which work well with iOS and OSX clients?

OpenVPN can be installed through the Ubuntu repositories and even has a GUI client on Apple.

OpenVPN Installation Instructions
Tunnelblick, OpenVPN GUI for OSX

OpenVPN can be installed like so:

sudo apt-get install openvpn

It seems GuizmOVPN supports OpenVPN connections from iOS

  GuizmOVPN is an OpenVPN GUI for iPhone/iPad, designed to be easy to setup, configure and run.

Source: http://www.guizmovpn.com/

According to this site, All OpenVPN connections require a jailbroken Apple Device.

  On iOS, you need to have a jailbroken device.

Here is a list of supported VPN connections with iOS: http://support.apple.com/kb/HT1288

I'm really only familiar with OpenVPN on Ubuntu, so I'm not sure I can be of much more help.


Yes, you can upload packages for any of the architectures supported by the store (amd64, i386, armhf, arm64, even ppc64el and s390x if you want). The only requirement is that you must be able to actually build the snaps for those architectures (unless your snap is all shell script or similarly non-arch-specific). You can do that in a few different ways:

Build your snaps on a device (or emulated device with) the desired architecture. This really the only way if your snap is closed source and you want complete control of its build process.
Build your snap on the (freely available) Launchpad snap builders: submit the project containing your snapcraft.yaml to Launchpad and select which architectures you want to support, and it'll build (and even upload to the store) your snaps for you. You can read more about that here.

Either solution results in a snap you can submit to the store alongside the other revisions you already have uploaded that target other architectures. It'll get its own revision number, etc.


You've to install smb protocol first:

sudo apt-get install samba

and configure it :
Samba server on Ubuntu

And enjoy!


Completely uninstall xampp if not installed from apt-get

This should remove XAMPP completely as they provide the uninstaller files in /opt/lampp/

 sudo chmod +x /opt/lampp/uninstall
 sudo /opt/lampp/uninstall

Then you can make sure the unistallation is complete by doing user318149's answer above. cheers


Ubuntu 12.10 has 80 Degree Celsius laptop temperature

You could try taking a can of compressed air and blowing it out.


SBCs like the Raspberry Pi are typically of a different ARM based hardware architecture and designed to boot from a microSD. Traditional desktops/laptops are not.

Surely a better and faster drive like an SSD as mentioned in the question would give better results but the requirements are very different so they can perform quite well even when booting and running the OS from SD/MMC cards.


when I type apt-get -f install, I get the error message

I've searched and found that the package xserver-xorg-video-5 is a Debian virtual package.

Normally this package not exists in Ubuntu. If you run the command

sudo apt-get install xserver-xorg-video-5 the results will be

Package xserver-xorg-video-5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'xserver-xorg-video-5' has no installation candidate

So , I assume you've added an external source (PPA) to install this package that broke your system.

What I suggest is to purge the ppa you've added with ppa-purge program.

sudo apt-get install ppa-purge
sudo ppa-purge <ppa-name>
sudo apt-get update
sudo apt-get dist-upgrade

If you don't know what ppa should purge, purge them all. External sources (repositories) sometimes interfere with essential system packages and problems like this occurred.(system breakage)


Creating a .desktop for Unigine Heaven 4.0

If we examine the executable script heaven we shall see the paths inside are relative:

#!/bin/bash

cd ./bin
ARCH=$(uname -m)
if [ "$ARCH" == x86_64 ]; then
    export LD_LIBRARY_PATH=./x64:$LD_LIBRARY_PATH
    ./browser_x64 -config ../data/launcher/launcher.xml
else
    export LD_LIBRARY_PATH=./x86:$LD_LIBRARY_PATH
    ./browser_x86 -config ../data/launcher/launcher.xml
fi

So the solution is to add working directory (Path key) to the launcher (the .desktop file):

[Desktop Entry]
Version=1.0
Name=Unigine Heaven 4.0
Type=Application
Icon=heaven-icon.png
Path=/home/<user>/Unigine_Heaven-4.0
Exec=/home/<user>/Unigine_Heaven-4.0/heaven
Terminal=false

Replace /home/<user>/Unigine_Heaven-4.0 with the actual path in use.
Please note also this change: Terminal=false.
The solution provided by @Sans also works:

Exec=sh -c "cd /home/<user>/Unigine_Heaven-4.0/heaven; ./heaven"

References:

Setting the working directory
Recognized desktop entry keys


/usr/share/kwin/effects/

On my Kubuntu 18.04:

$ ls /usr/share/kwin/effects/ -1
desktopgrid
kwin4_effect_dialogparent
kwin4_effect_eyeonscreen
kwin4_effect_fade
kwin4_effect_fadedesktop
kwin4_effect_frozenapp
kwin4_effect_grayscale ***
kwin4_effect_login
kwin4_effect_logout
kwin4_effect_maximize
kwin4_effect_morphingpopups
kwin4_effect_scalein
kwin4_effect_translucency
kwin4_effect_windowaperture
presentwindows
$

*** For kwin4_effect_grayscale which is a downloaded plugin, see How can I get a grayscale effect in Kubuntu 18.04 using KWin?.

(I don't know why there is use of kwin4. The use of kwin4 continues even in Plasma 5.18.3 used by Kubuntu 20.04 and in openSUSE Tumbleweed 20200314.)

  Also searching plugins by name in suspected directories like "/usr" doesn't yield any useful results

True. Getting the actual name isn't obvious from looking at kcmshell5 kcmkwineffects.


How does Ubuntu manage so many daily images?

For Ubuntu probably it is done in a similar way than for Debian. Here some info about the Debian Autobuilder network.

Here some details on how to build a specific Ubuntu installer image.

For Debian, to decrease server-load, there are many mirrors which e.g. provide the cd-images build by the main Debian-servers. Most mirrors are maintained by volunteers. Here some doc about : Debian Mirrors. The same exists for Ubuntu: Ubuntu Mirrors

It should be sufficient to have one or maybe two build-servers per architecture. Each build-server can build the cd-images for its own architecture, for all the platforms, for all versions periodically.
( When using cross-compilation, even less build-servers could be needed )

Before uploading a installer-cd-image there are many integration-tests which need to be run in order to validate, that newly build packages do work with each other (see specification dep8) And of course there are package-specific tests during the build of each package.

However I dont know if the cd-builds itself are triggered by script + a cron job, or if they use some kind of software for continous integration (e.g. Jenkins). Or if they use a tool like automated linux from scratch.


Ubuntu 16.04 MariaDb no sample configurations

All these configurations are applied. Here's the full directory structure:

$ tree -f /etc/mysql
  /etc/mysql
  ├── /etc/mysql/conf.d
  │   ├── /etc/mysql/conf.d/mariadb.cnf
  │   └── /etc/mysql/conf.d/mysqld_safe_syslog.cnf
  ├── /etc/mysql/debian.cnf
  ├── /etc/mysql/debian-start
  ├── /etc/mysql/mariadb.conf.d
  └── /etc/mysql/my.cnf

It all starts with with /etc/mysql/my.cnf, which ends as follows:

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/

That means every file in that directory is included. Files are read in alphabetical order, so the prefixes such as 50- are used to specify order.

The benefit of this system, which Ubuntu uses for many other configurations as well, is that updates to the packages (and therefore default configurations) can be installed without conflicting with your changes and/or additions. It's also helps to remember what changes you actually made to these files–because you don't make any changes, you only create new files.


Puerto Rico locale is wrong concerning the time format

If you want to change the format in Date and Time , you must install dconf-tool . From terminal do

sudo apt-get install dconf-tools

Find it through Dash by writing dconf open it and goto Com > Canonical > Indicator > Datetime and from there you can change the format.

In order to show AM/PM you have to change the clock format field in the digital clock settings to %I:%M %p

Logout and Login for changes to take effect.


Pidgin: Yahoo Instant Messenger Deadline

A replacement Yahoo! protocol plugin is in progress.  The installation instructions for both Windows and Linux are located at the bottom of the README.  I tried it about two weeks ago and my Pidgin crashed, you might have better luck as there has been a fair amount of developer activity since.

https://github.com/EionRobb/funyahoo-plusplus


.local is a hidden directory on my system. In files, you can show hidden files (menu top right - three horizontal lines) has the option to show them. It's inside the home directory.
I hope this helps! :-)


Installing Ubuntu Server 18.04.1 alongside Windows 10?

The Ubuntu Server installation media and installer do not have a side-by-side installation feature.  That is a Desktop-installer-only feature at the moment.

If you intend to do a 'side by side' installation with Ubuntu Server's installation media, you'll have to do the 'side by side' stuff manually.

Adjust your partitions manually, resizing and/or creating the partitions through a separate mechanism such as Windows or another Ubuntu ISO (boot to Ubuntu Desktop and use gparted), and then do a custom partitioning scheme when you are presented with the "Use whole disk", "Use whole disk and LVM", "Something else", etc. partitioning step, and specify the partition(s) and mountpoints to utilize manually.

Alternatively, install the Desktop version of Ubuntu, and then just install server packages inside of it.  Under the hood, Ubuntu Server and Ubuntu Desktop are both "Ubuntu" and can both run server packages without issue, the difference is that Ubuntu Server is 'headless' and has no GUI overhead to worry about, as well as a different 'default' packageset.  But you can still use a Desktop install for server packages nonetheless.


saods9 is only supported on Ubuntu 14.04 and later. You may be able to install it on 12.04 using a PPA from here.


How to change OS from ubuntu to windows7

boot in to ubuntu and make windows7 bootable pendrive. you need windows7 iso image for this.

open Ubuntu software center and install unetbootin.

then use unetbootin to burn iso into pendrive ( this link explains how to burn iso in windows but same applies in ubuntu). then boot into pendrive by pressing F12(may be F8 or F2 in some) in most computers. Then click install windows. backup your data before you install windows.


Why I can't open folders copied from Ubuntu on Windows?

Try changing  the folder  permissions  to your user name by entering

sudo chmod *username* /folder/filename

where folder and file name are the path to the folder you want to edit.

I want to edit, for example, contacts.csv  located on my desktop, so I use

sudo chmod rmaultz /home/rmaultz/Desktop/contacts.csv

or  to change a folder  recursively I would use

sudo chmod -R rmaultz  /home/rmaultz/Desktop


I need a portable OS on USB that can save document changes to the USB

https://wiki.ubuntu.com/LiveUsbPendrivePersistent

Google Search turned this up it appears the second part of your question
(document changes save-able)
is explained here

thanks for asking this because ive been wondering too!


Recent Chats and Bookmarked Chats sub-menu is not visible on Skype AppIndicator

At https://launchpad.net/bugs/1280109 I reported the same observation as regards the "Recent Chats" and "Contact Groups" sub menus on Skype 4.3.

I had upgraded from an existing Skype 4.2 installation, so I had a previous history in my ~/.Skype folder. The problem disappeared when I moved away that folder, so my conclusion is that there is something in the history recorded by Skype < 4.3 that is not compatible with version 4.3.

If this proves to be the case for you too, it would be great if you could add a comment about it at https://launchpad.net/bugs/1280109


https://unix.stackexchange.com/questions/176445/how-to-configure-debian-with-thinkpad-t440-trackpad-clickpad -----> Tried to post the code, but wasn't working. Conf file is there with instructions.

You can restore gnome-specific settings with the following commands in terminal:

rm -rf .gnome .gnome2 .gconf .gconfd .metacity

For details you can see How to Reset Ubuntu/Gnome Settings to Defaults without Re-installing | Linux FUD

Additionally you can verify that there are no broken dependencies using:

sudo apt-get check

And then you can troubleshoot your remaining problems one-by-one.


Make sure that sshd will automatically start after reboot

There are some ways. You can create a cronjob which runs at reboot to start the SSH daemon. You can create a script which runs when the network comes up and starts the SSH daemon (via Network Manager's dispatcher facility, for example). You could add a command to /etc/rc.local to start the SSH service. You could write an Upstart job (and thus duplicate some work).

However, the fact is that the SSH service is autostarted by default. As long as the network comes up fine, you should be able to SSH into the system. If the SSH service failed for some reason, there's a good chance none of the aforementioned methods would have worked anyway.


How to install Ubuntu, remove Mint and set up a separate home partition?

First things first, make sure you have all your files backed up to a different device.

When installing Ubuntu,you'll be prompted to choose your installation type. Select "Something else".

This will take you to the Gparted partition editor.
You should see one or more NTFS partitions. That is (these are) your Windows partition(s). Then you should see an ext3 or ext4 partition. That will be where your LinuxMint is currently installed.

From your description you want to overwrite your Mint partition and add a separate /home partition.

To do this, Double click your Mint partition (/dev/sda5 in this example). This will allow you to edit the partition.

Resize this partition. Make sure it is at least 4GB. IN this example I chose 6GB. To figure how many MB you need, Multiply 1024 by the number of GB. (example: 1024 x 6GB = 6144MB)
Select Format partition. Later when you apply these settings All Data will be lost!!!
You'll want to set the mount point to /.

When you select "Continue" a Warning will pop up. Please understand that this will write to disk. And you could lose data on the edited partition.

This should leave you an new grey "Free space".

Double click on "Freespace", to "Create New Partition". In the dialog box that pops up select ext4 and set the mount point as /home.

Your final out come should look similar to this.

Continue with the installation.

For more information on using Gparted checkout dedoimedo.com


You don't need to download from sourceforge.net. You can simply use:
sudo apt update
sudo apt install ndiswrapper-common ndiswrapper-utils-1.9

You can read full instructions here.


As of Ubuntu 13.10 this bug is resolved for me.


fc built in missing from dash ( i.e.,dash shell history doesn't work )?

Check line number 57-59 in src/builtins.def.in of the dash source code:

#ifndef SMALL
histcmd     -u fc
#endif

SMALL is defined if --with-libedit is not set in configure, which is the case for our dash/sh. I guess it's about optimzing the memory footprint.

Also Changelog says:

2005-10-29  Herbert Xu <herbert@gondor.apana.org.au>
[...]
* Disable histcmd completely when SMALL is defined.
[...]

If not compiling with --with-libedit was a deliberate choice or not is beyond my knowledge.


Is there a program similar to Wine that runs Mac software?

Unfortunately there currently aren't any WINE like emulators that run Mac applications. However there is an application which is meant to do this which is currently in development called "Darling".


Do you know what make of a wireless card you have? I have this issue after every update, but this is a known issue with broadcom cards. If you have that card try this https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx#Installing%20STA%20drivers it works for me, unlike the Restricted Driver option


How to upgrade kernel version in the netboot installer?

The requered udep was createt by the debian-installer build process and strored in the apt.udeb/cache/archives folder.


First, try to unzip the moadmin.zip file.
Check if you have installed apache and php for Ubuntu.
Install the php-mongodb extension.


Can't log in to Google through Lightread

To fix this, press the cog (settings) button on the upper-right corner and sign out. Login again with your account and it should work. It worked for me.

Also, if the refreshing icon will keep spinning but wont update anything, try to change or make the refresh interval to manual. Just found out that.


You need to reinstall Ubuntu, but without changing to Legacy mode in the BIOS. Ubuntu supports EFI perfectly. I'm pretty sure your problem is that the EFI version of Windows 8 was installed, while you installed the BIOS/Legacy version of Ubuntu.

Try to boot into the legacy part of Windows when it is EFI won't work. You could also try this, in case you don't want to reinstall Ubuntu. Start up Ubuntu and open a terminal window. Then run

sudo update-grub

This might work, but I think the first method will work a lot better.


How do I use the scroll wheel click to close apps displayed on Alt+Tab on Ubuntu 18.04?

Closing an item on the Alt+Tab list with the mouse is not implemented. However, out of the box, you can close apps on the switcher when you hit Alt+q.

This might even be faster than the mouse: your one finger is already on Alt. Just move your other finger from Tab to q to close an app without leaving the switcher.


Although I have not received an update for 3 days, you should be sure to run both sudo apt-get update and sudo apt-get upgrade together, as one gets new package versions, and one actually installs the updates.

I generally get updates at least every week, if you don't, try switching your mirror back to the main ubuntu repository in your software and sources.


Choppy video under Ubuntu but not Windows

This is an H.264 30FPS high-resolution video and to play it smoothly you need hardware acceleration, and as it plays smoothly under Windows and not under Ubuntu, (I'm assuming this is on the same machine) this leads me to believe you have installed the correct video drivers under Windows but not under Ubuntu.

So this has nothing to do with Ubuntu or the video itself, but with the video drivers under Ubuntu...

Go here for nVidia
Go here for AMD

If it plays well on a fast new Windows machine and doesn't play well on an old clunker that has Ubuntu installed, just transcode the video to a lower resolution and frame rate and the old clunker will be able to play it smoothly as well:

ffmpeg -i 20181011_113036-0.MP4 -c:v libx264 -strict -2 -r 25 -s 1110x832 -c:a libmp3lame -b:a 256K 20181011_113036-1.MP4

Note: On my machine running Ubuntu, 20181011_113036-0.MP4 plays smoothly out of the box...


Emergency mode after upgrading to Ubuntu 17.10

The errors shown in your last screenshot shows, that your modules.dep might be outdated or wrong. in order to fix that automatically, get into root shell what you have already managed, and run

depmod
sync

after that, restart your system normally.


gnome weather forecast information is currently unavailable

After I Upgrade Ubuntu from 20.10 to 21.04. Weather forecast work well.


this line sudo chown -R www-data:www-data /var/www made the directory to user www-data so other user can't write, why not try something like chown -R :www-data /var/www


Do you have git installed?
You can check that by opening your terminal and typing:
apt policy git
If it shows Installed: (none), it means git isn't installed. You can install it by typing:
sudo apt install git
After installing it you can clone the repository.


how to delete all but X last items from find

Here you are:

find . -maxdepth 1 -type d -name "XXX*" -print0 | head -zn-10 | xargs -0 rm -rf

I have tested it, working fine. Note current directory "." also counts if -name "*"

From man head:

  -n, --lines=[-]NUM
            print the first NUM lines instead of  the  first  10;  with  the
            leading '-', print all but the last NUM lines of each file


Copy support failed for -- Netbeans 8.0.2

It could fail for any number of reasons directory doesn't exist, permissions, etc. Generally you should be able to find more specific information by looking at View -> IDE Log


English (US) - English (intl., with AltGr dead keys) not working on Ubuntu 20.04

Almost missed the answer by Gunnar in the comment. So here again for anybody with the same issue:
click add input source

then click on English (United States). Afterwards more options appear:

cheers


Smaller screen after installing radeon driver from AMD's site

Use this command, it should work:

sudo aticonfig --set-pcs-val=MCIL,DigitalHDTVDefaultUnderscan,0

I have a how-to on my blog, www.ligti.se.

Reference : BinaryDriverHowto/AMD


Stopped service shows up with [+] status

I really think this error message is specific to the ueyeusb daemon (ueyeusbd). If you check how they start it, they use:

/usr/bin/ueyeusbd -c /etc/ids/ueye/ueyeusbd.conf -P /var/run/ueyed/ueyeusbd.pid

As far as I understand, the error messages means that the file "ueyeusbd.pid" is missing.


Windows Boot Manager didn't come up as indicated in the instructions

Install EasyBCD for Windows and add an Ubuntu boot entry, should work fine then.


Lubuntu 20.04 - Single-click to open/run don't work

Open any folder click on the hamburger
Click on preferences
Click on Behavior tab
Click on Single click to open items


Apache after a2ensite can't start and I get error "Address already in use"

Tell me if this help, from apache docs:

Overlapping Listen directives will result in a fatal error which
will prevent the server from starting up.

(48)Address already in use: make_sock: could not bind to address
[::]:80

See the discussion in the wiki for further troubleshooting tips. ```


How to access the Wine directory from Dash

Well it might look like I was not even paying attention to what I was asking here but it just came to me to type drive in the dash and what do you know, look at this:

The Browse C: Drive option appears and you can even drag it to the launcher. So it not only does work with Dash but you can also add it to the launcher to speed things up when I want to go inside the C: drive. Love Unity more and more.


How can I enable Flash for a PyGtk WebKit?

Here's a rendition of some working code. Note how the settings are instantiated and later the browser is told to set those settings.

    self._browser = webkit.WebView()

    browser_settings=webkit.WebSettings()
    useragent=browser_settings.get_property('user-agent')

    browser_settings.set_property('user-agent', ' '.'abc')
    self._browser.set_settings(browser_settings)

(Looks like the useragent= line is superfluous.)


D: drive missing in Windows 7 after installing Ubuntu?

You installed Ubuntu on the former Drive D: in Windows. So, it is used by Ubuntu and now has a EXT4 filesystem. As Windows can't show ext4 partition, you can't see that drive.

You can still see that drive by going to the "Disk management" in Windows. That partition should have label "unknown".

To run Disk management, press Start menu and type diskmgmt.msc and Press and hold Shift key and then hit Enter.


You could start by trying something simple first on the basis that more than one process might be involved.  Instead of kill try being less specific with pkill firefox and, if that doesn't work, sudo pkill firefox.

If that fails you probably need to look at what might be holding firefox open.  There are a number of posts on this board under the search what process is holding it open or can not kill process but you might start with this one.


Ubuntu 18.04 desktop hangs approximately 1x per day

I was dealing with this bug: https://bugs.freedesktop.org/show_bug.cgi?id=93629

To fix I installed an Nvidea driver in place of the Noveau driver that ships with Ubuntu by default.

I checked my current driver using this command and looking at the configuration: line:

selah@selah-Precision-Tower-5810:~$ sudo lshw -c video
  *-display
       description: VGA compatible controller
       product: GM107GL [Quadro K2200]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:03:00.0
       version: a2
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=noveau latency=0
       resources: irq:32 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f7000000-f707ffff

I found the recommended driver using this command:

selah@selah-Precision-Tower-5810:~$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0 ==
modalias : pci:v000010DEd000013BAsv000010DEsd00001097bc03sc00i00
vendor   : NVIDIA Corporation
model    : GM107GL [Quadro K2200]
driver   : nvidia-driver-390 - distro non-free recommended
driver   : nvidia-340 - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

Then I installed the recommended driver using these commands:

sudo apt-get install nvidia-driver-390
sudo reboot

Finally, I checked that they output of this command sudo lshw -c video contained the following line among its output. configuration: driver=nvidia latency=0

How I verified I was dealing with that bug:

Enabled persistent logging sudo mkdir /var/log/journaland reboot

Then next time my computer froze, I rebooted and ran sudo journalctl --list-boots to find the ID of my previous boot that crashed.

selah@selah-Precision-Tower-5810:~$ sudo journalctl --list-boots
-5 3021d713946d42b1b27234bc25641386 Fri 2018-05-11 15:34:14 EDT—Fri 2018-05-11 16:56:17 EDT
-4 0c2cf6756ca64856bd6650e24f33e26f Fri 2018-05-11 16:57:00 EDT—Tue 2018-05-15 11:04:40 EDT
-3 897d56f3c8bd4f89aa53817531388d08 Tue 2018-05-15 11:06:03 EDT—Tue 2018-05-15 11:31:54 EDT
-2 fd4181e77dfb46ae9222c0fe98e7ec40 Tue 2018-05-15 11:33:54 EDT—Tue 2018-05-15 11:43:20 EDT
-1 553c94fad1bc499897ba5c17e794ba89 Tue 2018-05-15 11:44:03 EDT—Mon 2018-06-18 10:49:32 EDT
 0 0f79a064b05444b0840e55edb05d10a7 Mon 2018-06-18 10:50:24 EDT—Mon 2018-06-18 11:06:18 EDT

My ID is the second to last long hash string labelled -1.  Using this string I run sudo journalctl -b 553c94fad1bc499897ba5c17e794ba89

I looked for (and found) error messages such as the following SCHED_ERROR 0a [CTXSW_TIMEOUT]

`


Printer problems after installing Ubuntu 20.04

Try sudo hp-setup -i. At least for USB. That finally helped me with a HP LaserJet Pro P1102w.


CD tray won't open after accidentally stopping Brasero CD burn

Most optical drives have an emergency eject hole that you can push a straightened paper clip into to push the release lever, opening the tray.


recursively delete subdirectories and files

You can combine find, xargs and rm:

find . -type f -a -name delme_files -print0 | xargs -0 rm

and

find . -type d -a -name delme_dir -print0 | xargs -0 rmdir

(when you are in the Parent_dir directory)

There is probably a way to combine  the two find into only one but I find it clearer like that anyway.

The find commands will find the directories/files named per your example, and you pipe the results to xargs that will execute rm (remove) / rmdir (remove directory) on each of the file find "upstream", that is from the file command.

If the directories are not empty, replace rmdir by rm -Rf but this will remove recursively all files in the directories found by the find command.

The combo -print0 / -0 will make sure that all files/directories will be dealt correctly, even those having spaces in their names (maybe not needed here but better to use in generic cases).

Make  sure to test things before on non important data and always have backups.


Store a filename in a variable minus the extension

Use bash parameter expansion:

zip_file="${filename}"
new_name="${zip_file%.*}"

new_name will contain the name test if the zip_file has test.zip
If the zip_file has test.foo.zip, new_name will have test.foo, if you want only test out of test.foo.zip use:

new_name="${zip_file%%.*}"


Can I uninstall ubuntu and install lubuntu without causing my dual boot system to go awry?

Lubuntu just uses LXDE. You can install that alongside whatever other desktop environments you have installed.

Run

sudo apt-get install lubuntu-desktop

to install it. Log out, look for a gear icon or Budgie logo icon, press it and select LXDE or Lubuntu Desktop before logging back in.

Fresh installs are usually better, but this is easier and takes less effort.

If you want to install fresh, the Ubuntu installer should have an option to Erase Ubuntu and install Lubuntu (or whatever it says). Make sure you're not selecting Erase disk!

If it doesn't have that option, choosing Something Else... will allow you to erase just the Ubuntu partition and then select it as the install location.


Ubuntu 20.04 'packages have unmet dependencies'

You need to enable the focal-updates in your /etc/apt/sources.list and install the packages from there.
apt install -t focal-updates libc6 libc-dev-bin

As you can see looking at the packages for it that is where the packages for that version come from. If you do not have that line in the file then they will never be installed and you are missing out on the upgrades.
https://packages.ubuntu.com/search?keywords=libc6&searchon=names&suite=all&section=all


Is there a variant of Ubuntu that comes with none of the bundled software?

Ubuntu minimal install CD or Ubuntu server. If you then run this script (source):

sudo apt-get -y install gnome-core gdm network-manager-gnome \
  fast-user-switch-applet  human-theme x11-xserver-utils \
  tangerine-icon-theme gnome-themes-ubuntu ubuntu-artwork \
  jockey-gtk gnome-screensaver gnome-utils

you get the most minimalistic gnome you can get.

From that link

  ... memory usage from around 250-350mb to about 80-90mb. All of the themes are there, the network-manager, gedit, restricted hardware tool, etc. ...


"This afternoon, one of the most well-known pieces of software for
downloading YouTube videos, youtube-dl, was removed from GitHub
following a takedown notice from the Recording Industry Association of
America, or RIAA.
[...]
This takedown notice does not necessarily spell the permanent end of
youtube-dl. GitHub always immediately takes down any source code
project that receives a DMCA notice like this, but the project’s
creators will have an opportunity to file a counterclaim in the hopes
of restoring youtube-dl’s status on GitHub. We’ll be keeping an eye on
the situation as it develops.
[...]
In the meantime, those who still have youtube-dl on their device, or
can obtain it from a mirror, are able to continue using it as normal.
The larger issue is that youtube-dl will likely cease to receive
updates for the time being, and therefore, any changes made by YouTube
or other video services could potentially cause the tool to no longer
function."

https://9to5google.com/2020/10/28/youtube-dl-github-riaa-takedown/
BTW. youtube-dl can still be downloaded manually from https://youtube-dl.org/
Searching the Web for "Video Downloader Ubuntu", I found the following page, which says that Video Downloader is a snap application (and it has been discontinued due to youtube-dl unavailability): https://snapcraft.io/install/video-downloader/ubuntu
So to uninstall it you should use: sudo snap remove video-downloader


How do I change guest session alert message

I would recommend that you create your own dialog, and disable the default one. Please see this tutorial for guidance.

Edit (example code):

$ cat /etc/guest-session/auto.sh
TITLE='Temporary Guest Session'
TEXT="Hello my Dear Guest. Hope you'll enjoy Ubuntu!"
{ sleep 4; zenity --warning --no-wrap --title="$TITLE" --text="$TEXT"; } &


Can't type in terminal to Raspberry Pi after SSH

I finally figured it out.
ssh pi@raspberrypi.local (without the ethernet cable)

Every other step is the same.
This Video will give more detail on how I did it. If you like, you can start the video at about 2:38 which where the text file is.


/usr/bin/cmake: is a directory. Not able to grab the version of cmake?

The --prefix option is not where the binary file is. It's where all files are installed under. You need to rm -rf /usr/bin/cmake and just do sudo apt-get install cmake to install the cmake package on Ubuntu.


Google Desktop was discontinued September 2011, so the correct answer here is 'Google Desktop should no longer be used'. It is not receiving updates or security patches, so it isn't recommended to use it.

You need to find an alternative like KDE's Plasma widgets or Conky.


How expensive or hard would it be to add RUN button into Software Manager?

This seems like a fairly simple task if you are acquainted well with the software-center codebase. It should be possible to use dpkg, apt or just manually scrape the Applications directory (/usr/share/applications/) to find the main .desktop file associated with a file and run it automatically when the button is pressed.

However, if you wanted to pay someone else to write the code for that instead and have it merged into the software-center codebase, I imagine it would cost you between $50-250, depending on who you ask and how well you can convince them that it is useful.


Not using network-manager and modem-manager

Just found out that removing /etc/init/network-manager.conf does the trick.


I have assumed it was a regression in some wifi-related program and upgraded to Ubuntu 20.10. The problem is now gone, the wifi latency is stable.


Set resolution to 1024x600 in eee pc x101CH

What commands did you try? xrandr --output LVDS1 --mode 1366x768 != to xrandr -s 1366x768 for example.

Be good to see the output of your xrandr -q.


System boots into Windows without showing Grub

I managed to solve the problem in case it helps anyone.

Open the command line as administrator and run the following command:

Bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
Restart the system. GRUB loading screen will show up as before.


Try installing pulse audio volume control

    sudo apt-get install pavucontrol

then when pavu is open run skype and the other aplications that record sound. Select the recording tab and see if the programs other than skype are set to be amplified recording if they are turn them down and see if this works.


Latest compiz update for 16.04 breaks desktop + LUKS login

I have the same problem since upgrading compiz yesterday. While I have no solution for the actual problem either, a workaround until then is to

sudo apt install gnome-session flashback

after logout or reboot, this gives you the opportunity to log into a metacity-based gnome session avoiding compiz (just click the new icon on the login screen to select it). Works fine for me.


What version of adobe flash player should i download for the latest linux?

You shouldn't download anything. Just use the search function in the Software Center to search for Adobe Flash, it will do everything for you.


How to make a Bash script to change the format of a date in a CSV file

With miller, using its builtin strptime and strftime functions :

$ mlr --fs ',' --ocsvlite --headerless-csv-output put '
    $2 = strftime(strptime($2,"%Y-%m-%dT%H:%M:%S"),"%d/%m/%Y")
  ' file.csv
R.OUSE BOURTON MILL,22/03/2000,Ammoniacal Nitrogen as N,0.03,mg/l


how to get g++ package install in ubuntu 14.04LTS offline?

Download g++ package for offline installation here. You can install the package with this command:

sudo dpkg -i /path/to/deb/file

For more packages, visit https://packages.ubuntu.com/trusty/g++.


Middle-click on speaker indicator to disable (mute) sound

You can achieve this by using a GNOME shell extension called "Toggle Mute on Middle Click". As the name suggests, this extension lets you toggle mute by middle-clicking the volume indicator.

Refer to this question-and-answer to learn more about GNOME extensions: How do I install and manage GNOME Shell extensions?


error while loading shared libraries: libXss.so.1

Install missing libs:

sudo apt-get install libxss1

To find what package contains missing libs I use:

sudo aptitude search libXss


Your graphics card is a GeForce GT 320M and your system recognizes it as such.
GT216M is the Chipset of your graphics card. So everything is fine.


Remove its conf file that you've created earlier. schroot -l shows the information from them.

There may be some things mounted by it. See cat /etc/mtab. If you're not sure which ones, a reboot will probably unmount them.

Removing sessions:

# list all sessions:
schroot --list --all-sessions
# if the above command does not work, just type `mount`. The bind mount
# points with something like this in the mount path is the session name you want to get:
precise-a4aac8e0-663c-4fec-8fb2-16e4b06557e3 (<chroot_name>-<id>)

# now run this to properly end the session:
schroot -e -c precise-ca6c72e4-0e9f-4721-8a0e-cca359e2c2fd


I found a solution! It was not very easy. First don't install the newer versions of node, use the one in the ubuntu repo (v0.10.25 as of writing). This version of node doesn't contain npm so you have to install it aswell. Also  make sure you have libusb-1.0.0-dev installed.

Create a directory to store your files. I will use ~/keybaord.

The installation of msi-keyboard needs the node executable to be called node and not nodejs, so we start by making a temporary symbolic link and add that to our PATH:

ln -s `which nodejs` ~/keyboard/node
export PATH=$PATH:$HOME/keyboard

Now we can install msi-keyboard (make sure you are in the directory you want to install it to):

npm install msi-keyboard

Now you can delete the temporary symbolic link and create a file yourfile.js with your script that controlls the keyboard. Run it with

sudo nodejs yourscript.js


DNS resolution not working as expected with Pi Hole

You need to configure your router DNS settings and make your pi-hole your router's primary DNS. Then all internet traffic will be routed through the pi-hole.

Or manually change the DNS's all the computers on your network.

If your configuration is correct, then you should be able to access http://pi.hole or your pi's ip address from any computer on you LAN.


The Ctrl space does not set mark in Emacs

I had this same issue and it looks like it's a problem with ibus. From the commandline run: ibus-setup

Under General::Next Input Method you should see <Control>space. Click on the three dots and change it to something else. Hit Apply and close out. ctrl-space should work in Emacs now.


Tunnel network from VirtualBox to Ubuntu Host

I would add a bridged adapter on the windows guest. That way, it will get an IP address that is reachable in your LAN.


How can I change default settings for new users?

Install the package dconf-tools. <--click or run:

sudo apt-get install dconf-tools

Run dconf-editor and navigate to the key you want to change the default for. Note the Schema name, in this example that is com.canonical.Unity.Launcher:

Now we need to create an override file. Run the following command:

gksu gedit /usr/share/glib-2.0/schemas/my-defaults.gschema.override

You can use any name you want for the file, it just needs to end in gschema.override
Write your new defaults in this file in standard INI format, using schemas for groups names:

[com.canonical.Unity.Launcher]

favorites=['nautilus-home.desktop', 'google-chrome.desktop', 'banshee.desktop', 'gnome-terminal.desktop', 'ubuntu-software-center.desktop', 'ubuntuone-installer.desktop', 'gnome-tweak-tool.desktop', 'gpodder.desktop', 'shutter.desktop']

Save the file and close it. Now run the following command from a terminal to apply your changes:

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