Hardwired Networking Issue (fresh install)

My gut is telling me that it's either:

A kernel module issue (e.g. the wrong kernel module is being loaded or the card was very different than an earlier revision, no model number was changed my the manufacturer, and the module matching that name doesn't support a newer chip that was swapped out in a later run. (seen that a bunch with cheap usb wifi cards))

or
Network Manager conflicting with something (like configs in /etc.) Network Manager does a great job of 'just working' [ https://help.ubuntu.com/community/NetworkManager ], but if you've added stuff to /etc/network/interfaces then something there may be tripping it up.

In either case you will probably have to do some reading and poke around your configs some. Since you said that it was a fresh install, it seems to be detecting something, the DHCP client sounds installed, and you've confirmed that the router is correctly giving out IP addresses, then I'm veering towards something having to do with the kernel module. Wired networking almost always works out of the gate with Ubuntu 14.04 when the kernel stuff is right.


For miniDLNA to be able to run properly we need to make sure we had set te appropriate permissions and directories we point to are present.

A default /etc/minidlna.conf for a service run by root may have the following content (amongst others):

# set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache
db_dir=/var/cache/minidlna

# set this if you would like to specify the directory where you want MiniDLNA to store its log file
log_dir=/var/log/minidlna

Of course we can define another directory for the database or the log files but these directories need to be present, and they need to have write permission from the user that runs miniDLNA.

In addition not all DLNA renderers may be able to see content on non-default ports. Let me suggest you also try to set it on the default port 9500 with

# port for HTTP (descriptions, SOAP, media transfer) traffic
port=9500


If you want to avoid Flash players (though most desktops still support them) I'd go with:

H.264 video compression format with the MP4 container.  To dig a little deeper, you'll want a quality audio codec to mux that video with, that is also playable on most devices, which is the Advanced Audio Codec (AAC).

The main 'knock' against this solution is it contains lots of patented technology.  However, depending on your users, needs and ability to license legally, a H264/AAC/MP4 solution "shouldn't" be a problem.

Another point is that this will not work for live video.  The best format for DESKTOP live streaming is still FLV (Flash Video with RTMP plugin on the player) and for mobile, HLS.

Of course, there are dozens of other formats for on-demand playback (WEBM, Theora) and live streaming (e.g. DASH) but you will run into major limits as to which devices can play them (if any).


"Set As Wallpaper" right-click option in Nautilus does not work

OP installed Gnome Shell on top over Ubuntu at some point in time. Though removed later, It left some user-specific settings on user's profile.

Open a terminal and use these two commands to fix the problem.

gsettings set org.gnome.settings-daemon.plugins.background active true
gsettings set org.gnome.desktop.background show-desktop-icons true

The first command restore the right click -> Set as Wallpaper functionality
Second one gives you the ability to right click on the desktop to bring the menu.

After that two command, use this to set nautilus handle your desktop

xdg-mime default nautilus-folder-handler.desktop inode/directory

That should fix the problem for nautilus.


ubuntu hardware somehow related to windows

I suggest to switch-off the pc completely when switching from one sw to the other. I really don't know why, but seems that some resources (sometimes) remain locked.


Is there a way to remove maximized window controls/title from top panel in Unity


Large Text button in Universal Access turns itself on after reboot - Ubuntu 14.04

I got the same problem on a Lenovo X1 2nd Generation (14" with 2560x1440px) and "fixed" it by adding the following file to ~/.config/autostart/ :

largetextfix.desktop

[Desktop Entry]
Name=largetextfix
Exec=dconf reset /com/canonical/unity/interface/text-scale-factor
Terminal=false
Type=Application
StartupNotify=false

Maybe that'll do for you as well.

sorry... the other (previous) solution turned out to be somehow unstable as well...


apt-get not found after running some purge commands

okay, make a backup first from your important data.

I hope wget is also present on your system.

mkdir $HOME/apt-download && cd $HOME/apt-download

Next we draw the required packages.

For 64-bit system.

wget -c http://security.ubuntu.com/ubuntu/pool/main/a/apt/apt_1.6.6ubuntu0.1_amd64.deb

Next is

wget -c http://security.ubuntu.com/ubuntu/pool/main/a/apt/libapt-pkg5.0_1.6.6ubuntu0.1_amd64.deb

Install both

sudo dpkg -i *.deb

Next we test apt

sudo apt -f install

For 32-bit

wget -c http://security.ubuntu.com/ubuntu/pool/main/a/apt/apt_1.6.6ubuntu0.1_i386.deb

and

wget -c http://security.ubuntu.com/ubuntu/pool/main/a/apt/libapt-pkg5.0_1.6.6ubuntu0.1_i386.deb

The steps for installing is the same as for the 64-bit packages.


What packages do I remove to get a command line only mode?

I'm not sure why the answer about the grub setting that you've linked to is marked as correct, it shouldn't work. This other answer is the correct one. shows a configuration that will stop upstart from even trying to start lightdm. Adding text to the boot cmdline will instead make lightdm's upstart script bail out early when upstart tries to launch it.

The package for the Ubuntu desktop GUI is appropriately named ubuntu-desktop. Remove this and all dependencies of it that you don't explicitly need anymore if disk space is an issue. But if disk space is not a problem, you could just leave them installed, because they won't use any other resources as long as they're not actually used.


Unknown filesystem 'squashfs' when trying to mount snap packages

My dedicated server host was using a custom kernel which was the cause of this issue. Beware of hosting providers not installing the distribution kernel when they appear to do so.


14.04 - Failed to load session - Tried all other suggestions

Oh my goodness, I'm so sorry! I found my own answer!  I assumed that the code above needed to be entered after booting into the recovery mode which was giving me the errors.  I was doing more research and found the Ctrl+Alt+F1 on the log in screen to go to the terminal thing.  This worked!


Ok, after going 4 hours without being disconnected I can say, that I have solved the issue

The solution is to go to Network -> Edit Connections -> Wireless -> Click on WiFi -> Edit -> IPv6 Settings

There, you have to select Method: Ignore

So it is IPv6 related issue. Somehow.


Ubuntu 17.10: Too many errors from stdin

Found a possible reason...

I just had the same problem in a script running a script executing nano using the command

exec nano filename &

The solution was to remove the & at the end of the line as nano won't display if asked to run in the background


How to get Chrome to rollup/rolldown when double clicking the titlebar?

By default Chrome (and Chromium) draws its own title bar and borders, so it doesn't always behave like other applications.  You can configure it to use a standard title bar though with the following steps:

right click on an empty area of the tab bar at the top of the window.
pick the Use System Title Bar and Borders option.

This does change the appearance a little, but does give you a title bar that behaves like other applications.


Ubuntu 20.04 - Connect to OpenVPN via the GUI instead of command line

I have met the same problem -- I can connect my openvpn server via command line, but cannot make it via gnome-control-center (gnome-network-manager).
And I find advanced settings in authentication and very soon to find TCP connection is checked.
After I un-check TCP connection, I can connect my openvpn-server now.
To be short:
check options in advanced settings, it could help in my case.


Yes you can use this application to access your Ubuntu.
But there are two thing to take note of:

SSH or VNC service should be installed in Ubuntu and configured properly to provide service.
If your computer does not have a static IP address, a dynamic DNS service will also be needed.


It's been ages since I used it (and I can't test it throughly because I have a forwarding server, so nothing is in my local mailbox). But:

If your postfix leave your mail in the standard location (/var/spool/mail/$USER) you should be able to use the "movemail" account of thunderbird: chose File -> New... -> Other accounts from the menu, and setup a "Unix movemai" account:

fill it in and follow the instruction. Should work.

Otherwise, install a POP/IMAP server like, for example, dovecot.


Any news about the removal of the unwanted Scopes on Touch?

You can remove some scopes and apps using sudo click unregister --user=phablet PACKAGE-NAME.

However, if they are installed inside the read-only part of the phone, then they will only be hidden, and not removed. Currently there's no way around that.


Battery drains to 0% when power off for 2 days?

This is not entirely mine, more like a mashup of several answers I've read all over the Internet.

Main source: https://wiki.archlinux.org/index.php/Wake-on-LAN#Battery_draining_problem

Aparently the "Wake On Lan" is the culprit of this drain issue.

Several ways of fixing this, my favorite would be creating a systemd service:

/lib/systemd/system/wolfix.service

[Unit]
Description=wolfix

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/true
ExecStop=/sbin/ethtool -s eth0 wol d  #change eth0 according to your laptop nic
[Install]
WantedBy=multi-user.target

Then enable the service and good to go: systemctl enable wolfix

PD: This is assuming you are running 16.04 or newer, if not just add the ethtool line to /etc/rc.local, but keep in mind if some other program enable the wol feature before shutdown this fix will be useless.


How to use pygmentize automatically with less

It was easier than I expected. I must to use:

export LESSOPEN='|pygmentize %s'


Nordvpn local network addresses not reachable when connected

Same same. I thought maybe it was a bug in the app, but 3.8.5 is the same.
My settings (which worked several nordvpn app versions ago):
Technology: NordLynx
Kill Switch: disabled
CyberSec: disabled
Notify: enabled
Auto-connect: enabled
DNS: 1.0.0.1, 1.1.1.1

Resolution (Later)
Hahaha! Got it! Whitelist your internal. Mine is 192.168.2.xxx, adjust yours accordingly.
nordvpn whitelist add subnet 192.168.2.0/24


Windows Remote Desktop Connection and Workspaces Functionality

I use Remmina all the time and it works very well
sudo apt install remmina remmina-plugin-rdp


How can I transfer windows partitions to ubuntu?

The best way is to boot into Windows and shut down the system. Select Ubuntu kernel from the grub menu to boot into Ubuntu afterwards. Open file manager after login, from the left pane, find the partition you want to mount under devices and click. It should be mounted and it will show on main pane


Your best bet is to run TestDisk on your system. It searches for filesystem information and can create fresh partition table entries for any filesystem(s) it finds. This is most likely to work easily if the disk hasn't been significantly repartitioned, though -- if you've repeatedly resized, moved, or created new partitions, leftover fragments of old partitions may confuse TestDisk. Even if you've done this, though, it's worth trying. I believe that TestDisk is available in the Ubuntu testdisk package, so you should be able to install and use it from an Ubuntu live CD.


Can I Use Google Input tools to type Malayalam language?

You can achieve that by doing the following:

Open the terminal by doing Ctrl+Alt+T.
Install ibus by running: sudo apt-get install ibus.
Install the library for Indian regional languages by running: sudo apt install ibus-m17n m17n-contrib.
Now add ibus to your startup applications:

Open Startup Applications from the dash.
Click on Add.
Enter the name as "ibus".
In the command box type: "ibus-daemon".
Save.

Log out and log in back.
Go to System > Preferences > Ibus preferences.
Select the "input method" tab.
From the drop-down menu, Select an input method: Malayalam > Swanalekha.
Click on the Add button.
Open a text editor and press Ctrl+Space to change the language.

That should help you! Please, leave some feedback when it does.


How do you change login options on start screen in Ubuntu 20.04

Thats the default option for gdm3 (GNOME DISPLAY MANAGER)

In some very rare cases it is possible to login as special user case like gdm user for example.. thats why the option is showing "Not listed" to allow by entering user name and then password.
you can verify this by accessing to accounts directory
nautilus /var/lib/AccountsService/users

Observe that my own account has last line "false" this means this users shows in gdm login screen and other two with "true" this means they will not be shown but it may be possible to login to those users in very special and rare cases.. you can consider them they will never be used.


A script to check if a java process is running as root user

You should just be able to test the exit status of pgrep directly e.g.

if pgrep -u root -xf 'Introscope_WebView.lax' > /dev/null
then
    process_user="Root"
else
    process_user="Not Root"
fi

Note that this will also set process_user="Not Root" if the process does not exist at all - if you want to cover all three cases (running and owned by root; running but owned by someone else; not running) you will need to add a separate test.

e.g. given

$ ps -ef | grep [i]nit
root         1     0  0 Jan21 ?        00:00:05 /sbin/init splash

then

$ if pgrep -xfu root '/sbin/init splash' >/dev/null ; then echo 'root owns it'; fi
root owns it

From man pgrep

EXIT STATUS
       0      One or more processes matched the criteria.
       1      No processes matched.
       2      Syntax error in the command line.
       3      Fatal error: out of memory etc.


Dell XPS 15 9570 (2018) disable nvidia GPU

On my 9750 running Ubuntu 18.04, whenever I turn off the dgpu using bbswitch before logging in or on boot, my system freezes.

After trying many different methods and many reboots I settled on a workaround: scheduling a cron job to activate bbswitch after some delay (60s) on reboot, so that I can login before bbswitch kicks in.

open crontab as root in terminal:

sudo crontab -e

add to cron:

@reboot sleep 60 && /sbin/modprobe bbswitch

replace /sbin/modprobe to where your modprobe executable is, this assumes bbswitch is installed.

Also add to /etc/modprobe.d/bbswitch.conf:

options bbswitch load_state=0 unload_state=1

This turns off the dgpu on loading bbswitch and turns in on on unloading bbswitch. Refer to here for more details.

For the lid problem, I had to edit logind.conf:

sudo nano /etc/systemd/logind.conf

change the following line:

HandleLidSwitchDocked=ignore

to

HandleLidSwitchDocked=suspend

Strangely if you leave the default settings (=ignore), attach an external display and shut the lid the computer does not freeze on reopening. With =ignore and with an external display the computer suspends when you close the lid but you can wake the external monitor with your mouse/keyboard.


How to synchronize an NTFS partition with Ubuntu One

You can symlink the folders to the Ubuntu One folder, but only if you are using Ubuntu to do the syncing. If you are syncing on Windows it will not work.

An example of how you can do this is:

ln -s /dev/sda6/users/username/Documents ~/UbuntuOne/Documents

NB:
You will have to do this from a terminal, as it is currently not possibly to link to a specific location from within Nautilus (there is a script for it but is broken in the most recent Nautilus versions).

UPDATE:
For some reason, they've changed this (it changed cause it worked for me before), as Chipaca pointed out. However I will leave my answer here as a sign post (for reasons).

You cannot synch the folders apparently. Use dropbox until U1 allows you to use symlinks.


hard disk space lost when I installed ubuntu

There is not enough information here to determine a solution to your situation. From what I can see, you have a lot of small partitions that I can't determine the function of. Can you provide the following to help diagnose?

contents of /etc/fstab - this will tell us where your OS, swap, and maybe data partitions are.
ls -l /dev/disk/by-label - If there are any user- or system-configured labels on the partitions that might hint as to their purpose this will show them.
Mount each partition (except for /dev/sda10) under /mnt and show us the contents.

.

for n in 1 2 3 5 6 8 9
do
  sudo mkdir -p /mnt/sda$n
  sudo mount /dev/sda$n /mnt/sda$n && tree -d -L 2 /mnt/sda$n
done

The above script makes the directories /mnt/sda1 through /mnt/sda9 and then mounts each of the partitions on to those directories. If the mount succeeds, it runs tree to shows the directory tree (out to two levels) of the directories on those partitions. Hopefully this will give us some insight as to what is on each partition. Partitions 4 and 7 are not included because 4 is an extended partition shell (which just contains 5-10) and 7 is a swap partition so the data is not in a mountable filesystem.

Here are my guesses:

Device      Size (GB)  Function
/dev/sda1    13.51     Windows Recovery Partition (OEM)
/dev/sda2     0.10     Windows System Partition (WinVista/7/8 Boot Partition)
/dev/sda3   186.82     Windows OS
/dev/sda4   ------     Contains /dev/sda5 -> /dev/sda9
/dev/sda5    30.96     Data Partition?
/dev/sda10   30.61     Root filesystem for Ubuntu
/dev/sda6    29.37     Data Partition?
/dev/sda8     1.07     ?
/dev/sda9     1.78     ?
/dev/sda7     3.86     Linux Swap


Juniper network connect on Ubuntu 14.04 cannot find 32 bit Java

adding symlink to /usr/sbin/ helped.

sudo ln -s /usr/bin/update-alternatives /usr/sbin/

solution from following article:
How to install Juniper VPN on Ubuntu 14.04 LTS?

Thanks


How do I connect my Fujitsu ScanSnap iX1500 to my computer?

Try go to official Fujitsu site and download driver for your device and Ubuntu version: https://www.fujitsu.com/global/support/products/computing/peripheral/scanners/sp/software/ubuntu.html

There are 2 links

[Download] icon-download Image Scanner Driver for Linux icon-pdf
Image Scanner Driver for Linux User's Guide.pdf

If you go driver link, you must set cherckbox on next page for I agree to the end-user license agreement above.
Then click Download button for For 64-bit OS or For 32-bit OS according to your Ubuntu release.


Set the environment variable MIRROR to your preferred mirror then use the lxc-create command:

MIRROR="http://mirrors.kernel.org/ubuntu" SECURITY_MIRROR="http://mirrors.kernel.org/ubuntu" lxc-create -n foo


I keep getting these errors while installing Ubuntu 15.04 alongside Windows 8.1 in my laptop

You have to add a BIOS boot partition since your disk is GPT and you used legacy mode.
 It must be located at the start of a GPT disk, and have a bios_grub flag. It needs 1MB size.


How to keep wine from creating directories in my home directory?

You may need to experiment with the sandbox option present in winetricks, which may help you as all the Wine symlinks to $HOME are removed when that setting is applied to the default WINEPREFIX with winetricks sandbox.

However, wine still has your user's permissions in the home folder, and often when installing a new program, an action in the installation can trigger the sandbox to be removed. So it is not really a true 'sandbox' at all, but it may be helpful for your use case.

At the official wine FAQ it is noted that:

  Winetricks does have a sandbox verb that does at least a partial job of isolating Wine programs from the rest of your system. It protects against errors rather than malice. It's useful for, e.g., keeping games from saving their settings in random subdirectories of your home directory.

On the official winetricks page, it is explained that

  If you want to isolate an app so that it doesn't save anything to your home directory, you can try 'winetricks sandbox'. That will remove the symlinks to your home directory. Do this before saving any data, or you'll have to copy old saved data from your home directory into $WINEPREFIX/drive_c/users/$USERNAME.

Important notes

The wine sandbox option will likely need to be used repeatedly, i.e. include it in a launcher script that runs winetricks sandbox and then launches your game, as a number of things in wine can trigger the rebuilding of the symlinks.
The folder of saves you have already generated will need to be moved to your WINEPREFIX, e.g /home/$USER/.wine/drive_c/users/$USER/"My Documents" in order for you to resume your game. If wine has just created a folder called ~/gamesaves, simply move that folder to the location mentioned above. Otherwise, observe the directory structure; if a game save folder is ~/Documents/Syberia/save make sure you create an equivalent in /home/$USER/.wine/drive_c/users/$USER/"My Documents".
When you install a game in the future, make sure you run winetricks sandbox at the start, so that the game will automatically start using your WINEPREFIX as the save location, and not a folder in your $HOME.


Issues with Keyboard not working when booted

to close this off i now have this working. I followed this thread on Reddit:
https://github.com/linux-surface/linux-surface/wiki/Installation-and-Setup
The step i missed all along was to install and confirm the certificate to allow this to work with systems that support Secure boot:
https://github.com/linux-surface/linux-surface/wiki/Installation-and-Setup


After installing Ubuntu12.04 LTS, touchpad is not working

Using the command lsusb gives a result similar to this:

Bus 006 Device 003: ID 046d:c068 Logitech, Inc. G500 Laser Mouse

So now I have a hardware ID that can be Google searched.

Otherwise, you're using 12.04 and Linux Kernel 3.2- that's pretty old. You could update beautifully by recompiling the latest upstream Kernel, which would probably fix the touchpad issue but it's a lot of extra work. I recompile my Kernel for the extra support and performance increase but not many would find this a suitable answer.


How to install Eclipse J2EE IDE from a tarball?

As Marcos Roriz and Thomas Ward said in the comments

  That happens because eclipse writes a lot of temp and plugin files and /usr/local is recommended to not allow apps to write (that is only read and execute there)

  You may have better luck just saving Eclipse down onto your user directory - it does still operate from the user directory, even though you may want to place it in /usr/ or elsewhere. This is what I do to use it :/


How to update OpenGL Driver on Ubuntu 14.04 LTS

Be careful when using Charles Green's advice.

On the sudo apt-get upgrade step, you might see:

sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt-get update
sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer
    required:
  account-plugin-windows-live libupstart1
Use 'apt-get autoremove' to remove them.
The following packages have been kept back:
  libdrm-dev libdrm-intel1 libdrm-intel1:i386 libdrm-nouveau2
  libdrm-nouveau2:i386 libdrm-radeon1 libdrm-radeon1:i386 libdrm2     libdrm2:i386
  libegl1-mesa libegl1-mesa-drivers libgbm1 libgl1-mesa-dev libgl1-mesa-dri
  libgl1-mesa-dri:i386 libgl1-mesa-glx libgl1-mesa-glx:i386 libglapi-mesa
  libglapi-mesa:i386 libgles1-mesa libgles2-mesa libosmesa6 libosmesa6:i386
  libva1 libwayland-egl1-mesa mesa-common-dev xserver-xorg-video-intel

The key part is that the upgrade I wanted to do didn't happen:

The following packages have been kept back:

You will have to:

sudo apt-get install <list of packages kept back>

I ended up doing:

sudo apt-get install libegl1-mesa libegl1-mesa-drivers xserver-xorg-video-intel libgl1-mesa-dri libglapi-mesa

For more information on this problem see: "The following packages have been kept back:" Why and how do I solve it?


Where are panel applet information stored in mate?

Yes, I was reffering to mate-desktop, and the panel applets, also called launchers.

The info I was looking for is in:
/home/user/.config/mate/panel2.d/default/launchers


first check  network discovery is turn on , if so
then type smb://IP ADDRESS of system you want to connect, I popup will open asking USERNAME AND PASSWORD


What application will give me a calendar with a year view?

On the command prompt try:

cal -y 2013

(You have to install the bsdmainutils package if it doesn't work.)


How to filter out lines having 2 similar values?

To get the lines that has the same_number -> same_number pattern:

grep -E '([[:digit:]]+)[[:blank:]]+->[[:blank:]]+\1[[:blank:]]'

-E enables ERE (Extended Regular Expression)
([[:digit:]]+) matches one or more digits and put in captured group 1
[[:blank:]]+ matches one or more horizontal whitespaces
-> matches literally
\1 refers to the first captured group
[[:blank:]] matches a whitespace after that

You can use the similar logic with other popular text-processing tools/languages like sed, awk, perl.

To get the lines that do not have the pattern, only add the -v option:

grep -vE '([[:digit:]]+)[[:blank:]]+->[[:blank:]]+\1[[:blank:]]'

Example:

% cat file.txt
[325194/777232]/var/cache/apt/srcpkgcache.bin:  100%  extents: 5 -> 1   [ OK ]
[325195/777232]/var/cache/apt/pkgcache.bin: 100%  extents: 4 -> 1   [ OK ]
[325255/777232]/var/cache/man/de/index.db:  100%  extents: 2 -> 2   [ OK ]
[325521/777232]/var/log/syslog: 100%  extents: 7 -> 1   [ OK ]
[325525/777232]/var/log/lastlog:    100%  extents: 2 -> 2   [ OK ]
[325531/777232]/var/log/syslog.1:   100%  extents: 5 -> 1   [ OK ]
[325572/777232]/var/log/kern.log:   100%  extents: 6 -> 1   [ OK ]
[325589/777232]/var/log/auth.log:   100%  extents: 3 -> 1   [ OK ]
[325621/777232]/var/log/faillog:    100%  extents: 2 -> 2   [ OK ]
[325625/777232]/var/log/wtmp:   100%  extents: 3 -> 1   [ OK ]
[325627/777232]/var/log/kern.log.1: 100%  extents: 2 -> 1   [ OK ]
[325644/777232]/var/log/cups/access_log.1:  100%  extents: 2 -> 1   [ OK ]
[325810/777232]/var/log/auth.log.1: 100%  extents: 2 -> 1   [ OK ]

% grep -E '([[:digit:]]+)[[:blank:]]+->[[:blank:]]+\1[[:blank:]]' file.txt
[325255/777232]/var/cache/man/de/index.db:  100%  extents: 2 -> 2   [ OK ]
[325525/777232]/var/log/lastlog:    100%  extents: 2 -> 2   [ OK ]
[325621/777232]/var/log/faillog:    100%  extents: 2 -> 2   [ OK ]

% grep -vE '([[:digit:]]+)[[:blank:]]+->[[:blank:]]+\1[[:blank:]]' file.txt
[325194/777232]/var/cache/apt/srcpkgcache.bin:  100%  extents: 5 -> 1   [ OK ]
[325195/777232]/var/cache/apt/pkgcache.bin: 100%  extents: 4 -> 1   [ OK ]
[325521/777232]/var/log/syslog: 100%  extents: 7 -> 1   [ OK ]
[325531/777232]/var/log/syslog.1:   100%  extents: 5 -> 1   [ OK ]
[325572/777232]/var/log/kern.log:   100%  extents: 6 -> 1   [ OK ]
[325589/777232]/var/log/auth.log:   100%  extents: 3 -> 1   [ OK ]
[325625/777232]/var/log/wtmp:   100%  extents: 3 -> 1   [ OK ]
[325627/777232]/var/log/kern.log.1: 100%  extents: 2 -> 1   [ OK ]
[325644/777232]/var/log/cups/access_log.1:  100%  extents: 2 -> 1   [ OK ]
[325810/777232]/var/log/auth.log.1: 100%  extents: 2 -> 1   [ OK ]


There are Debian and Arch repositories, but not Ubuntu.

https://github.com/archlinuxarm/PKGBUILDs


How do I confirm in iptables that IP ranges are blocked?

Eventually, and if working properly, you should see non-zero packet and byte counts for the country blocking rules. Example:

Chain INPUT (policy DROP 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination
   ...
   60848  3326067 DROP       all  --  enp4s0 *       0.0.0.0/0            0.0.0.0/0            match-set china src
    1265    57566 DROP       all  --  enp4s0 *       0.0.0.0/0            0.0.0.0/0            match-set hongkong src
   26865  1085462 DROP       all  --  enp4s0 *       0.0.0.0/0            0.0.0.0/0            match-set romania src
  193511  7816920 DROP       all  --  enp4s0 *       0.0.0.0/0            0.0.0.0/0            match-set russia src
   33149  1358726 DROP       all  --  enp4s0 *       0.0.0.0/0            0.0.0.0/0            match-set ukraine src

To list the contents of any set do sudo ipset list SETNAME. Example:

doug@DOUG-64:~$ sudo ipset list romania | head -15
Name: romania
Type: hash:net
Revision: 6
Header: family inet hashsize 1024 maxelem 65536
Size in memory: 65600
References: 1
Members:
193.104.73.0/24
45.131.104.0/22
89.45.66.0/24
91.240.94.0/24
176.223.66.0/24
185.248.136.0/22
46.175.152.0/22
176.116.32.0/20


Upgrading to 20.04, but getting "Please install all available updates for your release before upgrading."

Between 18.04 and 20.04 Lubuntu has switched desktop environments.  Lubuntu used to use LXDE but has switched to LXQt in recent releases.
Switching a DE is a huge change.  It involves changing out dozens of core packages that all must work together in harmony to give you a working desktop environment.  It's hard to account for all of the possible ways that the new software will work with all of your existing configurations for the LXDE desktop environment.
For this reason, upgrading from Lubuntu 18.04 to Lubuntu 20.04 requires a clean installation from external installation media.  The typical upgrade path is unsupported.
The release notes for Lubuntu 20.04 state:

Due to the extensive changes required for the shift in desktop
environments, the Lubuntu team does not support upgrading from 18.04
or below to any greater release. Doing so will result in a broken
system. If you are on 18.04 or below and would like to upgrade, please
do a fresh install.

You can download the new version of Lubuntu at lubuntu.me.


If a reboot fixes a problem, it's most likely faulty hardware, or a faulty driver for that hardware. Without any more details, it's hard to even guess what hardware or driver it could be.


Shotwell is a default on Ubuntu I believe and it works very good.  No errors and the tagging system is drag and drop.

Not sure if it will import your picassa library, but if the meta data is written to the picture files it should do it no problem.


If you compiled and installed Geany from source, you also need to download the corresponding geany-plugins version and compile and install that one. The version of geany-plugins from apt-get might differ from the one you compiled and that could be why you don't see all plugins.

https://plugins.geany.org/geany-plugins/


unable to add/remove program in Ubuntu 12.04 LTS?

The parameters of fuser are wrong. The -c option is an alias for -m option that select the whole filesystem of the path and the -k parameter kill all processes the own that filesystem (see
fuser man page for reference). So, with this command you kill all system except the kernel.

Use this command for get the pid (and user) of the process the use the dpkg database:

$ sudo fuser -u /var/lib/dpkg/lock

Example output:

/var/lib/dpkg/lock:  14502(root)

You can kill it (if you know what you're doing) with:

$ sudo kill -9 14502

For remove the lock only use:

$ sudo rm /var/lib/dpkg/lock


Slack desktop client on 16.04 behind proxy server

When setting up the proxy config in the Network Settings panel, leave the socks proxy blank.  Once you enter a socks proxy, websockets (e.g. wss://...) are proxied using socks instead of http/s...and then fail.

I'm not sure if this a fundamental issue with websockets or an issue with Ubuntu's implementation of proxy settings.  If you manually configure a proxy server in firefox (instead of "use system settings") then websockets work.  Windows/IE also doesn't have this issue.  So it makes me think that Ubuntu's implementation of proxy settings is either incorrect or less forgiving.


Is accessing Windows files possibly harmful?

Yes, writing to files on a NTFS partition from Ubuntu can possibly harm your Windows installation. There are mainly two reasons for this:

When accessed from Ubuntu Windows file permissions are not respected. This means we have full read and write access to files we may had flagged read-only or hidden from Windows. This also includes Windows system files which could be accidentally overwritten or even deleted from Ubuntu.
When we hibernate Windows or use the Windows fast boot option (which is basically the same) the Windows OS is not aware of any changes we made to files on the drive. This may lead to data loss.

Nevertheless, and because we may need access to file we share from Ubuntu and from Windows it is not generally a bad idea to access files on a NTFS partition. When need to be careful what we do, and we may want to follow one ore more of the following precautions:

We may want to mount any Windows partitions as read-only. This has the disadvantage that we are unable to write file from Ubuntu but has the advantage of not being able to accidentally delete or alter files on that drive.
Do not hibernate when dual-booting. This also includes that we should not use the Windows fast boot option.
Keep shared data on a separate partition.


Awk/Sed commands find and replace pattern

You can use this Perl command:
perl -0777 -pe 's/(variable "azure_spoke_gateways".*?name *= *)".*?"/\1"MYSTRING"/gs' input_file

It will replace whatever is inside "" (not only xyz) for name with MYSTRING.
If you want to only replace xyz, use:
perl -0777 -pe 's/(variable "azure_spoke_gateways".*?name *= *)"xyz"/\1"MYSTRING"/gs' input_file

To change input_file in-place, add the -i flag right before input_file.


The man page of chmod covers that.

u stands for user.
g stands for group.
o stands for others.
a stands for all.

That means that chmod u+x somefile will grant only the owner of that file execution permissions whereas chmod +x somefile is the same as chmod a+x somefile.

The chmod man page says:

  The format of a symbolic mode is
  [ugoa...][[+-=][rwxXstugo...]...][,...].
  Multiple symbolic operations can be
  given, separated by commas.

  A combination of the letters 'ugoa'
  controls which users' access to the
  file will be changed: the user who
  owns it (u), other users in the file's
  group (g), other users not in the
  file's group (o), or all users (a). If
  none of these are given, the effect is
  as if 'a' were given, but bits that
  are set in the umask are not affected.


Root Doesn't Have Sufficient Permission To Copy Directories/Files

When in doubt... throw the GUI out...  I simply used

sudo rsync -avrh  [source] [target]

no more errors everything copied...

thanks


I am assuming you are logging into some university computing clusters. At Stanford, we have a system that uses the module command to load different programs as you are describing.

Basically, the module command modifies your environment so that the path and other variables are set so that you can use a program such as gcc, matlab, or mathematica. To see some of the changes, run env to see your environment variables, then run module load matlab or some other available package, and then run env again to see the updated variables.

I'm not sure of the details, but you can try

module help

or visit http://www.tacc.utexas.edu/tacc-projects/lmod for more information


Ubuntu 19.04 on Thinkpad Yoga X390 Thunderbolt USB not working after sleep

Got solution: as Thunderbolt happens to be controlled also by BIOS, disabling BIOS Assisted Thunderbolt in Thinkpad's BIOS helped, now all THunderbolt Devices work hot-plug.


On Ubuntu, you are running netflix through wine, a sort of Windows emulation software, because Netflix won't support Linux. This is not so efficient as running the Netflix software natively. I've found it can work, but it seems to be sensitive to everything else running on your system as well as the quality of your wifi signal.

Try it with a good wifi signal with nothing else running.


Ubuntu 14.04 problem with network bandwidth limit

Agg TX is disabled by default in iwlwifi, enabling it has helped quite a few people

sudo modprobe -r iwlwifi
sudo modprobe iwlwifi 11n_disable=8

If the speed is back to normal, you can make the change persistant with the following

echo "options iwlwifi 11n_disable=8" | sudo tee -a /etc/modprobe.d/iwlwifi.conf

It also helps to have the router encryption set to WPA2-AES only with no TKIP, WEP, or WPA


Why does wget try to access wrong target?

In bash, \ is used to escape the following character.
It is often used (and probably this is what you want) to escape the newline character to enable a multi-line command.
wget \
-arg1 \
-arg2

If you want the \ to escape the newline character, it must be placed directly in front of it, otherwise it won't work:
wget \ # some comment
-arg1 \
-arg2

... will escape the space and the following will be executed (check set -x):
+ wget ' #' some comment

Further, as your next line(s) is/are not connected anymore, you will likely get an error saying something like:
`-arg1`: command not found.


Prevent MPRIS from recognizing an application

While it would still be good to know if there is an "MPRIS-managed" solution to this problem, there is a work-around using the settings in Chrome itself.

It seems Chrome is quite aggressive in "taking over" control of media keys/shortcuts. This can be disabled by following these steps, found in a post on the GHacks.net site:

  You may disable the Hardware Media Key Handling flag in Chrome currently to prevent Google Chrome from restricting media keys access. Here is how that is done:

  Load chrome://flags/#hardware-media-key-handling in the Chrome address bar; this should open the right flag when loaded.
  Set the Hardware Media Key Handling flag to Disabled.
  Restart Google Chrome.

When I set this toggle on my machine, Chrome offered a "Relaunch" button which restarted the browser with the tabs from the previous/re-started session intact.

This takes care of my issue—with the caveat that if there is an MPRIS "solution" (i.e., use the MPRIS spec to "hide" a potential media-player), I would still like to know. ;)


How to search ASCII text with Ubuntu Terminal

You can use grep to extract the IP addresses, and sort + uniq to count the number of hits:

grep -Po '^\d+(\.\d+){3}' filename | sort | uniq -c

grep is used to search for text matching a regular expression
-o prints only the text that matched the expression, and not the entire line
-P enables Perl-style regular expressions
^\d+(\.\d+){3} - a string that matches:

The beginning of the line (^) followed by
Any number of digits (\d+) followed by
A dot and any number of digits (\.\d+) repeated 3 times ({3})

sort sorts the input
uniq -c prints the number of unique entries in sorted input.


How to change ownership for an external HDD?

FAT doesn't support file ownership, so you need to specify the owner when you mount the device. You can do this by adding uid and gid options to your mount command.


Setting up multiple websites on a Linux server

First we need to make a default.conf in the folder /etc/apache2/sites-available

The default.conf file:

<VirtualHost *:80>
  ServerAdmin foo@foo.com
  DocumentRoot /var/www/default

  <Directory /var/www/default>
    Options -Indexes +FollowSymLinks +MultiViews
    AllowOverride All
    Require all granted
  </Directory>

  ErrorLog ${APACHE_LOG_DIR}/default-error.log

  # Possible values include: debug, info, notice, warn, error, crit,
  # alert, emerg.
  LogLevel warn

  CustomLog ${APACHE_LOG_DIR}/default-access.log combined

</VirtualHost>

Now our default is configured, we can setup multiple websites, example of one:

The foo.com.conf file:

<VirtualHost *:80>
  ServerName foo.com
  ServerAlias *.foo.com
  ServerAdmin administrator@foo.com
  DocumentRoot /var/www/foo.com

  <Directory /var/www/foo.com>
    Options -Indexes +FollowSymLinks +MultiViews
    AllowOverride All
    Require all granted
  </Directory>

  ErrorLog ${APACHE_LOG_DIR}/foo_com-error.log

  # Possible values include: debug, info, notice, warn, error, crit,
  # alert, emerg.
  LogLevel warn

  CustomLog ${APACHE_LOG_DIR}/foo_com-access.log combined

</VirtualHost>

Now we need to do a2ensite foo.com and service apache2 reload

If you want addional sites, just do the following:

cd /etc/apache2/sites-available
cp foo.com.conf new-domain.com.conf
vim new-domain.com.conf
(replace all foo.com & foo_com with new-domain.com & new-domain_com)
mkdir /var/www/new-domain.com
place contents in /var/www/new-domain.com
a2ensite new-domain.com.conf
service apache2 reload

Let me know if it didn't work, I assume you know about user policy? (www-data, chmod 755 on /var/www?)


What to do if dpkg is stuck while updating packages?

If, for any reason, package installation fails (Update manager or Synaptic), you can attempt the following option.
Open a terminal, type "sudo dpkg --configure -a" and hit enter.
Provide your root password.
After dpkg has finished, open synaptic, check for updates.
If something is wrong, synaptic will tell you.

Cheers!


You need not install Windows again to recover your files. There are many utilities available in Ubuntu which will scan your hard disk partitions for deleted files and restore them. Such a list is available here. I have one particular program called Photorec in mind. It comes bundled with a package called
    testdisk

For more instructions in installing Photorec, please go through this link.
Be sure to select .tex file extension in photorec and proceed further.


Did you check the apache2 error log?

There is a  typo in your php code. You are missing the &. Correct is:

// Report all errors except E_NOTICE
error_reporting(E_ALL & ~E_NOTICE);

I highly suggest for development systems to set

display_errors = On
display_startup_errors = On
error_reporting = E_ALL

in your php.ini  as I mentioned in the comments earlier.


How do I stop Unity 7 from focusing a window when I scroll while hovering a launcher icon?

Yes, it is possible to do so.

Install CompizConfig Settings Manager via sudo apt-get install compizconfig-settings-manager
Under Desktop click on Ubuntu Unity  Plugin

Click on Launcher tab:

Uncheck Scroll Inactive Icon to Focus Application

Close the CompizConfig Settings Manager

That's it ! Changes take effect immediately.


open your terminal and type this

sudo apt-get install gparted

Then type as

gksudo gparted

then you can find your space over there and you can create partitions .


Read and Write to HFS using ubuntu but hfsprogs wont install

try searching for it:

apt search hfs

on xenial I found hfsplus


How to install dos2unix on a Ubuntu app on a Windows-10 machine

This solved my problem:

sudo apt-get update
sudo apt-get install dos2unix


How do I quickly switch between workspaces in unity?

The shortcut Ctrl+Alt + arrow keys allows you to move in the workspaces.

You'll need to turn workspaces on if you're on 13.04+.


Ubuntu 20.04 rejects user password when connecting to windows printer via samba?

Problem:
It's impossible to install the windows printer because "windows printer via samba" will not accept the user/password, and returns a "not authorized" window instead.
Here's why.
Since version 4, both Samba Server & Samba Clients do not allow an older level of protocols negotiation. You will have to enable them in either the /etc/samba/smb.conf and if needed, the smb.conf file.
Edit /etc/samba/smb.conf file (need root permissions)
in the [global] section, adding the following line:
client min protocol = NT1
Save the file and exit the editor.
You must restart the Samba Service for this change to take effect. In a terminal, enter this command:
sudo service smbd restart
You should be able to access your samba shares successfully. If you still cannot connect to your samba share, you can lower even more the protocol security in smb.conf (not recommended, may need to be created):
sudo nano smb.conf
and adding the line:
client min protocol = CORE
Original link here: https://itectec.com/ubuntu/ubuntu-cant-acces-nas-anymore-after-upgrading-to-20-04/


Why doesn't the Libreoffice icon appear on my launcher when running?

You can use
Super+W to show all the windows on your desktop. The LibreCalc window will appear there.

(The Super key is often the Windows logo).

There is a problem, but this is a work-around.


If the files have an extension .txt then you might use something like:

find ~/Desktop/Research -type f -iname '*.txt' -exec chmod u+w '{}' +

find is recursive by default and will go into all subdirectories as well.

If the files are of the type text but don't have extensions, you could do something like

for i in ~/Desktop/Research/*; do if [[ $(file "$i" | grep text) ]]; then echo chmod u+w "$i"; fi; done

In this command, echo is just for testing, to show what permission changes will be applied. Remove echo after testing to actually change the permissions. This time, there will not be any output.

If you want this command to work on subdirectories, you can do this:

shopt -s globstar; for i in ~/Desktop/Research/**; do if [[ $(file "$i" | grep text) ]]; then echo chmod u+w "$i"; fi; done

I have used chmod u+w which adds write permission only for the owner. Adjust as you prefer, (try this first and if you still have problems, then replace with chmod o+w or chmod 666 but beware of giving write permission to everyone!) And of course, don't change permissions of system files.


Well, I finally got it working:

You MUST have kernel >=4.10
Disable steam's support for DS.
Udev rules (the ones from steam):

sudo gedit /lib/udev/rules.d/99-steam-controller-perms.rules

# This rule is needed for basic functionality of the controller in Steam and keyboard/mouse emulation
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"

# This rule is necessary for gamepad emulation; make sure you replace 'pgriffais' with a group that the user that runs Steam belongs to
KERNEL=="uinput", MODE="0660", GROUP="YOUR_USERNAME", OPTIONS+="static_node=uinput"

# Valve HID devices over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0666"

# Valve HID devices over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*28DE:*", MODE="0666"

# DualShock 4 over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE="0666"

# DualShock 4 wireless adapter over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ba0", MODE="0666"

# DualShock 4 Slim over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", MODE="0666"

# DualShock 4 over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*054C:05C4*", MODE="0666"

# DualShock 4 Slim over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*054C:09CC*", MODE="0666"

Trigger a refresh of UDEV rules:

sudo udevadm control --reload-rules
sudo udevadm trigger

If mapping is messed out, you'll probably need the correct mapping, controllermap is needed for that purpose:

sudo apt-get install build-essential xorg-dev libudev-dev libgl1-mesa-dev libglu1-mesa-dev libasound2-dev libpulse-dev libopenal-dev libogg-dev libvorbis-dev libaudiofile-dev libpng12-dev libfreetype6-dev libusb-dev libdbus-1-dev zlib1g-dev libdirectfb-dev

download sdl 2.0.2 (woking on ubuntu 17.04):

cd
cd Downloads
wget https://libsdl.org/release/SDL2-2.0.2.zip
unzip SDL2-2.0.2.zip
cd SDL2-2.0.2
./configure
make
sudo make install
cd test
./configure
make
./controllermap

follow on screen instructions, use backspace key if you mess up an input.

Then you should get something like:

050000004c050000cc09000000810000,Wireless Controller,platform:Linux,x:b3,a:b0,b:b1,y:b2,back:b8,guide:b10,start:b9,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:a2,rightshoulder:b6,rightshoulder:b5,righttrigger:a5,leftstick:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a3,righty:a4,

Let's use this for grid autosport, for example:

gedit ~/.steam/steam/steamapps/common/GRID Autosport/share/controllermapping.txt

add the result from controllermap at the end.

Done.

I have to test it on other games. Working fine on grid autosport so far.


How to install package which was extracted into folder without building into deb file

Yes, you can and it is called Debian Binary package. Use:
dpkg-deb -b|--build binary-directory [archive|directory]

Example:
dpkg-deb -b yourpackage-extracted-folder

Reference: man dpkg-deb
The build step should be quick only if special case with very large files in size or number. You may use these options: -z0 --nocheck

There is other alternative tools like equivs, also may compress them with generic tools (7z) just watch for owner and permissions.

If you looking direct install, you can copy the folders directly, skip only DEBIAN.
However, this alone doesn't record the installation in dpkg system. So if you have another tool that checks this as dependency, it will fail. A workaround this is by installing an old copy of the package then overwrite its files by direct copy.


How can I make the workspace switcher in Unity 2D show more than one row of workspaces?

There is a workaround:

First of all, install the following package:

sudo apt-get install gnome-panel

Then, launch a terminal and run the command gnome-panel.
Look for the old style workspace icons. By default, it's located at lower right corner.
Right click on it and choose Preferences.
Set the number of rows, in your case, to 2.
Your should get the new workspace changes. Close the window.


This is an extra folder that OSX computers make, they are hidden on OSX.

To exclude the folder from the extraction do:

unzip ZipName.zip -x __MACOSX/*

Replace "ZipName" with the name of your zip. The important part is matching the folder which is made up of two underscores then MACOSX, /* so it doesn’t extract the hidden file in that folder as well as the folder.


Code Blocks doesn't start in Ubuntu 20.04

Have you tried to run Codeblocks as root? I've got same issue but if I run codeblocks as root it works


Nautilus (Files) show drives in launcher

If you want to hide fstab mounted drives from the Launcher, you can do it this way:

Install dconf-editor if you haven't already.

Start dconf-editor and scroll down to com → canonical → Unity → devices and enter the UUID of the mount in blacklist.

Here's an example of what it looks like on my system.


Does nvidia-prime do automatic switching in 14.04?

No. As far as when, no clue but no time in the near future, if ever.

Would be a better thing if nvidia could fix the total lack of vsync in nvidia-prime.


You have an Intel "Bay Trail" processor that has a bug. The fix is simple.

In terminal...

We edit a startup parameter in GRUB with:

gksudo gedit /etc/default/grub

Find the line that looks like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Change it to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=1"

Then:

sudo update-grub

reboot

Problem fixed!


Intellij: Unable to properly stop java (spring boot) application

In most of the cases, it is caused by excessive memory usage or related with an issue within multiprocessing. Can you track the memory usage and make sure that is not the issue


With parted, fdisk, gdisk, etc. you only change the partition table on the disk. Since your old partitions are still in use by your system, it keeps using it with the information (start sector and size) it got at boot.
For your system to take into account your new partition table, you need to call partprobe. Then you will need to call pvresize and finally lvresize --resizefs.
Edit: hmmm, according to your vgdisplay output, apparently gparted took care of the partprobe and pvresize parts for you, then you just have to execute lvresize --resizefs on /dev/ubuntu-vg/ubuntu-lv.


Terminal method of formatting storage drive

There are a few options available:

fdisk (older, doesn't support GPT4).
parted (the CLI brother of GParted).
The various mkfs programs, if you already have partitions and wish to format.

fdisk and parted are interactive, and have help commands, so you can always look for help within the program. Both are also scriptable. The mkfs commands are not interactive.

fdisk
fdisk expects a device (such as /dev/sda) as an argument. It has the following commands:
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the DOS compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

I don't use fdisk that much. I'll just focus on:

parted
parted doesn't need an argument (it tries to "guess"), but you should always specify the disk. Given the choice, parted is the program you should prefer. It has the following commands:
  align-check TYPE N                        check partition N for TYPE(min|opt) alignment
  check NUMBER                             do a simple check on the file system
  cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER   copy file system to another partition
  help [COMMAND]                           print general help, or help on COMMAND
  mklabel,mktable LABEL-TYPE               create a new disklabel (partition table)
  mkfs NUMBER FS-TYPE                      make a FS-TYPE file system on partition NUMBER
  mkpart PART-TYPE [FS-TYPE] START END     make a partition
  mkpartfs PART-TYPE FS-TYPE START END     make a partition with a file system
  resizepart NUMBER END                    resize partition NUMBER
  move NUMBER START END                    move partition NUMBER
  name NUMBER NAME                         name partition NUMBER as NAME
  print [devices|free|list,all|NUMBER]     display the partition table, available devices, free space, all found partitions, or a particular partition
  quit                                     exit program
  rescue START END                         rescue a lost partition near START and END
  resize NUMBER START END                  resize partition NUMBER and its file system
  rm NUMBER                                delete partition NUMBER
  select DEVICE                            choose the device to edit
  set NUMBER FLAG STATE                    change the FLAG on partition NUMBER
  toggle [NUMBER [FLAG]]                   toggle the state of FLAG on partition NUMBER
  unit UNIT                                set the default unit to UNIT
  version                                  display the version number and copyright information of GNU Parted

The commands can be contracted to a unique prefix (e.g., h is short for help).
I'm going to use a temporary file (/tmp/part) I created to show you the commands, so the sizes will be somewhat small. You should replace that with the device you need (/dev/sda, for example).
First, if your disk doesn't have a partition table, we must create one:
parted /tmp/part mklabel gpt

or mklabel msdos, if you want the old-school 4-primary-partition thing (called MBR or MSDOS partition table).
Then we make, say, an ext4 partition starting starting at 3GB (i.e., leaving the initial 3G free) and of size 2GB (i.e., ending at 5GB). parted expects locations in MB for mkpartfs, but we can specify the suffix:
parted /tmp/part mkpart primary ext4 3G 5G

And another, now an NTFS partition of 1GB:
parted /tmp/part mkpart primary ntfs 5G 6G

Result:
# parted /tmp/part print
Model:  (file)
Disk /tmp/blah: 10.4GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      3000MB  5000MB  2000MB               primary
 2      5000MB  6000MB  1000MB               primary  msftdata

Note how it uses SI prefixes, whereas GParted steadfastly uses binary prefixes (while dropping the silly i).
I'll label the partitions:
# parted /tmp/part name 1 hello
# parted /tmp/part name 2 world
# parted /tmp/part print
Model:  (file)
Disk /tmp/blah: 10.4GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name   Flags
 1      3000MB  5000MB  2000MB               hello
 2      5000MB  6000MB  1000MB               world  msftdata

While parted can create partitions of filesystem ntfs just fine, it can't format an existing partition (!) to NTFS:
mkfs partition fs-type
         Make a filesystem fs-type on partition. fs-type can be one
         of "fat16", "fat32", "ext2", "linux-swap", or "reiserfs".

Indeed, parted will tell you that you should use it for manipulating partitions, not filesystems, which brings me to:

mkfs
mkfs, like fsck, is essentially a frontend to various filesystem-specific commands. On my system for example, mkfs.bfs, mkfs.cramfs, mkfs.ext2, mkfs.ext3, mkfs.ext4, mkfs.ext4dev, mkfs.fat, mkfs.minix, mkfs.msdos ,mkfs.ntfs, mkfs.vfat are available.
Now, unfortunately, while parted operates just fine on a file, like the one I used above, mkfs can't go hunting for partitions in such files. In fact, it expects block devices, so if I'm going to use a new file /tmp/file for mkfs, I have to force it do so. You'll use the block device corresponding to the partition you want to format, such as /dev/sda2.
The general syntax for mkfs is:
# mkfs --help
Usage: mkfs [options] [-t type fs-options] device [size]

Options:
 -t, --type=TYPE  file system type, when undefined ext2 is used
     fs-options   parameters to real file system builder
     device       path to a device
     size         number of blocks on the device
 -V, --verbose    explain what is done
                  defining -V more than once will cause a dry-run
 -V, --version    output version information and exit
                  -V as version must be only option
 -h, --help       display this help and exit

For more information, see mkfs(8).

As you can see, the -t flag lets us pass filesystem-specific flags. For example, NTFS flags:
# mkfs.ntfs --help
Usage: mkntfs [options] device [number-of-sectors]

Basic options:
    -f, --fast                      Perform a quick format
    -Q, --quick                     Perform a quick format
    -L, --label STRING              Set the volume label
    -C, --enable-compression        Enable compression on the volume
    -I, --no-indexing               Disable indexing on the volume
    -n, --no-action                 Do not write to disk

Advanced options:
    -c, --cluster-size BYTES        Specify the cluster size for the volume
    -s, --sector-size BYTES         Specify the sector size for the device
    -p, --partition-start SECTOR    Specify the partition start sector
    -H, --heads NUM                 Specify the number of heads
    -S, --sectors-per-track NUM     Specify the number of sectors per track
    -z, --mft-zone-multiplier NUM   Set the MFT zone multiplier
    -T, --zero-time                 Fake the time to be 00:00 UTC, Jan 1, 1970
    -F, --force                     Force execution despite errors

Output options:
    -q, --quiet                     Quiet execution
    -v, --verbose                   Verbose execution
        --debug                     Very verbose execution

Help options:
    -V, --version                   Display version
    -l, --license                   Display licensing information
    -h, --help                      Display this help

Developers' email address: ntfs-3g-devel@lists.sf.net
News, support and information:  http://tuxera.com

So let's make an NTFS partition, with quick formatting (-Q), forcing it to operate on a non-block-device file (-F), and setting a label (-L "hello world").
# mkfs -t ntfs -F -Q -L "hello world" /tmp/file
/tmp/file is not a block device.
mkntfs forced anyway.
The sector size was not specified for /tmp/file and it could not be obtained automatically.  It has been set to 512 bytes.
The partition start sector was not specified for /tmp/file and it could not be obtained automatically.  It has been set to 0.
The number of sectors per track was not specified for /tmp/file and it could not be obtained automatically.  It has been set to 0.
The number of heads was not specified for /tmp/file and it could not be obtained automatically.  It has been set to 0.
Cluster size has been automatically set to 4096 bytes.
To boot from a device, Windows needs the 'partition start sector', the 'sectors per track' and the 'number of heads' to be set.
Windows will not be able to boot from this device.
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.

Clearly it didn't enjoy working on a file. :) Don't worry, it should automatically detect most values when working on an actual disk. Even this "file" works fine as a filesystem:
# mount -t ntfs-3g /tmp/file /mnt
# touch "/mnt/a file in mnt"
# ls -l /mnt
total 0
-rwxrwxrwx 1 root root 0 Aug 29 06:43 a file in mnt
# umount /mnt
# ls -l /mnt
total 0

(See the weird permissions?)

Notes:

I haven't used sudo anywhere in this answer yet. Since I was operating on files, and files owned by me, I didn't need sudo. parted will warn you about this. For block devices, which are usually always owned by root, you will need sudo (or you'll have to use a root shell via sudo -i or sudo su -).
parted is a GNU program, and like many GNU programs, has extensive documentation in the info format. Install parted-doc (sudo apt-get install parted-doc) and then run info parted. You can also checkout the online user's manual.
GParted is able to format a partition to NTFS as it calls the appropriate mkfs program directly (mkntfs, in this case - mkfs.ntfs is just a link to mkntfs). It also sets a number of parameters. In fact, for most operations, you can examine the details of the GParted messages to see which commands were run.
I won't go into the merits of GPT vs MBR/MSDOS partition tables, but GPT is likely to be found on new devices with UEFI, especially if you got Windows 8 on them. The state of partitioning tools? discusses what tools are available if you're facing GPT.
LVM, ZFS and btrfs are a whole another game. They all have their accompanying tools, and you should use them instead of parted or fdisk (except perhaps for an initial step of creating partitions for their use).

Note on parted usage:
The syntax of the parted program is:
parted [options] [device [command [options...]...]]

When you run parted without a command, like:
parted /tmp/parted

You'll be presented a simple shell, where you can run the above commands. However, these commands can also be run directly using the parted program. So these three are equivalent:
# parted /tmp/parted
GNU Parted 2.3
Using /tmp/parted
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt

And
# parted
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) select /tmp/parted
Using /tmp/parted
(parted) mklabel gpt

And
parted /tmp/parted mklabel gpt

Note also that, when creating partitions with parted, a useful indicator of end of partitions is -1s (this is "1" between the hyphen and the "s"). This is useful if you want your partition to span from a specified start to the rest of the disk. To be more specific, running
parted /dev/sda -- mkpart primary ext4 3G -1s

will create a partition of /dev/sda that starts at 3G and ends at the last sector of the /dev/sda disk (i.e. it spans from 3G to the whole remainder of the disk). Note that the -- is necessary, for 1s not to be interpreted as an invalid option.


With the compiz-plugins-extra package installed (which isn't in the default install), there's an "Extra WM Actions" that has a "activate demanding attention window" keybinding.


Yes, you can access your files from the live DVD : go to the disk and open the "home" folder. In it are all the users' files.

Were you doing anything such as installing something or uninstalling something when you hit the switch? That could be the cause.

You cannot repair from the live CD with a clear function, but I'm sure this "boot path" it's looking for is something to change in the BIOS, given the fact that the BIOS is the one looking for the boot path. I had this error once and my only solution was reinstalling Ubuntu after backing up my files...

EDIT : If you upgrade to Ubuntu 12.04 LTS or 12.10 you can choose "upgrade but keep my files". Ubuntu will be reinstalled and upgraded and will try to save a maximum of your files. You should still back them up.

That's all I can do for you... mjchopperboy


Change splash/login screen in Ubuntu 20.10

I was unable to change the splash screen.
In 20.10 you can change the login screen background with an image (a solid color, in my case) using
https://github.com/thiggy01/change-gdm-background
download, unzip and follow instructions in README file.
To get rid of (or change) the ubuntu logo, just edit the image /usr/share/plymouth/ubuntu-logo.png


Boot loop before gui after upgrade to Ubuntu 18.04

Finally fixed it.

Final stage of fix ended up being using the aptitude installer to reinstall gnome-desktop, rolling back a number of dependencies to previous versions.

Prior to that, after following a guide laid out by another user, I removed a couple of libgl packages which another post advised were preventing the mesa drivers from loading properly. This was a mistake and broke the system further.


Who decides on which versions apt-get installs?

The packages and software that are available in the software center / repositories are (as far as I know) the version that the distro maintainers have determined is stable and tested at the time of the point release. This does not always mean that it is the latest available version of the software. For example, I am pretty sure Eclipse IDE is often a little behind in the Ubuntu repos which is why I regularly get the latest from their official servers. With most of these programs' code (like Redshift) being fully available on sites like github, you could always build it from source and have the newest one available. You could also search Google and see if someone is maintaining an up-to-date ppa. In your case, you may be on Ubuntu 16.04 LTS which is about a year old at this point. According to this link, Ubuntu 16.10 is using redshift 1.11 -
 https://www.ubuntuupdates.org/package/core/yakkety/universe/base/redshift


When I copied and pasted the above text into Vim, I could see that Line 13 contains a ZERO WIDTH NO-BREAK SPACE just preceding the 1.1.1.1 IP address so the address is not considered to be a valid IPv4 address (Line 14 also contains the same character).


How do I autoconnect to VPN in Lubuntu 12.04

It is most probably a problem with your vpn-secrets. Here comes a possible solution:
store your secrets plainly


Yes, you should always install any security update to protect your system (Linux can have many vulnerabilities).
If you maintain your system updated it will function well and offer you a nice experience.
You should not experience a slow down, don't be afraid of a security update: they are small changes, because programmers can make mistakes which needs to be fixed.
Good evening.


User name on top-right most tray vanished!

Install dconf-tools

sudo apt-get install dconf-tools

From your dash unity search for dconf-tools

under apps-->indicator-session check user-show-menu as shown below in the pic

Or you can use Ubuntu-tweak

To install if you don't have yet:

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

Using Version 0.7.3

Then go to Tweaks menu and choose Session Indicator and then under User Indicator you can Turn it Off


One of the best options that you can try is Ultimate Gamepad. It turns your phone into a multitouch joystick and supports Wifi / Bluetooth. You can download the app from Google PlayStore here.

For this app to work, you have to install the Ultimate Control Receiver program on your computer, this software is multiplatform so it's available for PC, Mac and GNU Linux (Ubuntu), and can be downloaded from here. After that, you have to select it from the list displayed on your phone.

Ultimate Gamepad provides a real button emulation, press several buttons with your thumb as you would on a regular controller.

A second option that you could try is DroidPad, it lets you use an Android powered phone as a Joystick on a computer (Windows or GNU Linux). You can connect via USB or WiFi.

You can get more details about this app in its official website here.

Hope it helps.


How to find files and copy to not existing folder in one command?

Good question, you could try this:
First cd into /usr, this is because when you use an absolute path (like /usr ) with find I suspect it will cause {} to contain full paths.

find . -type f -a -name "*.txt" -a -exec install -D {} ~/texts/{} \;

When I run this command, I got the following error message:

  find: ‘./share/doc/google-chrome-stable’: Permission denied

The error message doesn't mean the operation failed overall, it just means find wasn't able to run the command on the ./share/doc/google-chrome-stable directory.
But for me all the other files and their paths were copied and the directory paths were created as needed.

upon further investigation, the cause of the error was

% ls -al --directory ./share/doc/google-chrome-stable
drwx------ 2 root root 4096 Aug 21 12:45 ./share/doc/google-chrome-stable


Instead of running a script you could install the package sysfsutils and add the line

kernel/debug/vgaswitcheroo/switch=OFF

to the file /etc/sysfs.conf


How do I change the watermark colour in LibreOffice PDF exports?

I don't think that any of the answers currently address this question. This question is referring to the new options to export a pdf with a watermark.

  File --> Export as PDF

Under the General tab, see the Watermark section.

Check the box Sign with Watermark and enter watermark text.

Text appears in the pdf in bright green.

Its not currently possible to change this value as its hard-coded into a patch which changed the color from bright red. This means that you'd have to change the value in the source code to do anything. The change was made to make the document more readable, and because the color is in-line with the LibreOffice colors. The discussion on the LO maillist is available here:

Dev - [PATCH] Change of the color of the watermark at the pdfexport

There is some talk there of addressing the issue, but i don't think anything has been done yet.


I looked at the source code and come up with my own uninstall instructions below.

Open a terminal by pressing Ctrl+Alt+T and execute these commands:

sudo rm -rf /usr/local/share/crebs
sudo rm /usr/local/share/applications/crebs.desktop
sudo rm /usr/local/share/man/man1/crebs.1.gz


How do I access an NTFS storage partition?

Try

sudo mount -t ntfs-3g /dev/sda4 "some folder path"

to see if it mounts or not. See that package ntfs-3g is installed. If you wan't it to be mounted all the time you can use something like ntfs-config or enter mount point manually on /etc/fstab. See here for more information.

Since it is visible in gparted it should be visible in Disk Utility as well. Try mounting from it as well.


Microphone not working on Intel NUC5CPYH

I've just found Launchpad answer "No audio input with Ubuntu 14.04 and Intel NUC" (#270122). This defined the same problem as I have. It states "Turns out the jack is not a straightforward microphone jack, but one intended for a headphone and mic set. A splitter can be bought which splits it into two". As I previously said I knew that the socket is a combined one for headphone & microphone, but I didn't realise that a splitter is required for the actual microphone to be 'picked up'. I've ordered a splitter: when it comes, I'll post the result (from using it) here.e
PS I was using Linux kernel 4.3.3 in order to make wifi work (as opposed to kernel 3.19.0 as used by Trusty). I've reverted to kernel 4.2.0-22 as it's on the Trusty repos (and makes wifi work) rather than revert to 4.3.3 (which is intended for Xenial which I downloaded from the Linux kernels website).


Dolphin under Gnome doesn't display any thumbnail, how to fix?

In Dolphin does not show thumbnails from 2014, the following additional packages are recommended:

ffmpegthumbs: video thumbnail generator using ffmpeg
mplayerthumbs: video thumbnail generator using mplayer (no longer needed and not in the bionic repos)
kffmpegthumbnailer: video thumbnailer for KDE (doesn't appear necessary in KDE Plasma5)

A more recent answer from 2016 there indicates that kio-extras is also needed.

I had recently installed dolphin on Ubuntu 18.04 and could view thumbnails and also had the Show Previews pane that was missing on your system.

I looked through the appropriate history.log file in /var/log/apt to see what thumbnail-related packages were installed along with dolphin. I found two:

ffmpegthumbs and
kdegraphics-thumbnailers

Indeed, these were the only two packages with "thumb" in their names on my system:

$ apt list --installed | grep -i thumb

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

ffmpegthumbs/bionic,now 4:17.12.3-0ubuntu1 amd64 [installed,automatic]
kdegraphics-thumbnailers/bionic,now 4:17.12.3-0ubuntu1 amd64 [installed,automatic]
$

kio-extras, the package recommended by the second answer, along with kio-extras-data, was installed on my system, not along with dolphin but when I installed gwenview, Kubuntu's image viewer.

Anyway, this is what dolphin looks like:

Dolphin showing thumbnails and the pane to select which previews are shown

Edit:

kio-extras is a "recommends" for dolphin in Kubuntu 19.04.


The "port" field in a packet is only 16 bits long, thus it can hold values from 0 to 65535. Your use of port 65536 in your
command will not fit into 16 bits, and is, therefore, invalid.

Your command should be:

sudo ufw allow 45000:65535/tcp


LTS is the way to go, so yes, Ubuntu 10.04LTS, upcoming 12.04LTS. Bear in mind charity machines are usually low specced so small distros like Puppy based on LTS Ubuntu are a very good option. Also look into Centos which has seven year support and is based on excellent Red Hat.


How to switch between low latency and generic kernels?

Here is a nice fix with dual listing:

Low-latency

Download ubuntustudio-default-settings package from http://packages.ubuntu.com/trusty/ubuntustudio-default-settings (choose your release through links in the top right corner)
Extract it.
Copy 09_lowlatency file to /etc/grub.d/

If you don't want low-latency entry to be the top one, rename it to 11_lowlatency so it will be processed after 10_linux.

Generic and other kernel types

Edit /etc/grub.d/10_linux as explained in this answer to exclude low-latency kernel from its listing.


How to extract the embedded video from a Samsung's Motion Photo jpeg file

Install exiftool:

sudo apt install libimage-exiftool-perl

Extract the video:

exiftool -b -EmbeddedVideoFile my_motion_photo.jpg >video.mp4


How to install Thunderbird 10.0 after Thunderbird 11.0 is already installed?

Your mail settings and your personal account information is in the ~/.thunderbird file. As long as you don't move that you will be okay.
Go to the synaptic package manager or use the ubuntu software center and remove the current thunderbird package. Then add the current mozilla ppa to the sources list
sudo add-apt-repository ppa:mozillateam/thunderbird-stable

sudo apt-get update

you then should be able to open synaptic and choose thunderbird 10.0.2 and install it.
If you have issues there you can always download from Mozilla Team Here just select your language and install the .deb file.
Caution! If you update, -  your old thunderbird will be upgraded.
you will also need to "pin" the app or freeze it from further updates by
echo <package> hold | dpkg --set-selections


Mouse Arrow moving Slowly Using keyboard Keys

I use these commands:

sudo apt-get install xkbset
xkbset ma 60 10 10 5 2


From the article you linked to and the contents of your post, it looks like your swappiness is 1, and that seems to mean that your system will prefer to use your ram more often than to save things to your disk. So the answer to your question is that you have low swappiness and lots of ram. I definitely could be wrong on this, but based on the link you posted that seems to be what is happening.


Creating a Web Page in Ubuntu and accessing it through Ethernet from another Ubuntu user

Installing the apache2 package in Ubuntu is all you need to host files, and most likely the easiest solution since it is available in the repositories and comes with basic configuration.

sudo apt-get install apache2

After installing the package, a directory will be created at /var/www. Now each time someone tries accessing your browser from a browser will be welcomed by the index page of that directory.

By default, it contains an "It Works!" message, and it's located at

/var/www/index.html

If you remove that file, the browser will instead show a listing of files in that folder.

Thus each file you need to let other computers see in your browser should be located inside that directory.

It can be reached by http://_YOUR_LOCAL_IP_ADDRESS_/

Note: By default, and for security reasons, the /var/www directory is not writable for any user. Check this question and answers for more details on that: How to avoid using sudo when working in /var/www?

After installing Apache, you stop or start the service by typing one of the following respectively:

sudo apache2ctl stop
sudo apache2ctl start

Of course, this isn't all you can do with Apache, but as solution for your problem there isn't more that needs be done.


Original answer

The following command line should do what you want,

grep 'L_International_node-globe' text1|tr -s ' ' '\t'|cut -f 2 > text2

print the line with the keyword (and value) you want from the file text1
convert space separation to TAB
print the second field (first field after the keyword)
redirect the output to the file text2

I am not sure what you mean by float. The shell will print the character string, and various programs can interpret it as a number in float format.

Edit 1

OK, you want a comma as decimal separator. That is done with sed substitution.

grep 'L_International_node-globe' text1|tr -s ' ' '\t'|cut -f 2 | sed 's/\./,/' > text2

Edit 2

In response to your suggested shellscript I suggest the following modified version,

#!/bin/bash

if [ $# -ne 2 ]
then
 echo "
 Usage:    $0 <path/infile> <path/outfile>
 Example:  $0 text1 text2"
 exit
fi

# extracting the value

var=$(grep 'L_International_node-globe' "$1"|tr -s ' ' '\t'|cut -f 2)

echo "debug1: $var"

# install and use 'bc'
# calculation; 'scale' sets the number of decimals in the output (truncated)

var=$(echo "scale=3
$var/1000000000" | bc)  #the result should be in Gigabits

echo "debug2: $var"

# conversion to comma as decimal separator

var=${var/./,}

echo "debug3: $var"

echo "$var" > "$2"   # after every execution the output file should have a new value

Examples with data from your original question,

$ ./scriptname

 Usage:    ./scriptname <path/infile> <path/outfile>
 Example:  ./scriptname text1 text2

$ ./script-name text1 text2 ; echo '-----------';cat text2
debug1: 115911592756.879990
debug2: 115.911
debug3: 115,911
-----------
115,911


Not a problem per se, but at what times does the gnome live wallpaper in 3.4 change?

The changing version of the standard gnome 3 wallpaper changes with the time of day. In the morning, it is light, and it gets darker over the day.

Like edwin said, you can find all of the wallpapers (the different light / dark versions of the gnome 3 wallpaper and all other standard wallpapers) in /usr/share/backgrounds/

EDIT: It seems that the standard wallpaper is more than just images changing at a special time. It is the only changing wallpaper in the standard configuration that uses transitions, at least in my gnome version (3.8). I could imagine that this isn't the case in 3.4, but at least some parts of the following should also apply to gnome 3.4:

The configuration files for the changing backgrounds are located in /usr/share/gnome-background-properties/ and for the Adwaita standard theme it redirects to another config file: /usr/share/themes/Adwaita/backgrounds/adwaita-timed.xml. You also find the three wallpapers between which the transition happens in the same folder as the config file.


Can exim be configured to send all emails externally?

Take a look at the setting and use of

domainlist local_domains

You should find some uses in the access lists before things get interesting in the router section. My box at home has this one as first router:

    send_to_gateway:
      driver = manualroute
      domains = ! +local_domains
      transport = remote_smtp_smarthost
      route_list = * SMARTHOST

clarification: the following router will be applicable to all emails going to the contents of ˋlocal_domainsˋ

    send_to_gateway:
      driver = manualroute
      domains = +local_domains
      transport = remote_smtp_smarthost
      route_list = * SMARTHOST

The transport used is defined in the transport section of the exim config, you should already have one (possibly with a different name), which pushes your mail to other places. The route_list variable tells exim to push all mails of this router to the server SMARTHOST.

You should invest some time and read the fine exim manual. It will help with non-standard settings that are beyond what ubuntu's simplified configuration can do.


Due to the way PTR records work, they have to be set by the entity that is running the nameserver for the subnet your are in.

Unless you have a /24 and have delegated NS records you have to contact your provider.

Based on your IP I'm guessing you have a virtual or physical machine housed by a German service provider. You should look up how to set reverse lookup in their documentation.


Can ssh onto server using PuTTY, but not ssh from terminal

Make sure your port is open at work! Some companies block certain ports, and port 22 would be a great first candidate!

You can test that with telnet for example:

telnet you.rse.rve.rip 22

You could also use portquiz.net :

$telnet portquiz.net 22
SSH-2.0-OpenSSH_6.0p1 Debian-4

If your request is timing out too than your port is most probably being blocked.


lubuntu 18.10 x64 installed on USB stick clone to usb stick 2

Cloning from one drive to another drive

What you describe in your question works in general.

sudo dd if=/dev/sdx of=/dev/sdy bs=4096 && sync

I have done it successfully with USB pendrives as well as with HDDs and SSDs.

But there are several things that can make it go wrong.

The target drive must be at least as big as the source drive. Not one single byte smaller. It is not enough that the drives have the same nominal size, for example 16 GB. You can check with

sudo parted /dev/sdx u b p
sudo parted /dev/sdy u b p

where x and y should be replaced with the device letters for the source and target drives, and u b makes the output in bytes and p tells parted to print (to standard output).
If there is a GUID partition table, GPT, (and not an old style MSDOS partition table), and the drives have not exactly the same size, you must repair the backup partition table at the tail end of the drive. The previous command lines with parted will also show the partition table. You can use gdisk for this repair job.
If the physical sector sizes are different between the source and target drives, there will also be problems. Small and old drives have usually 512 bytes physical sectors, but some new drives (medium size and huge size) sometimes have 4096 bytes physical sectors. This can cause problems after cloning, and it is probably better the install a fresh system in the new drive and transfer the files, that you want into the new drive (copy on the file level instead of cloning on the drive level). The previous command lines with parted will also show the physical sector size.
Both the source drive and the target drive must be healthy. If there is a bad sector (physical sector), the corresponding data cannot be transferred for that particular location, and it may cause a problem (big or small, depending on what is stored in that location).
Please do not clone the drive that you have booted from. For example, boot from a Lubuntu live drive made from a Lubuntu iso file in order to clone from a drive with an installed Lubuntu system to some other drive.

No partition on the source drive and the target drive should be mounted. Unmount if some partition is mounted.

sudo umount /dev/sdxn

where x is the device letter and n is the partition number.
Cloning with dd is risky, because it does what you tell it to do without any questions. A minor typing error is enough to make it overwrite the family pictures. For this reason it is better to use a tool which helps you identify the target drive and has a final checkpoint, where you can double-check that things will go right.

in Linux you can use Disks alias gnome-disksor mkusb
in Windows you can use Win32 Disk Imager.

You can also clone with Clonezilla. Boot a USB pendrive or DVD disk made from a stable clonezilla.iso file. This is safer than dd because of several checkpoints and questions, and faster because Clonezilla is smart enough to only copy used blocks (and skip free blocks) of the file systems. This makes a big difference if a file system is far from full.
And last but not least, you must let the process finish properly and let the system flush the buffers to the target drive. This is why it is important to run sync and wait until it finishes, and the terminal window returns to prompt.

Cloning via an image file

What is described here is also relevant if you clone in an indirect way by creating an image file from the source drive and restore from the image file to the target drive.

After the cloning, connect only one drive to the computer

If there are writable file systems, you must not boot a computer with both the source and target (of the cloning) connected. These drives have identical data, and there will probably be confusion, which can destroy one or both of the drives.

So boot into either the original (source) drive or into the cloned copy (target) drive, and keep the other drive disconnected (unplugged).


How can I deactivate Bluetooth on system startup?

For Ubuntu 20.10
For this ubuntu edit /etc/bluetooth/main.conf and find the line
AutoEnable=false

and replace it with:
AutoEnable=true

18.04+
18.04* users who don't naturally have a /etc/rc.local, you'll need to create one and make it executable. To make things slightly easier, you can just paste the following command into a terminal:
sudo install -b -m 755 /dev/stdin /etc/rc.local << EOF
#!/bin/sh
rfkill block bluetooth
exit 0
EOF

Run sudoedit /etc/rc.local and add this before line with exit 0:
rfkill block bluetooth

You should still be able to enable Bluetooth through the top bar applet.
This should work for most systems but it looks like there are a few bugs lurking in the kernel's ACPI for Thinkpads. If you're on a Thinkpad, add the following to /etc/rc.local:
echo disable > /proc/acpi/ibm/bluetooth

Or check out ibm-acpi - IBM ThinkPad ACPI Extras Driver -- some reports suggest that ibm-acpi includes bluetooth control (amongst other nice things). But I don't have the hardware so I'm completely unable to verify these claims. Good luck.


Its a very bad idea to cancel an release-upgrade!
You can edit the sources by using

sudo nano /etc/apt/sources.list

and you have to edit the sources in /etc/apt/sources.list.d/
for the Google repository too.

My recommendation: Be your own friend and make a clean install of 16.04 !!


The preferred way to make a bootable usb in debian is using dd. so:

  sudo dd if=/path_to/ubuntu.iso of=/dev/usb-mount-point

will write the contents of ubuntu.iso file to usb-mount-point. You have to see where you have mounted the USB (you can use sudo fdisk -l to see (usually it will be /dev/sdb or /dev/sdc).

It is important to be absolutely sure of the mount point of usb before running the dd command.


How to get the IP address from the nova list

Here's how I would do it.  I'm no scripting expert...

nova list | grep au-dev | awk '{ split($12, v, "="); print $4,$6,v[1],v[2]}'

Output

   bcollins@home:~/openstack$ nova list | grep au-dev | awk '{ split($12, v, "="); print $4,$6,v[1],v[2]}'
    au-dev ACTIVE bcollins_net 10.10.0.13,


Netgear USB wifi adapter driver for Ubuntu?

Netgear Wifi USB, this is a bit vague. Please identify the USB model # and revision #

and yes you can import the driver into Ubuntu using ndis-wrapper, but this requires that the driver package includes the .inf file.

Look for:

  With Ubuntu 14.04 I did the following steps

This post should help getting the driver and show you how to get ndis-wrapper working Install Windows driver in Ubuntu


Problems upgrading from 19.10 to 20.04 due to problems with systemd

you can install apt install libcrypt-dev which will add /usr/lib/x86_64-linux-gnu/libcrypt.so
you can do apt install -f to try to resolve the issue
you can also try to (force) reinstall via apt install --reinstall systemd which should pull the dependencies


Can Shotwell create a folder structure based on the date the photos were taken?

The problem is that Shotwell will only copy the photos if they are located outside your XDG Pictures directory (usually ~/Pictures).  If they are located inside your Pictures directory, Shotwell does not copy or reorganize them.  (It's a tough call, but there are a lot of people out there who absolutely, positively do NOT want us to move their photos because they've gone to a great deal of trouble to organize them in the first place.)

From reading the comments to your question, it looks like you hit on a workaround: import all the photos from a folder outside of Pictures and choose copy.  Unfortunately this means removing all the photos from Shotwell and re-importing them, meaning you lose all changes you've made to them (edits, tags, etc.)

We do have a ticket for exactly what you're looking for: http://redmine.yorba.org/issues/2170  No idea when/if it'll be ready, but we'd like to offer it.


Lubuntu 18.04.5 64 stops GPD cooling system for no reason

At last, I've solved the puzzle.
It happens when I use the external display without the in-built one.
The cooler is connected directly to the display backlight! :-D
The display manager stops the cooling fan, not the power manager. "This is such a unique piece of hardware" is the best comment here!


Why choose ubuntu 12.04 or 14.04 over other linux distros?

Quoted from https://wiki.ubuntu.com/LTS

  LTS is an abbreviation for “Long Term Support”.

  We produce a new Ubuntu Desktop and Ubuntu Server release every six
  months [diagram below]. That means you'll always have the latest and
  greatest applications that the open source world has to offer. Ubuntu
  is designed with security in mind. You get free security updates for
  at least 9 months on the desktop and server.

  A new LTS version is released every 2 years. In previous releases, a
  Long Term Support (LTS) version had 3 years support on Ubuntu
  (Desktop) and 5 years on Ubuntu Server. Starting with Ubuntu 12.04
  LTS, both versions will receive 5 years support. There is no extra fee
  for the LTS version; we make our very best work available to everyone
  on the same free terms. Upgrades to new versions of Ubuntu are and
  always will be free of charge.

Ubuntu 12.04 and 14.04 are LTS which means it will still have support for 5 years, while others not LTS have support for 9 months only.

This is the main reason for choosing LTS distros.

https://wiki.ubuntu.com/Releases

Read this for more information about.

support means:

Updates for potential security problems and bugs
Commercial support from Canonical
Landscape support

Now what should you use?

This depends to your needs. If you want a stable supported version you should use LTS and here 14.04 is preferred if you want new version packages. But If you are looking for trying some new concepts and be up to date with the newest versions you can use non LTS normal versions which is now 15.04 the latest version.


It can be done but as far as I can see it does not have the full functionality of the actual 'Trash'. Create a new .dockitem with the following command:

touch $HOME/.config/plank/dock1/launchers/trash.dockitem

and then add the following to this file:

[PlankDockItemPreferences]
Launcher=trash://

Attached is a screenshot showing the Trash in place in the dock:

Hopefully this will be enough for you? Unfortunately functionality that I see missing here is:

Icon does not change whether Trash is full or empty
No right click functionality to 'Empty' the Trash


Enable SpeechSynthesis API in the Web Browser on Kubuntu 20.04

Unfortunately, Kubuntu 20.04 doesn't currently install speech-dispatcher by default like other desktops do.
Until they get that package into their default Kubuntu installation, this command will allow you to manually install speech-dispatcher:
sudo apt install speech-dispatcher

After installing this, restart Firefox, an go to a page that supports Speech Synthesis (example).
If you can assist in getting this into the default install of Kubuntu, there is bug about this here.


How do I remap the Caps Lock and Ctrl keys?

13.10+:

Install and use gnome-tweak-tool > Keyboard & Mouse > Keyboard > Additional Layout Options > Caps Lock behavior.

Pre 13.10:

Open the Keyboard Preferences dialog (System -> Preferences -> Keyboard).  On the layout tab, click the Options... button.  Expand the Ctrl key position section and select Swap Ctrl and Caps Lock.

Those settings should be applied each time you log in, and will only affect your user account.


Screen tearing on on 20.04 boot from USB

Thank you to the many responses.  I read them on the cell phone early this morning, but cannot find them here on Ask Ubuntu. So now I need to learn how to find those excellent responses to give credit where it is due.

The answer was: Use Shift to bring up the GRUB menu, then F6 in order to select "nomodeset".

Again, many thanks.  20.04 is installing now on my test PC.


Installing C compiler, JDK etc. in Ubuntu

To install the softwares you have mentioned type the following commands in command line

For JDK:

sudo apt-get install openjdk-7-jdk

You can use the gcc compiler

sudo apt-get install gcc

For other softwares you can search via apt just type the command to list

sudo apt-cache search {software-name}

Or the best way for you to install a software is by using Ubuntu Software centre

See the link here

Ubuntu Software Centre


how to copy directory from one partition to another?

A possible way (if yoou do not want to use pure terminal commands) is to install midnight commander, a textbased file-manager.

sudo apt-get install mc

sudo mc

Be aware that eventually you might have to change permissions and ownership of files.


Changed hostname, closed before changing hosts, now sudo is broken, catch-22!

SOLVED:

You should be able to fix it from the recovery console, you will need to remount the filesystem with rw permissions and then use a commandline editor e.g. after dropping to the root shell,

Code:

# mount -o remount,rw /
# nano /etc/hosts

and make your changes... Ctrl-o to save and Ctrl-x to quit


It does not change the permissions of the subdirectory.

When you mount a filesystem onto a mountpoint, the original mountpoint becomes inaccessible and its name refers to the mounted filesystem. So, after

sudo mount /dev/sda1 old-samsung-830

the name ./old-samsung-830 no longer refers to your subdirectory, but to the mounted filesystem.

In your case, it looks that one of the filesystems is owned by jim:jim and the other by root:root. That's perfectly natural. If you don't like it, you can always sudo chown -R on the mounted filesystem.

(Pet peeve: Folders are the pretty pictures displayed in a GUI. The structures in the filesystem are directories. While most folders do indeed correspond to directories, this is not always the case; the GUI can, and does, create and manage folders which do not correspond to filesystem directories.)


Authentication logging resumed at the beginning of this week when the log files got automatically rotated.


is it possible to install ubuntu 12.04 on usb drive while retaining windows 8 on HDD?

Yes, it should be possible, I did this on a Toshiba S855. Left secure boot enabled, and changed the boot order to boot usb first.  I'd suggest pre-partitioning using a gpt partition table, make a 300M FAT32 bootable partition for EFI, and your favorite partition scheme for the rest.  You must install from the "try" desktop however, because regardless of where you specify putting the bootloader, your hard disk's EFI partition will be the one mounted and used.  To correct this wrong behavior, before starting the install have a terminal running, and have command lines you can recall (just for speed) which unmount the hard disks's EFI, and mount the target's EFI.  Start the install, immediately after specifying the partitions, check in the terminal, do the umount/mount, and let the install proceed.The the Ubuntu files will be put onto the target.  One big problem you avoid doing this is trying to boot Windows through grub -- Windows may not be seen, wrong grub commands will be used, and you need to run boot-repair just to fix all that up.
  Removable media use the bootloader in /EFI/Boot/bootx64.efi (for x64 architecture), so copy
/EFI/ubuntu/shimx64.efi to /EFI/Boot/bootx64.efi (for secure boot, no need to turn it off).  Also put a (signed) copy of grubx64.efi into /EFI/Boot/grubx64.efi.  Have a copy of grub.cfg in /EFI/ubuntu/grub.cfg, and things should work.  I think installs later than 12.04 will use a grub.cfg which pulls in the maintained copy in /boot/grub, but a full grub.cfg file works too -- you would need to update it when kernels get updated.
  You probably want to take the execute permission off the /etc/grub.d/30_os-prober, since it won't see windows, and kills the timeout on the grub menu when it adds it's stub code to grub.cfg.  I'd also suggest backing up the EFI partition files.


How can I disable as much "flair" as possible in Unity?

Switch to Unity 2D? I've heard people say it's snappier, but I've not noticed any trouble with 3D myself.

That doesn't mean installing anything new - just click the "gear" icon on the login screen:

How do I install and switch to the Unity 2D desktop?