Plain text editor that supports shared file editing like in LibreOffice I want to share a .tex file with another person for us to edit it together, I took a look over collaborative editing in Gedit, that is awesome.

Although it still lacks an important feature for me, that is: When one user edit something it stay marked with different color until the other accept the edition, and when one user delete something it isn't instantly deleted until the other user accept so.

Editing a file simultaneously doesn't matter for me, but recording one user's editing and only applying it after the other accepts do.

This feature is present in LibreOffice, I took a screenshot:

It is in Portuguese, but what matters is that black text is text that was already accepted from both users, blue marked text is text I wrote, but the other user still didn't accept and yellow marked is text that the other user wrote but I didn't accept yet. Then I can right click on the text and select to accept the suggestion and the marked text will turn black normal text. (Blue strikeout text is text I deleted and the other user didn't accept yet)

This is a key feature for me. I need to edit a .tex file this way, can be with Sublime, Gedit, Geany, Kile, etc. I prefer Gedit, Geany or Kile although any plain text editor that has this feature will be welcome. If this feature simply doesn't exist in plain text editors then I can edit the .tex files through LibreOffice, but I don't want to do it.

You should try Gobby. It's specifically designed for this task.

Try Kate. Kate is a powerful text editor that can open multiple files simultaneously.

To install, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install kate

Or just click Kate


How I can recover a previous version of a file? I modified a .txt file and saved it. When I opened it again, I saw that I deleted one thing from the last version I saved. So I would like to know if I can recover what I deleted?

This file is very important to me. You have to help me! My life is on this file.

I didn't delete anything, I only edited the file. When I tried to save I had get an error saying that it could not read some characters so I closed the editor and when I opened it again some lines just disappeared.

If you used GEdit and you havent disabled the backup function, then there must be a hidden file with name similar to your file but with ~ appended to it. So if your file name is somefile.txt then look for somefile.txt~ in the same directory. This is the backup file and will give you your files state before last save.

This saved my life, while I was using Google Drive (insync / non-free).

Enter Google Drive in the web browser; right-click on the file;

Click "Manage versions" (File lasts 30 days in google drive server or max. 100 versions);

Download the version of interest


Clear "Most Frequently Used" in "Applications"? In the new Ubuntu, can you clear "Most Frequently Used" in "Applications"?

Like this: Deleting last few hours of zeitgeist history like in Firefox?

Open up a terminal window and execute the following commands,

To clear recent documents, use:

rm ~/.local/share/zeitgeist/activity.sqlite zeitgeist-daemon --replace
To prevent new items from being created run the following command,

echo -n > ~/.recently-used.xbel

sudo chattr +i .recently-used.xbel
If you want to restore it back, then

sudo chattr -i .recently-used.xbel


Crossplatformui error I face crossplatformui errors when I install the crossplatformui application for mts mblaze wireless broadband modem.  On a forum I learnt that the error was because the package needed a kernel version lower than 2.6 whereas I use Ubuntu 12.04 the kernel version being 3.2.0.24

So I want to know where I could find

A compatible crossplatformui package for the kernel version 3.2.0.24
A safe way to remove crossplatformui other than editing the dpkg status file which did work once but caused a big problem lately. I would like to know a safer and better way to remove/purge it

In my experience, you don't have to edit the dpkg status to remove it.  Here's what I did:

Enter /var/lib/dpkg/info

cd /var/lib/dpkg/info

Delete all entry related to crossplatformui

sudo rm crossplatformui.*

Force remove crossplatformui

sudo dpkg --remove --force-remove-reinstreq crossplatformui

Display would be :

    (Reading database ...
    dpkg: warning: files list file for package `crossplatformui' missing, assuming package has no files currently installed.

    (Reading database ... 159448 files and directories currently installed.)

    Removing crossplatformui ...

Done!  I didn't experience any problem with my system (Ubuntu 12.04 with kernel 3.2.0-24-generic-pae) by doing this method.

Cheers!

CrossPlatformUI works along with CDMA modem switcher.

I got this from a Indonesian website which I don't remember right now. It works for me. Only thing is you have to make sure the version of CrossPlatformUI you are using identifies your data card.

Crossplateform works even if it is not properly installed. It works for me so it will work for you. My version is 2.0.6.

I hope this help.


Upgraded 16.04 to 18.04, won't let me log in I just upgraded from Ubuntu 16.04 LTS to 18.04. After rebooting, I get my normal login screen, which still says "Ubuntu 16.04". I click my name and enter my password, and so far get one of the three following:

The login box vanishes, but the screen remains the same (with my desktop background and the Ubuntu 16.04 text and nothing else). This stays for minutes with nothing happening.
I get the login prompt back.
I get a black screen.

What would be my next step? Will I need to make a clean install?

The solution to this question in jolindbe's own words copied from a comment which was posted an hour ago is:

  As for my problem (above), I finally managed to login to the Ubuntu prompt, and from there I could find that some packages were not correctly updated. After updating those, I ended up with a (mostly) perfectly working 18.04 system.

Yeah, I just now foolishly allowed Ubuntu to install a backlog of updates and when I rebooted I suddenly found myself in this login loop. Clearly Ubuntu no longer recognizes who I am.

So when booting up, after the BIOS screen goes away I press down on the SHIFT key. I then get a GRUB screen that allows me to choose "Advanced Options for Ubuntu". Selecting that, I choose to boot up using an older generic, non-recovery mode kernel version. I am then able to login with my account normally.  This will hold me over until I have the time to dig deeper into this puzzling problem.


Unresolvable problem An unresolvable problem occurred while initialising the package information.

Please report this bug for the 'update-manager' package and try to include the following error message:

'E:Malformed line 57 in source list /etc/apt/sources.list (dist parse)'

Count down to Line 57 of the /etc/apt/sources.list file, and just delete it from the file.

In order to modify the file, remember you'll need to open it as root with the following command:

gksudo gedit /etc/apt/sources.list

After bringing this file back to normal, run:

sudo apt-get update


WiFi not working on HP 430 Probook with Intel 8260 WiFi hardware I tried installing, Ubuntu 14.04 on my HP Probook and WiFi is not working.

I tried updating my firmware to 1.127.15, still it does not work. The laptop has Intel 8260 WiFi Hardware.

Is there anything I can do to fix my WiFi?

14.04 is too old for this very new device. To upgrade your WiFi drivers without upgrading all your system, you can try installing Core13 from:

https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi/core_release

These issue will normally get fixed by upgrading the firware

  sudo apt-get update

  sudo apt-get install firmware-b43-installer

If the same issue reoccurs after following the above steps please do follow the command below and check for error to further proceed on this issue

  lspci -nnk | grep -EA3 Ralink


How do I add swap after system installation? I did not create a swap partition during Ubuntu installation.  Later, I freed up some space and made a swap partition.  Now after each boot up, I am manually opening gparted to right-click the swap partition to turn on the 'swapon' option.

How can I automatically enable the swap partition at boot?

Also, if I had not created the swap partition, what are my other options?

You need to edit /etc/fstab and add the new swap partition.

sudo nano /etc/fstab

You need to add a line that looks like

UUID=735b3be3-779c-4d21-a944-b033225f3ab4 none   swap    sw      0       0

and you get the UUID using the command

sudo blkid /dev/sda3

(substitute /dev/sda3 with the appropriate device name; in order to see the appropriate device name, we can use lsblk - as said here).

Related:

How to edit files in a terminal with nano?

If you installed new empty disk then need to create swap partition on it.

Show partitions:

$ sudo fdisk -l

Disk /dev/sdb: 4.1 GiB, 4420796416 bytes, 8634368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Create swap partition:

$ sudo fdisk /dev/sdb

Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xbf65f113.

Command (m for help): m

Help:

DOS (MBR)
   a   toggle a bootable flag
   b   edit nested BSD disklabel
   c   toggle the dos compatibility flag

Generic
   d   delete a partition
   F   list free unpartitioned space
   l   list known partition types
   n   add a new partition
   p   print the partition table
   t   change a partition type
   v   verify the partition table
   i   print information about a partition

Misc
   m   print this menu
   u   change display/entry units
   x   extra functionality (experts only)

Script
   I   load disk layout from sfdisk script file
   O   dump disk layout to sfdisk script file

Save & Exit
   w   write table to disk and exit
   q   quit without saving changes

Create a new label
   g   create a new empty GPT partition table
   G   create a new empty SGI (IRIX) partition table
   o   create a new empty DOS partition table
   s   create a new empty Sun partition table

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-8634367, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-8634367, default 8634367):

Created a new partition 1 of type 'Linux' and of size 4.1 GiB.

Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): L

0  Empty           24  NEC DOS         81  Minix / old Lin bf  Solaris
 1  FAT12           27  Hidden NTFS Win 82  Linux swap / So c1  DRDOS/sec (FAT-
 2  XENIX root      39  Plan 9          83  Linux           c4  DRDOS/sec (FAT-
 3  XENIX usr       3c  PartitionMagic  84  OS/2 hidden or  c6  DRDOS/sec (FAT-
 4  FAT16 <32M      40  Venix 80286     85  Linux extended  c7  Syrinx
 5  Extended        41  PPC PReP Boot   86  NTFS volume set da  Non-FS data
 6  FAT16           42  SFS             87  NTFS volume set db  CP/M / CTOS / .
 7  HPFS/NTFS/exFAT 4d  QNX4.x          88  Linux plaintext de  Dell Utility
 8  AIX             4e  QNX4.x 2nd part 8e  Linux LVM       df  BootIt
 9  AIX bootable    4f  QNX4.x 3rd part 93  Amoeba          e1  DOS access
 a  OS/2 Boot Manag 50  OnTrack DM      94  Amoeba BBT      e3  DOS R/O
 b  W95 FAT32       51  OnTrack DM6 Aux 9f  BSD/OS          e4  SpeedStor
 c  W95 FAT32 (LBA) 52  CP/M            a0  IBM Thinkpad hi ea  Rufus alignment
 e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a5  FreeBSD         eb  BeOS fs
 f  W95 Ext'd (LBA) 54  OnTrackDM6      a6  OpenBSD         ee  GPT
10  OPUS            55  EZ-Drive        a7  NeXTSTEP        ef  EFI (FAT-12/16/
11  Hidden FAT12    56  Golden Bow      a8  Darwin UFS      f0  Linux/PA-RISC b
12  Compaq diagnost 5c  Priam Edisk     a9  NetBSD          f1  SpeedStor
14  Hidden FAT16 <3 61  SpeedStor       ab  Darwin boot     f4  SpeedStor
16  Hidden FAT16    63  GNU HURD or Sys af  HFS / HFS+      f2  DOS secondary
17  Hidden HPFS/NTF 64  Novell Netware  b7  BSDI fs         fb  VMware VMFS
18  AST SmartSleep  65  Novell Netware  b8  BSDI swap       fc  VMware VMKCORE
1b  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid fd  Linux raid auto
1c  Hidden W95 FAT3 75  PC/IX           bc  Acronis FAT32 L fe  LANstep
1e  Hidden W95 FAT1 80  Old Minix       be  Solaris boot    ff  BBT
Hex code (type L to list all codes): 82
Changed type of partition 'Linux' to 'Linux swap / Solaris'.

Command (m for help): m

Help:

DOS (MBR)
   a   toggle a bootable flag
   b   edit nested BSD disklabel
   c   toggle the dos compatibility flag

Generic
   d   delete a partition
   F   list free unpartitioned space
   l   list known partition types
   n   add a new partition
   p   print the partition table
   t   change a partition type
   v   verify the partition table
   i   print information about a partition

Misc
   m   print this menu
   u   change display/entry units
   x   extra functionality (experts only)

Script
   I   load disk layout from sfdisk script file
   O   dump disk layout to sfdisk script file

Save & Exit
   w   write table to disk and exit
   q   quit without saving changes

Create a new label
   g   create a new empty GPT partition table
   G   create a new empty SGI (IRIX) partition table
   o   create a new empty DOS partition table
   s   create a new empty Sun partition table

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
Make partition swap:

$ sudo mkswap /dev/sdb1
Setting up swapspace version 1, size = 4.1 GiB (4419743744 bytes)
no label, UUID=e2c53e87-c32c-4230-8405-25b471af6524
Use turn on swap on created partition:

sudo swapon -U e2c53e87-c32c-4230-8405-25b471af6524
Make swap permanently:

sudo nano /etc/fstab

Add line below and save file.

UUID=e2c53e87-c32c-4230-8405-25b471af6524 none  swap    0

Check swap

sudo free -m
              total        used        free      shared  buff/cache   available
Mem:           1993         203        1271           6         518        1635
Swap:          4214           0        4214

Done.


Does Ubuntu One (U1) HAVE to be synchronised? I want to upload all my pictures, videos and documents to Ubuntu One and then delete them off my pc and forget about them.

Is this possible?

You can use the "Disconnect" button ("Desconectar" in spanish) in your Ubuntu One's client top right corner, after which your computer will stop syncing until you click it back to re-connect and this way start syncing again. You can also stop individual folders from being synced and re-synced again by simply activate/deactivate the corresponding checkbox in the same window.

Both options allow you to run a first time/one time sync and stop syncing, so you can delete what you don't wish to be in sync and it will remain on the cloud but if you reactivate the global/partial sync, the files will come to your computer.

Here is a screenshot (This system is in spanish, just for your consideration)

Good luck!

The solution I can think of is to upload your photos and then uninstall Ubuntu One from your PC.

This way, your PC won't be syncing, but your photos will remain "in the cloud".


Can i run the latest version of Ubuntu on this computer? Hello I am moving from Windows to Ubuntu the problem is that my computer is weak. I have already tested the latest version of Ubuntu (20.04 LTS) and it sucks to do the most basic things like surfing the internet and using Libre Office, I also tested Ubuntu flavors and what worked best was Ubuntu Mate I think the problem of slowness has to do with the integrated graphics card which is an intel g33 / g31 express chipset family and I also have a lot of screen tearing in moving windows, watching videos and sometimes the computer freezes, I don't know what to do, I really like Ubuntu and I wanted use it smooth, i'm currently using a natiga version of Ubuntu (16.04 LTS) and it works perfectly but there are many things that the old version doesn't have that i want, the pc settings are down, thanks.
Configs:
Memory: 4Gb 800 MHz DDR2
CPU: Pentium(R) Dual-Core CPU E5300 @ 2.60GHz × 2
Graphics: Intel® G33
Architecture: x64
HDD: 320Gb
If you need more information aks me.

Ubuntu 20.04 is a bit unstable. Try to use ubuntu 18.04. If your computer is so weak you can try to run Lubuntu or Kubutu. They are more speed than Ubuntu gnome.
Anyway, give us the output of dmesg -l err in ubuntu 20.04.


High CPU Temperature after switch to Ubuntu 16.04 The idle CPU Temp of my Intel i5-3210M CPU was ~40°C on Ubuntu 14.04.
Now, after upgrading to Ubuntu 16.04 (complete reinstall) it idles at ~52°C.

Battery lifetime is also noticeably lower.

What can I do? (What information is needed?)

I'm having the same problem. I ran the top command and the browser (vivaldi) is using the most cpu with up to 5 processes. The % range is between 1.5 to 7.0 without playing videos. The % range of the vivaldi browser playing videos is between 13.0 and 46.0. I'm not sure if has to do with ubuntu 16 or the vivaldi browser. I have no problems before with ubuntu 14.04.

I switched browsers (vivaldi, chromium, firefox) and the cpu's temperature incremented immediately within 90C.

#

I want to update this post. I couldn't find a solution running Ubuntu 16.04. I ended up reinstalling Ubuntu 14.04 and monitor the temperature. Firefox and Vivaldi still have problems raising the cpu temperature while playing videos. However, cpu temperature stays  between 60's and 70's playing videos with Chromium. I watched around one hour of a video tutorial and the cpu temperature was stable.
Looks like is a combination of OS and browser. The combination that works for me Ubuntu 14.04 and Chromium.
Hope Canonical developers gets notify about the problem and fix it.

The reason is because Ubuntu 16.04 does not use graphics. Now your CPU is doing all the heave lifting for the graphics.
Sadly they won't allow you to use vendor graphics drivers anymore.


Is it possible to open a terminal in the current directory? I am new to Ubuntu, and was wondering whether it is posible to open a terminal with a path matching your current location in the file manager? In Windows it was very easy, but how do you do it in Linux?

From https://askubuntu.com/a/207448/371765

Run sudo apt-get install nautilus-open-terminal in a terminal, followed by nautilus -q to quit all open nautilus windows. When nautilus is next opened, a line saying open in terminal should appear in the right click menu.

Please note that the package nautilus-open-terminal is in the universe repositories.

It is a really simple matter to deal with. You can simply install nautilus open terminal package and if you install it , then you can simply open terminal from any folder/director you wish just by right clicking and clicking on open terminal here.
To install it
all you want to do is to install it by opening a terminal, hope you know how.
Then type this command and press enter :

sudo apt-get install nautilus-open-terminal

After installing go to a folder and try it. Just open home folder and right click >> Then select Open terminal here

or you have another choices to install other file manager and in some of them there is the function to open terminal here on right click menu. Nemo has it. Good luck


What is the correct way to edit a crontab file? I am trying to automate the refreshing of awstats for my webserver and understand that I need to use cron to set that up.  So each user has a crontab file?
I was following the instructions here community/AWStats
And it says to go to the file at: /etc/crontab
That file already has some information in it.  Is this the main crontab file or something?  I have seen some instructions online to use the file that pops up with crontab -e.
What is the proper file to use and the best way to do this?
If I schedule a task as my non-root user, will it run by itself at the time interval as specified, with no issues?
Will I need to restart the server after saving the cron job in the crontab file before it will start working?

What is the proper file to use and best way to do this?
crontab -e is the best way to do it - this will allow you to easily edit per-user crontabs.
If I schedule a task as my non-root user, will it run by itself at the time interval as specified, with no issues?
Yes, and it will run with the privileges of that user account.
As a principle, it is best to run scheduled tasks with the lowest privileges you can get away with, so if what you are doing will not require root, don't use root.  If you don't even need to be able to access your account's files and folders, then you can create a new user and use that user account only for that task.  On the other hand if your task does require root, use root's crontab (su / sudo su to root then use crontab -e).
Will I need to restart the server after saving the cron job in the crontab file before it will start working?
No it'll start working straight away (well, the next possible scheduled time).
Why not edit the file directly?  Where is it located?
The user crontab files are located in /var/spool/cron/crontabs, but their permissions are set in such a way that they can't be traversed to without superuser permission (but once open and the cron process drops privileges it can still access the file).
The system is not designed for end users to edit these files directly, and indeed the top of the file has a stern DO NOT EDIT THIS FILE warning at the top to this effect.  The file is instead designed to be edited via crontab -e which sets up a temporary mirror of the file in /tmp for editing - without the stern warning - after which it checks and installs the permanent crontab file itself.  This can all be done without superuser permission.
If you did edit the crontab file directly I don't know what the result would be.  It's possible it simply wouldn't take effect until next restart and any errors may be hard to debug.

I can't find it now, but i thought i read that you don't edit with crontab -e. You copy the crontab to a file
crontab -l > crontab.txt
you edit this file
then you put it back
crontab crontab.txt
Don't know where i read that. Obviously things have changed because i can't find that note any longer.


gparted : error while applying operations I tried to shrink the volume for Windows 7 in Ubuntu,

And I got this error

Error details:

GParted 0.25.0 --enable-libparted-dmraid --enable-online-resize

Libparted 3.2
Shrink /dev/sda5 from 297.61 GiB to 217.32 GiB  00:00:00    ( ERROR )

calibrate /dev/sda5  00:00:00    ( SUCCESS )

path: /dev/sda5 (partition)
start: 1001472
end: 625141759
size: 624140288 (297.61 GiB)
shrink file system  00:00:00    ( ERROR )

lvm pvresize -v --setphysicalvolumesize 227872768K /dev/sda5  00:00:00    ( ERROR )

0 physical volume(s) resized / 1 physical volume(s) not resized
Using physical volume(s) on command line.
Archiving volume group "mint-vg" metadata (seqno 6).
/dev/sda5: Pretending size is 455745536 not 624138240 sectors.
Resizing volume "/dev/sda5" to 455745536 sectors.
Resizing physical volume /dev/sda5 from 0 to 55632 extents.
/dev/sda5: cannot resize to 55632 extents as later ones are allocated.

========================================

I just found that the hard drive was corrupt

Windows stores some unmovable files near the end of the disk. It is most likely the swapfile.

It is best to use Windows to manipulate Windows partitions. First you need to Boot Windows and turn off virtual memory, then delete the swap file. Then, go to Control Panel --> Administrative tools ---> disk manager and shrink the partition. Next, re-enable virtual memory.


./setup.sh Permission denied What is the problem in that?
I work in xubuntu x86_x64
I get the following error while trying to execute install_bin :

mohamed@mohamed:~/Desktop/installer_v3.0$ ls
batch_installer  install_bin  installer  install.now  setup.sh
mohamed@mohamed:~/Desktop/installer_v3.0$ ls -l
total 44
-rw-rw-rw-  1 mohamed mohamed 8533 Jan 24  2013 batch_installer
drwxrwxrwx 13 mohamed mohamed 4096 Feb  9 19:29 install_bin
-rw-rw-rw-  1 mohamed mohamed 9179 Jan 24  2013 installer
-rwxrwxrwx  1 mohamed mohamed 9179 Jan 24  2013 install.now
-rwxrwxrwx  1 mohamed mohamed  497 Jan 24  2013 setup.sh
mohamed@mohamed:~/Desktop/installer_v3.0$ ./setup.sh
/home/mohamed/Desktop/installer_v3.0/installer: Permission denied.
mohamed@mohamed:~/Desktop/installer_v3.0$

I found that you're new to askubuntu. so I will start by jumping to sudo command.

try

sudo sh setup.sh

It should work because your script setup.sh is using installer also

sudo should work but you can do it the other way (correct way - as the other answer by @geirha):

sudo chmod +x installer

and then run your setup.sh as you were trying

./setup.sh

Have you tried this:

sudo bash
sudo su
sudo sh /.setup.sh
~/desktop/installer3.0$ ls

and then it might work fine this way.


Gigabyte RTX RGB fusion light(LED) control in Linux Is there any software(or dev repo) to control RGB fusion light control for linux/ubuntu? I got a new RTX 2080ti but the led light is always turned off.

OpenRGB is an open source app to control RGB devices.
https://gitlab.com/CalcProgrammer1/OpenRGB
In the releases page there are linux binaries in the appImage format:

download it
make it executable: chmod +x OpenRGB_<version>.AppImage (of course, <version> is a placeholder for the version info, replace it
run as sudo: sudo ./OpenRGB_<version>.AppImage

I have the same issue with my RTX 2070,so far I have come across an RGB Fusion tool for the motherboard

https://github.com/tylerszabo/RGB-Fusion-Tool/blob/master/README.md

but you can change the motherboard LED's in the BIOS so..


Running Ubuntu 14.04 lts only folders I can access is in the home folder and all others I am denied access. how can I fix this? I am completely new to a Linux operating system and was trying to setup Owncloud to use as a file server. I need to copy the owncloud folder into /var/www/ as an example but every folder on my system I am denied access to other than folders within my home folder. I am logged in as administrator but it tells me I am not the owner and do not have permission to access or make changes to any of the other folders. Any help with this would be greatly appreciated.

You need to take ownership of the directories you want to access.

Open terminal

sudo -s  hit enter and authenticate

chown -hR root /u

(change root to the username you want to take ownership) (u is the file path)

Here is an example:

chown -hR username /home/username/.config/ibus

The syntax -hR takes ownership of subfiles and folders too!

Remember command line in linux IS case sensitive.

Why did I lose 2 points for answering this question correctly? It is 100% correct on the money, you just need to take care with which directories you take ownership of as it can cause security issues!

Best way to do it is to copy needed files as root

sudo cp -r ORIGIN DESTINATION

You also can change folder owner to yourself with

chown USER.GROUP DIRECTORY

or give write access to it to everyone with

chmod 777 DIRECTORY

These are more dangerous, be careful when doing this and use only with no outer access to the directory.

If you feel yourself better when working with GUI, you can try launching your file manager as root,

sudo nautilus

for example. Again - be very careful. This behaviour was intended to help reduce human errors.


How to configur grub2 I can't say I'm new to Ubuntu, but I'm still a noob. I have recently installed a SSD in the place of my notebook's CD drive. Then I have installed Kubuntu 18.10 and kept my HD with Windows untouched (something tells me I'm not going to load Windows so soon).

Now when I boot the computer, GRUB shows a command line, if I type 'exit' then it shows the "normal" menu with Ubuntu and Windows. I have searched the problem, but what I have found either semeed a little different from my problem or I lacked the confidence to follow the solution.

I would like to know how i could configure GRUB so it goes straight to the menu screen.

I have tried this https://askubuntu.com/a/1105737/935425 but it didn't make da bash like grub go away, it have just grown the list of possible boots with UEFI options.

I went to Boot menu and turned out there were two boot enter for the same HD, the one with Ubuntu, so I changed their order in boot and resolved.
EDIT
It didn't work. I'm still in the same point. I just gave up.

Configure GRUB2 Boot Loader settings
Warning: The default configuration file for GRUB2 is /boot/grub/grub.cfg. You shouldn’t edit or modify this file, unless you are much familiar with GRUB2. This is the main file to boot into the Linux OS. If you do anything wrong with this file, then you will be surely end up with broken system. So, Don’t touch this file!

All settings related to the GRUB2 will be stored in /etc/default/grub file. Whatever the changes you made in this file will be reflected to the GRUB2.

you found configurations down below this website

https://www.ostechnix.com/configure-grub-2-boot-loader-settings-ubuntu-16-04/


Ubuntu 12.04 64bit doesn't shutdown properly i searched a lot for a solutions to this problem
i have an two  Ubuntu 12.04 installs both have the same issue , after invoking a shutdown with varied ways sudo init 0, "sudo halt" , menu shutdown, but they all have the same result,
all goes good until it reaches

Will now halt
[time] power down

then it hangs there forever, i tried to modify "/etc/default/grub"
adding GRUB_CMDLINE_LINUX="acpi=force" then tried GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force" and updating grub each time in vain
note that restarting the machine is not affected, because it reboots smoothly
I'm using GPT/UEFI install for x64 12.04 both,
and in the grub added this entry which also hangs

menuentry "System shutdown" {
    echo "System shutting down..."
    halt
}

any idea of how to fix this would be appreciated.
UPDATE
/var/log/syslog is empty before and after shutting down-starting
note that using a direct restart (like sudo reboot) works perfectly, but shutting down and starting manually is faulty

Okay, I cannot solve the problem with the GUI shutdown method, but I had the same problem.

The command

sudo shutdown now

is equivalent to

sudo halt

which is simply halting the machine. That means it is simply halting the OS and stopping all CPUs. Once the system is cleanly halted, the user may safely hit the Power button on his computer manually.

So you can just press the power button if you want.

However, to solve that you can use this command

sudo shutdown -P now

The poweroff, shutdown -P now, and halt -p commands all do the same thing as halt alone, while additionally sending an ACPI command to signal the power supply unit to disconnect the main power. This prevents you from having to physically push the Power button on your computer.

That suggests you can also use this command:

sudo poweroff

or this:

sudo halt -p

It is because of your computer is not really eligible for using ubuntu or it maybe because of you are using an old and customized version of ubuntu !
So, Its usually seen in customized versions of ubuntu.Some Ubuntus made in Ubuntu customization kits had this trouble before with me...
So I did install another version of ubuntu to fix this problem.
You easilly upgrade if you are really using an ubuntu version....
Just do upgrade to fix this problem.
This problem is just because of the Shutdown button isn't setted up currectly !
So try installing a fresh version of ubuntu which can be downloaded from Ubuntu.com
If you still face some problems then it  might be because of your system problems...
Or you can simply try using this code :

% sudo grub-update

(Type this code in Terminal and Press enter)
...............................................
If it doesn't works, then try this :

Open Terminal emulator by Pressing Ctrl+Alt+T together.
sudo vi /etc/default/grub type this code in it and press enter !
Locate the following part in the loaded content - GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
Add acpi=force at the end as shown here: GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash acpi=force”
Save and exit using :wq
Finally run this command and press enter,

% sudo update-grub

I hope this will work for sure.This worked for me when I had the same problem with my Ubuntu 12.04 ! So I think this will work ! :)

ref: unixmen.com


Can not get internet my internet says the it's conected. But when I search anything it says
this site can not be reached
Ask ubuntu.com's server Ip address could not be found.

What should I do?

Open your terminal and write:

cd /etc
sudo nano resolv.conf
#comment the line of nameserver 127.0.0.53 if it was found
#type:
nameserver 8.8.8.8
nameserver 8.8.4.4
#then click ctrl + x to save, press y, press Enter

finally, write inside the terminal the following command to restart the network service:

sudo service network-manager restart


How to "keep" data from an LVM snapshot? This question deals with creating LVM snapshots but doesn't detail what to do with them afterwards.

For example, let's suppose I have a volume group (vgpool) and a logical volume (lvboot). I create a snapshot of the volume (lvboot-snap) like so:

lvcreate --size 1G --snapshot --name lvboot-snap /dev/vgpool/lvboot

What commands do I run to:

revert everything to the way it was before the snapshot?
preserve everything written after the snapshot and remove the snapshot?

lvconvert --merge does NOT "keep the changes made since the snapshot was taken" - it destroys those changes!

To understand why, you have to realize that, in LVM, a snapshot stores changes made to the original volume since it was taken. This is why it is a COW (Copy on Write) snapshot - the original volume is written as usual, but the original data is Copied into the snapshot prior to the Write.

So:

To discard all the data since the snapshot - that is, to "roll back" to when the snapshot was taken: lvconvert --merge vgpool/lvboot-snap (it will take a while)
To stop writing to the snapshot because you are happy with the original LV at this time: lvremove vgpool/lvboot-snap (it will happen almost instantly)

Please be careful and don't lose your data. At the time of this writing, the previous answer states the opposite. Please see this other answer for a detailed explanation.

To discard the snapshot you just remove the volume using sudo lvremove vgpool/lvboot-snapshot. Make sure it is not mounted before attempting to remove it.
To undo the changes made since the snapshot was taken and delete the snapshot use sudo lvconvert --merge vgpool/lvboot-snap, then reboot. (The operation will be performed at boot before mounting the filesystem.)


Is there a GUI to `visudo`? Quite simply, is there a GUI to visudo I can recommend to other users, and use for myself? I have to set up a system where over 50 users have different sudo privileges and I need to juggle them all.

1- "The configuration file for sudo is /etc/sudoers. It should always be edited with the visudo command. visudo locks the sudoers file, saves edits to a temporary file, and checks that file's grammar before copying it to /etc/sudoers."

2- Automatic repetitive work is generally best done via a script, not a GUI.


Mouse does not click in the focused window but the oldest window I'm on 14.04, lsusb shows my USB mouse on the list as Mad Catz, Inc

The mouse pointer can be moved smoothly and well but button clicks are a mess.

Another example: I am operating on a browser (e.g. Firefox), working perfectly well, except for the minimize/maximize/close buttons in the top left corner. Then I start a program, let's say terminal, which is on top of my browser. At this point terminal is in the foreground, which my keyboard agreed with me since I can type here. However, my mouse is not quiet on the same page: it still operates on the Firefox browser!

And I cannot bring any application to foreground by mouse clicking, only Alt+Tab works.

What is the problem? Hardware? Mouse raycast? Sensor? Any idea?

P.S. I tried to update the xorg and drivers but the problem remains.

An extra display under System Settings => Display is causing the error.

You have to disabled it.


Why can't I mount the Ubuntu 12.04 installer ISOs in Mac OS X? Over the past few days, I have downloaded both the 32 and 64 bit version of server and desktop to install on an Intel based PC.

It is normal from within OS X to double click on an ISO and it  will mount the ISO in the finder as well as within disk utility.

When I attempt to mount any of the Ubuntu ISOs I downloaded, OS X returns the error message The following disk images couldn't be opened. The reason given for the error is no mountable filesystem.

However, I am still able to open the ISO directly from disk utility and burn it to a DVD/CD.

What has changed in this release to cause this?  Is there something wrong with the current ISOs?

The OS X machine I am using is only two weeks old and is having no issues with any other ISO.

This is due to a bug (of sorts) in the package used to create the Ubuntu ISOs

Since 11.10, Ubuntu ISOs have been "hybrid", meaning that the ISO can also be written bit-for-bit to a USB device to make it a working Live-USB, without having to use StartUp Disk Creator, UNetBootin, etc.

Note that this "hybrid" is different from the OS X/Disk Utility definition of "hybrid", which simply refers to an ISO readable on both Mac (HFS+) and Windows (ISO9660).

Ubuntu's hybrid functionality is provided by the isohybrid script in the SysLinux bootloader. It works by encapsulating the standard ISO9660 CD filesystem within a partition, so that it will work unmodified if written to a USB/hard disk.

This patch/bug report discusses a problem in the way isohybrid sets GPT UUIDs, causing Disk Utility/OS X to fail to recognize the hybrid filesystem and consequently, failing to mount it. Hopefully it will be fixed at some point, making future Ubuntu hybrid ISOs compatible with Disk Utility.

Alternative to extract/explore Ubuntu ISOs on OS X: Keka

Keka is an open-source OS X frontend to the p7zip package, which is able to view and extract ISOs in addition to a myriad of other archive management features. While it won't let you "mount" the Ubuntu ISO on its own, it should let you view the ISO filesystem and extract what you need.

Convert the ISO in to a DMG.

hdiutil convert -format UDRW -o ~/Desktop/ubuntu-12.10-desktop-i386.iso.img ~/Desktop/ubuntu.iso)


Unity available from live-cd but not after upgrade from 10.10. How to fix? Unity works perfectly fine on my Dell E6400 (Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) == Intel GMA 4500MHD?) when run from Live-CD.

However it doesn't work on my 11.04 which was upgraded from 9.10->10.04->10.10.

What might be broken/misconfigured? Is there any "trick" I can enable 3D acceleration without reinstalling complete system?

Edit:

Unity support test gives following output:

/usr/lib/nux/unity_support_test -p
OpenGL vendor string:   Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Mobile Intel® GM45 Express Chipset GEM 20100330 DEVELOPMENT x86/MMX/SSE2
OpenGL version string:  2.1 Mesa 7.10.2

Not software rendered:    yes
Not blacklisted:          yes
GLX fbconfig:             yes
GLX texture from pixmap:  yes
GL npot or rect textures: yes
GL vertex program:        yes
GL fragment program:      yes
GL vertex buffer object:  yes
GL framebuffer object:    yes
GL version is 1.4+:       yes

Unity supported:          yes

No, your driver is ok. use ccsm (compiz config settings manager) and get rid of the conflicts, and you are good to go.

You have to activate you driver for the graphics card.
Go to System -> Additional Drivers and activate it.


App Won't Start On Bootup When Using Cron I have a ts3.desktop file in my /usr/share/applications folder that I want to run on system boot. The procedure I used to try and get this working is below.

crontab -e

Then in the editor (it opens nano), I typed the following line at the bottom of file. I also made the necessary carriage return after this line.

@reboot gtk-launch ts3 /usr/share/applications

Then I pressed ctrl+o to save it.

After I put these commands in, I did the following command to help you guys with troubleshooting this issue, see below.

$ crontab -l
no crontab for server
$ps -ef | grep cron | grep -v grep
root         532      1   0 21:35 ?                 00:00:00 /usr/sbin/cron -f

I'm not sure why it says no crontab for [user], maybe it will help you guys troubleshoot this issue with me. The second line apparently shows that cron is actually running.

After I reboot the file doesn't execute, i.e. the application doesn't start. I don't really know what to do, please advise.

FYI, the ts3.desktop file contents is below, and it has rwx permissions for everyone (and executes properly when the file is double clicked).

[Desktop Entry]
Type=Applications
Exec=/usr/bin/teamspeak3-server_linux-amd64/ts3server_minimal_runscript.sh
Icon=/usr/share/icons/ts3/ts3.jpg
Terminal=true
Name=Ts3

cron jobs do not have access to the gui ( if there even is one ).  If you want to run a gui app each time you log in to the gui, then use the startup applications tool.


How to merge multiple (more than two) videos on Ubuntu? I want to merge videos in batch size of twenty (20) each. I'm running a Linux machine. The videos are in mp4 format and moderate quality. Some even have the audio stream missing. So far I've tried ffmpeg, mencoder, cvlc/vlc and MP4Box. I want to write a command line script to achieve this, since I'm doing batch processing.

The main issue is that some of the solutions I tried work well for two videos, some work well for videos with audio stream and yet others work well for some other subset of my video set. However, I have not been able to find a comprehensive solution for this task.

I am using mkvmerge to join multiple MP4 files into single one:

mkvmerge -o outfile.mkv infile_01.mp4 \+ infile_02.mp4 \+ infile_03.mp4

In addition to Maythux's answer, from :

  A few multimedia containers (MPEG-1, MPEG-2 PS, DV) allow one to concatenate video by merely concatenating the files containing them.

I.e. the videos to be concatenated use one of the abovementioned video containers (to which I'll add MPEG-4 Part 14 for personal experience), you could simply:

cat video1.ext video2.ext video3.ext > video4.ext


Uninstall a program installed with Wine I am using Ubuntu 11.10. By using wine software i installed some software like nimbuzz and ibibo messenger. Both the programs are not working and showing the bug as We're sorry, but an unknown error has caused ibibo Messenger to close.

So I wanna uninstall those.

How to uninstall those type of programs which I installed through Wine?

Type in a terminal or press Alt+F2 and type wine uninstaller will give you access to the built in Add/Remove tool from wine. From there you can uninstall a program you have installed in a bottle.

To completely remove the bottle for your user (and thus remove everything from a wine bottle and start again) you can open a terminal and type rm -rf ~/.wine or as an alternative open Nautilus and in your home folder press Ctrl+H, locate the .wine folder and delete it. wine will create a new folder next time you try to use it.

I have found the answer! On the Wine menu, I clicked on "Uninstall Wine Software".
This opens an add/remove window. I just select the app and then click the "Modify/Remove" button.

However, for some reasons that I can't understand, I have to do the same operation twice. After clicking OK three times, I still see the program on the list! When I select it and then click again on the "Modify/Remove" button I get this:

I click the "Yes" button and, finally, the app disappears from the list. But after that, I have to clean the shortcuts and folder manually. I wish I could find an easier and cleaner solution, but this one works fine anyway.


What is the equivalent of the "tracert" DOS command? tracert is a command in MS-DOS command prompt to trace the route to an IP Address.
Is there any command in the Gnome Terminal equivalent to this?

Install the traceroute package via terminal by running:

sudo apt-get install traceroute

After that, type this in the terminal:

traceroute [ip/web-site domain]

For example:

traceroute 8.8.8.8

you can also use web-sites as well:

traceroute www.sitename.com

I believe this has changed. You no longer type the traceroute command line with the "ip/website url" configuration. Instead you will need to type:

traceroute <websiteinquestion.com (org, net, gov, whatever)>

I don't know why this has been simplified but after attempting to find a solution as to why Hulu.com was freezing up on me it was suggested to try a traceroute command. On a hunch I tried it with just the domain name and extension and it worked perfectly.


How do I read a variable from a file? I want to insert in my script a value (string) that I would read from a text file.

For example, instead of:

echo "Enter your name"
read name

I want to read a string from another text file so the interpreter should read the string from the file and not the user input.

To read variables from a file we can use the source or . command.

Lets assume the file contains the following line

MYVARIABLE="Any string"

we can then import this variable using

#!/bin/bash

source <filename>
echo $MYVARIABLE

If you want to use multiple strings, you could go with:

path="/foo/bar";
for p in `cat "$path"`;
do echo "$p" ....... (here you would pipe it where you need it)

OR

If you want the user to indicate the file

read -e "Specify path to variable(s): " path;
for p in 'cat "$path"';
do echo "$p" ............................


How to exclude/ignore hidden files and directories in a wildcard-embedded "find" search? Starting from (notice the wildcards before and after "some text")

find . -type f -name '*some text*'

how can one exclude/ignore all hidden files and directories?

I've already been googling for far too long, came across some -prune and ! (exclamation mark) parameters, but no fitting (and parsimonious) example which just worked.

Piping | to grep would be an option and I'd also welcome examples of that; but primarily I'm interested in a brief one-liner (or a couple of stand-alone one-liners, illustrating different ways of achieving the same command-line goal) just using find.

ps: Find files in linux and exclude specific directories seems closely related, but a) is not accepted yet and b) is related-but-different-and-distinct, but c) may provide inspiration and help pinpoint the confusion!

Edit

find . \( ! -regex '.*/\..*' \) -type f -name "whatever", works. The regex looks for "anything, then a slash, then a dot, then anything" (i.e. all hidden files and folders including their subfolders), and the "!" negates the regex.

This prints all files that are descendants of your directory, skipping hidden files and directories:

find . -not -path '*/\.*'

So if you're looking for a file with some text in its name, and you want to skip hidden files and directories, run:

find . -not -path '*/\.*' -type f -name '*some text*'

Explanation:

The -path option runs checks a pattern against the entire path string. * is a wildcard, / is a directory separator, \. is a dot (it has to be escaped to avoid special meaning), and * is another wildcard. -not means don't select files that match this test.

I don't think that find is smart enough to avoid recursively searching hidden directories in the previous command, so if you need speed, use -prune instead, like this:

 find . -type d -path '*/\.*' -prune -o -not -name '.*' -type f -name '*some text*' -print

find has neat logic switches such as -and and -not you can use them to your advantage to find a matching file with two rules like so:

$ touch non_hidden_file.txt .hidden_file.txt somethings/.another_hidden_file.txt

$ find . -type f -name '*hidden_file*' -and \( -not -name ".*" \)
./non_hidden_file.txt

As you can see, find uses two rules  -name '*hidden_file*' and -and \( -not -name ".*" \) to find those filenames that match both conditions - filename with hidden_file in it but without leading dot. Note the slashes in front of parenthesis - they are used to define parenthesis as find arguments rather defining a subshell (which is what parenthesis mean otherwise without slashes)


sudo apt-get install apache2 I tried to install apache2 with

sudo apt-get install apache2

Why am i seeing this

E: Type 'gpg' is not known on line 1 in source list /etc/apt/sources.list.d/sublime-text.list
E: Type 'gpg' is not known on line 1 in source list /etc/apt/sources.list.d/sublime-text.list

Replace content of the file /etc/apt/sources.list.d/sublime-text.list with the single line deb https://download.sublimetext.com/ apt/stable/ - just execute to do this:

echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

Next do apt update & upgrade:

sudo apt update
sudo apt upgrade

And finally install Apache:

sudo apt install apache2

Incorrect content of file /etc/apt/source.list.d/sublime-text.list
First line.

cp /etc/apt/sources.list.d/sublime-text.list /etc/apt/sources.list.d/sublime-text.list.backup
sed 1d -i /etc/apt/sources.list.d/sublime-text.list


Environment variables in motd not working I’m trying to send user login logs to my email with the users name and location. After making the script I found that environment variables can’t run in this script, I’m hoping that someone out there can help me get this working even if it’s a security problem.
Thanks for your time

/etc/update-motd.d/99-footer

ssmtp -oi me@gmail.com << EOF
To: me@gmail.com
Subject: Login

$SUDO_USER" from "$SSH_CLIENT

EOF

email output is

Subject: Login
 from

As an experiment, I added an env command (equivalent to printenv) to the end of /etc/update-motd.d/99-footer on my Ubuntu 12.04 system.

When I logged in again, the following lines were added to the end of my /etc/motd:

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/

So $PATH and $PWD are the only environment variables that are set when 99-footer is running. That's why $SUDO_USER and $SSH_CLIENT aren't being expanded.

You need to send that e-mail from somewhere else, not from the process that updates /etc/motd.

If you change the script to:

echo "To: me@gmail.com
Subject: Login

$SUDO_USER from $SSH_CLIENT

" | ssmtp -oi me@gmail.com

Note use of double quotes. Variables should then be substituted.


Executable on Ubuntu 14.04 I'm running ubuntu 14.04. how can i open an executable? I've already tried to follow the instructions on other posts about the same subject, although they're all about previous versions of ubuntu, and the instructions are too complex or me anyway. I know nothing about ubuntu, because I am new to it. Could you please explain it to me, plain and simple, how to execute a file?

thank you!

Full edit:
Right click the executable file and select Properties.
Then, click Permissions.
The last step is to check Allow executing file as a program.

go to ubuntu software center and install the "wine Windows Program Loader" .  then open the file with this program. let me know if it worked for you.


Installing 64 bit Ubuntu on HP Mini 110 I'm trying to install 64 bit Ubuntu on an HP Mini 110, with 2GB of RAM and a N2600 64bit capable Atom CPU, due to a requirement to install software that is available in 64 bit only.

However, possibly due to a restriction in the BIOS, I'm unable to install the 64 bit OS, since the installer reports that the machine in not 64 bit capable.

Putting a processor capable of processing 64bit instructions into a 32 bit computer does not turn it into a 64 bit computer. It has to be designed to run 64 bit programs from the start.

The HP Mini 110 is a 32 bit computer, so your only hope of running a program that requires a 64 bit operating system is some form of emulation.

Virtualbox supports running a 64-bit guest VM on a 32-bit physical host, but one of the requirements is that the processor supports hardware virtualisation and unfortunately the Atom N2600 does not.

The only solution I have been able to find is to use QEMU. Its website is here


Not able to resize, shrink partition as I installed Ubuntu on my entire hdd I am completely new to Ubuntu. I installed Ubuntu 12.04 on my HP pavilion dm4 2165dx. I was previously running windows 8 on my laptop. I did a complete format and installed Ubuntu. But i installed it on my entire HDD and I was not able resize it using gpart also...

Here is the image of my hdd in gparted,

You can resize a mounted partition. Run gparted live disk to resize your HDD partition.

OR

Boot your Ubuntu installation disk. Click on Try Ubuntu. After that, open the terminal with Ctrl + Alt + T and run the below commands to install gparted.

sudo apt-get update
sudo apt-get install gparted

You should try again with the live CD and redo your partitions something like this :

/ 20gb

/home 570gb

swap 10gb

You can do that by choosing 'something else' when the install disk gets to how you want to install Ubuntu.

If you've got any data you don't want to lose back it up first


Microsoft Money alternative? UPDATE: I found YNAB which runs very nice in wine too. (The upcoming version 5 appears to be web-based instead.)

I'm looking for something to replace my MS Money 2004 application.

I've tried KMyMoney which seems pretty simple (that's good!) but it can't import the OFC files I get from my bank, so I would have to enter everything manually = not good.
I've tried GnuCash which does import OFC files but I can't wrap my mind around this double-entry philosophy. It may be good for accounting but not for home use.
I've tried to make MS Money run in Wine with some success but it was hard to make it work and I'd have to re-do that on my new machine. This is still a useful alternative for me though...

Is there a similar tool that can import OFC files and that doesn't do double-entry accounting? Tax capability is not needed for me, I only do after-tax numbers. Some nice dashboard views (upcoming bills, future cash flow, total net worth) and some graphs would be a definite bonus!

Update: I'm in Austria (Europe!) so purely US-based tools like Mint aren't relevant. Also, I really DO mean OFC format, not OFX. I have to use whatever my bank offers, even if some say it's an old format.

I am the main developer of Skrooge and I would like to suggest you:

Try to change the extension of your file by .OFX and try to import it with Skrooge. Most of the time, it works.
Send me by email an example of OFC file (you can find me email in the about page of skrooge), I will add the OFC import in the application.

There's also KMyMoney, which I use.  You can import QIF files.


How to mount extended type partition? I am very new to Ubuntu and running Ubuntu 16.04 LTS from bootable USB.
How can i mount sda2 or sda 5 ?

Output of sudo fdisk -l:

Disk /dev/loop0: 1.5 GiB, 1591058432 bytes, 3107536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x08ee90aa

Device     Boot   Start       End   Sectors   Size Id Type
/dev/sda1          2048    999423    997376   487M 83 Linux
/dev/sda2       1001470 312580095 311578626 148.6G  5 Extended
/dev/sda5       1001472 312580095 311578624 148.6G 8e Linux LVM

Disk /dev/sdb: 3.8 GiB, 4023385600 bytes, 7858175 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0033b79c

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *     2048 7858174 7856127  3.8G  c W95 FAT32 (LBA)

For reasons that I forget... (IIRC has to do with how much space is allocated for the partition table on the physical disk) you can only make 4 entries in the disks partition table. Just as an MSDOS file system will only allow 512 entries in the "root" directory. To get around this restriction in MSDOS they came up with sub-directories, which were in the same format as the "root" directory with the exception that they could grow in size, as they were just files with a special attribute. Early versions of MSDOS did not have support for "sub-directories", IIRC that didn't come until MSDOS 1.6 or so.
So now we have "extended" and "LVM" types of partitions in the disks partition table to preform the same function as a sub-directory, it allows us to make more than 4 physical partitions. The physical size of the extended partition is determined by the number of logical partitions that you declare while running fdisk. It has the descriptions of the logical partition in it. A logical partition, cannot be made bootable, that is why you have to have a physical partition to boot from.

The output of sudo fdisk /dev/sda -l for my computer is below. I would recommend at least 10 Gib (some say 20) for the partition that you mount to "/". I for various reasons, like to have a separate partition for /usr (or with the 20 Gib option /usr/local) sized according to your experience and another for /home. The last one for a swap partition, sized (some say) to twice your installed RAM, I would make it so that RAM + Swap = 16 Gib for a "normal" desktop. I've had a machine running Apache, proftp as well as CAD programs and compilers running, with 12 G of RAM, run for months straight without using swap. Your mileage may vary....

Pardon the formatting of the output, this box doesn't seem to like my cut & paste!

Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors

Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0x3bec3746

Device    Boot     Start       End   Sectors   Size Id Type

/dev/sda1  *         2048  11999231  11997184   5.7G 83 Linux

/dev/sda2        12001278 234440703 222439426 106.1G  5 Extended

/dev/sda5        12001280 111998975  99997696  47.7G 83 Linux

/dev/sda6       112001024 211998719  99997696  47.7G 83 Linux

/dev/sda7       212000768 234440703  22439936  10.7G 82 Linux swap / Solaris

Note: sda1 is the bootable partition (physical), while sda2 is an extended partion and it IS a physical, but just describes WHERE on the disk the "extended" information is located. sda5, sda6 & sda7 are logical disks described in /sda2. What happens to sda3&4? IDK, I used to, but that was back around kernel v0.97 or so, it's been awhile.
I hope this explains whats going on here.
For further info, I'd refer to an "old skool" book (copyright 1988 Thom Hogan) named "The Programmer's PC Sourcebook", it has a table of the Disk Partition Table, with all sorts of detailed notes on offsets, etc. If you want to get down to the nitty-gritty whatsgoingonhere stuff, it's valid today, except for the legacy OS information, well, the info is still valid, but who writes software to manipulate hardware on a IBM PC/2 anymore?


Ubuntu 14.04 installation with USB flash drive problem I have problems while trying to install Ubuntu 14.04 using USB flash drive. I tried to create bootable usb flash drive with UnetBootin and startup disk creator but when I boot from flash drive I get Error 8001 reading sector 'some_number'

Do I need to set some boot options or what?

if you are using ubuntu now, try the application "startup disk creator"

if you are currently on windows, i have found an application called "rufus" works very well

if you still cant get the USB to boot, it may be a problem with your bios configuration being incompatible how the USB was formatted... Such an issue woud be beyond my expertise...

Um, I might be be stating the obvious, but did you disable all anti-virus programmes? When I was creating my boot usb (from Windows), Avira inhibited a run.ini, thus making it impossible to create said boot usb...


Darcula dark theme for Eclipse I wonder if there is a way to use Android Studio Darcula theme in Eclipse? I am trying to make Eclipse look a little bit like AS. So far I have made changes to the editor window and I have no idea how to tackle the rest of window frames etc. Any ideas?

Android Studio is built on Eclipse. Please see these links for creating and understanding an Eclipse theme:

Eclipse 4 CSS
Eclipse theme tutorial
How to create a basic Eclipse 4 theme

What you want to do is basically understand how a theme is created and how to edit the basic Android Studio theme. Keep in mind that AS will probably use different classes. Check the dropins and plugins folders for the AS theme.


Unable to reinstall ubuntu? I was using Ubuntu 14.04 and Windows 10 in dual boot.

Suddenly there was a problem and I was unable to boot into any of them (both Ubuntu 14.04 and Windows 10). So I reinstalled Windows 10 and then I tried to reinstall Ubuntu. However, while I was reinstalling Ubuntu:

I selected something else
I deleted the existing Ubuntu 14.04 partition by selecting it and clicking -.
It showed free space but when I selected it for installation it again shows Ubuntu 14.04 (name of the disk)
I stopped the installation

My grub menu still shows up old Ubuntu. So how do I install Ubuntu again?

In most cases, deleting a partition doesn't actually destroy filesystem data; it just deletes the pointers to the data. (Partition table data consists mostly of pointers to where filesystems start and stop.) Thus, when you deleted a partition and re-created it in exactly the same way, the original filesystem data became available again.

Instead of trying to delete and re-create the partition, you should be able to use the "Something Else" screens to re-install over the existing system. Be sure to select the check box to "format" the Ubuntu root (/) filesystem. This will quickly delete all the important filesystem data structures. Alternatively, you could use GParted or text-mode tools like mkfs to wipe the original Ubuntu 14.04 partition before launching Ubiquity (the Ubuntu installer). You'd need to boot into the installation medium's "try before installing" mode or use some other emergency tool in order to do this, though.

As a side note, I recommend taking this opportunity to upgrade to Ubuntu 16.04. Although 14.04 is still supported, it's over halfway through its supported period; it will enter unsupported status in less than two years. Ubuntu 16.04 also offers a number of updates and improvements over 14.04.

Delete the old Ubuntu 14.04 partition and extend the Windows 10 one using GParted (from the Ubuntu Live CD Session). Then double-click on the "Install Ubuntu 14.04.5 LTS" icon and follow the instructions.

(Remember to select dual-boot with Windows 10 and to resize the partitions.)


Ubuntu 13.04 - some empathy plugins don't work I observed on newly installed Ubuntu 13.04 that only Google plugin used in Empathy.
Meanwhile I have some additional plugins:

ICQ. Contacts not shown in Empathy. Detail card in Network Accounts is empty so I draw a conclusion that problem with ICQ deeper.
Facebook. Contacts not shown in Empathy. Detail card in Network Accounts looks well.

What's up with these plugins?

I have exactly the same problem. There is a problem with the implementation of these plugins. The only way I managed to solve it was to uninstall Empathy and install Pidgin instead.

Try sudo apt-get install account-plugin-icq.

This can resolve your trouble. But some problems still persists.


sudo apt-get update not working could not lock When I use the command sudo apt-get update I get the following error

E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

Whats the meaning of this?

seems like your apt is locked with another process. you can view which process is using apt with this command:

lsof /var/lib/dpkg/lock

to unlock it run this command:

sudo rm /var/lib/dpkg/lock

Try this command to  abort apt-get process:

  killall apt

May can help if other app used apt. after this command may you get some error to run apt again, if is, so run:

  apt update -f


NFS /exports/media won't automount during boot I'm using Webmin 1.580 with Ubuntu 12.04 and created an NFS export (export/media) which works perfectly fine after manually enabling the export, but when I reboot the system it tells me that it is unable to mount it, and I need to skip it in order to resume booting. How can I find out the root cause of this problem?

I've already seen that, it seems to be a common issue these days. I'm also almost sure I've already solved the same problem on one of my machines, but unfortunately I don't remember how. What I remember is that was a dependency problem (NFS mountpoints mounted before the network was up). Try this solution https://bbs.archlinux.org/viewtopic.php?id=118251 and good luck.

EDIT: sorry, if there isn't any /etc/rc.conf in Ubuntu, you could try this solution. In case, you could also try to look at this thread.


What's the difference between "mouse" and "sloppy"? From the GConf key description:

  The window focus mode indicates how windows are activated. It has three possible values; "click" means windows must be clicked in order to focus them, "sloppy" means windows are focused when the mouse enters the window, and "mouse" means windows are focused when the mouse enters the window and unfocused when the mouse leaves the window.

When I configure focus_mode using gconf-editor, /apps/metacity/general/focus_mode, I can't tell the difference between mouse and sloppy.

When I set this key as mouse, the focus is still on that window if I hover the cursor to the background.

The mouse mode will set focus on the desktop when the mouse hovers over a desktop area that has no open window, whereas the sloppy mode does not.  The sloppy mode changes focus only if the mouse hovers over a window.

May be you can learn from this question:Focus Follows Mouse or Sloppy Focus on Mac OS X

  What is it? Simply put, the window where the mouse pointer is has focus, rather than having to click a window for it to gain focus.

VIA


mysql doesn't ask for root password when installing I used apt install mysql-server to install MySQL on Ubuntu 16.04 but during the installation, it did not ask for root password.

After installation I got ERROR 1045 when I tried to login as root and mysql_secure_installation threw the same error. I purged and autoremoved then reinstalled but it does not work.

How could i fix this? Can I set the root password if I didn't set it during installation?

This is my installation log:

The following additional packages will be installed:
  libaio1 mysql-client-5.7 mysql-client-core-5.7 mysql-server-5.7
  mysql-server-core-5.7
Suggested packages:
  mailx tinyca
The following NEW packages will be installed:
  libaio1 mysql-client-5.7 mysql-client-core-5.7 mysql-server mysql-server-5.7
  mysql-server-core-5.7
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/17,9 MB of archives.
After this operation, 160 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Selecting previously unselected package libaio1:amd64.
(Reading database ... 227144 files and directories currently installed.)
Preparing to unpack .../libaio1_0.3.110-2_amd64.deb ...
Unpacking libaio1:amd64 (0.3.110-2) ...
Selecting previously unselected package mysql-client-core-5.7.
Preparing to unpack .../mysql-client-core-5.7_5.7.12-0ubuntu1_amd64.deb ...
Unpacking mysql-client-core-5.7 (5.7.12-0ubuntu1) ...
Selecting previously unselected package mysql-client-5.7.
Preparing to unpack .../mysql-client-5.7_5.7.12-0ubuntu1_amd64.deb ...
Unpacking mysql-client-5.7 (5.7.12-0ubuntu1) ...
Selecting previously unselected package mysql-server-core-5.7.
Preparing to unpack .../mysql-server-core-5.7_5.7.12-0ubuntu1_amd64.deb ...
Unpacking mysql-server-core-5.7 (5.7.12-0ubuntu1) ...
Selecting previously unselected package mysql-server-5.7.
Preparing to unpack .../mysql-server-5.7_5.7.12-0ubuntu1_amd64.deb ...
Unpacking mysql-server-5.7 (5.7.12-0ubuntu1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.7.12-0ubuntu1_all.deb ...
Unpacking mysql-server (5.7.12-0ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up libaio1:amd64 (0.3.110-2) ...
Setting up mysql-client-core-5.7 (5.7.12-0ubuntu1) ...
Setting up mysql-client-5.7 (5.7.12-0ubuntu1) ...
Setting up mysql-server-core-5.7 (5.7.12-0ubuntu1) ...
Setting up mysql-server-5.7 (5.7.12-0ubuntu1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Checking if update is needed.
This installation of MySQL is already upgraded to 5.7.12, use --force if you still need to run mysql_upgrade
Setting up mysql-server (5.7.12-0ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...

You can recover or set root password without knowing the current one by starting mysql without loading the grant-tables.

Please note the $ in the commands.  This is specifying the terminal prompt you see when typing in the command.  It's showing it's a line of text, but and actual typed terminal command.  The "mysql>" prefix is also a prompt.  That is the prompt you get when running mysql interactivately.

This is the cli (command line) to do this:
(Be sure to stop the current server before performing the steps.  Only one server can run at a time.)

$ sudo mkdir /var/run/mysqld; sudo chown mysql /var/run/mysqld
$ sudo mysqld_safe --skip-grant-tables&

Now you can log in as root without a password and perform all commands, as in this case, set the root password as root.

$ sudo mysql --user=root mysql

This is the set root password that you will perform inside mysql if you have MySQL 5.6 or below:

mysql> update user set Password=PASSWORD('new-password') where user='root';
flush privileges;

In MySQL 5.7 or above

mysql> update user set authentication_string=PASSWORD('new-password') where user='root';
flush privileges;

From there, quit (kill the running msqld) mysql and start it as normal.

Notes on starting and stopping the mysql service:

Stop mysql:

$ sudo service mysql stop

Start mysql (normal):

$ sudo service mysql start

Kill the temporary mysql safe mode session:

$ sudo mysqladmin shutdown

Here's how to setup mysql-server with a terminal password prompt in Ubuntu 18.10.

Download The MySQL APT Repository via https://dev.mysql.com/downloads/repo/apt/
cd into your directory where you downloaded and run dpkg -i mysql-apt-config_0.8.13-1_all.deb (check your version number)
From the prompt menu select the last option "ok" and then "ok" again.
Update and install mysql-server and mysql-client:

sudo apt update
sudo apt install mysql-server mysql-client

Type in your root password in the promt.
Select "Use Legacy Authentication Method" if your running frameworks/applications (such as laravel) which do not support the new "Strong Password Encryption" yet, otherwise if your framework/application supports "Strong Password Encryption" then select it.
Login as root and check if it works.


How to make a file (e.g. a .sh script) executable, so it can be run from a terminal I have a script.sh file and type of this file is shellscript file. I want to make this file as application/x-executable file. How can I make it?

You can mark the file as executable:

chmod +x filename.sh

You can then execute it like this:

./filename.sh

If you want to use a different command to start it, you can add an alias:

gedit ~/.bashrc

Add this at the end of the file:

alias <new name>='/home/<full path to script>/filename.sh'

Open a new terminal session or type source ~/.bashrc in your terminal to apply.
Then simply use the new name to start the script.

Run:

chmod +x /path/to/file.sh

To make it un-executable, run:

chmod -x /path/to/file.sh

For example i created .sh file:

vi tester12.sh

After i write some code on vi editor, i'll exit from vi editor:

:wq!
chmod +x tester12.sh
./tester12.sh


How do I make Powertop changes permanent? I'm on a Compaq 615 and it's fan is loud. Not much you can do about that but I'm trying to keep the CPU/GPU as cool as possible. This is what Powertop has to say:

If I change all of them to "good", the changes don't survive a reboot.

I added the line to the "grub"-file as suggested here

How do I make the Powertop suggested "Tunables" permanent?

If you change all of them to good anyway, you could simply use the command
sudo powertop --auto-tune

Call  powertop auto-tune automatically at boot time
1.
On systems using systemd as startup manager (like Ubuntu) install it as a service:
cat << EOF | sudo tee /etc/systemd/system/powertop.service
[Unit]
Description=PowerTOP auto tune

[Service]
Type=oneshot
Environment="TERM=dumb"
RemainAfterExit=true
ExecStart=/usr/sbin/powertop --auto-tune

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload
systemctl enable powertop.service

2.
On systems not using systemd, or if you want to use the old style with /etc/rc.local file, add this line at the end to /etc/rc.local:
powertop --auto-tune
exit 0

Note: if the script already contains exit 0 be sure you place all commands before that line, cause that exits the script
If you want to set all to good but one line you could first auto-tune and then disable one setting with an extra line, for example, if you want to re-enable the touchscreen-device (at usb 2-7), add this before the exit 0:
powertop --auto-tune
echo 'on' > '/sys/bus/usb/devices/2-7/power/control'
exit 0

Note: on Linux with systemd, make sure /etc/rc.local is executed at startup by the compatibility service
systemctl status rc-local.service

I've been having a similar problem and after reading a question on this site found out that the program "powertop" is, apparently, more suited to developers.

How do I install powertop 1.13?

The version, more useful, for users is "powertop-1.13" found in the repositories. It shows power saving suggestions as well as the command that it uses to carry out the suggestion.

This Red Hat Docs site has further instructions for making these changes permanent.

Specifically:

  To help you make the changes permanent, PowerTOP displays the exact
  command it runs to perform this optimization. Add the command to your
  /etc/rc.local file with your preferred text editor so that it takes
  effect every time that the computer starts.

Good luck!


No WiFi connection & wireless card is Intel 7265 After executing dmesg | grep iwl I got the following

ajay@ajay-HP-ENVY-x360-m6-Convertible:~$ dmesg | grep iwl
[    7.380746] iwlwifi 0000:08:00.0: Unsupported splx structure
[    7.656699] iwlwifi 0000:08:00.0: Direct firmware load for iwlwifi-7265D-15.ucode failed with error -2
[    7.657559] iwlwifi 0000:08:00.0: Direct firmware load for iwlwifi-7265D-14.ucode failed with error -2
[    8.032821] iwlwifi 0000:08:00.0: loaded firmware version 25.30.13.0 op_mode iwlmvm
[    8.231836] iwlwifi 0000:08:00.0: Detected Intel(R) Dual Band Wireless AC 7265, REV=0x210
[    8.232167] iwlwifi 0000:08:00.0: L1 Enabled - LTR Enabled
[    8.232610] iwlwifi 0000:08:00.0: L1 Enabled - LTR Enabled
[    8.320209] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
[    8.339011] iwlwifi 0000:08:00.0 wlp8s0: renamed from wlan0
[   29.034771] iwlwifi 0000:08:00.0: L1 Enabled - LTR Enabled
[   29.035221] iwlwifi 0000:08:00.0: L1 Enabled - LTR Enabled
[   29.097485] iwlwifi 0000:08:00.0: L1 Enabled - LTR Enabled
[   29.097928] iwlwifi 0000:08:00.0: L1 Enabled - LTR Enabled
[   34.748671] iwlwifi 0000:08:00.0: L1 Enabled - LTR Enabled
[   34.749440] iwlwifi 0000:08:00.0: L1 Enabled - LTR Enabled
[   34.811700] iwlwifi 0000:08:00.0: L1 Enabled - LTR Enabled
[   34.812143] iwlwifi 0000:08:00.0: L1 Enabled - LTR Enabled
[14461.349721] Modules linked in: rfcomm bnep nls_iso8859_1 arc4 iwlmvm(OE) intel_rapl uvcvideo mac80211(OE) x86_pkg_temp_thermal hid_multitouch hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_magn_3d hid_sensor_rotation hid_sensor_incl_3d videobuf2_vmalloc videobuf2_memops hid_sensor_trigger videobuf2_core intel_powerclamp v4l2_common coretemp videodev industrialio_triggered_buffer acer_wmi kfifo_buf hp_wmi sparse_keymap industrialio snd_hda_codec_hdmi media kvm btusb hid_sensor_iio_common snd_hda_codec_realtek snd_hda_codec_generic btrtl snd_hda_intel snd_hda_codec btbcm snd_soc_rt5640 snd_hda_core crct10dif_pclmul snd_hwdep crc32_pclmul snd_seq_midi ghash_clmulni_intel iwlwifi(OE) aesni_intel snd_seq_midi_event aes_x86_64 lrw btintel snd_soc_rl6231 gf128mul glue_helper bluetooth snd_soc_core ablk_helper
ajay@ajay-HP-ENVY-x360-m6-Convertible:~$

And also the following after running rfkill list all

ajay@ajay-HP-ENVY-x360-m6-Convertible:~$ rfkill list all
0: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no
1: acer-wireless: Wireless LAN
    Soft blocked: yes
    Hard blocked: no
2: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

Please advise further instructions to be executed

Support for your device is supposed to be in Kernel 4.2, which is included with Ubuntu 15.10.  You could either try Ubuntu 15.10 (15.04 is going end-of-life soon) or you could try to upgrade the 14.04 kernel to version 4.2.  Of the two, I would suggest using Ubuntu 15.10

Try this solution, The acer-wmi is making conflict so it got to be blacklisted:
https://askubuntu.com/a/801120/10715


Need some help creating a script to rename text files and move them to a directory I have recently managed to convince my mother to let me switch her PC to Ubuntu, and to make her transition easier I want to automate as many tasks as possible for her. I managed to do quite a bit, however there is a script I'd like to leave her with, but, unfortunately I have no knowledge of scripting.

The purpose would be to rename all text files in a folder (mainly Desktop) named e.g. "note*" (w/out extension) as "note.txt" (for interoperability's sake and easy upload to google docs) and move them in a specially designated folder. The commands I'd need would be:

- find files in current folder named note* (and not ending in .txt) and rename them as note*.txt
- move files named note*.txt to /home/username/notes

Unfortunately I don't know how to put it in script form so I'm asking for help.

This might get you started:

#!/bin/bash

find . -name 'note*' -not -name '*txt' -exec mv -bf '{}' '{}'.txt \;
find . -name 'note*.txt' -exec mv -bf '{}' /home/username/notes/ \;

The -bf makes mv not asking questions and backup if overwriting.

for noteFile in note*[^.txt]; do mv $noteFile /home/username/notes/$noteFile.txt; done

I like that answer better  :)   The only drawback is that it only moves files it has renamed


Wifi doesn't work after suspend after 16.04 upgrade This particular version of the "doesn't work after suspend" came after upgrading to 16.04. It seems that the upgrade includes a Wicd applet (added to Metacity Classic Gnome task bar alongside regular network icon), but doesn't seem to work after a suspend. A sudo service network-manager restart duplicates this problem. It takes a complete reboot to get Wifi going again. Any ideas why?

16.04 runs on systemd. Try the following:

sudo systemctl restart network-manager.service

If this works, you can create a script to automate it.

Open a terminal and type the following:

sudo nano /etc/systemd/system/wifi-resume.service Now paste the script in there with a right click. Exit with CTRL + X and press Y to save. Now to activate it: sudo systemctl enable wifi-resume.service

Script:

#/etc/systemd/system/wifi-resume.service
#sudo systemctl enable wifi-resume.service
[Unit]
Description=Restart networkmanager at resume
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target

[Service]
Type=oneshot
ExecStart=/bin/systemctl restart network-manager.service

[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target

Hope this helps. It works on my laptop.

For me the solution was to run

nmcli nm sleep false

in a terminal


Why am I unable to sign up to Linux server remotely? For over 5 hours now I've been having trouble logging into my Linux account remotely. I've used the ssh client, Putty, as well as my MAC terminal. I understand that in order to login, we must use ssh username@hostname or IP address. In my case, it is ssh username@10.0.2.15 but in the end, I constantly receive the message ssh: connect to host 10.0.2.15 port 22: Operation timed out Can someone please help me? I've even tried to disable sshd but that didn't work either.

Get on the command line as root
Then cd to /etc/ssh and do the following

cd /etc/ssh
nano sshd_config       note that is an underscore in the file name

using nano you must uncomment the line

# PermitRootLogin prohibit-password

change it to

PermitRootLogin yes

Restart SSH

service ssh restart


Ubuntu 14.04 LTS live USB boot error (gfxboot.c32:not a valid COM32R image) I downloaded Ubuntu 14.04 (64 bit) lts. I made a bootable usb stick. But I keep receiving this error message upon booting:

SYSLINUX 4.04 EDD 20110518 Copyright (C) 1994-2011 H. Peter Anvin et al
Unknown keyword in configuration file: gfxboot.c32: not a COM32R image

As Filip Sohajek mentioned, you need to hit Tab.

Then you will see a set of options (live, live install, etc). Select the one that you like typing its name and pressing Enter.

This doesn't work for me. I get:

Initramfs unpacked failed: junk in compressed archive.
(...)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block(2.0)
(...)

I had to adopt a very ugly solution, but it worked like a charm. I went into a friend's office, ask him to let me use one of the computers running Microsoft Windows. I think it was Windows 7 or 8, in any case more modern than Windows XP but not yet this recent one with the Cortana stuff... Then I created a usb disk with ubuntu, by downloading first a small program called Universal USB Installer and everything went fine.


Unable to upgrade to newest version of Ubunty from 12.10 Trying to upgrade to newest Ubuntu from 12.10. The update manager says

failed to download repository information. Check your internet connection

I checked my internet connection(s), and I'm connected both wired and wireless.
So I click on the details of the update manager and get the following text:

W:Failed to fetch http://ppa.launchpad.net/claudiocn/slm/ubuntu/dists/quantal/main/source/Sources  404  Not Found
W:Failed to fetch http://ppa.launchpad.net/claudiocn/slm/ubuntu/dists/quantal/main/binary-i386/Packages  404  Not Found
E:Some index files failed to download. They have been ignored, or old ones used instead.

The error message means Simple light DM manager isn't updated to be used with 12.10.

So it is failing to update the index file thus failing all over.

To correct it do the following,

Uninstall Simple Lightdm manager. sudo apt-get remove simple-lightdm-manager
Remove the repo, sudo add-apt-repository --remove ppa:claudiocn/slm
Now do the update, sudo apt-get update && sudo apt-get upgrade

Repo URL - https://launchpad.net/~claudiocn/+archive/slm

It could happen sometimes. It happened to me last time I upgraded. I think that's a Server Error or something similar. I recommend you to do a backup of all your important data and keep it safe in a USB drive or in the cloud, and then Download the latest Ubuntu ISO and try a CLEAN INSTALL.

The same thing happened to me several times and after that I did the upgrade via Update Manager (Retrying the process for about 5 times) and then the system was so unstable (lots of crashes) so I decided to do what I'm telling you: A clean Install. And it solved the crashes (:  Right now I'm a happy user of Lubuntu Raring. (Is the same as UBUNTU but with LXDE instead of UNITY) and it works pretty well.


How do I install gnomenu? Installing these programs , using parts of the MATE project works. But does another way to install these packages exists ? Using 12.04.

Tilo-Menu works just fine too...

http://sourceforge.net/projects/tilomenu/

http://www.youtube.com/watch?v=rCDHz3IbhJ4&feature=youtu.be

This method work for me in ubuntu 12.04 without mate, Opening terminal and typing following commands one after another...And this is gnomenu, not other..

cd /tmp && wget -O gnomenu_2.9.1.deb http://goo.gl/rJ9X6

sudo dpkg -i gnomenu_2.9.1.deb

wget -O gnomenu.files.tar.gz http://goo.gl/zZr9l

sudo tar -xzvf gnomenu.files.tar.gz -C /usr/lib/gnomenu/

It is working well with cairo dock and awn , except for shutdown where change of command is needed.....


How to Add dnsmasq and keep systemd-resolved (18.04 to 20.04) I want to get fast dns resolution with dnsmasq and keep the default systemd-resolved.

Looking for an elegant way to do this

I wanted to get fast dns resolution with dnsmasq and keep the default systemd-resolved/NetworkManager setup untouched for future use.
Yes the huge dns caching of dnsmasq can improve browsing speed.
Yes the goal was to keep the default featured dns setup of 18.04

Install dnmasq
Configure it (listen address and dns servers)
Configure NetWorkManager for manual dns server address
Check verify

1 - With sudo

apt-get -y install dnsmasq

2 - With sudo

tee -a /etc/dnsmasq.conf << ENDdm
interface=lo
bind-interfaces
listen-address=127.0.0.1
# DNS server from OpenDns. Use yours...
server=208.67.222.222
server=208.67.220.220
ENDdm

systemctl restart dnsmasq
systemctl enable dnsmasq

3 - With USER, configure NetworkManager

# Get NM first active profile name
NetManProfile=$(nmcli -t  connection show --active | cut -f 01 -d ':')
# remove, if exists, current dns servers
nmcli con mod "$NetManProfile" ipv4.dns ""
# set 'manual' dns server
nmcli con mod "$NetManProfile" ipv4.ignore-auto-dns yes
# set dnsmasq as manually set dns server
nmcli con mod "$NetManProfile" ipv4.dns 127.0.0.1
# i also disabled ip6, do what u want
nmcli con mod "$NetManProfile" ipv6.method ignore
# reconnect to take effect
nmcli connection down "$NetManProfile"
nmcli connection up "$NetManProfile"

4 - Check verify

systemd-resolved listen on 127.0.0.53 as should by default
dnsmasq listen on 127.0.0.1 as set in /etc/dnsmasq
systemd-resolved took 127.0.0.1 from NetworkManager

netstat -antup
Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat       PID/Program name
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      1036/dnsmasq
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      766/systemd-resolve
cat /run/systemd/resolve/resolv.conf
nameserver 127.0.0.1

Ubuntu 18.10

IMHO, if your going to be running dnsmasq, you should statically assign your ip address instead of getting it from dhcp. This way you can just disable systemd-resolved all together.

sudo apt-get install dnsmasq
sudo systemctl disable systemd-resolved
sudo systemctl stop systemd-resolved
Manually assign your ip address, gateway, and assign the ip address to your machine as DNS.
configure /etc/dnsmasq.conf (really...RTFM --> man dnsmasq.conf)
sudo systemctl enable dnsmasq
reboot
sudo systemctl status dnsmasq
point dhcp on your dhcp server to your shiny new dnsmasq server (..if yumpto)


How to use unity-2d-panel standalone with global menu Can anyone tell me how to use only unity-2d-panel with global menu. When I load only unity-2d-panel I have problems with global menu, for example: I have close, minimize and maximize buttons on unity panel and on window title bar. I think it's a bug. So can you help me fixing it.

Your question is somewhat vague in areas, so I will answer it the best I can given my understanding of what you are asking.

You can run the unity-2d panel with the dash from another DE (like Lubuntu) after installing unity-2d (and all the things it pulls in) by pressing Alt+F2 and typing in unity-2d-shell  (or opening a terminal and using the same command)
This will give you the lefthand sidebar with the dash. However, this will interfere with your Lubuntu setup as Nautilus handles the desktop, etc...

If however you are just trying to run unity-2d log out and choose it from your session menu.

unity-2d-panel is the upper panel with global menu integration.

unity is a very self integrated DE, and it is not good at playing with other DE (like LXDE, XFCE4...)  So problems can easily occur trying to use the panel only, or the sidebar only in another DE.

edit: since my post was down-voted with no reason given, I will add more information here. Though the lack of clarity in the question requires somewhat ambiguous answers, I will continue to try to address my understanding of what the OP might want to do.

Running unity-2d-panel global menu by itself is pointless.  A window manager is needed.  if you are trying to remove the unity-2d-shell from your current session, edit your /usr/share/gnome-session/sessions/ubuntu-2d.session file removing the DefaultProvider-shell=unity-2d-shell line and the word shell; from the RequiredProviders line.

If you are trying to run it from another window manager then running it with unity-2d-panel may work but by only using some of the components of Unity (a very tightly integrated DE) will probably cause you issues.  unity-2d has been abandoned in all future releases of Ubuntu, so this is only pertains to the LTS (and the older releases that are soon to lose support like 11.10 at the current time of writing this)

P.S. launchpad is the place to report bugs, if you believe this is a bug file it there.


Unable to fetch deb file: connection refused Possible Duplicate:
  How can I get apt to use a mirror close to me, or choose a faster mirror?

I was trying to install emacs and I got a bunch of errors like this:

Failed to fetch http://tr.archive.ubuntu.com/ubuntu/pool/main/e/emacsen-common/emacsen-common_1.4.22ubuntu1_all.deb  Could not connect to 127.0.0.1:8118 (127.0.0.1). - connect (111: Connection refused)

I tried apt-get update but it gives an error too. So I found out that port 8118 is used by Tor. Tor is not running right now and proxy settings are on automatic. What can I do?

Check your connection. The repository IP could'nt be 127.0.0.1 caus it localhost IP


I want Ubutu but i have a question first I'm not new to Ubuntu my friends use it i never had a chance to use it on my own PC i'm running on a window 8 and it has no info like product keys and such it was on the box and this is a hand me down PC my question is do i need those for the installation if so how do i retrieve this info

You do not need that information to boot or install ubuntu. You might need to make a windows recovery disk. I would make one if you do not have one.

You need a windows recovery disk in the event you have a problem with windows.

Windows 8 no longer has product keys; and several of my friends that are more into multi-booting have told me that you should wipe the disk first, then partition the disk, then install the operating systems. There are also some tools for the MBR you may need to use.


How can I get ddclient to work with freedns? I use the dynamic DNS service at freedns.afraid.org for my 12.04 server. I had assumed that the protocols would be standardised and that ddclient would just work, but apparently not. I get this message in /var/log/syslog:

ERROR: Invalid update URL (2): unexpected status ()

I tried to use the updated version of ddclient from the alternative PPA described in this answer, but then I hit this error:

FATAL:    Error loading the Perl module Digest::SHA1 needed for freedns update.
FATAL:     On Debian, the package libdigest-sha1-perl must be installed.

And when I try to install that package, I get this:

E: Unable to locate package libdigest-sha1-perl

Which leads me to this bug report, which apparently has no solution. How to proceed?

Until ddclient is fixed, you can manually install the old module it wants:

sudo apt-get install cpanminus
cpanm --sudo Digest::SHA1

Free DNS's clients page and ddclient --help provide sample ddclient configurations. Restart ddclient for changes to take effect:

sudo service ddclient restart

You can get it from:
libdigest-sha1-perl

You may need to also install libio-socket-ssl-perl. Check your syslog


Changing login screen wallpaper I have been trying to change my login screen wallpaper to one of my own using ubuntu-tweak. The wallpapers are located in Ubuntu's default wallpaper folder and I have given all users read privileges on them.

Now there isn't even a wallpaper left on the login screen.

By trying the answer of Senio I had no luck.
But with little modification I hit the jackpot :

sudo -i
xhost +SI:localuser:lightdm
su lightdm -s /bin/bash
gsettings set com.canonical.unity-greeter draw-user-backgrounds 'true'
gsettings set com.canonical.unity-greeter background 'path-to-image'
exit

path-to-image is actually the path where the image you want as log in screen wallpaper is stored e.g. : /usr/share/backgrounds/x.jpg

I tested it and it's working

I found this page which offers some tips regarding this problem :
Ubuntu13.04 LighDM

In the past this would work for me.  Im am not sure if this will work in a unity environment.
Run this.

sudo cp /usr/share/applications/gnome-appearance-properties.desktop /usr/share/gdm/autostart/LoginWindow

Log out, make your changes.
Log back in
Run this.

sudo unlink /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop


Is there a way to get terminal sessions to persist across reboot? OS X has this. Ideally I would like the reboot to appear as if it never happened from the POV of the terminal (let's ignore remote sessions and assume 0 background processes for now).  Meaning, I would like to see the stdin, stdout, stderr (i.e. scrollback) history in each of my terminal tabs.

NOTE: This is NOT about bash history. This is about persisting terminal sessions between reboots.

No, at least in gnome-terminal and other VTE-based emulators it's not possible in an implicit and convenient way.

(You can, of course, explicitly go through all your tabs before the reboot, "Select All" and copy-paste the contents into files, and view those files with some viewer after the reboot. If I understand you, this is not what you're looking for. Also, colors and other formatting would be lost.)

VTE, the terminal emulation widget behind gnome-terminal and many other terminal emulators stores most of the scrollback contents (not the latest bits, though) in temporary files under /tmp by default. The major design decisions that prevent doing what you're looking for are:

These files are unlinked right after being created. This is so that they are automatically removed (and the disk space is freed up) even if the terminal emulator exits uncleanly for whatever reason. In order to preserve them, they should be linked back to the filesystem tree (I don't know if it's possible) or copied into another file (which is a slow action if the scrollback is large, let alone properly handling potentially running out of disk space).
The files are under /tmp which is wiped out by many distros upon a reboot. A different, persistent location should be chosen instead, or some cooperation is needed with the boot scripts.
These files are encrypted (as of VTE version 0.40) to overcome the privacy issue of data leakage in case someone gets access to the disk. The encryption key is only available in gnome-terminal's memory. In order for these files to persist, either the encryption layer should be skipped (bringing back the old privacy concerns), or the keys should be placed on the disk at least temporarily for the duration of the reboot (... er, until that user logs in again and starts up gnome-terminal again... doesn't sound too much better). Feasible only if you don't care about privacy, or if the filesystem is guaranteed to be encrypted.

There are other smaller issues to be addressed as well, e.g. flushing incomplete blocks of these files that contain the last bits of the scrollback data.

I hope I could outline some of the design decisions VTE took that prevent doing what you're looking for. I can't see how your request could be addressed while keeping the current design goals as well. Maybe there's another terminal emulator that does what you're looking for, presumably sacrificing some of VTE's features; I don't know.

I suggest using the very useful screen tool.
It is well worth learning.
Repeating in summary an answer I have put on another question:

See in the .screenrc you can initiate default windows with a custom command so you could restore sessions using different .screenrc files if you wish to restore different sessions. screen -t ....   See gnu.org Screen Manual - startup files

One good way of having terminal sessions that persist is to run a 'screen' session on server. A 'screen' session gives you multiple windows on that server where you can be logged in to other machines or whatever. You can have multiple 'screen' sessions running on server. You can disconnect and reconnect to the sessions you need. 'screen' is old-school command-line keyboard but well worth learning and playing with to learn how it works. It has a few big advantages:

easy to install, runs on any unix(or cygwin), no graphics needed (besides terminal text graphics)
gives persistent windowed terminal sessions (as long as server is not rebooted)

* screen quickstart *

RTFM: gnu.org Screen User's Manual

screen - Run screen to create a new session simply
screen -ls - list screen sessions running
screen -r 20229.pts-2.bangor - re-attach to session

The * screen ESCAPE char by default is Ctrl-a * unless some craZy looper has changed it in .screenrc e.g. "escape ^Zz" for people who don't value process backgrounding control. To get a real Ctrl-a to terminal (goto beginning of line) if running in screen then just do Ctrl-a Ctrl-a.

ESCAPE c - create new screen window
ESCAPE 0 (or 1 2 3 4 5 6 7 8 9) - switch to window 0 (or 1 2 . . )
ESCAPE p or ESCAPE n - switch to previous or next window
ESCAPE " - window list
ESCAPE h - shows screen help

In full here on another question I have put in example of screen help page, command-line usage and example .screenrc:

Terminal emulator with a “restore session” feature like Mac Terminal