How to block Internet for guest account?

First you need to edit the network interfaces file.  Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo gedit /etc/network/interfaces

Now you need to add the simple iptables rule to the interfaces file when the internet connection starts up

Simply add this in the interfaces file

pre-up iptables -A OUTPUT -p tcp -m owner --uid-owner username -j DROP

save and exit the file.

Now you need to type in the terminal with the following command

sudo iptables -A OUTPUT -p tcp -m owner --uid-owner username -j DROP

and switch users to the username you blocked and try to access the internet.


Apache2 Site Only Accessable at Machine's IP Address

In short, you have three ways to achieve this:

DNS
Hosts file(s)
mDNS.

DNS

You have two ways here - either a local DNS within your LAN, that replies authoritatively for my.webtool, or register a valid DNS name (such as mywebtool.com) at some registrar, and set up valid DNS for it.

Running a DNS server within your LAN will make the name available to anyone in your LAN, but not on the Internet. Such a nameserver may already be included with your router; many routers have some kind of nameserver, typically based on dnsmasq or unbound. Check your router for how to add names to it.

You can also set up a DNS server on Ubuntu, but every device on your LAN has to be configured to use that DNS server for it to work.

If you register a name with some registrar, create an A record that points to the IP of your Pi. Note that if it's a RFC1918-IP, it will not work outside your LAN.

Hosts file

On every host that shall access the service, you have to add

192.168.0.10    my.webtool

to /etc/hosts on most *nix OS, or C:\Windows\System32\drivers\etc\hosts on Windows.

mDNS

mDNS is multicast DNS, and works within your local network. You cannot use my.webtool, as mDNS names has to end in .local.

To do this, you have to configure a mDNS responder on your Pi, that will reply to queries, and configure your clients to use mDNS as a lookup source.

On Ubuntu this is handled by avahi. I will not go into detail for this here, I suggest to make a new question if you need help with getting mDNS up and running. The man page is a excellent resource for how to edit the configuration file , and is fairly detailed.


14.04 - Replaced drive in Software RAID 1 - How to make bootable?

I found the answer. The way to make sure GRUB is properly installed on and recognizes both drives from each is to run:

sudo dpkg-reconfigure grub-pc

When prompted which drives to install on, make sure all boot drives are selected. In my case, this was /dev/sda and /dev/sdb. Do not select /dev/md0 or any of the other md devices.


Connect to only one specific wireless network if available?

If you have never connected the server to your neighbors or any other WIFI network, it should not auto connect to one. UNLESS you have configured it to autoconnect.

here is a previous post that has answered a similar problem.

How to disable/enable automatically connecting to WiFi?


How to soft link an app to add it's shortcut to start menu in xubuntu?

I found this in the desktop file you posted...

You can also add Tor Browser to your desktop's application menu
# by running './start-tor-browser.desktop --register-app'

So I'd say do what the file tells you to do and you should be able to see tor in the whisker menu.


Middle-button scroll not working in Ubuntu 12.04 [Thinkpad X230]

Error message you got seems clearly telling you what's wrong no?; you don't have TPPS/2 IBM TrackPoint on your machine. What if replacing it with ThinkPad Extra Buttons that's printed in your xinput output?

Atually I've got my middle-button working by following the link you provided. In my case:

$ xinput
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech Trackball                        id=10   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=13   [slave  pointer  (2)]
⎜   ↳ ThinkPad Keyboard                         id=14   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ BisonCam, NB Pro                          id=11   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]
$ xinput set-prop "ThinkPad Keyboard" "Evdev Wheel Emulation" 1
$ xinput set-prop "ThinkPad Keyboard" "Evdev Wheel Emulation Button" 2
$ xinput set-prop "ThinkPad Keyboard" "Evdev Wheel Emulation Timeout" 200


Problem solved: added dns=dnsmasq to /etc/NetworkManager/NetworkManager.conf


Banshee "Encountered a Fatal Error" on launch

This means that the SQLite database that Banshee uses to store information about your tracks and playlists is corrupt.  This can happen if your system loses power or crashes while Banshee is running.  It's usually possible to recover from this error, and there's a bug report in progress that would enable Banshee to automatically attempt recovery.

For more information, see my answer to a similar question: Banshee encountered a Fatal Error (sqlite error 11: database disk image is malformed)


Using IJ Scan Utility in Ubuntu 16.04 LTS

In Ubuntu we tend to use generic drivers (ie. as in "one for all"). Your printer and scanner likely have the same chipset as similar products from Canon.

When you look at this topic: Canon Pixma MX494 driver close enough for MX492? you will see that the MX492 is an older but similar product as the MX494 and that these have worked at least from Ubuntu 14.04.

Canon supplies a driver for this printer and you can download it from their website. It is a debian Package archive so you can use Ubuntu software center to install it (Ubuntu software center should prompt to open it from the download).


virtualenvwrapper + python3: invalid syntax

I finally got it.

sudo pip uninstall virtualenv
sudo pip3 install virtualenv

That simple.


Download Ubuntu as Zip? iso download blocked

If there were a totally official Ubuntu mirror that used HTTPS, that might be your best bet: unless you have configured your computer to recognize the proxy you're required to use as its own certificate authority (which would be insecure unless you totally trust the proxy and controversial anyway), the software that restricts what you may download cannot distinguish filenames by extension, through HTTPS.

Unfortunately, the current official mirrors for Ubuntu ISOs are http, ftp, and rsync only.

Fortunately, HTTP mirrors occasionally support HTTPS as well. By going through the list, you'll often find a small number that do. In particular, you can download Ubuntu ISO images from https://mirrors.kernel.org/ubuntu-releases/.

(The HTTP version of that site actually isn't listed--I got it by removing the "us" subdomain prefix from http://mirrors.us.kernel.org/ubuntu-releases/. The HTTPS version of that site should work too but you'll get scary warnings in your browser because its security certificate is for the unprefixed domain instead.)

Note that, once Ubuntu is installed, you may have some trouble updating it and installing software in it, depending on what extensions you can download via HTTP. In particular, you must be able to download .deb files. Hopefully the block is limited to just a few extensions rather than blocking everything but just a few extensions.

You can also make Ubuntu use HTTPS download mirrors to update and install software, same as with HTTP. I don't know of any HTTPS sites mirroring Ubuntu's official software sources--those mirrors aren't, in general, all the same as the mirrors for ISO images--but if you need that, you could post a new question about it. (In your question you should explain why you need it, as otherwise it will likely be answered with an explanation of how APT operates securely even though archives are downloaded via HTTP.)


There are several ways a Windows partition can be mounted in Ubuntu. You have used the manual command line way using two commands.

sudo mkdir /media/alexandru/Hard
sudo mount /dev/sda5/ /media/alexandru/Hard/

The first command creates a folder (also called a directory) Hard inside the folder /media/alexandru/. I assume the parent folder /media/alexandru/ already exists.

The second command actually mounts the partition to the newly created folder.

When you reboot the computer, the second command is undone, but the first is not. That is, once the computer boots up again, the partition is not mounted on its own. Only thing that remains is an empty folder called Hard inside /media/alexandru/. This is why you didn't find any data inside the folder.

If you issue the second command again after the computer boots up, the empty folder will again be assigned to the Windows partition and you will see the data again.

There is another way to quickly mount a Windows (or any other) partition.

This is through Nautilus, the file manager. You should be able to see an icon for this partition in the left panel of Nautilus under Devices.

Clicking on this icon will mount the partition. The mount point will probably be different from the one you created, but this is the easiest way to quickly access a file from that partition. However, if you do this and then try to mount same partition using the command:

sudo mount /dev/sda5/ /media/alexandru/Hard/

Then you will get the error you got, as the partition is already mounted on another folder. Conversely, if you mount the partition using the command first, you won't see the icon for the partition in Nautilus.

Third, automatically mount the partition on every boot

To do this you have to edit the etc/fstab file and add a line for the partition you want to auto-mount. See How to automount NTFS partitions? for various pros and cons of doing that.

Hope this helps


what is the original Unity panel bar color?

Here you have the full official palette.

The menu bar's color is "Cool grey"

Cool grey
Screen
HEX #333333

Print
C44 M34 Y22 K78
Pantone Cool Grey 11


Lauch Firefox Developer Edition using command-line

As hinted by pomsky, the path of the executable file is /opt/firefox_dev/firefox.
I then just had to create a personalized bash alias (e.g., alias ff-dev='/opt/firefox_dev/firefox').

Note that this problem may be due to the fact I installed Firefox Web Developer from an archive (downloaded on Mozilla's website). So I then needed to  to manually create the firefox_dev.desktop file — see Firefox developer desktop icon is missing and Firefox developer edition icon duplication in Gnome shell.


Shotwell : how to browse external library without external drive plugged-in

One perhaps obvious alternative solution would be to simply move your installation (and your entire photo library) to a larger drive. As the price of internal storage continues to drop this approach becomes more and more attractive.

Step 1) Clone your existing drive to your new drive by using the new drive as a target rather than an image file. Be careful to choose your target correctly sudo fdisk -l can help.

Step 2) Physically install the new drive in your system to replace the old one.

Step 3) Connect your external and copy your photo library back.


Blinking Cursor when Booting into Xen 4.1 with 3.2.0-32-generic Kernel

I can think of 2 possible causes:

You have a Nvidia graphics adapter and installed their proprietary driver on your (non-Xen) Ubuntu 12.04 install. In that case you may switch to the open-source Nouveau driver and try again booting Xen.
Hardware incompatibility: I had a similar issue with my Marvell SATA controller and had to disable it to boot Xen. I don't think your board has a Marvell SATA controller, but you may try to disable unused controllers, i.e. Firewire, or some additional SATA controller that's not used.


Pamusb doesn't exist for some reason on Ubuntu 18.04

The USB Pluggable Authentication Module project is unmaintained since more than a year.
Unmaintained source of pamusb are on GitHub

But, Someone (Adrian Nöthlich) has worked on making an PPA Package:
https://launchpad.net/~promasu/+archive/ubuntu/libpam-usb


Restore MATE Applications menu without mozo

Menu settings are stored in ~/.config/menus, the Applications menu residing in mate-applications.menu.

The file is an XML file. I my case, it seems to have gotten corrupted by inserting a tree of nested <Menu> items, with (among others) a <Move> item at its bottom.

Removing that tree and saving fixed this. The change was reflected in the menu instantly.

If the corruption is less obvious, alternatives are:

Replace the file from backup (if available)
Move it away and see if it gets recreated (or create a fresh user account and copy it over from there), then copy in salvaged snippets from the backup one-by-one, verifying after each step that everything still works.

PS: I’ve filed a bug for the underlying data corruption issue.


How do I change the keyboard map for Backspace?

Here is how you can do that:

Install xbindkeys and xautomation:

sudo apt-get install xbindkeys xautomation

Find the binding of your Shift+Backspace shortcut. Run:

xbindkeys -mk

A blank window will open, press your Shift+Backspace shortcut. That will output in the terminal something like this :

m:0x11 + c:22
Shift+Mod2 + BackSpace

Create your configuration file :

xbindkeys --defaults > $HOME/.xbindkeysrc

Open this file with a text editor (gedit .xbindkeysrc) and add at the bottom of the file:

"xte 'key Delete'"
m:0x11 + c:22
Shift+Mod2 + BackSpace

And save.

Log out and re-login and your Shift+Backspace shortcut should now work properly.

Refer here for more information on xautomation.


Yes, as a matter of fact, there is. It's called the Ubuntu Live Environment, and it comes with every Ubuntu ISO. Simply grab your installation drive and boot from that.

The live environment is a full-fledged Linux operating system that lives completely in memory. You can install packages (like the famous rkhunter), recover your system, and do pretty much anything you'd normally be able to do from a desktop install of Ubuntu.

The live image is (normally) read-only, so your changes won't persist. However, this also means any malware loaded into it would be gone following a reboot.

While there are specialized tools for this as well, the live environment is probably one of the easiest to use.


Logitech F310 Controller isn't mapping correctly

Use jstest-gtk to map the right analog stick to the correct axes. In the mapping window drag Axis 2: ABS_RX and Axis 3: ABS_RZ above Axis 4:ABS_Z (really left trigger).

Your final configuration should look like this:

Saving this profile would give you ~/.config/jstest-gtk/profile1.xml

<?xml version="1.0"?>
<joysticks>
  <joystick>
    <name>Logitech Gamepad F310</name>
    <device>/dev/input/js0</device>
    <calibration>
      <axis>
        <calibrate>1</calibrate>
        <center-min>-128</center-min>
        <center-max>128</center-max>
        <range-min>-32639</range-min>
        <range-max>32639</range-max>
        <invert>0</invert>
      </axis>
      <axis>
        <calibrate>1</calibrate>
        <center-min>-128</center-min>
        <center-max>128</center-max>
        <range-min>-32639</range-min>
        <range-max>32639</range-max>
        <invert>0</invert>
      </axis>
      <axis>
        <calibrate>1</calibrate>
        <center-min>-128</center-min>
        <center-max>128</center-max>
        <range-min>-32639</range-min>
        <range-max>32639</range-max>
        <invert>0</invert>
      </axis>
      <axis>
        <calibrate>1</calibrate>
        <center-min>-128</center-min>
        <center-max>128</center-max>
        <range-min>-32639</range-min>
        <range-max>32639</range-max>
        <invert>0</invert>
      </axis>
      <axis>
        <calibrate>1</calibrate>
        <center-min>127</center-min>
        <center-max>127</center-max>
        <range-min>0</range-min>
        <range-max>254</range-max>
        <invert>0</invert>
      </axis>
      <axis>
        <calibrate>1</calibrate>
        <center-min>127</center-min>
        <center-max>127</center-max>
        <range-min>0</range-min>
        <range-max>254</range-max>
        <invert>0</invert>
      </axis>
      <axis>
        <calibrate>1</calibrate>
        <center-min>0</center-min>
        <center-max>0</center-max>
        <range-min>-1</range-min>
        <range-max>1</range-max>
        <invert>0</invert>
      </axis>
      <axis>
        <calibrate>1</calibrate>
        <center-min>0</center-min>
        <center-max>0</center-max>
        <range-min>-1</range-min>
        <range-max>1</range-max>
        <invert>0</invert>
      </axis>
    </calibration>
    <axis-map>
      <axis>ABS_X</axis>
      <axis>ABS_Y</axis>
      <axis>ABS_RX</axis>
      <axis>ABS_RY</axis>
      <axis>ABS_Z</axis>
      <axis>ABS_RZ</axis>
      <axis>ABS_HAT0X</axis>
      <axis>ABS_HAT0Y</axis>
    </axis-map>
    <button-map>
      <button>BTN_A</button>
      <button>BTN_B</button>
      <button>BTN_X</button>
      <button>BTN_Y</button>
      <button>BTN_TL</button>
      <button>BTN_TR</button>
      <button>BTN_SELECT</button>
      <button>BTN_START</button>
      <button>BTN_MODE</button>
      <button>BTN_THUMBL</button>
      <button>BTN_THUMBR</button>
    </button-map>
  </joystick>
</joysticks>


Help writing server script to ban IP's from a list

If you properly install fail2ban there's little need for the script above. Soon as the attacker attempts n times again they'll be banned for whatever time you set in the config.


VMs keep disappearing from vmplayer on reboot

I also have problems with a disappearing library. It is most likely related to the ~/.local/share/recently-used.xbel file that contains a list of recently used files.

henning@henning-T60:~/.local/share$ ls -la recently-used.xbel
-rw------- 1 henning henning 1385 mars  23 09:27 recently-used.xbel

Some times (and I don't do exactly why) the owner and group of the file changes from henning to root.
Manually starting

 vmplayer

will then complain about failed access to recently-used.xbel file.

Assuming that the reference to the vm is still in the recently-used.xbel file,
it should work to regain own access to the file with

sudo chown henning: recently-used.xbel

I've tried to using inotify-interface watch access to the file with

inotifywait -m ~/.local/share/recently-used.xbel

which normally gives on startup:

henning@henning-T60:~/.local/share$ inotifywait -m recently-used.xbel
Setting up watches.
Watches established.
recently-used.xbel OPEN
recently-used.xbel ACCESS
recently-used.xbel CLOSE_NOWRITE,CLOSE

and on close of vmplayer gives:

recently-used.xbel ATTRIB
recently-used.xbel DELETE_SELF

So the file's attributes are changed and the file deleted, but somehow recreated again because it's still in the directory afterwards.

Using strace on the start of vmplayer to test.log

henning@henning-T60:~/.local/share$ sudo strace -e trace=file -o test.log  vmplayer

and then

 henning@henning-T60:~/.local/share$ more test.log | grep 'recently-used'
  access("/home/henning/.recently-used.xbel", F_OK) = -1 ENOENT (No such file or directory)
  open("/home/henning/.local/share/recently-used.xbel", O_RDONLY|O_LARGEFILE) = 7
  open("/home/henning/.local/share/recently-used.xbel.XVW5CX", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0666) = 23
  lstat64("/home/henning/.local/share/recently-used.xbel", {st_mode=S_IFREG|0600, st_size=218, ...}) = 0
  rename("/home/henning/.local/share/recently-used.xbel.XVW5CX", "/home/henning/.local/share/recently-used.xbel") = 0
  chmod("/home/henning/.local/share/recently-used.xbel", 0600) = 0

So a new file recently-used.xbel.XVW5CX is created and later renamed to recently-used.xbel


18.04 low disk space - using 640GB and more in /var/log/syslog.1

Found a possible solution here, but I wasn't able to determine what was causing this infinite error message to show up. I'm not sure how this will affect my system going forward because I don't see anything going into the log file anymore.

To fix this I had to do

sudo su

because regular sudo gave a Permission denied message.
As root I used the solution linked above.

cat /dev/null > /var/log/syslog.1

now my /var/log/syslog.1 is showing as 0 bytes.

Thank you for the help to everyone.


Just do ubuntu-device-flash --clean-cache touch and then try it again.;)

This will clean the cache of the ubuntu-device-flash tool. This causes
the tool to download the whole image again. For me this helped sometimes, when I had problems during flashing my device.


How to download torrents in ubuntu 13.10

In the little Another application... browsing window, click on File System on the left, then navigate to the directory usr and then bin (this may take a while to load, there are lots of files in this folder). There you will find the application qbittorrent. Choose it and click Open.


How does Ubuntu know the make and model of my laptop?

The Ubuntu installer is called ubiquity. The changelog of ubiquity 2.3.18 mentions

"Use dmidecode to get a more unique suffix for the hostname (LP: #628087)."

The exact python code is:

def dmimodel():
    model = ''
    kwargs = {}
    if os.geteuid() != 0:
        # Silence annoying warnings during the test suite.
        kwargs['stderr'] = open('/dev/null', 'w')
    try:
        proc = subprocess.Popen(
            ['dmidecode', '--quiet', '--string', 'system-manufacturer'],
            stdout=subprocess.PIPE, universal_newlines=True, **kwargs)
        manufacturer = proc.communicate()[0]
        if not manufacturer:
            return
        manufacturer = manufacturer.lower()
        if 'to be filled' in manufacturer:
            # Don't bother with products in development.
            return
        if 'bochs' in manufacturer or 'vmware' in manufacturer:
            model = 'virtual machine'
            # VirtualBox sets an appropriate system-product-name.
        else:
            if 'lenovo' in manufacturer or 'ibm' in manufacturer:
                key = 'system-version'
            else:
                key = 'system-product-name'
            proc = subprocess.Popen(
                ['dmidecode', '--quiet', '--string', key],
                stdout=subprocess.PIPE,
                universal_newlines=True)
            model = proc.communicate()[0]
        if 'apple' in manufacturer:
            # MacBook4,1 - strip the 4,1
            model = re.sub('[^a-zA-Z\s]', '', model)
        # Replace each gap of non-alphanumeric characters with a dash.
        # Ensure the resulting string does not begin or end with a dash.
        model = re.sub('[^a-zA-Z0-9]+', '-', model).rstrip('-').lstrip('-')
        if model.lower() == 'not-available':
            return
        if model.lower() == "To be filled by O.E.M.".lower():
            return
    except Exception:
        syslog.syslog(syslog.LOG_ERR, 'Unable to determine the model from DMI')
    finally:
        if 'stderr' in kwargs:
            kwargs['stderr'].close()
    return model

LP: #628087

Edit:
You can browse yourself the code by downloading it with:

cd /tmp
apt-get source ubiquity


How to configure KODI to run in windowed mode from command line?

Encountered the same issue. Within the section <videoscreen> of file ~/.kodi/userdata/guisettings.xml you have to change this:

<screenmode default="true">DESKTOP</screenmode>

To this:

<screenmode>WINDOW</screenmode>

Start Kodi now and it will be windowed.


Set starting directory for foobar2000 via wine

Open up winecfg > Windows Version: and switch to an earlier version > click apply.

Certainly XP would restore prior behavior,anything newer will likely have the current behavior you don't like.


Which package update(s) triggered the 'Server reboot required' message?

One way to identify this info is to look in /var/run at these files

$ cat /var/run/reboot-required
*** System restart required ***
$ cat /var/run/reboot-required.pkgs
linux-base
linux-image-4.4.0-93-generic

These files will not exist unless a reboot is required, so checking if they exist is also a nice trick to know if a reboot is required:

[ -e /var/run/reboot-required* ] && echo "Reboot is required!" || echo "Reboot is not required."


Creating and using a bootable USB for a new build

You want to create a bootable usb.

Just download the .iso of the operating system you want to use and load it onto a usb with something like 4gb or more of storage capacity.

I'm not sure what apple uses to create a bootable usb, but I know in ubuntu you would use a program called Startup Disk Creator.

1) Download the .iso file
2) plug in the usb
3) launch Startup Disk Creator
4) you will then be prompted to select the usb you want to use and the .iso file you downloaded previously
5) It will take a while for the process to complete, and once it's done unplug your usb and plug it in when restarting the computer you would like to load the Operating System on

Hope this helps


Can i dual boot windows 7 (x64) with Ubuntu 11.10 in Sony VAIO EA36?

Simply download the .iso file, burn the image to the CD, boot from it, and select the 'install' option when the choice appears. There will be an option to 'install alongside Windows' which you should select. For more detailed instructions look here: https://help.ubuntu.com/community/Installation


How can I get a slide-in effect for Guake under 12.10?

I found a great article about this in Fedora Forum:

http://forums.fedoraforum.org/showthread.php?t=197409

Basically you do the following:

sudo apt-get install compizconfig-settings-manager
sudo apt-get install compiz-fusion-plugins-extra

Launch Compiz Configuration Settings Manager (CCSM), go to the Effects section, tick the box next to Animations Add-On, then click on Animations.

In Animations; under Animation Selection; for the Open Animation tab; click on New, then:

Select Burn as your Open Effect
Enter 900 for Duration
Enter (type=Normal) & name=guake for Window Match
Enter fire_life=0.1, fire_particles=100, fire_size=0.1, fire_slowdown=0.1, fire_direction=1 in Options
Click on Close

Move this item up to the second position with the Up button, then click on the first item in the Animation Selection list (which should be a catch-all Glide 2 effect with certain exemptions), click Edit and add the exemption &!(name=guake) to the end of its Window Match entry.

Repeat this process for the Close Animation tab and you should then be all set!

Launch Guake and you should see it slide down from the Unity Panel at the top of the screen.

If like me, you find that this effect does not persist correctly over reboot and you end up with the default Burn effect (Guake appearing and disappearing in a burst of big flames) then just go back into CCSM, click on the Animations Add-On button, select Burn and set everything down to its lowest, selecting up for Fire direction. This will set the global defaults for Burn.

I hope this helps anyone. ;)


I'm unable to install Gnome in Ubuntu 16.04

This should be used as last resort. If you use this carelessly, you can end up with a broken system
remove the lock :
sudo rm  /var/lib/dpkg/lock

configure dpkg :
sudo dpkg --configure -a

update your apt-get :
sudo apt-get update --fix-missing


Shut down list of servers given in a file

Perhaps:

while read ip rest_of_line; do
    ssh user@$ip sudo poweroff
done < server.file

The ssh command will return when the ssh daemon on the remote server is shut down. This is not when the machine is powered off. You might want to add a sleep command following the ssh command.

Your user should be configured to do sudo poweroff without having to provide a password. See the visudo
man page.


Konsole in Kubuntu 16.04 does not restore tabs

I started Kubuntu 16.10 in a virtual machine, opened Konsole, opened some tabs (each using its particular directory), restarted the virtual machine, and Konsole restored the tabs, each using its particular directory.

There was a bug that was solved, but beginning with Kubuntu 16.10. For more information:

"Plasma doesn't restore everything after a reboot":
https://bugs.kde.org/show_bug.cgi?id=343518
"Missing some clients or windows when storeSession and performLegacySessionSave":
https://bugs.kde.org/show_bug.cgi?id=354724


This

$ xrandr --addmode DFP2 1920x1080_100

should be:

$ xrandr --addmode DFP2 1920x1080_100.00

cheers


Drawers (https://apps.ubuntu.com/cat/applications/drawers/)
does the job well.


High contrast theme causes missing icons

This is a bug there where the fix was just released days ago !

Ugrade your packages to these versions and it should fix your issues

xenial:
gnome-themes-standard | 3.18.0-2ubuntu2
gnome-accessibility-themes | 3.18.0-2ubuntu2

However, these are in the repository xenial-proposed currently.

You might want to add the following with your favourite editor

sudo nano /etc/apt/sources.list

replace "us" with the country where you are

deb http://us.archive.ubuntu.com/ubuntu/ xenial-proposed main universe multiverse

then update

sudo apt-get update

and to upgrade only these packages do

sudo apt-get install gnome-themes-standard gnome-accessibility-themes

then i would suggest to comment out the proposed reposoitory, as to not upgrade other packages

sudo nano /etc/apt/sources.list

add a # before the line

#deb http://us.archive.ubuntu.com/ubuntu/ xenial-proposed main universe multiverse

and update again

sudo apt-get update


I am taking CS50 as well, and I have the same problem.
After following Cs50's instructions, I get this error when compiling code using gc

/tmp/ccvUiSKS.o: In function `main':
Goodmario.c:(.text+0x21): undefined reference to `GetInt'
collect2: error: ld returned 1 exit status

I have followed the instructions to the exact.
I believe that you should just continue using -lcs50, it's not any harder.
eg. The command I use to compile a program

gcc Goodmario.c -o Goodmario -std=c99 -lcs50

Not very hard : D


Running a classic ASP website on Ubuntu 12.04

I know back in the day (and we're talking about fourteen years ago, when I was using ASP) there were alternative implementations of ASP. The most famous and the only one I've ever seen running on not-Windows was ChiliSoft ASP.
But ChiliSoft were gobbled up by Sun. Sun killed off ChiliSoft's product but imbibed its soul and capabilities into Sun Server One. More time occurred and Sun were eaten by Oracle... Somewhere in that time the product died. Even if it does somehow exist still, I would bet a large pot of money on it not being maintained, let alone compatible with Linux 2.6+.
ASP is ancient.
I shouldn't need to point that out but I need to highlight that nobody has considered it worthy of promoting in over a decade, let alone waste a ton of time reimplementing such a horribly limited language and framework.
There may be the possibility of getting an alternative implementation running under Wine. Or even a native one - but if your legacy code uses anything like an ODBC database (kids these days won't have a clue what I'm talking about), you're going to be stuffed.
The easiest way to deal with this is to just mirror your stack from 10 years ago. Bung a copy of Win2k on Virtualbox, and just host it the way it was designed for. Do your porting and then move all the files onto a flash drive (or Iomega Zip Disk if you hate anachronisms), tape that to a heavy rock and then and drop that baby in the ocean.

Note: Packages like Apache::ASP are red herrings. There are plenty of modules that give ASP-like interpretation. Apache::ASP gives a Perlscript-like spin on the whole thing but it won't let you run VBScript.
Note 2: ModVB exists but seemingly hasn't been touched since its inception in 2003. And that is based on mod_gb from 2002 which has had similarly low activity in the past decade. I'm not sure either of these would work with a modern Apache and you've still got ancillary issues (eg databases) still.
Note 3: You could also reimplement ASP yourself with a home-made parser written in whatever language you like. Most languages that have been around a while have language parsers. It'd probably be slower and buggier but it might be enough to actually run something. But seriously, if you're even considering this, you're very silly. Please just reimplement your site in a current language.


ia32-libs will not install due to dependency problems

Have you tried installing ia32-libs-multiarch ? If you get any more dependency issues, install those as well.


service ufw status (Active) states that the service of ufw (its daemon) is running in the background and is ready to work. in newer versions of Ubuntu
 its equivalent is:

systemctl status ufw

ufw status talks about the ufw itself, it says what the daemon (if it is active) is doing. By saying it's "inactive",  it means firewall does nothing (however it's still living in the background and is ready to be enabled).

Service: Active, UFW: Active: I'm here and I'm doing my job.
Service: Active, UFW: Inactive: I'm here and I'm doing nothing.


Why doesn't sudo -S work for 'mysql' command?

If you need to do something like this as root, please do it properly.

Create a new script in /usr/local/bin/ like /usr/local/bin/my_mysql_task. It'll need to be owned by root and chmod +xed. The important thing here is that nobody but root can edit it.
Then let your user run that script as root without a password by running sudo visudo and adding something like the following:

username   ALL=NOPASSWD: /usr/local/bin/my_mysql_task

Now are you not only not piping your account password everywhere (in a way that would show in ps to most other users) but you're not piping at all, thus solving your core issue.

Never embed passwords. It's not necessary.


I just figured it out, but I thought I'd put it here in case anyone else needs help. In the PHP script, I needed to run it as sudo:

shell_exec("sudo /sbin/reboot");

Then it doesn't ask for the password and works fine.


Display issues after running latest updates for Ubuntu 12.10

I am having the same issue here...and have the same OS config....using ATI Radeon HD 6670..I think its a problem with the Graphic card driver...The FGLRX Propripetory driver installer is not working...so I am trying to download the Linux catalyst driver from here...http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx... Try it out..it might solve the problem...I am still downloading...
       For the time being i just changed my Graphics preference to internal in my BIOS setup...works fine with only internal...you can do the same till we find a solution..


apt-get wont work when i try to install tor

That's because Tor is not in the regular repositories, so you'll have to add the Tor repository to your /etc/apt/sources.list. This involves some editing and importing the appropriate key. It's not difficult. The instructions are on the site of the Torproject. Take a look at option 2 here.


Multiple screen setup, applications startup on a single screen

According to kde 19.04 remember window position which may be in varying degrees of out of date:

Right-click the window
Click Configure window behavior
Select Window-specific
Click New...
click Detect window properties button at the bottom.
Select the window you want to configure.
When a window pops up, click OK.
In the Geometry tab, check Size and Geometry.
!. Select Remember for each.

or

Right-click on the title-bar
Choosing Advanced
Special Window Settings

or

System Settings
Window Behaviour
Window Behaviour
Advanced


I've seen this for the latest weeks on my systems and at least in my case its related to latest chrome builds, maybe an error/crash related to chrome's appindicator, i also observed that icon is still showing even after closing chrome, but is not appearing if I only use Firefox on the whole session.

Also if you turn off chrome's run in background option, it also does not reappear (losing fast reload and background running chrome-apps).


Are my files lost after I executed mv /parentdir/otherparentdir/somedir/* /parentdir/destdir/?

I just figured out that the command was in fact successful. I just didn't remember which files were in Downloads dir. After examining files and sizes and making a test with touch and make dir and executing the same last mv command I could check the command was executing correctly and the files were being moved as expected.
Thank you anyway @wineunuuchs2unix and @heynnema for your attention.


How to use shell variables after doing sudo su

You quoted the heredoc delimiter:

sudo su<<'HERE'

Variables in a heredoc are not expanded if the delimiter is quoted. From the docs:

  If any characters in word are quoted, the delimiter is the result of
  quote removal on word, and the lines in the here-document are not
  expanded. If word is unquoted, all lines of the here-document are
  subjected to parameter expansion, command substitution, and arithmetic
  expansion, the character sequence \newline is ignored, and ‘\’ must be
  used to quote the characters ‘\’, ‘$’, and ‘`’.

Just use:

sudo su <<HERE

Example:

$ a=1; cat <<HERE
> $a
> HERE
1
$ a=1; cat <<'HERE'
> $a
> HERE
$a


I've attempted to parse your question. I'm expanding my comment into an answer.

From your stated requirements, email is not what you need. You need to transfer text information from 40 instances to one box, collate it, and then feed that information to your DHCP server.

In broad strokes, I would set up a machine accessible to the instances with a basic web stack on it, LAMP or even just nginx and a cgi or whatever. Your script then should POST to http://192.168.X.X/scriptName.py. That Python script (or JavaScript if you know that) can then process the incoming text data (IP and whatnot) into a file that yet another script can periodically read and send DHCP lease requests (or whatever) to the DHCP server.

It's probably an hour or two of work to set all that up on a Linux box, but if this is a one time set up, it's likely not worth the effort. Just go get the information and send the requests.  If it's more of a "this is how we set up customer instances on a customer site" then you'll likely need to build something like this.


My laptop internal speakers produce no sound since installing. OS=Ubuntu 14.04

PulseAudio controls underlying ALSA-level volume controls. Open a terminal. Enter alsamixer and press the Enter key.

You will now see a user interface like below.

Select your correct sound card using F6. Mute/Unmute with the “M” key. An “MM” means muted, and “OO” means unmuted.

This was the problem I had once.


Dual Boot Partitions__Ubuntu running out of space

It depends on where you want the extra space on your file system. If you type 'mount' in a terminal, it will give you a list of partitions that are mounted at that time. You will most likely want to add the free space to the partition specified mounted as root, /. You could also add it to /home /var, /etc depending on your set up.


Failure to boot from Live USB: Kernel Panic

Since you can boot in UEFI mode, let's take Rufus out of the equation:

What happens if you just format one of your drives to FAT32 (you can Windows Disk Manager to do that, whether the drive is GPT or MBR does not matter), then manually extract all of the ISO files onto that drive (you can uze 7-zip to do that) and then attempt to boot it in UEFI mode?

Considering that this is pretty much what Rufus does when creating a UEFI drive, I expect that you will see the exact same problem.

The error you get is quite puzzling because if the ISO SHA256 matches and especially the file validation of /casper/filesystem.squashfs did not produce any error, then /sbin/init, which is definitely present on the SquashFS filesystem, should be accesssible.

The only things I can think of are:

Weird bug with the handling on symbolic links, since /sbin is a symbolic link, for SquashFS for certain types or underlying file systems (but that's unlikely because there's really nothing fancy about symbolic links)
Weird SquashFS decompression bug, since SquashFS uses compression, where the underlying file system could have an effect when the SquashFS driver requests additional file blocks for decompression, and decompression might use some specific CPU extensions for speed (which would explain why it would be limited to only some platforms).

Another test that might be worth conducting, is to try with a FAT32 formatted drive and add toram to your kernel options (the ones where you added nosplash), so that the SquashFS image is loaded to memory and read from there rather than disk. If you do that, you should see that the boot process takes longer with a message like Copying live-media to ram.... This should help confirm whether this really has to do with FAT32 being used as the underlying filesystem for the SquashFS file.


At the bottom of the dump is the following:

  The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html
  contains information that should help you find out what is causing the
  crash.

IMHO your best bet is to look at the info found in the above URL. It's verbose so I'm not going to cut and paste it here.

Regards,


My Storage partition's name is shown as a bunch of letters

What I usually do in these situations is copy the output from the mount command to the fstab and change the mount point to something more suitable.

The mount command with no options list all mounted partitions.
Copy the line which refers to your NTFS partition to your /etc/fstab and change the mount point to something like /mnt/windows_c_drive, save the file and before you reboot, make sure the changes didn't break anything.

This can be done by unmounting the NTFS partition and then mount -a to mount every partition in fstab. If no errors occur you can safely reboot. If an error occurs and you don't know how to fix it, comment/delete the line you copied, before you search for more help, just to make sure you computer still boots.


Can you dual boot OSX and Ubuntu if Ubuntu is Installed via EFI and not something like rEFIt?

Yes, as fossfreedom says, you can install Ubuntu in EFI mode on a Mac. One caveat is that hardware support seems variable (and is constantly changing). Some people swear that important hardware (like video devices) don't work properly in EFI mode. Others have no problems. As a general rule, support is improving, but I don't know if absolutely everything is supported yet. (OTOH, some hardware seems to work better in EFI mode than in BIOS mode.)

One more point: rEFIt is a boot manager. Although it can direct the boot process to a BIOS-mode installation, it won't disable an EFI-mode installation. In fact, it can be used as the first stage in an EFI-only boot process, enabling you to select Linux vs. OS X, both of which boot in EFI mode. (FWIW, rEFIt seems to have been abandoned. I've forked the project as rEFInd.)


Problem installing NVIDIA-Linux-x86-302.07.run in 12.04

You can install Nvidia drivers through Ubuntu Software Center or Jockey (Aditional Drivers). No need to install the .sh from NVIDIA.


Does anyone know if the Firefox ESR PPA is still being maintained?

Discovered the Ubuntuzilla repository has the latest versions of both Firefox ESR and Thunderbird, so I deleted the versions from the OP PPA and replaced them with those.  Had to move the profile files to different directories because they had different names, but that was easy enough.  All up to date the the current security patches again.


Is there a convenient command for fetching all needed latexpackages of a specific .tex file?

The Ubuntu Way

The various LaTeX packages, i.e. graphicx, pslatex and so on, are managed by the regular sofware repositories. So you can install must, but not all tex packages with Software Center or Synaptic. However not all LaTeX packages there are up to date and even worse: Not all exist in the repositories. Some of the more related packages are bundled together in one. E.g the Ubuntu package texlive-science includes these latex packages (as of this writing). Search the description of the Ubuntu packages for the latex package you want and hope you find it in the right version.

If you have a lot of free space you can just install texlive-full, which most likely will include all the latex-packages you will ever need and many many many more.

Using texlive and tlmgr

You can install the latest version of texlive using the net install script of tug.org. You should uninstall the Ubuntu version of texlive before hand. Then you can install packages using the normal tlmgr Texlive package ManaGR:

tlgmr install <package name>

To update a package use:

tlgmr update <package name>

To update all packages (and tlmgr itself):

tlmgr update --self --all

Installing manually

If you want the latest version or a package not included by both the Software Center and even tlmgr you will have to install the package manually. Here it depends on the package. Just follow the installation instructions of the packages if it provides any.  CTAN and the Tex online catalogue have prezipped versions of many tex packages. Here is a Guide on how to install them.


How to open the files with the extension (".so")

.so files are "Shared Libraries" (https://en.wikipedia.org/wiki/Library_(computing)#Shared_libraries), they are binary-files meant to be dynamically linked to an executable and as such are unusable on their own.

A Library is a collection of related functions and reusable resources to be used by software applications. Shared-libraries are linked at runtime (dynamic linking) as opposed to compile-time hence their name.

If you want to open a shared-library file, you would open it like any other binary file -- with a hex-editor (also called a binary-editor). There are several hex-editors in the standard repositories such as GHex (https://packages.ubuntu.com/xenial/ghex) or Bless (https://packages.ubuntu.com/xenial/bless). The same can be done for ELF executables.

You can install either of them with the following command(s):

sudo apt install ghex

or

sudo apt install bless

But bear in mind though, shared-objects (.so files) are binary files and therefore aren't meant to be edited manually; you might be able to edit a few strings or values with a hex-editor but you won't be able to do much since they are unusable on their own.


If you just need OpenJDK in general and not specifically version 7, run:

sudo apt install openjdk-8-jdk

for the whole JDK or:

sudo apt install openjdk-8-jre

for just the runtime for running applications that use Java (e.g. Minecraft).  If you need version 7 specifically, see How do I install openjdk 7 on Ubuntu 16.04 or higher?.


The file casper/filesystem.squashfs is corrupt

Input/output error is not uncommon at the very end of a CD.
(Caused often by write type "TAO", which creates two non-data blocks
at the end of the range, which the drive advertises as readable.
Aka "Read-ahead bug". Traditionally made harmless by 300 kB of padding.
It should not happen if you have chosen write type "SAO".)

Make sure that you try to read only as many bytes from the CD
as are stored in the original .iso image file.

The size of an ISO image is supposed to be integer divisible by 2048.
E.g. if your .iso file has a size of 4,581,523,456 bytes, then it
has 2,237,072 blocks. So use

dd if=/dev/sr0 bs=2048 count=2237072 | md5sum

(assuming your CD drive has address /dev/sr0)

When the reading is done (hopefully without i/o error), then
lookup the resulting MD5 checksum in your file "md5sums.txt".
E.g. "a87d2796b7acf90fbe48dcaeb27dc7cc"

Command line example for writing CD with write type SAO:

xorriso -as cdrecord -v /dev/sr0 -sao -eject lubuntu-12.04-desktop-i386.iso

The same option will also work with programs cdrecord or wodim,
instead of "xorriso -as cdrecord".


How usable is BlenderCAD project right now?

BlenderCAD is just 7.6 kilobytes right now, which is not very promising. I couldn't compile it, but maybe I did something wrong.

There is also another (stalled) BlenderCAD project, but downloads are not working (it gives just 0 bytes files to me, tried with multiple browsers and wget).

Everything is possible, but that hardly will be reasonable alternative for SolidWorks (or similar). Building almost completely different (CAD) software on top of Blender (3D rendering tool) is something like converting oil truck to bus without making too many changes (both are for transportation, just for different things). It works, but it's not as good as building bus to transport humans.

Sometimes magic happens (we have working operating system, which is open source; Blender is rather huge package by itself), but SolidWorks/Autodesk Inventor/... are product of long engineering work, which can't be replicated in short timeframe (so expect waiting multiple years).


Unable to install Ubuntu on Lenovo ThinkPad X1 Carbon 4th Generation

Solution

So the very problem was that for some reason, intel_pstate is not supported. As explained in the Reddit thread. The solution was to deactivate intel_pstate in the kernel boot parameters.

What I did not get, was how to modify the boot parameters manually for the Ubuntu Startup-USB. This is done by entering the F6 menu and exit the menu right away. Now there is a new line visible on the screen. This line can be edited by pressing e add the command intel_pstate=no_hwp (for example after quiet). Now you can install Ubuntu. To be able to reboot after the installation, you need to alter the kernel boot parameters via grub explained here.
Once you logged into Ubuntu you can now alter this setting permanently also explained here.

Good luck!


Keyboard and mouse only working after reboot

I had the same problem but found a solution by changing my BIOS settings of my Lenovo Flex 15 Easypad.  I had to change the BIOS-setting "UEFI optimized for Windows 8" (was preinstalled on this laptop, I erased it and installed Lubuntu 14.04) to "Other OS".  That did the trick for me.


Does "sudo apt-get" installs 32bit or 64bit by default?

apt-get install installs the versions that corresponds to your architecture.


Have you checked the Kernel Team wiki page? You should be able to find the information on the blog (with links to logs of the IRC meeting minutes) or on the corresponding mailing list.


How do I remove rounded borders from windows in Ubuntu 18.04 with GNOME shell?

Adding the following lines to ~/.config/gtk-3.0/gtk.css have made the corners square:

.titlebar,
.titlebar .background {
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
}

As an alternative, you can use border-radius: 0px 0px 0px 0px.


In particular, Gnome3 is written with GTK+3. You can find a general tutorial on using GTK+ 3 with Python. Also take a look specifically on GNOME Developer Center. In particular you may be interested in the Python Bindings.

For further, more specific programming questions, I recommend using Stack Overflow as a resource for asking questions, a sister site to AskUbuntu.


Encrypt folders with executable scripts inside

You can change permissions of the folder and files allowing other users and groups to either view, write or execute the folder and its contents using the chmod command.

Use this wiki for more information or use the manual page of chmod using man chmod in terminal.


How do I map Lock Screen to "Super+L" i.e. Win+L?

Open System Settings, click on Keyboard > Shortcuts > System. There you should find the shortcut for "Lock screen" (or similar). Click on the default value (Ctrl+Alt+L), then press your key combination.


How should I connect to a VPN Tunnel from Ubuntu Server 18.04.2 LTS?

I can't tell which Diffie Hellman Group it is proposing as it seems to be a 2 character wildcard. See here if StrongSwan IKEv2 supports the DH Group :

https://wiki.strongswan.org/projects/strongswan/wiki/IKEv2CipherSuites

Try network-manager-strongswan if you want a GUI IPsec IKEv2 client.


How to dual boot ubuntu and windows 10 on dell inspiron 7472

I ran into the same problem and after reading above post first I tried to do as explained by @oldfred which involves a few steps:

set disk access to AHCI instead of Raid in BIOS
turn off safe boot in BIOS
turn off fast boot in Windows

Unfortunately I ran into the same issue that @BastiatAdmin described in that it stopped the machine from booting Windows and the Ubuntu installation software could still not see the disk on the machine.

However, instead of doing a factory reset I let Windows recover itself after which I ended up with a Windows installation that was running off of AHCI as suggested by @oldfred.

At this point I was able to simply press F12 during startup and boot off my Ubuntu USB stick and install the Ubuntu OS alongside Windows without any issues.

I realise the core issue is that a desktop install for Ubuntu does not support Raid and for that reason it won't see the drive. Changing the access initially stops windows from working and you still can't install Ubuntu alongside it for some reason.
Letting Windows recover from the changed disk access seems to fix everything in the end.


Ubuntu 20.04 LTS two wired networks not working

I figured out why my configuration now works.
The USB adapter could not be added unless there was a working network not connected to a USB device.  It was a happy accident that the internet was plugged in via USB, and it configured itself.
By contrast, I could add the built-in interface before a working box was ready to speak to the network.
I could not reasonably expect gnome-control-center to configure a new USB network interface in the reverse role.  (The embedded box doesn't show itself as aware of the network until the network is started on it, and Linux reports it as "Cablle disconnected.")
I consider that a BUG.


Blank screen after wrongly modifying profile file

If this is 18.04 or newer...

if you can get to the console tty with ctrl-alt-F1 or ctrl-alt-F2
enter username/password

or

At the GRUB menu, select Additional Options
choose the newest-kernel recovery mode
drop to root access
enter root password if required

then

cd /home/username
sudo pico .profile
undo/repair your prior edits
save the file
log out/log in or reboot


What is the strange dot that appeared next to the time when gone midnight?

That dot is meant to appear when you receive some sort of notification.

Notifications that trigger this dot are first shown as cards near the top of the screen. If you ignore a card, it'll eventually disappear and be moved to the notification area, which you can open by clicking on the date and time.

Once you open the notification area, your notifications are marked as read, and the dot will disappear.

From a chat conversation we had, you figured out that its seemingly inconsistent behavior is because of a bug in 15.10 that has been fixed in 16.04.


The paper cuts targeted to the 13.04 cycle can be found here.

The main page is here https://launchpad.net/hundredpapercuts and each release is listed under https://launchpad.net/hundredpapercuts/.

For example:

https://launchpad.net/hundredpapercuts/natty
https://launchpad.net/hundredpapercuts/oneric
https://launchpad.net/hundredpapercuts/precise


Here is a technique that often works. Find out your wireless driver:

sudo lshw -C network

Included in the details for your wireless device will be 'driver=some_driver' Here is an example:

*-network
   description: Wireless interface
   product: Centrino Advanced-N 6200
   vendor: Intel Corporation
   logical name: wlan0
   version: 35
   serial: xx:94:6b:99:55:yy
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
   configuration: broadcast=yes driver=iwlwifi driverversion=3.8.0-26

Next, write a configuration file:

gksudo gedit /etc/pm/config.d/config

Add a single line:

SUSPEND_MODULES="iwlwifi"

Of course, substitute your wireless driver in place of iwlwifi in my example. Proofread, save and close gedit.


Notebook does not power off when battery is critically low

Credits to @A.B. and @Serg for collaboration on solving this issue!
Recently we found the root cause for the problem and the solution:

In Ubuntu 14.04 default gsettings for critical-battery-action are set to 'suspend'.
In Ubuntu 15.04 default gsettings for critical-battery-action are set to 'shutdown'.
In Ubuntu 15.10 default gsettings for critical-battery-action are set to 'suspend'.

So the default setting has to be 'suspend'. You can change that by executing in terminal:

gsettings set org.gnome.settings-daemon.plugins.power critical-battery-action suspend

Now the When power is critically low section in the system settings GUI has no entry any more:

This seems to be a bug in gsettings, as the 'suspend' setting leads to the 'shutdown' action.
As a contribution to help getting this curiosity fixed I filed a bug report at launchpad.net:

https://bugs.launchpad.net/ubuntu/+source/d-conf/+bug/1492174

Update : Status changed to 'Confirmed' because the bug affects multiple users.


Does a CD-ROM drive also have a UUID like a hard drive?

No, they don't.

As this Ubuntu wiki says,

  all filesystems should be specified by UUID= or LABEL= for each partition.
  all physical devices should be specified by a symlink, like /dev/cdrom for a cd drive and /dev/disk/by-id/... for each physical
  hard drive.

To find the UUID of devices, run the following command:

sudo blkid


Ubuntu 20.04 adding to applications list from source - how to install clipgrab

I usually install my apps that way. You approach is correct, your desktop file should look like this:
#!/usr/bin/env xdg-open
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec=/usr/local/bin/clipgrab-3.8.13/clipgrab
Name=Clipgrab
Comment=Grabber program
Icon=/usr/local/bin/clipgrab-3.8.13/clipgrab.png
NoDisplay=false
Categories=GTK;AudioVideo

Ususally (as in this example) I install the code into /usr/local/bin, so I don't have to mess the user path and make it acessible for all.
Since you want it for several users you should move clipgrab to the path mentioned above.
To make is accessible in a terminal you could either add that path to your profile or create a link of the executable to /usr/bin


The bug you posted has "fix released" all over the page. The last release affected by it is "Hardy" so this does not apply to 14.04 LTS nor 14.10 nor 15.04. So yes this particular bug has been solved.

By the way: the kernel nowadays handles the "laptop-mode" tools they are referring to.  Nevertheless this will still work as a tool to check the health of your disk:

  First install smartmontools to be able to query your harddrive :

$ sudo aptitude install smartmontools

  To find your Load_Cycle_Count do this (the last number is the number
  we are interested in) :

$ sudo smartctl -a /dev/sda | grep Load_Cycle_Count

In my opinion there is nothing to worry about.


I think your best bet would be to just reinstall GRUB. Boot into a live session (of whichever distro you have handy) and set up a chroot environment and install grub on it.

Mount the partition you will be using as / (I will call the drive /dev/sda and the / partition sda1, the names may be different on your system, you will need to use the correct ones) somewhere :

sudo mount /dev/sda1 /mnt/foo

Bind the directories that grub needs to have access to

sudo mount --bind /dev /mnt/foo/dev &&
sudo mount --bind /dev/pts /mnt/foo/dev/pts &&
sudo mount --bind /proc /mnt/foo/proc &&
sudo mount --bind /sys /mnt/foo/sys

Set up the chroot environment

sudo chroot /mnt/foo

Create grub's configuration file:

sudo grub-mkconfig -o /boot/grub/grub.cfg

If you have multiple operating systems installed, make sure that the command above lists all of them. For example:

$ sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub.cfg ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.10-2-amd64
Found initrd image: /boot/initrd.img-3.10-2-amd64
Found linux image: /boot/vmlinuz-3.2.0-4-amd64
Found initrd image: /boot/initrd.img-3.2.0-4-amd64
Found linux image: /boot/vmlinuz-3.2.0-3-amd64
Found initrd image: /boot/initrd.img-3.2.0-3-amd64
Found linux image: /boot/vmlinuz-3.2.0-2-amd64
Found initrd image: /boot/initrd.img-3.2.0-2-amd64
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
Found Windows 7 (loader) on /dev/sda2
done

Now install grub to the MBR of your drive (remember to change /dev/sda to whichever drive you actually want to install it on)

grub-install /dev/sda
grub-install --recheck /dev/sda

Exit the chroot and unmount everything so your running system is back to normal:

exit
sudo umount /mnt/foo/dev/pts /mnt/foo/dev /mnt/foo/proc /mnt/foo/sys /mnt/foo

Try booting from the drive, you should have a grub menu this time.


I strongly recommend that you use the ecryptfs-recover-private utility in these cases.

A full explanation of how to use it is available here.


How do I install chemsuite? Getting "configure: error: Can't find X includes" when I attempt to compile

You can probably overcome that particular error by installing the xorg-dev metapackage.

However the REQUIREMENTS file for the tarball says the package requires Qt 2.3.1 and the project web page does not appear to have been updated since 2002, so you will likely have other unmet dependencies and/or version incompatibilities that will make building it challenging.


Kubuntu 17.10 & Nvidia driver = sluggish keyboard

Not sure if this will work, but had a similar issue with lagging keyboard when switching from Nouveau to Nvidia drivers and this worked for me.

Did you blacklist the Nouveau drivers and then update initramfs? after that don't forget to reboot.

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

add the following at the bottom of the page

# This is to remove the nouveau driver which conflicts with nvidia
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off

sudo update-initramfs –u

sudo reboot


Best practice to keep a NTFS partition constantly mounted?

From what i can gleen from the question, you should add the device to the fstab for auto mounting at boot time. I've got several dual boot pc's on my network and they auto-mount the NTFS partition without any usability issues.

My personal mount line in /etc/fstab looks like this:

/dev/sdb1 /mnt/large ntfs user 0 0

if you dont want it to auto-mount at boot, you can always add the noauto flag

/dev/sdb1 /mnt/large noauto,ntfs user 0 0

With this particular line, any user can mount/unmount the volume.


Managing arbitrary user permissions under PureFTPd

Will ACL work for you? For Ubuntu 10.10, mount file systems with the acl option.

sudo vim /etc/fstab

UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx / ext4 defaults,acl 0 1

sudo mount -o remount,acl /

(or maybe there is a separate /home/ partition?) Make groups for this purpose.

sudo groupadd journalists
sudo groupadd associates
sudo usermod -a -G journalists $username_1
sudo usermod -a -G associates $username_2

(The users need to log out and in again to become a member of a group.)

Just to illustrate on a directory, /home/ftp/Pictures, to accomplish "The folder 'Pictures' should be read only for journalists, writable for associates, and invisible for the rest.":

sudo chown -R root.associates /home/ftp/Pictures
sudo chmod 0770 /home/ftp/Pictures
sudo chmod g+s /home/ftp/Pictures
sudo setfacl -d -m u::rwx,g::rwx,o::--- /home/ftp/Pictures
sudo setfacl -d -m u::rwx,g:journalists:r-x,o::--- /home/ftp/Pictures

Now you've got members of the associates group able to read/write everything in /home/ftp/Pictures, while members of journalists can only read (execute) and everyone else has no permission at all.

If we wanted to restrict delete and rename from all but the user who created the file:

sudo chmod +t /home/ftp/Pictures


gedit highlighting " CISCO IOS" can't find one

GEdit uses GtkSourceView for its syntax highlighting.
Language File for IOS based devices.
Language File for PIX/ASA based devices.


Winbind Broken on Reboot In Ubuntu 17.04

I've got the same problem and after some search I've found a typo in the /lib/systemd/system/winbind.service.

In the [Unit] section we've got the line :
After=network.target nmb.service but nmb.service doesn't exist at all !! So I think that winbind will start too early 'cause nmb.service was ignored...

I correct the file, the correct line must be :
After=network.target nmbd.service and winbind works after every reboot !!!


You are missing g++ package. Install it via:

sudo apt-get install g++

If you are going to install it by downloading this package for offline installation, there is a bunch of dependencies, and you need to download and install all of those as well.

These are dependencies for libqt4-dev package on Ubuntu 10.04 LTS.


"Some packages could not be installed" error while installing python3-pip on Ubuntu 16.04

Just remove the python-pip-whl package and try again:
sudo apt-get remove python-pip-whl


Can I migrate from wubi Dual boot to Regular Dual boot?

You should be able to use tar to backup your /home, /etc, /usr, /bin, /sbin, /lib directories. After the new install you can then extract the "tarred" files to the proper directories.

Adapted from user Heliodode on Ubuntu Forums: Source

  Hi, and welcome to the Heliode guide to successful backing-up and
  restoring of a Linux system!

  Edited out: interesting but unneeded banter.
  1: Backing-up
  Edit: more banter

  To do this, become root with

  sudo su

  and go to the root of your filesystem (we use this in our example, but
  you can go anywhere you want your backup to end up, including remote
  or removable drives.)

  cd /

  Now, below is the full command I would use to make a backup of my
  system:

  tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found
  --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /

  Edit add: The file you create will be very large. You may wish to direct this backup to an external device. If you do then change the
  file name (backup.tgz) to /media/external-device/backup.tgz  . Then,
  exclude the /media directory ` --exclude=/media

  Now, lets explain this a little bit. The 'tar' part is, obviously, the
  program we're going to use.

  'cvpfz' are the options we give to tar, like 'create archive'
  (obviously), 'preserve permissions'(to keep the same permissions on
  everything the same), and 'gzip' to keep the size down.

  Next, the name the archive is going to get. backup.tgz in our example.

  Next comes the root of the directory we want to backup. Since we want
  to backup everything; /

  Now come the directories we want to exclude. We don't want to backup
  everything since some dirs aren't very useful to include. Also make
  sure you don't include the file itself, or else you'll get weird
  results. You might also not want to include the /mnt folder if you
  have other partitions mounted there or you'll end up backing those up
  too. Also make sure you don't have anything mounted in /media (i.e.
  don't have any cd's or removable media mounted). Either that or
  exclude /media.

  Well, if the command agrees with you, hit enter (or return, whatever)
  and sit back&relax. This might take a while.

  Afterwards you'll have a file called backup.tgz in the root of your
  filessytem, which is probably pretty large. Now you can burn it to DVD
  or move it to another machine, whatever you like!

  EDIT2: At the end of the process you might get a message along the lines of 'tar: Error exit delayed from previous errors' or something,
  but in most cases you can just ignore that.

  Alternatively, you can use Bzip2 to compress your backup. This means
  higher compression but lower speed. If compression is important to
  you, just substitute the 'z' in the command with 'j', and give the
  backup the right extension. That would make the command look like
  this:

  tar cvpjf backup.tar.bz2 --exclude=/proc --exclude=/lost+found
  --exclude=/backup.tar.bz2 --exclude=/mnt --exclude=/sys /

  2: Restoring  (In this case, after you do a full install. Make sure to use the same version of install disk as the system you are
  backing up.)

  Warning: Please, for goodness sake, be careful here. If you don't understand what you are doing here you might end up overwriting stuff
  that is important to you, so please take care!

  Once again, make sure you are root and that you and the backup file
  are in the root of the filesystem.

  sudo su cd /

  One of the beautiful things of Linux is that This'll work even on a
  running system; no need to screw around with boot-cd's or anything. Of
  course, if you've rendered your system unbootable you might have no
  choice but to use a live-cd, but the results are the same. You can
  even remove every single file of a Linux system while it is running
  with one command. I'm not giving you that command though!

  Well, back on-topic. This is the command that I would use:

  tar xvpfz backup.tgz -C /

  Or if you used bz2;

  tar xvpfj backup.tar.bz2 -C /

  WARNING: this will overwrite every single file on your partition with the one in the archive!

  Just hit enter/return/whatever and watch the fireworks. Again, this
  might take a while. When it is done, you have a fully restored Ubuntu
  system! Just make sure that, before you do anything else, you
  re-create the directories you excluded:

  mkdir proc mkdir lost+found mkdir mnt mkdir sys etc...

  And when you reboot, everything should be the way it was when you made
  the backup!

  2.1: GRUB restore Now, if you want to move your system to a new harddisk or if you did something nasty to your GRUB (like, say,
  install Windows), You'll also need to reinstall GRUB. There are
  several very good howto's on how to do that here on this forum, so i'm
  not going to reinvent the wheel. Instead, take a look here.

  There are a couple of methods proposed. I personally recommend the
  second one, posted by remmelt, since that has always worked for me.


for f in IM*.BMP; do
    n1=${f:2:1}
    n2=${f:3:3}
    new="cam$(( n1 + 1 ))-$(( 10#$n2 )).BMP"
    echo mv "$f" "$new"
done

$(( ... )) is an arithmetic expansion. The 10#$n2 forces the contents of the n2 variable to be handled as a base-10 number, and the leading zeroes are dropped: you cannot use $(( n2 + 0 )) because you'd get an "invalid octal" error for n2 == 008. The $ is optional inside an arithmetic expression, unless you use the base# notation


To start an application at start up and put it in the background simply append & to the command you wish to execute.

An example using AutoKey:


How to update the Gnome Shell version to the latest on Ubuntu 20.04?

Minor dot versions of Gnome Shell likely will make it in your Ubuntu installation at some point. To have faster upgrades with packages that are being tested before release, you may want - on your test system - to enable the "proposed" PPA.

Launch "Software and Updates"
On the "Developpers" tab, check "Pre-release updates (focal-proposed)
Close the dialog: the software sources will update.

Read more about "Proposed", including ways to not have everything updated automatically from "Proposed": strong text
I am afraid that your other options are limited. One can always install by compiling, but that is a daunting task requiring good technical system skills.


The old installation should still be there. If you boot from a Live CD, you can probably recover your home folder.


How to remotely connect to Ubuntu 18.04 with UI and keeping locked screen?

I have always used the application TeamViewer for this. I believe it meets all your criteria and is cross platform. To get it to work right after a reboot you will have to share your network with all users so you do not need to be signed in.
Edit:
I apologize, I misread requirement 2. You can not keep a lock screen on the host monitor while running, although I believe it has a feature to black out the host monitor if that helps in your situation


Is there a way to get the administrator lock opened?

When you run a software installation command (e.g., aptitude, apt-get, synaptic or the Ubuntu Software Centre), the file /var/lib/dpkg/lock is locked to prevent several instances of the command to run concurrently.  The reason to do this is that software installation has to modify vital system files, and concurrent modification may result in some changes not being applied or -worse- in corrupted files.

Although the dpkg package installation system used in Debian and Ubuntu is quite robust and will do the right thing even if an installation is canceled or interrupted, it is usually safer to let the installation finish and then remove the installed package afterwards.


Does Ubuntu follow the Linux Standard Base (LSB)?

For 11.10 and 12.04 the Linux Standard base version is 4.0, as noted on Launchpad. As explained at the Linux Foundation, LSB is

  a core standard for the Linux operating system that encourages interoperability between applications and the platform. It includes a written binary interface specification, a set of test suites for both distributions and applications writing to the standard, and a sample implementation for testing purposes.

The LSB specification outlines standards for many things such as the filesystem, core libraries and key functions such as libc system calls.  It also specifies software packaging standards and that a distribution must support the rpm standard even if its default package system does not use the rpm system.

The specification also contains the standard for runlevels and init scripts, and a related package included in Ubuntu is lsb-base. This package, according to its own description, contains the

  init-functions shell library, which
   may be used by other packages' initialization scripts for console
   logging and other purposes.

The easiest way to demonstrate Ubuntu support for these init standards is to run

grep -ri "BEGIN INIT INFO" /etc/init.d

and then examine one of the files listed. Sudo, for example, will have the LSB header specifications at the start of the script:

### BEGIN INIT INFO
# Provides:          sudo
# Required-Start:    $local_fs $remote_fs
# Required-Stop:
# X-Start-Before:    rmnologin
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Provide limited super user privileges to specific users
# Description: Provide limited super user privileges to specific users.
### END INIT INFO

The directories such as $local_fs that are mentioned by these LSB headers are listed in /etc/insserv.conf. For more information on init, see page 168 of this Ubuntu book

It is difficult to find the specific areas in which Ubuntu diverges from the LSB standards, and the disclaimer on the LSB packages is that the existence of those packages does

  not imply that Debian fully complies
   with the Linux Standard Base, and should not be construed as a
   statement that Debian is LSB-compliant.

In general, however, both Ubuntu and Debian do intend to be compliant and they include the command lsb_release to indicate the distributions' general compliance. However, they will make occasional divergences when necessary, with relation to such things as the filesystem hierarchy, as noted in the answers here:

How to understand the Ubuntu file system layout?


How do I run a macro in the selenium IDE without having to take my hands off the keyboard?

You can use the xdotool command line utility to create mouse (and keyboard) events.

It is quite versatile, so you probably need to look at the manual to find the commands for your particular purpose.

For example, to move the cursor to pixel position 500,500 and click, you would run

xdotool mousemove  500 500
xdotool click 1 # 1 is the left button.


CTRL+C doesn't help qutting "at" utility prompt. How to safely quit?

The quit the at prompt, press CtrlD on a new line:

$ at now
warning: commands will be executed using /bin/sh
at> echo "hi"
at> <EOT>
job 6 at Sun Jan  1 20:20:00 2017

The <EOT> is printed by at on pressing CtrlD.


Volume control keyboard shortcuts not working in 14.04?

I found a bug report on launchpad regarding this issue and it seems when reassigning the media keys some prefix is missing. The following lines are somewhat of a summary of what is discussed in bug report

You can issue the following command to see your current keybinding:

gsettings get org.gnome.settings-daemon.plugins.media-keys volume-up

Output should be XF86AudioRaiseVolume but when I use system setting's GUI and check I find it's value to be AudioRaiseVolume.

You can either reset them via either:

gsettings reset org.gnome.settings-daemon.plugins.media-keys volume-up

or

gsettings set org.gnome.settings-daemon.plugins.media-keys volume-up "XF86AudioRaiseVolume"

Of course the latter is more specific and might not work with all systems out there but I I was happy to find out it's just the string XF86 missing so e.g. I could bind terminal to calculator media key:

gsettings set org.gnome.settings-daemon.plugins.media-keys terminal "XF86Calculator"

For a list of possible keys to map you can use

 gsettings list-keys org.gnome.settings-daemon.plugins.media-keys

play is actually play/pause !

If your setup is different you might want to figure out your media key's name and set it via dconf. I haven't done it myself but it is mentioned in a comment which in turns links back to another askubuntu-question: Where are GNOME keyboard shortcuts stored?.

Edit:
Couldn't help but to play around with it a little bit and as my keyboard is lacking some Previous/Next buttons I found CTRL+Volume-Down/CTRL+Volume-Up useful:

gsettings set org.gnome.settings-daemon.plugins.media-keys previous "<Primary>XF86AudioLowerVolume"
gsettings set org.gnome.settings-daemon.plugins.media-keys next "<Primary>XF86AudioRaiseVolume"


Installing Server over Old R50e lenovo thinkpad

Test this:

Download Ubuntu mini.iso

Here

Burn it on a Cd.

Starts with mini.iso in cd.

Start the installation.

Choose the default language.

Select the keyboard settings.

Select the geographical configuration.

Wait for the system to configure the network.

Write the name of the host.

Choose the replica of Ubuntu.

If you use a proxy server, it will ask you to fill. Otherwise, leave it blank and continues.

Installation of basic packages starts. Occasionally stop to ask you some details.

After downloading the required packages start partitioning.

I suggest choosing manual and manually create partitions as needed.

Done, the system will ask you to confirm the changes made on the computer, including formatting and editing the partitions.

The system will start the download and installation of packages; including the kernel, required for the system to function.

After downloading and installing, configure user accounts, writing full name, username and password.

After analyzing the reply, it will ask if you want to enable automatic updates.

Now comes the most important, the selection of programs.

Do not select anything other than the server.

Will proceed to download and install the files, and then download and install Grub, set the time zone, and warn you when you are ready to restart.

Restarting from the hard drive, it will start in a terminal.

In it via apt-get you can install programs to your needs.


I managed to solve this issue by installing xserver-xorg-input-synaptics-hwe-18.04 instead of only xserver-xorg-input-synaptics.

Looking at the package description (https://packages.ubuntu.com/search?keywords=xserver-xorg-input-synaptics),xserver-xorg-input-synaptics is a virtual package that point to xserver-xorg-input-synaptics-hwe-18.04. I don't exactly know what happened and why installing xserver-xorg-input-synaptics needs to remove a lot of things from my PC but xserver-xorg-input-synaptics-hwe-18.04 works normal.


Can't shutdown and logout from top panel in Ubuntu 14.04 LTS

No need to remove cairo-dock from start-up applications.

Use one of the these solutions:

Find cairo-dock.desktop file ~/.config/autostart and add this code,X-GNOME-Autostart-Delay=20

Steps to solve easily (tested in Ubuntu 14.04)

Run gedit without root
Click open file menu and press Ctrl+H
Open file ~/.config/autostart/cairo-dock.desktop
Add this

X-GNOME-Autostart-Delay=20

Save and close
Reboot your unity/gnome

Delay time more than 20 works fine.

or:

Select cairo-dock startup application from startup application and change command option to:

sh -c "sleep 30; exec cairo-dock -o"

source here and here

or

Create a script called startdock, with the text

#! /bin/sh -e
sleep 20
cairo-dock
exit 0

Make it executable, and in the startup items add a new command with path to this script.

This is a bug as indicated in a comment. The bug report states that

Unity's shutdown/restart dialogue is not working when another application is registered to LauncherEntry interface of Unity DBus.
It seems we have this bug when Cairo-Dock (and its Launcher-API-Deamon), DockbarX or Plank are launched before Unity.

To solve the same problem with Plank dock, replace cairo-dock with plank in one of the above solutions. The same for other applications.


Issue with multiple keymaps when wake from suspend

ldd $(type -p xmodmap) shows that xmodmap uses libX11.so.6 to communicate with the X server. Therefore, one cannot use xmodmap before the X server is running.

$ ldd $(type -p xmodmap)
    linux-vdso.so.1 =>  (0x00007ffc5c1f3000)
    libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f8abffa6000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8abfbe1000)
    libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f8abf9c2000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8abf7be000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f8ac02db000)
    libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f8abf5ba000)
    libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f8abf3b4000)

On my Ubuntu 14.04.5, (YMMV), by using pgrep X, and ps -fp$(pgrep X) and following the PPID field back two steps, I see:

$ ps -fp1851,1801,1603
UID        PID  PPID  C STIME TTY          TIME CMD
root      1603     1  0 Jul27 ?        00:00:00 gdm
root      1801  1603  0 Jul27 ?        00:00:00 /usr/lib/gdm/gdm-simple-slave --display-id /org/gnome/DisplayManager/Displays/_0
root      1851  1801  1 Jul27 tty7     04:30:37 /usr/bin/X :0 -background none -verbose -logverbose 7 -core -auth /var/run/gdm/auth-for-gdm-ZKZ4jH/database -seat seat0 -nolisten t

Which tells me that the X server (X), PID 1851 (on my system, at this time, YMMV) was started by PID 1801 (/usr/lib/gdm/gdm-simple-slave), which, in turn, was started by PID 1603 (gdm).

gdm only starts gdm-simple-slave (which starts X) AFTER you login, so this won't work before login.

Running xmodmap either before X is started, or without putting export DISPLAY=:0 into your script before the xmodmap, AND having done man xhost;xhost +local: in your X session.

Rephrased answer:

Read man xhost.

After you've logged in, open a terminal window and look:

$ echo $DISPLAY
:0

Allow processes running on this system, but NOT running under the X server process to communicate with the X server process:

$ xhost +local:
non-network local connections being added to access control list

This will last until you change it back (xhost -local:) OR until the X server exits, so, if this works for you, put it in your user startup somewhere.

For as long as xhost +locakl: is in effect, you can run your xmodmap in any context (e.g. from /etc/pm/power.d/) by doing:

env DISPLAY=:0 xmodmap ....

or, if you want to use multiple xmodmap commands,

export DISPLAY=:0
xmodmap ...
xmodmap ...

Note: Allowing connections to your X server by "non-network local connections" DOES make your system less secure.


Whats the meaning of " gNewSense is based on Ubuntu"?

It means that Ubuntu developers took Debian, added their tweaks and changes and called this Ubuntu. In turn, gNewSense developers took Ubuntu, added their tweaks and changes and called this "gNewSense". You or me, in turn, can take gNewSense, add something new and make another distribution.

Al of them - Debian, Ubuntu and gNewSense - are Linux distributions, i.e. collections of software based around Linux kenel and GNU software.


My package manager is broken, index files are missing

I used the following website
http://www.howtoforge.com/generate_sources.list_with_source_o_matic
and edited my sources.list

I had a similar problem that I resolved by removing an additional sources line I had put in.

Hope this helps


Wireless connection by using command screen

Since the wireless is using WEP encryption, first make sure to comment out all lines about wlan0 in /etc/network/interface.
Then do the following (replace "essid" and wepkey with your actual wireless name and key):

sudo ifconfig wlan0 down
sudo ifconfig wlan0 up
sudo iwconfig wlan0 essid "essid"
sudo iwconfig wlan0 key wepkey

Check if everything looks fine with:

sudo iwconfig wlan0

Then start dhclient:

sudo dhclient wlan0

If still no success your card might not support adhoc. More information here.

other sources:

How do I connect my server to a WEP encrypted wireless network?


Gnome Terminal primary selection and Ctrl+C / Ctrl+V clipboard sync needed

Choose one of these: klipper or glipper or parcellite or clipit and install it with sudo apt install <package>

Both this and this posts on superuser have more info.

  dpkg-query -l *lipper

ii  glipper        1.0-1.1ubuntu1 Clipboard manager for the GNOME panel
ii  klipper        4:4.4.2-0ubunt clipboard utility for KDE 4

  dpkg-query -l parce*

ii  parcellite     0.9.2-1        lightweight GTK+ clipboard manager


Permission denied for ls in tomcat directory

Thanks for your help guys. I shutdown the computer and when I return, I tried it again and everything works as expected. Apparently the system needed to restart to complete some process.


How do I fix bad font rendering in web broswers?

I agree that this looks like an antialiasing issue. Easiest solution is to install Unity Tweak Tool, open it, click "Fonts", and set antialiasing to RGBA, Hinting: Slight.


Best log file monitoring tool for ubuntu server

I got a demo of this tool, called Splunk, at Infosec this year.  It looks pretty incredible - a viable alternative to tools like LogLogic and LogRhythm.


How do i transcode video files with ffmpeg by piping the in and output over ssh or by sftp

For saving an output via ssh, you should write something like this :

mycommand --sentoStdout | ssh user@host 'cat > /to/dest/file.type'

So, in your case, you should write this :

ssh -p 1022 USER@SERVER cat input.mkv | fmpeg -i - -c:v libx265 -preset slow -x265-params crf=21 -c:a copy pipe:1 | ssh -p 1022 USER@SERVER 'cat > output.mkv'


HybridGraphics vga_switcheroo switch to intel at boot

The commands in rc.local are executed every time your computer boots.

So you just need to add the commands that power down the discrete adapter right before you chown the vgaswitcheroo/switch file

I turn off my radeon adapter every time I boot as well. My rc.local is very simple:

# [...]
# By default this script does nothing.

# turn off the discrete video adapter
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

exit 0

I don't bother with any other scripts, but if you do they should still work just fine. Just put the echo OFF before the chown or any of the other user scripts.

Ubuntu has hibernation turned off by default, but note that if you do turn it on this method doesn't get a chance to run when you come out of hibernation (not sleep) so both adapters will be powered up.


The crash on mythfrontend startup has been fixed with release 0.28.0+fixes.20161106.1434df8-0ubuntu0mythbuntu2.

Mythfrontend now starts and runs, but crashes on exit with seg fault.


You do not need to download the drivers for the Nvidia website, this is not Windows.

First, make sure any partly installed driver is removed, run

sudo apt purge nvidia*

Then reboot and run the following commands

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-375

Now reboot again and your driver is installed.

You claim, this is not documented but it is, please have a search around our FAQ, you will find almost all the basics have been coverd, including this.


I can't make my Ubuntu 18.04 hibernate (I tried use both swap file and swap partion, nothing works)

Look at your /etc/initramfs-tools/conf.d/resume file. It should contain the UUID of your swap partition, like so:

RESUME=UUID=071f8b0e-8e16-4f4d-90ff-a4ae9cc56e2b # use your own correct UUID

To identify the correct UUID to use:

sudo blkid # to display your UUIDs

Look for a line similar to this:

/dev/sda8: UUID="071f8b0e-8e16-4f4d-90ff-a4ae9cc56e2b" TYPE="swap" PARTUUID="d042d9f3-dfe7-4ba9-bbc8-efe6413e7fa4" # your UUID will be different

Then perform:

sudo update-initramfs -c # to create a fresh initramfs image file

reboot # to reboot the computer

Now retest hibernate.


Is it possible to specify a different zshrc file on login over ssh?

In order to change where zsh looks for its user configuratation files (.zshenv, .zprofile, .zshrc, .zlogin), you have to set the ZDOTDIR environment variable to the path where they reside. ZDOTDIR may contain an absolute or relative path, where relative paths are relative to the current working directory when starting zsh. If ZDOTDIR is not set, zsh looks in $HOME.

So, if you put your personal .zshrc into the directory $HOME/.my_zsh, you should be able to use it on the remote server by connecting with the following command:

ssh -t user@someserver ZDOTDIR=.my_zsh zsh

The parameter -t forces pseudo-tty allocation, which ssh usually does only if no command is passed (i.e. if a remote shell is opened). In this case the command ZDOTDIR=.my_zsh zsh is passed, which sets ZDOTDIR (scoped only to the current command) and runs zsh.


after upgrade to 13.10 gnome top panel empty and nothing can be added

No idea why/how this solved the issue but ALT + rightclick > remove Panel on the top-panel and ALT + rightclick > new Panel on the bottom Panel, gave me a new top-Panel where I could add things no problem.


Your XYZ provider will (very likely) have a web page or other configuration interface which will allow you to create an IPv4 address record (A record) to map the domain you lease via XYZ to the IPv4 address of your VPS.

Log on to your account at XYZ and search "DNS" there.  Since every registrar lays their website out differently, you'll have to either share who XYZ is and hope someone using the same registrar can give you specific instructions, or search there on your own.  If XYZ does not provide DNS service at no additional cost for domains it administers, find a new provider.

  I wish to use the Google Public DNS (IPs 8.8.8.8 and 8.8.4.4).

Once you configure your A record with XYZ (or another DNS provider of your choice), it will be available via any DNS server; you don't need to ask your users to configure a specific DNS server in order to obtain the correct IPv4 address.

In theory, it can take up to 48 hours for a new entry to propagate from the DNS server on which it is configured to all other DNS servers, although you won't see this kind of delay if example.com is a newly configured domain, rather than one where you are merely reconfiguring it and existing cached records may exist on other servers.


There is no sound card generally available for PCs that detects the change in resistance caused by such a button press (certainly not anything AC97-based), so this won't work with desktop apps.

But the kernel support for the most part is there though.


How can I move a Windows program to the Dash?

The launcher for your program in fact is a .desktop file, currently living in your Desktop folder. Move (or copy, if you also want to leave it on the desktop) that file to the hidden folder .local/share/applications. It will then automatically be included into the Applications. From the Applications overview, you will be able to pin it into the dash (run the application, then right-click on the icon in the launcher and select "Add to favorites").

.local is a hidden folder in your home folder. Turn on "Show hidden files" in the file manager (tip: you can press Ctrl + h to quickly toggle the setting).


If you're using Xubuntu, the panel should already be on top, with the window buttons on the left and the indicators on the right. If not, you can add a top panel like this by:

Search in the menu for "panel" or use xfce4-settings-manager and click "Panel"
Click the plus (+) button to add a new panel
Set the length to 100% so it takes up the whole length of the screen
You may want to reduce the row size because the default (48) is pretty thick
Drag the panel by the left or right edge to the top of the screen
Check "Lock Panel"
Click the "Items" tab
Click the plus (+) button to add new items
Add "Window Buttons", "Separator", "Notification Area", "Power Manager Plugin", "Indicator Plugin", and "Clock" (This is just a suggestion. There are plenty of other items you can add if you wish)
Go back to the "Panel" window, click the Separator and click the settings button
Check "Expand" so that the icons will be on the right

If you want to make the side panel with icons, it's a pretty similar process:

Search in the menu for "panel" or use xfce4-settings-manager and click "Panel"
Click the plus (+) button to add a new panel
Set the mode to "Vertical"
If you want it to auto-hide, change automatically hide to "Always"
Drag the panel by the top or bottom edge to the left of the screen
Click the "Items" tab
Click the plus (+) button to add new items
Add a launcher for each application
Go back to the "Panel" window, click the Launcher and click the settings button
Click the plus (+) button to add an application
Repeat 10. and 11. for each application
You may want to center the panel again now by dragging it
Back at the display tab, check "Lock Panel"

Remember this is more of a baseline to making it look more like the screenshot. Xfce panels are pretty configurable, so you can try customizing it to your preference.


What's the simplest way to join two JPEG videos?

Simplest methods

The simplest method to join MJPEG videos would be to just use the cat tool or the concat protocol in ffmpeg. But I almost never suggest these as they only work for the simplest formats and there are too many ways for these methods to create broken outputs.

Best method

The concat demuxer is "smarter" than cat or the concat protocol so it is more robust and less likely to create broken outputs.

Create a text file named input.txt listing the videos you want to concatenate.

file 'input1.mov'
file 'input2.mov'

Run ffmpeg and give it input.txt as the input:

ffmpeg -f concat -i input.txt -c copy output.mov

This assumes your inputs have the same attributes: video format, frame rate, pixel format (YUV 4:2:0 vs YUV 4:2:2 vs YUV 4:4:4), width, height, audio format, channel layout, and sample rate.
The example uses stream copy mode (-c copy) so it will avoid re-encoding and therefore preserve the quality.
See FFmpeg Wiki: Concatenate for more info.


Extra items in panel after installing xubuntu over ubuntu

That is the new XUbuntu panel plugin for the new Unity indicator (libindicator & libappindicator).

Right click on the panel → panel → Panel Preferences... → Items tab

Then select Indicator Plugin

Either you remove it completely from panel using (-) button, or as I recommend customizing it.

Click (gear) button
Check "Hide indicators by default"
Check "Application Indicators" to be "Visible"

Why? because some application uses only libappindicator method to show their status icon. You may not want to miss them.


Can I run Ubuntu 12 on P4 3.06 GHz?

Yes, why not?

  I am currently using Windows 7 with no Aero Features.
  I have no Graphics Card and a 16 mb video card.

Ehm, You have none yet you have one?

I am guessing you mean you have no dedicated (plug in) graphics card, but that you have an on-board 16 MB graphics card.  16 MB is not much by today's standards, but there is no reason why that would stop you from running Ubuntu.


Clearing BIOS Administrator Password/password

We've diagnosed the problem, and just need a solution.

Do you have another PC which will woth with the M.2 NVMe SSD from the laptop? If so,

1) Download Ubuntu's ISO file at https://ubuntu.com/download or for a supported 'flavour' with a different Desktop go to https://ubuntu.com/download/flavours

2) Check for download errors per https://tutorials.ubuntu.com/tutorial/tutorial-how-to-verify-ubuntu#0

3) Follow these instructions on a Windows PC to make make a LiveUSB https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-windows#0 or on another Linux PC https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-ubuntu#0

4) Remove the SSD from the laptop

5) attach it as the main drive on that other PC

6) install Ubuntu following https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-desktop#0 except

7) When you get to 6 Allocate Drive Space https://ubuntu.com/tutorials/tutorial-install-ubuntu-desktop#6-allocate-drive-space choose Install alongside Windows which will shrink the Windows partition, give you room for Ubuntu, and install Ubuntu there.

8) When install completes, reboot and Ubuntu starts.

9) Shut down, then remove the SSD from the laptop, put the original drive back in the alternate PC, put the SSD back in the Laptop, and you now have a laptop which boots either Ubuntu or Windows.

Any competent PC shop can do this for you if the instructions seem overwhelming.


What should be the etc/network/interfaces to set a static IP address?

Append the following to /etc/network/interfaces to assign a static address to enp3s0 device:

auto enp3s0
iface enp3s0 inet static
    address 192.168.2.1
    netmask 255.255.255.0
    network 192.168.2.0
    broadcast 192.168.2.255
    gateway <your-router-ip-address-goes-here>
    dns-nameservers 1.1.1.1 8.8.8.8


try this in terminal

gksudo nautilus

You can manage it through the window that it opens.