Power management for wireless unable to turn off in Xubunu 15.04 Vivid

Check the file /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf if the system uses NetworkManager.  It contains wifi.powersave = 3.  This configuration file came after 14.04 LTS.

To switch off the WLAN power save do:

Create a new configuration file with

sudo nano /etc/NetworkManager/conf.d/system-wifi-powersave.conf

Put the following code in the file

# File to be placed under /etc/NetworkManager/conf.d
# File name lexically later than 'default…'
[connection]
# Values for wifi.powersave are
# 0 (use default), 1 (ignore/don't touch), 2 (disable) or 3 (enable).
wifi.powersave = 2

Save the file with CTRL+O, leave nano with CTRL+X, reboot with sudo reboot now and check with iwconfig.

Further hints

The name of the new file is important. It needs to be later in the alphabet than default-wifi-powersave-on.
All WLAN connections are affected by this system-wide change.
Each WLAN connection still can have individual power management settings. See the answer from AHAN in this thread.

Source: NetworkManager WiFi Power Saving


No it is not possible to upgrade from Xubuntu 11.10 to Lubuntu 12.04.

A possible way to get around this would be to install lubuntu-desktop using Synaptic or from the command line.

Either search Synaptic for lubuntu-desktop and mark it for installation or open a terminal and run

sudo apt-get install lubuntu-desktop

You can then get the remove xubuntu command from http://www.psychocats.net/ubuntu/purelxde - check that you use the correct version's command here.

Be aware that any packages you have added to the default could be lost and needed to be reinstalled.

Now you will have lubuntu 11.10 - from here you should be able to upgrade to 12.04 when it is released.

Please make sure you read the release notes for 12.04 prior to upgrading.

As far as seeing any difference practically - I doubt you'd notice much, it really depends on what you use the machine for.


"Text File Busy" when running a simple script on bash

By hitting Ctrl-Z you suspended the cat, therefore the file is still open and being written to "in the background".

I suspect you want Ctrl-D for 'end of file'.

It's true that Ctrl-Z can mean 'EOF', but in this case, because you're in a terminal that supports background tasks, Ctrl-Z means 'suspend'.

Try this link for more information.


How to clean executable using make clean?

Your executable seems to be the file mp1. Add this file to the rm command in the clean target:

clean :
       -rm *.o $(objects) mp1


Using MIDI Fighter Classic as a GIMP controller

The current version of GIMP is 2.10, and you do not need to muck around with configuration files. You can simply add a MIDI controller in the preferences window:

Then enter "alsa" as device name, and enable dumping events:

Then connect your MIDI controller to GIMP's port with aconnect.

If you have started GIMP from a console, you should now see information about all received note-on/-off and controller messages, e.g.:

Received 'MIDI Events' (class 'MIDI')
    controller event 'controller-007 (Controller 007)'
    (value event, value = 0.503937)
    doesn't map to action

Received 'MIDI Events' (class 'MIDI')
    controller event 'note-on-3c (Note 3c on)'
    (value event, value = 0.803150)
    doesn't map to action

Received 'MIDI Events' (class 'MIDI')
    controller event 'note-off-3c (Note 3c off)'
    (value event, value = 0.000000)
    doesn't map to action

Anyway, you don't need to dump events: press "Grab event", and then press the actual key or controller, and the corresponding entry in the Event list will be selected.
You can then use "Edit event" to assign some tool.


How do I switch from my integrated AMD GPU and set my Nvidia GPU as my main GPU?

First, check if you have the GPU.
lspci -k | grep -A 2 -i "VGA"

Then if you have Nvidia's Card, install drivers. Currently, I would recommend 440, but 450 is the latest.
sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
sudo apt-get install nvidia-driver-440

reboot, then run nvidia-settings.
And to chose different profiles:
prime-select query
sudo prime-select nvidia


Ubuntu 13.04 has a bottom taskbar - how can I get rid of it?

I'm assuming that you are using GNOME given the tag.

Right-click on the "task bar", select delete this panel, click delete.


Why do I get internet connection without a defined interface?

Interfaces are started automatically during the boot process. This is for for example eth0 for the first ethernet

The entries for lo (loopback) are generally required and may also when using the Network Manager can not be removed or other graphical configuration tool.

Generally, /etc/network/interfaces  contains   network   interface   configuration
information  for the ifup and ifdown commands.  This is where you configure how your system is connected to the network.

Unless you manually configured /etc/network/interfaces with

iface <Interface> <Protocoll> <Method>

Your interface gets DHCP and connects you to the network.

These two entries:

auto lo
iface lo inet loopback

are fundamental components of Linux. If these entry's are gone, interfaces can no longer communicate with each other.

Read More about network interface configuration.

Finally, I guess your VM gets a bridge interface from your host. You can list all your interfaces running ifconfig -a and you can see which interface connecting you to the internet.


Use previous users already present in Linux Home directory

Make sure that the uid and gid of the new accounts you made match the uid and gid in the old /home directories.  E.g. looking at /etc/passwd will give you the uid and gid in the third and fourth fields, respectively.  An 'ls -la /home' will give you the uid and gid recorded in the file system.

If these do not match, you will need to do 'chown -R uid:gid /home/user' where uid and gid are the values from /etc/passwd.  You will also need to make sure that 'user' in /home/user matches the value in /etc/passwd.  You can change that value, if needed, with 'usermod'.


Grub background messed after installing a new Graphics card

Determine Resolution to Use

First determine the video resolution you are able to use. Go to the grub menu and enter c to get a "grub" prompt. Then enter:

set pager=more
vbeinfo

and copy down the resolution you want to use. I suggest that you use the preferred mode listed at the end,
if any.

You could also use xrandr to find your current mode. xrandr lists all modes and highlights the one in use.

will list your resolutions and highlight the one you are using.

Alter Grub Configuration

In the video Cako found yooyoomine suggests the following steps:

gksu gedit /etc/default/grub

Look for the line containing # GRUB_GFXMODE=800x600

Edit the line, removing the initial "#" so it is no longer a comment, and change the resolution to the one you picked above. Save the file when done.

Now enter:

gksu gedit /etc/grub.d/00_header

search for the following fragment (about half way down the file):

    cat << EOF
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT_PATH}"` ; then
  set gfxmode=${GRUB_GFXMODE}

----->

  load_video
  insmod gfxterm
EOF

Where the line is enter the line:

set gfxpayload=keep

and save this file.

Then run:

sudo update-grub

Then boot and test. If this disallows the normal use of grub you will have to either boot without seeing the menu, or use an Ubuntu Live CD, to unmake the changes.


How to create a right-click keyboard shortcut?

The easiest way is to install xdotool, with which you can a.o. simulate key (combinations) and mouseclicks.

sudo apt-get install xdotool

then open System Settings > Keyboard > Shortcuts > Custom Shortcuts, set a key combination you like, and make it run the command:

xdotool click 3


MIDI keyboard along with accompaniment qsynth

This is NOT a qsynth or audio driver setting. All the channels were correctly configured. This is a configurable MIDI setting on the keyboard to allow/disallow auto-accompaniment. On my keyboard, it was disabled by default.


How to download LibreOffice from the main server?

Assuming you need the latest version (6.1.4) for Ubuntu (.deb) in English, This link is what I get by going to their download page and selecting "manually select a mirror". At the bottom of the list is also a direct download link.


ubuntu 32bit 13.04 iso image for virtual box

You can download the 13.04 32bit version from this link:

http://releases.ubuntu.com/13.04/ubuntu-13.04-desktop-i386.iso


BIOS
Aspire E5-771G-0884
You have BIOS v1.15.
There's a newer BIOS available which may solve your problem. It's v1.23, and can be downloaded here.
Note: Confirm that I have the correct web page for your model #.
Note: Have good backups before updating the BIOS.


Ubuntu 16 freezing and restarting session

I have the same problem and have been looking around and found this thread
LibreOffice 5.1.6.2 crashes ubuntu 16.04 (64-bit)

Based on that I just tried this

sudo apt remove xserver-xorg-core-hwe-16.04 xserver-xorg-input-all-hwe-16.04 linux-generic-hwe-16.04 xserver-xorg-video-all-hwe-16.04

Then:

sudo apt install xserver-xorg-core

And finally:

sudo apt install ubuntu-desktop xserver-xorg xserver-xorg-video-all xserver-xorg-input-all

So far, so good. I haven't had any more crashes since I did this. But it's only been a few days. Will feel better after a week with no more crashes.


how to delete files on ntfs drive while operating UBUNTU

Good morning, Mr. @nanopilot.
My the best can be use a Hiren's Boot CD, a Live Linux, or Live PE Windows to restore partition (maybe MBR is corrupted or was deleted). For me this solution allways works.
I don't recommend use dual boot with cross plataforms. You can use 2 HDDs, each with a different plataform OS: one with linux SO, other with Windows and so you change SO at boot's machine. You can use VMs too.
Have a nice day.


LibreOffice Writer opens on top of document

I found this answer:

"The cursor position is saved if you fill in the personal information(first and last name are enough). Go to Tools, Options, User Data.

When the user is identified, LibreOffice will open the document where the user left off. This makes sense because a different user opening the same document will probably want to start from the beginning. If there is no user identification LibreOffice assumes it is a new user and always opens from the beginning."


Install of Ubuntu 10.4 LTS on Dell Laptop

When the grub command prompt is shown, the grub config seems to be incorrect. You now could either try to boot manually by using the grub shell or you could boot into a rescue system and repair the grub config.

Please view this page for more information:
http://www.linuxjournal.com/article/4622?page=0,1

This sounds a little bit like a /dev/sda vs. /dev/hda problem..


This is a recurring kernel bug related to nouveau driver

To see if this is this cause, get the GRUB menu at boot time by pressing shift or maybe esc repeatedly immediately after switching the machine on. When the menu appears, press the e key to get the GRUB editor.

Move the cursor to the line that starts with linux and to the end of the line. Append nouveau.modeset=0, then press F10 to continue to boot.

Log in to your user session, then try to reboot the computer to see if the problem is gone.

If the problem is gone, you can make the change permanent by passing this kernel boot parameter every time, by editing GRUB's config file:

sudo nano /etc/default/grub

Append nouveau.modeset=0 after the other words inside the quotes at the end of the line

GRUB_CMDLINE_LINUX_DEFAULT="..."

Then to make the change effective, run

sudo update-grub

Related to NMI watchdog: BUG: soft lockup - CPU#2 stuck for 23s! [nvidia-smi:566]


How to set which output sound an application should use

Well found the answer after searching about pulseaudio,alsamixer and a whole bunch of other stuff. This will only work if you are using the speakers and headphones on different audio devices (Like the speakers connected to the Motherboard sound system and the headphones are connected via USB). Basically this is the road I took:

Install the PulseAudio Volume Control

sudo apt-get install pavucontrol

Open Dash and type "pulseaudio" and then open the PulseAudio Volume Control

On the Playback Tab and you should see all the current applications using the sound system (If not then at the bottom of that Tab, there is the option to show all applications). Select the application you wish to change and select which output device to use for that specific application.

With this setup, the sound from my music player goes out to the speaker system and the sound from Steam goes to my USB headphones. This would actually be a nice option to have directly in the sound system.

In my case I have:

One USB Headphone (Connection is via USB so it counts as 1 external output sound device)
Inboard sound system on motherboard (Everything connected to it counts as the same external sound device, so if a headphone is connected to it, this answer will not work since it will be seen as part of the inboard sound system and not a completely separate external output).
HDMI connection (HDMI connections offer Video, Audio and Networking all in one, so it counts as another output sound device).

This is why this answer would work for me, but not for anybody that connects all devices to the same sound device as mentioned in the comment by Takkat's research.


Use xrandr - a useful guide on setting up a resolution can be found here.

Unfortunately, a lot of people have trouble making the commands permanent, so that they run on startup, but I'll show you how to do it the easy way:

Create a bash script, xrandr.sh for example, and place your xrandr commands into it. It should look something like this #!/bin/bash
xrandr --newmode "1920x1200_60.00"  193.16  1920 2048 2256 2592  1200 1201 1204 1242  -HSync +Vsync
xrandr --addmode VGA1 1920x1200_60.00
xrandr --output VGA1 --mode 1920x1200_60.00
Make the script executable with chmod +x xrandr.sh
Search for "Startup Applications" in the dash, run it, and add the script as a startup application.

The commands will now run every time you log into your account.

OR you can go the easy way and use a program that does the above for you -  ResolutionX.


I advise against doing what you're asking to do, particularly in light of your comment in response to the question of why you want to make this change:

  Just don't care about it.

If you don't care about it, then the saying "if it ain't broke, don't fix it" applies. Absent a compelling reason to do so, switching from EFI-mode to BIOS-mode booting offers no benefits, but poses several drawbacks, including:

Risk -- Such a conversion runs the risk of creating new problems you're not experiencing now. These risks include damage to installed files and the possibility that you'll end up with an unbootable (or even completely trashed) system.
Time -- It will take time to perform such a conversion. You'd probably be better off doing something else.
Slower boot -- Although this isn't universally true, EFI-mode booting is usually slightly faster than BIOS-mode booting.
Reduced functionality -- You might not care about it, but booting in EFI mode provides you with some minor features that BIOS-mode booting does not provide. Most importantly, you can install multiple boot loaders and change which one is active with a single command. EFI boot variables and access to EFI system calls provide the potential to do more, although these features have yet to provide significant benefits in Ubuntu.
Lack of Secure Boot -- This much-maligned feature actually provides some modest benefits because it can prevent pre-boot malware from running. To be sure, not all EFI-based computers support Secure Boot, but just about any desktop or laptop computer that shipped with Windows 8 or later does.
Complications to current and future multi-boot configurations -- If you're currently multi-booting with other OS(es), switching from EFI-mode to BIOS-mode booting requires converting all your OSes. (Well, there are ways to boot different OSes in different modes, but they're tedious.) If you're currently booting only Ubuntu, enabling the Compatibility Support Module (CSM) in the firmware, which is required to boot in BIOS mode, makes it more likely that you'll run into problems when installing new OSes. See my page on this topic for all the gory details.

To be sure, there are scenarios in which switching to BIOS-mode booting makes sense. You, however, have provided no such compelling reason; you "just don't care about it," to repeat your words. Given the preceding list of drawbacks to such a conversion, "just don't care about it" does not qualify as a compelling reason to take the risks and accept the drawbacks of switching to BIOS-mode booting.

If you insist on ignoring my advice, you can do the conversion. In brief, you must enable your computer's CSM and install a BIOS-mode boot loader for Linux. The most common of these is the BIOS-mode version of GRUB. The Boot Repair tool will do this in a semi-automated way; however, you must boot the OS used to run Boot Repair in BIOS/CSM/legacy mode, and this in turn requires either luck or that you understand how to control the boot mode. See my page on the CSM, referenced earlier, for information on this topic. If you use GRUB, you should also create a BIOS Boot Partition on your disk (it probably does not exist now).


It sounds like there is a much easier way to achieve what you would like to do.

Open Nautilus
Right Click on a Folder
Click on Properties
Click on the Folder Icon Button (yes it's really a button!)
Browse to the image you would like to replace it with

/usr/share/pixmaps

are where most of the standard icons are stored

Select the image you would like to use

(see the images below)

On a side note. Never try to edit the gconf files by hand in the XML it's completely unnecessary and very easy to nuke your entire desktop/gnome configuration.
Instead use the GUI(Graphical User Interface) tool gconf-editor. Ubuntu-Key (Super) then type in gconf and choose the Configuration Editor. It works very similar to the Windows(R)(tm)(c) registry editor (gasp).

For your third question on File Permissions you can right-click in Nautilus, Choose Properties and change the permissions under the Permissions tab.
Or you can change the permissions on the command line using the chmod command
see this Ubuntu Help document on File Permissions
https://help.ubuntu.com/community/FilePermissions


What happens if my LCD desktop monitor is detected as a 'Laptop'?

This is a minor bug which does not affect the operation of your monitor or system in any way. It should hopefully be fixed via an update in the near future.


Can I remove 'read' access over user home folders and all website folders under /var/www without breaking anything big?

If you look into /home/, the individual home directories should have 0750 permissions already.
Regardless, you should be safe to lock the folders down as described without any issues.  I'm forgetting which user/group nginx runs as (I think www-data?) but make sure that its user and/or group has read/execute access on /var/www/


How to install Nvidia -375.39 drivers in Ubuntu 14.04..Error displayed as "X server currently running"

You need to stop lightdm to install Nvidia drivers.

sudo service lightdm stop

But this will stop the whole desktop. So do the following steps.

Press Ctrl+Alt+F1 to go to non-GUI mode. Enter your username and password.
Stop lightdm with the above command.
Now you can install Nvidia drivers and install CUDA.
Once you finished installing it. Restart your computer

shutdown now

Now turn on your computer like you normally do.

You will be back with GUI.


You can also run this command from the terminal.  Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

umount /path/to/usb/drive/


18.04: kubuntu: KDE: Power consumption is extremely high: Slowdown?

Yep, as it came out to be, disabling effects in system settings and disallowing auto-start of compositor is not enough and it actually had close to no effect!

The true culprit is KDE's File Search feature! Disable it and you are done:


Uncaught exception 'PDOException' with message 'could not find driver'

I’ve never used Symfony but it looks like you’re missing the SQLite driver for the PDO (PHP Database Objects) extension.

This is provided by the php5-sqlite package which can be installed by running:

sudo apt-get install php5-sqlite


How do I disable "Restore Previous Session" in Mozilla Firefox?

Following steps will be helpful to prevent firefox from restoring previous sessions.

In the Location bar, type about:config and press Enter.
The about:config "This might void your warranty!" warning page may appear. Click I'll be careful, I promise! to continue to the about:config page.
In the Search box at the top, type browser.sessionstore.resume_from_crash.
In the resulting grid, double-click on browser.sessionstore.resume_from_crash to set it to false.

Thanks,
Ankit


12.04 backlight issue for Acer Aspire 5734z-4725 running on usb flash drive

fist off buy a hard drive............

secondly i have the same issue with my emachines e525 ( acer )

heres what google magic found for me. i dont know if it works... it makes no sense to me but i thought id drop it here b4 i go try.

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

I wont be back so good luck lol


Firefox or Ubuntu browsers not connecting to WiFi but WiFi connected OK

I had this issue, wifi connected but browser isn't accessing network.  I solved it by changing the router wireless mode from b,g,n to just g,n.

Be real, be sober.


How to get the PID of a recently started process in Bash

There are various ways:

Let the script write its pid itself. Include line echo $$ > /tmp/my.pid in your script.
Use pidof script_name
Use ps -ef | grep script_name | tr -s ' ' | cut -d ' ' -f2


Will there be something like Apple's Quicklook included by default?

Short answer: Yes, you will have to install it manually.

Long answer: There is already a thumbnailing (preview-like) feature for Nautilus. Gloobus seems like a good project, but can be obstructive (especially for new users) when you want to open a file with its designated editor/viewer/whatever. It just seems superfluous to me.


Installation stuck at xubuntu ubiquity: Setting up grub-efi-amd64-signed - how can I overcome this?

If you can find a log file with more details (check under /root; you'll need to use sudo to do so), that may give you some clues.

Beyond that, you can manually install any EFI boot loader you like. The easiest to install are likely to be GRUB 2 from Ubuntu's repository (but your problem indicates this might not be so easy) and rEFInd. In the case of rEFInd, it's likely to be easiest to start with the USB flash drive or CD-R image. If you can boot to Linux using that, then installing the Debian-package version should get rEFInd working as your default boot manager.

A variant on the GRUB 2 installation option is to run Boot Repair. This will install a fresh copy of GRUB on the computer, so it's essentially another way to re-install GRUB.


Simple screen recorder and whatsapp web video format

You can with below configs.

Container MP4
Video -> Codec: H.264


How do I install gcc 6 (latest 6.1?) on Ubuntu 14.04 LTS, make c++14 the default and will my libraries work?

You can add a repository that contains the latest GCC and then simply install it via sudo apt install gcc (I've provided a link).  Alternatively, you can build the latest GCC from source (this is just an example, read the README and INSTALL file):

$> # download the latest gcc tar file and extract
$> ./configure
$> make
$> sudo make altinstall

Ramifications

If you're just playing around with a system and/or Ubuntu is running in a VM (Virtualbox, VMWare, QEMU, etc) then the side effects are negligible and you probably won't care.  However if you're on some sort of production server that "needs to always work" than you might run into issues that require a certain version of GCC.  In this case, you should make an alternative install (ie. make altinstall) when building from source or use a verified package.

Links

Install GCC 6 on Xenial
Install latest gcc on Ubuntu (this is old, but has a good example of how to build from source)


The issue was with my Internet Service Provider.
The problem is that I tried using Google DNS and OpenDNS but it didn't work and I ruled out ISP issues.
Even using other DNS' my ISP (GVT-Brasil) still pointed Google sites to its problematic IPs.
But in the end I was able to fix using another DNS provider (GigaDNS) so it was indeed an ISP issue.


I've realized that this was happening because of a typo I made when manually editing my xfce keyboard shortcuts file.

Specifically, the file ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml used the modifier Meta5 (which doesn't exist) instead of Mod5 to modify the p key.

I did note that no errors were recorded in ~/.xsession-errors, despite the fact that xfce seems to register things there.

It may be useful to some people to note that one of my reasons for editing the file was in order to make the same shortcuts work with or without the Keyboard Layouts applet being loaded.  Depending on whether or not that applet is loaded, the "windows" key will register as either <Super> or <Mod5>.


How to remove or uninstall a Unity scope

Just remove the package unity-scope-shotwell, for example using

sudo apt-get purge unity-scope-shotwell

and then log in again.


Copy a word from the html file of a web page using shell script

You don't need a shell script. Probably the following compound command is what you need:

curl -s webpage | grep -Po 'password:\K\w+'

For example, the case of this page works:

curl -s http://askubuntu.com/questions/537416/copy-a-word-from-the-html-file-of-a-web-page-using-shell-script | grep -Po 'password:\K\w+'


Unable to mount a partition of external 3TB hard drive..GPT warning

Many USB enclosures and USB/ATA adapters can't handle disks with more than 2^32 sectors. This works out to 2TiB, so disks larger than that often fail on such enclosures and adapters. If this is your problem, the only solution is to use the disk internally or via another adapter/enclosure -- perhaps an eSATA one rather than a USB one. (I've even heard of one enclosure that has both USB and eSATA connectors but that works differently depending on how it's connected -- a design that's sure to cause hair-pulling!)

If you need more help, post the exact error message you get when you try to access the failing partition, ideally from the command line. Also, post details about your enclosure or adapter -- its type (USB, FireWire, USB, eSATA, etc.), brand, model, etc.


Android Studio lists device as "???????????????? [null]"

If you're developing on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. For a list of vendor IDs, see USB Vendor IDs, below. To set up device detection on Ubuntu Linux: Log in as root and create this file:

/etc/udev/rules.d/51-android.rules

Use this format to add each vendor to the file:

SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"

In this example, the vendor ID is for HTC (to get your vendor ID use lsusb command with connected device). The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node. Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules.

Now execute:

chmod a+r /etc/udev/rules.d/51-android.rules

The full solution is here.


Are efforts to run Ubuntu on the Nexus 7 dead? (Not including Ubuntu Touch)

For sure it's not dead but of course since the Ubuntu Touch Developer Preview came out the focus is clearly on that.

I spoke to one of the core developers and he told me that Ubuntu on Nexus 7 will be slowly migrated towards the "Ubuntu on Tablets" and "Ubuntu on Phones" and this might be part of the solution "switching to the PC interface when docked with a monitor and a keyboard".


Based on this question, execute the following commands:

mv ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libgcc_s.so.1{,.disable}
mv ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6{,.disable}

The idea is that Steam uses it's own dynamic libraries but Ubuntu comes with some new ones, or something like that, any way it works!

NOTE: If you're just installing Steam for the first time, you will need to run the commands a second time after the initial update. This will take a lonnnnnnng time!

UPDATE:

If you use 16.10, the guys from Ubuntu provided a modified installer that takes care of this issues. I would recommend to install Steam from the Ubuntu repositories


You need sudo permission to edit that file.

Try this instead:

echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope

To verify the change, run the following command:

cat /proc/sys/kernel/yama/ptrace_scope

It should reply

0

see here for some related info


Ivy Bridge graphics not working (core i5 HD 2500)

To solve this problem:

1) Do a fresh install of Ubuntu 12.04, boot installer with the nomodeset option so you don't get a black screen during the install.

2) On first boot add nomodeset to the GRUB boot line, so you don't get a black screen while running for the first time.

3) Log in, open a terminal (ctrl-alt-T), and add Timo Aaltonen's patched hybrid xorg:

sudo add-apt-repository ppa:tjaalton/ppa
sudo apt-get update
sudo apt-get dist-upgrade

4) reboot.  You shouldn't need nomodeset anymore.

Now it's working at 1080p. Now I have a problem with my terrible TV doing overscan on HDMI, but I'm happy with that for now.


IS RadeonDriver support for ubuntu 16.04

No. There's currently no fglrx or because the latest Ubuntu release dropped amd's propietary drivers support.

Also, if you have an APU (Accelerated Processor Unit), those AMD's apus with Turbocore you must stay away from installing Ubuntu 16.04. The actual drivers don't support boost processor states so your proc's performance will be limited to its common limits with the open source drivers.
TL;DR: Don't install Ubuntu 16.04. If you want to use Linux, then go with nvidia and intel.


Yes,you can be able to cleanoff Ubuntu and install Windows.

How to remove Ubuntu and put Windows back on?


Thunderbird - remove unused dictionaries from menu

The solution I found is delete unused dictionaries from /usr/share/myspell/dicts.

*.dic and *.aff files, and leave only the three languages I use: en-US.dic, en-US.aff, es.dic, es-ES.dic, es-ES.aff.

Backup the whole directory before delete anything.


How to update Ubuntu 14.04 from BIOS to UEFI?

Your mother board very likely supports a "Legacy" (BIOS) mode.  When you get the new motherboard, configure it to use Legacy boot instead of EFI.  It should then 'just work'.  (There are many motherboards that support both, and you can tell them which to use primarily)


I changed the time from 5 minutes to "do not suspend" then changed it back.  Now it works.


Any file executed once when system starts up

cron can be of help here.

Besides starting something on a minute,hour,day of week, month etc it also has some special operations:

@reboot Run once, at startup.
@yearly Run once a year, "0 0 1 1 *".
@annually (same as @yearly)
@monthly Run once a month, "0 0 1 * *".
@weekly Run once a week, "0 0 * * 0".
@daily Run once a day, "0 0 * * *".
@midnight (same as @daily)
@hourly Run once an hour, "0 * * * *".

Editing is done from command line with the following command:

sudo crontab -e

at the bottom of the file (below the # m h  dom mon dow   command) you can add a line that executes what you want like so @reboot /directory/to/file will execute /directory/to/file during boot.

Just one warning: you need to make sure that there is no output from that script or that the output is redirected to a file (or /dev/null) since there is no display for cron to send the output (and it will end the operation).

Example
sudo crontab -e

# For more information see the manual pages of crontab(5) and cron(8)
#
PATH=/usr/sbin:/usr/bin:/sbin:/bin
# m h  dom mon dow   command
@reboot /usr/bin/testscript

and...

cd /usr/bin/
sudo vi testscript
echo "works" >/tmp/testing
chmod 775 testscript

Now for a reboot...
And here is a working example:

ls -l /tmp/testing
-rw-r--r-- 1 root root 6 2011-05-29 08:34 /tmp/testing
rinzwind@discworld:/tmp$ more /tmp/testing
works


How to install mpeg4 and h264 in ubuntu offline?

For offline installing, you can just download .deb files and then install them via this command :

sudo dpkg -i YOURPACKAGE.deb

And I guess that the ubuntu-restricted-extras and the ffmpeg packages are enough for playing mpeg4 and h264 codecs. So you can download them from this launchpad link and Ubunutu package link :

download ubuntu-restricted-extras package from here

(You should choose package depends on your operating system version and architecture for example I'm using Ubuntu 17.04 64bit , So I'm choosing ubuntu-restricted-extras_65_amd64.deb from The Zesty Zapus tab.)

download ffmpeg packages from here

And then you can install them with this commands (if .deb file has been downloaded to Downloads folder):

cd ~/Downloads
sudo dpkg -i ubuntu-restricted-extras_65_amd64.deb
sudo dpkg -i ffmpeg_packages.deb

(Also ffmpeg's depends must be installed.)


Getting "System program problem detected" pops up regularly after upgrade

Open a terminal (Ctrl+Alt+T) and type:

sudo rm /var/crash/*

Then hit Enter.

This will remove any old crashes, that might still be reported (in error). After a reboot/re-starting, any further pop-ups still need to be investigated.


Open the terminal and type:
sudo apt update
sudo apt install php7.0 php7.0-cli php7.0-common php7.0-json composer

In the folder above your project root:
composer create-project codeigniter4/appstarter project-root

The command above will create a project-root folder.
Whenever there is a new release, then from the terminal in your project root:
composer update


Wifi Problem After Setting Static IP in Ubuntu 18.04.01 LTS

I had a similar problem with assigning a static IP address to my WiFi interface rendered with networkd using Netplan. For me the main factor was that I had set the wrong password. Make sure that the access point exists, along with the correctly stated password. I blindly defined a no-existing access point before rebooting the system that set a static IP address when rendered with networkd believing it didn't matter. After the reboot, the WiFi no longer worked.
I'm not sure whether or not this is a bug, but trying to assign a static IP address for the WiFi interface rendered with NetworkManager did not apply my static IP address to my interface, even when viewed and defined visibly in the NetworkManager GUI (current bug report has been created). I relied on netplan YAML configuration rendered with networkd with proper credentials to avoid this problem. This worked as intended, but my system relied on a USB dongle for direct Ethernet connection as a backup network interface. After my Netplan settings were applied, I could not have any contact with my Ethernet interface connection. By default, NetworkManager is the default service for Ubuntu 18.04 Desktop, which manages network interfaces normally through the GUI. From my Netplan configuration, I explicitly stated configurations for my WiFi interface, but networkd did not automatically assign settings for new interfaces when detected on the system. I created a YAML configuration adapted from this SO post to set all interfaces first with NetworkManager and then specified my WiFi interface to render with networkd for the static address assignment:
network:
  version: 2
  renderer: NetworkManager
  wifis:
    renderer: networkd
    wlp1s0:
      addresses: [192.168.1.231/24]
      dhcp4: no
      dhcp6: no
      gateway4: 192.168.1.1
      nameservers:
        addresses: [192.168.1.1]
      access-points:
        accesspointename:
          password: passwordgoeshere

After a reboot I had an established connection with my static WiFi interface and ethernet interface was functioning as intended.
In case you would rather not reboot the entire system, and/or if the intended access point to connect to is different than what is already connected via NetworkManager or nmcli you can run the following commands in order to restart the services after applying netplan:
sudo netplan apply; sudo systemctl daemon-reload; sudo systemctl stop NetworkManager; sudo systemctl restart systemd-networkd.service; sudo systemctl restart NetworkManager


Upstart doesn't produce any log on Ubuntu Raring

I've posted an answer to a similar question: https://askubuntu.com/a/490900/297973. Long story short, the messages should show up in dmesg, and you may need to add $KLogPermitNonKernelFacility on to rsyslogd's config to see them in /var/log.


Free Ubuntu to Windows 8.1 Remote Desktop for Small Business

Assuming both machines are in the same network

you could easily open an RDP session from your Ubuntu host to control the Microsoft machine using remmina.

Remmina project page


Overwriting Ubuntu 11.04 with 14.04 LTS while keeping windows 7

Open up a terminal from the Live USB and type

blkid

This will show you partition info. Here's the output on mine:

/dev/sda1: LABEL="System Reserved" UUID="<removed>" TYPE="ntfs" PARTUUID="<removed>"
/dev/sda2: UUID="<removed>" TYPE="ntfs" PARTUUID="<removed>"
/dev/sda3: UUID="<removed>" TYPE="ntfs" PARTUUID="<removed>"
/dev/sda4: UUID="<removed>" TYPE="ext4" PARTUUID="<removed>"

NTFS partitions are Windows'. See which partition are Ubuntu's and install.


Download and install ubuntu packages and dependencies on a server without internet connection

Lan Morrison has made an isorespin.sh script that will make an image from commands you give and with an added command can have all the updates to that time on the image and install any apt install you want on the install image it makes. I used it and it works real good.

For more details, see: Customizing Ubuntu ISOs: Documentation and examples of how to use isorespin.sh.


Try using the pkill command:

pkill --full /usr/lib/R/bin/exec/R

From the pkill man page:

pkill will send the specified signal (by default SIGTERM) to each process.

[...]

      -f, --full
        The pattern is normally only matched against the process name.
        When -f is set, the full command line is
        used.


Pipe password argument to mount shell command

It seems, mount via /etc/fstab always wants to read the password interactively from the terminal device and there is no solution to pipe it via standard input.
Here is a workaround making use of GNOME Keyring/secret-tool and the sudo -S option to pass the password via stdin.

Store the password in the keyring:

secret-tool store --label='share app credentials' share app
# then input your password

Mount the share

secret-tool lookup share app | sudo -S mount -t cifs \
 -o username=bela,password=$(secret-tool lookup share app),vers=3.11,uid=bela \
 //share/app ~/local/share/app
# share := attribute, app := value

The caveat is, we have to use mount with elevated priviledges. The local sudo credentials are assumed to be equal to the remote share server credentials.


strange space width on Eclipse4.11, Ubuntu 18.04.2 LTS

I resoved this problem by changing "Java Editor Text Font" on Eclipse preferences.


How can I reliably check which is the last time an Ubuntu machine has been connected to the internet?

Method 1

Even though NetworkManager.conf allows logging, that apparently still goes into syslog. However, kern.log also has it.

grep 'associated' /var/log/kern.log | tail -n1
Jun 21 17:08:25 anaconda kernel: [ 4910.819781] wlan1: associated

Method 2

I've found that NetworkManager does store last connection time, and it is sorted in /var/lib/NetworkManager/timestamps file, in the unix epoch time format (seconds since 1970). Mine looks like this for instance:

$ cat /var/lib/NetworkManager/timestamps
[timestamps]
c562ac2d-8911-4273-b165-ed1495b28c9a=1432777079
46cfcdd9-d095-418f-acd6-0a7ca282bb9a=0
d81fb3d0-1717-42c0-903d-4622c2381597=1434895707
b0bdefe6-df88-49bb-83d8-154dd21d77d9=1433093286

To show the latest entry

date --date=@"$( awk -F'=' 'BEGIN {var=0}{if(var<$2) var=$2;} END{print var}' /var/lib/NetworkManager/timestamps )"

Awk will search for largest epoch time (in other words latest), and date will convert it to human readable form.

I suspect also that this file (/var/lib/NetworkManager/timestamps) is used by Edit Connections graphical menu to display last time of connection

The problem is that if you're still connected to an access point, the GUI way keeps showing now not, the time when connection was established last


Python ImportError after reinstallation of nautilus

As you noted, the problem is brought by the fact that you have two Python 2.7 installed in two different locations.

Specifically, it seems that Python 2.7.3 (from Ubuntu) is using modules from Python 2.7.5 (locally installed). Why this is happening is hard to tell without more information.

What I would do is removing Python 2.7.5: if you did not install anything else in /usr/local, then you can remove its content.


How to launch default web browser from the terminal?

sensible-browser is the command you're looking for.


"[drm:intel_dp_complete_link_train] *ERROR* failed to train DP, aborting"

I found the answer - the file was inside linux-source-3.13.0.tar.bz2 which comes in package linux-source-3.13.0. I filed a request to include this in the Ubuntu kernel at:

https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1403275


Ubuntu 13.10 - Standby after waking up from hibernate

I had the same issue on a laptop with Ubuntu 14.04.

A few seconds after waking up from hibernation, it complained about weak battery and went on standby.

It looks like it has been fixed since I installed the "laptop-mode-tools" package.

Hope this helps


How to get an encfs mount on the Unity launcher?

I have no idea for the launcher but I use the Ubuntu AppIndicator CryptFolder-Indicator.

You can find an introduction at http://www.webupd8.org/2011/06/cryptfolder-indicator-ubuntu.html.

Cheers


Blue "gap" behind the Unity launcher button?

If you are referring to the blue thing, it is a part of Unity in 11.04, and I don't think you can disable it (at least I don't remember being able to; I'm on 11.10 now). It only appears when an application requires your attention.


How do I easily rename multiple files using command line?

I use rename all the time.  It is pretty simple, but hopefully you know basic regex:

rename "s/SEARCH/REPLACE/g"  *

This will replace the string SEARCH with REPLACE in every file (that is, *).  The /g means global, so if you had a SEARCH_SEARCH.jpg, it would be renamed REPLACE_REPLACE.jpg. If you didn't have /g, it would have only done substitution once, and thus now named REPLACE_SEARCH.jpg.  If you want case-insensitive, add /i (that would be, /gi or /ig at the end).

With regular expressions, you can do lots more.

Note that this rename is the prename (aka Perl rename) command, which supports complete Perl regular expressions. There is another rename which uses patterns, and is not as powerful. prename used to be installed by default on Ubuntu (along with Perl), but now you may have to do:

sudo apt install rename

Here are a few examples:

Prefix

Add:

rename 's/^/MyPrefix_/' *

document.pdf renamed to MyPrefix_document.pdf

Remove:

Also you can remove unwanted strings.  Let's say you had 20 MP3 files named like CD RIP 01 Song.mp3 and you wanted to remove the "CD RIP" part, and you wanted to remove that from all of them with one command.

rename 's/^CD RIP //' *

CD RIP 01 Song.mp3 to 01 Song.mp3

Notice the extra space in '^CD RIP ', without the space all files would have a space as the first character of the file.  Also note, this will work without the ^ character, but would match CD RIP  in any part of the filename.  The ^ guarantees it only removes the characters if they are the beginning of the file.

Suffix

Add:

rename 's/$/_MySuffix/' *

document.pdf renamed to document.pdf_MySuffix

Change:

rename 's/\.pdf$/.doc/' *

will change Something.pdf into Something.doc. (The reason for the backslash is, . is a wildcard character in regexp so .pdf matches qPDF whereas \.pdf only matches the exact string .pdf. Also very important to note, if you are not familiar with BASH, you must put backslashes in SINGLE quotes!  You may not omit quotes or use double quotes, or bash will try to translate them.  To bash \. and "\." equals .. (But double-quotes and backslashes are used, for example "\n" for a newline, but since "\." isn't a valid back escape sequence, it translates into .)

Actually, you can even enclose the parts of the string in quotes instead of the whole: 's/Search/Replace/g' is the same as s/'Search'/'Replace'/g and s/Search/Replace/g to BASH. You just have to be careful about special characters (and spaces).

I suggest using the -n option when you are not positive you have the correct regular expressions. It shows what would be renamed, then exits without doing it. For example:

rename -n s/'One'/'Two'/g *

This will list all changes it would have made, had you not put the -n flag there.  If it looks good, press Up to go back, then erase the -n and press Enter (or replace it with -v to output all changes it makes).

Note: Ubuntu versions above 17.04 don't ship with rename by default, however it's still available in the repositories. Use sudo apt install rename to install it


An already encrypted home? Then you can use the regular "run at login" methods but using sudo, like:

Just put the commands in ~/.profile
See How to run a command at login?
Use a .desktop file in ~/.config/autostart
See How do I start applications automatically on login?


Is a Firewall really necessary these days?

Yes, more than ever. The internet hasn't changed a lot, since the old days. So a firewall is still a necessity these days. A firewall like gufw, with basic rules works. Use iptables, if you are a CLI geek ;)


A random number from 0 to 0.05:

rand=$(bc <<< "scale=2; $(printf '0.%02d' $(( $RANDOM % 100))) / 2")


How to pre-configure (configure defaults for new users) KDE?

You can always go the "long way". Create a dummy user, login into kde, configure it as you like and then:

Copy the entire ~/.kde (or ~/.kde4, I don't have access to a KDE machine now to check)
directory to a common place;
When you add a user to the system, copy in its home the .kde dir you previously saved;
When you are confident it works, make a script to do it automatically.

EDIT

As per comment below i've already done this in the past, both across users and machines. IIRC was one of the early KDE 4.X releases, it's been a while so maybe something have changed. It even worked for application specific configurations like amarok and kopete.
To be honest, I never tried the /etc/skel thing (which I know it's there for this exact reason, to have a default set of dotfiles for new user accounts) but maybe (don't really know!) doesn't work too good with directory trees? Manually copying the .kde dir has worked for me, though.


ModuleNotFoundError: No module named 'kivy' . How do I fix this error?

Short answer: Don't use anaconda if you don't know what you're doing.

Long answer: you are using a python installation (anaconda) which exists alongside the system python installation. If you install a system python package, or, in the case of kivy, a package that is made for the system python, it is probably not seen by anaconda.

In order to use it you have to either install the package the way anaconda wants it (beyond the scope of this site), or you have to start the system python interpreter, which is /usr/bin/python.

On the Kivy homepage you find instructions on how to install using virtual environments (https://kivy.org/docs/installation/installation-linux.html#installation-in-a-virtual-environment), I recommend this method if you are not using the standard system python installation.


What makes Checkinstall packages not suitable for distribution?

Packages created by checkinstall often don't meet the standards for packages. This may cause problems if you distribute a package to other people. But there's nothing wrong if you use them on multiple of your own systems if they work for you.

For example packages created by checkinstall usually don't contain dependency information so they may not work until you manually install some additional packages.

Some files may be placed in a wrong location, have a wrong name or reference files with a wrong location or wrong name. They may for example not work with they way Debian and Ubuntu handle the Apache configuration or the system startup without some additional work.


I've experienced the same issue, and looking for another mirror solves this issue

from /etc/apt/sources.list edit this part

http://dell.archive.canonical.com/updates/dists/xenial-dell/InRelease

Replace "dell.archive.canonical.com" with another mirror with the same purpose or packages you needed it to if it has.


Grep -v doesn't work when piping with locate

Actually grep -v PATTERN returns all the lines that do not contain PATTERN, that's why it is giving you an empty output.
The following may work for you:
locate -br '^test.sh$' | xargs dirname


Is there a plugin for eclipse that packages .deb files for an existing project?

There is no plugin that does this.  This is because Eclipse has never been made for that purpose, and therefore does not include all the particulars of Ubuntu Packaging.  Any plugin that might do this would be sketchy at best, and would probably screw up the package in a manner that violates Debian packaging.

(Ubuntu is based off of Debian, and uses Debian .deb package formats :P)


Is it possible to install the core apps on unity-next?

You should indeed be able to install them from the Core Apps PPA, in the same way you can install them either on a device or on a desktop running the current Unity version.

You can install them in one go with the following command:

sudo add-apt-repository ppa:ubuntu-touch-coreapps-drivers/daily
sudo apt-get update
sudo apt-get install ubuntu-calculator-app ubuntu-calendar-app ubuntu-clock-app ubuntu-docviewer-app ubuntu-emailclient-app ubuntu-facebook-app ubuntu-filemanager-app ubuntu-rssreader-app ubuntu-terminal-app ubuntu-weather-app ubuntu-youtube-app


How can I use Command /Script to show last week images in same folder or to move those weekly basis images to another folder?

There's a command called find which can help to identify the files, and even move them to another location.

To find .jpg files that are older than 7 days, and list the names of the files:

find /path/to/images -name "*.jpg" -mtime +6

The -mtime part of the command looks for files based on the number afterwards in days, +6 means older than 7 days due to the way -mtime rounds non full days down. More info on that is listed in this answer.

If you'd like more information on the files use find's -ls option like so:

find /path/to/images -name "*.jpg" -mtime +6 -ls

Once you're happy that these are the files you'd like to move, the following command will take care of that, just remember to change '/path/to/images' and '/path/to/external_drive' for the correct values. Using absolute paths is recommended.

find /path/to/images -name "*.jpg" -mtime +6 -execdir mv "{}" /path/to/external_drive "{}" \;

If there are sub-directories in your image directory that you don't want to search, you can restrict directory recursion with --max-depth 1 put this option after '*.jpg' separated by a space.


/opt is owned by root(admin user), you would need to change the owner to you, or just use the sudo command.

to change ownership use chown

sudo chown username:username /opt

but it would probally be esier for you to use the command with sudo precceed to it

sudo tar xvfz xampp-linux-1.7.7.tar.gz -C /opt

nautilus allows to change ownership as well, but youll need to use nautilus as root

gksudo nautilus /

then right click on opt go to properties, then go to the permissions tab, and change as neccessary

changing file permsioons can also be done with chmod

for any more information with these commands, try using the man manual pages
by using man followed by the command, you can also use the info command  as well.


Is there a way to disable the hardware on/off switch for the Wireless interface?

No, you cannot.  To sort of disable it you can phsically block or remove the hardware switch.  There is no way to override the hardware disable button if rfkill shows hard blocked that is feasible for most people.

When you unblock it, if it gets stuck in some inconsistent state your best bet is to:
sudo modprobe -r iwl3945 && sudo modprobe iwl3945
I have an hpdv7 and the wireless a)uses the same driver and b)hardware toggle works for me.


If you consider your terminal a file manager ... ffprobe will display media bit rates

ffprobe "LarryLessig_2014-480p.mp4"

... output

ffprobe version N-79477-g3a72760 Copyright (c) 2007-2016 the FFmpeg developers
  built with gcc 5.3.1 (Ubuntu 5.3.1-14ubuntu2) 20160413
  configuration: --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-shared --enable-openssl
  libavutil      55. 22.100 / 55. 22.100
  libavcodec     57. 34.102 / 57. 34.102
  libavformat    57. 34.101 / 57. 34.101
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 43.100 /  6. 43.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x834ee0] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'LarryLessig_2014-480p.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isom
    creation_time   : 2014-03-31 19:32:01
    podcast         : 1
    media_type      : 0
    title           : TED: Larry Lessig (2014)
    artist          : TED
    date            : 2014
    album           : TEDTalks
    comment         : To learn more about this speaker, find other TEDTalks, and subscribe to this Podcast series, visit www.TED.com
                    : Feedback: contact@ted.com
    genre           : Podcast
    category        : Higher Education
  Duration: 00:13:44.19, start: 0.000000, bitrate: 1034 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 854x480 [SAR 1280:1281 DAR 16:9], 852 kb/s, 24 fps, 24 tbr, 24 tbn (default)
    Metadata:
      creation_time   : 2013-03-14 19:16:08
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 76 kb/s (default)
    Metadata:
      creation_time   : 2014-03-31 19:32:01
      handler_name    : GPAC ISO Audio Handler
    Stream #0:2: Video: png, rgb24(pc), 3000x3000, 90k tbr, 90k tbn

its part of the ffmpeg family of tools

apt-get install ffmpeg


The standard way to send an email from a shell script is the mail command, which is provided by the bsd-mailx package. To use it, you do something like:

echo 'This is the message.' | mail -s 'Subject line here' recipient@example.com

For more control, the standard way is the sendmail command. The mail command is actually just a wrapper that calls sendmail with a correctly formatted email.

The sendmail command is the standard Unix interface to the mail transport agent (MTA) on a Unix system. Traditionally, all Unix systems have one. But since they generally need configuring, neither Ubuntu desktop nor server install one by default. So you need to install an MTA yourself.

Postfix and Exim are probably the two most popular MTAs right now. Both are packaged well and work fairly easily out of the box. But they're full featured. They can be configured minimally, and the package helps you do this automatically, but the documentation you'll find online will generally assume that you have full MTA functionality configured (eg. mailboxes for incoming email and so forth).

If you just want to send outbound email, then nullmailer is a good choice. It is a minimal MTA designed to provide the standard sendmail interface so everything up the stack will work fine, except it sends mail out only.

Postfix, Exim are all in main, so are well supported in Ubuntu. nullmailer is in universe, so is community supported only.

So to summarise:

Select and install an MTA. If just for outbound mail from shell scripts, then nullmailer is a good choice.
Install the bsd-mailx package and then use mail to send email from your shell script.


Maybe it is an error when you create your bootable USB. Open Rufus, press alt+e and enable UEFI and Legacy (BIOS).

You asked for other software to make the bootable USB, try Lili.


Why isn't Empathy notifications any longer accessible via HUD in 12.10?

It's a regression. You can find the bug report on Launchpad.


how to resolve all symlinks in a directory?

Use readlink.

$ readlink /etc/alternatives/editor
/usr/bin/vim.basic

and wrap it in a shell script walking over the symbolic links in the directory.

You can find symbolic links using find:

$ find . -type l

A more complete example:

#!/bin/bash

find . -maxdepth 1 -type l | while read LINE; do
echo link: $LINE resolved: `readlink $LINE`
done

outputs

link: ./.remmina resolved: sparkleshare-homedir/remmina
link: ./project resolved: Documents/2011-2 Project/
link: ./.ssh resolved: sparkleshare-homedir/ssh


Why am I getting the Apache2 Ubuntu Default Page instead of my own index.html page?

Try the following

Enable verbose logs

sudo nano /etc/apache2/apache2.conf

Locate the LogLevel variable, and update it from the default warn to info or debug. debug will produce the greatest amount of output.

# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel debug

Restart Apache

sudo service apache2 restart

Apache includes a nice little syntax checking tool

apache2ctl -t

Checking Virtual Host Definitions

apache2ctl -S


You've probably got a bug in the Intel video driver. You may want to update your Xorg from the Xorg crack pushers repository. It helped me.


Installing Ubuntu on a portable SSD. What could go wrong?

Legacy or UEFI SSD boot
You may want to create a SSD that boots on both Legacy and UEFI computers. The instructions at this link will help you do that:
Easy Full Install USB that Boots both BIOS and UEFI
Otherwise follow the advice on Paddy's answer.


Intel graphics causes "speckles" on screen

Created an /etc/xorg.conf file and added the following option to the Device section after reading man intel
Option "AccelMethod" "uxa"

This has removed the speckling artifacts, though I'm still having some GL render issues - that's a different problem.

Editors Addition
OP filed a bug report and this description is from that thread

Ok it looks like the two issues are distinct.

Speckling disappears by changing the kernel module's acceleration method to UXA, but is unaffected by any of the Mesa version changes

GL rendering artifacts clear up on reverting to Mesa 9.0.3 ( and reappear after 9.1 ) but are unaffected by the kernel module's acceleration method.


How can I create a command with arguments and a configuration file?

Since you mention python, a python answer:

if you simply want to set a default value for an argument, you can simply set the default for the function:

def show(val = 30):
    print(val)
# to print the default value (30)
show()
# to show another value (e.g. 40)
show(40)

In other words, this will print the default value if you give no argument, while it uses the argument if you give it.

More advanced; reading the default values from a file, with the option to overrule by giving the arguments

The very same can be done, but reading default arguments from a file. This will give the opportunity to set arguments in a settings file instead of editing them in the code itself.

Let's say I have a settings file, testconf.txt:

length:4
height:7
width:6

...and I want to read these values into my application as default arguments, but the user can overrule them by custom arguments:

#!/usr/bin/env python3
import sys

# path to my config file
conf_file = "/home/jacob/Bureaublad/testconf.txt"
# read the default arguments from a file
def_args = [l.strip() for l in open(conf_file).readlines()]
# replace default args by possible custom args
cust_args = sys.argv[1:]
for cu in cust_args:
    argname = cu.split(":")[0]
    try:
        match = [arg for arg in def_args if arg.startswith(argname)][0]
    except IndexError:
        print("incorrect argument: ", cu)
    else:
        def_args[def_args.index(match)] = cu

def get_arg(s):
    return [val.split(":")[1] for val in def_args if val.startswith(s)][0]

l = get_arg("length")
w = get_arg("width")
h = get_arg("height")

print("l=", l, "w=", w, "h=", h)

Now I can run the script without arguments:

$ '/home/jacob/Bureaublad/pscript_4.py'
l= 4 w= 6 h= 7

Or width arguments:

$ '/home/jacob/Bureaublad/pscript_4.py' length:10 height:456
l= 10 w= 6 h= 456

The order of given arguments is in this setup irrelevant. In case of an incorrect argument:

$ '/home/jacob/Bureaublad/pscript_4.py' monkey
incorrect argument:  monkey
l= 4 w= 6 h= 7

Note

In "real" software, you can (and should) make it more advanced of course by adding a warning if the settings file is incorrect or missing, decide what to do then, but this is the basic idea.

EDIT

From your comments, I understand that in two ways, the above answer is not (yet) what you are looking for:

You'd like to run the command without the path to the executable (script), and its extension, and
You'd like to have a more "conventional" format of the options.

Although [1] is anwered elsewhere already, I'll include a brief explanation here:

1. Run the command without path and extension

You can run executables and scripts without having to include the path to the script by making it executable (chmod +x <files>), and place them anywhere in $PATH.

On Linux, the extension (.py) does not play a role whatsoever, so you can use the script without extension anyway.

To be concrete:

create, if it doesn't exist yet, the directory ~/bin
create and save the script, exactly as mentioned in the original answer, as showsize (no extenion) in ~/bin, and make the script executable.

After a log out/in, you can simply run the script by the command:

showsize

2. Change the format of the options

As mentioned, you can change the format of the options easily, e.g.: To parse out the options, given like:

-l 23 -h 210 -w 321

If you include in the script:

args = sys.argv[1:]

The result for argswill be a list:

["-l", "23", "-h", "210", "-w", "321"]

Now what we need to do to get the value of -h, is simply look up the index of -h, and pick the first next item in the list:

height = args[args.index("-h")+1]
print(height)

> 210

in a script:

#!/usr/bin/env python3
import sys

# path to my config file
conf_file = "/home/jacob/Bureaublad/testconf.txt"
# read the default arguments from a file
def_args = [l.strip().split(":") for l in open(conf_file).readlines()]
# replace default args by possible custom args
cust_args = sys.argv[1:]
for carg in cust_args:
    if carg in ["-l", "-h", "-w"]:
        for d in def_args:
            d[1] = cust_args[cust_args.index(carg)+1] if d[0] == carg else d[1]

def get_arg(s):
    # fetch values from the list
    return [val[1] for val in def_args if val[0] == s][0]

l = get_arg("-l")
w = get_arg("-w")
h = get_arg("-h")

print("length =", l, "\nwidth =", w, "\nheight =", h)

How to use

Create your settings file in the format:

-l:4
-h:7
-w:6

Copy the script into an empty file, svae it as showsize (no extension) in ~/bin or anywhere else in $PATH, and make it executable.
In the head section of the script, set the path to the settings file:

# path to my config file
conf_file = "/home/jacob/Bureaublad/testconf.txt"

Now run the command:

$ showsize
length = 4
width = 6
height = 7

Or:

$ showsize -l 300 -h 345 -w 751
length = 300
width = 751
height = 345


automatically starting crashplan backup when a usb harddisc is connected

No,

the CrashPlan client does not offer this basic level of functionality. I had a similar problem and I can confirm that it is not possible, according to tech support at CrashPlan. They are either unable or unwilling to support it, instead referring paying customers to the forums for help. Here is the email I sent explaining a very similar situation, along with their response:

Me

  Crashplan, May 22 09:49 am (CDT):

  Ubuntu Linux 12.04 64-bit, fresh install.
  Root filesystem '/' is on a small SSD
  Home filesystem '/home' is on a large HDD
  Backup drive is on a third HDD.
  First drive automatically mounts at BOOT, next two drives automatically mount at LOGIN.
  CrashPlan starts at boot, before I login, so it creates a directory in the small Root drive, which quickly fills up. I need to clear all those files out, and then set CrashPlan to wait for the HDDs to mount before it writes any files to backup.

Crashplan's response

  Jason S., May 23 11:17 am (CDT):

  Hello,

  Unfortunately, CrashPlan is specifically designed to launch at
  startup, at the runlevel that it is assigned. While it may be possible
  to disable that functionality and cause it to start manually, that's
  not something I would be able to assist with as it is not a supported
  configuration.

  Here is a link to the forums:

  https://crashplan.zendesk.com/forums/

  Our user base has come up with means to assist each other with several
  unsupported configurations. I would suggest that you inquire further
  on the forums.

  Let me know if there is anything else I can help you with.

  ~Jason

I was quite surprised to see CrashPlan creating a new directory at root, then blindly filling the disk until it created a bigger problem. It's my opinion that the software is poorly written and is not suitable for use until this is corrected. Déjà Dup will check that the destination drive is connected and has space, which is the correct approach. CrashPlan gives no error messages and creates new problems.

I recommend using Déjà Dup combined with Ubuntu One instead. It actually works, and does not create any new problems. It can cost more if you have lots of data to back up, but you get what you pay for.


Can i get notified of, and handle system events (especially curious about wifi being turned off)

First of all:

What you describe as your desired answer is what you actually call: I also don't want to create a script that constantl polls. Inotify also is used in a constant loop to "listen" to changes in the current state. In other words: the other option you assume to exist does not exist without some kind of a loop.

I also think your image of a loop is too heavy. On every system, in every application  there are numerous loops active to wait for triggers. It should have no noticable effect on your resources.

The "anatomy" of such a take-action-on-event mechanism is basically:

in a while loop:

check the current status;
if a is True:
    take action A
if a is False:
    do nothing
wait a few seconds

In a bash script

Integrating this script (to check your connection) in a while loop (with a few minor changes) should do what you describe: re-establish your connection and send a notification.

#!/bin/bash

while :
do
  wget -q --tries=10 --timeout=20 --spider http://google.com
  if [[ $? -eq 0 ]]; then
          :
  else
          rfkill block wifi
          rfkill unblock wifi
          notify-send "connection re-established"
  fi
  sleep 4
done

In a python script

The function check() returns True or False. If True (connection is up), nothing happens. If False, your rfkill block wifi / rfkill ublock wifi is executed.

#!/usr/bin/env python3

import socket
import time
import subprocess

def check():
    try:
        host = socket.gethostbyname("www.google.com")
        s = socket.create_connection((host, 80), 2)
        return True
    except Exception:
        return False

while True:
    if check() == True:
        pass
    else:
        subprocess.call(["/bin/bash", "-c", "rfkill", "block", "wifi"])
        subprocess.call(["/bin/bash", "-c", "rfkill", "unblock", "wifi"])
        subprocess.Popen(["/bin/bash", "-c", "notify-send 'conncection re-established'"])
    time.sleep(4)


Unable to locate package -- when the /file/ is right in the directory (it's a .deb)

Terrance and David:
Thanks for the help. I finally managed to get them installed using:
sudo dpkg --force-depends -i /path/to/package.deb
Some of the command structure is somewhat new to me, which is one reason I goofed. But also I tried everything you pointed out in the answered question, David before I got that one that worked.
It seems U-20 still has some bugs needing worked out.


Skype shows a blank window on the webcam part what could be the problem?

As far as I remember skype has a problem with v4l2 (video for linux 2) and has to use vl41 instead but it doesn't know were it is the solution was to shutdown skype then create a script. In a terminal type or paste

gksudo gedit /usr/local/bin/skype

and add these lines for a 32bit system

#!/bin/bash
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype

or these lines for a 64bit system

#!/bin/bash
LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so /usr/bin/skype

then type or paste this line in the terminal which will make the script executable

sudo chmod a+x /usr/local/bin/skype

after this you can open Skype and check in options/video devices and hit the test button.
this should make it possible to see your own webcam and others in skype.

Hope this helps.


How large should I make root, home, and swap partitions?

You actually should just install ubuntu on two partitions, / and swap. You can have ubuntu do this automatically by choosing to use the available free space (in other words, do not format your 60GB partition in vista before installing ubuntu).

Some will argue that you should use separate partitions for /home, /boot, / and all kinds of things. This is  useful in some situations, but for most common situations you are better off not doing this.  This is because it will fragment your disk in a way that might not be wanted later. Just let ubuntu choose for you and you'll be safe :)

You would often use a separate home in situations where you want to use:

Multiple drives
Multiple mutually exclusive ubuntu installs sharing the same data (could work with varying distros but not advisable to do this with different distros)
Situations where your data needs to be safe in the case of a drive failure/upgrade (most normal installs are safe)
You want it to be easier to reinstall or upgrade the system (just choose not to format the /home partition - please note a backup of important data is highly recommended during any system upgrade)
The same drive is used by different systems.
Your disk does not have enough capacity for both home and system data (e.g. a small SSD)

NB: "Ubuntu's installer offers to preserve the contents of /home, so you don't need to be afraid to lose anything when doing re-installs or upgrades. – htorque"

On another note about swap - if you want to be sure that when doing large tasks you can have a lot of swap space, you can set your swap space to be twice the size of your ram, but either way, ubuntu will handle the requirements rather well if you choose to install on the blank 60GB partition.

You might also want to read up on Swap files instead of Swap partitions.  Again this can help reduce fixed fragmentation of your disk and dynamically allocate space as you need it.  Supposedly, there is no performance loss.
How to increase swap space?


Copy file to same directory with appended filename Via SSH Bash Script

You can do

cp /path/files/file /path/files/file-$(date +%Y%m%d)

To do the same for multiple files e direcories:

timestamp=$(date +%Y%m%d)
for f in /path/files/*; do
    cp -a "$f" "$f-$timestamp"
done


Ubuntu 20.04 crashes and then doesn't detect monitors

Happened to me yesterday (literally). Turns out I only had to install the latest NVIDIA drivers:
sudo apt install nvidia-driver-450

Might not be your case, though


Ubuntu 19.10 - show application's menu choices: e.g. file, edit, etc

Aha! This is a pervasive issue, and not one with an easy fix or explanation. I'll link to this excellent discussion on the topic, and answer my question.

For Ubuntu 18.04, is there a way to show drop-down menus for a certain applications in a menu bar?


Fingerprint login settings not visible in ubuntu 20.04

To begin with, you could try goodix_fp_dump to perform some testing.
Note:
Support for your device appears to be in a grey zone.
Sources:

https://www.dell.com/community/Linux-General/No-driver-for-fingerprint-scanner-Goodix-GF3208-on-Linux/td-p/6242579
https://gitlab.freedesktop.org/libfprint/libfprint/-/issues/43#note_382609
https://gitlab.freedesktop.org/libfprint/libfprint/-/issues/161

Then, you could try with Fingerprint GUI
sudo add-apt-repository ppa:fingerprint/fingerprint-gui
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv EFD5FA852F20733F
sudo apt-get update
sudo apt-get install libbsapi policykit-1-fingerprint-gui fingerprint-gui

Note:
Fingerprint-gui replaces some packages.
Removing it does not restore original packages, which has to be done manually. It is not a serious issue.
If anything else fails, it may be worth trying.

Related:

https://www.addictivetips.com/ubuntu-linux-tips/enable-fingerprint-scanner-support-on-linux/
Ubuntu Fingerprint option not showing up in User settings
https://www.codegrepper.com/code-examples/shell/fingerprint+login+disabled+ubuntu+20.04
fingerprint-gui in 18.04
Using Fingerprint reader in 16.04


The issue could be resolved by isolating the specific input device with xinput.  Disabling one of the two identical PS/2 Generic Mouse devices resolved the whole issue.

In short I entered xinput list, decided on one of the devices (id=18 in my case) and then typed xinput disable 18. That resolved the issue, so I created an item in the Startup Programs list with that code, so that it runs on boot. The issue has not returned since.


No sound from CA0132 (Creative Core3D) again!

Salutations! in terminal run:
amixer -c2 set 'IEC958' mute

this tells alsamixer to
adjust the correct card which is card 2 shown by aplay -l, or is it card 0 ! and you need to mute 'IEC958'

#

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

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


System Settings has two online account icons?

It is not a bug. One is gnome-online accounts and the other one is ubuntu online accounts. Removing one may affect other installed app.


Can't boot ubuntu 14.04 on virtual machine

Go to your tty (Ctrl+Alt+F1).  Then login with your username and password as they are now.

Then type the following:

mv .Xauthority .Xauthority_2016-06-16
sudo service lightgdm restart

and type in your password.

If this still doesn't work, you could

sudo chown -R user:user ~/

...replacing user with your username.

Explanation:

The first command deletes the .Xauthority file, which will be recreated.  It is not infrequent for the .Xauthority to get the permissions messed up, and consequently it will refuse to allow you to log in.  The command with lightgdm is just restarting the window manager.

The second command attempts to change any files in your home directory that belong to a different user to your own user.


How do I get ATI Mobility Radeon HD 5450 + Integrated Intel HD to work?

if your laptop is a mux one (as mine),the only driver working is fglrx 11.8.
I succeed to make it works including switching from intel to ati chipset on ubuntu 10.04.
newer distribution as ubuntu 11.04 and 11.10 aren't supported by this driver version.

If you only need intel, the i915 included in all distribution is sufficient (and use vga_switcheroo to deactivate ati chipset to save battery time...). It's the only solution as now for newer distributions with my hardware.

My Bios is as yours : no switching option (if you have one, you can disable ati card in bios and use newer fglrx version, it's not my case).

If you have a mux one and take a look at Xlog, you should see "fglrx is not supported on A+I Mux platform, please uninstall" with newer ATI drivers (it possibly your blackscreen problem).

Hope this help.


How to get a stable WLAN-connection with a Lenovo x121e?

I finally fixed this problem by compiling and installing the latest drivers from Linux Wireless in Ubuntu 12.04, in my case the "compat-wireless-3.5.1-1-snpc.tar.bz2" package: http://wireless.kernel.org/en/users/Download/stable/

One needs the header files for his kernel and the build-essentials package. I recommend also to run the script "driver-select" with the option rtlwifi before compiling because one doesn't need the other drivers and it reduces building time:

sudo apt-get install linux-headers-$(uname -r) build-essential

tar jvxf compat-wireless-3.5.1-1-snpc.tar.bz2
cd compat-wireless-3.5.1-1-snpc
./scripts/driver-select rtlwifi
make
sudo make install

But the downside is you have to rebuild the driver after every kernel update.

I'm running the driver for two days now with excessive closing and opening the lid and didn't get any disconnects.


Macs create invisible files when connecting to Ubuntu-server via AFP

Make sure invisible dots = no in your afp config. Worked for me.

For Reference:Question about invisible dots ?


Run a wine application fullscreen on a single monitor from dual-monitor setup

There is an easy way to use a windowed mode in Wine:

Start Wine Configuration (winecfg)
Click on the ‘Graphics’ tab
Check ‘Emulate a virtual desktop’
Next to ‘Desktop size’ enter your exact screen resolution.


Deja Dup stopped making scheduled backups

Apparently after a reboot it works again....anyways.


Ubuntu Gnome 17.04 ... brigtness become low befor 10 seconds inactivity

Check your Power settings panel, like so...


It is definitely not related to Ubuntu One. It sounds like you managed to install some malware along with Word.


Mac Book Air runnign Mac OS, Windows8, and Ubuntu

Ubuntu would work, but for Windows 8, you will need Boot Camp. This link should help you with Boot camp for Win8. (http://support.apple.com/kb/HT5628). The hardware itself will handle it. The main concern is Windows, but Boot Camp will fix that. Here is documentation for installing Ubuntu on a Macbook Air (https://help.ubuntu.com/community/MacBookPro).


How to Determine which is your TouchScreen Driver

Bus 003 Device 002: ID 0eef:790a D-WAV Scientific Co., Ltd  is the driver


You are right. All the notes are saved in that folder in Kubuntu. And in Ubuntu, they are saved in ~/.kde/share/apps/basket/baskets.

There is no option to save all the futures notes created in a specific folder.

Alternatively, you can export all the notes that you want to, in any folder or external device. To do that, do a second-click in the note and select Export -> Basket archive...

I have requested this feature sending an email to the developers, but this project seems to be abandoned. Hopefully, some programmers will improve this software so we can have this feature in a future release of basket :)


Intel PRO/Wireless 3945ABG stopped working

I have the same network hardware in my laptop.  It works just fine with the standard driver that came with Ubuntu.  When it stops seeing wireless networks, that usually means I've accidentally toggled the wifi kill switch on the front of my laptop.

I've had occasional problems, through, with earlier versions of Ubuntu.  Sometimes those problems were resolved by unloading and reloading the driver module:

sudo modprobe -r iwl3945
sudo modprobe iwl3945

although I should mention that at one point the unload command used to cause the entire system to freeze.  Caveat emptor.


How do I provide wired connections with internet while leeching off of a wireless network?

That's very easy. I do that all the time. Click the network icon in your panel and open network properties. Select your wired interface and click edit to configure it. In IPv4 Settings, choose Method: Shared with other computers.

That's it. You don't have to do anything on the client (in your case, desktop). Your wireless network is now shared on your wired network. You just have to plug it in :)


Windows saves hibernation data in any NTFS drives you mount, even if you haven't hibernated Windows. The recommendation to fix the issue is to make sure you fully shut down your computer after using Windows, but that doesn't generally work.

Instead, use ntfsfix.

In case it isn't installed:

sudo apt-get install ntfs-3g

Then:

sudo ntfsfix /dev/sda3

That should let you mount it.


How to submit a file to paste.ubuntu.com without graphical interface?

There are many ways, of course, but I start with one which is simple to explain: it just requires some command line magic. I assume that there is internet connection (check it for example with ping -c 5 google.com. Also, I assume that /my/file is the location of file you would like to submit, and JohnDoe is your askubuntu nickname.

The simplest of it all, but you need to install pastebinit first:

sudo apt-get install pastebinit
pastebinit -i /my/file

Submit using curl. For that, curl must be installed.

sudo apt-get install curl
curl -v --data-urlencode "content@/my/filename" -d "poster=JohnDoe" -d "syntax=text" http://paste.ubuntu.com

You will see some output, with one of the lines looking more or less like that:

< Location: http://paste.ubuntu.com/123456789/

This is the link you need to share.
There is a number of text-only web browsers, for example w3m. Run these commands:

sudo apt-get install w3m
w3m http://paste.ubuntu.com

You move around with a cursor. When you come to the text area and press "Enter", w3m will ask you which editor to use; choose nano. Use CtrlR to read in the file.
Your USB sticks still work. Insert an USB stick and type mount to see at what location it has been mounted. Say, you see that it is /media/MyStick. You can copy the file using command line

cp /my/file /media/MyStick


How Can I know which kernel version I am using in Ubuntu 12.04?

Look at the /proc/version file.

cat /proc/version
Look at the contents of the dmesg command.

dmesg | grep Linux
Look in the kernel/source code directories.

ls /boot


sudo add-apt-repository hangs with no error Ubuntu 19.04

Manually adding ppa source and key worked for me
Check answer to this question:
I can't add PPA repository behind the proxy


How to show laptop battery not the mouse battery, when fully charged?

go in to Settings (click the cog)

choose Power

ensure that 'Show battery status in the menu bar' shows anything but 'Never'

this should enable the battery status

when you see the battery indicator you can then right click to choose percentage or icon display of remaining charge.


OS upgrade from Ubuntu Core 15.04 to Ubuntu Core 16.04 support

To upgrade your system from Ubuntu Core 15.04 to Ubuntu Core 16 you will need to contact the manufacturer of the device you are targeting. They will have a migration procedure available.

A 15.04 application snap will not work on Ubuntu Core 16. There are migration guides available to help port it over.


yes, by setting the 'set message_cachedir=/some/dir/' you specify the cache for full mail bodies including attachments. Whether it is available when you are offline depends on whether you downloaded/read the mail before.

Note however that mutt does not allow offline reading. This means that you will have to use some external tools like grep in /some/dir/ to search for a mail and then extract an attachment.

Also note that each mail is a separate file and usually an attachment will be in base64 format, so you will have to extract the attachment from the text file manually and 'base64 -d' to decode it.

The recommended way is to use offlineimap.


telnet refusing traffic on arbitrary port over network in 11.10

That output shows that your program is listening on 127.0.0.1 only. Listening sockets (open ports) are either bound to a specific interface, as in this case, or to all interfaces (in which case you'll see 0.0.0.0 as a notation for 'any address'). The implications of binding to 127.0.0.1 only are that only connections through that interface will go to the listening socket, and hence your program. If you're using python's socket library, either bind to your external IP in the bind() call, or bind to all IPs, something like this:

>>> import socket
>>> s = socket.socket()
>>> s.bind(('', 6666))
>>> s.listen(1)

which gives the result you want from netstat

tcp        0      0 0.0.0.0:6666            0.0.0.0:*               LISTEN

and indeed can be connected to from another machine

ial@roach> telnet polihale 6666
Trying 128.243.20.139...
Connected to polihale.
Escape character is '^]'.


Is there a way to suspend/sleep via bash?

command to suspend is pm-suspend
press pm- and a tab to see other power management commands.
I don't think there will be an option to wake the systems by itself as the os itself is not running. You can have one system dedicated to wake the other systems at a particular time. If you don't want to suspend or hibernate but just minimise use of resources, there are ways to spin down hard disk or switch off monitor alone etc. There is a pm-powersave command too.


there is one mistake in command

bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/davidepatti/noxim/master/other/setup/ubuntu.sh)

in ubnutu.sh file second line is

cp ../config_examples/config.yaml .

it should be

cp ../config_examples/other/config.yaml .

solution :
copy config.yaml from noxim/config_examples/other/ to /noxim/bin/
then go to /noxim/bin/ and run command

./noxim

it will show completion message like

Loading configuration from file config.yaml
Running with default parameters (use '-help' option to see how to override them)
Reset...
 done! Now running for 10000 cycles...
Noxim simulation completed.

if you did some changes while debugging this problem or you are going to install on fresh system then do following steps :
download ubuntu.sh file

wget https://raw.githubusercontent.com/davidepatti/noxim/master/other/setup/ubuntu.sh

open file ubuntu.sh and go to second last line and change it
cp ../config_examples/config.yaml . to   cp ../config_examples/other/config.yaml .  and save it
make it executable using command

chmod +x ubuntu.sh

then run it

./ubuntu.sh


Xubuntu: No password request after suspension

In Xubuntu 12.10, session is no longer locked when you Suspend, so it doesn't ask for a password on wakeup. To solve this, we need to make changes to xfce4-session and xfce4-power-manager.

Using Terminal Commands

Run the following commands in terminal (press Ctrl + Alt + T) to make changes to both xfce4-session and xfce4-power-manager to lock the session when you Suspend:

xfconf-query -c xfce4-session -p /shutdown/LockScreen -s true
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/lock-screen-suspend-hibernate -s true

Alternatively — Using GUI

We need to make changes in both Session and Startup as well as Xfce Power Manager.

You would find both of them to be available under Settings Manager. Right Click on your Desktop and navigate through Applications → Settings → Settings Manager to open it.

Session and Startup

Open Session and Startup → navigate to the Advanced Tab → put a checkmark next to Lock screen before sleep.

Xfce Power Manager

Open Xfce Power Manager → click on Extended in the sidebar → put a checkmark next to Lock screen when going for suspend/hibernate.

Once you have made the changes, you should be asked for the password when you wakeup after Suspend.

Acknowledgement: Information and images for Session and Startup and Xfce Power Manager courtesy this Ubuntu Forums Thread.


Install bind9
Point resolv.conf to 127.0.0.1

To do this follow this steps:

To Install Bind9

Open "Ubuntu Software Center" (Applications->Ubuntu Software Center)
Search for bind9
Check to display "Technical Items"
Mark bind9 and install it

Update /etc/resolv.conf

Open Network Manager (System->Preferences->Network Manager)
Find your connection and edit it (wired or wireless)
Toggle "IPV4 configuration" tab
On "DNS Servers" field write 127.0.0.1

It's done!

To test

Open gnome-terminal (Applications > Accessories > Terminal ) and type

dig ubuntu.com

(if you don't have it, install dnsutils package as explained to bind9)

Check the last answers, as an example:

My first query at ubuntu.com

;; Query time: **209 msec**
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sat Jan 22 12:20:12 2011
;; MSG SIZE  rcvd: 196

My second query:

;; Query time: **0 msec**
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sat Jan 22 12:18:23 2011
;; MSG SIZE  rcvd: 156

The server 127.0.0.1 means that you're resolving locally. Take a look in query time (surrounded by **) , the second one is cached.


How do I configure Juju to use Amazon Web Services (AWS)?

First install Juju:

sudo add-apt-repository ppa:juju/stable
sudo apt-get update && sudo apt-get -y install juju-core

Do a juju generate-config -w to generate a config for AWS that you can customize for your needs. This will create the file ~/.juju/environments.yaml.

Which is a sample environment configured to run with EC2 machines and S3 permanent storage.

To make this environment actually useful, you will need to tell juju about an AWS access key and secret key. To do this, you can either set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables (as usual for other EC2 tools) or you can add access-key and secret-key options to your environments.yaml. These are already in place in the generated config, you just need to uncomment them out. For example:

default: sample
environments:
  sample:
    type: ec2
    access-key: YOUR-ACCESS-KEY-GOES-HERE
    secret-key: YOUR-SECRET-KEY-GOES-HERE
    control-bucket: juju-faefb490d69a41f0a3616a4808e0766b
    admin-secret: 81a1e7429e6847c4941fda7591246594
    default-series: precise
    ssl-hostname-verification: true

See the EC2 provider documentation for more options. The S3 bucket does not need to exist already.

Note If you already have an AWS account, you can determine your access key by visiting your account page, clicking "Security Credentials" and then clicking "Access Credentials". You'll be taken to a table that lists your access keys and has a "show" link for each access key that will reveal the associated secret key.

And that's it, you're ready to go!

https://juju.ubuntu.com/docs/getting-started.html
https://juju.ubuntu.com/docs/provider-configuration-ec2.html


Can't locate Switch.pm in @INC in Ubuntu 16.04 LTS

Open a terminal (Ctrl-Alt-t) and then:

 sudo apt-get install libswitch-perl

or using cpan:

cpan

At the prompt cpan[1]>, type

install Switch


You have to expand the extended partition (the light blue one, /dev/sda3 in your case) first. Then you will be able to expand /dev/sda5.


Same problem same laptop same day. Are you me?
I just found the solution. Insert this in /etc/modprobe.d/alsa-base.conf:
options snd-hda-intel model=alc294-lenovo-mic

Hope it helps!


Try this:

xdotool type "sh '/home/antony/Documents/Android Studio Installation Files/android-studio/bin/studio.sh'" ; xdotool key KP_Enter

if not work try this then:

wmctrl -a "Android Studio" || "/home/antony/Documents/Android Studio Installation Files/android-studio/bin/studio.sh"


Try pressing Left Alt+F2, and type gnome-terminal into the resulting window. Then press Enter, and see if the terminal appears.


How to stop Xfce from reconfiguring monitor layout when laptop lid is closed?

After many cycles over many weeks, today I solved the two external monitors being reconfigured incorrectly after screen unlock problem with xfce and other desktops:

Different monitors have different "start up" or "monitor boot" latency - in the order of a second, perhaps more with monitors I don't have.

This latency means that even using a keyboard combo to run own xrandr config (perhaps embedded in a script file), has often failed.

Tried using xrandr to first disable all outputs, then wait say 3 seconds. This did not work - it's the monitors "turning on" where this problem lies and my old (~7 years?) Intel i7-2640M with inbuilt "Intel HD Graphics 3000", presumably fails to maintain the desired display port output config for long enough for at least one of my (4K) external monitors to start up.

SOLUTION: run xrandr in 2 steps - first enable one external monitor only, then sleep 1s (I've tried 0.6s, but that was insufficient), then enable both monitors, e.g. like so (vary to suit your monitors of course):

xrandr --output LVDS1 --off --output DP1 --mode "3840x1080" --pos "0x580" --rate 60 --output DP2 --off
sleep 1s
xrandr --output LVDS1 --off --output DP1 --mode "3840x1080" --pos "0x580" --rate 60 --output DP2 --mode "3840x2160" --pos "3840x0"

Attach such a sequence (in a script) to your chosen keyboard shortcut, then after unlocking the screen (XFCE, KDE, whatever), use the shortcut to run this script.

Apparently same issue here (posted same answer there):

https://forum.xfce.org/viewtopic.php?pid=54610#p54610


Follow these steps to free up as much space as possible while keeping the latest backup:

Delete old backups through duplicity

You could try deleting old backup files manually.

For deleting all but the last full backup, open a terminal and run this:

duplicity remove-all-but-n-full 1 file:///media/nate/Backup/ --force

Delete files from failed backup sessions

If there is still no backup space, this might help (it deletes files from failed backup sessions):

duplicity cleanup file:///media/nate/Backup/ --force

Still no space

But for your case, I suppose that the backup partition is just full.

There is one full backup (from 2013-09-01), and
many increments (until 2013-10-19).

This means, that Duplicity/Ubuntu Backup won't delete any files as that would destroy the latest backup.

So for now, you will need to find backup space somewhere else and run a new backup. Or, you delete the current backup by hand and run a new backup immediately afterwards. But keep in mind, that you won't have any backup until the new backup is finished successfully.


TDAmerica trading platform won't install after updates to Oracle 8.

To get thinkorswim to work on ubuntu 16.04 [and other versions] you need a java version of oracle java 8. In java version "1.8.0_91" [java 8 update 91] the security settings will not allow thinkorswim to run so you need an earlier version [pre-java8 update 20].

I used java 8 update 11. Set the security setting to medium. Has to be the oracle version of java. Here's a link to old java versions:

http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html#jre-8u11-oth-JPR

You have to install "for this user only." Follow thinkorswim instructions such as do not run after installation completes. First uncheck the run when finished box, then change the permisssions on the desktop icon.

Ubuntu Linux Instructions
  |  Install (1 KB)

This installation requires Ubuntu Linux version 10.4 or later.
Click "Download thinkorswim" to start the installation.
Once the download is complete, navigate to where you saved the
file, right click the icon and select "Properties."
Once in Properties, click the "Permissions" tab, set "Access to
read and write," check the box to "Allow executing file as program"
and then, click "Close."
Now double-click the thinkorswim_other_installer.sh file and chose
"Run" when prompted.
Follow the steps until you reach a checkbox asking if you wish to
run the application. Uncheck the box and click "Finish."
After choosing "Finish," close all open windows and locate the
thinkorswim file on your desktop. Right click it and select
"Properties."
Now, like before, select the "Permissions" tab, set "Access to read
and write," check the box to "Allow executing file as program" and
then, click "Close."
You will now have a thinkorswim icon on your desktop. If you see
this icon, you have successfully completed the installation process.


Removing the mouseemu package solved the issue.


Unable to remove the lock by normal means

(Problem seems to have solved itself)

  nevermind, t seems that the lock has worn off by itself O_o – Loki


How to automatically copy pictures with resizing to some directory?

Some bash scripts that should be mostly correct, but of course should be verified:

If you want to watch the directory for new files, with an if just in case:

inotifywait -m -e create ~/to-share/ | while read line
do
    if [ ! -a ~/Dropbox/to-share/r$line ]; then
        convert "$file" "~/Dropbox/to-share/r$line"
    fi
done

If you want to just run the script repeatedly:

while true; do
    for filename in ~/to-share/*; do
        if [ ! -a ~/Dropbox/to-share/r$filename ]; then
            convert "$file" "~/Dropbox/to-share/r$file"
        fi
    done
    sleep 2;
done


converted comments to an answer

The following steps should be taken:

First, check that you can still do this at startup:

hold down (or repeatedly tap) the Shift key while you boot. Grub should present you with a menu. Choose the second option, to go into recovery mode; then choose, Drop to root shell prompt.

Then look for the log of removed packages:

In the terminal you can input the following code

sudo -H gedit /var/log/apt/history.log

find the removed packages and then run

sudo apt-get install package1 package2 package3

The OP the confirmed through vim almost screen full of uninstalled packages for example  xserver-xorg-video-s3-lts-raring, xserver-xorg-input-vmmouse

Thus to install the uninstalled packages:

example: sudo apt-get install xserver-xorg-video-s3-lts-raring xserver-xorg-input-vmmouse etc. Note: always have a space between package1 package2


How to log the activity of a network interface in a file

First a very simple approach.

iface eth1 inet dhcp
    ...
    up echo $IFACE up $(date) >> /var/log/network.log
    down echo $IFACE down $(date) >> /var/log/network.log

A more adequate approach would use the syslog facility so that the logfile gets rotated, etc.  The following will log to /var/log/syslog.

iface eth1 inet dhcp
    ...
    up echo $IFACE up $(date) | logger -p local0.notice
    down echo $IFACE down $(date) | logger -p local0.notice


That's because mysqld_safe. mysql's watchdog, notices it and respawns it. You should stop mysql using the provided init script: sudo /etc/init.d/mysql stop