Printer Samsung ML-2165W Can install, but can't print (connected using USB cable) 17.04

Sorry you didn't get much of a response on your first attempt to solve your problem.  That happens sometimes.

This is just my opinion but I would expect to have better driver support on the stable, hardened Ubuntu 16.04 LTS platform versus something else.  I had similar issues trying to get HP wireless printers to work in my Ubuntu environment and resolving those issues took a lot of Internet research.  A good place for you to start is http://downloadlinux.net/2016/03/01/how-to-get-install-samsung-ml-2165w-printer-scanner-drivers-for-ubuntu-16-04-xenial-lts-linux/

Samsung makes a point that it does provide some support for Linux but that the level of support and functionality is going to vary from product to product.  Which is another way of saying that Linux users are mostly on their own.  http://www.samsung.com/us/support/answer/ANS00045346/

I didn't thoroughly research how to get these printers to work since I have no Samsung printers in house to use for testing.  But in my HP environment I quickly found out that trying to use CUPS was a dead end.  You should be able to print directly via the USB as a connected printer.  For wireless printing you'll need to configure the printer to acquire a DHCP IP address and a few other settings.  These operations would probably be easier done from a Microsoft machine although in my case, HP provided a Ubuntu tool that worked well.

Once your Samsung printer is properly configured to print in a wireless environment (you may already have that piece working) it's just a matter of adding the printer via system settings->Printers->Add->Network Printer

If this approach fails, I'd try to set things up using a Samba connection which is more complicated but should work ok.

The green light blinking indicates that you at least have some sort of a connection to the printer but that an uncorrupted file transfer is not working.  This could be a CUPS issue which is what I experienced and decided to go another route.

You didn't mention installing the Samsung unified linux driver and configurator.  http://downloadcenter.samsung.com/content/UM/201205/20120518170921365/EN/english.pdf page 171.  You're probably not going to get very far unless you do this.

It's unlikely that your printer "will never work on Linux". However, the degree to which products work depends greatly on how much effort and cooperation Vendors are willing to invest in supporting their Linux customers.


Shift+Numlock does actually work... but you have to enable "Pointer Keys" first

To enable "Pointer Keys":

You can find this under:

-> System Settings...
  -> Keyboard Layout...
    -> Options
      -> Miscellaneous compatibility options
        -> Toggle PointerKeys with Shift + Numlock

as shown here:

The checkbox was unchecked for me by default and so I checked it.

Now Shift+Numlock does turn the feature on!

btw '5' is the button click key


Try this ...
https://github.com/linuxenko/ubuntu-skylake-i915-video-fix
or just add

Section "Extensions"
        Option "XVideo" "Disable"
EndSection

to xorg.conf (if you have it).


grub will figure things out for you so no real need to do anything with it if you want each OS to be included in grub. If you want multiple Ubuntu's on the same machine one method could be to just partition your hard disc for the amount of version your are going to install. Ubuntu 8.04 to 11.04 makes 7 operating systems so divide your harddisc up into 7 partitions and a data partition (you can use that to use the same files (audio,video etc). With the 1st one you format this datapartition. With the other 6 you just mount the datapartition.
It is time consuming to set this all up and during install you basically can not use your system. And it is not flexible.

There is another option that I would prefer:
Depending on what you want to achieve with this you can also use virtualbox-ose-qt  for every operating system. This would require you to create 1 Ubuntu on the whole disc, install virtualbox and inside virtual box you create space to install the other 6 operating systems. If you do not want to test for speed this could be a more flexible option: adding more or deleting existing systems is possible without needing to reformat your disc or create more space to install it.
And when you are done you can simply remove all the operating systems and still have your base system up and running without the need to add the other partitions to this system.

Here is an example from kUbuntu with Ubuntu:

It is slower than normal and you need a bit of RAM in your machine but you can also run all the OS's at the same time if need be ;)


If you want to get rid of the titlebar, and not just the title, this looks like an unusual request which might similarly require an unusual solution, e.g try and remove title bar elements in the Window Theme you use by editing the file "metacity-theme-1.xml" and removing lines for the titlebar, buttons, etc. -- which might need some trial-and-error.


If its hardware you need to have it repaired or replaced (could be done by the supplier or manufacturer under warranty) - nothing really can be done at the software level apart from turning it off and using a mouse.

Note your computer, particularly if you have bought it in the last 12 months, may have some form of notebook warranty.


Have you also searched on the usb ids? Use lsusb to list the usb devices. It isn't uncommon, especially with DVB tuners, to resell the same device under different names.


Can I change the font of a pdf document that was sent to me?

This is going to be very much dependent on how the PDF was created. If it was constructed as a straight-up image of a document (which is common with PDF versions of a scanned document), then you're stuck with what you see. If this is a dynamically flowing PDF, then you can change the font with LibreOffice Draw.
It may be rather crude, though. Here is an example of a PDF edit through LibreOffice Draw of a PDF that I generated from a Word file on macOS a couple of years back:

As you can see, the editing for this PDF is line by line, and there's no accounting for the page width.
As for other tools, I've heard that Inkscape can edit PDFs, but have never tried this myself. Some people have said that Gimp will work, but this is wildly inaccurate based on every PDF I've ever opened with the application.


Do I need to upgrade to Kernel 4.2 on Ubuntu 14.04.4 LTS?

You do not have to upgrade to kernel 4.2, but you can do it.

The 3.16 kernel will get security updates till its EOL.

You can upgrade to kernel 4.2 by running

sudo apt-get install linux-generic-lts-wily

You can also upgrade to kernel 4.4 if you like by

sudo apt-get install linux-generic-lts-xenial


802.1x authentication not working on ubuntu 14.04

Seems to be a bug in the network manager: https://askubuntu.com/questions/461067/is-peap-tls-possible-for-wired-wireless-802-1x

The bug report can be seen here: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1104476/comments/138

Basically, even if you don't set a CA Certificate, the Network Manager was trying to look for one.

I had to set the variable "system-ca-certs" to "false" manually in the file /etc/NetworkManager/system-connections/name_of_your_network. You would add a line like this (or change it if it was "true"):

system-ca-certs=false


How to compile and run SheepShaver on Ubuntu 16.04 LTS?

One should install build-dependencies and development packages:

sudo apt-get install build-essential git
sudo apt-get install libgtk2.0-dev x11proto-xf86dga-dev \
libesd0-dev libxxf86dga-dev libxxf86dga1 libsdl1.2-dev

Note: the libesd0-dev package is not available for Ubuntu 18.04 LTS.

Then clone official repository of the project and compile the application:

cd ~/Downloads
git clone https://github.com/cebix/macemu.git
cd macemu/SheepShaver
make links

cd src/Unix/
./autogen.sh
make -j3

Afterwards run it with ./SheepShaver, and you will get the following window:


How can I recover files I deleted with find ... -delete?

Using find ./ type f name "*.jpg" -delete what you did was searching in this paths:

./
type
f
name
"*.jpg"

and then find runs a -delete on everything that was found.

What you can do is use recovery tools like testdisk and photorec. Logically your files are gone, however they just have been unlinked (but their data still occupies disk space). I suggest you to use testdisk utility to recover them - it should work fine for you.

I wrote an answer to recover a single file here. You can also have access to testdisk step by step guide here.


How can I measure how much CPU and RAM has been used by a command?

top
Example of firefox. Find the PID:
ps -aux | grep -i firefox

Then you can use top -p pid:
top -p  3845

ps
You can also use ps command, firefox pid is 3845
$ ps -p 3845 -o %cpu,%mem,cmd
%CPU  %MEM CMD
11.1  3.7 /usr/lib/firefox/firefox

I am not satisfied with the above mentioned commands, and I found something that you should be interested in.
Monit
sudo apt-get install monit -y

Edit the Monit Config File
sudo nano /etc/monit/monitrc

Enable the web interface
set httpd port 2812
# use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
# allow 192.168.1.0/255.255.255.0 # allow any host on 192.168.1.* subnet
allow admin:monit # require user 'admin' with password 'monit'

Checking process every 2 secons
## Start Monit in the background (run as a daemon):
set daemon 120 to only 2  # check process every 2 sec

Example Firefox
In the end copy paste the following command
check process firefox
matching "firefox"

Save and Exit
Check your syntax
Fix any problems found – it’s not too tough to figure out what’s going on.
sudo monit -t

Start (or restart) Monit
sudo service monit start

Visit the web interface
http://localhost:2812 if you’re running Ubuntu Desktop, or
Sign in with your admin:monit credentials

Click on Firefox

Related:

How to Install Monit
Monit: check process without pidfile
Monit FAQ
Real-world Monit configuration examples
How can I get the CPU usage and memory usage of a single process on Linux (Ubuntu)?

You can also use these links for help and modify your process.

UPDATE
You can also configure an alert if firefox uses more than 250 MB of ram
check process firefox
matching "firefox"
if totalmem > 250.0 MB for 1 cycles then alert

You can also execute command
if totalmem > 250.0 MB for 1 cycles then exec "path to script"

You can also make a script of Notify-Send
/usr/bin/notify-send firefox "More Than 250 MB OF RAM"


Script to view office documents in Microsoft Office Online

Nautilus script solution

It wouldn't be too difficult to grab the clipboard contents and work with them, but I can do you one better. The following Nautilus script will open any supported document via Microsoft Office Online. It does so by first copying the document to your public Dropbox folder (if it wasn't there before) and subsequently passing the public URL to the web service:

#!/bin/bash

# Name:         Open in Microsoft Office Online
# Author:       (c) 2015 Glutanimate <https://github.com/Glutanimate/>
# Dependencies: dropbox, a web browser (e.g. firefox, chromium...)
# Installation: https://askubuntu.com/q/574252/81372
#
# License:      GNU GPLv3 (http://www.gnu.de/documents/gpl-3.0.en.html)
# Usage:        open_in_microsoft_office_online <file>

# Settings

DbPath="$HOME/Dropbox"
CopyToDb="yes"  # whether to copy file to public dropbox folder
                # in case it's not there already (no/yes)

# Variables

GuiIcon="dropbox"
GuiTitle="Open in Microsoft Office Online"
MsOfficeUrl="https://view.officeapps.live.com/op/view.aspx?src="

File="$1"
Filename="${File##*/}"

# Functions

gui_notify(){
  ## generic notification function
  notify-send -i "$GuiIcon" "$GuiTitle" "$1"
  echo "$1"
}

# Checks

## check if file selected
if [[ ! -f "$File" ]]; then
  gui_notify "Error: No file selected."
  exit 1
fi

## check if Dropbox running
if ! pgrep dropbox > /dev/null 2>&1; then
  gui_notify "Error: Dropbox isn't running."
  exit 1
fi

## check if Dropbox folder set correctly
if [[ ! -d "$DbPath" ]]; then
  gui_notify "Error: Can't find dropbox folder. Please set DbPath in script."
  exit 1
fi

# Main

## get public URL
DbPubUrl="$(dropbox puburl "$File")"

## optional: copy file to public dropbox folder if it isn't there
if [[ "$CopyToDb" = "yes" && "$DbPubUrl" = "Couldn't get public url: Unknown Error" ]]; then
  ## create public Dropbox folder if it doesn't exist
  [[ ! -d "$DbPath/Public" ]] && mkdir "$DbPath/Public"
  ## copy file to public folder, don't overwrite any existing file
  cp -n "$File" "$DbPath/Public/"
  ## wait for sync to complete
  SyncCounter="0"
  while dropbox filestatus "$DbPath/Public/$Filename" | grep syncing; do
    [[ "SyncCounter" = "0" ]] && gui_notify "Syncing file..."
    sleep 5
    ## wait a maximum of 10 minutes for sync to complete
    if [[ "$SyncCounter" -gt "120" ]]; then
      gui_notify "Error: Sync timeout. Exiting."
      exit 1
      break
    fi
    ((SyncCounter++))
  done
  ## get public URL
  DbPubUrl="$(dropbox puburl "$DbPath/Public/$Filename")"
fi

## check if public URL exists and open in Microsoft Office Online
if [[ "$DbPubUrl" != "Couldn't get public url: Unknown Error" ]]; then
  xdg-open "${MsOfficeUrl}${DbPubUrl}" > /dev/null 2>&1 &
  gui_notify "Opening document in Microsoft Office Online..."
else
  gui_notify "Error: Can't generate public Dropbox link from File."
fi

Configuration

There are two important settings that govern how the script operates:

DbPath sets the path to your Dropbox folder. This is ~/Dropbox by default. Please make sure to chage the setting if you've moved your DB folder.
CopyToDb controls whether or not to copy files to the Public folder if they're located somewhere else in the file system.

This option is on by default (yes). If you disable it (no) the script will only handle files in your public Dropbox folder.

Installation instructions

As this is a Nautilus script, you can use the following generic instructions to install it on your system:

How can I install a Nautilus script?

Hope this is what you were looking for!


Dual Boot Ubuntu in Windows 8 OEM System when USB is not detected

Don't use unetbootin. I've seen many reports of similar problems when people try to use it. Instead, if you've got an existing Linux (or OS X) installation, use dd to copy the image to the USB drive, as in:

sudo dd if=imagefile.iso of=/dev/sdc

This example assumes that /dev/sdc is your USB flash drive; change that detail appropriately, along with the filename for the image file.

There are dd ports to Windows; or you could use Rufus, which seems to do a better job at creating EFI-bootable images.


How to know if in before download image (Real, RC or Daily) Has already version inside of package? KDE 5.19 does have current daily?

rmadison queries the archive database for several different Ubuntu releases including the latest development release which has not been officially released yet. The latest *buntu development release is currently 20.04. The rmadison command returns information about package versions, repositories and available architectures. If the same package is provided by more than one repository (e.g. main and focal-proposed) rmadison returns package version/architecture information from all the repositories that provide that package.

Run rmadison with the following command:

rmadison package-name # replace package-name with the name of the package

rmadison is provided by the devscripts package from the default Ubuntu repositories. To install it open the terminal and type:

sudo apt install devscripts


All my problem are probably due to motherboard fault here a post in Intel community that explain problem in details, unique solution is to send back to reseller to get a working one.

thanks again

ciao

h


For 14.04 I found the following PPAs that come with Ruby 2.x

Adds Ruby 2.1 to Ubuntu 14.04

sudo add-apt-repository ppa:brightbox/ruby-ng

I also found in GoRails a set of instructions to install Ruby on 14.04 but I am guessing since they are long you would want a PPA instead.

Adds Ruby 1.9, 2.0 or 2.1 to Ubuntu 14.04

sudo add-apt-repository ppa:brightbox/ruby-ng-experimental

After you add one of them simply:

sudo apt-get update
sudo apt-get install ruby2.1 # In the case you want 2.1


I strangely fixed this issue by adding in a Menu Bar that I had removed at the start of my design. The text is now white. I would love to know what caused this!


Windows 10 does support more than three partitions (it did on my Lenovo G70-80); Y-50 could have issues though. That's what can be done:

Have a partition for Ubuntu. This partition uses usually ext3 or ext4 file system (not Windows' NTFS). Ubuntu installation will take care of formatting and what not.

If you do not have an empty partition, shrink a volume (partition) with sufficient free space using Windows Disk Management. Press Win+X and then press K to launch Disk Management. The space created by shrinking a partition will be marked as unallocated (black-colored).

During Ubuntu installation select that unallocated partition (you should know which partition by looking at the partition size) and , when asked, select  install Ubuntu alongside other Operating Systems to be able to dual boot. Let us know if it works and if you need more concrete, detailed info.


Out of memory error despite having enough memory

You get the error message just for the failed allocation. You could have had many successful allocations before that, that used up your RAM. After the error message is shown, the memory is released, so you see lots of free memory.

I don't know how much memory or the performance you actually need, but you could try adding some swap space. This will add 2G of swap space until you reboot.

Get the swap space ready:

$ sudo fallocate -l 2G /extra.swap
$ sudo chmod 0600 /extra.swap
$ sudo mkswap /extra.swap

Now check your memory

$ free -mh

and now add the swap space to your system

$ sudo swapon /extra.swap

If you check the free memory again you should see the increase in your swap memory.

$ df -h

If you want to disable the extra swap space, for example to remove the file, you can do:

$ sudo swapoff /extra.swap


Ubuntu 13.04 update error in terminal window

Make sure no other software accessing the package management files is running. Likely culprits are the Software Center or Synaptic.


Snap used all drive space, errors when removing Snaps. System does not fully support snapd: error: no space left on device

I was finally able to solve the issue by clearing snapd's cache, then removing each of the snaps individually

sudo systemctl stop snapd

cd /var/lib/snapd/
sudo bash
cd /var/lib/snapd/cache
ls -lh

From that I could see 600MB in the cache folder so

rm *

Now I had some breathing room, so ran snap list and df -h to get the list of all snaps to remove.  Now I was able to remove all snaps with e.g.

sudo snap remove gnome-calculator

sudo apt-get remove snapd was still not fully working, so I fixed a DNS issue by editing

/etc/resolv.conf

adding in

nameserver 8.8.8.8
nameserver 8.8.4.4

After updating DNS, I updated ubuntu

sudo apt-get update --fix-missing

Then finally I was able to run

sudo apt-get remove snapd gnome-software-plugin-snap --purge

Hooray! System is now up to date, and has a healthy 1.7 GB of free space.  I'll stay away from snapd for my use case.


It looks as though you might need to use the ndiswrapper to make that adaptor work.  You can find information on that on the help.ubuntu.com website.


virtualbox cannot find vm of other user‘s vm in ubuntu

You can copy the users ~/.VirtualBox/ directory.

Open a terminal and enter:

cp -r /home/[USERWITHCORRECTVIRTUALBOX]/.VirtualBox  /home/[OTHERUSER]/

There might be access problems...

An alternative way is to create new machines and just import the hard disk image in these machines.


When you are logged in on your administrator account, can you access a tty console by pressing CTRL+ALT+F1? If yes, run sudo apt-get update && apt-get dist-upgrade. When finished, reboot and log in again. If the problem remains, enter the tty console agin and try sudo apt-get install --reinstall unity and reboot again.


Which is the default input method in application in Ubuntu Gnome 13.10?

The ComposeKey sequences used by Gnome to enter special characters are hard coded into the program, so your modified settings will work with X programs, and apparently KDE programs, but not with Gtk programs.

Source: GtkComposeTable, which lists the Gnome compose key table. Gnome dead key settings are given at GtkDeadKeyTable

More information about using the compose key - and using xim to bypass the Gnome hardcodings - is given at ComposeKey in the community documentation.

The Gnome hard coding can be overruled in favour of the original Xwindow Input Method (XIM) by setting the environment variable GTK_IM_MODULE. This can be set in the /etc/environment file, but if the machine has more than one user then it is best set from the home directory on a per user basis by modifying ~/.gnomerc or ~/.Xsession

export GTK_IM_MODULE="xim"

For gnome-terminal, right click in the terminal window, and in the context menu choose Input methods >> X Input Method

xim should be the default input method, but to make sure the default input method is being applied system wide, from System Settings >> Language Support make sure Keyboard input method system is set to default. This should make it so you don't need to right click the terminal window every time, but you will probably still need GTK_IM_MODULE environment setting.


I'd like to open Gedit files in a web browser like Firefox

yes you can do it. Just type the file path in the URL area and then it will loads.
as you said you just want to open the text file.


if rfkill list shows 1 is hardblocked:
did you try running

rfkill unblock 1

that works for me (but in my case i have to run rfkill unblock 0 and rfkill unblock 2, the first is my wireless switch, the second is the wifi switch)


Try to set:

no_proxy=10.16.37.215

this should help


Deleted the dev/sda1 file and restarted the computer

You can use testdisk to recover lost partitions and/or make non-booting disks bootable again

Boot from Ubuntu usb-stick press CTRL+ALT+T and type:

sudo apt-get update
sudo apt-get install testdisk
testdisk

After this step follow steps/ instructions given on page  TestDisk Step By Step

read it carefully before proceeding. If you choose wrong write option may loose data from other partitions too. Remember one thing let testdisk read and find all the partitions on your hard disk when you are sure it found all the partitions including deleted one. then proceed with write option. It may take long time in some cases.


I need OpenGL update I have 1.1 (very old)

It sounds like your graphicscard doesn´t support OpenGL > 1.1. Some integrated graphics just don't support newer versions. If you have a desktop, you might consider to upgrade your graphicscard. If you are using a laptop, there is very little you can do.


I would interpret that as meaning you should perform the commands

cp Makefile.unix Makefile
make

Alternatively, you could use the Makefile.unix directly, without the extra step of copying it, by using the -f option

make -f Makefile.unix


How can I boot into Arch Linux using initramfs, in Ubuntu's grub?

Actually, there are two files that need to be modified to solve this problem. I've tested this on my Lubuntu 16.04.1 and Manjaro Linux.

In Ubuntu:

1) File /usr/lib/linux-boot-probes/mounted/40grub2
there is a function parse_grub_menu that doesn't handle all initrd parameters. You need to modify 'case "$1" in ... initrd)':

a) remove assignment

initrd="$(echo "$2" ...)"

b) add two lines in place of the removed one:

shift 1
initrd="$(echo "$@" | sed 's/(.*)//')"

2) File /etc/grub.d/30_os-prober
within a for loop fix the assignment of LINITRD:

for LINUX in ${LINUXPROBED}; do
...
    LINITRD="`echo ${LINUX} | cut -d ':' -f 5 | tr '^' ' '`"

The first fix takes all available initrd info for Manjaro into account. The second fix cleans up the generated initrd line by changing some '^' characters to spaces.


I have the same microphoone problem with slack calls and also I have 16.04 LTS and QC35. BT music streaming (A2PD) is working perfectly and also when someone calls during streaming, I am able to use headphone microphone too (at least this was OK earlier before re-install of ubuntu due to another issue).

When during a call I selected QC35 in pavucontrol, then slack did not complain any more about missing audio input. BUT even if I did hear audio very well, my voice was not send.
Even if I select HSP/HFP (=BT call audio profile) at configuration tab of pavucontrol, I see only "monitor" of my QC35 as input device (as well default built-in audios).
Also testing sound (front left, front right) seems to use only A2DP because did not hear any sound degradation when tried to change profile to narrow band HFP.

~/.config/pulse$
cat xxx-default-sink
bluez_sink.BT_ADDRESS
cat xxx-default-source
alsa_input.pci-0000_00_1f.3.analog-stereo
(Thus the source did not change even if tried)

Also btmon shows only ACL packets (instead of expected SCO), thus assuming that only A2DP connection is running.

update: Re-starting pulseaudio solved the problem, i.e., now able to use also mic and see those in pavucontrol those as expected.
And passed tests:
https://add_here.slack.com/help/test/calls

Unfortunately HFP seems to cause some noise but that is another problem, already discussed at bluetooth-headset-producing-a-hissing-noise


The documentation from Red Hat and IBM specifies rules that actually allow more packets than are really needed.

Multicast IP packets are really not much different from unicast IP packets, the only difference (in addition to the way how they are sent on Layer 2 and routed) is the destination address, which must be in the range 224.0.0.0/4.

As described on Server Fault, the following rules can be used for a single Corosync ring (assuming that the OUTPUT chain does not block any traffic):

iptables -A INPUT -p igmp -i $corosync_interface -j ACCEPT
for src_addr in $ip_addr_self $ip_addr_partner1 $ip_addr_partner2; do
  iptables -A INPUT -i $corosync_interface -s $src_addr -d $ip_addr_self \
    -p udp --source-port $(($corosync_port - 1)) \
    --destination-port $corosync_port -j ACCEPT
  iptables -A INPUT -i $corosync_interface -s $src_addr -d $ip_addr_mcast \
    -p udp --source-port $(($corosync_port - 1)) \
    --destination-port $corosync_port -j ACCEPT
done

In this example, the following variables are assumed to be defined:

$corosync_interface: the network interface which is used by Corosync
$ip_addr_self: the IP address to which Corosync binds locally (specified as bindnetaddr in corosync.conf)
$ip_addr_partner1, $ip_addr_partner2: the IP addresses of the other Corosync nodes - more can be added if the cluster has more than three nodes.
$ip_addr_mcast: the multicast address used for Corosync (specified as mcastaddr in corosync.conf)
$corosync_port: the (destination) port used by Corosync (specified as mcastport in corosync.conf)

For multiple rings, the same approach can be used with the interface name, IP addresses and port numbers changed to match the respective definitions.

In comparison to the rules specified in the documentation, the rules above are restricted to specific interfaces, source addresses and source ports and the destination port is limited to a single port. Actually, Corosync does not send packets to more than one destination port, it just uses a different port (destination port minus one) for sending data than for receiving data.


Thinkpad T440s Intel 7260 wifi card issues on Ubuntu (but no problems on Windows)

I own a Thinkpad T440p and it has an Intel 7260. Here are my suggestions.
Your wireless may be dropping because of power management; that is, the feature where the card partially powers down to save battery power during periods of inactivity and then, ideally, powers back up seamlessly when activity resumes. Let's disable power saving to see if it helps. From the terminal:
sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/*

Your wireless may be dropping because the channel to which it was connected has suddenly changed.
Please check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I recommend a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred.
Your wireless may be dropping because there are two wireless access points with the same name and password. This is typical when you have a 2.4 gHz segment and a 5 gHz segment of the same router. Your wireless may be roaming, looking for a better connection. If this is the case, I suggest that you rename the access points; something like myrouter2.4 and myrouter5.
After making these changes, reboot the router.
Next, I recommend that your regulatory domain be set explicitly. Check yours:
sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:
sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:
sudo nano /etc/default/crda

Change the last line to read:
REGDOMAIN=IS

Proofread carefully, save and close the text editor.
Is there any improvement?


Xerox Workcentre 3025 scanner is not working (Ubuntu 17.04)

I found an answer here.
I run the following two commands:
a) sudo ln -sfr /usr/lib/sane/* /usr/lib/x86_64-linux-gnu/sane
b) sudo adduser $USER lp
Then, I updated the file /etc/sane.d/xerox_mfp.conf using sudo vi /etc/sane.d/xerox_mfp.conf by adding the follwong two lines:
#Xerox WorkCentre 3025
usb 0x0924 0x42da

I saved and closed the file. And finally, reboot.
It worked fine.


How can I get Belkin Wireless adapter N450 DB/N600 DB to work on Ubuntu 14.04 64-bit?

Download the rtl8192 kernel version driver then move it to your desktop and extract here.

Open the terminal CTRL+ALT+T then copy and paste one line at a time:

sudo apt-get install --reinstall linux-headers-$(uname -r) build-essential
cd ~/Desktop/rtl8192du-kernel-version
make
sudo make install
sudo modprobe 8192du

when there is an upgraqde to the kernel you will need to recompile the driver.

cd ~/Desktop/rtl8192du-kernel-version
make clean
make
sudo make install
sudo modprobe 8192du

Driver courtesy of chili555.


How can I work around the tty login bug?

Ur solution (2) would work fine, but consider using ssh meanwhile if you need canonical live patching, i would rather stay at 4.15.0-45, it should be fixed pretty soon:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1813873/comments/29

If you configured FileZilla with sftp, ssh will most likely work with PuTTY, use same port and credentials.


Ok, so your description is very vivid but I had this happen, so I'm assuming u tried to burn something and it isn't work right... So you have a semi-burn disk burnt. In order to help can I know what computer your own? ( windows-7, windows 8, Mac etc. )


Same here after update Ubuntu from 18.04 to 18.10 yesterday.

Slack v3.3.1 stopped working. Tried update to v3.3.3 with no luck.
Both Official Slack deb versions.

Trying run Slack from terminal, just prints Segmentation fault (core dumped).
Based on this, Slack came back to work:

sudo mv /usr/lib/slack/libnode.so /usr/lib/slack/libnode.so.bad
sudo ln -s /usr/share/atom/libnode.so /usr/lib/slack/libnode.so


Is there a way to fix the "content servers unreachable" error when running Steam via Wine BESIDES editing the config file/changing download region?

Try changing the version of wine in POL to version 3.8:

Go to Tools and under Wine versions (x86), choose 3.8 and add it to the right window, then close the window.
Next, click on Steam icon, and choose Configure. A PlayOnLinux Configuration window will show up and under General -> Wine version, choose 3.8


Mount single partition from image of entire disk (device)

Get the partition layout of the image

$ sudo fdisk -lu sda.img
...
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
...
  Device Boot      Start         End      Blocks   Id  System
sda.img1   *          56     6400000     3199972+   c  W95 FAT32 (LBA)

Calculate the offset from the start of the image to the partition start

Sector size * Start = (in the case) 512 * 56 = 28672

Mount it on /dev/loop0 using the offset

sudo losetup -o 28672 /dev/loop0 sda.img

Now the partition resides on /dev/loop0. You can fsck it, mount it etc

sudo fsck -fv /dev/loop0
sudo mount /dev/loop0 /mnt

Unmount

sudo umount /mnt
sudo losetup -d /dev/loop0


Can I set up two key-bindings to launch the Main Menu? ... specifically:  Alt+F1  and   Super

I seem to have hit upon a solution with a caveat however. Details below.

Use gconftool-2 to set /apps/metacity/global_keybindings/panel_main_menu to Super_L (as you have mentioned in your question.
Install xvkbd package via sudo aptitude install xvkbd
Use ccsm (System -> Preferences -> Compizconfig settings manager) to create a new command bound to Alt+F1. Against Commands -> Commands -> Command 4 enter xvkbd -text "\[Super_L]" and against Commands -> Keybindings -> Run Command 4 select F1 as keybinding.

This should work. It is almost completely copied from this ubuntuforums post.

Caution

When I tried this in my system, I found 1 very strange issue. The sytem started behaving as if the Alt key was permanently held (e.g., I could just press  to switch between windows). I am not sure this is because I had earlier invoked xvkbd to simulate some Alt key presses. If you face this problem, the only option I found to make the system usable again was to follow below steps.

Drop to a terminal by pressing Ctrl+Alt+F1
Login with your user name & password
Force logout and restart of X by running below command.

sudo restart gdm

If the problem persists after login also, then you can use the following command to reset the mapping of Super_L to panel_main_menu (back to defauly Alt+F1)
    gconftool --unset /apps/metacity/global_keybindings/panel_main_menu


Installing virtualbox in ubuntu 14.04 64-bit

The easiest way by far would be getting a hold of the .deb of Virtualbox 5.0. Simply go to Virtualbox's website and then get the 5.0.2. build for Ubuntu 14.04. If you're running a 64bit system, then grab the AMD64 deb. If you're using x32, then you will need to grab the i386 build.

After that, simply go the destination that you saved the .deb file and then double click. Ubuntu Software Center will open and you should be able to install it by that way.


Problem upgrading from 3.2.0-51-generic to 3.5.0-37-generic

For what it's worth, the below is the list of "quantal" packages (mostly X and kernel) on my 12.04.2 system (fresh install), kernel 3.5.0-37.  Probably most of the X packages are not needed...

  $ dpkg -l |fgrep quantal |sort ii  libgl1-mesa-dri-lts-quantal
  9.0.3-0ubuntu0.4~precise1                        free implementation of the OpenGL API -- DRI modules ii  libgl1-mesa-dri-lts-quantal:i386
  9.0.3-0ubuntu0.4~precise1                        free implementation of the OpenGL API -- DRI modules ii  libgl1-mesa-glx-lts-quantal
  9.0.3-0ubuntu0.4~precise1                        free implementation of the OpenGL API -- GLX runtime ii  libgl1-mesa-glx-lts-quantal:i386
  9.0.3-0ubuntu0.4~precise1                        free implementation of the OpenGL API -- GLX runtime ii  libglapi-mesa-lts-quantal
  9.0.3-0ubuntu0.4~precise1                        free implementation of the GL API -- shared library ii  libglapi-mesa-lts-quantal:i386
  9.0.3-0ubuntu0.4~precise1                        free implementation of the GL API -- shared library ii  libxatracker1-lts-quantal
  9.0.3-0ubuntu0.4~precise1                        X acceleration library -- runtime ii  linux-generic-lts-quantal
  3.5.0.37.43                                      Generic Linux kernel image and headers ii  linux-headers-generic-lts-quantal
  3.5.0.37.43                                      Generic Linux kernel headers ii  linux-image-generic-lts-quantal              3.5.0.37.43
  Generic Linux kernel image ii  x11-xserver-utils-lts-quantal
  7.7~3ubuntu1~precise1                            X server utilities ii  xserver-common-lts-quantal
  2:1.13.0-0ubuntu6.1~precise3                     common files used by
  various X servers ii  xserver-xorg-core-lts-quantal
  2:1.13.0-0ubuntu6.1~precise3                     Xorg X server - core
  server ii  xserver-xorg-input-all-lts-quantal
  1:7.7+1ubuntu4~precise1                          X.Org X server --
  input driver metapackage ii  xserver-xorg-input-evdev-lts-quantal
  1:2.7.3-0ubuntu2~precise1                        X.Org X server --
  evdev input driver ii  xserver-xorg-input-mouse-lts-quantal
  1:1.7.2-2build1~precise1                         X.Org X server --
  mouse input driver ii  xserver-xorg-input-synaptics-lts-quantal
  1.6.2-1ubuntu5~precise1                          Synaptics TouchPad driver for X.Org server ii  xserver-xorg-input-vmmouse-lts-quantal
  1:12.9.0-0ubuntu3~precise1                       X.Org X server --
  VMMouse input driver to use with VMWare ii
  xserver-xorg-input-wacom-lts-quantal
  1:0.17.0-0ubuntu2~precise1                       X.Org X server --
  Wacom input driver ii  xserver-xorg-lts-quantal
  1:7.7+1ubuntu4~precise1                          X.Org X server ii
  xserver-xorg-video-all-lts-quantal           1:7.7+1ubuntu4~precise1
  X.Org X server -- output driver metapackage ii
  xserver-xorg-video-ati-lts-quantal
  1:6.99.99~git20120913.8637f772-0ubuntu1~precise2 X.Org X server --
  AMD/ATI display driver wrapper ii
  xserver-xorg-video-cirrus-lts-quantal        1:1.5.1-0ubuntu2~precise1
  X.Org X server -- Cirrus display driver ii
  xserver-xorg-video-fbdev-lts-quantal         1:0.4.3-0ubuntu1~precise1
  X.Org X server -- fbdev display driver ii
  xserver-xorg-video-intel-lts-quantal
  2:2.20.9-0ubuntu2.2~precise1                     X.Org X server --
  Intel i8xx, i9xx display driver ii
  xserver-xorg-video-mach64-lts-quantal        6.9.3-0ubuntu1~precise2
  X.Org X server -- ATI Mach64 display driver ii
  xserver-xorg-video-mga-lts-quantal           1:1.6.2-0ubuntu1~precise2
  X.Org X server -- MGA display driver ii
  xserver-xorg-video-modesetting-lts-quantal   0.5.0-0ubuntu1~precise2
  X.Org X server -- Generic modesetting driver ii
  xserver-xorg-video-neomagic-lts-quantal      1:1.2.7-0ubuntu1~precise1
  X.Org X server -- Neomagic display driver ii
  xserver-xorg-video-nouveau-lts-quantal       1:1.0.2-0ubuntu3~precise2
  X.Org X server -- Nouveau display driver ii
  xserver-xorg-video-openchrome-lts-quantal    1:0.3.1-0ubuntu1~precise3
  X.Org X server -- VIA display driver ii
  xserver-xorg-video-r128-lts-quantal          6.9.1-0ubuntu1~precise2
  X.Org X server -- ATI r128 display driver ii
  xserver-xorg-video-radeon-lts-quantal
  1:6.99.99~git20120913.8637f772-0ubuntu1~precise2 X.Org X server --
  AMD/ATI Radeon display driver ii  xserver-xorg-video-s3-lts-quantal
  1:0.6.5-0ubuntu1~precise1                        X.Org X server --
  legacy S3 display driver ii  xserver-xorg-video-savage-lts-quantal
  1:2.3.6-0ubuntu1~precise1                        X.Org X server --
  Savage display driver ii  xserver-xorg-video-siliconmotion-lts-quantal
  1:1.7.7-0ubuntu1~precise1                        X.Org X server --
  SiliconMotion display driver ii  xserver-xorg-video-sis-lts-quantal
  1:0.10.7-0ubuntu1~precise2                       X.Org X server -- SiS
  display driver ii  xserver-xorg-video-sisusb-lts-quantal
  1:0.9.6-0ubuntu1~precise1                        X.Org X server -- SiS
  USB display driver ii  xserver-xorg-video-tdfx-lts-quantal
  1:1.4.5-0ubuntu1~precise2                        X.Org X server --
  tdfx display driver ii  xserver-xorg-video-trident-lts-quantal
  1:1.3.6-0ubuntu2~precise1                        X.Org X server --
  Trident display driver ii  xserver-xorg-video-vesa-lts-quantal
  1:2.3.2-0ubuntu1~precise1                        X.Org X server --
  VESA display driver ii  xserver-xorg-video-vmware-lts-quantal
  1:12.0.2+git.e5ac80d8-0ubuntu1~precise2          X.Org X server --
  VMware display driver


Unfortunately, there isn't any way to install the purchased app via terminal yet. You must use the Ubuntu software center, because it must have to be passed through authentication and verification.


I get "Boot error" while i try to boot my pc with a live usb, any help?

The problem is not in Ubuntu or Live USB creator softwares. The problem is in ur BIOS settings.

Go to BIOS boot menu.

Search for 'USB Mass Storage Emulation type'.

Default:<Auto>

Change it to:<All Fixed Disc>

or something similar


Login Screen background changes itself before login in (ubuntu 16.04)

"Ubuntu 12.04 Unity greeter has introduced selected user dynamic background, that means that when selecting a user from the available users list the background will change to reflect the selected user's desktop background."

Please follow this guide: How do I change the wallpaper of the login screen?

(Follow the steps under "Setting the dynamic switching off")


Clean Install Of Ubuntu Server over the network?

PXE booting

What you are looking for is called PXE booting. It means you have 1 computer (the PXE server) running on your network, which will install ubuntu on other computers on the network. When a computer on the network is started, the PXE server kicks in and starts an ubuntu install.

The setup process is pretty complex and only really usefull if you have to manage a lot of systems. A complete manual can be found on these Ubuntu help pages.

Unattended installation

Another possibility is creating an unattended CD. Also help pages provided by Ubuntu for this. Note that it does require a keyboard and screen on the new installed computer, but you might manage to do this without a screen (by hitting enter when you think the PC is ready :p). You basically create a new ubuntu CD, which will read an installation configuration file you provided.


after the command sudo apt-get upgrade i will get the error message?

Try this

sudo apt-get install -f
sudo apt-get update
sudo apt-get upgrade


How do I add a static quicklist that opens a web page?

If you got a URL, just open it using the default web browser:

...
X-Ayatana-Desktop-Shortcuts=Compose

[Compose Shortcut Group]
Name=Compose Mail
Exec=xdg-open 'https://mail.google.com/mail/?shva=1#compose'
TargetEnvironment=Unity

Or if you like to use a different browser, e.g. Chromium:

Exec=chromium-browser 'https://mail.google.com/mail/?shva=1#compose'

Chromium also allows you to open the URL in a window without toolbars:

Exec=chromium-browser --app='https://mail.google.com/mail/?shva=1#compose'

Of course this only works if you are already logged in or got a cookie. Else it will only take you to the login page.


A new connection is generated instead of using the new settings

I am newer to linux but to manually configure your static ip should be as follows

sudo vim /etc/network/interfaces    or whatever editor you prefer

 auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet static
address 192.168.10.2
netmask 255.255.255.0
gateway 192.168.10.1
network 192.168.10.0
broadcast 192.168.10.255

follow changes with

sudo ifdown wlan0 then
sudo ifup wlan0
sudo dhclient

this is my scheme change addresses to match yours e.g. broadcast is .255 at then end
network would be .0
Hope this helps.


Read This Ubuntu 18.04 stuck at shutdown:

Same problem here on my laptop. After some observation, I found out that it has something to do with power saving mode specially automatic suspend.

Go to Settings > Power then turn off all Automatic Suspend options. Also choose Blank screen to Never.

Till Ubuntu team will figure out why suspend mode is interfering with shutdown process, this solved my problem.

Hope this helps

This post also mention about Display Drivers related solution. Check if it matches with yours.


Unable to install libopencv-dev via apt-get

When you remove libopencv-dev some opencv lib are not removed, running:

sudo apt list --installed | grep opencv

You can check if some lib is still there and remove it. Then you can try to reinstall libopencv.
This could help.


Is Firefox 8 available for Ubuntu 11.10?

There is a custom repository for FF8, follow the instructions here for more info:

http://www.ubuntugeek.com/how-to-install-firefox-8-on-ubuntu-using-ppa.html


Unity not working correctly after using `unity --reset`

I don't know if this is going to work, but you might just give it a try:

metacity --replace

If that doesn't work, try choosing 'Ubuntu Classic' down in the login screen, do a little browsing, log out or restart, then choose 'Ubuntu' again.

It might just work.

Good luck


Why does the '!!' shortcut fail to execute the previously run command?

History expansion might be disabled:

$ echo foo
foo
$ !!
echo foo
foo
$ set +o histexpand
$ set -o | grep hist
histexpand      off
history         on
$ echo foo
foo
$ !!
bash: !!: command not found

Try set -H or set -o histexpand.


How can I only make a specific screen sleep?

Toggle- dim a specific screen

The command to dim the screen (not switch off, but not "sleep" either) would be:

xrandr --output $monitor --brightness 0

You can however easily toggle- dim the targeted screen with a keyboard shortcut. Add the script below to a shortcut:

#!/bin/bash
# --- set your monitor below
monitor=VGA-0
# ---
if [ -z "$(xrandr --verbose | grep 'Brightness: 0.0')" ]; then
  xrandr --output $monitor --brightness 0
else
  xrandr --output $monitor --brightness 1
fi

To use

Copy the script into an empty file, save it as dim_screen.sh, and make it executable
In the head of the script, set the name of your targeted screen. Run the command xrandr to find out if you don't know.
Add it to a shortut key: Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

    /path/to/dim_screen.sh

Explanation

The test:

[ -z "$(xrandr --verbose | grep 'Brightness: 0.0')" ]

will see if the command xrandr --verbose | grep 'Brightness: 0.0' has an output, in other words, if your screen is dimmed. If so, it will set the targeted screen to "normal" brightness (1.0):

xrandr --output $monitor --brightness 1

...else it will dim the screen with the command:

xrandr --output $monitor --brightness 0

Note

It seems impossible to only put a specific screen to sleep. This answer is written, assuming you want the screen, dimmed, but switching it off, including the black out of both screens, is too much a fuzz.


Try installing tk-dev

sudo apt-get install tk-dev

After that, re-run make command and start chimera again


HP Envy 15 keeps restarting instead of installing Ubuntu 12.10 from usb stick

I had this exact same problem on an HP machine. The problem was that the machine only allows four partitions, and HP had installed an HP tools partition.

I solved the problem by deleting the HP tools partition and shrinking the Windows 7 partition with Windows Disk Manager. After that, the Ubuntu installer says "install alongside Windows", and everything worked as expected.


Using brand new hard drive to store and transfer files

Most likely the new disk is already formatted to NTFS.

You can leave it as is. Both Ubuntu and Windows can use this file system.

But NTFS works slower in Linux than native Linux formats. If this is critical it is better to use a Linux format, like ext4, xfs, btrfs, etc. You won't be able to fix errors on NTFS with Linux.

In general it is not recommended to use NTFS file system on Linux if you don't have Windows there.

Also make sure you turn off Windows properly before you take out the disk. Windows 10 is hibernated when you select "Shutdown".


The config file is "config.php", and its location depends on how exactly you installed Nextcloud.  If you installed it via snap the location is:

/var/snap/nextcloud/current/nextcloud/config/config.php

I did a beginner's video on setting up Nextcloud on my YouTube channel.

https://youtu.be/IFPqedkW0aI

If you can't find it you could try using locate to find it.

sudo updatedb

locate config.php | grep nextcloud

Edit in response to your question about switching versions of the Nextcloud snap.

To use a different version of the Nextcloud snap you can use the "switch" command. You can see the different versions available, as well as additional information about the version you have installed, by running:

snap info nextcloud

On my system it shows the newest version that isn't listed as a non-RC version is in the 16/edge channel, so you can switch with:

sudo snap switch --channel 16/edge nextcloud

After changing channels you "might", or might not, need to manually refresh your snap packages to get it to actually update, so if it doesn't seem to do anything after you change channels, you can try and force it to update to the new version with:

sudo snap refresh nextcloud


Well, to make it official here is your answer.

As you already stated a comment line is a comment line, this wont even change if you enter one directly in terminal. This counts as well for lines beginning with #!, they are simply only comments for the shell/terminal when typed in by hand.

Another option could be to echo your comment directly into the `.bash_history' like this.

echo "# i am a comment to be saved" >> ~/.bash_history

Of course this would be a lot of typing each time, but this would even allow you to make multi-line comments with echo -e, here an example:

echo -e "# line 1 comment\n# line 2 comment" >> ~/.bash_history

Another option for making multi-line comments would be the following:

cat >> ~/.bash_history << "EOF"
># line 1 comment
># line 2 comment
>EOF

This way the lines with comments will get added and you end the input with typing EOF, thats as well pretty useful if you have systems where you have no editor at hand. You will keep adding lines till you input EOF which not gets recorded.


I've encountered this before. The only way to make a proper ubuntu install usb is with ubuntu's built-in Startup Disk Creator - in my own experience. If you do not have that available, try making a bootable disk. Sorry if this doesn't help, but universal usb has NEVER worked with ubuntu for me.

Best of luck.


Block devices sda, sdb, sdc. What comes after sdz?

Yes. The kernel will continue to assign names in the form of sdaa, sdab and so on. There may be a bug preventing it from going beyond sdzzz, but in theory, it's going to continue forever (that is up to 18278 due to data type limitations).

my thanks to Rinzwind for providing the links


Avalonia is an open source cross-platform XAML Framework for .NET Framework, .NET Core and Mono.

Avalonia uses a XAML dialect that should feel immediately familiar to anyone coming from WPF, UWP and Xamarin Forms. Avalonia supports binding, MVVM, lookless controls and data templates, just as you'd expect from a XAML framework.

XML Complete extension for Visual Studio Code helps with editing XML files by providing hints. Sample schema files are provided for XAML file types (WPF, Avalonia) and for csproj files.

Visual Studio Code is much less full-featured than Visual Studio, but it has the capability of running GUI applications. If that's not enough functionality for your coursework try Visual Studio 2019 for Mac. Be aware before you install anything that you'll probably have to install some extra packages to go with either Visual Studio Code or Visual Studio.


By default, Ubuntu use the original account (the one you create when installing Ubuntu) as root password. You can use it to authenticate yourself when installing a new package.

If your new user account is an administrator account, Ubuntu will use this user password as sudo password for this user account. You can use it to authenticate yourself too.


How to enlarge the dimming time of the screen saver

It seems this value (10 seconds) is hard coded in the code. There is no way to change it unless you re-compile the power management code. It's managed by gnome-screensaver.

Source: http://people.canonical.com/~bradf/power-management.html

You can however download gnome-screensaver source package from Launchpad: https://launchpad.net/ubuntu/precise/+source/gnome-screensaver. The source code of fade out effect can be found in gs-fade.c and gs-fade.h files from src directory:

To install, follow this post: Installing applications from source

Credit to: Gnome source code of fade out effect for inactivity


Allocate swap after Ubuntu 14.04 LTS installation

First, to create 4,000 MB of swap space:

$ sudo dd if=/dev/zero of=/swapspace bs=1M count=4000
4000+0 records in
4000+0 records out
4194304000 bytes (4.2 GB) copied, 5.92647 s, 708 MB/s

or

$ sudo fallocate -l 4000M /swapspace

Next turn it into a usable swap file:

$ sudo mkswap /swapspace
Setting up swapspace version 1, size = 4095996 KiB
no label, UUID=7d1895e4-7ccf-42c6-979a-51ebddb49e91

Activate it:

$ sudo swapon /swapspace

Confirm active swap spaces:

$ cat /proc/swaps
Filename                Type        Size    Used    Priority
/swapspace              file        4095996 0       -1

Next, add the following line to /etc/fstab to activate the new swap at boot:

/swapspace none swap defaults 0 0

See also this wiki page: https://help.ubuntu.com/community/SwapFaq


Cannot Resume after suspending Ubuntu 12.04, using Thinkpad T420S

You might be having problems with your hard drive power managment.
I have had A LOT of troubles with Ubuntu suspension/resuming, and also tried all of the things you mentioned. Another thing I tried was reconfiguring the hard drive's power managment.

You can try editing "/etc/laptop-mode/laptop-mode.conf" from this:

# Power management for HD (hdparm -B values)
#
BATT_HD_POWERMGMT=1

To this:

# Power management for HD (hdparm -B values)
#
#BATT_HD_POWERMGMT=1
BATT_HD_POWERMGMT=254
LM_AC_HD_POWERMGMT=254
NOLM_AC_HD_POWERMGMT=254

It might help. Good luck!


Windows 10 - Ubuntu 15.10 dual boot issue: No Ubuntu after W10 shutdown, not restart (W10 f*** up Ubuntu start)

You see the answer is in line.

And the right term will help you: HIBERNATION.

There is a CLI in Wondows 7 / 8 / 10 helping you.

Press "Windows" + R, choose to run CMD as admin (!!).
Then
At the command prompt, type powercfg.exe /hibernate off, and then press Enter.

This does NOT work with some vendor customised Win versions. Good luck ;-) then.

Disabled HIBERNATION will re-enable Ubuntu boot.

This applies too when the Winstuff fell asleep. Depending on your settings it will go to hibernation without your interaction.

Then the same applies but you better wake up Windows and boot a true operating system before re-configuring anything.

FF!!


What is #!/usr/bin/env xdg-open in desktop file?

As per this answer , the use of #!/usr/bin/env xdg-open was meant to serve as a way to launch applications that referenced in .desktop file via command line. But as of now, it doesn't work and only opens .desktop file as text file in gedit. Nowadays , if you want to launch a .desktop app via command line, you must do some pre-processing of the file itself.

As for use of #! it basically tells your computer which interpreter to use with this file. In this case, /usr/bin/env which will return path to xdg-open command (i.e, this calls xdg-open to read and execute your file ) .


How to install wps-office on ubuntu 17.10?

The error mentions that wps requires libpng12-0, a package that is not installable in your machine. There are Ubuntu packages for libpng12-0 for trusty (14.04LTS) and xenial (16.04LTS), but not for 17.10.  You must ask to the software manufacturer (i.e. WPS) to update the program and/or the installer to use the most recent libpng16-16.

Tools such as aptitude can find a solution, for instance, to downgrade the library, only if you have repositories configured in the /etc/apt/sources.list with the old versions.

As a workaround, you may try to download and install the .deb package for Xenial from the Ubuntu web page before installing wps.

Installing libpng12

$ wget http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb
$ sudo dpkg -i libpng12-0_1.2.54-1ubuntu1_amd64.deb

Installing wps

$ wget http://kdl1.cache.wps.com/ksodl/download/linux/a21//wps-office_10.1.0.5707~a21_amd64.deb
$ sudo dpkg -i wps-office_10.1.0.5707~a21_amd64.deb

Running wps (in a X or Desktop)

$ wps

  NOTE: Installing packages from older distributions may break your apt installation system.

Is it safe to install the libpng12 package from Xenial (16.04LTS) ?

Using packages from older distributions can be dangerous. It may break the apt installation system because older packages may introduce dependencies to non-existing packages or replace packages that the new versions require. Try to use packages and repositories for the Ubuntu version you are using, i.e., the official Ubuntu repositories and well-known PPA repositories (that test their packages).

To check if the installation of libpng12 can break the apt, I checked the package information.

The libpng12 depends on libc6 (>= 2.14) and zlib1g (>= 1:1.1.4) that are included in the recent Ubuntu versions.

$ apt-cache policy libc6     # gives me 2.24-9ubuntu2.2
$ apt-cache policy zlib1g    # gives me 1.2.11dfsg-0ubuntu1

Note that no other Ubuntu package requires a recent version of libpng12 because it is not included in the repository. The most recent programs depends on  libpng16-16 and both libraries can coexist.
I think that it is very unlikely that this package breaks the apt.

Do not try to install a package of an older distribution if you are not sure of what you are doing.


Device is not detected via MTP (TCL Idol X S950 phone)

Include your device in libmtp source code

You can try to include your device in the libmtp source code and build libmtp from source.

Install mtp-tools and optionally the checkinstall package:

sudo apt-get install mtp-tools libusb-dev checkinstall
sudo mtp-detect

Take note to VID and PID numbers, example:

VID 22b8
PID 2e82

Download the latest libmtp source from the project site. At the time of writing the version was 1.1.6, so this is would be an example:

wget http://downloads.sorceforge.net/project/libmtp/1.1.6/libmtp-1.1.6.tar.gz
tar xvf libmtp-1.1.6.tar.gz
cd libmtp-1.1.6

Add an entry to your in device in the source:

gedit src/music-players.h

Example:

{ "Motorola", 0x22b8, "Moto G (XT1032)", 0x2e82,  DEVICE_FLAGS_ANDROID_BUGS }

Note, pay attention to the trailing commas (,) in the file like this:

[...]

{ "Motorola", 0x22b8, "Moto X (XT1058)", 0x2e63,
      DEVICE_FLAGS_ANDROID_BUGS },

{ "Motorola", 0x22b8, "Moto G (XT1032)", 0x2e82,
      DEVICE_FLAGS_ANDROID_BUGS },

{ "Motorola", 0x22b8, "Droid Maxx (XT1080)", 0x2e67,
      DEVICE_FLAGS_ANDROID_BUGS },

[...]

Now configure, build and install (checkinstall is recommended over make install) the patched version:

./configure
make
sudo checkinstall

Reboot and thats it.


You can also use ffprobe which is part of ffmpeg.

sudo apt-get install ffmpeg
ffprobe file.mp3

If you don't want other information, like track length and so on, you can combine the output with grep:

ffprobe file.mp3 2>&1 | grep -A90 'Metadata:'

Or in order to get only the author:

ffprobe -loglevel error -show_entries format_tags=artist -of default=noprint_wrappers=1:nokey=1 file.mp3

You can select other tags by separating them with a comma, such as format_tags=title,album.

I wanted to search for a keyword in all mp3 files in a folder. The folder had 486 files, so it became interesting to know which of the solutions mentioned here is the fastest. Here is the loop I used:

# sudo apt-get install ffmpeg lltag eyed3 mp3info id3v2 libimage-exiftool-perl libid3-tools id3tool

keyword='fill_me_in'

getTitleFF()   { ffprobe "$1" 2>&1 | sed -E -n 's/^ *title *: (.*)/\1/p'; }
getTitleLL()   { lltag --show-tags title "$1" | sed -nE 's/^  TITLE=(.*)/\1/p'; }
getTitleEyed() { eyeD3 2>&1 "$1" | sed -n 's|\x1b\[[0-9;]*mtitle[^:]*: ||p'; }
getTitleInfo() { mp3info -p %t "$1"; }
getTitleId3()  { id3v2 -l "$1" | sed -nE 's/^(TIT2 \([^)]*\)|Title *): (.*)/\2/p'; }
getTitleExif() { exiftool -title -b "$1"; }
getTitleId3i() { id3info "$1" | sed -nE 's/^=== TIT2 \([^)]*\): //p'; }
getTitleTool() { id3tool "$1" | sed -n 's|^Song Title:\t||p'; }

for prog in FF LL Eyed Info Id3 Exif Id3i Tool; do
    echo "=== getTitle${prog} ==="
    time \
    for file in *.mp3; do
        if "getTitle${prog}" "$file" | grep -q "$keyword"; then
            echo "$file"
        fi
    done
done

Notes:

lltag and mp3info don't find a title, because the files I was using had ID3v2 tags, see the comment by @s-prasanth: How to read mp3 tags in shell?
eyeD3 is problematic to use programmatically, because it uses color codes (boldness).
eyeD3 and also id3v2 (but only for ID3 v1 tags) return the title and the artist on the same line, which further complicates things; therefore getTitleEyed and sometimes getTitleId3 return both the title and the artist, so please don't copy-paste those functions.
getTitleId3 will only work for ID3 v2 tags, because id3v2 has different formats for ID3v1- and ID3v2-tags, i.e.

Title  :                                 Artist:

vs. ID3v2:

TIT2 (Title/songname/content description):

As the only program of these 5 eyeD3 prints a red warning for two of the files:

Invalid mode/bitrate combination for layer II
No ID3 v1.x/v2.x tag found!

It seems like those two files have ID3v1 tags, because those two files are the only ones where lltag and mp3info can get a title. I'm wondering if this is a bug in eyeD3 as no other program mentioned here has a problem with these files ...

Results (real time):

 Program  | Version    | Time / s
----------+------------+-----------
 exiftool | 10.25      | 49.5 ± 0.5
 lltag    | 0.14.5     | 41   ± 1.0
 ffprobe  | 3.1.3-1+b3 | 33   ± 0.5
 eyeD3    | 0.6.18     | 24   ± 0.5
 id3info  | 3.8.3      | 4.2  ± 0.1
 id3v2    | 0.1.12     | 2.9  ± 0.1
 id3tool  | 1.2a       | 1.7  ± 0.1
 mp3info  | 0.8.5a     | 1.4  ± 0.1

Time-wise the winner here is id3tool (mp3info is faster, but doesn't work with ID3 v2).
id3v2 is also quite fast, but the getTitleId3 function would need adjustment to also work with ID3v1-tags, which may at worst slow it down by factor 2.


How to list drivers/kernel modules affected by SecureBoot?

All kernel modules that are signed will have ~Module signature appended~\n appended to the end of the file. (Source) To find out if there are any unsigned kernel modules, you can simply search for all *.ko files that don't have the magic string.

For example:

find /lib/modules -name '*.ko' -exec grep -FL '~Module signature appended~' {} \+


Can I simply delete my Ubuntu partition on a windows 10 dual-boot, then reinstall ubuntu from USB, with no windows disk?

I would backup the whole drive (including Windows) before reinstalling, just in case something would go wrong.

You can use Clonezilla, http://clonezilla.org to get an image, that you can use to restore the current dual boot system. If you want to be 100% sure, you should test the backup by restoring to a fresh drive.
You can also install Windows from an iso file, if you find a sticker with the license key somewhere on the computer, or if you create 'recovery disks'.

After that you can re-install Ubuntu. You need not remove the old version of Ubuntu, only make sure that you identify the partitions correctly.

Select 'Something else' at the partitioning window of the installer. Select the partitions for the root file system (and other partitions) that you used before and let the installer format them, and continue the installation.


Can't get Ubuntu to dual boot with windows 8.1

In my general experience (I've recently moved to Ubuntu as my sole OS), it shouldn't matter too much about formatting the hard drive before installing Ubuntu. You can create your partition as part of the installation process. So, my advice would be: Install Windows first, then install Ubuntu and create the partition as part of the install.


Trying to permanently share a USB device from Raspbian to Ubuntu with usbip

There two steps on the usbip server, and two steps on the usbip client. It's the same process on each, just the names are a bit different.

Step #1 on both the server and client: Load load modules at boot.

This replaces the sudo modprobe lines.

See Run modprobe on startup for detailed explanation and alternatives.

Edit /etc/modules (using sudo, of course), and add the names of the modules for that machine.

Example:

$ sudo nano /etc/modules

usb-core
usb-host

Now those modules will be added (modprobe) at boot.

Step #2 on both the server and client: Create a systemd service file for easy control, reset, and start-on-boot on the usbip client and server.

This one is a bit more involved. It requires an understanding of systemd and basic shell commands.

Here's an example systemd etc/systemd/system/usbipd.service file for the usbip server that you must create:

[Unit]
Description=usbip host daemon
After=network.target

[Service]
Type=forking
ExecStart=/usr/sbin/usbipd -D
ExecStartPost=/bin/sh -c "/usr/sbin/usbip bind --$(/usr/sbin/usbip list -p -l | grep '#usbid=10c4:8a2a#' | cut '-d#' -f1)"  // Edit this line to match your USB device
ExecStop=/bin/sh -c "/usr/lib/linux-tools/$(uname -r)/usbip detach --port=$(/usr/lib/linux-tools/$(uname -r)/usbip port | grep '<Port in Use>' | sed -E 's/^Port ([0-9][0-9]).*/\1/')"

[Install]
WantedBy=multi-user.target

You can see that the .service file runs usbip in server (daemon) mode when started, and terminates the server when stopped. This means that you can use normal systemctl commands to run and query the server:

systemctl status usbipd.service          // status and troubleshooting
sudo systemctl start usbipd.service      // start
sudo systemctl stop usbipd.service       // stop
sudo systemctl restart usbipd.service    // stop, then start again
sudo systemctl enable usbipd.service     // start at boot forever from now on
sudo systemctl enable usbipd.service     // leave dormant at boot forever from now on

Now I can have usbipd start automatically whenever my server boots, and I can query it's status using plain old ssh.

The rather similar systemd file for the client is left as an exercise for the student.


Creating a "deadman" switch using Ubuntu to shutdown EC2 instance

shutdown -h now is a non-blocking command, so there is no issue as the job exits right after it has issued shutdown request to the kernel.


How can I disable hwe-support on ubuntu 18.04?

There's a page over at ubuntu.com, which details downgrading to the GA kernel for 20.04.  They don't have specific instructions for 18.04, but they look like they should be the same:

To downgrade from HWE/OEM to GA kernel:
sudo apt install --install-recommends linux-generic

If NVIDIA drivers are required check appropriate level and install
them:
ubuntu-drivers list

And then install appropriate NNN version of the drivers:
sudo apt install --install-recommends linux-modules-nvidia-NNN-generic

Reboot, interrupt grub, in advanced options elect to boot 5.4 based
kernel, complete boot. Check that everything works as expected.
If everything is good, you may remove the other kernel flavours:
sudo apt remove --purge linux-generic-hwe-20.04 linux-oem-20.04 linux-hwe-* linux-oem-* linux-modules-5.1* linux-modules-5.8.0-* linux-modules-5.6.0-*


Desktop doesn't load after install Nvidia drivers

When something used to work, and stopped working, it is known as a regression. Regressions are usually caused by a hardware or software change that didn't agree with Ubuntu. In your case, if you have not tried it already, uninstall the Nvidia driver. If it is so broken that you can't do that, you may have to boot from the Live CD to do it. Also, by "With no unity. Or icons", do you mean it boots into GNOME, or you just see the desktop background and nothing else? Also, other info, such as the driver version, graphics card model, and other specs could be useful. Remember, on AskUbuntu, there is no such thing as too much information. Anyways, I hope this helps, and happy hacking!


WinRAR is a windows program for using RAR type files.  There is no 'WinRAR' on Ubuntu.

Installing rar like you did should add support for RAR files into the standard "archive manager" for ZIPS, TARs, etc.

(copied from William Fleming, he got some of my upvote power for his answer)
Installing unrar will help you with unpacking them:  sudo apt-get install unrar


Installing PCRE from source...make install error!

I had problem installing it from http://www.swig.org/download.html even though I installed PCRE by libpcre3 from the repository so I ended up installing swig by

  sudo apt-get install swig


Well the answer is yes there is one simple fix for all of this just add the X-swat PPA and update your driver, mine went from version 2.9 to 3.1 I think so a good jump, and all these errors just went away.

Open a terminal and add the PPA

sudo apt-add-repository ppa:ubuntu-x-swat/x-updates

Then update the repos

sudo apt-get update

And finally update the drivers

sudo apt-get dist-upgrade

Now reboot, and when you log back in you will have a working, up to date nvidia driver in Ubuntu ;)

Hope this helps someone....


Will matplotlib 1.2 be in 12.04 or 12.10?

The latest python-matplotlib official release from the developers is 1.1.1-rc2
So you will not see python-matplotlib 1.2 in 12.04 official repositories anytime soon.
Consider that the current version of python-matplotlib in Debian Sid is also 1.1.1-rc2
Ubuntu 12.10, currently in alpha, also contains 1.1.1-rc2
This is expected, since it's based on the packages in Debian Sid; 12.10 will be "frozen" on August 23, 2012, and any package updates after that date will be rare (only critical stability fixes, etc.)
So bottom line, unless python-matplotlib 1.2 makes it into Debian Sid before August 23, you may not see it upon 12.10 release either (although it may make it into updates)


Compilation of Linux kernel 3.14 stops without any errors on ubuntu 14.04

After adding ARCH=x86_64 flag to all the make commands, everything worked like a charm.


How can I Set wait_timeout for a Spesific Database on MySQL?

Notice how webpages are "stateless" and carry nothing from one page to the next, at least not in the same way as your program seems to do.  You are trying to keep a program up for 30 minutes with "state" not going away.
Even in this relatively reliable era, that is not practical.  It is better to do what web pages do and what queue processing does for long-running tasks -- Store the "state" somewhere (a database table) and hand off an "id" from one page to the next.  In a webpage, the "id" could be an argument in the URL or a value in a "cookie", etc.  Meanwhile, an arbitrarily large amount of data can be persisted in the database until the user comes back for it.
As for choosing between 3 minutes and 30, that would need to be done programmatically.
So...

Do what you can with the processing.
Store the "state" in a database, getting back an "id", which you give to the user.
Close the connection.

Later...

The user starts up the next stage of the processing
The id is used to fetch the state.
If he took too long (more than 3 or 30 minutes, as checked by your app), he is slapped on the wrist and sent away.

This drastically reduces the number of simultaneous connections needed.  Yes, there is some overhead of making a new connection, but this is worth it.  Also, you are in full control of how long he can "keep the cart active" or whatever.
"Safe" -- It can be argued that to pass a simple "id" number via the URL is very unsafe, especially from mischief-makers.  A hash can be used to greatly decrease the chance of such a hacker hitting on a valid id.  In web processing, a "cookie" is quite "safe".
Sorry for the hand-waving, but it would help to know something about your app (shopping cart, or queue, etc) and platform (website, etc).


get objdump to display full hex of a 64 bit mov instruction


bond0: An illegal loopback occurred on adapter (em2)

Though the specifics are different, I was experiencing this same result recently with an Intel X710 10GbEx2 card in CentOS using i40e 1.3.38, connected via 802.3ad to a Brocade MLXe. LACP was working fine, but the errors would persist every 30 seconds. Updating the driver to a recent version (1.3.47) has resolved the errors for me.

You can check your driver version with modinfo i40e.


Recreate the live usb and try again. it sounds like it could be a corrupted file. if the problem persists, download the iso again


Folder icon doesnt show for non-root user

Your idea about the file permissions, feels right to me, yet it is not about the file permissions of the folder, but of the image you use for your folder.

If you drag&drop your files, the permissions of the original file stay alive, so if only the user/owner of the file are allowed to read/write, the user on your VM will not have the permissions, as it is a different user.

To solve this issue:

either run sudo chown VM-USERNAME YOURFOLDERIMAGE.svg inside the
virtual machine, this makes you the owner of the file
or give sufficient rights to the file before drag&drop via chmod a+r YOURFOLDERIMAGE.svg, this would give all the permission to read.

The linux file permissions get lost if you use a filesystem not capable of storing them - this is the case with (v)fat(32) and ntfs, which are most commonly used on usb-sticks or external harddrives - therefore your "solution" worked.

To learn more about linux file permissions look at the link in above paragraph and check out man chmod.


How to have a different background for each workspace in MATE

Although I could not test it, due to the fact that I don't have Mate avaialble atm, looking at the output of wmctrl -d, and given the fact that wallpapers on Mate are obviously set with the same gsettings command, I see no reason why it should not work.

The script

The script below is an edited version of this one, and kind of an exerpt of the one I pushed to Launchpad. As it is, that one won't work for Mate, since I added a session-check in that one, for either Unity or Budgie.

If you can confirm the script below works on Mate, I'll probably edit the ppa version to include Mate.

The script

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

try:
    os.mkdir(os.path.join(os.environ["HOME"], ".config/wswitcher"))
except FileExistsError:
    pass

workspace_data = os.environ["HOME"]+"/.config/wswitcher/wallpaper_data_"
key = [
    "gsettings get ",
    "gsettings set ",
    "org.gnome.desktop.background picture-uri",
    ]

def getwall():
    return subprocess.check_output(
        ["/bin/bash", "-c", key[0]+key[2]]
        ).decode("utf-8").strip()

def get_res():
    # get resolution
    xr = subprocess.check_output(["xrandr"]).decode("utf-8").split()
    pos = xr.index("current")
    return [int(xr[pos+1]), int(xr[pos+3].replace(",", "") )]

def current_ws():
    # get the current workspace
    wsdata = subprocess.check_output(["wmctrl", "-d"]).decode("utf-8").splitlines()
    return [l.split()[0] for l in wsdata if "*" in l][0]

def wswitcher(curr_ws1, currwall1):
    while True:
        time.sleep(1)
        currwall2 = getwall()
        curr_ws2 = current_ws()
        datafile = workspace_data+curr_ws2
        if curr_ws2 == curr_ws1:
            if currwall2 != currwall1:
                open(datafile, "wt").write(currwall2)
        else:
            if not os.path.exists(datafile):
                open(datafile, "wt").write(currwall2)
            else:
                curr_set = open(datafile).read()
                command = key[1]+key[2]+' "'+str(curr_set)+'"'
                subprocess.Popen(["/bin/bash", "-c", command])
        curr_ws1 = curr_ws2
        currwall1 = getwall()

curr_ws1 = current_ws(); currwall1 = getwall()
wswitcher(curr_ws1, currwall1)

How to use

Copy the script into an empty file
Save it as wallswitcher.py
Test- run it by the command:

python3 /path/to/wallswitcher.py

Then simply start setting up your wallpapers as demonstrated here.
If all works fine, add it to Startup Applications:

/bin/bash -c "sleep 10 && /path/to/wallswitcher.py


Map a key to another key as keyboard damaged

First install xbindkeys and xte by running:

sudo apt-get install xbindkeys xautomation

Create the xbindkeys configuration file: xbindkeys --defaults > $HOME/.xbindkeysrc
Next we need to edit the file.  Run gedit .xbindkeysrc
Add this to the bottom of the file:

"xte 'key 2'"
m:0x18 + c:38
Alt+Mod2 + a

Save the file.
Open "Startup Applications" from the dash, and click "Add".
Put /usr/bin/xbindkeys  and click "Add".
Restart the computer.

Your 2 key should now be bound to Alt + a.


imagemagick has a tool called mogrify. That's your friend! ;)
Especially take a look at the crop function.


find the Integer value after a string from a file

Try this sed command:

sed -E 's/^.*weight\s([[:digit:]]*).*/\1/' sort.txt  | sort -n

Or

sed -E 's/.*weight\s([0-9]*).*/\1/' sort.txt | sort -n

Test case:

-weight 100
-weight 200
-weight 20

Results:

20
100
200

Note:- You didn't give a good test case so I assumed mine.

Info:

^.*weight\s([[:digit:]]): Read each line and capture the numbers after the word "weight" with the "space" following.
| sort -n: Pipe the output into the sort command and sort by numeric value.


Name of the sample music that comes with Ubuntu

The song featured in Ubuntu 18.04 LTS is called "I don't know" (YouTube link to the song), the artist is Jenyfa Duncan (SoundCloud profile).

Another song called "Australia" (YouTube link) by the same artist was featured before in Ubuntu 16.04 LTS.


To solve this problem, I was must to appoint tomcat user to tomcat folder.
To install tomcat on server I used this link, and this to manage users. Hope it will helps anybody!


Can't open magnet links or APT links with Chromium

Make Chromium or Chrome to open magnet links in LXDE

  To make chromium to open magnet links, that most of the torrent sites uses. You need to open terminal and write:

gconftool-2 -t string -s /desktop/gnome/url-handlers/magnet/command "transmission %s"
gconftool-2 -s /desktop/gnome/url-handlers/magnet/needs_terminal false -t bool
gconftool-2 -t bool -s /desktop/gnome/url-handlers/magnet/enabled true

  Open xdg-open in desired text-editor

sudo medit /usr/bin/xdg-open

  find the lines:

#--------------------------------------
# Checks for known desktop environments
# set variable DE to the desktop environments name, lowercase
detectDE()
{
 if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
 elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
 elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
 elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
 elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
 else DE=""
 fi
}

  make it to look like this instead:

#--------------------------------------
# Checks for known desktop environments
# set variable DE to the desktop environments name, lowercase
detectDE()
{
# if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
# elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
# elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
# elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
# elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
# else DE=""
# fi
DE=gnome;
}

  This will probably work in Arch, Lubuntu, Mint and Fedora. Will work in other Linux OS that uses lxde as desktop environment. This isn’t a optimized hack, if you know another way that works as good as this, let me know.


Upgrade Awstats 6.9 to 7.0 on Ubuntu 10.04 LTS

Download the latest from:

http://awstats.sourceforge.net/#DOWNLOAD

Extract the archive:

Copy:

awstats-7.0\wwwroot\cgi-bin\awstats.pl

To:

/usr/lib/cgi-bin

Copy:

awstats-7.0\wwwroot\cgi-bin\lang
awstats-7.0\wwwroot\cgi-bin\lib
awstats-7.0\wwwroot\cgi-bin\plugins
awstats-7.0\awstats-7.0\wwwroot\icon

To:

/usr/share/awstats

Open Webmin, Webmin Configuration, Webmin Modules, then browse for the file

awstats-7.0\awstats-7.0\tools\webmin\awstats-1.9.wbm

and install.

Update should now be complete.

Have answered my own question here: https://www.virtualmin.com/node/21442


My super key is disabled. How to enable it?

I've looked into this thread and ran

xmodmap -e "keycode 133 = Super_L"

which solved my problem.

Update:

The problem seems to occur after every restart (shutdown). I couldn't figure out why this happens. To prevent this, I added the following command in startup application:

xmodmap -e "keycode 133 = Super_L"

Apparently, this is the only known solution to me.


My system had a similar problem: I was able to choose "Chinese", but it didn't really input any Chinese. The key step missing was to install a specific Chinese input method/package. E.g.:

sudo apt-get install ibus-pinyin

After installing Pinyin in this example, go to System Settings → Language Support → Chinese (Pinyin).

Now it works as expected.

This thread helped me to figure out this solution. It also suggests another input method:

sudo apt-get install ibus-sunpinyin

P.S.

After either of those commands do not forget to restart the IBus daemon

ibus restart


Notifications Mode is missing in Artha Dictionary!

The version of libnotify.so provided on GNOME3 and apparently, KDE 4.latest is not compatible with Artha anymore as the notification library it depends on is libnotify.so.3.

The developers are fixing this with the port to GNOME3. you can find more info in this bug report: https://bugs.launchpad.net/artha/+bug/791673.


How can I read a sh file while it is working but deleted?

tail -c +0 -f /proc/{pid}/fd/{fd} > /tmp/file

where {pid} is the id of your process and /tmp/file will have its contents. Use another location and name if you want to preserve it.

{pid} is the id of the process.
{fd} is the file descriptor. lsof should show the fd. lsof is likely also going to show "deleted" on the line so you can grep that too. lsof -nP +L1 will list all files with less than 1 link, a file deleted will have 0. Add a | grep {pid} to search for just your PID.
from dessert: lsof -p 22664 | sed -E '$!d;s/.*\s([0-9]+)[a-z]\s.*/\1/' to just get the fd.
from comments: you can use less, cat or cp too. I grew up on tail :)


You can install the nightly packages from the ubuntu-elisp ppa.

sudo add-apt-repository ppa:ubuntu-elisp/ppa
sudo apt-get update
sudo apt-get install emacs-snapshot


How to extract only 7 characters using grep

Use extended grep:

grep  -E '^[a-zA-Z0-9]{7}$' /usr/share/wordlists/rockyou.txt

or your own version like:

grep '^[a-zA-Z0-9]\{7\}$' /usr/share/wordlists/rockyou.txt

or even:

egrep '^.{7}$' /usr/share/wordlists/rockyou.txt


Difference between Lubuntu Mini Core and Lubuntu Mini Desktop

You are correct that difference is the packages included in each option.

Installation options for minimal, core, and full desktop are given at Lubuntu Minimal Install.

The minimal version is the same as the standard ubuntu-minimal metapackage. The list of packages included is given at Saucy ubuntu-minimal.

The core version is installed on top of minimal. The list of packages it provides is given at Saucy lubuntu-core.

The packages in the full version are listed at Saucy lubuntu-desktop.

Keep in mind that the minimal install does not include a graphical desktop at all. The core install has a basic lxde desktop, but does not include certain graphical tools like network-manager-gnome. If you are dependent on wifi, you will need to set it up manually or install NetworkManager from removable media before you can do updates or install additional packages.

The minimal install uses, I believe, a textual installer similar to the Ubuntu server and Debian textual installer.

PowerPC is no longer officially supported but is supported by the community. See PowerPC FAQ in the Ubuntu wiki for more information.

PowerPC downloads are also linked from the wiki. Most of the links take you to the daily builds (14.04), but you can get to other releases by navigating the directories.

A PowerPC iso for Lubuntu is available. You should be able to just install the full Lubuntu with that image and not worry about starting with the minimal install.

The list of packages in the PowerPC image, by the way, is given in the ubuntu-13.10-desktop-powerpc.manifest. If in the end the regular install won't run on your computer, you would need to do the minimal install, then download and burn the full PowerPC image to use the media as a repository to install the rest of the packages.


Error during 10.04 LTS to 12.04.1 LTS: "Failed to fetch..."

It's more complicated to upgrade from 10.04 to 12.04 via 10.10, 11.04, 11.10, etc., because many of those releases are long since EOL and unsupported. I haven't figured out how to do it myself.

However, you can upgrade from LTS to LTS, from 10.04 directly to 12.04, skipping in the intermediary EOL releases. You have to set Update Manager to only look for Long-Term Support Releases though.

Follow the instructions here:
https://help.ubuntu.com/community/PreciseUpgrades#Network_Upgrade_for_Ubuntu_Desktops_10.04_LTS_to_12.04_LTS_.28Recommended.29


Websites turn white in Ubuntu phone browser and webapps

It's related to this bug with critical status, should be fixed by OTA 7: https://bugs.launchpad.net/ubuntu/+source/ubuntu-app-launch/+bug/1478853


If you're building up options in a string, you'll run into problems when you try to use it (rsync "$RSYNCCONF").
Better to use an array -- when you dereference the array, each element will be properly handled by the shell:

RSYNCCONF=( --delete '--exclude=.*' --exclude=temp/ '--exclude="Ubuntu One/"' )
rsync "${RSYNCCONF[@]}"


32bit Ubuntu do-release-upgrade to 18.04

My understanding is that the 32-bit distribution will continue to be supported for now, but that 32-bit iso images with installers, etc. will not be produced.

So yes, you will be able to upgrade but not do a fresh 32-bit install.


I've also had problems running VMWare Player after upgrading Ubuntu from 10.4 to 10.10 as it could not recompile it's modules (due to the changes in kernel) - this guide helped to solve that issue.

Also I've had issues with non-compilable VMCI Sock module (due to the changes in the kernel). Please see this link for the solution.

These two patches worked fine for me.


No installation type when Dualboot Ubuntu 16.04 and Windows 10 (SSD & UEFI)

I directly get to the second window "Installation type" with the list of device on which I could install ubuntu. And there I only got one device named /dev/sda (which by the way is the same name as the "device for boot loader installation" : /dev/sda Kingston DT, which I found weird). I expected to see the 6 disk partitions I mentioned earlier.

The /dev/sda device you're seeing sounds like your USB flash drive, on which the Ubuntu installer itself resides. The symptoms you're reporting are usually the result of Ubuntu being unable to read your hard disk, which in turn usually means that the disk type or disk controller is not supported by the kernel you're using. If I'm right, there are several options for how to proceed:

Since Ubuntu 16.04 and 16.04.1 use an older kernel, you may need to upgrade to a newer kernel by using Ubuntu 16.04.2, Ubuntu 16.10, or even a pre-release version of Ubuntu 17.04.
If none of these versions work, then you could try another distribution (something unrelated to Ubuntu -- Fedora, OpenSUSE, or Arch might work; but don't bother with the likes of Mint or ElementaryOS, since they're based on Ubuntu).
Another option is to install Ubuntu on an external USB drive. You'd need to use this drive for your shared NTFS partition, too.
You could run Ubuntu in a virtual machine (VirtualBox, VMware, etc.) running under Windows.
If the computer is new enough, you could return it to the store for a refund and get something else; or even if that's not an option, you could sell it and buy something else. In either of these cases, you should obviously be more cautious about compatibility. You might want to consult the Ubuntu certified hardware page to be sure you get something that works with Ubuntu.


Is privacy an issue while searching in the Dash?

Yes it is true; I feel this could not be repeated enough.
The searches include mostly your string that you gave in in the Dash. When the Dash couldn't find an answer it gives it out to tirth parties like (commonly known) Amazon.
This idea was implemented NOT to spy on you, but just letting the Dash give you always an answer, even when the thing you were searching for is not on your computer.

It's sad this option got green light, but look at it as an extra feature (and don't get to paranoïd about it).

You can easily disable this feature using the Privacy settings:

In 13.04 you should be able to choose to enable some providers while disabling others.


This should not be any special case unless I'm missing something. 2.5 inch SATA should fit into your laptop and you should be able to boot it (assuming laptop is not completely broke.) Then simply pop-in your Ubuntu CD and install.

Note: You may have to choose "CD" as first media in bios settings.

Also choose "Use entire disk" during installation. Ubuntu will take care of partitioning for you.
Here's a useful link!


Disabling WiFi power management solved this problem for me. In the file /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf, I changed it to look like this:

[connection]
wifi.powersave = 2

Restart NetworkManager (sudo systemctl restart NetworkManager) and it should be go to go.


The OpenStack Operations Guide is pretty thorough. Chapter 11 covers Maintenance, Failures, and Debugging and has information on adding/replacing different types of nodes. You can also search that guide from the top left for any other topics that interest you.


My touchpad on my ASUS K55N is not being detected

Try these:

sudo modprobe -rv psmouse
sudo modprobe -v psmouse

It will remove-reload the psmouse driver which controls the touchpad in asus laptops.

If that does not help, try:

echo "blacklist asus_nb_wmi" | sudo tee -a /etc/modprobe.d/blacklist.conf

Then reboot and see if it helps.

The "asus_nb_wmi" driver mainly controls the wifi and bluetooth switch, but in combination of some other drivers, it also controls some other Fn+ hotkeys, including enable/disable touchpad.

Disabling it will also disable some Fn+ key combinations, so this is just for a test. To remove it from blacklist to make it work again:

sudo sed -i "/asus_nb_wmi/ d" /etc/modprobe.d/blacklist.conf

Although since your touchpad is entirely disappeared, I doubt if any of these trivial workarounds are going to fix it, but testing won't hurt. Maybe another update would fix it automatically.


How to go back from a PageStack's Page to the parent tab in the UI Toolkit

This is due to a bug recently introduced into the UI Toolkit: https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1316736

Once that is fixed, it will once again return you to the previously selected tab when going back to the Tabs page of a PageStack.


Change the "Selected Items" colour for non-focus fields

In order to change the Ubuntu theme, both the theme and the Unity Tweak Tool must be installed:

$ sudo aptitude install shimmer-themes unity-tweak-tool

In the Unity Tweak Tool go to Appearance -> Theme and select the new theme. For me, the theme Numix resolved the non-focused Selected Items issue.

This answer is based upon DK Bose's very helpful comments.


How can I stop Firefox throwing a NS_ERROR_FILE_CORRUPTED error?

Firefox stores its HTML5 data in a file called webappsstore.sqlite. That's sitting in your profile directory which lurks somewhere in ~/.mozilla/firefox/....default/ (depending on what your profile is called).

Move that out the way and restart Firefox and everything will come back to life.

More: https://developer.mozilla.org/en/dom/storage


How to disable Fast Boot on Asus zenbook for EFI boot

The option that's critical to disable is not the "fast boot" feature in the firmware; it's the "fast startup" feature in Windows. This feature turns shutdown operations into suspend-to-disk operations, which means that the filesystems are left in an inconsistent state, which is a recipe for disaster when you dual-boot. See this Windows forum page for details on how to disable this feature.

I know less about the Intel SRT feature, so I can't really comment on it.


How to change permissions on luks-dmcrypt encrypted device?

Just to clarify for others as I've stumbled on this question when first searching for it on Google:

Issue: After doing all the necessary setup for a LUKS container file/harddisk that is already mounted with root, a user account has not write privileges to it, only read. (this is the case for most tutorials and instructions above)

Solution:

We need to change the permissions of the newly-minted filesystem that is in the encrypted harddisk/file container.

Using the example in the example where /dev/mapper/$name has already been mounted to  /media/mount_point with a command like:

sudo mount /dev/mapper/$name /media/mount_point

Open a terminal in your account and type enter this command:

  sudo chown -R yourUserName /media/mount_point

For example if joe has a mount point named myEncryptedHD he should do:

sudo chown -R joe /media/myEncryptedHD

What this does is Joe changes the owner of all files in myEncrypted to joe, and he now has read and write access. Life is good.

If you decide you don't want R/W permissions anymore, just sudo chown -R root /media/mount_point and you'll revoke your rights.

References for chown examples for more complicated permissions handling and a related question on SuperUser with a comment on the answer that also suggests the alternative sudo chmod -R 775 /media/mount_point that will set read write execute permissions on user, group and only read and execute (5) for others. A chmod man page for further info


Remove Ubuntu 14.04 and install Windows 7 Ultimate

You don't have to remove Ubuntu to install Windows, during windows installation bootup from disc you have the option to remove or format partitions and do a fresh install in it's place.

If you have no Windows installation disc then their is a way to create a flash drive installer: http://pcsupport.about.com/od/windows7/a/install-windows-7-usb.htm


Thanks @CharlesGreen for the answer:

How can I find the cause of the segfaults I'm receiving from a fresh 17.10 install?

Turns out it was a bad memory module. Anyone in the future reading this should consider running memory diagnostics after reseating your RAM. Then test with combinations of modules taken out and moved around to figure out if it's an issue with one module, one slot, or multiple.


ssh server does not start on lubuntu live image

To install use it

sudo apt-get install openssh-server

try to restart the service using

sudo service ssh restart ## to start /  restart

Check the firewall is it blocking the 22 port

sudo ufw allow 22 ## allow the 22 port

Hopefully, it should work.


0 10 * * * curl -s "http://www.pragnaprinters.com/Pragna/index.php/Notification/todays_ad" > /dev/null
0 10 * * * curl -s "url 2..." > /dev/null

This will run curl, fetching only the URL's. It'll ignore redirects and all media on page. It'll be executed at 10:00.

You can add entries to crontab using the command crontab -e, further described in this question.

If curl is not installed, you can install it with sudo apt-get install curl

Curl is also highly customizable and scriptable. man curl will give you a overview of this. In the above example -s is used to make curl silent, so no output is produced.

You can also add the curl commands in a file, like this:

#!/bin/bash
curl -s "url 1" > /dev/null
curl -s "url 2" > /dev/null

save the file as for instance /home/username/bin/curlscript.sh, and run chmod +x curlscript.sh. This can then be used in cron, instead of listing each command.


How to enable Empathy chat room notifications?

It does not look to me like there is a way to enable notifications for this, at least not if you're using Unity.

However, you can set sounds to play whenever you receive a message under Edit > Preferences > Sounds:

However, you can have notifications displayed (whether you like it or not) if you use Empathy through GNOME Shell without your chat window being focused. A notification will appear at the bottom of the screen, showing the messages and even allowing you to type a reply.

I realize this amounts to my answer basically being "use sounds instead or switch your session", but that's the best I can come up with.


For the case given in your question, a simple script like this will do:
for d in {1..5}; do echo cp "$d/filex.txt" "folderabc/${d}filex"; done

The destination directory folderabc must exist - if it doesn't, then create it first with mkdir folderabc.
Remove the echo once you are happy that it is doing the right thing.


trouble restoring home directory from backup

You can rename your current /home/user with sudo mv /home/user /home/user1 and then restore with your first command.


Using bootable usb to install Ubunu 13.10: installer not finding current Ubuntu 13.04?

Try something else then format all the 12.10 Partition and re-use them for 13.10


Try this answer:

  It seems that you can't remove apps from the Dash, however you can
  manage your launchers (*.desktop files) in one of the following
  directories:

  /usr/share/applications
  /usr/local/share/applications
  ~/.local/share/applications

  If your launcher file is in any of the first two directories, you will
  require root permissions to remove it.