when installing windows its cut 100 MB for system reserved from my other drive ext4 file system .may be hard disk dameged

Windows installs it boot partition and boot loader to the MBR of the drive set to boot from with BIOS. It needs a primary NTFS Partition with the boot flag.

If installing and you do not want separate boot partition set boot flag on the primary NTFS partition you install into. Make sure BIOS is set to boot from that drive. Windows primarily has separate Boot partition, so you can encrypt the main install. The boot partition also has the recovery files, so you may need to make the separate repairCD or flash drive to repair Windows easily.

You may be able to use testdisk to restore partition table, but the sectors Windows overwrote will be damaged.
If you had data you do not have backups, then the only recourse is photorec which is part of testdisk. But that can be a long slow process.


How can I find out the device/partition on which Windows was installed?

The Windows partition should be called (Windows SyS Drive) in Gnome Disks in Ubuntu!


How migrate my keyring (containing ssh passprases, nautilus remote filesystem, pgp passwords) and network manager connections?

Wifi Passwords

So as a partial solution I can confirm that migration of network manager passwords for wifi connections was successful. The procedure for network-manager passwords is:

Stop network-manager:

sudo service network-manager stop

Copy the necessary files in /etc/NetworkManager/ with:

sudo cp -r /BACKUPDESTINATION/etc/NetworkManager/{system-connections/,VPN} /etc/

Restart network-manager:

sudo service network-manager start

And you're done. I still haven't figured out how to copy passwords in the keyring (for ssh, gpg and remote-filesystems). It drives me mad!

Migrate keys and passwords

Finally I know, what was wrong. First of all the keys moved from the old ~/.gnome2/keyrings to the new ~/.local/share/keyrings. Probably due to the switch from Gnome to Unity. Also there seem to be additional files there, aside from the usual login.keyring and user.keystore. At least there where for me after a fresh install. Those hinder migration and I had to delete them.

As mentioned both user ID and user password on my new system matched their counterparts on the old system. If for you they don't, it might probably work to set the password on your old installation to blank (i.e. change your password to no password / empty password). Do that prior to backing up your old system.

Now here is what I did:

Backup the keyfile of the fresh installation in case something goes wrong:

mv ~/.local/share/keyrings ~/.local/share/oldkeyrings

Using move also makes sure that the other new files in ~/.local/share/keyrings are not there to interfere.
Copy the old keyring to the fresh installation:

mkdir ~/.local/share/keyrings && cp -r /BACKUPDESTINATION/home/$USER/.gnome2/keyrings/{login.keyring,user.keystore} ~/.local/share/keyrings

For gpg keys you'll have to copy ~/.gnupg over to the new install as well.
Make sure only you can access them and own them:

sudo chmod -R 600 ~/.local/share/keyrings/ && sudo chown -R $USER:$USER ~/.local/share/keyrings

(might not be necessary)
Log out and back in again


I just tested a few editors by right-clicking on a text file in nautilus, selecting open with/other application

and then clicking on find applications online. One I liked (apart from my standard editor, bluefish) was LeafPad, small, fast to open, nothing fancy.


Once you have jar file, you can run it:

1) From the command line with java -jar ./jchempaint-3.3-1210.jar.

2) Or through a jchempaint.desktop file, which you can place in /usr/share/applications so it will show up in Dash and be able to be locked to the Launcher.

The .desktop file would look like

[Desktop Entry]
Type=Application
Name=JChemPaint
Comment=Chemistry 2D Modeler
Exec=java -jar path/to/install/folder/jchempaint-3.3-1210.jar
Icon=/path/to/icon.png
Terminal=false
Categories=Science


How can I delete files from low graphics mode?

You need to delete some files. The best place to search is in your home directory. Most likely in your ~/Videos folder. So, from the command line (Ctrl Alt F1) first run this:

cd ~/Videos

Then, look at what you have there. This command will show you the files ordered by size:

ls -lSr

Now, remove some of the bigger files:

rm "video file name.avi"

Once you have removed enough files, restart your computer and you can continue the cleanup using the GUI.


Mouse and keyboard issues when dualbooting Ubuntu and Windows 10

A potential cause for the freezing of the keyboard and mouse on Ubuntu 16.0.1 is that the Ubuntu system is under excessive load, for instance runs very low on RAM when the input freezes. You can diagnose that by typing

top

in a terminal window (Ctrl - ALT T). While freezing may be an issue with your mouse or keyboard driver in my experience occasional or hickup freezing of the mouse or the keyboard is often a symptom of other issues with your system. For instance a process that eats all memory or overheating.

I experienced the same symptoms that were caused by excessive load and I resolved the cause of the load. In my own case I discovered my previous swap RAM was missing after an Ubuntu 16.04.1 update. Adding swap did not revolve the issue as the memory still quickly ran full via a fcitx startup process. I also had to deinstall fcitx and em-config and installed a proprietary driver for my Intel board (Processor microcode firmware for intel cpu) offered via the Ubuntu Software Center (Menu: Edit - Package sources - Tab Additional drivers). Your case and solution may be entirely different but first you should monitor CPU and memory.

The reason why I recommended you "top" instead of the standard system monitor utility was that in situations where your system input freezes/hickups it gets more difficult to launch the system monitor gui utility. If you are able to launch it, you may as also take the "system monitor" tool for diagnosis.


Try proxychain , very similar tool

https://superuser.com/questions/424045/a-software-like-proxifier-for-linux

Other options are to tunnel over ssh


install docker on Ubuntu Desktop 14.04 LTS

Even when it was getting stuck with the step#11. I went ahead with the remaining steps and was able to install it finally.


From the ubuntu guide you referenced:

  If the following error messages appear when loading sha256 and aes:

sudo modprobe sha256
WARNING: Error inserting padlock_sha (/lib/modules/2.6.24-21-generic/kernel/drivers/crypto/padlock-sha.ko): No such device

sudo modprobe aes
WARNING: Error inserting padlock_aes (/lib/modules/2.6.24-21-generic/kernel/drivers/crypto/padlock-aes.ko): No such device

  it is an indication that the system does not have a hardware cryptographic device (source: Ubuntu Bug #206129)

  The workaround is to add the following lines (using your favourite editor) to the bottom of /etc/modprobe.d/aliases and re-run the modprobe commands for the sha256 and aes kernel modules:

alias sha256 sha256_generic
alias aes aes_generic

  When utilising Gnome to mount the encrypted filesystems, it is not required to manually load the kernel modules.

See also : https://bugs.launchpad.net/ubuntu/+source/linux/+bug/206129


Where does Thunderbird store archived IMAP emails?

If you didn't change the default profile, Thunderbird will save imap accounts in ~/.thunderbird/something.default/ImapMail and Directories there for your different accounts.

Anyways, you can have a look in ~/.thunderbird/profiles.ini under [Profile0] to see the path it is using for your profile.

LocalFolders and Pop accounts are in ~/.thunderbird/something.default/Mail directory.


Check the max allowed threads count for sure

There is no threads per process limit!

But there is a limit on the total number of processes on the system (threads are essentially just processes with a shared address space on Linux)

cat /proc/sys/kernel/threads-max

The default is the number of memory pages divided by 4.  You can increase this like:

echo 100000 > /proc/sys/kernel/threads-max

There is also a limit of processes (threads) that a single user may create, see ulimit for this, but this should be unlimited on Ubuntu.


cannot create a partition table on /dev/sdb

As the device is present in the list of 'lsusb', the only option you could try out will be to format the pendrive completely.

But before that, open 'Disk Utility' and check whether the pendrive is present. If present you could format and partition from that application itself.

If the device is not found in 'Disk Utility', you will have to format using the command:

dd if=/dev/zero of=/dev/sd(x)

where (x) can be b, c, d etc. Care is to be taken as selecting the wrong device can even endup formatting your harddisk.

If your pendrive have a led indicator, it must indicate that the device is busy when the above command is executed.


What's wrong with my grub configuration?

Remove Windows 7 hidden partition if You haven't and run sudo update-grub.


My computer keeps restarting when I try to install Ubuntu. Why?

Just follow the steps:

Before booting the installation disc try to make sure the you have an empty partition with some space greater than 10GB. Note the label(name) of the parition.
Restart and follow the instruction just as you previously did.
Try to install it with the option 'Something else' and select the empty partition that you've created.
Click Change below and select the file format as 'Ext4' and check 'Format the partition' and select the mount point as '/'.
Then follow the installation with your desired steps...


How to fix "undefined reference to to `SSLv3_client_method`" during cURL custom installation

I finally get this error out !

For that I needed to build a libssh2 version and build a curl version which used that.
Maybe it is a problem with the bundled curl 7.35.0 in Ubuntu 14.04 (because I used a 7.46.0 during the correction).

So I downloaded a libssh2 source package then I build it :

./configure
make
make install

And I built my curl instance to use this libssh2 :

./configure --with-libssh2=/usr/local --disable-shared
make
make install

With that I have an operational instance of curl 7.46 (the lastest stable) which is also able to use the SFTP & SCP protocols.

I needed to use the --disable-shared flag to force a new compilation of different libs. Without that, the SFTP / SCP are not enabled... Maybe someone can give me some details here...

No more errors about the missing SSLv3_client_method, everything is ok !


Remove unknown network device names listed in network manager

Those extra entries must be software devices like bonds, bridges, teams, etc.
First locate the names of the aforementioned software devices with nmcli
Then use nmcli device command to delete any interfaces.
Such as
nmcli device delete enp0s20u5u*

where enp0s20u5u* is replaced with the software device you found in the previous step.
Note that this only works for software devices like bonds, bridges, teams, etc. Hardware devices (like Ethernet) cannot be deleted by the command.
Source: man nmcli


How can I share my internet connection via bluetooth?

I am not sure if there is any good way using native bluetooth app that ships with ubuntu but I am going to use a pretty old app called blueman.

install it using

sudo apt-get install blueman

Now from untity search for blueman and you will get bluetooth manager click on that and you will get window and blueman service will be enabled.

now you can see two bluetooth icons on top panel of unity. one will be native and other will be blueman's

click on blueman's icon and click local services.

Now from the window click network. and enable Network Access point, click apply and save it.

Now you can access internet using bluetooth of your computer after pairing them and connecting.


Problem installing Nvidia drivers on 840m (12.04)

I have been able to get mine working using xorg-edgers.

sudo add-apt-repository ppa:xorg-edgers/ppa

sudo apt-get dist-upgrade

sudo reboot

Reboot and go to your additional drivers and usually I find the 340 driver installed and the nouveau driver.  Select the nvidia driver let it switch drivers and reboot again.  when the driver is installed nvidia-xserver settings show all the info about your card.  I have a MSI gp60 same gpu.  However I have never been able to get it to top randomly freezing.  And when i open up system details it still says my intel chip is the gpu.
I also get the unknown chipset error.


mount a disk as /mydisk and show it in file browser as devices

I think the easiest way is to bookmark this location. It will be accessible the same way, just placed in Bookmarks instead of Device section.

There is also easy way to put it in Places section if you would like to. Just edit ~/.config/user-dirs.dirs.


How to install packages when dependency is already installed from PPA?

@dsstorefile1 gave the right hint to fix my issue:

The ppa I linked in the question was made for 16.04 when I installed it, but it changed and the the maintainer removed most packages for xenial including libpng12-0.

So this is how I fixed the situation:

Remove the ppa using ppa-purge:

sudo ppa-purge ppa:otto-kesselgulasch/gimp

Downgrade the libpng12-0 package to the version from the official repos:

sudo apt install libpng12-0=1.2.54-1ubuntu1.1

Install libgdal-dev:

sudo apt install libgdal-dev

I also noticed that following packages are also leftovers from that ppa:

libbabl-0.1-0
libgegl-0.3-0
liblcms2
libwebp6

So, I also downgraded/removed these:

sudo apt install libbabl-0.1-0=0.1.16-1
sudo apt install libgegl-0.3-0=0.3.4-1ubuntu2
sudo apt install liblcms2-2=2.6-3ubuntu2
sudo apt remove libwebp6 #no candidate from repos


You don't have to boot into Ubuntu 12.04 and then upgrade to Ubuntu 13.04. If you want to install Ubuntu 13.04, download it from here (choose 32 bit or 64 bit) and put it on a CD or USB. Then, restart your computer and press F12 or another function key (based on your system) to boot from the CD or USB. Then, you can hit Try Ubuntu if you want to try and recover your data, otherwise hit Install Ubuntu and follow the remaining directions to install a fresh copy of Ubuntu 13.04.


this link will help u
http://www.ubuntu.com/download/desktop/upgrade

Launch the update manager
Press the Superkey (Windows key) to launch the Dash and search for Update Manager

Check for updates

Click the Check button to check for new updates. If there are any updates to install, use the Install Updates button to install them, press Check again after that first update is complete — then press the Upgrade button.


Can I install a firewall interface without `menu`?

I found a deb on planet ubuntu that doesn't require menu :D! Solved. It is for a newer version of gufw.

Fortunately gufw  no longer requires menu.


Ubuntu 16.04 tar backup with progress bar PV (Pipe Viewer) not working

EDIT: Full code, working!

#!/bin/bash

TODAY=$(date +%d-%m-%Y)
f="tekst.txt"
type pv > $f
if grep -q "pv" $f; then
    echo "PV exists"
else
    echo "Installing PV..."
    sudo apt install pv
fi
f2="home_backup${TODAY}.tar.gz"
echo "Your username is: $(whoami)"
echo "1) Backup your home directory"
echo "2) Extract your backup"
read -p "Choose the option: " choice
if [ -z $choice ]; then
    echo "Choose the option"
    continue
elif [ $choice -eq 1 ]; then
    echo "Backup directory: /media/backup/"
    sleep 1
    echo "Backup Process Activated"
    sudo tar -cf - /home/$(whoami) -P | pv -s $(du -sb /home/$(whoami) | awk '{print $1}') | gzip > /media/extracted/$f2
elif [ $choice -eq 2 ]; then
    echo "Extracting your backupped home directory from /media/backup/"
    echo "Extracted directories go to /media/extracted/"
    sleep 1
    echo "Extraction Process Activated"
    pv /media/extracted/$f2 | sudo tar -xzf - -C /media/extracted/
fi


So you want something like this?

+------------+             +---------------+            +--------+     Rest
| DVD player |<-- wired -->| Ubuntu Bridge |<-- wifi -->| Router |<--> of the
+------------+             +---------------+            +--------+     network

You can do this easily with Firestarter. On your Ubuntu machine, install firestarter:

sudo apt-get install firestarter

When you first launch firestarter, it will step you through the wizard. It will ask for your internet-connected interface. Choose "wireless device (wlan0)" and check "IP address assigned via DHCP" if your router is using DHCP. DHCP is short for Dynamic Host Configuration Protocol, which is the method used to assign IP addresses to clients on the network. In most cases, this is the default, especially in residential routers.

In the next screen, check "Enable internet connection sharing". Your local area network device should be your Ethernet device (eth0). What this will do is "bridge", or more precisely, perform Network Address Translation between your two network interfaces. Any devices connected to the wired interface will be automatically assigned an IP address, through DHCP, from your wireless router. It's all transparent from the DVD player's perspective.

This takes care of the software side of things. But you're not done yet.

How does your DVD player connect to your Ubuntu machine? A direct connection with an Ethernet cable may or may not work. The reason lies in the fact that network cables are actually bundles of 8 smaller strands. The order in which they are arranged at the plastic plug (the 'jack') is important. A simple Ethernet cable is 'straight-through', meaning the order of the 8 strands is the same on both ends. For a direct connection where there is a client on each end of the cable, a 'cross-over' cable is required. From the name, you would be right in thinking that the 8 strands will appear to be crossed-over when compared end-to-end.

So in your case, if you have a switch or hub in between your DVD player and Ubuntu machine, you can use a straight-through (normal) Ethernet cable. If it is a direct connection, you'll need to use a cross-over Ethernet cable.[1] A good analogy is if you're talking to me directly, you have to put your mouth to my ear so I can hear you (cross over). If we are talking on the phone, then we don't do anything special because the telephone system does the "crossing-over" for us. In essence, the telephone system acts as the router.

Once you've sorted that out, that's it! Your DVD player should be automatically assigned an IP address by your router and it will be accessible to/from other computers on the wireless network. Note that this arrangement is technically not a subnet bridge; everything is on the same subnet. Unless you specifically want two separate subnets (i.e. 192.168.1.x addresses for the first subnet, and 192.168.2.x addresses for the second subnet), this is the way to go.

[1] Some network devices are smart and they automatically "cross-over" when needed. In this case, any cable will do and it Just Works.


Nvidia driver not working (Error querying enabled displays on GPU 0 (Missing Extension). )

I solved the problem. A really stupid mistake on my part...

So here goes:

I gave up all hope and tried to install the drivers using the drivers from the Nvidia site itself http://www.nvidia.com/download/index.aspx . So I ran the installer after purging my current driver installation using

sudo apt-get purge nvidia*

However, the installer failed and I had lots of errors and warnings so I figured that was due to me tinkering around so much with that many installs and purges.

So I went to reinstall my whole OS from scratch (even downloaded the ISO again, followed by making a bootable usb drive). Now after my clean install, the first thing I did was install the nvidia drivers

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

Now when I got the secure boot screen after the reboot, I previously just hit enter and went through it...but today with a fresh mind I realised that this didn't turn off secure boot and you have to use the dialog and enter your password in order to disable it. So I did.

A final reboot and everything worked!

Now I'm unsure which of these things solved it, but probably me not turning off secure boot (though after thinkering that much, a clean install is probably a good idea).

I hope this is of help to someone else, spend a whole day on this...


Link to NTFS partition broken after reboot

I finally fixed it. I had to add the following line in /etc/fstab:

UUID={The parition UUID} /media/sdb1 ntfs uid=1000,gid=1000,dmask=027,fmask=137 0 0

and make the links again.


Unity spontaneously logs out in Ubuntu 12.04

This appears to have ceased happening at some point recently.


Massive problems after updating from 14.04 to 16.04 LTS

Using tty or editing GRUB menu

If you have access to tty/terminal you can edit /etc/default/grub.

Alternatively this can be done by editing GRUB menu listing.  To do this, at the boot up start, hold right 'SHIFT', press 'E' to edit configuration, & then follow step 4.

Press CTRL + ALT + F1.
Login to user that has root permissions.
Enter the command:

sudo nano /etc/default/grub

Change the following line...

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to...

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

Save the changes, then reboot the system.
If that works, then your done! If not follow step 7-9.
Repeat step 1-3.
Add the following line:

GRUB_TERMINAL_INPUT="console serial"

Save the changes, & reboot.
[For Intel] If GRUB still isn't working, then follow step 11-1
Install the following drivers:

xserver-xorg-video-intel
xserver-xorg-video-intel-dbg

Using a boot-repair-disk

Download the x86bit or x64bit version of the boot-repair-disk iso.
Burn the boot-repair-disk iso to a USB or DVD/CD (unless your pc came w/ Windows8).
Insert the USB/CD/DVD. Boot from your USB/CD/DVD.
Choose language.
If you are able to do so, connect to internet.
Choose option ~> "Recommended repair"
If that doesn't fix your problem, then try using the advanced option.

Using boot-repair in Ubuntu

Boot-repair works in Ubuntu & live sessions of Ubuntu.

We'll start by installing boot-repair. Run the cmds:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Now run boot-repair w/ the cmd:

  boot-repair

Choose option ~> "Recommended repair"
If that doesn't fix GRUB, use the "Advanced" option in boot-repair.

Using 'systemctl' cmds

(This one doesn't really relate to GRUB but you can try it!)

If you are using lvm and systemd enter these commands:

systemctl enable lvm2-lvmetad.service
systemctl enable lvm2-lvmetad.socket
systemctl start lvm2-lvmetad.service
systemctl start lvm2-lvmetad.socket

Links

Ubuntu Community Help Wiki - "Boot-Repair"
Sourceforge - "Boot-Repair"


This guide should help you to install your 3d adapter on Ubuntu 12.10: https://www.yumpu.com/en/document/view/30033514/dg-ba3370-ubuntu-installation-guide-digisolcom


Hum,  not really a question, so this is not really an answer. Don't despair. Get an external USB harddrive with a lot of free space. Use an Ubuntu live CD or USB key to boot your computer, then make a full image of your hard drive on the external harddrive. for example, use the instructions in the answer to this question (use dd, not tar). Then, and only then, use tools like Testdisk to recover the deleted partitions.

If you are so unlucky that testdisk can't recover the lost partitions, PhotoRec can still be used to recover some of the files. This is however a last resort, as photorec cannot restore file names and directory structure, nor can it make difference between a file that had been deleted and a file that was present at the time you deleted the partition.


You can run shell commands and show the output of them in conky:

Write in your conky config file:

TEXT
${execi 30 /path/to/your/command}

This executes your command every 30 seconds and shows the output. If you don't want the specific interval use this config value:

TEXT
${exec /path/to/your/command}


In the Disks (Disk Utility) application in 14.04, what does the auto-clear setting do?

Yes, it is specific to loop devices.  It means that when the loop device is unmounted, it will automatically be disassociated from the backing file.


The minimum requirements to install Ubuntu in a phone is it should have Minimum 512 MB RAM and processor should be minimum 1Gz .

as I have seen your mobile having 1.4 GHz Processor & 512MB of RAM. so it's fine.

read this for more information https://wiki.ubuntu.com/Touch/Install


Sound not working after moving /home to different partition. Works in log in screen

Thanks to @Takkat comment I realised this was a permissions issue. I was using an NTFS partition as a /home partition, and the /etc/fstab file was missing info about how to mount the partition, so it was owned by root.

I managed to solve it modifying the fstab file with sudo nano /etc/fstab and adding uid=1000,gid=1000,dmask=xxx,fmask=yyy (the values you choose would depend on what restrictions you want to apply to the partition).

For those interested in how *mask work, check out this article.


I would start with the steps here: https://help.ubuntu.com/stable/ubuntu-help/wacom-stylus.html.en
I don't have a stylus, so I can't test.  But the steps listed in that link may help.
Edit: After the discussion below, I found this documentation: https://www.dellemc.com/resources/en-us/asset/brochures/products/electronics-accessories/Dell_Pen_Compatibility_Brochure.pdf
which suggests that perhaps the Wacom settings could indeed be the ones to try.  Depending on the model of the Dell Active pen, it may be using Wacom protocol to communicate with the screen.


Is there a messenger that can appear offline to some contacts and online to other contacts?

This would depend on the particular service you are connecting to, since Linux clients have no control over what a sever does once it's told it you're online. Some (Facebook chat for example), simply don't provide the option to selectively appear as online or offline - and there's nothing that any client (whether running on Linux or Windows) can do about it.

If you're saying that there's a specific feature of the Windows Live service which allows this, then I don't know which (if any) Linux clients support it. But if it's not available in either Pidgin or Empathy (which I don't believe it is) then I strongly doubt it will be available in any others.


Tell me How to remove proxy permanently from ubuntu environment

The command env | grep -i proxy is just that: a command. All this command does is produce some output. In this case, the output tells you which environment variables are set where either the name or the value of the variable contain the string proxy, case-insensitively.

vim is a text editor. It is used to edit (text) files. You're trying to use a text editor to edit terminal output, which doesn't make sense in the first place, and even if you edited the terminal output, it wouldn't change the fact that these variables are still set. If you want to permanently unset some environment variables, editing terminal output is not the way to go.

What you want to do is find out how and where these environment variables are being set. Presumably, you have a few lines in you ~/.bashrc (assuming you are using bash) or ~/.profile files that set these variables at the start of a session. You can use vim to edit these files like so:

vim ~/.bashrc
vim ~/.profile

Search for lines that look like

export HTTP_PROXY=http://

and remove them.

Please be aware that vim is a rather advanced editor that is not necessarily intuitive to use. If you have not used vim before, I would suggest you use another editor for such a simple task, such as nano, which comes preinstalled with Ubuntu:

nano ~/.bashrc
nano ~/.profile


Error when installing software and repository

To fix this problem you need to remove the problematic package with

sudo apt-get remove libobs0

or

sudo dpkg --purge libobs0

and then install needed package with

sudo apt-get install obs-studio


How do you build older gcc versions? Errors about crti.o not being found

Even very new versions of GCC fail with that message. It's because the new Debian/Ubuntu releases (will) support multiarch (i.e. installing binaries for multiple machines in one file-system), so the libraries have been moved away from the standard places.

There are GCC patches to fix it here (not yet approved final versions, but correct for Ubuntu), and they probably apply to older GCC without much effort, maybe. I think you need to configure GCC with --enable-multiarch, or something.

In the meantime, creating soft links is a good fixup:

cd /usr/lib
ln -s x86_64-linux-gnu/crt*.o .

(the folder name will be different on 32-bit installations).

Hope that helps.


How can I add a message after the "last login" shown when starting san ssh connection?

One way would be to run a command in the bashrc for SSH connections:

In /etc/bash.bashrc (for system-wide) or ~/.bashrc (for your user only), append these lines:

if [[ -n $SSH_TTY ]]
then
    # Do stuff to get the output.
    echo "Hi, SSH user $USER!"
fi

I don't know how to edit the last login message, but you can disable it and simulate it by using the last command, and the filter and modify the output according to your need.


Unable to set up Raid during Kubuntu 15.04 installation

Ok, so the trick seems to be:

use try Kubuntu (rather than install)
connect to internet
apt-get install mdadm
create/assemble your raid array (e.g., mdadm --assemble --scan --verbose)
start the installation
the raid array should now show up in the dropdown list
don't forget to install mdadm after the installation has finished but before you reboot (earlier you installed mdadm only in the live cd)

Unfortunately, I was unable to install Kubuntu on the raid array because of another issue and filed a bug here: https://bugs.launchpad.net/ubuntu/+source/grub-installer/+bug/1458788.


Problem with Perl installation on Ubuntu 20.04

To fix the issue you have to move ~/.t_coffee/perl to the temporary new place.


The same problems with your Dell Inspiron 530 have been reported with Windows users in the past and the solution was to update the BIOS.

This link 4GB Installed 2.75GB Usable describes what others encountered.

Your BIOS was released in 2009 but was updated in 2012 under version number 1.0.18.

You can download the latest BIOS from: inspiron-530/drivers. Sorry it's the Dell Canada website, but a US website should have the same if not newer driver.

The BIOS update is an .exe file that doesn't run under Linux. There are many tutorials on how to Flash BIOS under Linux on google searches. However in this case the link to Dell: Updating the Dell BIOS in Linux and Ubuntu Environments is probably the best one to start with.


You can Download Calibre .Calibre is a free and open source e-book library management application developed by users of e-books for users of e-books.

calibre supports the conversion of many input formats to many output formats. It can convert every input format in the following list, to every output format.

Input Formats: CBZ, CBR, CBC, CHM, DJVU, DOCX, EPUB, FB2, HTML, HTMLZ, LIT, LRF, MOBI, ODT, PDF, PRC, PDB, PML, RB, RTF, SNB, TCR, TXT, TXTZ

Output Formats: AZW3, EPUB, FB2, OEB, LIT, LRF, MOBI, HTMLZ, PDB, PML, RB, PDF, RTF, SNB, TCR, TXT, TXTZ

It does perform .pdf to .chm conversion

source


Unable to Boot Windows 8 after installing ubuntu in pendrive

Did you install Ubuntu on the flash drive, like it was a hard drive in your computer, or did you put the installer on it? If you installed Ubuntu on your flash drive, and either the installer or you screwed something up, get a Windows installation disk, and follow this guide: http://answers.microsoft.com/en-us/windows/forum/windows_7-system/windows-bootloader-over-gnu-grub-bootloader/2dd62280-c7e1-43b1-95df-89e86c346ca1 If you just put the installer on a flash drive, then I have no idea how your bootloader got replaced, but follow that guide anyway.

It says GRUB rescue, because the thing that loads windows got replaced by the thing that loads linux and can load windows, but the two bootloaders cannot coexist on the same drive, so you need to choose one or the other. GRUB just happens to be setup wrong to load windows, so it's the bootloader that gets deleted.


Linux kernel not upgraded from 3.2.x to 3.5.x after Ubuntu upgrade from 12.04 LTS to 12.10 (through 12.10 beta)

Could find the exact reason why the dist-upgrade did not upgraded Linux kernel from 3.2.x to 3.5.x

I installed the Linux kernel 3.5.18 manually through Synaptic Package manager.

12:37:57-~] uname -a
Linux NOD-AF1-LO-J005 3.5.0-18-generic #29-Ubuntu SMP Fri Oct 19 10:27:31 UTC 2012 i686 i686 i686 GNU/Linux
12:38:00-~]


Cann't install Ubuntu 18.04 on Acer Aspire 4720Z

Ubuntu 18.04 is a 64bit OS and does not support 32bit computers like Acer aspier 4720Z. Ubuntu MATE 18.04 still works on 32bit computers. You can download it at ubuntu-mate.org


Atom can't install any package on Ubuntu (Error code ELIFECYCLE)

I had the same issue with atom-id-ui on Debian 10. I installed node.js 12 manually to fix it.

Try to add the repository and install node.js

# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs

# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs

Hope that could help you.

Greetings.


Ubuntu 15.04 with Kubuntu Plasma Desktop not booting

EDIT with more details:
My problem was incorrect device uuids in file /etc/fstab.
(the red one is incorrect,the green one added by me and the red one is commented out)

After correcting the uuids in /etc/fstab for / and swap (with infos from blkid), it works for me!


How to use my 6GB of free ram to optimize ubuntu12.04?

do you mean that not all your RAM is recognized? the only reason I can think of that could happen is that you might be using the 32 bit version of Ubuntu, if so use the 64 bit.

If you want a faster boot time you are talking about read speeds of the hard drives. I would advise a SSD that will make a big difference in boot time. but I cannot imagine that you can do something with your ram to speed up boot since everything stored on ram is lost when you power off.

maybe there is a way to store temp files in ram, I have never heard about it. but I wonder whether the read speed of the temp files is limiting your system.


How to make ubuntu support touchpad scrolling?

Did you try to open "System Settings"

and click on "Mouse and Touchpad", then select the "Touchpad" tab

and there select "Two Finger scrolling" and possibly "Enable horizontal schrolling"?


OS-Prober doesn't show my Windows 7 partition

You are using MS-DOS partition table created by Windows 7, and the maximum allowed primary partitions are 4. There are no extended partitions on your system. So when you select "Install along side windows" it tries to create a primary partition and fails.

You should make a new partition table like I've done on my HDD.

My partition table with /dev/sda1 as primary and /dev/sda2 as extended partition.


How do I make an exact recoverable copy of a hard drive?

You can first try live without installing or dual booting with ubuntu before deleting windows completely.

Or you can follow the steps below to create a system image backup referenced from this step by step guide.

Steps for creating backup:

Open Control Panel.
Click on System and Security.
Click on Backup and Restore (Windows 7).
On the left pane, click the Create a system image link.
Under "Where do you want to save the backup?" select the On a hard disk option.
Using the "On a hard disk" drop-down menu, select the storage to save the backup.
Click the Start backup button.


Type window into the Kickoff menu, go to
Window Behavior → Moving and enable Display borders on maximized windows.

This setting can be quite annoying, though, if you're used to closing windows by clicking carelessly in the top right corner...


How to install Arc Theme on Ubuntu GNOME 16.04

Based on https://github.com/horst3180/arc-theme#troubleshooting and looking through the issues at the GitHub repo, manual installation of the theme  using the instructions at https://github.com/horst3180/arc-theme#manual-installation will fix the theme.


Tell Banshee to add covers inside MP3 tags

Banshee doesn't currently have the option to save album art to a track's metadata. For more information, you can subscribe to Bug 600885.

Instead, Banshee stores art in ~/.cache/media-art according to the Media Art Storage Spec. Theoretically, if other media players followed the same specification, they would also have access to the same album art, but as far as I know, Banshee is the only media player that has implemented support for this spec.

Instead, you may wish to use one of Banshee's Community Extensions, banshee-extension-albumartwriter, which allows you to save the album art as a cover.jpg file inside the folder containing the audio file. This isn't quite what you're asking for, but it's much more widely supported by other music players, and it has the benefit of not duplicating the image file inside each individual track.

If this solution doesn't meet your needs, your only option may be to use another tool to do the job.


How to get the list of the unsupported packages mentioned during the OS upgrade?

The first option: Press D to see the details after starting sudo do-release-upgrade as you can see it in the output of the command in your question.
The second option: Use /var/log/dist-upgrade/main.log

awk -F\' '/demoted/ {gsub(/ /,"\n",$2); print $2}' /var/log/dist-upgrade/main.log

to see something like this

dvipng
gir1.2-vte-2.90
gnome-icon-theme-symbolic
libart2.0-cil
libgconf2-4
libgconf2.0-cil
libgnome-vfs2.0-cil
libgnome2.24-cil
libvte-2.90-9
monodoc-manual
obex-data-server
python-commandnotfound
rhythmbox-mozilla

The third option: You can see a list of the installed community packages with this command

aptitude search '~i ~suniverse' -F "%p"

to see something like this

adwaitaicon-theme-full
aglfn
aha
android-tools-adb
android-tools-fastboot
anjuta
anjuta-common
apt-file
[…snip…]


In which languages is translated Ubuntu Touch?

The package language-pack-touch-cs is well listed in the image manifest.


To answer your questions:

  I downloaded Toshiba’s H.D.D. Protection software and it won't run in wine (wine tricks disappears)left the menu bar tab to the left.

WINE is just a compatibility layer so all it does is simulate Windows features. What you want is to get low level information WINE does not have a clue about. Status of hardware you always need to check with the running OS.

  How do I know if its running? or how do i get it to run?

You will not get this Windows software to run. Never ever.

Now for the good news...

"Toshiba’s H.D.D. Protection software" does nothing but read out SMART data and that comes standard with Linux (so Ubuntu too) in the form of smartmontools.

Anything else it claims to be is marketing: there is no software that can react as fast as hardware. Example: the hardware detects that the heads are going to crash microseconds before it does. By the time the software is told it is going to happen it already happened. So all the software can do is predict on past events when the drive might fail.

But companies like to install "disk protection software" and advertise it, because people (mostly Windows users ;) ) think it will be helpful and buy it.

Some topics about SMART (that include commands to see SMART data):

Man page smartctl
Ubuntu wiki on smartmontools
AskUbuntu topic on SMART with some commands
Same but on superuser
http://ubuntuforums.org/showthread.php?t=893905
http://ubuntuforums.org/showthread.php?t=1178616

By the way: for SMART to work you need a modern hard disc (though I doubt anyone is using one that does not have SMART).


How do I store result of a command in textfile?

Use redirect >

For example: dpkg --get-selections > pkg.list


Installing mongodb php7 extension version 1.5.0 in ubuntu server

To get the newest version of php-mongodb you need to install it using perc.

sudo apt install php-pear (this will install perc)
sudo apt install php-dev
sudo pecl install mongodb

After executing these commands you should have the newest available mongodb extension installed on your system.

The last step of installation the extension is to add extension=mongodb.so to php.ini files. You should find this files in /etc/php/7.2/cli/ and /etc/php/7.2/apache2/ folders. Find sections with extensions list and put it under it. Change both files.

Now you should install the library, using composer.
In your project type:

composer require mongodb/mongodb

The reason behind installing extension and library is explained in the official mongodb docs here https://docs.mongodb.com/ecosystem/drivers/php/.

That's all!


What do I need to know in order to help with bug/papercut fixing?

You'll find this 'How To Fix a bug' wiki page quite useful. It mentions about how to generate a patch or a branch merge with the fix.

Programming skills required depend on the application or the bug you are working on.
If the bug is just a simple wording change you don't require much programming knowledge, just patience for Finding the line. ;)

I'd suggest you first have a look at the list of bugs, when you find something interesting, it will give you a better idea of what is required to fix that bug.

While working on a bug, make sure you mark the bug as In-Progress, as mentioned in the  papercuts wiki.

If you have any questions while working on a bug, feel free to ask on the Papercuts Ninja mailing list.


Problem with loading ubuntu 12.04 aftrer reinstalling windows 7

RecoveringUbuntuAfterInstallingWindows

This is a problem between GRUB and MBR. Simply, GRUB can detect MBR but MBR can miss GRUB when Windows is installed after Linux. And it is easy to be fixed! All you need to do is configuring MBR and GRUB again via your Ubuntu installation dics. I mean not installing again; only a session as Live user and it is done.
You may want to see this link, everything is explained clearly here: https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows

:)


Disabling relative line numbers in SpaceVim

In your SpaceVim configuration file. Just add:

relativenumber=false


How to restart remote X server on ubuntu 12.04 over vnc (vino)?

Sure just install a ssh server. You should also probably route the vnc over the ssh but i am not gonna focus on that.

The ssh server does basically what the vnc does but for tty (not for the gui). It is capable of many things but is mostly use as a way to display a terminal window to a remote computer so you can use commands from the remote computer.

You can install it by using sudo apt-get install openssh-server and the server/service should start automatically after the installation (and at startup)

The server listens to port 22 and to login you only have to use your username and password as you would in a tty.

to test the server from any linux installation just open a terminal and type:

ssh 'your username'@'your ip'

and then type your password. If the ssh client is not installed you can install it by

sudo apt-get install openssh-client
if you want to connect to your pc from a windows installation you can use the program putty (free, google it :P)


How should I partition Ubuntu-Win 10 dual boot?

In a dual-boot system, I prefer having my personal files in an NTFS partition to be able to access them from both OS's. Home partition cannot be formatted as NTFS, so I would have at least two separate partitions.
I wouldn't reinstall Windows 10. I would install Ubuntu alongside it on the 240Gb SSD and leave your data on the 1Tb drive.
Depending on the size of drives E: and F:, you could reformat one of them as ext4 and use it as Home partition.
Then there's the possibility of using a Swap partition roughly the size of your RAM.
So on your SSD you may have

120 Gb for Win 10 (NTFS)
120 Gb for Ubuntu. (ext4)

Then on the HDD:

D: for Win programs (NTFS -unchanged)
current E: for home (ext4)
(optional) a Swap partition
F: for personal files (NTFS)

Partitioning is a question of personal taste. Some would suggest having separate partitions for /boot, etc., so inform yourself before taking a decision.


How can i play acoustic guiter in Ubuntu? Like placing cords making leads and playing it

TuxGuitar  might be what you're looking for.

You can find more info on TuxGuitar's website.


How do I get rid of the "The Software on this Computer is up to date" message after updates?

You can disable automatic software update check by setting "Automatically check for update" to never in the drop-down in the updates tab of Software and update settings. Here is the full guide: https://www.garron.me/en/linux/turn-off-stop-ubuntu-automatic-update.html

Then when you want to update your packages use a command.

sudo apt update && sudo apt -y dist-upgrade

You can even use an alias to make things easier. Below is what I'm using in my .bashrc file.

alias aptupgrade="sudo apt update && sudo apt -y dist-upgrade"


There is no easy way of selectively not storing certain actions in the log files when running as root...

It's easy to add more to any log, but without digging into the source code of all the applications/scripts that store the information there, you're out of luck not storing what root does...

(Meaning: it's not impossible, but just an enormous amount of work)

If you're talking about the command history, that's easy: just start every command you don't want remembered by a space…


I had the same problem which was solved just by installing "unity-control-center".


Terminal emulators start without user groups

I tried the solution proposed here: https://unix.stackexchange.com/a/454715/292253, and the issue is resolved. In summary:

  I just commented out the following lines in /etc/pam.d/lightdm

auth    optional        pam_kwallet.so
auth    optional        pam_kwallet5.so

and restart

Thanks for everyone's help!


Eclipse Crashes with Linux Kernel 4.4.0-81-generic

This appears to have been acknowledged as a kernel bug

There is a workaround by increasing the JVM max stack size using -Xss1280k when starting Java.  This can also be accomplished for processes where you don't have access to the command line arguments for Java by setting an environment variable export JAVA_TOOL_OPTIONS=-Xss1280k (just remember to restart the process after setting the variable).

Update: Fixed in the latest kernel


By default, you can only have one default gateway on a system.

With iproute2, you have the ability to setup an additional routing table, for one thing, and allow this table to be used by the system based on rules, for another thing.

Test this:

First, install iproute2

sudo su
apt-get install iproute2

Second, configure static interfaces

sudo su
nano /etc/network/interfaces

auto ethLAN
iface ethLAN inet static
address 192.168.10.3
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255

auto ethOI
iface ethOI inet static
address 10.1.1.3
netmask 255.255.255.0
network 10.1.1.0
broadcast 10.1.1.255
gateway 10.1.1.1
dns-nameservers 192.168.10.1 8.8.8.8 8.8.4.4
dns-search hsi.local

auto ethGTC
iface ethGTC inet static
address 10.4.1.3
netmask 255.255.255.0
network 10.4.1.0
broadcast 10.4.1.255
gateway 10.4.1.1

Finally, configure the news routing tables

sudo su
echo 200 adsl1 >> /etc/iproute2/rt_tables
echo 201 adsl2 >> /etc/iproute2/rt_tables
ip route add 10.1.1.0/24 dev ethOI src 10.1.1.3 table adsl1
ip route add default via 10.1.1.1 table adsl1
ip route add 10.4.1.0/24 dev ethGTC src 10.4.1.3 table adsl2
ip route add default via 10.4.1.1 table adsl2
ip route add 10.1.1.0/24 dev ethOI src 10.1.1.3
ip route add 10.4.1.0/24 dev ethGTC src 10.4.1.3
ip rule add from 10.1.1.3 table adsl1
ip rule add from 10.4.1.3 table adsl2
ip route add default scope global nexthop via 10.1.1.3 dev ethOI weight 1 nexthop via 10.4.1.3 dev ethGTC weight 2


As per the URI syntax, a web address cannot contain an ampersand. An ampersand does, however, signify the start of a query. Therefore, Firefox will try to retrieve the resource called 123 with the query 456.


Yes, you can use shake. You'll first need to add a custom repository to your system:

sudo add-apt-repository ppa:un-brice/ppa
sudo apt-get update
sudo apt-get install shake-fs

Then you can do

sudo shake /some/dir


How to sandbox Bash shell to affect only current directory?

Create a user who has access to only this directory:

 useradd -d "`pwd`" -s /bin/bash -c "Temporary" temporary
 passwd temporary
 su temporary

Do whatever you want with this user. The current directory is his home directory, he can't destroy anything outside of it. Once you're done, exit the su with Ctrl-D, then do:

userdel temporary

You could make shortcut commands for this in your .bashrc file


Pre-upgrade questions about upgrading from ATI 4870 to nVidia GTX650 on 12.04

If you're switching from AMD to NVIDIA, you have several ways of doing this:

1 - Poweroff PC, put new card, remove old drivers, install new drivers

By booting the new card without the new drivers installed, will get you to a console terminal, no problem there, simply remove old drivers and install new ones.

2 - You can go to init 3 with the PC turned on, remove old drivers install new ones, shutdown and then insert new graphic card.


Huge lag and screen freezes changing the brightness on Ubuntu 20.04 using the hotkeys

I found the answer in here:
https://www.reddit.com/r/gnome/comments/84453o/delayfreezecpu_spike_when_using_the_functionmedia/
It's just about commenting this line:
modifier_map Mod3 { Scroll_Lock };

on the following keyboard layout file for your language:
(br in my case):
/usr/share/X11/xkb/symbols/br


Wifi not working in HP laptop RTL8723DE realtek wireless driver

I am writing a more complete answer in order to explain the exact procedure for the benefit of the inevitable searchers.

Your kernel version is 4.13.0-xx. Accordingly, we will get the driver appropriate for kernel versions 4.11 and higher. With a temporary working internet connection by ethernet, tethered or whatever means possible, open a terminal and do:

sudo apt update
sudo apt install git dkms
git clone https://github.com/smlinux/rtl8723de.git -b 4.11-up
sudo dkms add ./rtl8723de
sudo dkms install rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414
sudo depmod -a

Reboot and your wireless should be working.


This means the program you are running is looking for a particular python library called pygtk, which allows your program to have a gui. So, to let the program work, you need to install pygtk:

sudo apt-get install python-gtk2-dev

That should do it.


How open folders from USB devices in Terminal and find the size

No, you won't use df, you'll use du, which is a tool that displays disk usage.

You first need to find out where your mobile phone has been mounted. If you're using Ubuntu 12.10 or later, it'll most likely be mounted under /run/user/<login>/gvfs on a folder called mtp:host=<someNumbers>.

Here is how mine looks like right now:

aa@aa-ul:~$ ls /run/user/1000/gvfs/mtp\:host\=%5Busb%3A002%2C005%5D/ -l
total 0
drwx------ 1 aa aa 0 Jan  1  1970 Internal storage
drwx------ 1 aa aa 0 Jan  1  1970 SD card

So if I wanted to find out the size of each of the folders under SD card, I would run this command:

du -h -d1 /run/user/1000/gvfs/mtp\:host\=%5Busb%3A002%2C005%5D/SD\ card/

This means:

du is the command,
-h is to show sizes in human readable format, for example MB or GB,
-d1 means go down only one directory (or "folder"). This means "show me the sizes of all the directories inside SD card only, and not the directories inside those directories. If you want to see the sizes of all the subdirectories, remove -d1 from the command, but this will cause the command to take longer and display a lot of lines,
/run/user/1000/gvfs/mtp\:host\=%5Busb%3A002%2C005%5D/SD\ card/ is the path.

Here is how my output looks like:

0       /run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C005%5D/SD card/LOST.DIR
0       /run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C005%5D/SD card/TWRP
0       /run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C005%5D/SD card/.dataviz
0       /run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C005%5D/SD card/Playlists
512     /run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C005%5D/SD card/Android
5.2G    /run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C005%5D/SD card/clockworkmod
760M    /run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C005%5D/SD card/DCIM
0       /run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C005%5D/SD card/data
455M    /run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C005%5D/SD card/Music
481M    /run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C005%5D/SD card/New folder
6.9G    /run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C005%5D/SD card/

The total size of the SD card folder is 6.9GB.

I don't know how to show the total free disk space from the command line though. You can see it from the GUI: right click > Properties.


My wifi is not showing/Network unclaimed

sudo rm /etc/modprobe.d/iwlwifi.conf
Reboot as your command as written is wrong


After playing with nvidia settings i found the solution.

If you are experiencing the same problem do the following steps to solve the problem.

Open NVIDIA X Server Settings
Click the GPU that is used for your display. (In my case GPU 0)
Under the GPU submenu click DFP-1
At the right choose the Controls tab.
Set the options as the following

Deithering: Enabled.

Mode: to Auto

Depth: 6 bpc.

You can also see the settings in the following picture.


delete windows 10 from dual boot completely

The reason for the Windows entry in grub boot menu is that there is still an EFI entry for it in the EFI partition, e.g. a folder /dev/sda2@/EFI/Microsoft. If the Windows partition has already been deleted, then the Microsoft folder in the EFI partition can also be removed.

After removing the obsolete Microsoft from the EFI partition and running update-grub the Windows entry should disappear from grub boot menu.


How can I copy music files from multiple playlists, and keep the directory structure similar?

You can do this with the terminal.

Use the appropriate cp command

Make sure your Music folder is your current working directory

cd ~/Music/

Perform a copy. Specify your source file as the path starting from your ~/Music folder. Specifying /mnt/Music as the destination. The trick comes in using the option --target. This will recreate the relative path of the file into the target. The command thus will look like:

cp --target dir1/music1.mp3 /mnt/Music

Because of the --target option, the file music1.mp3 will be copied to a folder dir1 under your /mnt/Music folder. If the folder does not exist, it will be created.

Automate for your entire playlist

Because this is bash, it can be automated. You can directly use your playlist if it just lists the music files with their relative paths in plain text format. If your music player software uses a different format, you will need to export the playlist in text format, such as the m3u format, first. In following example, it is assumed that you have a playlist myplaylist.m3uthat contains two music files:

dir1/music1.mp3
dir2/music2.mp3

Following line will cause all files in the playlist to be copied to the /mnt/Music folder under their respective folder. This will work also for large playlists. Again, your current working directory needs to be ~/Music for this to work. Otherwise, the files under that folder will not be found.

cat myplaylist.m3u | while read f; do cp --target "$f" /mnt/Music; done

"$f" will be a line from your text file myplaylist.m3u.


Wired connection not working Ubuntu 14.04 64 bit

Try this.

If this is a desktop installation using Network Manager, then no declaration of eth0 is needed in /etc/network/interfaces. Network Manager should do the job perfectly well. Moreover, the file is slightly malformed. I suggest you edit the file as follows:

auto lo
iface lo inet loopback

Proofread, save and close the text editor. Reboot and let us have your report.

Sometimes, the troublesome r8169 will connect if you specify some capabilities, instead of letting the card and router negotiate. Please do:

gksudo gedit /etc/rc.local

Use nano or kate or leafpad if you don't have the text editor gedit. Add one line right above exit 0:

ethtool -s eth0 autoneg off speed 100

Proofread carefully, save and close the text editor. Reboot and, if it doesn't connect, let us see another paste as below.


Is there a way to remove all the ssh keys added to ssh-agent when the user locks the system?

You can watch for the events in DBUS and on lock call ssh-add -D to remove all keys from the agent:

#!/bin/bash
dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'" |
  while read x; do
    case "$x" in
      *"boolean true"*) echo SCREEN_LOCKED; ssh-add -D;;
      *"boolean false"*) echo SCREEN_UNLOCKED;;
    esac
  done

But you need to export the SSH_AUTH_SOCK environment variable to this script, so it would be able to access your agent.

You can store the above into the script clean_lock.sh, set execute bits (chmod u+x clean_lock.sh) and run the script in background ./clean_lock.sh &.


Lubuntu 20.04- How to make power button to suspend OR add a suspend keybinding?

You can bind the command systemctl suspend -i to a hotkey to set up a hotkey to suspend the system. This will work on any desktop environment .
If Lubuntu does expose a pre-defined action for this in its Global Action Manager dialog, then, of course, you can define a hotkey there or change the existing hotkey.


In the end I booted from a liveusb, and reinstalled Ubuntu. I didn't format / nor /home so I didn't lose much at all.


Can't adjust brightness on Samsung RV420 with fn keys

A bug seems to have made its way into 3.2.0-27.

The only practical solution I found was to downgrade back to 3.2.0-26.

Assuming you previously had that kernel on this box and recently upgraded, you can boot this kernel temporarily via the grub2 menu:
* Reboot, and depress and hold the left-shift key until the boot menu appears.
* Select the previous versions menu.
* Choose 3.2.0-26 if available, or the latest (but pre- 3.2.0-27, of course.)

In the meantime if you're 'stuck in the dark,' I posted a kludge on the bug report that should let you temporarily restore max brightness.


`xdg-open` does not open files in the preferred applicaton

The following answer suggests that Gnome uses gvfs-open in the background.
https://unix.stackexchange.com/a/144048/421466
gvfs-open has been deprecated and the new command is gio open.
$ gio open
libffi.so.6: cannot open shared object file: No such file or directory

Running gio open threw this error. This error was due to python looking for libffi6.so file which wasn't present in my environment. I am using miniconda and there are other people as well who are facing this issue. Most of the answers suggests to create a symlink for libffi6.so or reinstall python,
https://github.com/conda/conda/issues/9957
https://stackoverflow.com/q/61875869/11701676
But simply installing libffi, using conda fixed the issue.
conda install libffi


Automatically switch equalizer preset based on audio output (internal speaker or external)

Because I have a similar problem i have made a "quick and dirty" python script which uses pulseaudio's DBus-Events to detect when to activate which equalizer profile.

Installation

To use it you have to add the following line to /etc/pulse/default.pa:

load-module module-dbus-protocol

Then disable the equalizer via pulseaudio-equalizer-gtk and click on "Apply settings", now close the GUI.

Download apply-equalizer.py save it somewhere and make it executable.

Execute it as user (!). Maybe you need to install some additional python modules. Also you may want to automatically start it on login (i dont know what is the best way to do that).

Usage

The script creates per-port [1] equalizer-configurations under ~/.config/apply-equalizer and symlinks them if a device changes the output port (i.e. headphones plugged in or out).

[1]: many sound cards have different ports, e.g. one speaker-port and one headphone-port

So:

Unplug headphones.
Open pulseaudio-equalizer GUI
Customize equalizer-settings until it sounds good
"Apply Settings" will then assign the configuration you made (including if the equalizer is enabled at all) to the current port (speakers in this case)
close the GUI and repeat from step 2 for every port you want to assign (headphones not plugged in)

Now the equalizer settings get automatically adjusted whenever your switch between speakers and headphones.


"gzip: stdout: No space left on device" while upgrading the kernel

You have a separate partition for /boot that is only around 227MB in size.  This partition is full.
The reason Ubuntu has given you a separate parition for /boot seems to be that you are using LVM and/or "full" disk encryption on the rest of the drive.
The /boot directory contains all of your kernel images, so the likely cause of this issue is that you have too many previous kernels installed.  Ubuntu issues kernel updates which bump the version number in the package name fairly frequently even for long term stable versions, so over time if you keep the system up to date, the /boot directory will grow.
You should be able to list your installed kernels with
aptitude search ~ilinux-image

(Note that this will probably return packages that aren't kernels, too).
There is usually no need for more than two kernels to be installed - the one currently in use and the previous known working kernel (as a fallback).  So you can start removing the older ones, one by one, like this:
sudo apt-get autoremove linux-image-3.2.0-23-generic

Make sure you substitute "3.2.0-23-generic" with the actual kernel version you want to remove!  Also, don't remove packages such as linux-image-generic.  You have to be really careful not to remove the currently running kernel or you won't be able to boot (Ubuntu may or may not warn you about doing this).
You can find your currently running kernel with:
uname -r

Here's an illustrated guide to doing what I've just explained. This article uses slightly different tools but basically the same approach.


Install netgear wireless adapter with no internet

If you are having problems logging in, make sure that the encryption is correct. Go to the connection, go to security settings, and make sure that you chose the correct form of security encryption (WPA, WEP, etc.). Also, I know this may seem obvious but you might want to disconnect and reconnect to the network or restart the router.

See if that gets you anywhere.


Ubuntu 19.10 on Dell XPS 13 2-in-1 7390 Suspend problem

I have the same problem. I can't see anything even if I close the lid. So I want to know a more fundamental solution than what I have found.

This is not a good solution, but I edited /etc/systemd/logind.config and changed the variable:

# HandleLidSwitch = default

To:

HandleLidSwitch = ignore

(with no sharp)

If I am not using this laptop, I can press Ctrl+L. But this way, the computer will run out of almost battery on next day.


“No new release found” when upgrading from 16.04 to 18.04 LTS?

I figured it out. I had to edit the file /etc/update-manager/meta-release to point to the location on the local mirror where the meta-release file is located. That is, rather than point to the URL http://changelogs.ubuntu.com/meta-release, I edited /etc/update-manager/meta-release to point to the URL of the local mirror. do-release-upgrade uses /etc/update-manager/meta-release to determine the location of the meta-release file, which it then uses to determine whether a new release is available.


Connect button grayed out in 802.1x authentication dialog

Came across this issue as well on 15.04. Same symptoms and errors as OP but killing/re-starting the nm-applet wouldn't fix anything.

The solution for me was to edit the configuration file for my network interface located at

/etc/NetworkManager/system-connections/Wired\ connection\ 1

I added the relevant parts of my 802.1x settings in the file and it allowed me to connect. So, something like this:

[802-1x]
eap=peap;
identity=username
phase2-auth=mschapv2


sed : difference between " sed 's/\-.*// " & " sed '/\-/s/\-.*//gw "

There is no difference between these in effect:

sed 's/\-.*//g'
sed '/\-/s/\-.*//g'

The first form acts on all lines, the second form acts only on those lines which match /-/ using addresses. Since the action taken includes -, in effect both lines will only affect those which contain -.

Now if you'd used /Raja/ as an address instead, you'd only have seen the last line in with - that is, only those lines which contained Raja, and had the substitution performed.


No. NTFS doesn't support Linux file permissions so you can't install a Linux system on it.


You have to sync after dd or try another SD card.


Having an apps overview in XFCE like in GNOME

Xfdashboard is a Gnome Shell like dashboard for the XFCE desktop. You can install it using Software (search for xfdashboard). You can find documentation about it from the xfce desktop team. This page includes links to information on how you can set it up and assign it to a hotkey.


Use a different dns server for some specific domains

Take a look at this.

I know this is kind of a late answer but I just tried it and it works.

To summarise it,

Create/edit /etc/NetworkManager/dnsmasq.d/custom-dns
Add these lines so that domain.intra will be resolved by 192.168.30.1 and home.intra will be resolved by 192.168.0.1. We can add as many lines as we want.

server=/domain.intra/192.168.30.1
server=/home.intra/192.168.0.1

Restart network manager by sudo service network-manager restart.

And that's it.

Hope this helps.


How to prevent installation of kernel 4.13 on Ubuntu 16.04 LTS

apt-mark hold is not necessary because, kernel 4.10 and 4.13 are two different kernels.

4.10 (the old kernel) should still be installed and you can select the old kernel from the grub menu when you boot your computer.

If grub does not display upon boot, you can hold down the SHIFT key when you boot to force the grub menu to display.

On the grub menu, select: "advanced options".

Then, select your desired kernel version (4.10).

Also, click here to see a helpful related answer about updating.


Black screen during startup causes automatic reboot

Adding following line
GRUB_GFXPAYLOAD_LINUX=text
to /etc/default/grub and update grub with
sudo update-grub
solved the problem.

See: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1724639


What does the presence and absence of "automatic" mean in apt output?

Automatic means it was installed as a dependency of another package.  If a package is installed as "automatic" and you specifically need to install it, you should still do a "apt install " which marks it as manual.  Automatic packages can be cleared out by "apt autoremove" should the parent package be removed.


print jobs are held until the VirtualBox guest OS is reboot

On the VirtualBox menu select Devices > USB Devices and cycle the state of the USB device that is the Fuji Xerox DocuPrint P205b.  That is to say: uncheck and then check the device.  This will cause the queued print jobs to complete (not all of the time, but it usually helps).


Module "ashmem" doesn't load with Secure Boot on (but "binder" does load with secure boot on)

You need to sign the module. Looks like it can be done with:
kmodsign sha512 /var/lib/shim-signed/mok/MOK.priv /var/lib/shim-signed/mok/MOK.der /lib/modules/`uname -r`/kernel/drivers/staging/android/ashmem_linux.ko


Not able to do USB Tethering on Ubuntu 16.04

I found this post which was helpful https://ubuntuforums.org/showthread.php?t=2359171

ifconfig -a

lists the network interfaces. Mine was listed as "enp0s20f0u2".

Then I did sudo apt-get install macchanger. There was a prompt for which I selected "No".

Then I ran sudo macchanger -b -a enp0s20f0u2. After this the output was:

 Ignoring --bia option that can only be used with --random
 Current MAC:   00:00:00:00:00:00 (XEROX CORPORATION)
 Permanent MAC: 00:00:00:00:00:00 (XEROX CORPORATION)
 New MAC:       00:11:a5:16:14:29 (Fortuna Electronic Corp.)

This seemed to solve the issue


Tried Kubuntu desktop; removed it, but bits remain

Indeed, it is difficult to remove all packages of an additional installed desktop if you do not have a list of all desktop packages that were installed.
When installing an entire desktop, e.g. with the command sudo apt install kubuntu-desktop, all dependent packages are automatically installed if they are not yet installed on the system. The command shows all these packages, then asks you for confirmation to proceed. I usually copy that entire list of packages to a text file, so I could use the list to remove them all again if I wished to remove the desktop.
Removing KDE packages
If you did not do that, then it becomes more difficult. sudo apt autoremove will remove all packages that were marked as "automatically installed" as a dependency of some package. However, when you install the kubuntu-desktop metapackage, most main applications will be marked as manually installed, so removing it and issuing an autoremove will remove little.
The best you can do is to use a graphical package manager such as Synaptic package manager to inspect all your installed packages, and gradually remove packages. Note carefully what other packages would be removed before proceeding: if you attempt to remove a package and you see that also ubuntu-desktop would be removed, then you know you should keep away.
Use the Ubuntu default login manager GDM
To revert to the default login manager, issue the command sudo dpkg-reconfigure gdm3. A dialog appears, in which you should select gdm3.
Restore the default Ubuntu boot screen
Your Ubuntu splash screen will be restored with the command sudo apt purge plymouth-theme-kubuntu-logo plymouth-theme-kubuntu-text.
Alternative approach: reinstall the system
A more intrusive approach to clean up would be to reinstall. In your case, a reinstall may solve the "slow performance" you experience.
It is possible to reinstall and leave your user configuration and user data in place. To achieve that, you need to select "Something else" in the installer, and then indicate the partitions yourself. Then, you can uncheck "format". In that scenario, the installer will reinstall the system on the same partition without erasing it first. The end result is that your data, user configuration and additionally installed applications, etc. will be preserved. All system configuration, however, will be freshly rewritten.

Do that only with an installation USB or DVD of the same Ubuntu version.
This is a "less clean" approach: there will be less chance that that may resolve your performance issue.

Remove error message at startup
The "system error" at start up may be minor if otherwise the system is working well. The dialog is provided by the Apport service. You can disable Apport (and ignore such error messages) according to this post.


How do I set up Electrum Tor Wallet (for XVG) right?

Looks like there's a bug in the source code repository: the executable file appearing in the README document isn't flagged as executable (see my bug report).

You can change its access mode to make it executable yourself:

chmod +x electrum-xvg

Then you can execute it as documented:

./electrum-xvg


Why is Ubuntu configuring multiple ZRAM devices for swap

When pagging occurs in a memory owned by a given CPU (especially in a NUMA configuration - imagine current EPYC processors with their 8-channel memory controllers and NUMA nodes) it's most effective to not copy this memory over to another CPU's memory (and disturb it's threads).  So I bet it's for performance reasons.


Is there a difference between type=ethernet and type=802-3-ethernet in network-manager connection configuration?

type=802-3-ethernet and type=ethernet is identical, one is an alias. Both work.

nm-applet is not used to modify/create connections. nm-connection-editor is.

No client application (like nm-connection-editor) ever directly writes those files. They are owned by root, and written by NetworkManager.

It might be a good idea to use NM client tools (nmcli, nmtui, nm-connection-editor) instead of editing files by hand. But both works.

nmcli device is about networking interfaces. It is not the same as connection profiles (nmcli connection, /etc/NetworkManager/system-connections).

man NetworkManager.conf is mostly about NetworkManager's configuration files, again not about connection profiles. See man nm-settings and man nm-settings-keyfile.


Optimizing rarely used server installed in an always up virtual machine

A few ideas (maybe a bit obvious):

Use 32-bit if at all possible, 64-bit uses more RAM
Stick to CLI environment (do an expert install from alternate ISO)
Suspend it when not in use! This is the best way to conserve RAM and it only takes 5-10 seconds to bring it back up.


What to do if 'sudo make install' does not work for tar.gz files?

When a build fails, it is almost always necessary (or at least very helpful) to provide all the information from the terminal, including from when you ran ./configure. When this exceeds the maximum length of an Ask Ubuntu post or becomes excessively long (which often happens), you can use http://paste.ubuntu.com and provide the link.

In general, if you just ran sudo make install and you didn't run ./configure and make first, run them (in that order).

Some unpacked source code archives will let you run sudo make install without having explicitly run make. Some will not. Either way, you should run make as a separate step before running sudo make install. Sometimes you have to, and even when you do not, this lets you see any warning messages shown at the end before installing, and it keeps the files created inside the source directory owned by you, and not root.


How to get a larger root partition on Touch

This solution worked for me:

https://github.com/plasma-mobile/plasma-phone-dev-setup/blob/master/usr/bin/resize-root-partition

Basically, it's KDE Plasma Mobile's super-simple install script. Just run it, take a nap, and you should have a 6 GB root partition.


How can I boot from read-only filesystem while having writable partitions for logs?

Yes, typically you would not want to mount / as read-only. I would recommend putting /usr in it's own partition and then mounting that read-only since it contains the majority of your executable files, which you would want to protect against manipulation of binaries.
You could also run lsof to determine what processes are writing to the directories under /.

http://www.ibm.com/developerworks/aix/library/au-unmount_partitions/index.html


Can I get Ubuntu to stop asking me to install updates?

One of the reasons that Linux is secure is that distributions provide package managers which inform you of updates, and function to install the updates as you configure.  It is very important that you install security upgrades as soon as possible.  When updates comes out, if the issues weren't already being used to exploit systems, the new details and fix may make it easier for others to create exploits against unpatched systems.

It is understandable that you don't want to be bothered with the UI constantly telling you to update.  After you set the interval at which to check for updates, you should only see the warnings if apt is already aware of updates, or you run sudo apt update in the terminal.  At that point, the system becomes aware of new updates, and tells you about them.

You should try taking in the changes as you see them become available, and hopefully more often than every two weeks.  Think of the benefit of updating each day, and the slight annoyance of having to type in your password, vs waiting two weeks or ignoring updates altogether. If you stick with every two weeks, try updating now and leaving everything alone and seeing if you wake up to notifications tomorrow.

The system will always show you updates of which it is aware.  You are adjusting the frequency at which the system checks for updates.  Do a complete update/upgrade, and do not apt update after, and you should only see notifications every two weeks.

If you are worried about specific packages being upgraded, you can lock packages within apt.  Be careful, though, as you will have to unlock, or forcefully upgrade from this state.  Please consider updating frequently, and only locking a small set of packages, such as database or your graphics drivers.  Everything else should update very smoothly at the hard work of many package maintainers, making it easy to take on updates quickly.


The missing package you're looking for is version 3.9 of libclang-dev (PySide2's build process uses libclang to parse the Qt C++ source), however version 3.9 is a couple years old so it may be a headache to get.  If that particular version isn't important to you, apt install clang libclang-dev should be sufficient.

You will probably also need to check out the branch in the pyside-setup repository to match the Qt version that you are building with.  For examplese git checkout 5.10 if you are intending to build Python bindings for Qt 5.10.


how to load ubuntu onto apsire 5810 laptop

If you are not able to boot via DVD try with a pendrive. Create bootable pendrives using Universal USB Installer.
http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/

Also what did you burn on the disk, the iso or used a image burner?


Can i resize a persisten live usb system?(Lubuntu 20.04 Focal)

Resizing a mkusb Persistent USB

The OS partition in a mkusb drive is ISO9660 and is read only. Any modification to the ISO9660 partition, (if possible) would kill it.

You can modify the casper-rw/writable partition and the NTFS usbdata partition. You can not enlarge the FAT32 usbboot partition because the ISO9660 partition can not be moved.

Leave at least 1MB on the right hand side if modifying the usbdata partition.


If I'm understanding you correctly, it looks like that the device driver for your headphones isn't installed - Can you check to see if it's showing as installed?

    card 0: Intel [HDA Intel], device 0: ALC889 Analog [ALC889 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 3: ALC889 Digital [ALC889 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: Headset [Logitech G930 Headset], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

This is what my output looks like, and I can have separate audio output/input for both speakers and headphone


In case you didn't add JD PPA, and want to manually remove it, delete this folder:

~/.jdownloader

Additionally remove also these files:

/usr/bin/jdownloader
/usr/share/applications/jdownloader.desktop
/usr/share/doc/jdownloader/changelog.Debian.gz
/usr/share/doc/jdownloader/copyright
/usr/share/icons/hicolor/16x16/apps/jdownloader.png
/usr/share/icons/hicolor/22x22/apps/jdownloader.png
/usr/share/icons/hicolor/24x24/apps/jdownloader.png
/usr/share/icons/hicolor/32x32/apps/jdownloader.png
/usr/share/icons/hicolor/48x48/apps/jdownloader.png


I got it to work now: my UFW looks like this.
To--------------------                          Action------      From
22/tcp---------------                 ALLOW IN    Anywhere
80/tcp---------------                     ALLOW IN    Anywhere
443/tcp-------------                    ALLOW IN    Anywhere
25565/tcp----------                  ALLOW IN    Anywhere
25565/udp---------                  ALLOW IN    Anywhere
12975/tcp----------                  ALLOW IN    Anywhere
32976/tcp----------                  ALLOW IN    Anywhere
22/tcp (v6)---------                ALLOW IN    Anywhere (v6)
80/tcp (v6)---------                ALLOW IN    Anywhere (v6)
443/tcp (v6)-------               ALLOW IN    Anywhere (v6)
25565/tcp (v6)----             ALLOW IN    Anywhere (v6)
25565/udp (v6)---             ALLOW IN    Anywhere (v6)
12975/tcp (v6)----             ALLOW IN    Anywhere (v6)
32976/tcp (v6)----             ALLOW IN    Anywhere (v6)
Outgoing is set to allow by default. Ports 12975 and 32976 were provided by Hamachi https://support.logmeininc.com/central/help/which-ports-and-protocols-does-logmein-hamachi-use but even so, I don't even think I really needed to add them to the UFW, but I did just in case.
I also went on my router's configuration website and port-forwarded port 22 to my computer, just in case.
I made a brand new server and got a different friend to join. He said I didn't have any vpn error, even sent me a photo because I couldn't believe it. I have no idea exactly what I did wrong or right in this but as long as it is working I won't change it.


Parental controls with different settings for different users

Gnome Nanny looks like it would meet the needs of your friends perfectly. To quote the website:

  Gnome Nanny is an easy way to control what your kids are doing in the computer. You can limit how much time a day each one of them is browsing the web, chatting or doing email. You can also decide at which times of the day the can do this things. Gnome Nanny filters what web pages are seen by each user, so you can block all undesirable webs and have your kids enjoy the internet with ease of mind, no more worries!

As you can see, Nanny can set different restrictions for each account. nanny 2.29.4-0ubuntu4 is available in the maverick and natty universe repositories. It is also part of Edubuntu. Screenshots of Nanny running on Edubuntu are available on the Edubuntu website.


Error updating from 14.02 LTS to 16.0 LTS

Please check that you internet connection is ok! And did you do an update on the Ubuntu Trusty before an upgrade to Xenial? – George 5 hours ago


How can I restore my Unity themes to their defaults?

Finally figured it out!!! Somehow, KDE must've modified my user's gtk3 settings.

To fix it, just go to /home/[USERNAME]/.config/gtk-3.0 and delete settings.ini. Ubuntu will freak out and try to report a bunch of errors, but restart your system and it will all be back to normal.

This is what my settings.ini file looked like:

[Settings]
gtk-font-name=Ubuntu 9
gtk-theme-name=oxygen-gtk
gtk-icon-theme-name= oxygen
gtk-fallback-icon-theme=gnome
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1


How to make Update Manager update programs I've installed?

Chromium tends to update itself automatically, silently, or whenever a new package for it comes out.

With Gnash, it gets updated whenever a new package for it is released.  When that happens, Update Manager will update it.  Otherwise, it won't, because there's no new updates.


Best strategy for dealing with power interruption

The best strategy is to prevent a disaster;

UPS (uninterruptible power supply) - keeps mission critical systems operational during main power supply outages.
Get Nut (https://help.ubuntu.com/community/UPSwithNUT)
Test bench the solutions before using in a production/critical enviornment


I been messing with it all day too and I have problems with the Ubuntu Download link on their home page. I tried unsuccessfully to boot from a live USB and tried burning the iso image to CD, and it said something like that the iso image was not valid or something like that.  I choose the latter option and downloaded a image from the Bitttorrent link also in the Ubuntu website that I had better luck installing a dual boot machine with win 7 and ubuntu 12.04 today.


Why i don't receive update notifications

Check Settings in Update-manager, and choose Daily at Automatic Check for Updates. Perhaps your's current is Never? Try it.


How to run a script when suspending/resuming? - Sony VAIO Ubuntu 12.04

You are right. You have to write a script and save it to /lib/systemd/system-sleep/ (since 2015 systemd take care of that, before was /etc/pm/sleep.d/). The difference between suspending and resuming is given as a parameter to the script:

#!/bin/bash

case "$1" in
    suspend)
        # executed on suspend
        ;;
    resume)
        # executed on resume
        ;;
    *)
        ;;
esac

If you also want to do it for hibernate, the arguments would be hibernate and thaw.


After insuccessful partition resize with Gparted, partition grew but file system not

Looks like the partition /dev/sda5 got enlarged, but not the ext4 file system inside it which is still at the original size.

First of all, if you haven't done it yet, make a backup! Modifying partitions and file systems always has the risk of data loss!

Then make sure you are booting from a live system so that we can operate on the file system while it's unmounted.

First we must force a file system check using this command:

sudo e2fsck -f /dev/sda5

It should hopefully report no errors or be able to fix them.

After that we can resize the file system to match the size of the partition it's located in. We do that with the command below:

sudo resize2fs -p /dev/sda5

After that you might want to repeat the first command (e2fsck) to check everything is okay.

Then your partition and file system should have the same size again and cause no more trouble regarding this issue.


Unable to access locally hosted sites from local network

If you have manually created an A record in router's DNS for the site to the WAN IP, then when you attempt to get to those sites, it's routing you to your routers WAN IP. If you're behind the router, you won't be able to get to any host/site that resolves to the WAN IP of the router. If you have port forwarding setup for the Apache server, then you shouldn't need to statically assign an A record for each site. Assign port forwarding for http(s) traffic on the WAN interface to point to your Apache server on the LAN. This will allow you resolve the IP internally when you're on the network, and resolve it externally when you're out. If you have more than one Apache servers for the same site, then you need to setup NAT not a port forward, as most non-commercial routers won't let you forward the same port to multiple destinations.


livepatch fails with error "cannot apply patches: cannot apply update: cannot execute finitModule syscall: required key not available"

The problem appears to be that you have Secure Boot enabled and did not import the Livepatch key: https://bugs.launchpad.net/canonical-livepatch-client/+bug/1833566

You can apparently fix this by running:

sudo mokutil --import /snap/canonical-livepatch/current/keys/livepatch-kmod.x509

(the password you enter will only be used once)

Then, reboot and follow the instructions to import the key.


How to connect via SSH to EC2 instance that got unreachable?

For Amazon AWS EC2 you need to use a .yaml like this. SSH will work then.
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      match:
        macaddress: 06:a0:68:ea:54:4e
      set-name: eth0
  bridges:
    br0:
      dhcp4: true
      macaddress: 06:a0:68:ea:54:4e
      interfaces:
        - eth0

Note: You may need to create /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
network: {config: disabled}

sudo netplan --debug generate
sudo netplan apply
reboot # mandatory
See https://cloudinit.readthedocs.io/en/latest/topics/faq.html


How to unify KDE 4.5 theme when running kde applications with root?

You can change the root theme/ui permatenly with:

$ sudo systemsettings

Otherwise you can copy all your kde configuration to root by:

$ sudo cp -R ~/.kde* /root/


How do I specify a USB device as a specific COM port?

You need to create a new UDEV rule to make sure the software always points to the correct port.

Go to /etc/udev/rules.d and create a file named "COM5.rules"

Edit the file and put the following line in it. The id's (067b) and (2303) must be replaced by the id's from your hardware.

SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="COM5"

After reboot a device called @COM5 will be created in /dev
Set the software to go to /dev/COM5

Rebooting or taking out the port and installing it again even updating, upgrading and even major version upgrades of the whole system, it all stays persistent.


Howto have thunderbird/lightning open ics files

See https://superuser.com/questions/382022/how-do-i-get-thunderbird-to-open-an-ics-attachment-directly-in-lightnings-calen

  For Thunderbird 15.0 / Lightning 1.7 the following procedure works for
  me:

Open the "Today Pane" ie. the Events panel on the right hand side next to the email list.

Drag&Drop the ics-file onto that pane.

  In my case (Kubuntu 12.04) it will create the event. Hope this helps.


Is there a way to get a driver for a Canon pixma mg5320 printer?

In fact, there are mg5300-series drivers available from Canon. They are not (yet) on their European site, but you can find them on
http://support-asia.canon-asia.com

I have a mg5350 with wifi. I downloaded the mg5300 series driver (.deb version) and installed it without any problem in Kubuntu 11.10.

Alex


Change directory colour displayed in the terminal

There isn't really a way to make it automatically change the color of a folder or file that you view, but you could do something with changing the permissions on the file, to make it change colors after viewing the movie. First, we will make sure that we have color enabled in our terminal. If you already see different colors for stuff in terminal, you can skip this step.

Edit ~/.bashrc, and make sure to uncomment the following line, if it is commented (simply remove the leading #'s)

#force_color_prompt=yes

You will have to close and re-open a terminal for this to take affect. Now that we have color in the terminal, a simple way to "mark movies as watched" would be to play with the permissions.

If your movies are all files, you could do something like setting the executable bit, which would make them green, by default. This shouldn't really be much of a security issue.

chmod +x MyMovie.mkv

If your movies are stored in separate folders, and you want to mark the containing folder as watched, you could do something like adding the sticky bit, which means that only the owner/creator of the folder (and files within the folder) can delete/rename them. In a typical household scenario, this shouldn't pose any real security risks (in fact, it would be more secure). This will make the "watched" movie show up as white, with a blue background.

chmod +t MyMovieFolder


There's two things needed.

A script must have #! line telling the OS which interpreter to use. In your case your very first line in the code must be #!/usr/bin/env python3
You need to open file manager , go to Edit -> Preferences -> Behavior, and select what to do with executable files

Finally , make sure your file itself actually has executable permissions set. In terminal you can do chmod +x /path/to/script.py and in GUI, right click on the file and alter its Properties -> Permissions

Note about shebang line

The very first line is called shebang line and must start with #! ; whatever comes next is the name of the interpreter that will read your code. In case you are using python3 you could use either #!/usr/bin/python3 or  #!/usr/bin/env python3 for portability. If you are not using code that will be specific to python version - just use #!/usr/bin/env python

Note on the script output:

If your script prints output to console, it will need to have terminal window, or alternatively use GUI dialogs such as zenity.  Prefer using Run in Terminal option if you want to see the code. If you want the script to do something without seeing console output - use Run option.

In addition, if you have command line parameters , such as sys.argv[1] in the script , you can't set them unless you have terminal window open.


Shortcut to switch  between Analog Stereo output & HDMI audio output

With pulseaudio we are able to select the output sink from the command line:

pacmd set-default-sink "SINKNAME"

This command can be used in a launcher, script or even assigned to a keyboard shortcut for fast switching between different sinks. Please replace "SINKNAME" by the name or number of your desired sink. A list of known sinks with their associated numbers and names is given by the command:

pacmd list-sinks

Note: Changing the output sink through the command line interface can only take effect if stream target device reading is disabled. This can be done by editing the corresponing line in /etc/pulse/default.pa to:

load-module module-stream-restore restore_device=false

Alternatively we could run pulseaudio to simultaneously output sound to the internal audio device, and to the hdmi-device by running paprefs with the option to add a virtual output device:


Dmidecode --type 17 error information handling

For reference, the DMI specification is the best place to look for the DMI field explanation.  You need to refer to section 7.18 "Memory Device".
DMI type 17 (Memory Device (Type 17) structure) structure bytes 0x06..0x07 provide a 16 bit value called the "Memory Error Information Handle."  If the system does not provide the error information structure, the field contains hex value 0xfffe; otherwise, the field contains 0xffff or the handle of the error info structure.
The handle refers to the Handle number as provided by DMI table type 18 ("32-Bit Error Information) in bytes 0x02..0x03 in this table. Section 7.19 of the DMI specification describes this structure.  In your case, you need to look at the full DMI dump and look for tables with DMI type 18 and check for the one that has the matching handle number 0x0000.  This has fields that describe the memory error type (See section 7.19.1 for the error types), the memory operation that caused the error and even the 32 bit physical address of the error (if you are lucky).


Is it possible to remove login password and sudo password on 20.04 LTS permanently?

To remove login and sudo passwords do the following:

Login password:

Enable Automatic Login. (This should allow you to log in automatically into the OS) .

Also, remove the password from the keyring by using an empty string.
An alternative (but I won't advise since I don't know the implications) may be to remove the file login.keyring as shown below:
$ rm ~/.local/share/keyrings/login.keyring

Sudo password:

Edit the sudoers file:
$ sudo visudo

Disable the sudo password:

First, check whether there’s an existing rule with your alias. (In the file sudoers. I think it is found in /etc/). If there is, it should look like: YOUR_USERNAME ALL=(ALL) <SOMETHING>:ALL.
 ~$ sudo nano /etc/sudoers

If there isn’t, move to the end of the file and create a new rule there as follows:
 YOUR_USERNAME ALL=(ALL) NOPASSWD:ALL

Save the changes and exit the editor: Ctrl + O and Ctrl + X.

Voilà! You can now test it by installing an app.

Hope this goes a long way to help you...


Copy and paste between remote sessions using Remmina

I too am experiencing this in Ubuntu 15.04, for now, all I can do is direct you to the bug I reported:
https://bugs.launchpad.net/ubuntu/+source/remmina/+bug/1439478

Update: I ultimately solved this by installing a newer version this way:

sudo apt-add-repository ppa:remmina-ppa-team/remmina-next ; sudo apt-get update ; sudo apt-get install remmina remmina-plugin-rdp

After doing this, it may require a reboot.


How can I prevent applications sending data over the net without my consent?

I don't believe there's a simple, non-technical solution. That said, if you're willing to get your hands dirty, read on.

Ubuntu uses a permissions framework called AppArmor, in which each application has a "profile" that defines what it is allowed to do. If you have administrator privileges, you can edit AppArmor profiles to allow applications on your system to do less. You can also create restrictive profiles for binaries that don't have them. Profiles are stored in /etc/apparmor.d/.

You'll want to read the AppArmor Profile Language Guide and Ubuntu Community Documentation. In essence, however, you want to remove all network permissions, and then put all profiles into "complain" mode so you know when they're trying to do networking with:

sudo aa-complain /etc/apparmor.d/*


Can't change Flash settings from Chrome neither Firefox

This is known problem which happens when you are using composite manager (Unity 3D, Gnome with Compiz…) and the site with embedded Flash has scrollbars.

To make Settings window responsive, you need to use fullscreen. For example go to YouTube video, switch it to fullscreen and then open the Settings (it may take two or more attempts before the window actually opens).


Cannot create a linux partition in GParted because of warnings and minimum size and maximum size are the same

Firstly, always shrink/extend NTFS partitions using Windows own Disk Management application. Use gparted to manage EXT4/swap partitions.

When using the Windows Disk Management application, if you can't shrink your Windows partition enough, it's probably because of an unmovable file like a swap or hibernation file. You'll temporarily need to disable swap, you may have to reboot here, defrag, and then retry the shrink operation. Remember to re-enable swap when you're done.

Second, the caution sign that you see in gparted beside sda3 and sda4 may be solvable, at least for sda4. Check to make sure that ntfs-3g is installed. It probably is already.

In terminal type:

sudo dpkg -l ntfs-3g | grep ii
if you get no result from this command, then you don't have it installed, and you probably should install it...

sudo apt-get update
sudo apt-get install ntfs-3g

If you're goal is to dual-boot Windows and Ubuntu, you'll want to do this to disable fast startup and hibernation:

In Windows:

boot into Windows
open the Power control panel
choose change what the power buttons do
choose change options that are unavailable
uncheck fast startup
close the Power control panel
open an administrative command prompt window
type powercfg /h off
type chkdsk /f c:
approve to run chkdsk at next reboot
reboot into Windows to let chkdsk run on drive C: