My WiFi adapter is not working at all, how to troubleshoot? On this site I see hundreds if not a thousand questions being asked about issues with a Wireless LAN adapter not being detected/recognized by Ubuntu. Some mainstream adapters appear to be utterly broken in Linux support, while others just require some simple steps to get it to work.

The options to get it to work appear to be infinitely huge and I have no clue where to get started!

What is considered 'best practice'? What order of things to try is most efficient in terms of time, effort and imposes minimal risk to my Ubuntu installation? Please help me save time and guide me what to do, step by step.

This answer covers completely non-functional wireless LAN only. It is not about stability/performance issues, or half-working cases. However, some steps may be helpful in case you're running into them and looking for other options.

Preparation

In this answer I'm assuming you're familiar with at least the following tasks: running commands in a terminal and installing regular Ubuntu software packages. If you're not familiar with these basic steps, start reading this and this.

Get the machine connected to the internet. This makes performing the the steps a lot easier and to use the clipboard for the actions.

If another network card is working, this should be easy. If your only card is failing at this point, find alternatives to this and be creative, e.g. using an USB wired network adapter or an alternative working WiFi adapter borrowed from a friend or neighbour.
Make sure you have installed the following packages: lshw, rfkill.
Update your system. By installing all latest (regular) system updates, bug fixes already released by developers after the release should be on your PC by doing so. Don't forget to reboot your system afterwards. See also How do I update Ubuntu?

After applying all updates, reboot. It may already work in this stage. If not, just continue.

Is it really a driver issue?

First of all, one should determine whether the card isn't recognized and/or if it's a radio kill switch preventing it from working. Follow all steps below, as your problem may be two- or three-fold:

Run sudo lshw -C network in a terminal.

You might need to install lshw first.

In case multiple devices are listed, locate the device concerned.
In case it's listed as *-network UNCLAIMED, you should follow the steps in Installing (newer) drivers.
In case it's listed as *-network (without 'Unclaimed'), the output below about the driver could be relevant in further steps, e.g. configuration: broadcast=yes driver=iwlwifi
In case your device isn't listed at all, try the additional steps in Identifying the exact hardware.

Run rfkill list in a terminal. This lists the state of radio killswitches. Sample output:

1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no

In case you see yes on Hard blocked: refer to your notebook manual for a hardware switch for Wireless LAN.
In case you see yes on Soft blocked: hotkeys on your notebook may help activating it, as well as hitting "Enable Wireless" in the Network Manager applet. If that fails to remove the soft block, run sudo rfkill unblock all.
In case you don't see any kill switches listed: this might not apply for your device. Usually only mobile PCs are equipped with killswitches.

Only for USB devices: exclude USB-level issues.

Preferably, try one directly attached to your mainbord, avoiding hubs or your computer case's connectors.
Try using another type of USB port (e.g. USB2.0 instead of USB3.0 port).
Go to Identifying the exact hardware and see if you can see some error messages when you plug in your device.
Try another cable (if any) you've verified is working.

Installing (newer) drivers

These are some obvious, sane and harmless steps to take, avoiding the ones listed in Things to avoid if possible.

Try to see if Ubuntu suggests to install additional drivers. Refer to How do I install additional drivers? for more information on how to do do this.
Install additional firmware as this may be required for your hardware.

Make sure you have enabled multiverse as posted in How do I enable the "multiverse" repository?
Install both linux-firmware and linux-firmware-nonfree packages, e.g. sudo apt-get install linux-firmware linux-firmware-nonfree and reboot.

Try backported kernel modules (drivers) from the compat-wireless package. Ubuntu provides packages of compat-wireless of more recent Linux kernel releases for the kernel with the stable distribution (available since 11.10 Oneiric Ocelot).

Find the latest ones available by searching with your favourite package management tool. At the time of writing, this was linux-backports-modules-cw-3.6-quantal-generic for Quantal. In the near future, a 3.7 package may be out.
Install it, e.g. sudo apt-get install linux-backports-modules-cw-3.6-quantal-generic for Quantal, or sudo apt-get install linux-backports-modules-cw-3.6-precise-generic for Precise. Then reboot.

In case you're running an LTS release (e.g. Precise or Lucid), backported kernels of all next releases are provided as a package. At the time of writing Quantal is the latest release after Precise and the package is linux-image-generic-lts-quantal and boot into your new kernel.
From here on, you should consider trying out a more recent release of Ubuntu to see if it has gained support for your hardware, just by booting from a Live CD/USB. Also consider trying the latest Beta/RC of Ubuntu+1. If it does work, the easiest approach is to simply wait for the new release.
Some hardware is just utterly broken on default installs, usually because the vendor isn't releasing (all) source code or does not allow redistribution of all required modules via Ubuntu. See the Hardware requiring special care section at the bottom to see if your device (chipset) is listed.
Try the latest stable Linux kernel. This is a less harmless approach and may break other stuff. This should not be necessary as the more recent wireless drivers are provided by the compat-wireless package in the earlier option. However, it may just a bit newer and therefore include a bugfix helping you out.

Go to the kernel.ubuntu.com downloads section and identify the latest stable release (e.g. v3.7.1-raring at the time of writing).
Download all the .deb files for your architecture (e.g. amd64 or i386), plus the ones with all in the name.
Install them all at once by issuing e.g.:

cd Downloads
sudo dpkg -i linux-headers-3.7.1-030701-generic_3.7.1-12345678_amd64.deb linux-image... # include all

and finally, reboot into your new kernel.
if the new kernel doesn't work for you or introduces other issues, boot your system using the older kernel (e.g. hold Shift during the early boot stage to select it in the Grub menu) and then remove the packages using your package management e.g. sudo apt-get remove linux-\*3.7.1\*.

Identifying the exact hardware

The product you have was probably sold using a retail name completely irrelevant to you issue. Most vendors just use chipsets from manufacturers like Broadcom, Atheros, Ralink or Intel while the product itself may not carry this name. One example of this: a ThinkPad 11a/b/g/n Wireless LAN Mini Express Adapter may in fact just be a Atheros AR5418. The Thinkpad rebrand does usually not affect the hardware support in Linux, but the used chipset does. Therefore, it's of great importance to identify the chipset.

PCI and integrated devices (e.g. mobile PCs):

lspci -nn | grep -i network

USB devices:

lsusb

In case you have trouble identifying it from this list:

Unplug the device.
Open a terminal and run sudo tail -n 0 -f /var/log/syslog
Re-plug the device in and give the kernel/device a few seconds to initialize.
Stop the command by pressing Ctrl+C. The output should help identifying it from the list.
Check for output mentioning unable to enumerate USB device. If such output is present, your device is already failing on communication on USB-level. You're hitting a hardware issue probably: check for broken cables/connectors, power issues, broken hubs, other broken hardware. Don't bother dealing with drivers at this point - fix USB communication first.

In case your hardware isn't listed, this may be unrelated to your adapter, but a general PCI/USB bus error. This is considered outside the scope of a WiFi issue. Note that some notebooks have integrated WiFi adapters connected to an internal USB port, so it may be listed as USB in such a case.

Example output:

$ lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. ...
                            ^^^^-- product ID
                       ^^^^------- vendor ID

$ lspci -nn | grep -i network
04:00.0 Network controller [0280]: Intel Corporation [...] [8086:4238] (rev 3e)
                                                vendor ID --^^^^
                                               product ID -------^^^^

Tips in using Google

Use the numeric product/vendor IDs as identified by the commands issued.
Use linux as a keyword with it, rather than Ubuntu.
Try using the device's chipset name as listed in the output in the steps of Identifying the exact hardware. Examples: AR9285, BCM4311, Intel+6300.
Avoid using keywords unrelated to hardware support. E.g. your desktop environment is unrelated, so use Ubuntu instead of Lubuntu.
Try to be sensitive for 'general' information about your device, rather than focusing on specific solutions, e.g. "Firmware is needed for this device", or reports of users that it worked out-of-the-box in a previous release.

I had no luck with all options. What should I provide in a new question?

Before posting a new question, search this site using keywords from Identifying the exact hardware.

All relevant (unexpected or errors) output from the options in this answer.
Relevant output of the steps done in the Identifying the exact hardware section.
The kernel you're running and the versions you've tried. Use the uname -r command to identify your kernel version.
Other Ubuntu versions you've tried.

Things to avoid if possible

Compiling from source (e.g. running make, sudo make install).

This may overwrite system files and confuse your package management. Installing this way may work, but can break anytime later if the package management updates overwrite the files again.
It may lead to unexpected errors which may be hard to solve for a novice user.
It's hard to undo all the changes done by sudo make install in case you want to revert your actions.

Ndiswrapper approaches.

This 'wrapper' around Windows drivers should be tried as a last resort only, as it's very inefficient to emulate a Windows environment on Linux for hardware drivers.
Stability and performance are usually reported as low.

Hardware requiring special care

Broadcom BCM43xx devices. Please refer to this answer for a nice tutorial on getting these devices to work.

In my case, I had an old laptop on which I installed Lubuntu 19. The correct wifi drivers were already installed. I could see all wifi networks, but could not connect to them. Connecting through the internet via cable worked just fine.

After unsuccessfully trying to resolve the issue in many different ways, I found out that some (L?)ubuntu 19 users are having the same problems, and recommended to install Lubuntu 16, and so I did. My wifi adapter (and the touchpad as well) now both work out of the box.


How do I remove cached .deb files? I think once we get the packages with apt-get it stores in /var/cache/apt/archives . Is it safe to remove the archives files to save space?
Can we remove other files as well to save some space?

I think it's safe to remove the archives files. So if you want to free up disk space this are my recommendations:

To delete downloaded packages (.deb) already installed (and no longer needed)

sudo apt-get clean

To remove all stored archives in your cache for packages that can not be downloaded anymore (thus packages that are no longer in the repository or that have a newer version in the repository).

sudo apt-get autoclean

To remove unnecessary packages (After uninstalling an app there could be packages you don't need anymore).

sudo apt-get autoremove

To delete old kernel versions

sudo apt-get remove --purge linux-image-X.X.XX-XX-generic

If you don't know which kernel version to remove

dpkg --get-selections | grep linux-image

Source: Limpiando Ubuntu: comandos y programas (actualización) & How do I free up disk space?

You can run 'sudo apt-get clean' to clean out any cached .debs.  If they're needed, they will be downloaded again.  There's also a program called computer-janitor to help with removing old files.


Vm VirtualBox with Ubuntu 16.04.5 Input/output error New to this but tried pretty much everything - but do I need an actual physical removable CD in order to install Ubuntu inside VirtualBox?

You just need an ISO file. If you go to "Storage" in the VirtualBox settings for your VM, you will see an Empty CD. Select the Empty CD and then in the Attributes section, click the drop down, the one with the CD icon, and browse to your ISO file and select it. That's it!  Now just boot! :)


Overheating problem with HP Pavilion G6 2231tx I have overheating problem with HP pavilion G6 on ubuntu, but I don't have any issues on Windows 8. My CPU is Intel i3, 2.4 Ghz.

Download the proprietry drivers available for intel. Search for additional drivers and install the suggested one. Also you can download the driver from intel website.


How do I install the AMD Raidxpert 2 driver? I have the Ubuntu 18.04.1 LTS AMD64 liveCD iso installed on a USB drive

I'm booting from a raid array made with the raidxpert 2 tool included with my motherboard and I need the driver for it.

My drives don't show up at all without the right driver.

Specs:

mobo: Gigabyte X470 AORUS ULTRA GAMING
CPU: AMD Ryzen 5 2600x
RAM: HyperX Fury DDR4 2666MHz 2x8GB

Files are here: amd support

(http://support.amd.com/en-us/download/chipset?os=Linux%20x86_64)


Laptop won't turn back on after closing lid I've tried several versions of Ubuntu and can't get this working, whenever I close and open the laptop, it has a black screen and nothing will turn it back on (I have to reboot), oddly enough the keyboard back light still works...

I'm using a 16" 2016 Macbook Pro with Ubuntu 16.04.1

Fairly certain it somehow relates to ACPI as the problem disappears when turning off ACPI or hardware P-state (boot options acpi=off or intel_pstate=no_hwp), however that's of course not a viable solution. You could find workarounds by more or less skilled peoples but the solution remains in the kernel. All the workarounds I've tested to fix Lid Close Freeze issue had negative impacts on something else, it fixes a problem by creating others, ie. acpi=off disables lot of cool power and hardware kernel features. It's a pity.
On my Thinkpad model, for example, I had to wait for a newer kernel with thinkpad_acpi updated. Pretty sure it's the same problem for you: kernel doesn't "know" yet all the features and specifications of some of your hardware components.
Ubuntu team's supported v4.4.0-18 for xenial should have fixed it on my computer according to some bug reports like this one, but in fact I had to wait for testing upstream kernel v4.5.2 to be able to close the lid without desktop freeze, surely because I'm not patient enough. Just to be clear in this example, I will continue to regularly test the lastest iterations of official v4.4.0-x until the fix is implemented, then will revert back to this LTS kernel for more reliabilty. So I hope it's just a temporary solution.
Backup first!!!
My very first advice will always be to love and cherish your dear Clonezilla boot CD/USB before touching anything about kernel and the heart of your system, this way you'll be able to safely revert back changes ;)
Safest Solution
Start Synaptics Package Manager, open Settings top-bar menu > Repositories > Developer Options tab, and enable Pre-released updates. Indeed your issue may have been fixed in latest v4.4.0-x.
So it's safer to try this before any exotic solution like the wild method described below, it's not advisable to play too much with a Long-Term Support release's kernel versions, at least if you want to keep the stability advantage of LTS. This xenial-proposed repo currently provides kernel version 4.4.0-36.55 with its extra package (= less chances of compatibility errors after reboot).
Wild Wild Way
Upgrade your kernel version, the problem may have been fixed in most recent kernels. Read how to do this and what to be careful about at Ubuntu Wiki. The link under Upstream kernels archive title in this page is where you'll find the packages to install. It could be of some interest to read this Wiki article about upstream kernel differences.
As of today I would recommend you to try v4.6.3-yakkety and if your issue isn't fixed yet, please try v4.7.1. No extra package is available for this mainline builds anyway, so you have to understand what you do before doing it, don't complain if this kernels kill your kittens.

I've had the same problem with my laptop. I've found that if I lock Ubuntu (go to the little gear in the upper right corner and select Lock) it won't freeze up and become unresponsive. Not sure why that works but just closing the lid doesn't... I hope that helps some.


Where is an app filed? I'm setting up a new install of Ubuntu 20.04. I installed the Zoom Client app. It opens from the Applications window. I want a desktop shortcut for it. Looking for how to do that, I see various methods, but they all require that I find where it is. Navigating the indicated path to Applications, I see nothing with zoom in the name. Likewise when I look in snap packages. Searching for zoom in my files yields no result. Thinking it might not have installed properly, I reinstalled it from the software repository, and again from the Zoom Download Center. I don't see it in my Downloads directory either. Since I can open the app in the Applications window, I know I have it somewhere, but I can't move it to the desktop until I know where to move it from. I am not knowledgeable about computers, and am unfamiliar with much of the terminology. Any help would be appreciated. Thank you.

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)

Apps installed normally show up in the home directory of the user, depends on how you installed the apps tho, if its through snap it will show up in the ~/snap directory, at least from what I know.


How can I disable Caps Lock on text-mode (tty) terminals? I have disabled caps lock in Ubuntu via the System Settings -> Keyboard panel (see How to programmatically swap the caps lock and esc keys? on how to find this option), however when I switch to a text-mode tty terminals (through Ctrl + Alt + F1) caps lock is no longer disabled.

I use these text-based terminals a fair amount - is there a way to completely disable Caps Lock, even on these terminals?

I had success using the instructions posted on this blog in a virtual console:

echo -e "$(dumpkeys | grep ^keymaps)\nkeycode 58 = Escape" | sudo loadkeys

I'm not sure how to apply this automatically after every reboot, though.

While researching your question, I also ran across this alternative solution:

Adding the following line to .profile or .bash_profile should disable caps lock:

xmodmap -e "remove lock = Caps_Lock"


Roll back of Ubuntu installation possible to get a WIN7 partition back? After testing Ubuntu 11.10 (64 bit) by booting it from the CD, I unfortunately decided to install it on my pc. On my pc I had kept on each hd and the ssd as well space enough for other partitions. I used the offered option to install Ubuntu alongside with Win7 and ... ended up in a half destroyed system. Everything seemed to work well during the installation, but after reboot I got the mess.

During boot it does not ask me which OS I would like to choose, as it was said in the installation routine. It always boots Windows, but the Windows partition on drive d: (30% of the disk) is gone and Win7(64) instead reports a RAW partition with the the entire capacity of around 500GB. My drive C: (SSD) and Drive E:(HD) seem to be ok though. But D: was my win program drive and so my win7 installation is nearly unusable.

Is there a way to revert the installation and get my partition on drive D. back ?

When you do an "alongside Windows" install, the installer resizes the first partition and sticks a new one in after it for Ubuntu. That's what happened and that's why your "C" drive is smaller.

Furthermore, Windows uses a thoroughly broken logical approach to drive naming. So if you insert another partition into a system (as has happened here), Windows doesn't have a clue what to do. I'll stop raging on the inadequacies of Windows and let you read this:

http://windows.microsoft.com/en-GB/windows-vista/Change-add-or-remove-a-drive-letter

You can manually change the letter assigned to a partition. Do that and fix your "programs drive" back to D. That should fix Windows for you.

After that,

If you still want to use Ubuntu you can try fixing the Grub bootloader which doesn't appear to have detected the right disk to install its bootloader onto. You have a non-standard setup so you might find that just changing the boot priority of the system in your BIOS will fix that.
If you don't, nuke that partition (you can do that from Windows or the LiveCD) and resize your C drive back up. This will probably play havoc with your D drive again, but you can fix that.

after installing this on my pc as a longside windows 8 i think we need to re thik the grub boot manger so it shows up windows installations as well as linux Ubuntu as ive noticed it delets the windows boot mgr and this causes windows to start as the windows os looks for its own boot mgr to work

but to the question above there isent at the moment which makes Ubuntu rubbish you will have to reinstall windows all over again but with out wiping the hard drive so you have all your files from windows

put your dvd/cd in to the drive press del f8 f10 f12 which ever it is to get in to bios
select the dvd drive to boot first and press any key when its prompts you
on windows 7 select your language  then click next it will give you 3 options i would select option 3 as this might fix windows with out reinstalling it click on repair windows click on advance and click on automatic repair windows it should work if it dont then that will tell you will deffently need to reinstall so back to square 1 click on install windows click on advance it will come in a white windows with a load of hard drives depending on how many you have in your system, select the hard drive you want dont click on anything else it will install windows with all the files intact once windows is installed you can delete Ubuntu from the hard in the system registry  i know its long winded but its what i have to do but i am going for my new hard drive in put Ubunty on and install windows on my ssd


OK so after a lot of internet scraping and unhelpful solutions, I have gotten it fixed in my case. I am running an AMD 400 series AMD graphics card. What is downloaded automatically in the drivers upon 20.04 installation is not sufficient (this includes the situation when you check the box for install third-party drivers on installation!). Below, I will outline briefly what I did, but since people have different computers with different specs, I can't get too specific without causing future viewers to install the wrong media and mess up their system.
Below is for an AMD system (If you have intel processor, you will do a similar step, but on the intel driver site)

Go to https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-20-20

Select the software that matches your version of ubuntu/RHEL/SLED. For me, version 20.20 for Ubuntu 20.04. (OP this looks like what you will choose, too)

Also look at the download instructions. This outlines the documentation that is important to understand what you are doing!

3A. Briefly, you will download a tar.bz file called amdgpu.blahblahblahb.tar.bz
3B. You will extract it.
3C. You will navigate to it.
3D. You will run the amdgpu-install script in the terminal. I just dragged and dropped it into my terminal and hit enter. I did get a problem here where it wouldn't install at first because there was a driver already partially installed (I think this may have been the automatically installed driver that ubuntu gave us upon installation). To hop around this, I added the keyword uninstall (/.amdgpu-install --uninstall), then re-ran the script again (./amdgpu-install)

Reboot and it should work. Furthermore, this will fix any Night Light problems that you were having.

Cheers!

When you insert the HDMI cable into the input, does it make the “hardware in” sound? Was xrandr a downloaded package from the internet? Sometimes .deb or .tar.gz files can be a bit glitchy. If it wasn’t from the internet, did you install it via the terminal? If so, was it a snap or apt? Did you download it from the Software Center? If you said yes to any of those questions, please reply back your answer. I am always here to help, and I don’t plan on going anywhere :)


Ubuntu 14.04 - crontab @reboot hang my PC Trying to resolving the bug for KWORKERS HIGH CPU, as suggested in this answer. I put in my crontab the row:

@reboot echo "disable" > /sys/firmware/acpi/interrupts/gpe06

After the reboot, the system doesn't start. Also in single user mode it doesn't start.

I rebooted my PC with the option:

init=/bin/bash

and I removed the row in the root crontab but the system doesn't start.

The simplest method to do a programmed reboot (although I can't think of a use case), is to create a simple script file like so:

(shebang)/bin/bash
sudo init 6

And schedule it as a normal cron job using

crontab -e

(back to the old school way)

Use sudo to run @reboot - 14.04 uses initd instead of systemd and initd requires root / sudo to reboot, while systemd does not.


Store windows files on ubuntu A small accounting firm (70-80 people) needs to store different files (.pdf, .xlsx, .doc, etc) in a single point and access it via the internet (everything would be hosted at home on a dedicated server, after purchasing it :)). The problem is that a Windows server for active directory would be too expensive, it would have to be active 24/7 and some older people working in the field would need to have easy access (network mapped drive), not other software, so the solutions on which I would consider are:
1) Samba, but I don't really know if it handles continuous data transfers or transfer speeds. There would be two users because the files generated from their accounting programs are shared by most employees and the administrator who would have access to delete to avoid accidental deletion)
2) TrueNas - I'm not familiar with how secure it is or how I could write a script for automatic backup
3) SFTP - but are you going to make an Ubuntu server with this protocol to transfer any type of files from windows, and it's not slower?
4) Cloud - but it seems a bit expensive - you need to store around 5TB plus backups
I know I'm not well documented but I would appreciate at least some advice and in which direction I could go.

Since you mention dedicated server, why don't you start your own server and install Nextcloud on top of it ? You get to decide your own specification— on a plus side it's more private than file hosting service. It makes more sense you'd want to build your own cloud storage if you value your privacy.
You can view comparison between top cloud storage product versus Nextcloud here → https://nextcloud.com/compare/

The application you should consider is Dropbox for Teams Advanced option.
I have no relationship with Dropbox other than as a private user in the ubuntu environment having considered a number of options including NAS with all it's associated requirements in a non IT professional environment.

The Advanced option is 15€ per user per month with unlimited storage space and a number of features you will find useful in an accounting business environment, particularly maintaining files in a secure location, as opposed to the associated risks with locally based NAS solutions where data/hardware theft might be of concern.
Dropbox is capable of running on multiple platforms.
The link to Dropbox is here and there is an option to initially try it for free before committing to a plan and there are of course free plans too where appropriate.


Restoring Grub after Kubuntu installation Possible Duplicate:
How to restore plymouth default theme

I installed Kubuntu on top of my existing Ubuntu 12.04 (64 bit) installation. During Kubuntu installation, I chose lightdm as my default display manager (instead of kdm).
Now  after rebooting, the Grub has a new color (gray instead of default purplish) and the screen while booting is gray (instead of purplish). I am curious if it is possible to change this grub behavior without removing Kubuntu.
I did find a lot of discussion about modifying grub themes but they were not very useful because I do not know what is the default unity grub theme.
I did reinstall grub but it didn't change anything.
I tried the Grub Customizer but couldn't succeed.
Thanks in advance!

Just follow this instructions:
Open terminal (ctrl+alt+t)

If you want to restore Ubuntu "booting" logo, run:

1.sudo update-alternatives --config default.plymouth
 2. sudo update-initramfs -u

If you want to restore default login screen run:
 1.sudo dpkg-reconfigure lightdm
 2. click OK and choose Lightdm.

For Grub2:

For Grub2 the images should follow these rules:

Size should be 640×480
Format should be .tga (The GIMP can do this)
Follow the same design tips as above.
Saved in /usr/share/images/grub/

open up the file gksu gedit /etc/grub.d/05_debian_theme and look for the line:

WALLPAPER="/usr/share/images/desktop-base/moreblue-orbit-grub.png"

change the explicit path of the image in the line above to the path of your new image.

then

sudo update-grub2

HERE IS THE SOURCE


How do I removed the keyring popup when I am accessing vino? I am running Xubuntu.  I was running headless fine before using tightVNC on windows and vino on Xubuntu. Now, after entering the password on the remote server, the following dialog pops on the local server (the one that usually don't have a monitor) before open the connection :

Why is that dialog showing?

How do I get ride of it?

This is a known bug in the Debian/Ubuntu package of vino server. There is a workaround in the bug comments, which I'm reproducing here. Rumour says it's only good for 10.04.

Open up Applications->Accessories->Passwords and Encryption Keys
Right click Passwords:login and unlock it.
You should be able to expand the tree and find a listing for vino. Right click and delete it.
Close Passwords and Encryption Keys.
Open gconf-editor as and navigate to /desktop/gnome/remote_access
Enter in your BASE64 encoded password into the vnc_password key.

Run echo -n "your password" | base64. Enter the output, even the equal sign.

Save the config and close the editor.
Log out, log back in, and you can now use your VNC client to connect to your machine without being first prompted with the keyring.

there is no Passwords and Encryption in Xubuntu menus . you should manualy add this .

your Solution is Here :

 http://www.geekyeric.com/?p=67


Install Ubuntu from usb-stick: Caught in endless-reboot loop I tried to install Ubuntu 14.04.1 LTS using the following instructions:

https://help.ubuntu.com/community/Installation/FromUSBStickQuick

I sucessfully booted from the USB stick (installer boot menu -> install ubuntu) and clicked on the setup-icon on the Ubuntu Desktop. Everything goes fine until I select the option

  Install Ubuntu inside Windows 7

After I click "continue" Ubuntu reboots automatically and I end up where I started (the installer boot menu - no installation started as one might expect).

What am I missing here? Any help would be highly appreciated :)

Am not sure what is "Install Ubuntu inside Windows 7" !

Check this two links:

http://ubuntuforums.org/showthread.php?t=2209033

How can I install Ubuntu without removing Windows?


Home folder not writeable I have two users, and one of them can't write to his home directory (but the desktop directory?!) and Thunar displays a lock on the home folder. However, if I run ls -l in /home, I get

drwxr-xr-x 28 habefaro habefaro 4096 Mär  4  2013 habefaro
drwxr-xr-x 22 psirus   psirus   4096 Apr  4 16:52 psirus

So I can't see the difference?! Btw, habefaro is the user who can't write to his home folder.

EDIT: Running sudo lsattr -d /home/habefaro gives

----i--------e-- habefaro/

Based on the lsattr output, the user's home directory has been marked as immutable which will mean that no files or directories may be added or deleted. You should be able to unset the immutable attribute using chattr i.e.

sudo chattr -i /home/habefaro/

Perhaps the folder permissions are not correct.
Set home permission to default (0775): this set also subdirectories

sudo chmod -R 775 /home/habefaro/


Missing new file in Ubuntu 15.04 My question is pretty much the same like this one:

The New file operation is missing in context menu. How can I fix it?

The only difference is that I'm running Ubuntu 15.04. The accepted answer posted in the question above does not work for me - after creating folder Templates and new file inside simply nothing happens.

Open ~/.config/user-dirs.dirs and find XDG_TEMPLATE_DIR. Make sure that it looks like this:

XDG_TEMPLATE_DIR=$HOME/Templates

If not, change the value so that it looks like that.

After you check the template setting in @David Bailey 's post.

You need to create an empty file, to say Text.txt in your $HOME/Templates folder, eg by open a terminal in that folder and

echo > Text.txt

Then you have a  "new document" in context menu.

Works for me on UBUNTU 15.04


Are hard links equivalent to Windows shortcuts? Wikipedia defines a hard link as:

  a directory entry that associates a name with a file on a file system. (A directory is itself a special kind of file that contains a list of such entries.) The term is used in file systems which allow multiple hard links to be created for the same file.

I am wondering if the concept of hard link is equivalent to the Windows concept of Shortcut.

If hard links are not equivalent to shortcuts, then what's the closest Windows feature to hard links?

No, a hard link is completely different. A soft link is closer to a Windows shortcut (though there are important differences, symbolic links are more similar to windows shortcuts than hard links are). A hard link is a different thing and one you will almost never need.

Briefly, a soft link is created with this command:

ln -s foo bar

If you then run ls -l, you will see:

lrwxrwxrwx 1 terdon terdon 3 Mar 10 15:58 bar -> foo
-rw-r--r-- 2 terdon terdon 0 Mar 10 15:58 foo

The -> means that bar is a link to foo. So, opening bar, with a text editor for example, will actually open the separate file foo. However, deleting bar will just delete the shortcut, it will not affect the file foo.

Hard links, on the other hand, are created with this command:

ln foo bar

If you now run ls -l, there is no indication of any relationship between the files:

-rw-r--r-- 2 terdon terdon 0 Mar 10 15:58 bar
-rw-r--r-- 2 terdon terdon 0 Mar 10 15:58 foo

But—and this is very important—those are actually the same file. Files on Unix file systems are stored using inodes; an inode is basically the way the filesystem maps a file name to a particular location on the physical hard drive. So, hard links are files that point to the same inode as their target. Another way of putting this is that all files are actually hard links pointing to their inodes. Making a hard link to a file just creates a new pointer (file) on the file system that points to the same inode. Each inode can have multiple files pointing to it or one,  or none.

To understand this more clearly, use ls -i which shows the inode associated with a file. Let's create a soft link and a hard link and see what happens:

ln -s foo SoftLinkToFoo
ln foo HardLinkToFoo

Now, check their inodes:

As you can see above, both foo and HardLinkToFoo have the same inode (16648029) while SoftLinkToFoo has a different one (16648036).

What happens if we rename foo with mv foo bar?

The red color indicates a broken soft link, one whose target can no longer be found. This is because soft links point to a file's name, not its inode. Note that despite changing the name, the inode remains the same so the hardlink is fine, it still works.

In summary, hard links are actually two manifestations of the same file; they are pointers to the same section of the disk. Soft links are just shortcuts. To take a real world analogy, hardlinks are like two different phone numbers for the same phone line and soft links are like having two different phone lines in the same house.

A big difference , hard-link  cannot be created for folders , but for files .

  Shortcut can be created for folders , so you cannot say they are
  equivalent .

Your question should be the difference between symbolic link or soft link  and shortcut .

as according to this:

  A symbolic link is filesystem level, and everything sees it as the
  original file. An application needs no special support to use a
  symbolic link.

  A "Shortcut" is just a regular file that has a reference to the
  destination file or directory .

So when you click a shortcut will change your directory to the actual file , while soft-link will refer to its location as if its the actual file , for that  in Linux you can use terminal and  cd to symbolic links while you cannot cd to shortcuts .

A Windows shortcut and a Linux launcher (pointing to some location) would be identical.


Error "shockwave flash has crashed " google chrome ubuntu 14.04.1 I can not watch videos on twitch because shockwave flash crashes.
I tried to disable the flash in the plugins but I only seen one Flash plugin.

Before when I used 12.10, I saw 3 plugins for Flash, and I could disable one to allow me to watch Twitch. Not anymore. Does anyone have any idea what my issue is?

Your answer indicates that you may have upgraded from 12.10 to 14.04. If this is the case, upgrading from 12.10 to 14.04 is not supported, because 12.10 was a short term release.

I have 14.04, I am running google chrome, and I can watch youtube and twitchTV without a problem. What you should do is this:

Backup the files on your computer to an external harddrive, or to a cloud provider such as Dropbox or Google Drive.
Download the latest Ubuntu Version
Place the latest version on an installation medium such as a DVD or USB thumb drive.
Restart computer, and boot up the DVD/USB installation image of ubuntu.
Assuming this is not a dual boot setup; do a clean install of Ubuntu, wiping the entire harddrive.

After this is done; you should have a clean and fresh setup where you should not have any issues watching twitch or youtube. You should be able to do this in both Chrome or Firefox.


Container namespace isn't visible in ip netns list I wonder why we can't see the namespaces created by lxc-create on the output of "ip netns list"
For example I create a namespace like below

lxc-create -t download -n cont1 -- -d ubuntu -r trusty -a amd64

I don't see this on "ip netns list" however if I add a namespace myself,

root@lin:~# ip netns add test

root@lin:~# ip netns list
test

it is visible.

containers use namespaces but here namespaces created lxc-create are hidden from admin user? Is there any way to list them via ip netns?

Thanks.

The ip netns list command displays only namespaces that have been named, by virtue of a corresponding file in /var/run/netns/. Network namespaces can be created without names, though, and are referenced by a file descriptor. (The ip-netns (8) man page mentions this.)

I believe lxc uses unnamed network namespaces. To see them, start a container and run lsns -t net .

You cannot see LXC namespaces using ip netns.

LXCs use a different LXC can be listed by using

% sudo lxc-ls -f


Completely remove openssl dev version I installed openssl dev version from github. However, I now wish to remove it to install openssl from the official repos.

I tried to remove it using sudo apt-get remove --purge openssl but it's still available to me through terminal.

goelakash@goelakash-acer:~/softwares$ openssl version
OpenSSL 1.1.0-pre3-dev  xx XXX xxxx

How do I get rid of the this version?

I removed the executable by first finding where the current version of openssl was residing:

whereis openssl

and then reinstalling openssl

sudo apt-get install openssl

Just type this command on terminal:

sudo apt-get remove openssl


Ubuntu 13.10 x64 cannot shut down properly, pressing esc stuck at purple screen Don't think this is a replicated question. Ubuntu 13.10 x64 cannot shut down properly, pressing esc stuck at purple screen:

Broadcast message from root@ubuntu-laptop
(unknown) at 19:51 ...

The system is going to power off NOW!
Shutting down SmartLink Modem driver normally
Unloading modem driver from kernel ... none found.
speech-dispatcher disabled: edit /etc/default/speech-dispatcher
 * asking all remaining processes to terminate ... [OK]
 * killing all remaining processes ... [fail]
modem-manager[662]: <info> Caught signal 15, shutting down [OK]

 * deactivating swap...
mount: / is busy
 * will now halt

And it hangs there and doesn't shut down. Please help and please tell me if more info needed!

It looks like you have some kind of process writing to your disk (/). Try to figure out which processes are running with the command command:

top

Then lookup the PID of that process. Then kill that process with

kill PID

if that dont work

sudo kill PID

Example:

 top
 11555 yourname     20   0 1105m 159m  18m S   2,0  2,0   0:30.38 chrome
 11871 yourname     20   0  409m  36m  23m S   1,3  0,5   0:54.75 plugin-containe
 6787  yourname     20   0 1412m  20m 8348 S   1,0  0,3   0:26.00 nautilus

quit command:

 q
 kill 6787

or

 sudo kill 6787

And Nautilus gets killed.

This seems to be a resolution (although it's not as intended):

shutdown -h now


Can't find options to open and close the optical drive/tray on HP Probook 445 G1 I have to install some software on my laptop. I tried to open optical (CD drive) on my laptop which has Ubuntu 12.04 LTS OS on it, but I couldn't find a way.

Buddy, It does not contain optical drive. It's just a slot, its blank from inside.
If you want to install any software from Optical disk, Get an external DVD Writer, or use Flash Drive.
I have the same from Delhi University (INDIA).


Google Chrome unity icon does not restore after minimizing After minimizing the Google Chrome window, clicking on the chrome icon in the unity sidebar doesn't restore the window. Additionally, the the icon seems to behave more like a launcher: no white indicators showing whether a window is open or not, and clicking on the icon just opens another instance of chrome. No other icon does this.

Can anyone help me here?

Works fine here - the launcher icon for goggle-chrome launches & controls google-chrome plus the 2 quicklists options.

Maybe try resetting - Remove the icon from the launcher if pinned, then do a log out/in.

While you shouldn't need to,  try adding back to launcher this way - Browse in nautilus to /opt/google/chrome. Inside you'll see 'goggle-chrome.desktop'. Grab it with your cursor and DnD onto the unity launcher, then see if it works as intended.

This fixed the issue for me with  64 bit Ubuntu 12.04:  simply launching "chrome" from the dash didn't work, I had to use the nautilus method described above.

Disable all the extensions and close the browser. Try again and enable the extensions one by one.

That works for me.


Strange folder in my home folder after a failed run of BleachBit A folder was created in my home folder (not by anyone), and I cannot see the folder contents. She has root privileges, but when the nautilus root access the folder is empty. When I try to remove it, it will appear to remove more than 1 million files from my computer, and I do not know what these files are.

How i can see these files? the name of folder created is "4F8ZBREShQ". I'm scared about it...

Short answer: do

rm -r 4F8ZBREShQ

and go for a walk or get yourself a coffee.

Long answer:

Seems a bug of BleachBit. See http://bleachbit.sourceforge.net/forum/unremovable-folder-after-trying-wipe-free-space; you can join the discussion there.

The OP of Not able to delete folder from gui or terminal has been able to get rid of it, see the answer; but probably his method is overkill.

In effect, doing a rm -r 4F8ZBREShQ and being patient (really really patient; ext4 is not a speed monster for large directories, and this is LARGE) would work.

Recent ext4 should use a linear time with the size of the directory for the deletion process; even then, deleting millions of files will require a considerable time --- from tens of minutes to several hours.

I was dealing with the same problem and the solution was to run in terminal rm -r "folder_name" and wait until is done.


Fresh install of 14.04 - now unable to connect to Unifi Access point (others work) After installing 14.04 is can no longer connect to my Unifi Access Point (worked in 13.10 and works from windows on dual-boot machine). After a long pause, simply asks for password again.

Syslog generates the following ...

[ 1402.786355] wlan0: authenticate with c2:9f:db:87:99:d8
[ 1402.843630] wlan0: send auth to c2:9f:db:87:99:d8 (try 1/3)
[ 1402.845689] wlan0: authenticated
[ 1402.845899] wlan0: AP has invalid WMM params (AIFSN=1 for ACI 2), disabling WMM
[ 1402.847545] wlan0: associate with c2:9f:db:87:99:d8 (try 1/3)
[ 1402.850340] wlan0: RX AssocResp from c2:9f:db:87:99:d8 (capab=0x431 status=37 aid=0)
[ 1402.850347] wlan0: c2:9f:db:87:99:d8 denied association (code=37)
[ 1402.857675] wlan0: deauthenticating from c2:9f:db:87:99:d8 by local choice (reason=3)
[ 1406.265427] wlan0: authenticate with c2:9f:db:87:99:d8

lspci -nnk | grep -iA2 net:

<snip>
--
03:00.0 Network controller [0280]: Intel Corporation Centrino Ultimate-N 6300 [8086:4238] (rev 3e)
Subsystem: Intel Corporation Centrino Ultimate-N 6300 3x3 AGN [8086:1111]
Kernel driver in use: iwlwifi

I had this problem occur on two machines connecting to Ubiquiti's UAP-LR access point. No matter what I tried I could not get this to work by tweaking the config / modules, etc. on the laptops.

I was running 2.4.6 of the unifi controller software, which is the latest "stable" version. I installed 3.2.1 which immediately upgraded the firmware on my AP and this resolved my problem. Both machines can now connect.

If your controller is running on Ubuntu, simply run:

sudo apt-get install unifi-rapid

This will automatically upgrade. Be sure to make a backup of your config first.

# /etc/modprobe.d/iwlwifi.conf
# iwlwifi will dyamically load either iwldvm or iwlmvm depending on the
# microcode file installed on the system.  When removing iwlwifi, first
# remove the iwl?vm module and then iwlwifi.
remove iwlwifi \
(/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
&& /sbin/modprobe -r mac80211


Install Certbot on ubuntu 20.04 I've been following a couple of tutorials to add ssl to my server (node application).
I tried installing Certbot with the following line on by Ubuntu 20.04 server:
sudo add-apt-repository ppa:certbot/certbot

but got a warning and no install:
This is the PPA for packages prepared by Debian Let's Encrypt Team and backported for Ubuntu.
Note: Packages are only provided for currently supported Ubuntu releases.
More info: https://launchpad.net/~certbot/+archive/ubuntu/certbot
Press [ENTER] to continue or Ctrl-c to cancel adding it.*

After searching the net, there is mention of not using PPA, but to use an earlier standalone version - also mention of using snap - But I cannot find a concrete answer. I am using Express and not nginX.
Could someone suggest how to install, please?
Update
Ran sudo snap install certbot.
Result:
error: This revision of snap "certbot" was published using classic confinement and thus may perform
   arbitrary system changes outside of the security sandbox that snaps are usually confined to,
   which may put your system at risk.
   If you understand and want to proceed repeat the command including --classic.

They have gotten rid of the apt it is now snap install certbot --classic

It appears you've gotten mixed up a little bit. The easiest way to install Certbot is by using Certbot-install on Github, like so:
curl -o- https://raw.githubusercontent.com/vinyll/certbot-install/master/install.sh | bash
and voilla, you have it installed.


Resizing root partition I am running a Win 8.1 and Ubuntu 14.04 dual boot and I'm trying to resizing my / as it's running out of space.

I've shrunk my other NTFS partition and freed 10GB of unallocated space, when I go to gparted it doesn't seem to let me to resize the ext4 partition using the unallocated space I freed up earlier. I don't have any other partition on the Ubuntu side other than the swap and the ext4, and the rest is my Windows's NTFS partitions.

Does anyone know how to work around this?

So I actually figured it out and in-case someone is in the same boots as I am, here's how I've done it :

Free some space on your HDD that is directly next to your Linux partition, in my case, I took 10GBs from Data partition, as it's the one directly next to my Linux partition.

I've done it by moving the chunks of data in my Data partition to the right and free some space in the left side (the one next to the Linux partition), and note that you have to unmount the partition before you can modify it.  And it took about 90 minutes for me to move the 172GB data chunks to the right.

like this

After that, left-click on your swap partition and click swapoff
Now, you can resize the ext4 partition using the space you freed before
Apply changes.

I've resized the ext4 partition on a LiveCD, but I don't think it's necessary. (you can resize it while logged in)

You can extend partitions only which harddrive sectors are neighbours. i mean in this case you can not keep any partition between the root part and unlocated space.

As i can see the only expandable partition is the one named Telkom Stuff and it is most probably the drive you make space from. If you want to expand your root part, you need to reconfigure disk. Using an external harddrive you can backup your data and do whatever you want with your disk by deleting Data and Telkom Stuff partitions. If there is another way I'd like to know too.


Microsoft Edge on Linux I'm Web Developer and need Microsoft Edge for testing on my Ubuntu.

I know I can have Microsoft Edge by:

Installing Windows on Virtual Machine.
Linux - Windows Dual boot.

But with these solutions, I have to buy windows while I'm not using it for everyday computing. Also I can't get rid of the Windows with these solutions.

I've read some articles about Microsoft Edge on Linux but couldn't find any solution. In 2015 they did this conference and Edge on Linux still doesn't happening:

WOAH, I CAN TEST EDGE & IE ON A MAC & LINUX!

I also found this and It seems Microsoft doesn't care for Edge on Linux. at least for now:

  It turns out that Microsoft Edge is only available with operating
  system like Windows 10 and a browser application with few mobile
  devices.

Is there anyway to have Microsoft Edge on Linux without VM?

First, install VirtualBox: https://www.virtualbox.org/wiki/Linux_Downloads

Then, install the Edge virtual machine for VirtualBox from here: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

No, you can not get Microsoft Edge on Linux/Ubuntu or any other Linux machine. Instead of using Microsoft Edge try using a text editor that comes with your system. A text editor should function almost as well as Microsoft Edge for programming (By the way, I'm a web developer too).


How do I start Unity manually upon boot? I recently installed Ubuntu 14.04 (Trusty Tahr) LTS, and I was wondering how could I start the GUI manually upon booting the system.

For example, I'd like the system to start at a black tty screen, ask for my credentials and password, and then I can start the GUI manually.

Run the following command in terminal:

sudo gedit /etc/default/grub

This opens the GRUB boot loader configuration file with a text editor.

Do the below changes:

Comment the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash", by adding # at the beginning, which will disable the Ubuntu purple screen.

Change GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX="text". This makes Ubuntu boot directly into text mode.

Uncomment this line #GRUB_TERMINAL=console, by removing the # at the beginning. This makes GRUB menu into real black & white text mode (without a background image).

After saving the changes, update GRUB via the command:

sudo update-grub

Restart your computer and see the result.

To get the GUI, run sudo lightdm.

Reference

You need to boot in run level 3 (where you get only the command line) and then you can type init 5 (witch will go in run level 5 with GUI)


Failed to run a bootable USB EDIT: I tried to reinstall syslinux from "Misc Options", and I get an error. mtools crashed using this command: mmove -D o -D O s:/ldlinux.sys s:/yumi/ldlinux.sys.

This is what I've done until now:

attached my USB pen to PC
downloaded GParted Live ISO from stable directory
installed YUMI for Ubuntu, a program that allows you to create a bootable USB with multiple bootable ISOs
run YUMI.gambas from bash and entered my sudoer password
selected the USB pen and the ISO, and clicked "Create"
Checked that an yumi directory on the pen exists
Rebooted PC
pressed F8 at BIOS level and selected the pen

Result: USB bootloader was not started. On the contrary, my default bootloader started, and Linux booted. No error message was displayed. Is there a way to debug it?

Have you tried using UNetBootin

sudo apt-get install unetbootin

There is also a very simple method

dd if=file.iso of=/dev/sdb bs=512k

/dev/sbd is your usb


How to view a PE EXE/DLL file version information? In Windows there is a version information page in an executable/library file properties window. How to view that info in Ubuntu?

I'm working in a tool called pev to retrieve information about PE files on the command line.

It is installable with

sudo apt-get install pev

The file version can be fetched with

peres -v program.exe | awk '{print $3}'

You probably need to install a third-party PE file viewer, such as http://www.ucware.com/apev/index.htm


Old version of gcc for new Ubuntu Is there a repository containing packages for old versions of gcc, for the latest Ubuntu. I want to install gcc3 alongside gcc 4, for programs that need gcc3 specifically.

You can use debian snapshots. Add the following lines to /etc/apt/sources.list

deb     http://snapshot.debian.org/archive/debian/20070730T000000Z/ lenny main
deb-src http://snapshot.debian.org/archive/debian/20070730T000000Z/ lenny main
deb     http://snapshot.debian.org/archive/debian-security/20070730T000000Z/ lenny/updates main
deb-src http://snapshot.debian.org/archive/debian-security/20070730T000000Z/ lenny/updates main

Now do

$ apt-get update
$ apt-get install g++-3.4

And you're set!

This works for many other old packages, make sure you select the correct timestamp, look for the correct one at snapshots.debian website.

On Ubuntu 18.04, I did:

sudo apt install gcc-opt

to install gcc-3.3, gcc-3.4, and gcc-4.0

https://launchpad.net/ubuntu/+source/gcc-opt


Black Screen on Boot HP Pavilion 20 Desktop I am new to Linux/Ubuntu.  I have a HP Pavilion 20 Desktop and have just installed Ubuntu 16.04.2 from a flash drive.

Processor: AMD E1-1200 APU with Radeon(tm) HD Graphics x 2, Graphics: Gallium 0.4 on llvmpipe (LLVM 3.8, 128 bits)

The screen goes black when I boot up.  I am able to get it working by going to the GRUB menu and typing "nomodeset" I tried updating my graphics card driver but no update was available.  Could use some help.

This answer from Coldfish fixed the problem.

You should add this option to /etc/default/grub, firstly:

sudo nano /etc/default/grub

and then add nomodeset to GRUB_CMDLINE_LINUX_DEFAULT:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
GRUB_CMDLINE_LINUX=""

And then save by hitting Ctrl+O, then exit nano with Ctrl+X, then simply run:

sudo update-grub


Why OpenDialog.py don't work on Jotty application I'm a Python beginner, I installed quickly, I wrote a "quickly tutorial" in terminal and I did all the steps before at:

"However, the application is not complete. There are a few things left for you to do:"

All the next steps aren't finished yet because when I use open dialog and select one of the files saved, the content of the file isn't showed on "textview1", Why? Only is deleted the content written. Before if was used without dialog works great.

SaveDialog.py work great.

-def on_mnu_new_activate(self, widget, data=None) don't work neither.

-If I use the bold lines by the others don't work.

###def open_file(self, widget, data=None):
def on_mnu_open_activate(self, widget, data=None):

###def save_file(self, widget, data=None):
def on_mnu_save_activate(self, widget, data=None):

  To view the code, go to the link above, unrar the archive, install "quickly" if you don't have it yet, place inside on jotty directory, then put "quickly run", "quickly edit", "quickly design", depending what do you want to do.

Code - problematic code with OpenDialog implemented.

Code-part1 - works OK, but without OpenDialog.

Acces to the two codes here

I need principally that OpenDialog function work great.

ADVANCE -> Go to the last message here

im use

def on_openclicked(self, widget):
    dialog = Gtk.FileChooserDialog("Please choose a file", self, Gtk.FileChooserAction.OPEN,(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, Gtk.STOCK_OPEN, Gtk.ResponseType.OK))
    dialog.set_default_size(100, 50)

    self.add_filters(dialog)

    response = dialog.run()
    if response == Gtk.ResponseType.OK:
        print "Open clicked"
        print "File selected: " + dialog.get_filename()
    elif response == Gtk.ResponseType.CANCEL:
        print "Cancel clicked"

    dialog.destroy()

def add_filters(self, dialog):

    filter_py = Gtk.FileFilter()
    filter_py.set_name("Text files")
    filter_py.add_mime_type("text/plain")
    dialog.add_filter(filter_py)

    filter_any = Gtk.FileFilter()
    filter_any.set_name("Any files")
    filter_any.add_pattern("*")
    dialog.add_filter(filter_any)

Go to your OpenDialog.py and in the @property selected_file section change the returned row to File.


Nautilus: "Cannot load supported server method list. Please check your gvfs installation" I was trying to connect to a sftp server using Nautilus... but I could not as it showed this error:

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo apt-get install --reinstall gvfs-backends

gksudo Nautilus only : "Cannot load supported server method list. Please check your gvfs installation"

This did the trick for me (I use Linux Mint):
dbus-launch nemo &


sudo apt-get update is not working in Ubuntu after a fresh install Recently I install Ubuntu 12.10, after install, I am going to update Ubuntu, so  I open terminal, and write " sudo apt-get update " then more than 1 hour has spend it won't finished. Any suggestion ...

All that

sudo apt-get update

does is to update the available archives.  It should download the changes which does nothing more than let Ubuntu know what updates are available.  If you want to then upgrade individual packages you should issue the command

sudo apt-get upgrade

and this will update any packages that are available except for when there is a change in dependencies. This would be the case when there is a kernel update available.  To perform the kernel update for 12.10 you would then have to issue the command

sudo apt-get dist-upgrade

Note that this will not upgrade the release level.  It does precisely the same thing as running the normal updates in the GUI.  A release upgrade done on the terminal is something completely different.

The apt-get update and upgrade commands should either run normally, or give you some error messages.  To get help fixing any problems you would have to tell us what those error messages are, but as far as I can tell the only problem is that you haven't actually run the upgrade.

It depends on your internet connection , I did a update while I was tethering with my phones 3G (No 4G in the area at the moment) and it took me a good 2 hours , It can spend alot of time or even a little with you have a stable fast connection

NOTE - You are already running the latest version , That is the latest version of Ubuntu so your wasting some time there , Just check Ubuntu.com once a month to see if they have updated anything or use that terminal command once a month , Until now , You have the latest


Getting + installing gcc/g++ 4.9 on Ubuntu? How do I install the latest version of gcc and g++?

I am using a variety of C++11 and C++1y features; which is why I need this.

You can install close to upstream version of GCC from Ubuntu Toolchain PPA: https://wiki.ubuntu.com/ToolChain#PPA_packages

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.9

Tested on Ubuntu 14.04.

Currently (20141102) adding the PPA and invoking the above command apt-get install gcc-4.9 g++-4.9 cpp-4.9 will print out a slew of suggested packages. Install them all except for libvtv0-dbg (which has a dependency conflict):

apt-get install gcc-4.9 g++-4.9 cpp-4.9 gcc-4.9-locales g++-4.9-multilib libstdc++6-4.9-dbg gcc-4.9-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan1-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libquadmath0-dbg lib32stdc++6-4.9-dbg libx32stdc++6-4.9-dbg

(skip the -dbg packages if they're of no interest to you), and then do an apt-get dist-upgrade --auto-remove. That last step will basically replace your gcc-4.8 with gcc-4.9 (but not uninstall the older version), and pull in up-to-date fortran compilers at the same time.


Enable dark mode on chrome's internal pages I have dark mode working on chrome's internal pages in Windows 10. Is it not implemented in the Ubuntu version?

I'm using chrome version 75.0. My theme is Adwaita-dark.

Note: as of chrome Version 78.0.3904.87 (Official Build) (64-bit) you can easliy turn chrome's internal pages to dark mode,its under chrome flags by default

run chrome://flags in the url
search for dark and you should see this option Force Dark Mode for Web Contents just enable it and relaunch chrome.

this is how it looks

for those who don't have the above option under flags To enable dark mode on Ubuntu, you need to edit the google-chrome.desktop file.

If you use GNOME desktop, simply run the command below which opens up the required file in editable format. If not, open the file in a text editor of your choice

sudo -H gedit /usr/share/applications/google-chrome.desktop

All you have to do is search for two lines and add a dark mode flag in front of them.

Search for

Exec=/usr/bin/google-chrome-stable %U

and replace it with:

Exec=/usr/bin/google-chrome-stable %U --force-dark-mode

Search for

Exec=/usr/bin/google-chrome-stable

and add the dark mode flag after it like this:

Exec=/usr/bin/google-chrome-stable --force-dark-mode

Once you have done these changes, simply try restarting chrome. If that doesn't work, rebooting your Ubuntu system should do the job.

For me rebooting my Ubuntu 18.04 system worked. Also note that if you update the chrome app, the changes will be gone, since the file will be overwritten.

An alternative way to emulate dark mode is here.
You can choose a theme and use that very easily to get Chrome dark.


Docker daemon does not bind to TCP6 I have a composition with the default networking configuration and a definition such as:
services:

  myservice:
    image: someimage
    restart: always
    ports:
      - 80:80
      - 443:443

The service properly binds to IPv4 and can be accessed as expected. Since a week or two, the service does no longer bind to IPv6 which previously worked without problems. Running netstat -plnt shows me that the docker-proxy is not listening on IPv6 ports:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:6379            0.0.0.0:*               LISTEN      1936/docker-proxy
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1898/docker-proxy
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      811/systemd-resolve
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      1883/docker-proxy
tcp6       0      0 :::2377                 :::*                    LISTEN      1283/dockerd
tcp6       0      0 :::7946                 :::*                    LISTEN      1283/dockerd

So you can see that ports 80 and 443  are exposed on tcp but not tcp6. Searching for this issue I can only find the reversed problem (docker is listening on IPv6 but not IPv4).
When trying to bin the port with socat the port is reported in use (while netstat states it is not). Binding port 81 to the IPv4 address on port 80 allows me to access the server via IPv6 so there is no routing issue anywhere else.
sudo socat TCP6-LISTEN:80,fork TCP4:127.0.0.1:80
2021/01/13 16:08:50 socat[26572] E bind(5, {AF=10 [0000:0000:0000:0000:0000:0000:0000:0000]:80}, 28): Address already in use

docker inspect shows the following information:
"NetworkSettings": {
    "Bridge": "",
    "SandboxID": "d5fdebb4de954a4d7c1800490e44d0f53c4ee827775edb8ba286583e888eaa07",
    "HairpinMode": false,
    "LinkLocalIPv6Address": "",
    "LinkLocalIPv6PrefixLen": 0,
    "Ports": {
        "443/tcp": [
            {
                "HostIp": "0.0.0.0",
                "HostPort": "443"
            }
        ],
        "80/tcp": [
            {
                "HostIp": "0.0.0.0",
                "HostPort": "80"
            }
        ]
    },
    "SandboxKey": "/var/run/docker/netns/d5fdebb4de95",
    "SecondaryIPAddresses": null,
    "SecondaryIPv6Addresses": null,
    "EndpointID": "",
    "Gateway": "",
    "GlobalIPv6Address": "",
    "GlobalIPv6PrefixLen": 0,
    "IPAddress": "",
    "IPPrefixLen": 0,
    "IPv6Gateway": "",
    "MacAddress": "",
    "Networks": {
        "docker_default": {
            "IPAMConfig": null,
            "Links": null,
            "Aliases": [
                "d8acfbf724cf"
            ],
            "NetworkID": "87b6b52c779252614553040f217f9f2310ee3cce5f1a450f6a8210e8ea411b5a",
            "EndpointID": "a6bdf4d85641a043c25812ac0759a7ad872a3ee15ff7ea0e3ddf6b2405967737",
            "Gateway": "172.20.0.1",
            "IPAddress": "172.20.0.2",
            "IPPrefixLen": 16,
            "IPv6Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "MacAddress": "02:42:ac:14:00:02",
            "DriverOpts": null
        }
    }
}

It seems to be a semi-intentional1 change in Docker 20.10.2, see the related discussion here: https://github.com/moby/libnetwork/issues/2607. Looks like a fix is underway.
In the meantime, downgrading to 20.10.1 works for me:
sudo apt install docker-ce=5:20.10.1~3-0~ubuntu-focal \
                 docker-ce-cli=5:20.10.1~3-0~ubuntu-focal
sudo apt-mark hold docker-ce docker-ce-cli

1 Semi-intentional because, apparently, this feature was never intended to be used this way. I’m as surprised as you are…

Fixed this by moving the docker ports and creating a socat proxy with systemd as described in this GitHub discussion. Steps are as follows:
Move the ports of your container, e.g. 8080:80 and 8443:443
Install socat
apt-get install socat

Create two systemd services that will use socat to listen on both IPv4 and IPv6 and forward the traffic to the IPv4 endpoint of your service:
nano /etc/systemd/system/socat-tcp-80.service

[Unit]
Description=Socat TCP:80
After=network.target

[Service]
Type=simple
User=root
ExecStart=/usr/bin/socat TCP6-LISTEN:80,,su=nobody,fork,reuseaddr TCP4:127.0.0.1:8080
Restart=on-failure

[Install]
WantedBy=multi-user.target

Save the file and create another one for port 443.
Start the services and enable them at boot:
systemctl start socat-tcp-80
systemctl start socat-tcp-443
systemctl enable socat-tcp-80
systemctl enable socat-tcp-443

You can use journalctl -feu socat-tcp-80 to fetch the logs of your service.
I don't know why the behavior of docker changed recently, but this workaround allows us to support IPv6 nevertheless.


How I can Install csh as a non-root user? I need csh for installing a package but I am not root user... I want to install it for my user.

I installed csh_20070713.orig.tar.gz, csh_20070713.diff.gz and csh_20070713-2ubuntu1.dsc
But there is not dpkg-source command...

then I did following procedure:

untar *.tar.gz
mv csh_20070713.orig csh_20070713
mkdir csh_20070713/debian
gunzip csh_20070713.diff.gz
patch -p0 < csh_20070713.diff
chmod +x csh_20070713/debian/rules

I do not know what should I do next! I used make and make install command in csh_20070713 directory and also debian directory but nothing happened...

It appears that the Makefile provided with the csh source package uses some (possibly BSD-derived) features that are not supported by GNU make, which make building it on an Ubuntu system challenging. An easier alternative is probably to build the tcsh package

DESCRIPTION
       tcsh  is an enhanced but completely compatible version of the Berkeley UNIX
       C shell, csh(1).

If your system's administrator has enabled the necessary source repositories, it may be possible for you to download and patch the source automatically using

apt-get source tcsh

which shouldn't require sudo as it will download into to the current directory. If that's not possible, then the source for the tcsh package should be available via git from git://git.debian.org/git/collab-maint/tcsh.git

Once you have the patched source, enter the top-level directory and configure it to build in your home directory e.g.

./configure --prefix=$HOME

This will cause the tcsh binary to be installed in $HOME/bin, which is likely already in your PATH. You can specify a sub-directory under $HOME if you prefer, or anywhere else that you have write and execute permissions, but you will need to make sure that directory is also added to your PATH. If that all goes well, then

make install

Finally, you may need to create a symbolic link from tcsh to csh in order for other programs to find it as the default csh implementation e.g. assuming you installed to $HOME/bin

ln -s tcsh ~/bin/csh

I noticed some things about what you did.  There is an easier  way to get this installed.
you can simply install csh by going to your terminal.  Then type sudo apt-get install csh
To make your csh a default option on boot type in a terminal which csh.

To enter into csh terminal just go to the regular terminal and input csh.

From a how to web site.


netplan - two interfaces I would like to set up two interfaces in one config file of netplan.

Currently I am using this one:

  network:
  version: 2
  renderer: networkd
  ethernets:
          ens18:
                dhcp4: no
                dhcp6: no
                addresses: [1.2.3.4/32]
                gateway4: 1.2.3.254
                nameservers:
                        search: [domain.tld]
                        addresses: [123.456.789.101]
                routes:
                - to: 1.2.3.254/32
                  via: 0.0.0.0
                  scope: link
          ens19:
                dhcp4: true

Without the second interface (ens19) it is working fine. After adding the second interface (ens19) the system has some troubles while booting up.
But after the system comes up, the second interface is working fine.

What I am doing wrong?

Thanks in advance.

New output:

root@web:/etc/netplan# sudo netplan --debug apply
** (generate:18692): DEBUG: 03:51:19.153: Processing input file /etc/netplan/50-cloud-init.yaml..
** (generate:18692): DEBUG: 03:51:19.153: starting new processing pass
** (generate:18692): DEBUG: 03:51:19.153: ens18: setting default backend to 1
** (generate:18692): DEBUG: 03:51:19.153: ens19: setting default backend to 1
** (generate:18692): DEBUG: 03:51:19.153: Generating output files..
** (generate:18692): DEBUG: 03:51:19.153: NetworkManager: definition ens18 is not for us (backend 1)
** (generate:18692): DEBUG: 03:51:19.153: NetworkManager: definition ens19 is not for us (backend 1)
DEBUG:netplan generated networkd configuration exists, restarting networkd
DEBUG:no netplan generated NM configuration exists
DEBUG:ens18 not found in {}
DEBUG:ens19 not found in {'ens18': {'addresses': ['1.2.3.4/32'], 'gateway4': '1.2.3.254', 'dhcp4': False, 'dhcp6': False, 'nameservers': {'search': ['domain.tld'], 'addresses': ['1.2.3.4']}, 'routes': [{'to': '1.2.3.254/32', 'via': '0.0.0.0', 'scope': 'link'}]}}
DEBUG:Merged config:
network:
  bonds: {}
  bridges: {}
  ethernets:
    ens18:
      addresses:
      - 1.2.3.4/32
      dhcp4: false
      dhcp6: false
      gateway4: 1.2.3.254
      nameservers:
        addresses:
        - 1.2.3.4
        search:
        - domain.tld
      routes:
      - scope: link
        to: 1.2.3.254/32
        via: 0.0.0.0
    ens19:
      dhcp4: true
      dhcp6: false
  vlans: {}
  wifis: {}

DEBUG:Skipping non-physical interface: lo
DEBUG:device ens18 operstate is up, not changing
DEBUG:device ens19 operstate is up, not changing
DEBUG:{}
DEBUG:netplan triggering .link rules for lo
DEBUG:netplan triggering .link rules for ens18
DEBUG:netplan triggering .link rules for ens19

Same problem after rebooting

root@web:~# ip addr show dev ens19
3: ens19: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 12:87:10:bf:35:c5 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.3/8 brd 10.255.255.255 scope global dynamic ens19
       valid_lft 602786sec preferred_lft 602786sec
    inet6 fe80::1087:10ff:febf:35c5/64 scope link
       valid_lft forever preferred_lft forever

root@web:~# ip route show dev ens19
10.0.0.0/8 proto kernel scope link src 10.0.0.3

Please add this configuration:

network:
    renderer: networkd
    ethernets:
        ens18:
            addresses: [1.2.3.4/24]
            gateway4: 1.2.3.254
            dhcp4: no
            dhcp6: no
            nameservers:
                    search: [domain.tld]
                    addresses: [123.456.789.101]
            routes:
            - to: 1.2.3.254/32
              via: 0.0.0.0
              scope: link
        ens19:
            dhcp4: true
            dhcp6: no
    version: 2

and no need to reboot just

sudo netplan --debug apply

Please paste the output of this

I was having the same issue until I created the file 99-disable-network-config.cfg in the  /etc/cloud/cloud.cfg.d/ directory.  The contents of that file is below.
network: {config: disabled}

That command disables the cloud-init's network configuration capabilities, as per the comment section in the 50-cloud-init.yaml file located in the /etc/netplan/ directory.
My configuration now survives multiple reboots.


Can I uninstall & replace Firefox with another browser of my choice? I don't like the Firefox Web browser, and I prefer to use something else.

How can I remove it and use a browser of my choice?

There can be some packages that depend on (or recommend) a browser, in the form of a virtual package (firefox provides the virtual packages www-browser, iceweasel and gnome-www-browser) or through an alternative (some package depends on firefox | chromium-browser).

To solve your problem you can use aptitude that provides more choices to as to proceed. The package aptitude is not installed by default, so you need to install it

sudo apt-get install aptitude

then you can do

aptitude --simulate remove firefox

and see what it suggests. This is what it says on my system

enzotib@laptop:$ aptitude --simulate remove firefox
The following packages will be REMOVED:
  firefox
0 packages upgraded, 0 newly installed, 1 to remove and 19 not upgraded.
Need to get 0 B of archives. After unpacking 30.6 MB will be freed.
The following packages have unmet dependencies:
  icedtea-plugin: Depends: firefox (>= 4.0~b7) but it is not going to be installed. or
                           chromium-browser but it is not going to be installed. or
                           epiphany-browser but it is not going to be installed. or
                           midori but it is not going to be installed.
  firefox-globalmenu: Depends: firefox (= 5.0+build1+nobinonly-0ubuntu0.11.04.2) but it is not going to be installed.
  firefox-gnome-support: Depends: firefox but it is not going to be installed.
The following actions will resolve these dependencies:

      Remove the following packages:
1)      firefox-globalmenu
2)      firefox-gnome-support
3)      icedtea-plugin
4)      icedtea6-plugin

      Leave the following dependencies unresolved:
5)      totem-mozilla recommends epiphany-browser | www-browser
6)      ubuntu-desktop recommends firefox
7)      ubuntu-desktop recommends firefox-gnome-support
8)      moonlight-plugin-mozilla recommends firefox | abrowser | iceweasel | xulrunner-1.9.2
9)      ubuntu-restricted-addons recommends icedtea6-plugin
10)     xul-ext-ubufox recommends firefox (>= 4.0~b6) | abrowser (>= 4.0~b6)
11)     mozilla-libreoffice recommends iceweasel | firefox | iceape-browser | konqueror-nsplugins

Accept this solution? [Y/n/q/?]

This way you can see removing firefox what packages breaks. If you choose n, another possible solution is suggested, ans so on.

When you have a best understanding of the problem, and you have selected your way, run aptitude without the --simulate option.

I was having this trouble myself.  Uninstall sun-java first then uninstall firefox and chromium/epiphany.


Screen Flickering and Interference after Waking up Laptop Here's a link to a short video of what's happening:
Screen interference
Probably about half the time I wake my laptop up after it has gone into suspension, my screen starts going crazy. The search bar flickers on and off, and if I have a web browser open it jitters around and keeps resizing the content. The only way to make it stop is to physically power cycle the machine. If I even just do a restart, it sometimes keeps happening.
I never had this problem on Ubuntu 14.4, it's only been after I switched to 16.4.
I'm using a Lenovo U530 laptop and Ubuntu 16.4. Any help would be appreciated! Thanks.

Just enter below commands it will became proper

dpkg --configure -a
sudo apt-get update && sudo apt-get upgrade
reboot


How to install a GUI on the windows 10 store Ubuntu APP? I'd like to install Lubuntu GUI on my Ubuntu app, that I downloaded from the MS Windows Store app.
After installing WSL (Windows Subsystem for Linux) I got a 'server version'-like version running (terminal only).
I tried to install 'lubuntu-desktop', tasksel, and everything seems to install, but it can't start the desktop (probably waiting for a reboot).
sudo service start sddm (which usually boots into GUI), gets me this:
 * Starting Init script for Simple Desktop Display Manager sddm   [ OK ]

startx gets me this:
xauth:  file /root/.Xauthority does not exist

config/udev: failed to bind the udev monitor
[config] failed to pre-init udev

X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.15.0-115-generic x86_64 Ubuntu
Current Operating System: Linux LAPTOP-M1HKAT00 4.4.0-19041-Microsoft #488-Microsoft Mon Sep 01 13:43:00 PST 2020 x86_64
Kernel command line: BOOT_IMAGE=/kernel init=/init
Build Date: 04 September 2020  01:34:27PM
xorg-server 2:1.20.8-2ubuntu2.4 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.38.4
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri Oct  9 05:59:38 2020
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) xf86OpenConsole: Switching VT failed
(EE)
(EE)
Please consult the The X.Org Foundation support
     at http://wiki.x.org

lspci also doesn't work:
    pcilib: Cannot open /proc/bus/pci
    lspci: Cannot find any working access method.

try install Windows 10 build 21364 or above, and then  wsl --update

there's many desktop environments available and you can choose any you want, the following commands will help you install gnome environment.
sudo apt-get update
sudo apt-get install gnome gnome-session

at the same time, on your windows install Xming X Server,
after installing run XLaunch from your start menu in windows and select fullscreen mode, make sure display number is set to 0, after that, keep pressing Next button, till end.
after installing gnome in linux and run following command
DISPLAY=:0 XDG_SESSION_TYPE=x11 gnome-session

Your ubuntu with gnome window should appear.


Download entire Ubuntu One folders from the web client? Since U1's being axed and the desktop client can't connect, how should I about downloading large numbers of files in nested folders from the web client?

I'd prefer to not install Chrome.

use firefox, flashgot and uget, or any download manager that you like that is capable of handling large files, pausing and resuming, never use the built in download manager of any browser, it will damage your files


build wine 32bit from source on ubuntu 12.04 64bit I'm trying to build wine from source.
apt-get build-dep wine installed some dependency packages. When running the configure script, following error occurs:

checking for X... no
configure: error: X 32-bit development files not found. Wine will be built
without X support, which probably isn't what you want. You will need
to install 32-bit development packages of Xlib/Xfree86 at the very least.
Use the --without-x option if you really want this.

Where can I find the 32bit development packages of Xlib/Xfree86 on 12.04 64bit?

To pass this error, you need to install X11 library development headers, for instance:

sudo apt-get install libx11-dev:i386

However when configuring wine, it won't solve the problem completely, as you'll get another error about FreeType 32-bit development files not found which would be more challenging (unless configuring --without-freetype).

So the easiest way is either to install wine binary package or build 32-bit wine on 64-bit machine using LXC (Linux Containers) as described in here.

You can download the source code using apt-get source wine1.*. Then cd to the folder, apply packages, and use dpgk to pack everything up again, which makes it compile as well. Then you turn it into a .deb and install.

Something like this:

sudo apt-get build-dep wine1.3
apt-get source wine1.3
cd wine1.3-*
patch -p1 < foo.patch
dpkg-buildpackage -rfakeroot
cd ..
sudo dpkg -i wine1.3*.deb


How do I set environment variables? I'm trying to set up Apache Tomcat on my pc, and it wants me to set up an environment variable for CATALINA_HOME.  Does any know how to do this?

In bash you can set variables like this:

export CATALINA_HOME=/opt/catalina

most other shells follow this convention, but not all. You can set it permanently in ~/.profile for bash (and as before, other shells have other locations)

https://help.ubuntu.com/community/EnvironmentVariables
Where to declare environment variables?

After going through Ubuntu Documentation on Environment Variables, I came up with following workaround:

##Save & run the following in a shell script,

export ENVIRON_VAR_NAME = Value
# any other initializations like
export PATH=$PWD:$PATH
bash

The last line creates a child shell, which inherits Environment Variable values from parent shell (which have just been set).


How to assign a UUID to a hard drive? I have a clean install of Ubuntu 16.04 on an Acer Aspire VN7-792G that has a 128GB SSD and a 1TB HDD. The laptop was preinstalled with Windows 10, which I removed using the diskpart utility and clean (for the SSD) or clean all (for the HDD) commands.

The HDD can be found from the terminal with the fdisk -l command, but is not shown on the Launcher or in the "computer" window.

I'm guessing that the first stage to correcting this is to assign the HDD (disk /dev/sdb) a UUID, as it does not currently appear to have one.

fdisk -l and blkid results:

(Click image to enlarge)

Linux systems don't mount hard drives, they mount filesystems that live inside partitions or logical volumes on those drives.

In the case of ext2/ext3/ext4 filesystems, you can change the UUID using the tune2fs command. From man tune2fs:

-U UUID
       Set the universally unique identifier (UUID) of  the  filesystem
       to UUID.  The format of the UUID is a series of hex digits sepa‐
       rated          by          hyphens,          like          this:
       "c1b9d5a2-f162-11cf-9ece-0020afc76f16".   The UUID parameter may
       also be one of the following:

             clear  clear the filesystem UUID

             random generate a new randomly-generated UUID

             time   generate a new time-based UUID

       The UUID may be used by  mount(8),  fsck(8),  and  /etc/fstab(5)
       (and possibly others) by specifying UUID=uuid instead of a block
       special device name like /dev/hda1.

There may be equivalent commands for other filesystems.

However, based on your fdisk output, it looks like /dev/sdb is a bare unformatted disk that simply has no recognizable partition(s) or filesystem(s) defined on it.

UUID can't be assigned manually, as far as I know.  It's generated algorithmically during a format, to ensure it's globally unique, and being able to change it to an arbitrary value would allow duplications.

Editing /etc/fstab can tell the OS to automatically mount a drive during startup.  This preferably uses UUID to identify the drive.  The existing UUID can be found with blkid or by looking in a partition editor (gparted or equivalent).

If the HDD doesn't show in blkid or in a partition manager, check that the data and power cables are connected to the drive, and motherboard as appropriate.


Kill all processes linked to a port Kill all processes on port 3000.
This is what is tried:

ubuntu@111:~/chatapp$ sudo netstat -peanut|grep 3000
tcp6       0      0 :::3000                 :::*                    LISTEN      0          632007      18200/node
ubuntu@111:~/chatapp$ sudo kill 18200
ubuntu@111:~/chatapp$ sudo netstat -peanut|grep 3000
tcp6       0      0 :::3000                 :::*                    LISTEN      0          632207      18349/node
ubuntu@111:~/chatapp$ sudo killall node
ubuntu@111:~/chatapp$ sudo netstat -peanut|grep 3000
tcp6       0      0 :::3000                 :::*                    LISTEN      0          632364      18414/node
ubuntu@111:~/chatapp$

You can use following command to get only pid:

sudo netstat -peanut | grep 3000 | awk '{ print $9 }' | sed 's:/[^/]*$::' | grep -Eo '[0-9]{1,5}'

awk command gets the 9-th field.

sed command gets the pid before forward slash.

And grep command returns only numbers to eliminate extra lines.

Here you can simply have a loop and kill processes.

use killport

killport can be downloaded from here using this:

wget https://raw.githubusercontent.com/abdennour/miscs.sh/master/killport

sh killport 3000

Other way can be using this:

sudo kill -9 3000


How to remove Pantheon DE from Ubuntu 16.04? Can anyone help me remove elementary-desktop? I installed it in my Ubuntu 16.04 LTS x64 system. I already did the "solution" from this question:
How to completely remove Elementary-Desktop from Ubuntu 14.04
and also

sudo apt-get purge elementary-desktop elementary-icon-theme elementary-theme elementary-default-settings

still no luck. I also did

sudo apt-get autoclean elementary-desktop

still didn't do the job. It's still in my system, "elementary OS Desktop" is written in my bar, plus it could still be selected during login.

Btw, I just followed the installation here: How do you install Pantheon on Ubuntu 16.04?

You used dist-upgrade to install Elementary DE. By doing so, you installed PPA provided versions of packages over standard Ubuntu versions. For example, if Ubuntu provides a nautilus package, and those PPAs provide another nautilus package with higher version, you installed that one.

That's why only removing extra elementary packages such as elementary-desktop, elementary-icon-themes is not sufficient. You have to remove those patched packages too!

So, to completely remove elementary effect, you must go back to Ubuntu versions of packages. To do so, you need ppa-purge. Because only (as a tool to do these things) ppa-purge downgrade packages from PPA versions to Ubuntu versions.

Use these (Change the list according to your usage of PPAs)

sudo ppa-purge ppa:elementary-os/daily
sudo ppa-purge ppa:elementary-os/os-patches
sudo ppa-purge ppa:elementary-os/testing
sudo ppa-purge ppa:mpstark/elementary-tweaks-daily
sudo ppa-purge ppa:elementary-os/stable

To completely get rid of elementary things.

If you don't have ppa-purge already installed, install using

sudo apt-get install ppa-purge

Note 1: If you already removed those PPA repository either using sudo apt-add-repository -r or manually editing files, re-add them. Because ppa-purge needs those package list to do the downgrading. After re-adding them, use

sudo apt-get update

command to refresh package index.

Note 2: If you are having an error from ppa-purge saying it can't find aptitude use

sudo apt-get install aptitude

to install it.

Note 3: If ppa-purge fails for some PPAs not being available, remove those PPA entries manually. ppa-purge won't work if every repository doesn't work.

Note 4: If some of PPAs are disabled now (after installing package from them), you have little luck downgrading them automatically. You can identify them and manually downgrade them using synaptic or aptitude. But it's a tedious job.

Note 5: If you still see Elementary session listed on Lightdm, remove pantheon-session package manually.

Notes 6: Remove every extra packages you can identify installed from those PPAs but not available in Ubuntu repositories.

I just did it with

sudo apt-get autoremove --purge elementary-desktop


How to use the Adobe Source Code Pro font? Adobe released an open source font family called "Source Code Pro" (download here, Slashdot article here). How do I install it?

Download the archive from the Source Code Pro homepage. You can do it also using wget: Open a terminal (ctrl-alt-t or press the win key and type "terminal") and type
wget https://github.com/adobe-fonts/source-code-pro/archive/2.030R-ro/1.050R-it.zip

Unzip the archive (you can use Nautilus for that, or use the following command).
unzip 1.050R-it.zip

Locate and ensure your fonts folder exist in your home directory, often in ~/.local/share/fonts folder (either go to home in Nautilus and create a new folder, or type the following from the terminal)
fontpath="${XDG_DATA_HOME:-$HOME/.local/share}"/fonts

mkdir -p $fontpath

If you already have that directory, don't worry.

Move the Open Type fonts (*.otf) to the newly created .fonts directory. In command line, that would be
cp source-code-pro-*-it/OTF/*.otf $fontpath

If you haven't done it yet, open a terminal, and type
fc-cache -f -v

Your font is now ready to use and the applications should be able to see it.
All in one script for those who simply want to copy/paste the answer
#!/bin/bash
set  -euo pipefail
I1FS=$'\n\t'
mkdir -p /tmp/adodefont
cd /tmp/adodefont
wget -q --show-progress -O source-code-pro.zip https://github.com/adobe-fonts/source-code-pro/archive/2.030R-ro/1.050R-it.zip
unzip -q source-code-pro.zip -d source-code-pro
fontpath="${XDG_DATA_HOME:-$HOME/.local/share}"/fonts
mkdir -p $fontpath
cp -v source-code-pro/*/OTF/*.otf $fontpath
fc-cache -f
rm -rf source-code-pro{,.zip}

If you want to install system wide instead of per user, copy the files to /usr/local/share/fonts/ instead of ~/.local/share/fonts/.

Not exactly what the OP is asking for, but this might be easier.

You can install the powerline fonts which include slightly modified versions of a bunch of mono fonts which work with powerline for the prompt and Vim with the vim-airline plugin. It kind of gives you an 'awesome' list of source code mono fonts to try out, including "Source Code Pro". To install all the fonts:

$ git clone https://github.com/powerline/fonts.git --depth=1
$ cd fonts
$ ./install.sh


New version of gnome-initial-setup causes Java problems I just did a minor upgrade, and then I suddenly started having Java Problems.

The stack trace looks like:

java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper
    at java.desktop/java.awt.Toolkit.newAWTError(Toolkit.java:472)
    at java.desktop/java.awt.Toolkit.fallbackToLoadClassForAT(Toolkit.java:488)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
    at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1608)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
    at java.desktop/java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:532)
    at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:613)
    at java.desktop/java.awt.Window.getToolkit(Window.java:1375)
    at java.desktop/java.awt.Window.init(Window.java:518)
    at java.desktop/java.awt.Window.(Window.java:549)
    at java.desktop/java.awt.Frame.(Frame.java:423)
    at java.desktop/java.awt.Frame.(Frame.java:388)
    at java.desktop/javax.swing.JFrame.(JFrame.java:180)
    at rga.hack.SlideShow.(SlideShow.java:293)
    at rga.hack.SlideShow.main(SlideShow.java:674)
Caused by: java.lang.ClassNotFoundException: org.GNOME.Accessibility.AtkWrapper
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:374)
    at java.desktop/java.awt.Toolkit.fallbackToLoadClassForAT(Toolkit.java:485)
    ... 19 more

I have both openjdk-11-jre and openjdk-11-jre-headless installed as well as libatk-wrapper-java and libatk-wrapper-java-jni installed.

The java code I'm using is an old program I wrote myself, but it was working fine until the last update.

I can make the problem go away by commenting out the line in /etc/java-11-openjdk/accessibility.properites, but I suspect that there is a broken dependency in one of the packages I recently installed.

The following packages were installed in the update:

Upgraded the following packages:
accountsservice (0.6.45-1ubuntu1) to 0.6.45-1ubuntu1pop2
console-setup (1.178ubuntu2.3) to 1.178ubuntu2.6
console-setup-linux (1.178ubuntu2.3) to 1.178ubuntu2.6
gir1.2-accountsservice-1.0 (0.6.45-1ubuntu1) to 0.6.45-1ubuntu1pop2
gnome-initial-setup (3.28.0-2ubuntu6.16.04.1) to 3.28.0-2ubuntu6.16.04.2system76.1
keyboard-configuration (1.178ubuntu2.3) to 1.178ubuntu2.6
libaccountsservice0 (0.6.45-1ubuntu1) to 0.6.45-1ubuntu1pop2
palemoon (27.9.4~binaryrepack-1) to 28.0.0~repack-3

As the error is gnome related, I'm blaming the gnome-initial-setup package, but I'm wondering if anybody knows more about this than I do.

There is a known bug with the openjdk atk wrapper, so it's not really a gnome problem. The openjdk bug says it was introduced in openjdk9, though a google search shows it as early as openjdk8. The bug has been closed, with a external classification, requiring the ATK to be re-engineered as a service.

The workarounds are either comment out the assistive technology line in the accessibility properties file, as you stated, or add the wrapper to the classpath

export CLASSPATH=/usr/share/java/java-atk-wrapper.jar

The openjdk bug reference is https://bugs.openjdk.java.net/browse/JDK-8204862