macro keys for Razer BlackWidow Ultimate

First, we need a little Python3 script, taken from here (Please go and give @Sergey an upvote ;))

I have replaced the product id with my product id 011a

#!/usr/bin/python3

import usb
import sys

VENDOR_ID = 0x1532  # Razer
PRODUCT_ID = 0x011a  # BlackWidow Ultimate Elite

USB_REQUEST_TYPE = 0x21  # Host To Device | Class | Interface
USB_REQUEST = 0x09  # SET_REPORT

USB_VALUE = 0x0300
USB_INDEX = 0x2
USB_INTERFACE = 2

LOG=sys.stderr.write

class blackwidow(object):
  kernel_driver_detached = False

  def __init__(self):
    self.device = usb.core.find(idVendor=VENDOR_ID, idProduct=PRODUCT_ID)

    if self.device is None:
      raise ValueError("Device {}:{} not found\n".format(VENDOR_ID, PRODUCT_ID))
    else:
      LOG("Found device {}:{}\n".format(VENDOR_ID, PRODUCT_ID))

    if self.device.is_kernel_driver_active(USB_INTERFACE):
      LOG("Kernel driver active. Detaching it.\n")
      self.device.detach_kernel_driver(USB_INTERFACE)
      self.kernel_driver_detached = True

    LOG("Claiming interface\n")
    usb.util.claim_interface(self.device, USB_INTERFACE)

  def __del__(self):
    LOG("Releasing claimed interface\n")
    usb.util.release_interface(self.device, USB_INTERFACE)

    if self.kernel_driver_detached:
      LOG("Reattaching the kernel driver\n")
      self.device.attach_kernel_driver(USB_INTERFACE)

    LOG("Done.\n")

  def bwcmd(self, c):
    from functools import reduce
    c1 = bytes.fromhex(c)
    c2 = [ reduce(int.__xor__, c1) ]
    b = [0] * 90
    b[5:5+len(c1)] = c1
    b[-2:-1] = c2
    return bytes(b)

  def send(self, c):
    def _send(msg):
      USB_BUFFER = self.bwcmd(msg)
      result = 0
      try:
        result = self.device.ctrl_transfer(USB_REQUEST_TYPE, USB_REQUEST, wValue=USB_VALUE, wIndex=USB_INDEX, data_or_wLength=USB_BUFFER)
      except:
        sys.stderr.write("Could not send data.\n")

      if result == len(USB_BUFFER):
        LOG("Data sent successfully.\n")

      return result

    if isinstance(c, list):
#      import time
      for i in c:
        print(' >> {}\n'.format(i))
        _send(i)
#        time.sleep(.05)
    elif isinstance(c, str):
        _send(c)

###############################################################################

def main():
    init_new  = '0200 0403'
    init_old  = '0200 0402'
    pulsate = '0303 0201 0402'
    bright  = '0303 0301 04ff'
    normal  = '0303 0301 04a8'
    dim     = '0303 0301 0454'
    off     = '0303 0301 0400'

    bw = blackwidow()
    bw.send(init_old)

if __name__ == '__main__':
    main()

To start the script, we need pyusb for Python3

sudo pip3 install --upgrade pip
sudo pip3 install pyusb

Save the Python script as init_blackwidow.py and set the execution rights. Now start the script with

sudo ./init_blackwidow.py

Now you can check the keycodes with xev …

… until the next reboot :\

But we can use /etc/rc.local and udev:

Copy the script init_blackwidow.py into /usr/local/bin
Add the line below in /etc/rc.local, before the line exit 0

/usr/local/bin/init_blackwidow.py

Now you should have something like this

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/usr/local/bin/init_blackwidow.py

exit 0

Create a new rule

SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="1532", ATTR{idProduct}=="011a", RUN+="/usr/local/bin/init_blackwidow.py"

in

/etc/udev/rules.d/99-razer_blackwidow.rules

Restart udev

sudo service udev restart

and enjoy …


You have to stick with the already installed open source radeon driver.
AMD Catalyst does only support graphics chips as of Radeon HD 5000.
But that is no problem because Ubuntu runs great with radeon driver!


Is creating desktop applications using Firefox possible?

The official way would be to use webapp-container: https://developer.ubuntu.com/en/web/ubuntu-webapps-guide/

Then the webpage is rendered and runs in an Oxide webview. Oxide is a Blink/Chrome webview that is customized for Ubuntu.
The Oxide webview runs and displays in the webapp-container. The webapp-container is the executable app runtime that is integrated with the Ubuntu/unity shell.
The webapp experience is contained and isolated from the browser data point of view. That is webapps do not access data from any other installed browser, such as history, cookies and so on.

E.g. for Gmail you could either run the following command from a terminal:

$ webapp-container https://mail.google.com/mail/u/0/#inbox --app-id=comgooglemail

Or create ~/.local/share/applications/comgooglemail.desktop with the following content:

[Desktop Entry]
Name=Gmail Inbox
Name[nl]=Gmail Postvak IN
Exec=webapp-container https://mail.google.com/mail/u/0/#inbox --app-id=comgooglemail --user-agent-string='Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0'
Icon=/home/username/comgooglemail.png
Type=Application
Actions=compose;starred;contacts
StartupWMClass=comgooglemail
OnlyShowIn=Unity

[Desktop Action compose]
Name=Compose
Name[nl]=Opstellen
Exec=webapp-container https://mail.google.com/mail/u/0/#inbox?compose=new

[Desktop Action starred]
Name=Starred
Name[nl]=Met ster
Exec=webapp-container https://mail.google.com/mail/u/0/#starred

[Desktop Action contacts]
Name=Contacts
Name[nl]=Contacten
Exec=webapp-container https://mail.google.com/mail/u/0/#contacts

Now open the Unity dash and type gmail to open the comgooglemail webapp.
This also offers quicklists (visible when right clicking the icon) for Compose, Starred and Contacts. Search online for an icon (minimum 48x48 pixels) and save it to ~/comgooglemail.png

Another way would be to create ~/comgooglemailbrowser.desktop with the following content:

[Desktop Entry]
Name=Gmail Inbox
Name[nl]=Gmail Postvak IN
Exec=xdg-open https://mail.google.com/mail/u/0/#inbox
Icon=/home/username/comgooglemail.png
Type=Application
Actions=compose;starred;contacts
StartupWMClass=comgooglemail
OnlyShowIn=Unity

[Desktop Action compose]
Name=Compose
Name[nl]=Opstellen
Exec=xdg-open https://mail.google.com/mail/u/0/#inbox?compose=new

[Desktop Action starred]
Name=Starred
Name[nl]=Met ster
Exec=xdg-open https://mail.google.com/mail/u/0/#starred

[Desktop Action contacts]
Name=Contacts
Name[nl]=Contacten
Exec=xdg-open https://mail.google.com/mail/u/0/#contacts

xdg-open opens a http/https URL in the user's preferred webbrowser (e.g. Firefox), you could replace it by firefox as well.
This also offers quicklists for Compose, Starred and Contacts.
Search online for an icon (minimum 48x48 pixels) and save it to ~/comgooglemail.png

This does not offer the same kind of Unity integration as webapp-container since it just opens in Firefox.
To put it into the starter you need to type gmail and drag it into the starter (you can not pin the webpage directly into the starter by right clicking since this would only pin Firefox itself).
The webpage will open in a new Firefox tab and no arrow will be shown on the comgooglemailbrowser launcher icon in the starter indicating that a window is open, the arrow is shown on the Firefox icon.


You can set which directories you don't want to appear in the dash search, just open your Privacy settings and select them there.


I've figured out the problem by detail looking the terminal outputs. In output, it gave an error about dconf-update.c which were some syntax errors. In my system, code file was in ~/jhbuild/checkout/dconf/bin and errors were caused by

catch0_g_fıle_error

as you can see, (I think, not sure) Vala interpreter put ı which is not in ASCII character instead of i, I have searched for fıle in source code with my text editor and changed ı's with i's and selected option 1(Rerun phase build) and it worked.


icon of the .desktop file does not show in unity launcher

I'm self posting the answer I found on the internet, here's my desktop entry, temporarily using baobab icon, but I hope I'll manage to change that. ranger shows up as an indepentent app, and I can swith to it with Super+Number, and that's mainly the thing I wanted to achieve. Using this method I also managed to add some bookmarks to the left-click menu of this launcher.

[Desktop Entry]
Name=Ranger Filemanager
Comment=File management utility
Exec=gnome-terminal --disable-factory --sm-client-disable --class=myserver -x ranger
StartupWMClass=myserver
Icon=baobab
Terminal=false
Type=Application
StartupNotify=true
X-Ayatana-Desktop-Shortcuts=Dir1;Dir2;

[Dir1 Shortcut Group]
Name=dokumenty
Exec=gnome-terminal --disable-factory --sm-client-disable --class=myserver -x ranger /home/yemu/dokumenty
TargetEnvironment=Unity
[Dir2 Shortcut Group]
Name=wideo@optiplex
Exec=gnome-terminal --disable-factory --sm-client-disable --class=myserver -x ranger /media/optiplex/wideo

The crucial thing is to add wmclass and then set terminal as false.


Way to hide the side-pane in Shotwell Photo Manager?

It is currently under development. Check out here

Status: Open
Start date: 08/29/2011
Priority:   Normal
Due date:   ???


Ubuntu Apache website accessible by another network but not locally

Thanks for your message Raffa!

Unfortunately it didn't solved my problem, or at least i didn't make things well.

i will explain whats my problem:

i have one ubuntu server connected to my router, on this server i have ssh, ftp, https, etc running.

i bought domains and i sucessfully pointed that domains to my server.

example:
my domain: domain.com (is pointing to my server and when i try to connect it works, but only if i am using another internet connection, as example my phone 4g connection)
my public ip address: 89.x.x.x (is also working but only if i connect from another network or using a vpn im my own network (own network means the same network i use in my pc and in the server)
when i try to use the internal ip of the server: 192.168.1.12 it works.

So, it means that my server kind blocks is own external ip :o

Hope you got something to save me :)


I have installed ubuntu latest version i.e. 16.04 LTS, but wifi is not working

Issue Resolved.

Disable Secure Boot from BIOS/UEFI.
Then while installing Ubuntu make sure that you check install essential drivers checkbox, while doing so Wifi must be enabled and connected.
Install Ubuntu, once completed restart the system.
Wifi will work as usual.


Disable out-of-the-box Fan Control in Ubuntu

Ubuntu has no built-in fan control so your BIOS is already controlling the fan.

Your laptop has the HM170 chip-set. The manual for this is available here. This states that the chip-set has a built-in fan speed controller that is capable of reading the speeds of up to 8 fans and controlling the speeds of up to 4 fans. There is also an on-chip temperature sensor. This can be used to read the temperature of the chip itself. However it has another mode in which it creates an interrupt when the temperature goes above a certain level called "hot" and the BIOS can use this to turn the fan on. It will not generate another interrupt until the temperature drops below "cool" and this will turn the fan off. It therefore sounds like the fan is operating exactly as intended. The values of "hot" and "cool" are set by the BIOS.

If the fan is coming on under Ubuntu but not for example Debian I would suggest installing lm-sensors and P-Sensors or XSensors and monitoring the utilisation and temperatures of the CPU and GPU to see what is getting hot.

Although the datasheet states that the temperature sensor can be read it does not indicate that any fan speed can so I do not think you are going to be able to control the fan speed using a program like Fancontrol.


LAN network won't work in Linux but works on windows

The linux kernel uses "generic drivers" for your computer. Where as Windows requires explicit installation of your drivers. Hence some of the functionality that you get in windows might not be available in ubuntu.

You can go to the website of your NIC card vendor and check for drivers that can be installed in ubuntu. Reinstall the driver. All will be fixed.

I had faced this problem with my laptop which used "Realtek" NIC card. When I reinstalled the driver with my kernel everything worked.


Can I Install Ubuntu On My tablet ZTE V9C?

Well first you have to make sure that your phone can handle Ubuntu. :-)

You can do this here: http://pdadb.net/

I looked it up for you and it's seems compatible.

Here is an instruction on how to do so: http://forum.xda-developers.com/showthread.php?t=1872752

Good Luck!


It is a bug (more like a deprecated feature) of JDK 9.
If using JDK 9 is not a must, I would suggest to use JDK 8 instead.

Check this step by step guide by Digital Ocean to setup JDK in ubuntu.


(Step 0:) Back up anything really valuable. This is a pretty tried and tested formula but things can go wrong. A power cut at the wrong moment could really ruin your day if you haven't backed up.

Boot to a LiveCD or LiveUSB drive in "try me" mode.
Load gparted (should be installed by default, you can apt-get it if it's not)
Resize your partitions (right click, click resize, follow the instructions).
Click apply and sit back while it does the job.
Reboot, taking out the USB stick or CD when it tells you to.


How to add Ubuntu Desktop's default packages after completing a "Minimal Installation"?

The metapackage you seek is ubuntu-desktop.

This will give you most of the stock Ubuntu Desktop, minus some applications:

$ sudo apt install ubuntu-desktop

This will give you the complete stock Ubuntu Desktop with all applications installed from the Desktop image:

$ sudo apt install ubuntu-desktop --install-recommends


Nautilus (Files) path visibility problem

Change to Adwaita. It should already be installed on your system by default.


VirtualBox crashes when launching Ubuntu

It's to abstract to tell something specific. It depends on many things, Host OS that you run Virtual box (is it a latests version?), which version and architecture of Ubuntu are you trying to boot up. It also can be an issue with Virtual box settings. Also  did you check the file it self (ubuntu-somthing-somthing.iso) maybe file is download with errors, it happens some times (check sha1sum of the file or md5sum).


Weird system behaviour after enabling UEFI boot mode

Normally, people see a GNU GRUB menu when they dual-boot. But in your case the Windows boot manager took precedence and thus, you see that screen. That's nothing to be tensed about. It is not changing to UEFI.

Regarding the speeds of booting, just do a restart in your Windows system and you will see that it also takes a long-time because in Windows (starting from 8) when you shutdown, it doesn't shutdown completely but instead shutdowns hybrid manner, i.e., half shutdown and half hibernate. Thus, when you power on your PC, it boots up at an amazing speed.

Ubuntu doesn't support this type of startup thus, it boots in the traditional way (Windows 7). And, so, is slow.


I solved it by resetting /etc/shadow file permissions which were altered by root.


How do I package an application to submit to the MyApps portal?

I'll also point you to Uploading your app.

Ideally, you should submit a Debian source package. A Debian source package consists of 3 files (with extensions .dsc, diff.gz, orig.tar.gz), which you should put in a compressed archive (a tarball, zip file, rar...) and upload into My Apps. This will allow reviewers to easily test and publish your app.

However, there are some important caveats:

If your app is commercial or proprietary software: we still recommend uploading a Debian source package, but if you are not experienced in packaging you can also upload either a binary Debian package (.deb), your source code in a compressed archive, your binary executables and all files needed to run your app in a compressed archive, and the commercial packagers will package and publish it for you.
If your app is Free Software and gratis: we recommend using a Personal Packaging Archive (PPA). You can specify the location of your PPA in the 'Any additional notes for the application reviewer' text box in the Overview tab of your app's entry in My Apps. You can also learn more about PPAs in the packaging section of the Ubuntu App Developer Site (*)

(*) Sorry for the confusion here, we've recently switched to recommending PPAs for Free Software gratis apps, and the web UI might be a it confusing.


Excessive power consumption in suspend mode

It is most probably related to the older kernel. I've upgraded to the latest mainline kernel (4.18) and it seems all the problems related to the suspend mode have been resolved.


Wubi is still on the 12.04 CD but the ability to install inside Windows from CD has been disabled. The only way to do it is to run wubi.exe standalone available here.

For 12.04 they have simply hobbled wubi.exe to not offer the option to install, which you can bypass with a command-line option e.g. if your CD drive is D: you can go to a command line and run:

D:\wubi.exe --force-wubi

The intention is to replace wubi.exe on the CD ISO in future releases with a dedicated CD Boot Helper, and then maintain wubi.exe as a separate executable. That appears to be the plan.

Here is the rationale behind disabling it, which was posted by Canonical's Rick Spencer on the ubuntu-devel mailing list:

  Hello all,

  This email regards wubi, a tool used to set up Ubuntu in a dual boot
  configuration in a manner that does not require disk partitioning.
  Wubi is a windows program. It is currently delivered as a standalone
  executable downloadable from the web, as well as part of official
  Ubuntu images. You can read about wubi in the excellent user guide:
  https://wiki.ubuntu.com/WubiGuide

  I am proposing a small but notable change to how we deliver wubi for
  12.04. I am proposing that:

  We continue to test and bug fix wubi.exe as the separate Windows program
  We cotinue to offer wubi.exe for download as the separate Windows program.
  We disable the ability to do a wubi installation from the Ubuntu 12.04 ISOs. (wubi will remain on the images for the purpose of providing Windows users some feedback and functionality if they put a
  Ubuntu CD into a running Windows computer, but won't offer to
  install).

  Separating the wubi.exe experience from the ISOs will give us the
  following important benefits:

  We will be able to do maintenance and enhancements to wubi outside of the Ubuntu development cycle.
  Significant reduciton of QA work for an already over-streched QA team.
  Better overall 12.04 quality, and less stress at release time.
  We won't get stuck with a poor (or worse) user experience on the CD since is a good chance that wubi will not work properly with
  Windows 8.

  I am proposing these changes to the plan because:

  The key use case for wubi is being able to download and run the installer on Windows, not installing from the ISO.
  Wubi is difficult to test, so has been difficult to assure that it will meet the quality standards we have set for 12.04.
  There are no developers treating wubi as their top priorities. This combined with the QA difficulties has historically caused late
  breaking changes that add stress at release time and frequentily
  invalidate already executed ISO testing.
  Most significantly, Windows is changing it's boot system with Windows 8, and it's not clear how wubi will work with Windows 8, if at
  all.

  Cheers, Rick

Here is the bug report that documents the request to disable install from CD.

Note:
Running wubi.exe standalone will download a preinstalled tar.xz image. You can still place the Desktop CD ISO in the same directory as wubi.exe and install it like that without downloading the ~500MB tar.xz image.


I had the same problem on Ubuntu 20. What apparently solved it was to replace libcurl4-nss-dev with libcurl4-openssl-dev, and to install ca-cacert. No idea myself of why, but it worked...


How can I ensure laptop mounts shares on boot if connected to WiFi?

You can put your mount script in /etc/network/if-up.d and it will run with sudo when the connection is made. I did something similar to fix an 18.04 "enhancement" and it worked, see my answer to Wake-on-LAN quit working with latest kernel (Bionic)


How can I run TC ERlectronic TonePrint editor on Ubuntu?

You cant run it directly on Ubuntu if the package was built for Windows.

However, you can still run windows application using wine. Here`s Wine for Ubuntu that might help you to start with.

Install WINE
Copy program installer to your Ubuntu box
Run the installer using WINE


well, i dont know how amazingly this would work, but you could try:

ifconfig wlan0 down
ifconfig wlan0 up
sudo service network-manager restart

or even use wpa_supplicant, for which you can find a great guide here:
Connect to WiFi network from command line in Linux - blackMORE Ops


Ubuntu 11.10 not displaying any open applications, when running in VirtualBox

I reported the bug here: Reported bug here: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/909534


My network icon is always a question mark but I have acces to internet

Disable Network Connectivity Checking in Ubuntu:
Open Settings
Select Privacy
Turn ‘network connectivity checking’ off


Keyboard shoud've come with driver CD. Install the driver. This keyboard was the best keyboard I ever had. Sad they're not making them anymore. if u don't have the cd, then just type the model of it in google and add "driver download" - should give u a link.


First you should try to obtain the latest drivers for your video card if you are using proprietary drivers. The best way is a manual installation using the installer from the manufacturer's website.

For open source drivers, the PPA below provides near bleeding edge builds which are compatible with the latest mainline kernel usually. It will also have repackaged proprietary installers.

I had a similar issue that was solved by updating mesa and several other libraries through the Xorg-Edgers PPA. This is usually the case in my experience for updating kernels, they need an updated x server and 3d libraries to work with it.

First install ppa-purge
    sudo apt-get install ppa-purge

Then add the ppa

sudo add-apt-repository ppa:xorg-edgers

This will add the repository to your sources.

sudo apt-get update

Reload the packagelist and finally upgrade

sudo apt-get upgrade

Some packages may be held back, if some are use this

sudo apt-get dist-upgrade

If you have any issues use

sudo ppa-purge -p xorg-edgers

This will completely remove the repository and re download missing packages.


Nautilus to open URIs in tabs via terminal?

No.
There is no such option in the Nautilus and it demonstrates its illness as in case with missing extra pane (accessible in Caja by F3).
Simply use Caja instead, or use whole MATE Desktop for the best user experience.


Is there an RSS feed of Ubuntu Release torrent files

I am answering this simply so it can have an answer...

No, there is currently no RSS feed of releases.


Samba is installed, Why doesn't gnome-file-share-properties work?

To fix this, you need to install two (2) more packages. Type these on a Terminal then try again

sudo apt-get install apache2.2-bin libapache2-mod-dnssd


Transfer file over Bluetooth to smartphone and received information for loss/re-transmit packets

To transfer data I simply used Blueman on Ubuntu.
Then, from WireShark I sniff the bluetooth0 interface, with filter btl2cap.retransmittimeout.
To automate that I wrote a Python script that uses pyshark.
import pyshark

class SniffPacket(object):
    def sniff(self):
        capture = pyshark.LiveCapture(interface='bluetooth0', display_filter='btl2cap.retransmittimeout')
        try:
            capture.sniff(timeout=20)
        except:
            pass
        return capture

if __name__ == '__main__':
    print(f'Initiate sniffer...')
    capture = SniffPacket().sniff()
    print('Sniffer complete, parse data...')
    ct = 0
    try:
        while True:
            res = str(capture.next_packet())
            ct += 1
    except:
        pass
    print('Retransmitted packets: ' + str(ct))


Simply you can't. You should use BURG for it. The only thing you can do is, changing GRUB's background with the themes' one. But you can't get OS icons etc. on GRUB.


I noticed in the comments TuKsn mentioned to use

  gksu unity-control-center

You said this came up with an error.  Instead, try the following:

  sudo apt-get install unity-control-center

If you do not yet have it installed, it will ask if you wish to install it (y/n).  If you do have it installed, which is likely, it will make sure you have the newest version.  Some of the solutions found at Missing System Settings after removing some packages may also help.


My miredo client don't work after upgrading to 15.10

Perhaps it completely wrong but I'm sure will save nervous system dozens Ubuntu users.

So, I faced miredo issue twice:

service starts before domain names had been resolved,
default route for ipv6 traffic is the same as for ipv4.

I'm just an user and I don't know why happens it. But I contrived to solve the issue.

type in terminal

sudo vi /etc/rc.local

insert before exit 0 these lines

sleep 3
service miredo restart

sleep 3
ip -6 route add default dev teredo

Then save the file and exit from vi editor. Reboot system.

Enjoy!

Recently I noticed miredo don't works after suspend mode. So, I had been forced make some additions.

cd /etc/pm/sleep.d

sudo vi 49_ipv6_miredo

write inside:

    #! /bin/sh

    case $1 in
         suspend|suspend_hybrid|hibernate)
            # No need to do anything here
            :
            ;;
         resume|thaw)
            sleep 5
            ip -6 route add default dev teredo
            ;;
    esac`

save and exit (:wq), change access permissions

sudo chmod 755 49_ipv6_miredo

that is all


You cannot install OS to the installation drive itself. You should get another USB drive and use one for the installer, the other as the install destination.


I had the same problem yesterday.
I got it to work using this solution. Just uninstall mysql-server and reinstall it following the guide.

You might be able to avoid reinstalling by entering mysql with

sudo mysql --defaults-file=/etc/mysql/debian.cnf

and change the password using the same guide I linked above (or this)


error while loading shared libraries: libcrypto.so.1

The file libcrypto.so.1.0.0 is provided by a package called libssl1.0.0.

So to install that package which provides the file you need, run:

sudo apt install libssl1.0.0

However, it seems like your application expects it with a different name, libssl.so.1, which means we have to create a link for that, similar to the procedure here:

cd /lib/x86_64-linux-gnu
sudo ln -s libcrypto.so.1.0.0 libcrypto.so.1


Try -

sudo mkdir -v -p /usr/local/bin

sudo curl https://yt-dl.org/downloads/2016.02.05.1/youtube-dl -o /usr/local/bin/youtube-dl

sudo chmod a+rx /usr/local/bin/youtube-dl


How do I make my webpage accessible from Internet?

You need to do 2 things:

configure nameservers (probably in some control panel of the registrar from which you bought the domain) to point the A record to the (static) IP address of your router (i.e. its external address) - I hope by "I changed my IP address to static" you mean that you contacted your ISP and requested a static IP address from them, not that you configured your machine's local IP to be static (though the latter is needed too)
Secondly, you go to your router's configuration page (see your router instructions, usually it's something like http://10.0.0.1:8080/) and configure Port Forwarding - i.e. you need to tell your router to take all requests which come to its external interface on port 80 and redirect them into internal network to the IP of your server, then take the response and send it back as if it was generated by the router. So for external world the responses will be coming from the external IP of the router. To which IP your DNS records point to. Easy-peasy.

Also, some ISPs, to protect users, block all incoming connections to the client's IPs or only to some common ports. So the access from outside may not work even if everything is configured correctly. You will need to check with your ISP to figure out how to remove port blocking.

There's no need to change anything in your Ubuntu settings, no need to change permissions on /var/www or anything... as such, it may be beneficial for you if this question was migrated to serverdefault.


Docker installation failed on ubuntu 16- 4 3 server i386

The solution is pretty simple - you need to install x64 version of Ubuntu server. You need to do a fresh install, there is no way to update current installed OS.

The list of supported architectures can be found here.


Stop windows 8 from running in background

install ubuntu using Wubi === install any windows program on windows pc

can't run it w\o start windows


When I attempt to remove g++ why does apt-get attempt to install it?

From an update to Bug #982716:

This bug was fixed in the package apt - 0.8.16~exp12ubuntu10

(I never did get around to attaching the result of also including --no-install-recommends. Oh, well.)


ssh_config visual host key (yes no) option

Firsly, consider that /etc/ssh/ssh_config is the SSH client config system-wide.  This means that any time you ssh from your computer to remote servers, this config comes into play.

By default, when you connect to a server for the first time, the system asks you to state whether the SSH fingerprint from the remote server is 'expected' or not, so you can verify whether the server is actually legitimate or not (the server admin can tell you what the server's fingerprint is, and you verify what you see in the SSH client against what they tell you).  Most end-users aren't going to go character by character to verify the fingerprint themselves.

However, there's an extra component that we see with key gen that we don't by default see with SSH fingerprint verification.  It's called 'random art', and each key/fingerprint should have a unique random art.

Consider this key I just generated, for a 'bogus' key of course, within a bionic container.  It shows us a randomart and the fingerprint:

The key fingerprint is:
SHA256:xtaA8biLm/Jktn9A/j2sty686uosrRtz0GQIFw6nP2s root@bionic
The key's randomart image is:
+---[RSA 4096]----+
|o +.  .          |
| B .   =         |
|. o o o o        |
| . +  .o o       |
|  + .o. S .      |
|   + .o+         |
|  E.* .+ o       |
| .oO.+  = =      |
|  oBO++oo*oo     |
+----[SHA256]-----+

The idea behind the Visual Image of the host key is that the end-user is probably not going to go character by character to verify the fingerprint, and will only rely on the first several and last several characters as the 'skim' the fingerprint.  And in fact, because of this, threat actors might try to 'impersonate' by generating keys which are matching the first several and last several characters in the fingerprint, to "trick" people since they aren't likely to do character-by-character fingerprint verifications.

This is where the Random Art piece comes into play - different keys, even if they have the same 'first' and 'last' bits will have different randomart for different keys, which a standard user would be able to spot as a substantial difference (which wouldn't be spotted on a key itself unless they do character-by-character fingerprint identification/comparison)

By default, the SSH client does not show the randomart of remote keys (the VisualHostKey no setting that's the default).  However, if you set VisualHostKey to yes and uncomment that line in the config file, then the system will also show you the randomart of the remote key to help users 'verify' the server fingerprint is valid.

First, an example without VisualHostKey set to on:

$ ssh -p 22 teward@10.73.250.210
The authenticity of host '10.73.250.210 (10.73.250.210)' can't be established.
ECDSA key fingerprint is SHA256:ZDA6BYWGmr0ftUqQxCu1CsaonKqKKUM3fbMzKUlMorE.
Are you sure you want to continue connecting (yes/no)?

and now the same prompt but with the randomart shown (VisualHostKey yes):

$ ssh -p 22 teward@10.73.250.210
The authenticity of host '10.73.250.210 (10.73.250.210)' can't be established.
ECDSA key fingerprint is SHA256:ZDA6BYWGmr0ftUqQxCu1CsaonKqKKUM3fbMzKUlMorE.
+---[ECDSA 256]---+
| . ..+=          |
|  = oo o         |
|o* =o   o        |
|*+*. o.o         |
|=o=o=. .S        |
|oE.oo+.o         |
|o .oooo +        |
|=.  oo =         |
|O.    . o        |
+----[SHA256]-----+
Are you sure you want to continue connecting (yes/no)?

Much easier to determine the randomart of a server being 'valid' versus instead the text representation of the fingerprint, no?

(Note that this is the 'long' description of what the manpage is stating about that config option, and is probably more easy to understand with visual examples, and such, than the dry manpage explanation)


There is no such command as apt-get-repository.

The correct command is apt-add-repository:

sudo apt-add-repository ppa:nae-team/ppa


PCie Bus Error: severity=Corrected, type=Physical Layer, (Receiver ID)

The Ubuntu Live USB is having a difficult time with one of your graphics cards.

First step

Enter the BIOS at power on. Identify if there's a setting for which of your two graphics cards you wish to use. Select the other one. Also disable "Secure Boot" and "Fast Boot". Save the settings and exit the BIOS. Retry installing Ubuntu.

Second step

If the first step doesn't work for you, then boot to the Ubuntu Live USB. When you see the "Try Ubuntu" (GRUB) menu, touch the e key to enter edit mode. Using the arrow keys, locate the string "quiet splash" and change it to read "quiet splash nomodeset". Then hit CTRL+x or F10 to continue booting. Screen resolution may be low. Then retry installing Ubuntu.

Third step

Still having problems? Your hardware may be too new for Ubuntu 18.04. Build a Ubuntu Live 19.10 USB and retry installing Ubuntu.


From a Windows machine you can download and run the USB installer recommend by Ubuntu here. You will also need the .iso file for your machine from ubuntu here. Once you have the .iso installed onto your USB pendrive (should be at least 4GB), you can configure the BIOS of your computer to boot from a USB drive and install Ubuntu fresh onto the machine. Hope this helps!


Cannot deploy local charms due to "Forbidden" error from the state server

It seems it was because of "ca-private-key" and "ca-cert" in maas.jenv!
May be there is shorter solution in terms of time, if you have any idea
please let me know.

Solution:

Destroy juju environment
Run sudo ssh-keygen -f  "/root/.ssh/known_hosts" -R Node01.maas
bootstrap juju again


Unable to access auto-mounted partition from Steam

Found the answer to my own question with a little more digging.  Doing what I did in the question gave me permission to read/write all the files/directories, but I did not have permissions set for the partition itself.  To illustrate, ls -l $HOME showed me that the partition was owned by root and had no read/write permissions for "other".  To correct it I issued this:

sudo chown -R -v <my_username>:<my_username> SteamLibrary

SteamLibrary here is the mount point for the drive, -R recursively applies this to folders and files, -v outputs additional information.  In this case I set the owner and groups to my username since I will be the only one accessing it, but changing the second username to "users" should allow any user on the computer to access it.  Running the same ls command as before I now get the line

drwxrwxrwx  5 willc willc  4096 Mar 18 22:46 SteamLibrary

This shows me I now own the drive and have full permissions.  Now not only can I access the drive, but applications like steam are able to read/write as well.


Where does the Unity Dash get its launchers from?

The dash also looks in ~/.local/share/applications, so you might want to check in there too.


Is it possible to remap d to do something other than show the desktop?

You first need to disable the existing keybinding of Super+d, which in Ubuntu is bound to "Hide all normal windows" (i.e., Show the desktop).

In "Settings" - "Keyboard", look for "Hide all normal windows" under the section "Navigation". Click the line, then press Backspace to remove the binding. Now, you can set a custom keybinding to Super+d clicking "+" in the section "Custom keybindings".


I don't have enough reputation to comment, so excuse me for not exactly answering your question. But I have some insight on this because I'm facing the same problem with a Samsung Notebook 7 Force on Ubuntu 19.10. So I have some points:

Did you tried to up the volume to the limit? On mine, if you do this,
you can hear the sound being played veeeery faint and distorted.
I also noticed that on the Samsung the HDMI output doesn't work

I'm sure those problems are related to drivers and quirks yet to be supported. It's important to report these issues so that they get fixed.


Maintaining server-wide dot files in bash

I think I would go for a mixture of 2 and 3. Place your modified files in /etc/bash_config or wherever. Then, modify the defaults in /etc/skel and have them source the files in /etc/bash_config.

This has some of the advantages of both 2 and 3:

New users will have the right files;
Any changes will immediately be propagated since the files are being sourced;
This allows users to still modify their own dotfiles as they please.
It does not involve editing the stock /etc/bash.bashrc or /etc/profile files. This means that upgrades won't break your system.

Note that upgrades modifying the /etc/skel files could cause issues since that would mean your modifications were removed. That shouldn't be a big deal though.

As for its being hacky, well OK, it is. A little. Not too bad though, all you need is to run something like this once:

echo ". /path/to/my_bashrc/" >> /etc/skel/.bashrc
echo ". /path/to/my_profile/" >> /etc/skel/.bashrc


Disk space has become an inefficient badly utilized mess. Please help!

So here's what I did:

Installed a new copy of ubuntu using LVM on the 256GB SSd, but made the partition only 50GB, which allowed me to mirror it using Raid 1 and LVM. I then mirrored it with the 128GB SSD.

I then moved things around on my 12TB LVM partition so that I had enough separate drives free to mirror that storage volume as well.

I think it was important to make sure that the mirrored drives were all separate drives to the storage LVM and didn't contain any part of the main LVM partition, since I wanted redundancy, and if part of the mirror and part of the man 12TB partition were on the same physical drive, you could still potentially lose everything with a single drive failure. (It's possible, but I'm not sure, that LVM mirroring won't let you do that anyway).

So that's what I've done, the mirror is still synchronising, and will probably take a couple of days. All that's left to do is make sure that I can boot from both 1/2s of the SSD mirror.


Gnome Shell Magnifier zoom feature misbehaving

What is referred to here as "Zoom" is actually the Gnome Shell Magnifier. It has been part of Gnome 3 for a long time and is definitely not in "alpha". (There was also a magnifier in Gnome 2.)

When you just turn it on from the Universal Access menu in the top bar, you don't see its settings. So in Gnome's settings, go to "Universal Access", then click Zoom. This should open the Zoom Options dialog window (as seen in this answer), where you can set the default magnification and defined how the magnifier should behave. For example, you can choose which part of the screen should be used by the magnifier: the entire screen ("Full Screen") or just part of it ("Top Half", "Bottom Half", "Left Half" or "Right Half").

The magnifier is not intended to increase a window's actual size; it works like holding a magnifier over whatever is on the screen. Font sizes don't change either, you just see them through the magnifier. Actually increasing the size of windows would make the magnifier less usable, as reaching the edge of a window would require a longer mouse pointer movement.


It's not an Ubuntu issue, it's a hardware issue.

The BIOS of this 2008 vintage machine has a ceiling on the amount of RAM it will recognize, baked in when designed. It was designed for a maximum of two each 1GB memory modules, and if you can get it to see a 2GB memory module, count your blessings. You are not the first user to find they can get to 3GB, but not 4GB, I'm afraid.


How to shutdown the computer with physical power button or by closing the lid?

Lid Close Action

To set up the Laptop Lid Close Action you have to install Advanced Setting (or the Gnome Tweak Tool).  It is in the USC (Ubuntu Software Center) under either tweak or Advanced Settings. If installed press the super button and type in tweak or advanced and choose the Advanced Settings.  When it opens choose the shell tab;

Press the arrows and choose you desired on both on AC and on battery;

Default buttons behavior

Install dconf-tools:

sudo apt-get install dconf-tools

Press alt+f2 and open dconf-editor (or in a terminal type dconf-editor)

Navigate to org.gnome.settings-daemon.plugins.power and set your default button-power action there:


Using the find command, you can do a search for and subsequently execute an action.

find / -iname \*qownnotes\* -exec rm -rf {} \;

This above command searches the file system, starting at the root level, case insensitive in the name, and matches files or directories. The qownnotes string can be at any place in the file or directory name, indicated by the first escaped asterisk and the ending escaped asterisk.

When it finds a match, it will execute the remove command, with the recursive and force attributes. The search results will populate into the brackets, and the ending slash and semicolon prevent escaping.

As written above, it will remove all files it finds without confirmation, so be sure it is what you're wanting to do before running it.


Ubuntu 11.04 unity / classic load fails - remains at background without toolbars / windows

Change the GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub in:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.modeset=1 pci=nomsi"

Run update-grub and reboot

The pci=nomsi did the trick for me.


Why can't I update my repository updates in 12.04?

From the below error,it was clearly shown that your /var/lib/dpkg/available file was corrupted.

dpkg: error: parsing file '/var/lib/dpkg/available' near line 0:
field name `../../../../java-7-openjdk-common/jre/lib/ext/sunjce_provider.jar' must be followed by colon
E: Sub-process /usr/bin/dpkg returned an error code (2)

Solution for the above problem is to replace the current /var/lib/dpkg/available file with another /var/lib/dpkg/available-old backup file.

sudo rm /var/lib/dpkg/available
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available

Now try,

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


I found this website https://www.osetc.com/en/how-to-install-ncurse-library-in-ubuntu-debian-centos-fedora-linux.html with the following comment, which worked:

$ sudo apt-get install libncurses5-dev libncursesw5-dev


I've had a look at this issue and it looks like simple-lightdm-manager affects one file called unity-greeter.conf.

Lets start by opening up a terminal, start typing "terminal" in your unity dash to see the option or press ctrl+alt+t
Lets go to the correct directory:

cd /etc/lightdm

Now lets make a backup of the file before we make any changes:

sudo cp unity-greeter.conf unity-greeter.conf.bak

Now we need to open up this file and see whats changed, type/copy this:

sudo gedit /etc/lightdm/unity-greeter.conf

The file should look like below, but I'm guessing your background and logo lines will look different:

#
# background = Background file to use, either an image path or a color (e.g. #772953)
# logo = Logo file to use
# theme-name = GTK+ theme to use
# font-name = Font to use
# xft-antialias = Whether to antialias Xft fonts (true or false)
# xft-dpi = Resolution for Xft in dots per inch (e.g. 96)
# xft-hintstyle = What degree of hinting to use (hintnone, hintslight, hintmedium, or hintfull)
# xft-rgba = Type of subpixel antialiasing (none, rgb, bgr, vrgb or vbgr)
#
[greeter]
background=/usr/share/backgrounds/warty-final-ubuntu.png
logo=/usr/share/unity-greeter/logo.png
theme-name=Ambiance
icon-theme-name=ubuntu-mono-dark
font-name=Ubuntu 11
xft-antialias=true
xft-dpi=96
xft-hintstyle=hintslight
xft-rgba=rgb

Now either replace everything in your file with the code above, or replace the background and logo lines with the ones above. Then save and log out.

Be careful not to add anything else to this file it could cause adverse effects to your log in screen or even prevent you from logging in

The code above is the default file that loads with a fresh install of Ubuntu 11.10.


This should help you!

pkill -TERM -P `PID`


how to assign serial port name using rules.d?

The answers offered by @steeldriver and @Jean-Marie are both spot on and the SYMLINK="ttyUSB5" did work. Essentially it created a link that is a pointer to the name the system creates for the port. Thanks!


sleep 10; killall gnome-screensaver

In ~/.config/autostart/myscript.desktop might work.

sleep 5 didn't.

gnome-screensaver-command --inhibit

did, but the machine spontaneously rebooted at Tuesday 11:30 PM.

I might have to resort to this or this.

Weekly reboots at night could be a feature, so i'll call it that.
This is my final script, if anyone else is stuck maintaining legacy machines:

#!/usr/bin/env bash
# sleep 5; killall gnome-screensaver  # too soon
gnome-screensaver-command inhibit

I checked last -x and according to cat /var/log/messages |grep 23:30:0, rsyslogd 4.2.0 exited on signal 15 (SIGTERM) from itself at 23:30:01. I found the reboot cause via this: cron. But even as root, crontab -l says there are no crontabs!

Sure enough, cat /etc/crontab shows 30 23 * * 2 root reboot. Root has its own crontab.


Is it possible to pause Transmission and shut down the computer?

This is not really an ubuntu question.

And the short answer is yes. Of course, you can stop transmission and shutdown your computer.

Just resume the download later.


Windows 7 On Domain Access Ubuntu Shared Folder

yeah managed to resolve after found this article http://blink4blog.blogspot.com/2012/02/fedora-16-post-installation-guide-mount.html although is for Fedora but it works for Ubuntu as well.


In terminal...

sudo apt-get update
sudo apt-get install curl libcurl3

Now your app should work.


Probably, the virtual host-only network wasn't set up yet. Here's is how you can fix this:

From the main menu, select File > Preferences (Ctrl+G) - NOT the settings of a single vm
Select Network in the list on the left
You should see an empty white box with "Host-only Networks" at the top. On the right, there are three buttons to manage them. Click the topmost one (with a green plus symbol). A new Host-only network will be created and added to the list.

Normally, the settings of the new network will be ok, but for completeness, I give the default values here. You can access the settings for the host-only network through the screwdriver button on the right.

Adapter:

IPv4 address: 192.168.56.1
IPv4 Network Mask: 255.255.255.0

DHCP server:

Enable server: checked
Server Address: 192.168.56.100
Server Mask: 255.255.255.0
Lower Address Bound: 192.168.56.101
Upper Address Bound: 192.168.56.254

You can change these settings to your liking, as long as they're consistent.


boot from your Ubuntu live CD/ USB and follow instructions given in link of Boot-Repair page. Follow the second option:
install Boot-Repair in Ubuntu

connect to the Internet
open a new Terminal, then type the following commands (press Enter after each line):
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

And follow Recommended repair for more detail.
You can also refer to website of Boot-Repair


Change www directory mode only from web application

Use a dedicated user and group.

You can make "data"  be owned by the "CGI app user"  and set it to "700"  for directories and "600"  for files. Nobody other than the admin and that user will be able to even enter the directory. Nor can they read the files.

For grunt: you could add that user to the same group as your "CGI app user".

For writing into the "www"  directory add those 2 users to the group that owns "www".


Try to remove the installed drivers by running:

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

see which is the recommended driver for your Nvidia card by running:

ubuntu-drivers devices

If you want to install the driver automatically, run :

sudo ubuntu-drivers autoinstall

If you want to install a specific driver, run:

sudo apt install nvidia-<driver number>

Once the installation is finished, run prime-select query to check which graphic card is being used by your device.
If you want to change the graphic card used by your PC, run : sudo prime-select <intel/ nvidia>; choose between Nvidia and Intel graphic cards.
After that, restart your PC to apply changes


Tee doesn't get whole output from the pipe

The fatal error is probably coming out in STDERR (2), not STDOUT (1). You can redirect STDERR into STDOUT with 2>&1 and then the pipe should capture it too.

./some_app -i $INDEX 2>&1 | tee $LOG

If you have buffering issues on top, you could force it into an unbuffered state:

stdbuf -o0 ./some_app -i $INDEX 2>&1 | tee $LOG


PayPal not working in the Ubuntu Software Center

This is a known issue cause by a change in webkit preventing popups our team is actively trying to resolve this issue, if you could please bear with us it isn't a trivial fix.


What is the gnome-open analog on XFCE desktop?

The command xdg-open works on all freedesktop.org-compliant desktop environments. This includes Xfce and LXDE.


Dell Precision 7910 Ubuntu 14.04 freezes

I would start further investigating by monitoring system resources leading up to the freeze. Basic tools like htop or top, and iotop work well. Maybe RAM or swap is filling up, or disk I/O is being held by 1 process?

You can try setting the CPU affinity of your intensive process, or setting its niceness (I believe there is I/O niceness as well), to try to prevent resource starvation for kernel/system processes.


Unmount hard disk to prevent any chance of partition issue

I have to say that I would always prefer to leave the disks as they are seen by the system, choose Manual partitioning, and take care where I ask the installer to put GRUB (the system loader) and in what partitions to install the system.

However, the following procedure seems to work. Note that I have tested it only on a small virtual machine:

Boot from the installation media.
Choose "Try Ubuntu".
Connect your USB thumb drive.
Open GParted (dash button - applications lens - show all installed applications) and identify your hard disk and your USB thumb drive. Let's say that the hard disk is /dev/sda and the thumb drive is /dev/sdc. Close GParted.
Open a terminal (right click on desktop, chose open terminal). In the terminal run the command sudo rm /dev/sda*, where /dev/sda is corresponds to the hard disk as identified in step 4. As far as Ubuntu knows, /dev/sda is gone.
Optionally, open GParted again and notice that you can find only your USB thumb drive.
Run the installer. To check that it sees only the USB thumb drive, choose Manual partitioning -- you can always go back to the type of installation screen if you want one of the automatic partitioning options.


Anyone have problem with HP printer printing only in green?

Have you tried cleaning the printer heads and checking the ink levels?  I have a HPdeskjet and when the printer heads need cleaning or the ink is low i get a green tinge to everything


Maybe it will help someone. In the end I manage to install nvidia drivers:

I went to the addition drivers and select a nvidia driver then I went to:

sudo gedit /etc/default/grub

and I made sure that I have this lines:

GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi=force"
GRUB_CMDLINE_LINUX="acpi=force"

I had the acpi set to off. I have no idea why :) It was a random guess to put it to force and It fixed my problem that i described in the question. Maybe someone will give a proper explanation for this .


Ubuntu 10.04 LTS vs 12.04 LTS Performance comparison

Ofcourse there are various improvements from 10.04 you can see General info here and through here.
For requirements and also improvements refer the Official Ubuntu System Requirements and here too.
System requirements

While the minimum memory requirement for 32bit is 384 MB, a
minimum of 512 MB is needed for the 64bit installation. On systems
with only the bare minimum amount of memory, it is also strongly
recommended to use the "Install Ubuntu" option as it uses less memory
than the full live session.
The Ubuntu 12.04 installation image does not include support for old
computers that do not support PAE. If your computer is affected, you
can either first install Ubuntu 10.04 or 11.10 and upgrade to 12.04 or
you can use the Lubuntu or Xubuntu images. The non-PAE version of the
Linux kernel will be dropped completely following the12.04 release.

Ubuntu 12.04 will run fine enough on your posted specifications.
You may also try Lubuntu , you can further read about Lubuntu’s requirements from here.


What does the number in brackets mean when using 'snap install'?

Results of snap info inkscape:

snap-id: tIrcA87dMWthuDORCCRU0VpidK5SBVOc
channels:
  stable:    0.92.3     (4274) 177MB -
  candidate: 0.92.3     (4338) 180MB -
  beta:      ↑
  edge:      0.92+devel (4265) 192MB -

Both the stable channel and the candidate channel have the same version 0.92.3, and to distinguish the snap package of the stable channel from the  snap package of the candidate channel they have two different revision numbers in parentheses to tell you which snap package you are downloading with sudo snap install inkscape.


Why is the Ubuntu One server side application proprietary?

Ubuntu One's source code has been OSSed, see: http://insights.ubuntu.com/2015/08/10/ubuntu-one-file-syncing-code-open-sourced/

  Original answer for posterity:

This was a commercial decision made early on in the project.
There where many rationales behind it, one of the predominant ones being that by making the server open source, anyone could set up a competing site with lower prices, effectively making the project hard (impossible?) to be sustained.

That said, many bits and pieces have been open sourced, and many more are to come.
We are continuously exploring ways to generate revenue that at the same time allow us to shift away from this model.
The cost of the infrastructure to give away free storage space and synchronisation to millions of users as well as a brilliant development team is hugely expensive, so it is a sensitive subject.

Everyone involved in the project is passionate about open source, and the majority of us are deeply involved in many open source communities.


How to make Google Chrome not start as service?

Do you have "Continue running background apps when Google Chrome is closed" ticked? If so, try unticking the box and then remove Google Chrome from the Startup Menu.

Also check to see if you have any sort of "notifications" such as GMail or messaging that may be causing the browser to be "always on".


Compile Error - Realtek High Definition Audio Codecs

On the realtek site it states:

Linux driver (3.0)
It only supports kernel version under 3.18.
Since you're apparently using kernel version 5.4.0 it won't compile.

Unfortunately, I'm facing a very similar issue and haven't managed to resolve it so far.


Can't run command installed with apt after removing the snap of that package

Steeldriver had the solution!

It's likely not in your "machine" - just in your shell's hash table. Try hash -d tree or hash -r to clear the whole table - see for example Why is my system only looking in /snap for binaries?


As search on https://packages.ubuntu.com says - you should install both source and binary packages:

sudo apt install libiptc0 libiptc-dev

and then consult with documentation from its site (netfilter.org) to write an example.


Make Windows 10 bootable USB from Ubuntu 18.04

UPDATE: a more modern and user friendly way to create a bootable drive in ubuntu is using the multibootusb application.

download the deb package and install.

from my testing of it, it can create:

linux [persistent] bootable drives for uefi and bios
windows bootable drives for uefi and bios
multiboot [persistent] linux bootable drive. ie multiple linux bootable ISOs on one drive
windows and linux multiboot drive. ie windows and linux reside on the same partition of the same drive

to create a windows bootable:

Insert an empty drive. usually formatted as fat32
Launch the application
select the drive partition (eg /dev/sdXY) from the select usb drop down
select the windows ISO file
Click Install

OLD ANSWER: First find your usb device name:

lsblk

you get something like

NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0           11:0    1 1024M  0 rom
sda           179:0   0 4.2G  0 disk
├─sda1  1      79:1   0 3.8G   0 part /home/user/blabla

based on the sizes your USB disk we are assuming your USB is sdX in this
case sda so /dev/sda
replace this with yours

unmounted the usb device.

then put an mbr table on it (all info on it would be lost):

sudo parted /dev/sdX mklabel  msdos

then create a brand new partition on the device:

sudo cfdisk /dev/sdX

choose New  enter the appropriate value and hit enter then select primary followed by Write and type yes to create the partition

lets check the partitions again to be sure:

lsblk

format the partition to the appropriate format:

sudo mkfs.fat -F32  /dev/sdXY

where y is a number

mount the partition:

sudo mount /dev/sdXY /mnt

now let us extract the windows iso unto the usb:

sudo apt install p7zip-full
sudo 7z x /path/to/windowsfile.iso -o/mnt

after extraction unmount the partion:

sudo umount  /mnt

you have created the bootable disk, just reboot and use


"dpkg was interrupted" when trying to install Java 9 after adding PPA

You might have got broken software. Without fixing this, installation is impossible.

To fix, press Ctrl+Alt+T and do:

sudo dpkg --configure -a

as dpkg says...

Then proceed to installing Java by apt.


The problem is that, as is, the regex can match partial words.  In the example you show, it is matching the i at the end of one word with the i at the beginning of the next.  The solution is to insist that the regex match whole words:

$ echo "abc abc def ghi ijk ijk" | sed 's/\<\([a-z][a-z]*\)\> \<\1\>/\1/g'
abc def ghi ijk

In GNU sed, \< matches at the beginning of a word and \> matches at the end of a word.

More complex matches

In the example in the question, the regex was matching on a single repeated character, i i.  Here is an example where it matches oat oat:

$ echo "smoat oats" | sed 's/\([a-z][a-z]*\) \1/\1/g'
smoats

This is, again, fixed by insisting on whole words:

$ echo "smoat oats" | sed 's/\<\([a-z][a-z]*\)\> \<\1\>/\1/g'
smoat oats

Simplification

Since alphabet to space transitions always mark a word boundary, the part of the regex above that uses \> \< is unnecessary because the regex requires that the characters on both sides are alphabetic.  Thus, we could use:

$ echo "smoat oats" | sed 's/\<\([a-z][a-z]*\) \1\>/\1/g'
smoat oats

Documentation

For more information on the subtleties of sed and its regular expressions, I recommend the Grymoire tutorial.  The ultimate reference for GNU sed is the GNU sed manual.


Gsettings wallpaper change error ubuntu 16

Try this instead:

gsettings set org.gnome.desktop.background picture-uri 'file:///home/sourajit/Pictures/Wallpapers/skull.jpg'


How do reactivate IBUS after upgrading to Ubuntu 13.10

Several of the settings from ibus-setup have been moved to System Settings >> Text Entry, but something in this change to the backend has broken some key functionality in Ibus. Ultimately, this needs a bug report; but I haven't figured out exactly what to report just yet.

Depending on the languages you use Ibus for, you may still be able to get it to work well enough.

State of Ibus after installation

After a fresh install of 13.10, I could not add Ibus input sources in Text Entry. Moreover, although apt showed Ibus as installed (which it was), searching in the Dash showed Ibus as not installed.

Partial resolution

Reinstall Ibus: sudo apt-get install --reinstall ibus

After reinstalling Ibus and rebooting, Ibus input methods were available in Text Entry.

Some methods, such as Anthy for Japanese, seemed to integrate well with the new system. Anthy configuration settings were available from a button that appears next to the keyboard layout button when Anthy is highlighted in Text Entry. All in all, Anthy worked fine.

So depending on the language you need, you may find everything is ok after reinstalling Ibus.

Larger problems with Chinese input methods

Chinese input methods from Ibus seem to be completely broken. ibus-setup can no longer communicate properly with DConf, reporting permission problems accessing /run/user/<uid>/dconf/. The settings themselves are still available in dconf-editor, but most of them do not seem to be honored by the new backend setup and changing them had no effect. When highlighting the Chinese input methods in Text Entry, a configuration button did not appear like it did for Anthy.

As a result, it no longer seems possible to change the pinyin configuration or show the configuration menu. In it's current initial state, pinyin input offers both simplified and traditional characters for some words, but not all of them, making it impossible to type in one or the other, let alone to switch on the fly. Changing the simplified/traditional setting in dconf-editor is one of the few that worked -- but only after rebooting, which is obviously not practical.

Suggestion

I imagine these issues will be fixed in time as the bug reports start coming in, but one suggestion is to use fcitx if you need Chinese input. fcitx is used by Ubuntu Kylin. Install it, switch the default input method in System Settings >> Language Support to fcitx, and reboot. After that, configuration menus for all input methods were available again. (You don't need to uninstall Ibus if you will still use it in some cases.) Like Ibus, several fcitx input methods have separate packages, so you may want to browse the packages in Synaptic.


owner of a file should be user 'nobody' and group 'anybody'

If what you meant was: I've mounted the NFS exported directory from an NFS client and created a file on that client then I'd say this is working as intended.

You mounted an exported FS which had a no_root_squash option enabled and the file created on the client is owned by 'root'. That's actually what the no_root_squash option does.

root_squash
    Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other uids or gids that might be equally sensitive, such as user bin or group staff.
no_root_squash
    Turn off root squashing. This option is mainly useful for diskless clients.

I'd say you need to remove no_root_squash if mapping root to nobody is what you're after.


LXSession configuration offers you the ability to choose which applications you want to autostart. If you go to Preferences -> Default applications for LXSession -> Autostart you can find a list of known applications which you can enable/disable to autostart. Or you can add your own unknown applications using the Manual autostarted apllications add button.
This configuration can also be brought up by running lxsession-default-apps.


How to create Windows 8.1 Boot usb on ubuntu 14.04

You can easily create windows bootable flash drive from linux. Just Follow steps given in this link:

http://www.geekthis.net/blog/91/create-bootable-windows-usb-in-linux


How can I change the default screen resolution?

create .xprofile in your home directory.

gedit .xprofile

and paste line,

xrandr --output TV --mode 1024x768 --rate 60

Save file now give execution permission

chmod +x .xprofile


Xubuntu 13.04 64-bit, mountall error, can't boot

That sounds to me like a disk drive problem. You can boot from a live CD and use smartctl to confirm.


Problem connecting the second external monitor

A clean 11.10 install (32 bit) solved the problem.
(Don't forget to backup your valuables)


Install package ubuntu-restricted-extras:

sudo apt-get install ubuntu-restricted-extras

then run:

sudo /usr/share/doc/libdvdread4/install-css.sh

to install libdvdcss2 library, that is not included in offical repos due to legal reasons. Finally install your favorite DVD player if you haven't done it yet. Now all DVD movies should play like a charm.


How do I Get WiFi working on my Dell Inspiron 1501 with BCM4311 [14e4:4311]?

You can remove the alterations from the last 2 commands with vi.

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

And remove the lines that says

blacklist brcmsmac
blacklist bcma

Navigate with the arrow keys to those lines.
dd to remove a line.
{escape}:wq to save the alterations.


Ubuntu 17.10 does not boot with Windows Bootloader

The Ubuntu partition needs a partition boot loader (PBR) and not a master bootloader (MBR) which in this case belongs to Windows.


Ubuntu won't let me login after software update

I have had the same problem : reinstall Ubuntu by holding SHIFT down pushing CTRLALTF6. Next, type in your user and password at tty6, and then type:

sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo reboot

and that should do it.


Can ClamAV detect Linux malware as well as Windows malware?

ClamAV does detect viruses for all platforms. It does scan for Linux viruses as well. However, there are so few viruses ever written for Linux that a Linux virus is not a huge threat.

Unix-like systems (which eventually led to Linux) has been around for roughly 30 years, and Windows has been around for about 20 years. In those 30 years, only 40 viruses have been written for Linux, whereas more than 60,000 viruses have been written for Windows.
Here is an interesing article on all Linux malware (notice how it fits on one page ^_^):
https://help.ubuntu.com/community/Linuxvirus

Hope this helps. If you want more information, wikipedia has a page titled "Linux Malware".


DNS server might fail to resolve the name lib.stat.cmu.edu. You can try some public DNS like Google's 8.8.8.8 (2001:4860:4860::8888 for IPv6). To do that you can temporarily replace your /etc/resolv.conf with the following:

nameserver 8.8.8.8

To do this execute:

sudo su
mv -v /etc/resolv.conf /etc/resolv.conf.bak
echo "nameserver 8.8.8.8" > /etc/resolv.conf

To restore your original /etc/resolv.conf after the testing do:

sudo mv -vf /etc/resolv.conf.bak /etc/resolv.conf

For longer term, you can append Google's DNS to your set of nameservers by:

sudo su
echo "nameserver 8.8.8.8" >> /etc/resolv.conf


I received an answer from stackoverflow: StackOverflow Answer


Keyboard lockup when typing  and random characters

I just found out that IBus was activating, and it substitutes Unicode characters.  I guess pressing more than 4 characters locks up keyboard input.

I found out how to disable IBus completely.  I went to the Ubuntu system settings, selected Language Support.  Under Keyboard input method system I changed IBus to none, and my ctrl-Shift-U lockup problems are now gone.

Thank you Adonis for directing me to the solution.


There is no 100% satisfactory solution to your problem right now, only workarounds. and the one resource that is going to help you now is testdisk. Furthermore, there is really only one thing I can advise you now: stop writing to the disk, preferably take a clone and work from the clone.

Why? Well if someone comes up with a better idea then testdisk
, you can start the process over again with a fresh clone!

For the future:

Remember that dd is the abbreviation of Disk Destroyer.
Read the following Q&A: You're definitely user type 4.


add LibreOffice to Nautilus right click `create new document` menu

The "Create new document" dialog sources its entries from ~/Templates. Simply put an empty Libreoffice document in that folder or create a subfolder with multiple documents and you will be able to create LO documents from the context menu in Nautilus.

The same method applies to any other type of file, of course.


Ubuntu 16.04 it's a so called LTS "Long Term Support" somehow the Ubuntu stable flavor

17.04 isn't LTS, the support ends in January 2018

Its your choice to use an LTS or non-LTS version but as @Pilot6 isn't a good idea to upgrade from a LTS to a non-LTS version.

If u want your system to stop asking u to do that go to "System Settings
--> Software & Updates --> Updates" and at "Notify me of a new Ubuntu version" select the For Long-term Support versions option


Software Center Not Showing Installed Apps

I had the same issue.
There was a conflict with the snap store.
Running killall snap-store in a terminal then relaunching the app fixed it.


I'm myself a KDE user, so I won't tell you exactly how to change the global shortcuts in Ubuntu, but I think this is what you are actually trying to do. The global shortcut for brightness change is assigned to XF86MonBrightnessUp/Down and you should be able to change it to whatever else you want, e.g. Ctrl+F5/6.

This guide seems to be describing how to do this in Ubuntu:
https://help.ubuntu.com/stable/ubuntu-help/keyboard-shortcuts-set.html


How do I set Notepad++ as an editor on Ubuntu?

You can use the  mimeopen command

Using a  terminal go to a folder containing some extension you want to open with notpadd++(here i'm testing for txt files)

mimeopen -d file.txt

You will get a popup menu, where you can see some options, if you don't find notepad++ with them choose other and indicate your notepad++ .

Also you may interested in reading Change all associations from gedit to another application


Based on this article Change to:

sysctl -w net.ipv4.conf.all.arp_ignore=1
sysctl -w net.ipv4.conf.all.arp_announce=2
sysctl -w net.ipv4.conf.all.arp_filter=1


Windows 8 boot failure since Ubuntu 12.04 upgrade

Try to run the following command in the Terminal: sudo update-grub.


I do this with the Deluge torrent client.

Start Deluge, then Edit -> Preferences -> Downloads and choose your "Download to" folder on this screen.

Deluge can be installed from the software center or by sudo apt-get install deluge-gtk.  The first time you run Deluge I recommend doing Edit -> Preferences -> Interface and enable "Classic Mode" to simplify the interface, then restart Deluge.


Not a Django + Apache expert but found this off the web, see if it works for you.

From django project

<VirtualHost *:80>
    # This is name based virtual hosting. So place an appropriate server name
    #   here. Example: django.devsrv.local
    ServerName  [[SERVER_NAME]]
    ServerAdmin webmaster@localhost

    # This alias makes serving static files possible.
    #   Please note, that this is geared to our settings/common.py
    #   In production environment, you will propably adjust this!
    Alias /static/  {{ project_directory }}/run/static/

    # This alias makes serving media files possible.
    #   Please note, that this is geared to our settings/common.py
    #   In production environment, you will propably adjust this!
    Alias /media/  {{ project_directory }}/run/media/

    # Insert the full path to the wsgi.py-file here
    WSGIScriptAlias /   {{ project_directory }}/{{ project_name }}/wsgi.py

    # PROCESS_NAME specifies a distinct name of this process
    #   see: https://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDaemonProcess
    # PATH/TO/PROJECT_ROOT is the full path to your project's root directory,
    #   containing your project files
    # PATH/TO/VIRTUALENV/ROOT: If you are using a virtualenv specify the full
    #   path to its directory.
    #   Generally you must specify the path to Python's site-packages.
    WSGIDaemonProcess   {{ project_name }}  python-path={{ project_directory }}:{{ project_directory }}/../lib/python2.7/site-packages

    # PROCESS_GROUP specifies a distinct name for the process group
    #   see: https://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIProcessGroup
    WSGIProcessGroup    {{ project_name }}

    # Serving static files from this directory
    #   Please note, that this is geared to our settings/common.py
    #   In production environment, you will propably adjust this!
    <Directory {{ project_directory }}/run/static>
        Options -Indexes
        Order deny,allow
        Allow from all
    </Directory>

    # Serving media files from this directory
    #   Please note, that this is geared to our settings/common.py
    #   In production environment, you will propably adjust this!
    <Directory {{ project_directory }}/run/media>
        Options -Indexes
        Order deny,allow
        Allow from all
    </Directory>

    LogLevel warn

    # PROJECT_NAME is used to seperate the log files of this application
    ErrorLog    ${APACHE_LOG_DIR}/{{ project_name }}_error.log
    CustomLog   ${APACHE_LOG_DIR}/{{ project_name }}_access.log combined
</VirtualHost>

From Metal Toad

<VirtualHost *:80>
 ServerName mysite.example.com
 DocumentRoot /var/www/vhosts/mysite
 WSGIScriptAlias / /var/www/vhosts/mysite/myproject/wsgi.py

 # adjust the following line to match your Python path
 WSGIDaemonProcess mysite.example.com processes=2 threads=15 display-name=%{GROUP} python-home=/var/www/vhosts/mysite/venv/lib/python3.5
 WSGIProcessGroup mysite.example.com

 <directory /var/www/vhosts/mysite>
   AllowOverride all
   Require all granted
   Options FollowSymlinks
 </directory>

 Alias /static/ /var/www/vhosts/mysite/static/

 <Directory /var/www/vhosts/mysite/static>
  Require all granted
 </Directory>
</VirtualHost>

Metal Toad goes further to show you how to tweak your wsgi.py to get it to work well with apache:

"""
exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
import time
import traceback
import signal
import sys

from django.core.wsgi import get_wsgi_application

sys.path.append('/var/www/vhosts/mysite')
# adjust the Python version in the line below as needed
sys.path.append('/var/www/vhosts/mysite/venv/lib/python3.5/site-packages')

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myproject.settings")

try:
    application = get_wsgi_application()
except Exception:
    # Error loading applications
    if 'mod_wsgi' in sys.modules:
        traceback.print_exc()
        os.kill(os.getpid(), signal.SIGINT)
        time.sleep(2.5)

So play around with it and get it to serve you. And Metal Toad says you can even setup several sites:

  The second Virtual Host is set up very similarly to the first. The main differences are the server names, paths, and the location of the wsgi.py file.


Create a shortcut under "computer" in home folder Ubuntu 12.04

Enter the folder then Ctrl+D, it will create a bookmark under the Bookmarks category in the sidebar.


Yes, it should be the same.

To check for sure: run stat on your two directories: /home/jason and /home/jason/.gvfs. The stat output will show a "device" entry:

[jk@pecola ~]$ stat $HOME
  File: `/home/jk'
  Size: 4096        Blocks: 8          IO Block: 4096   directory
Device: 803h/2051d  Inode: 5242881     Links: 65
Access: (0755/drwxr-xr-x)  Uid: ( 1000/      jk)   Gid: ( 1000/      jk)
Access: 2012-03-19 11:53:31.209584100 +0800
Modify: 2012-03-19 11:50:42.941630852 +0800
Change: 2012-03-19 11:50:42.941630852 +0800
 Birth: -

-- it's the first item in the third line. The number is shown twice: in hex ('h' suffix), and in decimal ('d' suffix).

If these numbers are different between the two directories, they're considered to be on different device, so the -x option will prevent rsync from traversing to this directory.


Simple BASH - how to read file line by line

I'd recommend starting like this:

#!/bin/bash
file="/home/foo/documents/iptxt"

while read num addr ; do
    if [[ "$num" && "$addr" ]] ; then
        echo "$addr has tried to log in $num times"
    fi
done < "$file"

This way, read stores the first word of each line in $num and the rest of the line in $addr, which should only be the IP address. Then inside the while loop, we check if both are not empty, and if that is the case, print the message.


How to keep original decimal numbers without rounding off

If you look in the awk man page, the default awk OFMT is %.6g (6
specified the number of significant digits); you can change to say .6f to specifies the number of digits after the decimal, or %f without limit. so:
<infile >>outfile awk '{ SUM+=$5 }
END{ OFMT="%.6f"; print date_time, "Total distance:", SUM, distance }' \
     date_time="$(date +'%F %T')" distance="meters"


Web Links in the Terminal

Clicking on the terminal is an option to select that window.  That is all it does.  If you have other windows open and click on a different window, that window will be selected.

The terminal also has right click features.  The terminal itself will recognize a web link and display it appropriately so that the user can recognize it as a link.  The right click off the terminal has a number of features which includes copy or open a hovered link.  The open option will open the ink in your default browser.

Chrome's Launcher title

The launcher will sometimes attach the name of the Chrome title that is opened to the launcher when you lock it to the Launcher.  This is a characteristic of Chrome that I don't see happening with other applications.  This is a glitch that happens sometimes.  It doesn't affect the actual launching of the browser, just the title giving to the icon.

It used to happen to me frequently in Ubuntu 14.04.  I don't experience it with 16.04.  It might be back affecting 16.10 until the developers fix it again.

I believe the glitch is with Chrome, because I had a launcher problem with Chrome and Cairo-dock.  The developer of Cairo-dock worked with me to fix the menu issue.  He described it as a Chrome glich.


App to restart after suspend|hibernate - defined in Upstart?

My knowledge of Upstart is limited but according to the Upstart FAQ you have to rely on gnome-powermanager emitting an event that Upstart can act upon.

I do not know if gnome-pm currently uses libupstart but I'm sure this could be done by adding an upstart emit event to the sleep.d scripts that Upstart would react to.

Actually I wonder if your sleep.d script resume problems are related to running as root instead of user, this will affect Upstart too. You can check pm-suspend.log with Log File Viewer for errors.


You are asking no other user can do sudo to be a root user.

you just need to edit a line in sudoers file.

  vim /etc/sudoers

change the line from

  %admin ALL=(ALL) ALL

to

  your-username ALL:(ALL) ALL

after editing no other user except you can use sudo command.
This is kicking all other users from sudoers file. except you.


sources.list.save and sources.list.distUpgrade were created by the Upgrade Manager and refer to the entries before the upgrade. Files not ending in .list aren't read in and are there for backup purposes, so you can safely delete *.list.save and *.list.distUpgrade.

Regarding the raring entries, I would change them to trusty, although this should have automatically happened when you upgraded from Raring to Saucy.


Gamepad detected by lsusb but not by PCSX or jstest-gtk in Ubuntu 14.04

This problem has been solved in the latest update for udev in trusty, so just run the Software Updater or open a Terminal and enter

sudo apt-get update
sudo apt-get upgrade


Desktop Sharing not working when upgrading from 11.04 to 11.10

Yep yep, it's not just you, it's an issue many are currently waking up to.

Somethings wrong with the Desktop Sharing in 11.10 ...

Here's some links to other threads working on that very issue.
http://ubuntuforums.org/showthread.php?t=1861148
https://answers.launchpad.net/ubuntu/+question/174568

If your Internet connection uses a static IP address, then theres a workaround that seems to be working... oddly enough, just by changing to Dynamic in your ipv4 connection settings, rebooting, and then changing back to manual entry of your IP. It's a flaky workaround, but its working IF you use a static IP address.

(Right click on the network icon top-right, edit connections, click edit on your connection, under ipv4 change to dynamic or automatic whatever, save, restart, then change the settings back)

I however use a dynamically assigned IP address, and that workaround doesnt work for me.
Ho-hum... hope they fix this soon... physically driving to work is starting to suck.


How to install both 64 and 32 bits version of Java at the same time?

I have to apologize, i managed to find a solution to mi problem. I downloaded the game for the website as .tag.gz, untarred it and run it from the folder. All works now. No problems with java instances and runtime at all. Sorry for the turmoil.


Is it possible to minimise applications using the Unity bar?

I've made a script to workaround this issue.
See this working here.

Instructions

1) We will need XDoTool and Compiz.

You can install these from the Ubuntu Software Center or by clicking here (xdotool) and here (Compiz)

2) Open Compiz (Alt + F2 and type ccsm and hit Enter)

3) Go to Commands and add ~/.minimize to one command:

4) Then go to Button Binding and make a shortcut for it.

5) Make a file named .minimize at your home folder (gedit ~/.minimize). Paste this and save:

#!/usr/bin/env python
# by desgua
# version 0.1.3 - May 06 2011
# To minimize with unity Launcher
##################################
import os
import wnck
import gtk
stream = os.popen("xdotool click --clearmodifiers 1")
screen = wnck.screen_get_default()

while gtk.events_pending():
    gtk.main_iteration()

windows = screen.get_windows()
active_app = screen.get_active_window().get_application()

for w in windows:
    if w.get_application() == active_app:
        w.minimize()

6) Make it executable  (Here's how to do that).

7) Enjoy!  ;-)


Accidentally deleted my /etc/init.d folder from system

Boot into single user mode, set up networking (use dhclient, or ip commands, depending on whether you use DHCP or static addresses) and run this command:

dpkg -S /etc/init.d

It will list all the packages which own files in that directory. Reinstall them all using apt-get install --reinstall either manually copying the names, or using this command:

dpkg -S /etc/init.d | sed -e 's/,//g' -e 's;: /etc/init.d$;;' | xargs apt-get install --reinstall


since I upgraded to 17.10 my usb wifi ANEWKODI (Realtek) doesn't work anymore

I spent all morning searching through the net and have managed to fix my problem. I'm not sure exactly what fixed it yet as i tried a lot of things.
What I didn't do was reboot after each modification.
I'll try to sift through to find the explanation, but at least I can say that the ANEWKODI (Realtek) USB Wifi key works with Ubuntu 17.10


id command with and without user specified

Are there any places other than /etc/group that store secondary groups for a user?

No, the default Ubuntu setup only relies on /etc/passwd and /etc/group for group membership.

Your first id command there, shows the groups you are in in this logged in session (i.e. what group memberships /etc/group had at the moment you logged in).

Your second id command causes it to query /etc/passwd and /etc/group, and displays information based on what those files currently contain.

Changes to group membership take effect when you log in.


Unable to run git command (with ~/.bashrc modified)

Thanks steeldriver for pointing out the problem of backtick on the comment.
Yes, after removing the line:
git config --global credential.helper cache`

The problem is solved.
Actually, I have found that this line is even not necessary given I already have:
git config --global credential.helper 'cache --timeout=2592000'

Note: Answer provided by OP on question


Missing Operating System-Laptop dual boot with Windows

If grub loads, press C to load a command shell and try

ls
root=(hd1,1)
chainloader +1
boot

With ls a list of systems that could be loaded will be printed. Try some combinations if root=(hd1,1) doesn't work. For example (hd1,0), (hd2,1) etc.


Import Gmail contacts into Thunderbird via Ubuntu One?

Gmail is a great email service and Thunderbird is one heck of a free email client.  Adding your Gmail account to Thunderbird is very simple and straight forward

And then reenabled the Contacts Sync on Ubuntu One Control panel and restarted Thunderbird and all the contacts were then there.

http://www.howtogeek.com/79968/import-gmail-contacts-into-thunderbird/


How can I run an extracted .exe in WINE?

I think you should use your console :

WINE /path/to/your/exefile

Then press Enter, there might be some important informations which can be logged in the terminal.

Nikos


Apache Rewrite module not working correctly

Finally found a solution:

sudo nano /etc/apache2/sites-available/000-default.conf

Added below lines to `/etc/apache2/sites-available/000-default.conf

<Directory /var/www/html>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

I was required to setup Apache Virtual Hosts.

Thanks for everyone.


Set compiz keybindings to "low priority"

Compiz doesn't know which keybindings are handled by other programs so you can't set Compiz to some kind of low priority.

I've changed all Compiz keybindings to use the Super key as this key usually isn't used by normal programs.


How can I enable the "magic sysrq key" on ubuntu desktop?

To enable sysrq magic keys temporarily:

# echo "1" > /proc/sys/kernel/sysrq

or # sysctl -w kernel.sysrq=1

This enables sysrq magic keys for the current user session. You can disable it again by exchanging 1 with 0 in the above commands. Or go back to the standard value of 176.

To enable these changes at boot time one has to create config file in the sysctl.d directory (e.g. /etc/sysctl.d/90-sysrq.conf) with this line:

kernel.sysrq=1

So setting /proc/sys/kernel/sysrq to 1 enables the sysrq magic keys, setting it to 0 disables it.


How to find out appropriate ppa repository of a command?

You can install apt-fast this way

sudo apt-add-repository ppa:saiarcot895/myppa
sudo apt-get update
sudo apt-get install apt-fast

I see that you tried it and it did not work. But I tested and it works.

You need to be connected to internet to add the repository and also setup proxy if you use one.


14.10 to 15.04 upgrade, now I can't poweroff or reboot!

First this is bug #1464917:
If this affects you please go there and let them know.
After the shutdown or reboot has hanged with this message

Reached target Shutdown

You will only see this if you have removed the splash screen

Try Sysrq

Hold down the Alt and SysRq (Print Screen) keys.
While holding those down, type the following keys in order, several
seconds apart: REISUB
Computer should reboot.

Once it reboots immediately try shutdown button again, it should shutdown properly.  Please add your name to the "This Affects Me" button at launchpad bug link above

You can also try the following after it hangs.

see if you can login tty1 and reboot

Press Ctrl+Alt+F1 or Ctrl+Alt+F2 or Ctrl+Alt+F3 ...
Write your username (lowercase, the name of the user folder in
/home) and hit Enter
Write your password (nothing will appear) and hit Enter

If your password and username are correct, you are now logged in.

If that fails try Ctrl+Alt+Del a couple times at that point in the tty1 screen

You might see a message that states the machine is going to reboot and then it should do just that after a minute or so.

Its better than a hard boot - until its fixed

In the bug notes it is reported that you can upgrade to Vivid-Proposed and it fixes the issue but some still see this after that upgrade.  It might be worth a shot.

Btw the same bug affects me and I have not tried the upgrade yet but the steps I listed do work.


After 13.10 Upgrade: ROXTerm default terminal

Using

sudo update-alternatives --config x-terminal-emulator

I could bring up a menu to choose the gnome-terminal once again. Seems to work fine so far. ROXTerm seems to have more options, but not knowing how it got to be my default terminal made me want to switch back.


How to add Windows SSH key file to Ubuntu 16.04?

Both files should be placed in the directory /home/{user}/.ssh, if you find this directory doesn't exist, you can make it with the correct permission with the command:

mkdir -m700 ~/.ssh

Move both the public and private keyfiles into that directory (using the directory /home/keys that you wrote in your question):

mv /home/keys/id_rsa* ~/.ssh

Make sure that the keys have the correct permissions and ownership:

chown {user}:{user} ~/.ssh/id_rsa*
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub


Resized windows partition in windows,and got to grub rescue commandline instead of grub when rebooting

As posted elsewhere, reinstalling GRUB2 to the Master Boot Record tends to solve this sort of problem. You can do that using any of these methods. However, you said that you unsuccessfully attempted to resize your Ubuntu system's partition. So before you write to the disk in any way, you might want to verify that this operation did not cause data loss. You can do this by booting from an Ubuntu live CD/DVD or USB flash drive and verifying that you can access your files. If you cannot find your Ubuntu partition anymore, and you had important documents in your Ubuntu system whose backups were not current, then you can follow the suggestions in this guide to attempt to recover your data. (Generally, when dynamically resizing partitions, especially with third-party tools, it is advisable to ensure that all backups of documents and other important files are current.)


How to change mysql port number in ubuntu

There may be multiple files containing mysql configuration. Their full path may exists in file /etc/mysql/my.cnf by lines starting !includedir.
For a sample, mine is:

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/

So, after listing the second dir, I found a file named:

/etc/mysql/mysql.conf.d/mysqld.cnf

So You have to change the port number in this file.

The best way for you is viewing the file:

/etc/my.cnf

or

/etc/mysql/my.cnf

and then changing port number in a file inside one of directories included my.cnf file.


Can I safely unplug external HD when machine is suspended?

Ubuntu will not unmount the drive, even this one or any other, and if you unplug it and boot the system up later if you try to access it an error will occur, and you might lose some data, by corruption.


How do I sign the Leadership Code of Conduct?

It's currently not possible due to this bug:

https://bugs.launchpad.net/ubuntu-community/+bug/392976

So just make the mental checkbox in your head I guess. :)


a start job is running for wait unti snapd is fully seeded - 18.04 install

If you are using UNetbootin to make usb bootable, change use Rufus instead.
UNetbootin has many errors.


NETIS WF2120 Wifi Adapter Drops Signal Within Seconds

The driver rtl8192cu is notoriously unstable. There is a fix. Please disconnect your wireless connection (unplug the USB adapter that contains the Realtek chipset), and temporarily connect to the internet by means of an ethernet cable or by means of another wireless chipset that does function well.

Now install some applications for building the right driver via a terminal:

sudo apt-get install linux-headers-generic build-essential dkms git

Now download the source code of the driver via a terminal:

git clone https://github.com/pvaret/rtl8192cu-fixes.git

Set it up as a DKMS module via a terminal:

sudo dkms add ./rtl8192cu-fixes

Build and install the new driver via a terminal:

sudo dkms install 8192cu/1.10

Refresh the module list via a terminal:

sudo depmod -a

Blacklist the faulty driver via a terminal:

sudo -i
echo "blacklist rtl8192cu"  >>  /etc/modprobe.d/blacklist.conf
exit

Detach the ethernet and reboot; the wireless should be working much better now.


This might be late but it might be because the @reboot commands start executing at the start of your lock-screen and by that time your wifi might not be connected so try this
((sleep 30) && (echo "root" | sudo -S apt-get upgrade -y)) > /home/{username}/.scripts/upgradelogs

put that in a shell script and execute the crontab
this might work


LUKS and LVM install: no boot (gave up waiting for root device)

Make sure dm-crypt.ko is in your initramfs. If it's NOT, it won't be able to mount the / filesystem and that's probably why you see the error.

chroot or just mount the /boot or / filesystem and do a /sbin/lsinitramfs initrd.img-$(uname -r)

You should see something like below (from a Debian wheezy box)

/boot# lsinitramfs initrd.img-`uname -r` | grep dm
...
lib/modules/3.2.0-4-amd64/kernel/drivers/md/dm-crypt.ko
...

If it's NOT, you may have to chroot into the system from a live CD (e.g. system rescue cd) and regenerate initramfs -> update-initramfs -u -k all.

Boot and see if it helps, if all good, you should be prompt to input the passphrase for the encryption key.


My answer fixed the issue but shouldn't have been the right answer.
If you happened to be here because you are currently facing the very same issue that OP met, please refer to Dreamer answer first (and comments)

virtualenv is not in your PATH for some reason (not properly installed ? I believe it should be in your /user/local/bin/ or /user/bin/, I see you didn't use sudo ?). You can add it to your PATH with
echo "export PATH=\"/home/mark/.local/bin:\$PATH\"" >> ~/.bashrc && source ~/.bashrc

Edit : pip3 install PKG --no-warn-script-location to use the flag to ignore the warning


The applications in the App overview are usually saved  as .desktop files depending on how you installed them in either:

/usr/share/applications
~/.local/share/applications/
/var/lib/snapd/desktop/applications/

Check the file for the Exec= line to get the location of the executable:
grep '^Exec=' /usr/share/applications/Zoom.desktop

Or simply copy it from there and put it to where you like, e.g. ~/Desktop:
cp /usr/share/applications/Zoom.desktop ~/Desktop/

Adjust the path accordingly.

Alternatively, use the little tool alacarte (install via sudo apt install alacarte) to check where to find the executable. Find the Zoom entry and double click it to see the Command.

(I don't have Zoom installed, so that is just an example image)


You can install Gparted on your computer from the software center and do the partitioning.


Ubuntu keeps showing the install window after restarting from installing(Better Description below)

I think you need to eject the CD drive or unplug the USB stick you installed Ubuntu from after the installation has finished, and then reboot the machine.


Use network scanner (from HP multifunction) in Kubuntu?

I went with xsane. I just ran hp-setup from the command line, then started xsane and it worked.


You can easily add them in the Software Center->Edit->Software Sources->Other Sources->Add"

Start the Software Center.

In the panel go to Edit and select Software Sources.

In the tab Other Sources click on the Add button at the bottom.

Add the deb URL in the APT Line input field and hit Add Source.

Once you close the Software Sources window your cache is going to be updated automatically.
You can now browse the newly added source in the New Source sub-list using the upper left list in Get Software.


Though its man page doesn't document it, mv will refuse to rename a directory to another directory if the target directory contains files. This is a good thing in your case because you turn out to want to merge the content of the source into the target, which mv will not do.

Use rsync -a backup/ backupArchives/ instead. After that rm -rf backup/*.

Instead of using rsync, you also can do the classical

(cd backup && tar c .) | (cd backupArchives && tar xf -)

which earns you more geek points.


I managed to fix this problem on ubuntu/linux with IPV6 disable actions.
It looks like that was actually the main cause in my case.
But I'm not entirely sure if the problem is UBUNTU latest version (20.10) or
the RPi-4 8GB latest firmware updates.
My problems started after latest updates. Everything worked well on
UBUNTU version (20.04) for last 6 months...
Anyway, hope this can help someone....facing the same problems as I did...

As I have seen discussions from the past...This "bug" was also noticed in  the past with UBUNTU/linux.., so maybe someone can take a closer look to this issue.


How to customize Xubuntu with remastersys?

I encountered the problem you had, and I found the solution.

Your personal menu settings is stored in :

~/.config/menus/xfce-applications.menu

and your personal panel settings is stored in :

~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml

And the system-wide settings are stored in the locations below :

/etc/xdg/xdg-xubuntu/menus/xfce-applications.menu (menu)
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml (panel)

So if you want to reflect your personal customization in system-wide setting for remastering, you just need to type these two commands from the terminal.

sudo cp ~/.config/menus/xfce-applications.menu /etc/xdg/xdg-xubuntu/menus/
sudo cp ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/

However, in your setting, this should remove the panel, but I'm not sure about cairo-dock.

Hope this helps to some extent.