Trying to create a bootable cd from a mac to boot from my windows pc

There's a guide on how to do this on the Ubuntu homepage:

Launch 'Disk Utility' (Applications → Utilities → Disk Utility).
Insert your blank DVD.
Drag and drop your .iso file to the left pane in Disk Utility. Now
both the blank disc and the .iso should be listed.
Select the .iso file, and click on the 'Burn' button in the toolbar.
Ensure that the 'Verify burned data' checkbox is ticked (you may
need to click on the disclosure triangle to see the checkbox).
Click 'Burn'. The data will be burned and verified.


Emerald window decorator fails to start... sometimes

I think the preferred way to make Compiz use Emerald for the window decorations is to create the file ~/.config/compiz/compiz-manager and add the following line:

USE_EMERALD=yes

The script /usr/bin/compiz-decorator looks for the config file

$XDG_CONFIG_HOME/compiz/compiz-manager

($XDG_CONFIG_HOME is ~/.config by default) for user specific preferences.

So set the command for the Window Decorations module back to /usr/bin/compiz-decorator and create/edit the config file as described above.


Error in building snap package on launchpad

This is a bit complicated, and I'm not sure I can resolve it for you on the spot.  You've found a bug.

Normally, Launchpad doesn't bother to ship out public keys for the archives it asks its builders to build against, since they're all in our datacentre on trusted networks.  This is maybe not ideal, but we configure sbuild to allow unauthenticated archives and so it usually only results in a cosmetic warning.

However, in this case, snapcraft is set up to borrow the build system's apt configuration in order to fetch the packages you've listed in stage-packages, and it doesn't seem to know to also borrow the configuration that allows unauthenticated archives.  Thus, things fail.

I think the best fix is probably to change Launchpad to ship the necessary public keys to the builders, at least for snap builds.  While it isn't strictly needed in most cases, the strange warning confuses people sometimes even when it doesn't cause a hard failure, and it would be a nice piece of hardening.  Please could you file a bug about this?

Separately, I see that you're running into a bzr bug when you tried to build against the primary archive, but at least that one is known and we should have it fixed fairly soon.

Update: This is finally all fixed now.  You'll need to change your snapcraft.yaml a bit for series later than xenial because they don't have valac-0.30-vapi (for yakkety, use valac-0.32-vapi, and for zesty, use valac-0.34-vapi; other changes may be needed), but that's all the kind of thing that you should be able to sort out in your build system.


Failed to listen on 127.0.0.1:80 (reason: Permission denied) PhpStorm Xdebug

Try executing command as follows to check whether port 80 is already used by other program.

ss -nltp | grep -iw 80

If the above command is not found  in your ubuntu (older ubuntu version doesn't have the ss command) then try following cmd.

 netstat -nltp | grep -iw "80"

If port 80 is used by any application , it will be listed there . If you found so then you need to first stop that application or else you need to change the port of that application to something else other than port 80. Atfer that try running your application so it can easily bind to port 80.


How can I update only newly added repositories?

In the following remove tick for all and make tick for the PPA you want and run sudo apt-get update

Run sudo software-properties-gtk to get this


That is not how you use iptables-save

Without any optins it dumps the rules to your terminal, you have to re-direct.

iptables-save > /etc/iptables.rules

http://bodhizazen.com/Tutorials/iptables#Saving_your_configuration

On Ubuntu you should probably be using ufw

see https://help.ubuntu.com/lts/serverguide/firewall.html#ip-masquerading


Canonical Live Patch Service : Response from server not easy

This may mean a CVE vulnerability occurred that cannot be live patched. It may require an upgrade via

# apt-get dist-upgrade

and rebooting with upgraded kernel.

"403" is a transient HTTPS error ("Forbidden"). You should retry the action at a later time.

Hope this helps.


Rectangle select in Pinta freezes with Ubuntu 18.04

This appears it could be a bug affecting multiple users with Pinta: https://bugs.launchpad.net/pinta/+bug/1791916

I can verify this happens on KDE as well, so it's likely not specific to those distros, here is a crash log:

https://gist.github.com/krisives/4ad0953bc483f0883dd98c834c514964

If you don't care about Pita in specific you can try Krita.

I downloaded the code from GitHub (https://github.com/PintaProject/Pinta) and installed the latest MonoDevelop (https://www.monodevelop.com/download/) and opened the Pita.sln file and ran it using that in a debugger in an effort to find the error, but it doesn't happen in that build - which the About dialog says is version 1.7. This could mean:

They fixed this bug in 1.7 - although I don't know if that's released yet
The bug doesn't occur during a Debug build of the project
Updating some other packages when installing the MonoDevelop PPA fixed a lower-level bug that existed in Mono or another system library

You can try 1.7 using their "Daily builds PPA" here:

https://launchpad.net/~pinta-maintainers/+archive/ubuntu/pinta-daily


Access home drive on Windows partition - Cannot find it!

Technically it will be available under /media/Your-User-Name/UUID-Of-Partition/, only if your first mount it using GUI, e.g:

/media/ravexina/af01656da-2149-9e293/

You can use:

ls -l /dev/disk/by-uuid/ | grep -i sd

to have a list of your partitions UUID's.

or:

sudo blkid /dev/sda1

for a specific partition.

Otherwise first you should find out which one of your partitions are actual "C:\" you can use fdisk for this purpose, e.g if your hard drive is /dev/sda then:

sudo fdisk -l /dev/sda

gives you a list of your partitions:

/dev/sda1  *       2048    999423    997354
/dev/sda2  *       1001470 9767710   97576960

Alternatively you can use grep sd /proc/partitions too.

then you can figure out which one of them is your "C:\" drive (Based on the partition size).

After that mount them somewhere, let's say /dev/sda1 is your "C:\" drive:

sudo mount /dev/sda1 /mnt

now it will be available to you at /mnt


You can force a reboot by switching to the root user and issuing the commands to:

synchronize: write data that is in the OS cache to disk

unmount: the file system to ensure it is safely removed before shutdown

reboot: issue a boot flag to force an abrupt reboot
$ sudo -i
echo s > /proc/sysrq-trigger
echo u > /proc/sysrq-trigger
echo b > /proc/sysrq-trigger


Which is lighter/quicker: LXDM or LightDM?

Lightdm depens upon gnome-settings-daemon, so requirements for lightdm ends up in two daemons. Lxde is only one daemon. It seems lxdm is lighter than lightdm in that respect.


Ubuntu 12.04 Automounting ntfs partition

ok classic newbie error.

I created this script /etc/udev/rules.d/11-media-by-label-auto-mount.rules during setting up of my system which is what was causing this issue. Its suppose to be automounting usb disks for my htpc while ignoring system disks.

Contents of the script:

KERNEL!="sd[b-z][0-9]", GOTO="media_by_label_auto_mount_end"

# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"

# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"

# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"

# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"

# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"

# Exit
LABEL="media_by_label_auto_mount_end"

However my disk which I'm having problems with is /dev/sdb1 and hence this script takes over. I have since modified it to ignore sdb by changing the line to KERNEL!="sd[c-z][0-9]"


I've tried similar things in the past. I always seem to run into small annoyances that dissuade me from setups like this. If I were you I would test on a cheap usb flash (before you buy your SSD).

If you're open at all to partitioning your drive, consider partitioning just enough for Ubuntu, and using your external SSD for storage.


Only 8 days into Ubuntu, and I did some damage

Not really. It's technically feasible, but a clean reinstall will be easier to fix this kind of issue.

If you really want to go the hard way, you should boot a live CD and reinstall sudo on your installation. Then reboot and sudo should be working again, allowing you to reinstall all your broken packages, etc.


hibernate:Warning: Tuxonice binary signature file not found

I can only say that this warning doesn't necessary mean that hibernation will not succeed. For me hibernation works even though the warning is displayed. Why it doesn't work in Your case may be a matter of other issues. For example, if I'm not wrong, it may be connected with size of Your SWAP partition (if nothing changed in the meantime, it is recommended to be a size of You RAM memory I believe) or GRUB configuration (boot options).

For the start I would recommend trying some other programs like pm-hibernate. If I were You, I would also check out this question: Hibernation in 18.04 (which seems to contain solution in the answer, hmm...) or this one: How can I hibernate on Ubuntu 16.04? and try to search for more if needed.

And, by the way, I believe it does not really have much to do with dual booting.


Unity Launcher missing and Terminal shortcut stopped working

I just had exactly the same problem on Ubuntu 13.10. Unity launcher gone and ctrl + alt + t shortcut not working. I opened xterm by typing CTRL+ALT+F2 and tried unity --reset, but that did not work since it is deprecated in ubuntu > 12.10.

This solution worked for me:

Log into unity.
Right click on the desktop and create a new folder.
Open the folder and go to /usr/bin and start gnome-terminal by clicking on it.
Type ccsm in the terminal to start compiz config settings manager.
Go to preferences -> plugin list.
Uncheck the automatic plugin list. And enable all the plugins.


Maybe what you are looking for is dbus-monitor inside your xterm, see this similar question: Is there a log of all activity I could open in terminal? especially this answer: https://askubuntu.com/a/767517/997445


Hello I've experience setting up virtual hosts for local development, so I hope this helps you.

Remove the line from apache.conf: Include /etc/apache2/sites-available/mySite.conf

And just run sudo a2ensite mySite.conf command to enable the virtualhost. (The mySite.conf file should be the same in ...apache/sites-available/)

In your VHost conf file edit your DocumentRoot like this

<VirtualHost *:80>
 ServerAdmin webmaster@localhost
 ServerName mySite.loc
 ServerAlias www.mySite.loc
 DocumentRoot /your/project/path
 ErrorLog ${APACHE_LOG_DIR}/error.log
 CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Where ServerName will be the localhost domain for your project and the DocumentRoot /your/project/path will the root folder where your project is hosted (there should be an index.html or index.php). You should only put the path to the folder, not the index.php file, like this: /home/yourusername/projects/mysite/public.

Also, move your project to your home directory so it won't need root permission to access it. You can move the project to /home/yourusername/projects/mysite/public

Now edit with sudo the /etc/hosts file with vim (or nano or sublime or any editor you like). And add this line:

127.0.0.1 mySite.loc

And you probably will see it like this:

127.0.0.1 localhost
127.0.0.1 mySite.loc

Now run the commands to enable the conf site (if you haven't done it before). Reload apache with: sudo service apache2 reload and restart apache with sudo service apache2 restart.

Ok so by now you will have your Vhosts configured correctly, but you must give correct user and group permissions to the folder in apache:

Edit the apache conf file with sudo, usually found on: /etc/apache2/apache2.conf.

Find this lines:

User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

And comment them out and change them to your username and your group name that your project has the owner from, you can find this out by opening the terminal and changing directory to your project using cd and using the command ls -l, you will now see the folder and files username and group name on the left of your files and folders:

~
➜ cd Sites/mySite/public

Sites/mySite/public via  v7.2.24
➜ ls -l
total 0
-rw-r--r-- 1 mauriciogtz mauriciogtz 0 nov  5 11:15 index.php

My files permission owner username is mauriciogtz (on the left) and my group is mauriciogtz (on the right).

Add them like this in your apache conf file:

#User ${APACHE_RUN_USER}
#Group ${APACHE_RUN_GROUP}
User mauriciogtz
Group mauriciogtz

You can use Group staff instead of the group name before if that didn't work for you.
Now look for this block of code:

<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>

Copy it all and pasted right below and change it to look like this:

<Directory /home/mauriciogtz/Sites/mySite/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>

Where the Directory path should be your project path, you can use pwd inside your project folder to get the path.

Restart apache once again sudo service apache2 restart and that should be it. I hope this works for your.


Will a server install suspend if I close the lid?

Reduce Graphics card memory usage in bios (set it to the minimum) .

Ubuntu Server will not go to sleep with the lid closed, but its possible the bios might so make sure any bios related settings are set to performance and look for any power overrides.

  This is important, i recommend you do not close the lid, laptops are
  not designed to run with the lid closed so it may get very hot and
  cause damage. I have successfully used ancient laptops as always on
  devices by removing the lcd panel.


How can I change the shortcut alt+tab to alt+space?

It's placed in Window settings not in Keyboard layout


Why have my google chrome extensions all been put into a tiny dropdown?

You can show all your extensions:

Take your mouse to the right end url bar.
Arrow will turn double-headed.
Drag it to the left.
You may drag extensions as you wish too


How to enable persistent option in disk creator?

From my understanding, the persistent partition is mounted after the root partition is mounted - so you are out of luck.

A workaround is to remaster the ISO and install nvidia-current package on it - you can download the package for remastering here. Once it offers to go into console, do so and run apt-get install nvidia-current. You can then create a new USB with the ISO it produces (usually located in your home directory). Note that you might need 4-5 GB of free space (the final ISO is ~700 megs, though)


Ubuntu 20.04 LTS - Touchpad Edge Scrolling setting won't stay on. Turns off on its own right after I enable it

You have BIOS A01.

There's a newer BIOS, A13, that may resolve your problem, and can be downloaded here

There's two different download files available. One requires something like a freeDOS bootable USB flash, and the other can be done from Windows. Installation instructions can be found at the bottom of the download page.


"Waiting for network configuration" adding 3 to 5 minutes to boot time

First off, this is a new behavior, documented in the 11.10 release notes, that I actually developed together with Scott Moser as an effort to make server boot more reliable.

Commenting out lo will mean you have no local network capability, which will break some programs when they try to use the network. It will also cause your system to never boot because it is so critical. So leave these two lines:

auto lo
iface lo inet loopback

The bits about eth0 meant that your machine was configured to wait for a dynamic address to be assigned to it before the network is considered UP. In pre-upstart versions of Ubuntu (8.10 and earlier), the system would have waited up to 60 seconds for this before continuing the boot. When upstart was added, this condition wasn't waited for anymore, because network interfaces that were not always expected to be plugged in are better managed by something like network-manager.

So, if you have a server, you probably want to wait for a dynamic address, otherwise the system will boot without all of its networks available (which it does if it takes more than 2 minutes to get an address). If you have a laptop that you don't always expect to be plugged in to eth0, then configure eth0 in network manager, and remove only those lines from /etc/network/interfaces, which should get rid of your boot delay.

Keep in mind, there's a known bug with VMware and dbus that also causes this message.


If your home directory is a separate partition (a scheme I prefer for exactly this reason), mounted to /home in your 16.04 installation, it should be as simple as using the same device/UUID in /etc/fstab of your 17.04 installation, provided the UID of your user(s) are identical in both systems.

If you don't use separate partitions (yet), things get a bit more complicated. The (recommended) long-term solution would be to create one for your home, but if you don't have enough spare disk space you'll first have to archive your files somewhere, shrink the 16.04 partition, create a new one for /home and restore your files there.

You could get around that by moving the remaining 16.04 RootFS excluding /home into a new partition, which may be significantly smaller and fit e. g. on sda, but this requires some non-trivial adaption of /etc/fstab, and perhaps other stuff (grub etc.).

A (not very nice) hack for the "all on one partition" case would be to mount your 16.04 partition to some mountpoint (e. g. /mnt/ubuntu16.04) and set a symbolic link from /home to /mnt/ubuntu16.04/home. Be aware that this makes your complete 16.04 installation accessible from 17.04, which may result in unwanted manipulations.

If the UIDs differ on both systems you should first create the users on 17.04 using the same UIDs as in 16.04.


Delete ranges of lines, but skip the comments which come in between the lines

Try using:

sed '2,7{/^[[:blank:]]*#/!d}' infile

This is normally deleting lines from 2~7 but not the lines that starts with a hash as known as a commented line.

The [[:blank:]] character class is used to match and keep those lines that it's a commented line but took whitespaces at behind too either zero or more whitespace.

To be more specifically using the patterns given:

sed '/I love windows/,/New to shell scripting as well/ {/^[[:blank:]]*#/!d}' infile

standard-Complaint sed solution would be:

sed -e '2,7{' -e '/^[[:space:]]*#/!d' -e '}' infile

to read the line number from a variable, just double-quote your variables like "$line" (related: How do I use variables in a sed command?.)

line=2; sed -e "$line"',7{' -e '/^[[:space:]]*#/!d' -e '}' infile

The output is:

Windows user
# I like it
# I want to keep these two lines
New to Mac
Please help!

#EOF


Ubuntu 18.04: how to change keyboard layout from a script?

This method of switching keyboard layouts has been deprecated. The new, just slightly more cryptic way is this:

gdbus call --session --dest org.gnome.Shell \
    --object-path /org/gnome/Shell \
    --method org.gnome.Shell.Eval \
    "imports.ui.status.keyboard.getInputSourceManager().inputSources[1].activate()"

(credits: https://www.mail-archive.com/gnome-shell-list@gnome.org/msg08988.html)

The number in inputSources[1] defines which layout you want. So, if you have two different layouts configured, it will be 0 or 1. You can get a list of the configured layouts by using this command:

$ gsettings get org.gnome.desktop.input-sources sources
[('xkb', 'us+intl-unicode'), ('xkb', 'us')]


No network connection on an HP ProBook 4530s

Ubuntu usually allows you to easily connect to a wireless network by just clicking the name of the network you'd like to use, but most wifi cards need a proprietary driver to work. So go to the "System Settings" > "Additional Drivers" to see if you need to install a proprietary driver for your wifi card.

So if new drivers need to be installed do so by using a wired connection or a mobile broadband.

Can you give the output when you run
    ifconfig
and
    sudo lshw -C network
on your terminal

and as far as wired connection is concerned

Login as root

type :
    gedit /etc/network/interfaces
 in the terminal window.

add the following lines to the end of the file
    auto eth0

`iface eth0 inet dhcp`

save and quit.

now restart the network.
    - How to restart the networking service?


Installing Windows 7 using Virtual Box without having a CD

I'd've made it a comment but I'm not allowed.

I'm using Windows7 through VirtualBox and I don't think things you'd like to do possible.

Another thing - as far as I understand - you can download windows7 from anywhere - it's perfectly legal - the important thing is whither you have a serial number. If you deal with laptop - it must be sticked at the bottom. Then after you'll install the Win7 with your number at VirtualBox - you'd have to make a call to your local microsoft office.


Nvidia-driver-410 depends on nvidia-driver-418?

I solved it using ppa, but the transitional package nvidia-driver-410 from Ubuntu 19.04 repositories didn't make it easy.

First, add the drivers ppa:

sudo add-apt-repository ppa:graphics-drivers/ppa

You can also add NVidia's official CUDA repository which include the drivers, but there is no Ubuntu 19.04 version at the moment (https://www.tensorflow.org/install/gpu).

Then find the version of the 410 drivers available in the ppa:

$ apt policy nvidia-dkms-410
nvidia-dkms-410:
  Installed: 410.104-0ubuntu1
  Candidate: 418.56-0ubuntu1
  Version table:
     418.56-0ubuntu1 500
        500 http://ftp.icm.edu.pl/pub/Linux/ubuntu disco/restricted amd64 Packages
     410.104-0ubuntu1 500
        500 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu disco/main amd64 Packages
        100 /var/lib/dpkg/status

Note that the first package has 418 in its version name because it's actually a transitional package for the nvidia-driver-418. Yes, package nvidia-driver-410 actually installs nvidia-driver-418. No idea why, but this is common pattern for all NVidia drivers on debian distros.

We copy the version name of the second package, i.e. 410.104-0ubuntu1. We could now use it to install the real 410 driver:

sudo apt install nvidia-driver-410=410.104-0ubuntu1

The explicit version specification is required because the transitional package is chosen by default. BE CAREFUL THOUGH! This may propose you to install 418 packages anyway. Read the additional package list carefully! I don't know whether it is the best solution but I solved it by explicitly overriding every 418 package in my request with 410 equivalents:

sudo apt install nvidia-driver-410=410.104-0ubuntu1 libnvidia-compute-410=410.104-0ubuntu1 xserver-xorg-video-nvidia-410=410.104-0ubuntu1 libnvidia-encode-410=410.104-0ubuntu1 nvidia-dkms-410=410.104-0ubuntu1 libnvidia-gl-410=410.104-0ubuntu1 nvidia-kernel-source-410=410.104-0ubuntu1 nvidia-compute-utils-410=410.104-0ubuntu1 libnvidia-decode-410=410.104-0ubuntu1 nvidia-utils-410=410.104-0ubuntu1 libnvidia-cfg1-410=410.104-0ubuntu1 libnvidia-ifr1-410=410.104-0ubuntu1 libnvidia-fbc1-410=410.104-0ubuntu1 libnvidia-common-410=410.104-0ubuntu1 nvidia-kernel-common-410=410.104-0ubuntu1

E.g. when apt proposed nvidia-kernel-common-418 I added nvidia-kernel-common-410=410.104-0ubuntu1 to my command. Tiresome but effective. It would be probably easier to somehow change the priorities of the repositories but I had no idea how to do it.

EDIT:

As pointed out by @fkraiem we can alternatively prioritize the ppa repository to avoid such a long command.

Create a file /etc/apt/preferences.d/graphics-drivers:

Package: *
Pin: release o=LP-PPA-graphics-drivers
Pin-Priority: 700

Now issue the command:

sudo apt install nvidia-driver-410

The PPA repository which contains the real driver package (rather than the transitional package for 418) is now preferred so the driver meta package and all dependencies are installed correctly.


Repair more than 3500 bad blocks in 160 Gb samsung HDD using Ubuntu 12.04

Make a backup of your data NOW and source a replacement disk. 3500 bad blocks is excessive and no block mapping is going to result in a stable working disk for very long. That many bad blocks is a sign of impending hardware failure.


Why do user directories have such lax permissions by default?

It is because you have not set your umask value to something other than your system's default of 022. Read man umask to understand what the bits are about, and man bash about the umask command.

The umask is used by open(2), mkdir(2), and other system calls that create files to modify the permissions placed on newly  created  files  or  directories.
Specifically, permissions in the umask are turned off from the mode argument to open(2) and mkdir(2).


how can I reset the battery statistics for the powermanager?

Edit: Ubuntu now uses freedesktop's UPower power-manager.  After looking through the source for UPower it looks like the persistent database where the history is stored is defined as history-%s-%s.dat.  I searched through my filesystem and my database names are:

./var/lib/upower/history-time-empty-DELL_KP4377-57-22096.dat
./var/lib/upower/history-time-full-DELL_KP4377-57-22096.dat
./var/lib/upower/history-charge-DELL_KP4377-57-22096.dat
./var/lib/upower/history-rate-DELL_KP4377-57-22096.dat

Your file names will obviously be different but they should be in the same directory (/var/lib/upower/)regardless.  These four files, despite being ".dat" files are really just human readable text documents with the history.  I'd say back up these files, then either delete them or delete their contents and you should be good to go!  Let me know how it works.

Original answer:

Good question.  One would think that gnome-power-manager would have it's own log file somewhere for storing it--I can't find anything of the sort however.

It looks like most of the information it reads about the battery comes from acpi via /proc/acpi/battery/BAT0/info (my path is "BAT0" yours might be different from yours)  For example, here's mine:

present:                 yes
design capacity:         5200 mAh
last full capacity:      3665 mAh
battery technology:      rechargeable
design voltage:          11100 mV
design capacity warning: 520 mAh
design capacity low:     157 mAh
cycle count:          0
capacity granularity 1:  52 mAh
capacity granularity 2:  52 mAh
model number:            DELL KP4377
serial number:           22096
battery type:            LION
OEM info:                DP-SDI52

But other than cycle count and last full capacity there isn't a lot of history information here, so there must be another file somewhere that gnome-power-manager is using for the history information.  It's possible that rather than storing it in it's own file it is using some larger database that gnome uses for a variety of settings...  I suppose it's also possible that ACPI might store the history information somewhere as well, although once again there doesn't seem to be any documentation for this.

If they exist, you might get some more attention for your question by people who know gnome-power-manager better if you add some more specific tags, ie. "gnome-power-manager", "acpi", etc.  Sorry I can't help you much, good luck!


How do I pass command line parameters to executables run from Xwindows?

Not directly, no. You'd need to make a launcher (there are other guides too). You could either hard-code the path in or you could use something like zenity:

sh -c '../xpdp1 $(zenity --file-selection)'


How to mount LVM Volumes with myself as owner in fstab

FWIW, I removed the uid and gid options for the LVM volumes, then I tried to do chown on the mount points:

sudo chown -R hooda:hooda /home/hooda/code

And so far it seems to be working across mounts.
Though I'm sure there's a better way to do it. Good enough for me though.


How to fix "E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)"

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/)

These lines says that you are not authorized to install a package. You need root privileges to do it.
So, you must to use sudo to give permission to install the package:
sudo apt-get install unetbootin


I don't have the Unity but this is of the Unity 2d: Is there a way to launch Unity Dash outside of Unity?

You could add those commands to the KDE Menu and assign a keyboard shortcut.

KDE Menu editor online handbook: http://docs.kde.org/development/en/kde-workspace/kmenuedit/index.html

Adding things to the K-Menu: Chapter 2. Adding a Menu Entry.

The advanced tab has the current shortcut key:

  Current shortcut key:

  You can assign a special keyboard shortcut to launch your program.


bad superblock problem , unable to perform input output

Welcome to ask ubuntu,
I would suggest, that you run a live distro and check both drives
sudo smartctl -a /dev/sda
sudo smartctl -a /dev/sdb

If you never used smartctl you can pipe the output in a file and add it here. If you can't read the superblock, you can use e2fsck -p /dev/sdb1. This repairs your superblock.
To keep sure that you don't destroy I would use dd_rescue before that part.


How do you mount a LVM patition that has the same VG name as my current partition

I had a similar issue on my system. I just renamed the external logical volume group.

Beware that this probably makes the renamed drive unbootable! I don't know which files you have to change so you can boot again afterwards.

First get UUID of group to rename. I used

$ sudo vgdisplay

  --- Volume group ---
  VG Name               mint-vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               119,00 GiB
  PE Size               4,00 MiB
  Total PE              30464
  Alloc PE / Size       30464 / 119,00 GiB
  Free  PE / Size       0 / 0
  VG UUID               jWIQCX-uxUT-aG1x-1tpc-1Ixk-pxw2-gL6mlJ

  --- Volume group ---
  VG Name               mint-vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               238,23 GiB
  PE Size               4,00 MiB
  Total PE              60987
  Alloc PE / Size       60987 / 238,23 GiB
  Free  PE / Size       0 / 0
  VG UUID               TZus4Q-JQKU-eyyl-kkEv-liM4-mUXd-e19TcT

I want to rename the first one. Because this is my thumb drive.

Now I know the UUID and can execute a rename. Maybe a mount could also work with the UUID but I didn't care about it.

   $ sudo vgrename -v jWIQCX-uxUT-aG1x-1tpc-1Ixk-pxw2-gL6mlJ mint-stick

   Checking for existing volume group "jWIQCX-uxUT-aG1x-1tpc-1Ixk-pxw2-gL6mlJ"
    Checking for new volume group "mint-stick"
    Archiving volume group "mint-vg" metadata (seqno 3).
    Writing out updated volume group
    Renaming "/dev/mint-vg" to "/dev/mint-stick"
    Creating volume group backup "/etc/lvm/backup/mint-stick" (seqno 4).
  Volume group "mint-vg" successfully renamed to "mint-stick"
    Wiping cache of LVM-capable devices
    Wiping internal VG cache


how to create a symbolic link that works relative to the working directory

I'm a bit confused. You might make a symbolic link beginning at root directory (I mean /). For example,

ln -s /root/try/d s

ls -l
total 0

-rw-r--r-- 1 root root  0 Apr 24 16:15 d
lrwxrwxrwx 1 root root 11 Apr 24 16:18 s -> /root/try/d


Ubuntu 14.04 in VMware Workstation split screen issue after updating

First I found the exact kernel version using uname -r , then I applied the downgrade fix:

 sudo apt-get remove 3.13.0-45-generic
 sudo update-grub
 sudo shutdown -r now

After restarting, it still didn't get fixed, so I reran it again, now downgrading it from 3.13.0-44-generic. After the reboot, it worked fine, and my current version is 3.13.0-24-generic.

Disclaimer: the solution is similar to Ubuntu 12.04 in VMware split screen issue after updating. I decided to add a question and answer here anyway, because it didn't work on the first iteration.


Yes, you can! You must burn the DVD as a bootable ('El Torito' standard) disc from Windows (or some other OS); don't use UDF or packet-writing modes, don't leave the disc open for more material later. Also, don't use DVD-RW discs; only use DVD-R or DVD+R blanks.

No spamware-ridden website is needed to do that. Instead, here are two Open Source free spamfree Windows DVD/CD burner apps:  http://cdrtfe.sourceforge.net/ (English on the right side) and http://sourceforge.net/projects/infrarecorder/

And, as to the failure of the USB drive, well, perhaps USB is not enabled as a bootable device in your BIOS?


Belkin F9L1101V2 wireless will not install on Ubuntu 14,04 LTS

For security reasons, the password is not echoed, not even ******. Please just type it in and press Enter. If it is mis-typed you will be told. If not, the command will be executed as is.


You should use the following steps to hide GRUB (it is still installed)

Run this command in terminal

sudo -H gedit /etc/default/grub

Set these lines (create them if they don't exist), doesn't have to be this order

GRUB_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_DEFAULT=0

Save then close the file
Run this command in terminal

sudo update-grub


I FOUND IT- Here is a detailed list (by help.ubuntu.com) with all of the vendors (apparently) that have ubuntu pre-installed and what type of computers they sell with ubuntu pre-installed. https://help.ubuntu.com/community/UbuntuPre-installed


How to add a shortcut to "update status" of Broadcast/Gwibber configuration in Ubuntu

The specific application that launches when you click "Update Status" is called gwibber-poster. The actual application that handles the Broadcast accounts in Ubuntu is (by default) Gwibber.

To give it a keyboard shortcut, simply open up System Settings -> Keyboard -> Shortcuts, and create a custom shortcut for the command gwibber-poster. I don't have enough rep to post images yet, but here's a link to the image so you know what I'm talking about: Custom Shortcut

Funny enough, I actually figured this out because I was looking up the exact same question. I knew the application was Gwibber, I just didn't know whether there was an option or another command that launched specifically that "Update Status" dialog. So, I typed "gwibber" into a terminal window and hit Tab until it showed me the available commands that started with "gwibber". That's when I saw "gwibber-poster" and decided to give it a shot. Glad I found out about this. Hope it helps somebody else!


How does 13.04 stack up to 12.04 in terms of battery life?

Due to the fact that it uses less resources and is therefore faster, and the kernel has better power management, Ubuntu 13.04 has better battery life than Ubuntu 12.04.

Apparently, Ubuntu 13.10 is doing so well on resource consumption that it even works on really ancient and slow PCs.


Keyboard shortcuts don't work for intelliJ

This seems to be an old issue in IntelliJ: Keyboard layout stop switching sometimes

The current workaround is to change Input Sources order in Settings -> Region & Language and put your desired layout first. No IntelliJ restart required.


Try following the instructions here.   They are pretty easy to follow.

Hope this helps!


The operating system does not decide how to render css, this is done by the browsers.

The only option you have is to use a user css extension, and define a rule like this:

* { box-shadow: none !important; border: none !important; }

This will make them not render.


Booting issue on Ubuntu 16.04 LTS using GNOME 3

I had the same problem, the xserver.xorg goes corrupt so I purge, then reinstall it, to solve the network requirement I used this post (my etc0 doesn’t resolve dns names).

My steps:

Enter grub (hold shift key at boot)
Enter recovery mode (safe mode)
Chose Network (enable networking)
root (drop to root shell)

sudo nano /etc/resolv.conf (this create the file)
add these two lines to the file:

nameserver 192.168.1.1

nameserver 8.8.8.8

execute:

apt-get remove --auto-remove xserver.xorg

apt-get install xserver.xorg
reboot


you can use Chromium browser (the open-source version of Chrome) instead of Google Chrome.

You can run the command chromium-browser in terminal. Thank you.


How can I always boot a particular kernel version?

This is what I do on CentOS, which still uses grub so shouldnt be any different. It was taken from https://wiki.centos.org/HowTos/Grub2

The following will output a list of entries:

awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg

to see current default entry: grub2-editenv list

Now this will change the default entry to the list entry you printed earlier on:

grub2-set-default 2

And to confirm: grub2-editenv list


When the apache package (or any other package) is updated/upgraded by apt (e.g. sudo apt-get dist-upgrade or the unattended updates) and the update/upgrade contains changes to the configuration file, dpkg creates a backup of the old configuration file.
When the upgrade/update is executed manually (e.g. with sudo apt-get dist-upgrade), dpkg asks, if the changes should be applied to configuration file. In your case, it look like the unattended security updates have performed the update and applied the changes automatically.


Don't worry buddy I'm here to help. It's a lengthy process but there's no other way since a program called unetbootin does not work any more.

Firstly go to GParted (if you have it installed) then choose your USB drive from the drop down and format it as NTFS, make sure you can boot from it, to do this on GParted click on your USB drive and right-click and click manage flags make sure your that "boot" is ticked.
Then go to the Ubuntu Software Center and type into the search field "Wine".
When it's installed download 7zip, (make sure you download the .exe version which is the Windows version)
After that right-click on the .exe and go to Properties and go to the "Permissions tab" and tick allow executing the program (it'll say something like that)
After that locate your Windows 8 iso. through 7 zip by clicking on one of the drives, it won't be the C:/ drive.
After you've found the iso, create a file on your desktop called Windows 8 .iso and then extract each file in the iso one by one on to your into that file which you've made, make that file on the desktop to make it easier to find.
After you've extracted each file to the windows 8 folder and everything in the iso drag the files (not the windows 8 iso- just the files inside) to your USB, one by one.
When that's done restart and boot from your USB like you would when you installed Linux off a USB.


Set up secure DNS (over TLS or HTTPS) on 16.04

In Ubuntu there is the dnss package (official site)

From man page:

  dnss is a daemon that can encapsulate DNS over HTTPS.

  It can act as a DNS-to-HTTPS proxy, using https://dns.google.com as a
  server or anything implementing the same API.

  It can also act as an HTTPS-to-DNS proxy, implementing the same HTTP
  API; you can use this instead of https://dns.google.com if you want
  more control over the servers and the final DNS server used (for
  example if you are in an isolated environment, such as a test lab or a
  private network).

  In the default mode of operation, it listens for DNS requests on port
  53, and will query an HTTPS server (https://dns.google.com by default)
  to resolve them.


It won't write any of the partition changes until a couple of screens after that. It explicitly asks you if you want to write the changes to disk, so you would've seen it. You're free to just power off the computer, remove the Kubuntu installer, and reboot into Windows.

Hope you try it again sometime!


No such file or directory for existing executable

If you don't want to fill the computer up with i386 libs that you don't need.

For adb you just need:

sudo apt-get install libc6:i386 libstdc++6:i386

For aapt you need to add:

sudo apt-get install zlib1g:i386

You can see all the libs needed for an executable by running:

objdump -x .../adb | grep NEEDED

Some guesswork and searching is still needed to find the packages containing those files. The "Search the contents of packages" of http://packages.ubuntu.com/ is a good place to do that. Remember to add i386 as the architecture.


How to increase the size of the cursor in Lubuntu 19.04?

Not from the desktop as themes do not support multiple sizes yet. There is a workaround it seems:

From the comment by sroracle to the bug report:

  As a workaround, setting the XCURSOR_SIZE environment variable works. It should be noted that the Xcursor.size resource in ~/.Xresources or similar is ignored however. This issue should be looked at as out-of-box behavior on HiDPI systems is to have the cursor as small as possible.


Why does Dropbox fail with a "dropboxd not found" error?

Are you sure you installed the right dropbox architecture binary?

32bits version
64bits version


Should I turn on zfs-trim on my pools or should I trim on a schedule using systemd timers or cron?

From the ZoL git commit message adding trim support:

  In addition to the manual zpool trim command, a background automatic
  TRIM was added and is controlled by the 'autotrim' property. ...

  Since the automatic TRIM will skip ranges it considers too small there
  is value in occasionally running a full zpool trim.  This may occur
  when the freed blocks are small and not enough time was allowed to
  aggregate them.  An automatic TRIM and a manual zpool trim may be
  run concurrently, in which case the automatic TRIM will yield to the
  manual TRIM.

so zpool set autotrim=on and a periodic zpool trim is the recommended approach.

I'd suggest a cron job (or systemd timer if you prefer) to run zpool trim at the same frequency as you run scrub your pool, which is set as the second Sunday of every month by default (have a look at /etc/cron.d/zfsutils-linux), but on different days of the month so the two aren't running simultaneously.


Logitech M720 mouse pairs and connects but doesn't do anything

Try using hciconfig.
Take a look to this Answer, it seems to fix a similar issue.

Other info :

hciconfig doc : http://manpages.ubuntu.com/manpages/disco/en/man1/hciconfig.1.html
hcitool doc : http://manpages.ubuntu.com/manpages/disco/en/man1/hcitool.1.html
random vs public addresses : https://devzone.nordicsemi.com/f/nordic-q-a/27012/how-to-distinguish-between-random-and-public-gap-addresses


Mouse pointer moves too fast, xinput solves the problem temporarily

1/ Short version : (checked on Ubuntu 16.04)
Update .xinputrc file in your $HOME directory and put your xinput commands inside (one by line). It will be read each time you'll open your session.
If it does not exists, create it : (should have been generated by im-config)
Mine :
# im-config(8) generated on Wed, 15 Feb 2017 19:29:43 +0100
run_im ibus
# im-config signature: 90bece1e5f840b27085989abd900276a  -

#BYME# Put your xinput commands here
#BYME#With DRI2 : Device Accel Constant Deceleration (267)
xinput --set-prop 11 267 2
#BYME#With DRI3 : Device Accel Constant Deceleration (264)
xinput --set-prop 11 264 2

This .xinputrc works for both cases (if DRI3 is enabled or not)
By the way, I'm using multiple screens (mixing 4K and old fashion 16:9 screens) and I feel comfortable having only set Device Accel Constant Deceleration to 2. Feel free to change this (or other) value.
2/ Wrong way to do it :
(DO NOT) add it to your .bashrc or another profile specific file (which can be read many more times and can lead to misinterpretation of what mouse behaviour is actually really applied)
3/ Long version : (working on distributions supporting xinput commands)
To determine which options you should use :
$ xinput --list --short
On my Ubuntu host (I'm using a KVM to switch between my computers), it returns :
Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ No brand Combo Free KVM                   id=11   [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)]
    ↳ No brand Combo Free KVM                   id=10   [slave  keyboard (3)]

So instead of messing with strings (and making errors while typing it), I prefer to use (short) numeric identifiers (knowing now how to find them and their meanings).
In my case, my mouse is under Virtual core pointer, identified as No brand Combo Free KVM with numeric identifier 11. As explained previously, I'm now going to use this numeric identifier instead of the corresponding string but you can do as you want (both work).
To know which properties / capabilities are available with my mouse, I have to type : (adapt this command with the result of the previous one, your own identifier should be different)
$ xinput --list-props 11
Device 'No brand Combo Free KVM':
    Device Enabled (136):   1
    Coordinate Transformation Matrix (138): 1.000000, 0.000000, 0.000000, 0.000000,
1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (266): 0
    Device Accel Constant Deceleration (267):   1.000000
    Device Accel Adaptive Deceleration (268):   1.000000
    Device Accel Velocity Scaling (269):    10.000000
    Device Product ID (257):    4309, 20480
    Device Node (258):  "/dev/input/event16"
    Evdev Axis Inversion (270): 0, 0
    Evdev Axes Swap (272):  0
    Axis Labels (273):  "Rel X" (146), "Rel Y" (147), "Rel Horiz Wheel" (264), "
Rel Vert Wheel" (265)
    Button Labels (274):    "Button Left" (139), "Button Middle" (140), "Button Righ
t" (141), "Button Wheel Up" (142), "Button Wheel Down" (143), "Button Horiz Wheel Left"
(144), "Button Horiz Wheel Right" (145), "Button Side" (262), "Button Extra" (263), "But
ton Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (26
0)
    Evdev Scrolling Distance (275): 1, 1, 1
    Evdev Middle Button Emulation (276):    0
    Evdev Middle Button Timeout (277):  50
    Evdev Third Button Emulation (278): 0
    Evdev Third Button Emulation Timeout (279): 1000
    Evdev Third Button Emulation Button (280):  3
    Evdev Third Button Emulation Threshold (281):   20
    Evdev Wheel Emulation (282):    0
    Evdev Wheel Emulation Axes (283):   0, 0, 4, 5
    Evdev Wheel Emulation Inertia (284):    10
    Evdev Wheel Emulation Timeout (285):    200
    Evdev Wheel Emulation Button (286): 4
    Evdev Drag Lock Buttons (287):  0

This is how we can identify which properties should be changed !
Accel Constant Deceleration (numeric identifier : 267) is doing the job quite well for me. Feel free to "play" with other properties to find the right behaviour for your own mouse.
So, that's why I've added the next line to my .xinputrc, changing value from 1.000000 to 2 (specifying a float is not required) because augmenting deceleration leads to slowing down mouse speed:
xinput --set-prop 11 267 2
4/ Warning : this identifiers can change if you have activated DRI3
DRI2 only, by default, under Ubuntu 16.04 (while it can lead to problems, like with last versions of Chrome, requiring DRI3 to support smooth multiwindow)
If you have enabled DRI3, identifiers should now be :
Device 'No brand Combo Free KVM':
    Device Enabled (133):   1
    Coordinate Transformation Matrix (135): 1.000000, 0.000000, 0.000000, 0.000000,
1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (263): 0
    Device Accel Constant Deceleration (264):   1.000000
    Device Accel Adaptive Deceleration (265):   1.000000
    Device Accel Velocity Scaling (266):    10.000000
    Device Product ID (254):    4309, 20480
    Device Node (255):  "/dev/input/event9"
    Evdev Axis Inversion (267): 0, 0
    Evdev Axes Swap (269):  0
    Axis Labels (270):  "Rel X" (143), "Rel Y" (144), "Rel Horiz Wheel" (261), "
Rel Vert Wheel" (262)
    Button Labels (271):    "Button Left" (136), "Button Middle" (137), "Button Righ
t" (138), "Button Wheel Up" (139), "Button Wheel Down" (140), "Button Horiz Wheel Left"
(141), "Button Horiz Wheel Right" (142), "Button Side" (259), "Button Extra" (260), "But
ton Unknown" (257), "Button Unknown" (257), "Button Unknown" (257), "Button Unknown" (25
7)
    Evdev Scrolling Distance (272): 1, 1, 1
    Evdev Middle Button Emulation (273):    0
    Evdev Middle Button Timeout (274):  50
    Evdev Third Button Emulation (275): 0
    Evdev Third Button Emulation Timeout (276): 1000
    Evdev Third Button Emulation Button (277):  3
    Evdev Third Button Emulation Threshold (278):   20
    Evdev Wheel Emulation (279):    0
    Evdev Wheel Emulation Axes (280):   0, 0, 4, 5
    Evdev Wheel Emulation Inertia (281):    10
    Evdev Wheel Emulation Timeout (282):    200
    Evdev Wheel Emulation Button (283): 4
    Evdev Drag Lock Buttons (284):  0

Accel Constant Deceleration is now idenfified by 264. That's why I've also added (having same behaviour no matter if DRI3 is enabled or not) in my .xinputrc :
xinput --set-prop 11 264 2
Hope it will help you.


Bash script for periodically launching and killing an app

The problem is that all commands are executed from the first line to the last in order. So as @Scott Stensland mentoined you have to put it into background via & (ampersand) to make the timer start.
And furthermore I think getting the PID of your app via searching through process names is a dangerous practice since you might accidentally kill a program which contains the string app in its name. So a safer way is to use the variable ! to get the PID . So your modified script should now looks like this :
while (true); do
  ./app &
  app_pid=$!
  sleep 3600
  kill $app_pid
  sleep 60
done

When you put a process into background via & it goes into the job list of the parent bash process , and via ! you can get the PID of the last job.So it's safe.


If you  want to disable all logs:

Run this command to stop the log daemon.

sudo stop rsyslog

To disable starting the daemon from boot create a file called /etc/init/rsyslog.override with a line containg the word "manual"

You can do this with the following command:

sudo -H gedit /etc/init/rsyslog.override

Now add the word

manual

Then save and exit.

Or do it in single command:

echo "manual" | sudo tee --append /etc/init/rsyslog.override


You need to configure /etc/network/interfaces:

There should be, in that file, the following lines in this order:

auto eth0
iface eth0 inet static
    address 192.168.1.146
    netmask 255.255.255.10
    gateway 192.168.1.1

That way eth0 will gain a static IP instead of the default DHCP address.


Unity displaces windows when switching workspaces

I have been experiencing this bug since a long time in 12.04. A fix has been released but it may take some time before it's backported to 12.04, check out these two bug reports:

https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/1037164
https://bugs.launchpad.net/compiz-plugins-main/+bug/755842


Wiping free disk space by deleting large amount of files regularly?

Erasing parts of a partition or file system

To erase all traces of what was written earlier (in what is now free space) is not a good idea.

If other files are still there, these files may be very interesting for an intruder.
Modern file systems with journaling will often have the information in more than one location, and erasing the memory space, which was used for a file is not enough in this case.

See man shred

 CAUTION:  Note  that  shred relies on a very important assumption: that
 the file system overwrites data in place.  This is the traditional  way
 to  do  things, but many modern file system designs do not satisfy this
 assumption.  The following are examples of file systems on which  shred
 is not effective, or is not guaranteed to be effective in all file sys‐
 tem modes:

 * log-structured or journaled file systems, such as those supplied with
 AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.)

 * file  systems  that  write  redundant data and carry on even if some
 writes fail, such as RAID-based file systems

 * file systems that make snapshots, such  as  Network  Appliance's  NFS
 server

 * file systems that cache in temporary locations, such as NFS version 3
 clients

 * compressed file systems

 In the case of ext3 file systems, the  above  disclaimer  applies  (and
 shred  is  thus  of  limited  effectiveness) only in data=journal mode,
 which journals file data in addition to just  metadata.   In  both  the
 data=ordered  (default) and data=writeback modes, shred works as usual.
 Ext3 journaling modes can  be  changed  by  adding  the  data=something
 option  to  the  mount  options  for  a  particular  file system in the
 /etc/fstab file, as documented in the mount man page (man mount).

 In addition, file system backups and remote mirrors may contain  copies
 of the file that cannot be removed, and that will allow a shredded file

 to be recovered later.

Wipe a whole partition (with its file system) or a whole drive

shred and other overwrite tools/methods can be used in a better way to make old information harder to read, when you wipe a whole partition or a whole mass storage device (the whole drive) instead of individual files or the drive space between the files.

Encrypt the whole file system

But I think that the best way is to encrypt the whole file system with a very good password. This way nothing, not the current files, and not deleted files are possible to read without the password.

Warning: if you forget the password, the data are lost for you too. If the file system is damaged, it is difficult to recover. So you need a good backup, that is stored in a safe place, and a good backup routine to keep your backup up to date.

Ubuntu's installer has an option 'LVM with encryption', which uses LUKS encryption for the root file system. This is often referred to as 'encrypted disk'. See this link,

Install (entire disk with lvm and encryption)


Ubuntu Software Center, Update and pretty much everything else doesn't work :D

You should delete the medibuntu.list file, since the medibuntu repositories are no longer supported or maintained, and are now obsolete.

You can do so by typing

sudo rm /etc/apt/sources.list.d/medibuntu.list

In a terminal. Let me know if this works.


How to add an option to go to hibernate mode in Ubuntu Gnome

This extension: https://extensions.gnome.org/extension/826/suspend-button/ will help you. It adds button next to the settings, lock and shutdown buttons in the top menu - it will look as pause button. For me on Ubuntu 14.04 works like a charm.


If you have downloaded and installed Qt from the Qt website it will be located in the parent installation folder. For example, if you installed in /opt then the maintenance tool will be located inside the /opt/Qt folder.

I don't think the maintenance tool is present if you installed Qt using apt.


On all current Ubuntu versions this library is located in libglu1-mesa package.

You have to install it with:

sudo apt-get install libglu1-mesa


Could windows Interfere with the installation of ubuntu through a live cd?

You probably have to change the boot order. For most Computers the boot order is set in the BIOS. You will have to hit and hold a special key after you turned your computer on. Most likely its Shift or Tab or one of the F-keys. Your machine will give you a hint on the boot screen.

Set the boot order to:

DVD/CD-Rom
HDD
...

Then your computer will try to boot from your CD/DVD-Drive first, then from your Harddisk.


how to print a file in ubuntu terminal using cat that spaces in its name

By ¨abc def¨ do you mean "abc def"?

You can do two things. You can either put a \ in front of the space to tell bash that the next character is a literal space in the file name, like this,

cat abc\ def

Or, you can place the file name in single-quote (') or double quote (") characters:

cat 'abc def'

or

cat "abc def"

If you use tab autocompletion, the first method will automatically be used.

I hope this answers your question.


Plugging in ethernet (internal network, no inet) cuts of Wifi inet

You can try Maythux's answer on How can I give internet priority to wifi instead of ethernet?

Open Network Connections from its indicator on the top panel or open by searching it on the Dash;
Select the wired tab;
Select your network and press Edit;
Uncheck the option: Connect automatically;
Now on your wireless tab select your network and be sure to keep on connect automatically.

After this it should "stay on the internet" with WiFi.


unable to upgrade ubuntu 11.04 to ubuntu 11.10

Try  **sudo apt-get dist-upgrade** in the terminal.


I want to pass an argument into a variable?

If the command you're trying returns specific data, you could use:

test = "$(test -s $testFile)"

When you use $(), you're telling the command line to execute the function passed in a subshell, get the result and print back on the other terminal.


How to remove Grub from Surface Pro MBR?

The Suface Pro is a UFEI machine, with a GPT partitioned disk, so the MBR does not enter into the boot process at all. Check the boot order, it should be USB, CD/DVD, then hard disk
entries for Windows, then Ubuntu.  That should boot Windows when the USB is not present, and the ubuntu entry on the hard disk should never be used.

The SD card should have its own EFI partition, and the bootloader used will be /EFI/Boot/bootx64.efi, which should be a copy of shimx64.efi, and have grubx64.efi present in the
/EFI/Boot directory too.  The grub.cfg three line stub file should be put into /EFI/ubuntu (on the USB).  These three files should be on the hard disk's EFI in /EFI/ubuntu (where they will typically be put regardless of what location you specify for the bootloader at install
time). Copy them over and rename the shimx64.efi to bootx64.efi.

Do check that you have set up booting from the SD card in the UEFI settings.  The Ubuntu entry in nvram for the hard disk may be deleted at some point, it isn't used.  Any problems check what devices are used for the grub.cfg files (/EFI/ubuntu on the EFI partition and in
/boot/grub on the root filesystem.  The hd?s may need to be changed.


How to restore specific directory from tar backup?

You can restore specific directory by following command -

tar -xvpzf path_to_backup backup.tar.gz directorypath_you_want_to_extract -C /

Note if directory you want to extract is /home/Downloads and backup path is /backup.tar.gz then remove the beginning /.

i.e. tar -xvpzf backup.tar.gz home/Downloads -C / and that's it .


What are and how are these files different under /boot?

Here is a brief explanation based on information gathered and note I am not proficient in this area [Warning geeky stuff]:

/boot/System.map-4.15.0-33-generic

Contains the location of the kernel.

boot/vmlinuz-4.15.0-33-generic

Normally the kernel or symbolic link to the kernel.

/boot/config-4.15.0-33-generic

Installed kernel configuration. This file is most useful when compiling kernels on other systems or device modules. Below is a small sample of what the contents of the file looks like.

 CONFIG_X86=y
 CONFIG_MICROCODE=m
 CONFIG_X86_MSR=m
 CONFIG_MATH_EMULATION=y
 CONFIG_MTRR=y
 CONFIG_MODULES=y
 CONFIG_MODVERSIONS=y
 CONFIG_SCSI_DEBUG=m
 CONFIG_I2O=m
 CONFIG_ARCNET_ETH=y
 CONFIG_FMV18X=m
 CONFIG_HPLAN_PLUS=m
 CONFIG_ETH16I=m
 CONFIG_NE2000=m
 CONFIG_HISAX_HFC_PCI=y
 CONFIG_ISDN_DRV_AVMB1_C4=m
 CONFIG_USB_RIO500=m
 CONFIG_QUOTA=y
 CONFIG_AUTOFS_FS=m
 CONFIG_ADFS_FS=m
 CONFIG_AFFS_FS=m
 CONFIG_HFS_FS=m
 CONFIG_FAT_FS=y
 CONFIG_MSDOS_FS=y
 CONFIG_UMSDOS_FS=m
 CONFIG_FBCON_VGA=m
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
 CONFIG_SOUND=m
 CONFIG_SOUND_CMPCI=m
 CONFIG_AEDSP16=m

/boot/abi-4.15.0-33-generic

General: In computer software, an application binary interface (ABI) is an interface between two binary program modules; often, one of these modules is a library or operating system facility, and the other is a program that is being run by a user.

An ABI defines how data structures or computational routines are accessed in machine code, which is a low-level, hardware-dependent format;
Linux Specific: An ABI is a set of conventions that allows a linker to combine separately compiled modules into one unit without recompilation, such as calling conventions, machine interface, and operating-system interface. Among other things, an ABI defines the binary interface between these units. ... The benefits of conforming to an ABI are that it allows linking object files compiled by different compilers.
My understanding is that it helps in communication between programs, code, libraries etc. [ Layman's view ]
See: https://softwareengineering.stackexchange.com/questions/97478/understanding-application-binary-interface-abi
https://stackoverflow.com/questions/2171177/what-is-an-application-binary-interface-abi

/boot/retpoline-4.15.0-33-generic

A retpoline is a return trampoline that uses an infinite loop that is never executed to prevent the CPU from speculating on the target of an indirect jump.

/boot/initrd.img-4.15.0-33-generic

The initrd image contains the necessary executables and system files to support the second-stage boot of a Linux system.

initramfs-4.15.0-33-generic(?)

The initramfs is a complete set of directories that you would find on a normal root filesystem. It is bundled into a single cpio archive and compressed with one of several compression algorithms. At boot time, the boot loader loads the kernel and the initramfs image into memory and starts the kernel

Note: For 7 and 8:

As Wikipedia nicely describes, initrd (initial ramdisk) is a scheme for loading a temporary file system into memory in the boot process of the Linux kernel. Initrd and initramfs refer to slightly different methods of achieving this. Both are commonly used to make preparations before the real root file system can be mounted, but there is a difference.

Initrd is a fixed-size block device, which requires to be 'formatted' by a filesystem such as ext2. It sits on /dev/ram0 by default, and cannot be enlarged or shortened.

On the other hand, initramfs is a cpio archive which is simply unpacked during boot to ramfs memory. This memory is of dynamic size and thus can be shortened or enlarged as needed.

So initramfs seems better, right? Not necessarily. The main problem is that it doesn't support pivot_root. What pivot_root does? It basically 'switches' from initrd to the new root (unioned data structures mounted from CD/USB), but initramfs somehow is not capable of that. It seems there was some circular reference and kernel developers disabled pivot_root for initramfs at all. And without pivot_root we cant transpose the current root with the new one. -- source --, see also this.


How to add sublime text desktop launcher in Ubuntu 20.04.1

Write subl instead of sublime.
sudo subl /usr/share/applications/sublime.desktop


Accidentally deleted Ubuntu system partition during attempted Windows installation

OK, so one good thing is you stopped the install.
You can now do two things:
1>Get another computer with Windows installed and connect your hard drive to it. Then go to http://www.active-undelete.com/ and try using their soft. I'm not sure it will support ext3 or ext4 type partitions but it is worth a try...

OR

2> Burn yourself a live cd/usb of http://ubuntu-rescue-remix.org and see if it works for you.

Also checkout the https://help.ubuntu.com/community/DataRecovery page. Hope the links were helpful. Tell me in comment if any of them worked.


Ubuntu 14.04 comes with PHP5 while Ubuntu 16.04 runs PHP 7. First, check your php version

php -v

Next, you need to decide whether to use PHP5 or PHP7.

If you want to use PHP5 there's a great walkthrough here using Launchpad. This will also give you access to those same PHP 5 modules.

If you want to use PHP 7 you will need to simply install those PHP 7 modules.

sudo apt install php7.0-zip php7.0-curl


How to burn Ubuntu to disc for a pc that has no operating system?

i guess you only used ubuntu with the windows installer or something similar before.

A ubuntu (or any other distro) can boot up a system on it's own. no need for an OS there at all. In fact, even if there was an OS installed, it would be irrelevant to starting the ubuntu install.

Just burn the CD, and configure your BIOS to boot from it. if it's a newer computer, UEFI may give you trouble, but read on and you will be fine.


Ubuntu 20.04 supports only ROS Noetic. If you are not particular about using Melodic, you can install Noetic. But if you want Melodic, and don't want to take the burden of building from source and solving the issues, it is better that you do a clean install of Ubuntu 18.04 and install ROS melodic in that.


I've no idea how this performs but ImageMagick has an identify application that I've got to learn over the last ten minutes. Better than anything, it has a -format argument where you can do maths!

find -iname '*.jpg' -exec identify -format "%[fx:w*h] %i\n" {} \+ | sort -g

Unfortunately, if you get above a certain size, you get scientific notation (eg 1.2*10^3) instead of an integer back from identify. Thankfully sort has a -g argument that will parse them out.

On the same files here, this version (not forking out to Perl) only take 60% of the time the Perl version does. That's not to say Perl is slow, but going into perl and subshelling back out is an unnecessary complication that's slowing things down (I think).

Mine still isn't ideal. Needing to parse numbers back to integers for sorting is fairly slow. Ideally you'd  do this all internally in one language where the size remains as an integer throughout... But the above is the shortest, sharpest one-liner I can do.


Network configuration | apt can't download anything

You don't have DNS working.

Add the directive to interfaces to enable it.

dns-nameservers 8.8.8.8

Full Example for your configuration.

auto lo
iface lo inet loopback

auto eth1
iface eth1 inet static
        address 192.168.5.1
        netmask 255.255.255.0
        gateway 192.168.5.254
        dns-nameservers 8.8.8.8


You find the 'Beta 1' iso files at the ISO testing tracker.

Ubuntu Gnome is 'merged' into standard Ubuntu in Bionic (to be released as 18.04 LTS).

There is also another reason why a Bionic Beta 1 iso file is missing: That flavour of Ubuntu is not taking part in the beta 1 testing.

But all flavours have daily built iso files at the ISO testing tracker.

And standard Ubuntu Desktop is not taking part in the beta 1 testing. So this (among the daily built iso files) is where to find its iso file (at the correct time interval corresponding to 'Beta 1', after that the daily built iso files are updated with new versions of program packages in the development process).


Try this

scp -r -P 11096 user@server:FullPathToFile WhereToSave


How do I install Java? I can't figure it out

You can install java from the commandline with:

$ sudo apt install openjdk-8-jdk

You can get to a terminal commandline by hitting this keyboard shortcut: Alt+Ctrl+T

The $ you see in the commanline is the prompt you see when your enter the terminal mode.  Type in the text the follows and press ENTER.


How to set a website as Wallpaper in Gnome

To change the Ubuntu desktop background, you can right-click the desktop and select "Change Desktop Background." To add a picture taken from the internet:

Change the search location drop-down menu from Wallpapers to Pictures Folder.
Click the plus sign to add a folder.
Browse to the desired picture.

Another way to get there would be clicking on the Dash Home (like Windows start menu) and typing "System." Desktop background settings are under Appearance.

As for using images from the internet, you need to download/save them locally.  An easy way to do this is to find one you like from a site like this: http://www.ubuntuwallpapers.com/.  If you view the image in its own window, for a full view, then it will be cleaner when you use it.  Next right-click on the image and select Save Image as.  I recommend saving to your pictures folder.


How to use `scrot` to take screenshots of a particular window by name?

From man scrot:

       -u, --focused
            Use the currently focused window.

So you could just change your script like so:

#!/bin/sh
while true
do
   scrot -u "$(date)".jpg
   sleep 5
done

However this will start taking screenshots as soon as the script is started, which is probably undesired; this would be a bit more user-friendly, as it will start taking screenshots only after the user has manually selected a window:

#!/bin/sh
scrot -s "$(date)".jpg
while true
do
   sleep 5
   scrot -u "$(date)".jpg
done


Boot Failure from USB Flash Drive after Changed Boot Order

Hi and welcome to Ask Ubuntu!

You could start with this:

Make sure the ISO file you have downloaded is healty (HOWTO). If it's not healty, download it again.
If the ISO is healty, try to switch to another burning program, like uNetbootin.
If it still won't boot, try to boot the live USB on another computer, or try to install the ISO on another USB, if possible.
You could also burn the ISO file to a CD/DVD and boot from that.
Some USB sticks (Sandisk) come with firmware called U3, that will prevent USB booting of Ubuntu from working. U3 Launchpad Removal Tool

If it still does'nt work, let us know and we will try to help you! Good luck!

Several of these suggestions were gathered from other answers on Ask Ubuntu. Thanks!


Ubuntu 18.04 fails to install from USB ISO

Copying the ISO file onto the USB drive won't do anything. You need to write the ISO to the drive, using a program like Rufus. See the instructions on Ubuntu.com: Create a bootable USB stick on Windows


How can I adjust the resolution to avoid the damaged area on my screen?

Here is a dirty hack... Since your damaged area is on the right side of the screen, you can create a panel with black background, align it to the right, and adjust the size carefully to cover the damaged area:

Make it opaque, so it looks really black.

Umm.. It seems you can even use a background image, to utilize the remaining good area... I had never use a background image, now I know why it comes..


I checked the file (downloaded it) and it's videotrack is corrupt....that may be the reason that on-the-fy transcoding didn't work out for you.

Downloding the file is no problem. The only thing you have to do is convert it after you downloaded it.  Open the terminal, go to the directory where you downloaded the file and invoke:

ffmpeg -i gizmodo_2249.mp4 -vn -acodec copy einstein.aac

And almost immediately you'll have exactly what you want: only audio in aac without transcoding so no quality loss.


I Can't Update My Ubuntu? What's the Solution?

Try these commands in terminal:

sudo apt-get autoclean
sudo apt-get autoremove
sudo rm -fR /var/lib/apt/lists/*
sudo apt-get update

Also see the answer of Jorge Castro here


You can set yourself offline after launching the chat window and when you press F4 this time the windows hangs for some time before Google Talk is activated again. I have learned it from:

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


Recommendation for Bluetooth usb adapter

Any of them. Every bluetooth adapter works in Ubuntu as far as I know.


Unable to re-map certain keys with CompizConfig

Very much a workaround but I have instead used compizconfig to map these keys to CLI commands for banshee rather than trying to use the media keys.

Works 100% in banshee therefore but no use if you're using other media players.


You can become owner of a file very easily. Simply do

sudo chown (user) /directory/path/to/file

Note that (user) is probably going to be Ubuntu since you are on a live CD, and that /directory/path/to/file should obviously be replaced  with the file's directory path.

Chown standing for Change-Owner, this will make the Ubuntu live CD the owner of the file. Once you have your new installation you can obviously reverse this with

sudo chown (new_username) /directory/path/to/file

So that your new user can access the files.


UEFI capability does not necessarily imply secure boot capability.  Your machine has UEFI capability, but not secure boot.  It will boot either legacy or UEFI, but when both are possible, your priority is to boot the EFI first.

No secure boot capability means it cannot be enabled, so consider it disabled.


Bumblebee applications running very slow

Yeah. Linux driver support sucks. This is why Linux will never be a Desktop platform for people who value their own personal time. Hardware / chip manufacturers don't write quality drivers for their hardware targeting Linux, so Linux users are out of luck. The only option is to buy hardware that is qualified by Canoncial / Ubuntu / etc to run on certain releases. But this leaves out a lot of the hardware we want to use.


Monitor shows up as unknown on a Dell D630

My dad's got the same laptop.

Just install the NVidia driver the "Additional hardware drivers" dialog recommends you. After that, search in teh dash for NVidia and something like NVidia X configuration utility should pop up. Open it.

How do I install additional drivers?

When you install the NVidia drivers on Ubuntu, you've got to use the tool just mentioned to configure your monitors, not the one included by default.


Formatted Windows 10 partition by mistake while installing Ubuntu. How can I recover it?

It's extremely unlikely that you'll recover a fully working Windows installation. Although you haven't written any files to your Linux partitions, their mere existence means that you've overwritten parts of the original partitions, irretrievably replacing some data on them. If you're very very very VERY lucky, nothing important will have been lost; but chances are at least one or two critical boot files is now toast. If you're merely very very lucky, TestDisk might recover the partition in an intact-enough state to enable you to copy your personal files off. If not, you'll need to use PhotoRec or a similar tool to do a file-level recovery.


How can I encrypt my home folder after a Ubuntu Server 13.10 install?

You can use sudo sudo apt-get install ecryptfs-utils cryptsetup

For more info How To encrypt Home Folder


My time and date settings refuse to open (from the time indicator)

I fixed the problem thanks to @elmicha's comment.
Turns out the application was running but not doing anything for some reason, so I ran killall -9 indicator-datetime-preferences and then indicator-datetime-preferences and it works :D!


Ubuntu Precise 12.04 and 11.10 do not halt the computer completely, but 10.04 LTS does (Asus P5G41T-M)

I'm not sure this is a problem.  shutdown -h means you want it to at least halt and the system decides whether to power off or not (see the man page for shutdown).  -H means you want it to just halt, and -P means you want the system powered down.

If you don't want to, or can't, change the commands in your scripts or whatever, you might want to try this answer.


From a command prompt, try:
sudo nautilus

after typing your password, you should have super user authority to paste files.
Let us know if this works.


This is a problem with the nouveau driver. I have had the same problem on different computers with different effects. Recently I could not open the graphical interface under 18.04.

One solution is to install the proprietary NVidia driver using the graphical interface (software-properties-gtk) or in the terminal (ubuntu-drivers).

Graphical/GUI

In the Software & Updates window (software-properties-gtk) and Additional Drivers tab, you can choose between versions of the proprietary NVidia drivers and the "X.Org X server" Nouveau driver. Take the stable NVidia driver and reboot.

Terminal

Press Strg+Alt+F2 if you can't log in to Graphical/GUI.
Log in with username and password
Enter

sudo ubuntu-drivers install

This should install the NVidia driver
Reboot


Prevent the screen from locking when it turns off

In Ubuntu 18.04 go to Power → Power Saving and set the time period required then in Automatic suspend set to Off


Unknown error: '' ("The cache has no package named wine-staging-i386")

I got the same error in 14.04. Re-installation of wine-staging-i386 package fixed the problem:

sudo apt-get install --reinstall wine-staging-i386


can't connect my Internet Service Provider ftp server

That's not your ISP's ftp server address (unless perhaps you are in their office), it's an IANA-reserved private IPv4 network range.

The suggestion: Contact your ISP and ask them for the outside IP address of their FTP server.

Note: My apologies if this shows up in the low quality answer queue.

Source: http://en.wikipedia.org/wiki/IP_address


Super mega GCC table for all Ubuntu versions: How do I use the latest GCC on Ubuntu?

Ubuntu 16.04 and below

There is an official Ubuntu GCC test PPA which should be preferred:

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

GCC 7 was release in May 2017, so too late for 17.04 main release.

The PPA does not currently have GCC for newer releases e.g. 16.10, only LTS 12.04, 14.04 and 16.04, as can be seen at: https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test | snapshot. I think it had 17.04 previously but it was removed?  See also: https://unix.stackexchange.com/questions/371737/install-gcc-7-on-ubuntu

Tested on Ubuntu 16.04, October 2018.

Ubuntu 17.10 and above

Has GCC 7.2 and clang 4 by default! https://packages.ubuntu.com/artful/gcc | https://packages.ubuntu.com/artful/clang

$ gcc --version
gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0
$ clang --version
clang version 4.0.1-6 (tags/RELEASE_401/final)

GCC 8 on 16.04

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

gives 8.1.0 as of 2018-11.

Default in Ubuntu 18.04:

Install gcc-8 only on Ubuntu 18.04?
https://packages.ubuntu.com/bionic/gcc-8

Crosstool-NG

If you are really serious about this, compile and use your own GCC with Crosstool-NG as explained at: https://stackoverflow.com/questions/847179/multiple-glibc-libraries-on-a-single-host/52454603#52454603

This will allow you to use a wide variety of GCC versions on a wide variety of Ubuntu versions without downloading blobs from PPAs you don't necessarily trust.


Why Gnome desktop services work simultaneously with Unity desktop?

May be this can fix,

get your terminal and type this:
"killall unity"

and remove unity in the startup services or whatever its called.


You have two options for PPPoE as I understand from your question.

Option 1

DSL provided by Network Manager. Just go to Edit Connections… in the Network Settings and you will see DSL on the last tab and Add the connection.

Option 2

In your terminal type sudo pppoeconf and follow the instruction and setup the connection. You can control the connection with sudo pon and sudo poff.


Should I install the proprietary (Restricted) driver?

Generally speaking the open source driver isn't as good as a closed source driver as you probably already know, but looking at recent updates it appears the gap is closing in on some cards in some areas, but it is always a mixed bag that open usually looses.

Ultimately it is up to you which works best and which to choose.  If everything is working fine then that isn't to say you would have an even better experience with the closed source drivers.

A good source of benchmarks is http://www.phoronix.com/scan.php?page=article&item=amd_r600g_compete12&num=1

Which gives a run down on this exact thing.

If I was you I would test both and see which one worked for me.  If the open source driver works perfectly that is just one less thing you need to fool around with post install.

If GNU Freedom is a concern then you have only one choice.

Hope this helps.


Yep, you can use the mini.iso instead. It's like 32mb total and it does an install similar to tasksel like Debian or Ubuntu server where you can choose what to install and it will install it. This also allows the option to not install all the bloat you normally get with a desktop install.

BTW, I do not believe you should install any of the "live" desktops listed. I believe those are not for installation purposes.

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

I believe 14.04 installs a minimal command line environment first, then reboot and type

tasksel

14.10 and newer have a better interface that lets you choose the desktop or apps to install right away. Just choose command line install or graphical install (I think they are actually the same).

UPDATE

I think I found what you are looking for, it's called "alternate install" for Lubuntu and it's for pcs that can't handle the full Lubuntu version and or need to install using a CD rather than a DVD or a USB. The iso is 617mB, however, when you burn the iso to disk it should fit within 600 because the 617 includes reserved space, title of the file, etc ...

http://cdimages.ubuntu.com/lubuntu/releases/trusty/release/lubuntu-14.04-alternate-i386.iso

Also, other processor versions (for older processors) are available at the Lubuntu/Alternate_ISO wiki.

Finally, if you don't have more than 700mB of RAM, you should select the installer from the first boot menu and do not select the installer from the "try Lubuntu" interface as the "try Lubuntu" option uses 200mB RAM to run the desktop.


First of all, have you checked if your sound is muted?

Is your laptop speaker working?

If so, then try to reset your audio drivers by doing this:

sudo apt-get --purge reinstall linux-sound-base alsa-base alsa-utils linux-image-uname -r linux-ubuntu-modules-uname -r libasound2


Cannot boot windows anymore / grub not detecting windows

So in my case the solution was simple:

It turns out on my SSD 1 Windows is installed in BIOS mode
On My SSD 2 Ubunut is installed on UEFI mode.

Because of this GRUB will never recognize Windows and vice versa.

However for the simple solution is:

While booting I simply press F8 - for the list of boot devices to appear- and then select the correct HD. Depending on this choice it will either boot my Windows or my Linux.
This obviously only works because Windows and Ubuntu are installed on complete different HDs.

For me this is good enough!

If you (the reader of this answer) really want to use Grub, have a look at the comments below my question.


transfering data from one cluster to another

The correct way is to generate a ssh key like:
ssh-keygen -t rsa -C "your_email@youremail.com"

on your host machine and copy the content of ~/.ssh/id_rsa.pub and lastly add it to the remote machines ~/.ssh/authorized_keys
make sure remote machine have the permissions 0700 for ~./ssh folder and 0600 for ~/.ssh/authorized_keys.
This way you won't need to enter password everytime.
Reference: How to pass password to scp


Make the following script :

#!/bin/bash
amixer set Master toggle

And bind it to your key.


How can I manually save and restore configuration for ISO bootings?

You should exclude .gvfs from the backup by using --exclude .gvfs. GVFS is a virtual file system used for mounting Windows shares.

There is also no need to chmod it, as the output you got from ls -dl .gvfs/ looks correct.


How Do I Setup Microsoft Visual Studio: Code as a Default Editor?

From Microsoft VSCode's Doc

Setting VS Code as the default text editor

xdg-open

You can set the default text editor for text files (text/plain) that is used by xdg-open with the following command:

xdg-mime default code.desktop text/plain

Debian alternatives system

Debian-based distributions allow setting a default editor using the alternatives system, without concern for the mime type. You can set this by running the following and selecting code.

sudo update-alternatives --set editor /usr/bin/code

Additionally, there is issue mention following

Some need you to set the default for a mime type like:

~/.local/share/applications/defaults.list

[Default Applications]
text/plain=code-insiders.desktop
Which adds Open With Visual Studio Code - Insiders (Ctrl+O) to the nautilus context menu.


Ubuntu can not install: Unable to create Partition Table with gparted

You don't say how old the motherboard is. Could this be due to a BIOS setting to do with UEFI/non UEFI?


How can I split my screen to two separate window?

if you are trying to split your screen in terminal you should use tmux, you just have to type tmux and then ctrl-b % to split it horizantally, if you wanted to split it vertically then type ctrl-b "
i hope this is what you are looking for.


Unable to nslookup deployed nodes on maas server

Well after sometime finally one friend advised me to set up a NAT on maas through iptables rules which I did and that made the deployed nodes capable of accessing to the Internet through maas. Here is what I did exactly on the maas server:

iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables --table nat --append POSTROUTING --out-interface enp3s0 -j MASQUERADE
iptables --append FORWARD --in-interface enp5s0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
service iptables restart

All above from here "https://www.howtoforge.com/nat_iptables".
Then I did this command:

sudo iptables-save | sudo tee /etc/iptables.sav

And that was it, now nodes on the private network can get to the Internet. Still not able to nslookup their names neither on maas nor on nodes.

Time to go on to the next stage, installing Openstack & the burden of juju bootstrapping thing.


Run a command without putting it in history:
Simply put a space before the command. Bash will ignore commands with a prepended space:
Example: Spaceecho "Some secret text"
Note: This only works if the HISTCONTROL variable is set to ignorespace or ignoreboth.

Disable history temporarily:

Run Spaceset +o history or Spaceshopt -uo history to disable history.
Run set -o history or shopt -so history to enable it again.

Disable history for the current session (won't remember any commands from the session):
unset HISTFILE

Note: You'll be able to see the commands pressing Up until you close the terminal.

Remove a command from the history:
Run Spacehistory | grep "part of your secret command"
It will show a list of previously ran commands, in this format:
user@host:~$  history | grep pkill
  302  pkill $$
  467  pkill gone-cal
  468  pkill actionaz
  500  pkill chrome
  550  pkill super

Select the entry number at the left of the command. You can copy it with Ctrl+Shift+C
Run Spacehistory -d <number> where <number> is the entry number to remove the entry.
You can paste that number with Ctrl+Shift+V

Other interesting answers:

@echristopherson
@MoithilBiswas
@dolt


Add to your .zshrc:

alias please='sudo $(fc -ln -1)'


To undo
$ echo ". torsocks on" >> ~/.bashrc

you can open the file in a text editor
gedit ~/.bashrc

or
nano ~/.bashrc

and either remove or comment out (using #) the offending line
# . torsocks on


"Access denied" writing to samba share on Lubuntu (not all folders)

I think you have the right cfg but checked it with a wrong sequence.
try again to create a subdir with create mask and directory mask set. if does not work check on server the permissions and owner with

  ls -l

everything should match the main directory.


The first command connects to default directory on server 192.168.1.x with username directory. You just need to type in your password.
The second command connects to server 192.168.1.x to directory /home/directory. Username is not specified, so you need to provide username and password, after connecting.

Ftp server properties determine, which is root directory or default directory when loggin on. So the first command goes to the directory, which is specified as default per user. The second command goes to home/directory relative to root directory defined in ftp server.


Apparently, this was a hard-to-google kind of issue, but after manually browsing through the settings with dconf-editor, I found what I had to change.

To prevent the user from logging out, locking the screen, or powering off the system, change three settings with these commands in a terminal:

gsettings set org.gnome.desktop.lockdown disable-lock-screen true
gsettings set org.gnome.desktop.lockdown disable-log-out true
gsettings set org.gnome.desktop.lockdown disable-user-switching true

Perhaps this will help someone else in the future.


How to start a program without interrupting my current session?

press Ctrl + z to send current job to background

type fg to bring it back


Swapping to new grub after clean installation on a new drive

It looks like your new (/dev/sdd) disk uses the old Master Boot Record (MBR) partitioning system, which probably means Ubuntu is installed to it in BIOS/CSM/legacy mode. Your original (/dev/sda) disk, OTOH, seems to use the newer GUID Partition Table (GPT) system, and it probably booted in EFI/UEFI mode. I can't be positive of that from the information you presented, though. (As a general tip, do not summarized program output; instead, cut-and-paste such output or provide screen shots. The output of sudo parted -l would remove all doubt about your partition layout.)

If I'm right about your partitions and boot modes, then the presence or absence of a directory called /sys/firmware/efi will tell from which installation's GRUB you're booting. If that directory is present, you've booted in EFI mode (and hence from the original installation); and if it's absent, you're in BIOS mode (and hence booted from the new installation). Given the slightly lower than 100% certainty about your partitions and boot modes, though, there will be some uncertainty about that -- maybe a 2% chance of being wrong.

You could also learn something by examining the /boot/grub/grub.cfg files on both your installations and comparing them to what you see when you boot the computer. That file's format is very complex, though.

You can get some insurance by downloading the USB flash drive or CD-R version of my rEFInd boot manager. It should enable you to boot either installation in EFI mode. (To boot the old installation directly from its kernel, though, you'll need to hit F2 or Insert and add a root= parameter to identify the root (/) filesystem.) If you obtain and test rEFInd on a CD-R or USB flash drive, you'll be prepared in case wiping your old disk renders the system unbootable; you should then still be able to boot the new system and make repairs.


Ubuntu Live CD not so persistent (Unetbootin)

there is a program called etcher, for linux, windows, and osx. it seems to work really well for this job, although the options are limited.


In POSIX (and Linux is a POSIX system), at least when using POSIX file systems, files are allowed to remain open after they're deleted (that is, after they're unlinked, by removing the link from a particular file name to the underlying inode object which is what actually identifies a particular string of bytes as the contents of a file). Files in this state continue to be accessible to code that has an open handle to them (a file descriptor in the user land, other structures in the kernel land), although they no longer have a name1 and anything that tries to open the old name will no longer be able to get them. This means that if you do the following:

$ cat /tmp/foo.txt # step 1
foo
$ rm /tmp/foo.txt # step 2
$ echo "bar" > /tmp/foo.txt # step 3

You're not actually changing the contents of /tmp/foo.txt, rather, you're creating a new, unrelated and independent file that is accessible under the same name whilst the old file no longer is.

Furthermore, POSIX also provides for atomic renames, in which a file is instantly renamed to an existing name, and replaces the original file with no intermediate states. In essence, it's a mechanism which guarantees that nothing will be able to get between step 2 and step 3 above and see the old file deleted but the new one not in place yet.

When apt upgrades a binary that is running, it doesn't actually change the file's contents; instead it uses atomic renames to instantly whisk the new (and completely independent, as described above) file from a temporary name into the old one's place. Anything that had the old file open (this includes processes running it as an executable) will continue to see and use the old contents as if nothing ever happened. But when the process terminates and is restarted, its code will be looked up by name, so the new contents will be used. This also means that it's possible to have processes executing the same named binary, yet running different code.

Note however that the above only applies to individual files. There's nothing to allow atomic replacement of all of an application's resources if they're spread across multiple files, so if, for example, the binary loads a shared library dynamically, or opens some data by name after it's been started, it very well might see something it wasn't expecting and malfunction and/or crash. That's why you get the popup telling you to restart Firefox after it's been upgraded "or you will experience issues".

1 More properly, they no longer have that particular name, as files (that is, inodes) are allowed to be accessible under multiple names. The vast majority of files however only ever have one name, and when they're unliked from it, they will be deleted2 as soon as nothing has them open anymore.

2 This deferred deletion is also why, in some cases, you might delete files to reclaim disk space, only to discover that no space was freed. That's because something has those files open and keeps them in that zombie, nameless-yet-alive state.


As stated by Andrew Shum:

I would have thought someone somewhere would have written a conversion script. With regards to using the file directly, no. Grub runs before your OS and thus before any typical program that could be used to interpret an audio file. In fact, it runs before most device drivers which is why it uses the "beeps" instead of an attached audio system. Note that not all systems have the speaker required for this to work.

(I'm posting this as an answer so that it has reference to those who only are looking for questions with answers, but all credit goes to Andrew. Link above to his profile.)


Testing DNS for samba to function properly - Ubuntu 14.04

The reason you can't use the hosts command is because you are missing the dnsutils package which can be installed by typing the following command

Sudo apt-get install dnsutils

This package should have been installed when you copied and pasted the long sudo apt-get install at the start. So check your not missing other dependencies.

It should be very easy to edit your hosts file by typing the following:

Sudo nano /etc/hosts

To then save your changes press CTRL+o and then hit enter then CTRL+x to exit the text editor.

When following that particular guide editing the fstab is not a required step just if you want to enable  ACLs (access control lists) on that disk and by extension your domain shares.

I've found this to be the best and easiest tutorial to follow so stick with it and you will come out with a working DC at the end!


Create a hotspot on Ubuntu 15.04 (single adapter) help!

This method:

1- Go to network connection (Edit Connections)
2- Click Add
3- Choose Wi-Fi and click Create
4- Type in Connection name like "UbuntuAP"
5- Type in SSID as you wish
6- Choose Device MAC Address from the dropdown (wlan0)
7- Wifi Security select WPA & WPA2 Personal and set a password.
8- Go to IPv4 Settings tab, from Method drop-down box select Shared to other computers.
9- Then save and close.
10- Open Terminal (Ctrl+Alt+T) and type in the following command with your connection name used in step 4.

sudo gedit /etc/NetworkManager/system-connections/UbuntuAP

11- Find mode=infrastructure and change it to mode=ap
12- Now click on WiFi icon in top right and select Connect to Hidden Wi-Fi Network...
13- Then Select UbuntuAP connection and click Connect.
14- Finish :D


Which additional drivers should I enable?

As you say you are going to play games, it is recommended to install and use the proprietary NVIDIA drivers, the latest stable drivers from the NVIDIA long-lived branch are nvidia-375.
You can install them by executing the following command : sudo apt install nvidia-375

Please note that there is currently an issue with these drivers when waking up the computer from suspense. But if you don't use the suspend feature, the drivers are working as expected. You can find many questions on Ask Ubuntu which are related to this topic, a later on update might fix this.

intel-microcode option lets you use newer firmware for the intel CPU - to install it execute :
sudo apt install intel-microcode It is not necessary to install it, but to some extend it is recommended, because otherwise you use the old firmware that came with the shipped BIOS.

Note : To make use of the newly installed drivers and firmware, you have to reboot the system.
Necessary additional packages such as nvidia-prime (if you have a notebook with NVIDIA Optimus support) and nvidia-settings are getting installed automatically with the drivers.
If this for whatever reason does not happen, you can just install them manually afterwards.


How to install latest grub2 version on Ubuntu 12.04 LTS

If you truly feel the need to update grub2 from v.199 to 2.02 I suggest that you upgrade to either trusty or xenial. This will have the added benefit of providing you with a system that will be in support for over a year instead of under a year.

Source:

http://packages.ubuntu.com/search?keywords=grub