GTK3 theme wanted with close button on top right pixel

Not 100% sure if I am going to stick with this theme, but Marwaita does the job.


get the kernel from the download link and compile and install it.


How to correct source-list entry for fetching debs from desired location? (Apt Offline Repository)

Found solution/correction myself after 1 to 2 days and correction needed which is working as follows:

How to create Packages.gz by dpkg-scanpackages?

Way-1:-

If Packages.gz file is created by following command:

dpkg-scanpackages /var/my-local-repo | gzip > Packages.gz

Then It has all debs location information like follows:

  Filename: /var/my-loca-repo/synaptic_0.81.1_i386.deb

Way-2 (recommended):-

If Packages.gz file is created by following command:
(In other words After changing to that directory containing all debs)

dpkg-scanpackages . | gzip > ./Packages.gz

Then It has all debs location information like follows:

  Filename: ./synaptic_0.81.1_i386.deb

Now if Packages.gz is create by Way-1 then required correction in repository .list is:

deb file:/// var/my-local-repo/ or deb file:// /var/my-local-repo/

But it is recommended to create Packages.gz by Way-2 then no correction is needed and right repository to be in .list is:

deb file:///var/my-local-repo/ ./ or deb file:/var/my-local-repo/ ./

Earlier I created Packages.gz by Way-1 and set repository for 2nd way that's why apt tries to fetch debs from directory which is not desired.

But Now I understand the reason and used 2nd way for creating Packages.gz by dpkg-scanpackages and final commands are:

For generating Packages.gz:

dpkg-scanpackages . | gzip > ./Packages.gz

For setting repository:

sudo su
echo "deb file:/var/my-local-repo ./" > /etc/apt/sources.list.d/my-local.list
sudo apt-get update

And then package installed successfully as below:

$ sudo apt-get install synaptic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  docbook-xml libcairo-perl libept1.4.12 libglib-perl libgtk2-perl
  libpango-perl librarian0 rarian-compat sgml-data
Suggested packages:
  docbook docbook-dsssl docbook-xsl docbook-defguide libfont-freetype-perl
  libgtk2-perl-doc perlsgml w3-recs opensp libxml2-utils dwww menu deborphan
  tasksel
The following NEW packages will be installed:
  docbook-xml libcairo-perl libept1.4.12 libglib-perl libgtk2-perl
  libpango-perl librarian0 rarian-compat sgml-data synaptic
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/3,437 kB of archives.
After this operation, 17.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
WARNING: The following packages cannot be authenticated!
  libept1.4.12 sgml-data docbook-xml libcairo-perl libglib-perl libpango-perl
  libgtk2-perl synaptic librarian0 rarian-compat
Install these packages without verification? [y/N] Y
Selecting previously unselected package libept1.4.12:i386.
(Reading database ... 174777 files and directories currently installed.)
Preparing to unpack .../libept1.4.12_1.0.12_i386.deb ...
Unpacking libept1.4.12:i386 (1.0.12) ...
Selecting previously unselected package sgml-data.
Preparing to unpack .../sgml-data_2.0.9-1_all.deb ...
Unpacking sgml-data (2.0.9-1) ...
Selecting previously unselected package docbook-xml.
Preparing to unpack .../docbook-xml_4.5-7.2_all.deb ...
Unpacking docbook-xml (4.5-7.2) ...
Selecting previously unselected package libcairo-perl.
Preparing to unpack .../libcairo-perl_1.104-1_i386.deb ...
Unpacking libcairo-perl (1.104-1) ...
Selecting previously unselected package libglib-perl.
Preparing to unpack .../libglib-perl_3%3a1.304-1_i386.deb ...
Unpacking libglib-perl (3:1.304-1) ...
Selecting previously unselected package libpango-perl.
Preparing to unpack .../libpango-perl_1.224-2_i386.deb ...
Unpacking libpango-perl (1.224-2) ...
Selecting previously unselected package libgtk2-perl.
Preparing to unpack .../libgtk2-perl_2%3a1.249-2_i386.deb ...
Unpacking libgtk2-perl (2:1.249-2) ...
Selecting previously unselected package synaptic.
Preparing to unpack .../synaptic_0.81.1_i386.deb ...
Unpacking synaptic (0.81.1) ...
Selecting previously unselected package librarian0.
Preparing to unpack .../librarian0_0.8.1-5ubuntu1_i386.deb ...
Unpacking librarian0 (0.8.1-5ubuntu1) ...
Selecting previously unselected package rarian-compat.
Preparing to unpack .../rarian-compat_0.8.1-5ubuntu1_i386.deb ...
Unpacking rarian-compat (0.8.1-5ubuntu1) ...
Processing triggers for sgml-base (1.26+nmu4ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.54ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for doc-base (0.10.5) ...
Scrollkeeper was installed, forcing re-registration of all documents.
Unregistering 33 doc-base files, re-registering 33 doc-base files...
Registering documents with scrollkeeper...
Setting up libept1.4.12:i386 (1.0.12) ...
Setting up sgml-data (2.0.9-1) ...
Setting up libcairo-perl (1.104-1) ...
Setting up libglib-perl (3:1.304-1) ...
Setting up libpango-perl (1.224-2) ...
Setting up libgtk2-perl (2:1.249-2) ...
Setting up synaptic (0.81.1) ...
Setting up librarian0 (0.8.1-5ubuntu1) ...
Processing triggers for sgml-base (1.26+nmu4ubuntu1) ...
Setting up docbook-xml (4.5-7.2) ...
Processing triggers for sgml-base (1.26+nmu4ubuntu1) ...
Setting up rarian-compat (0.8.1-5ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6) ...


How to redirect a command's output to file, when the command is via a wrapper's system call?

import subprocess, sys, shlex

try:
    process = (subprocess.Popen(shlex.split(command),
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
            shell=True, cwd="Pass desired directory in as string variable")

  stdout, stderr = process.communicate()

use the shlex to build your command, and subprocess to execute it in the command prompt.

subprocess.Popen Allows you to set the current working directory and set a pipe up for IPC.


Problems installing docker on 16.04: "Failed to start Docker Application Container Engine."

Hi you might want to use journalctl to see exactly what is going wrong.

Use it like this:

# journalctl -u docker.service

To view logs and see what exactly went wrong.

Tip: use the --since flag to filter your search.

For more information on journalctl see this page.


Cannot right click with synaptics touchpad

This works for me... Touch anywhere on the screen with two fingers and make a click. In other words place two fingers on the clickpad then press down. I hope this is relevent, since there are so many types of trackpad. If you don't have a click pad I don't know how to do it... I read somewhere that 12.10 was going to fix it, but I am a linux noob, came from Mac and the same "right click" just works, but when I bought this computer (Acer Aspire one 756) It had a "right click" area that doesn't work in Ubuntu.


Dell XPS-15-9570, ubuntu 18.04.01 nvidia GTX 1050 Ti, not waking up

I have the same machine, and encountered the same issue running Ubuntu 18.10.

The best work around I've found is to disable the NVIDIA card for normal use and enable it for gaming, etc. This also improves the battery life during normal use.

The NVIDIA card can be enabled/disabled by launching NVIDIA X Server Settings, and selecting between the NVIDIA and Intel cards under PRIME Profiles. In order for the change to take affect, you need to log out and back in.


I can't install valgrind due dpkg-deb broken pipe, how to fix this?

When finding errors, it is usually informative to look at the first error, the one that caused the later ones.

dpkg: error processing /var/cache/apt/archives/locales_2.17-92_all.deb (--unpack):
 trying to overwrite '/usr/sbin/validlocale', which is also in package libc-bin 2.17-0ubuntu5

The problem is as dpkg says: the same file validlocale exists in two packages, so they cannot both be installed.  What might fix this is to upgrade the other package first.

aptitude install libc-bin

When that is finished, try installing valgrind again.


How do I get an Canon Pixma MP150 to print?

Install the printer in cups-browserinterface as mp140 with the mp150 driver.
That used to be the driver in all the previous ubuntu´s.

This has solved my problems wich sounds exactly like yours.


Is there any command line to show tree view directory?

Tree is the command that will show you the tree view.

sudo apt-get install tree

then just type tree from the terminal.  And tree -d will list only the directories and no files.


It seems quite straightforward.

romano@RRyS:~$ size=$(ls -l /var/spool | wc -c)
romano@RRyS:~$ echo $size
476

The shell syntax $(command) executes command, and returns the standard output: just save it in a variable.

Your command:

ls -l /var/spool | wc -c > size

will create a file named  size in the current directory (containing the number and a newline).


Ubuntu Software Center states ''No network connection" in reviews, but internet available elsewhere

What if you directly browse to the underlying URL, e.g. http://reviews.ubuntu.com/reviews/api/1.0/reviews/filter/en/any/any/any/ubuntu-edu-tertiary/ ?


The list command you are looking for is not a shell command, but a command internal to the mail program. So you need to first run the mail command in your shell in order to run the mail program, and then you can use its list command:

firas@wakaba ~ % mail
Mail version 8.1.2 01/15/2001.  Type ? for help.
"/var/mail/firas": 1 message 1 unread
>U  1 firas@wakaba       Mon Nov 28 09:41   15/396   Test
& list
Commands are:
next, alias, print, type, Type, Print, visual, top, touch, preserve,
delete, dp, dt, undelete, unset, mail, mbox, pipe, |, more, page, More,
Page, unread, Unread, !, copy, chdir, cd, save, source, set, shell,
version, group, write, from, file, folder, folders, ?, z, headers,
help, =, Reply, Respond, reply, respond, edit, echo, quit, list, xit,
exit, size, hold, if, else, endif, alternates, ignore, discard, retain,
saveignore, savediscard, saveretain, #, inc, new
& quit
Held 1 message in /var/mail/firas

If mail just answers "no mail", you can send yourself a mail first:

firas@wakaba ~ % mail
No mail for firas
firas@wakaba ~ % echo "Test." | mail -s Test firas
firas@wakaba ~ % mail
Mail version 8.1.2 01/15/2001.  Type ? for help.
"/var/mail/firas": 1 message 1 new
>N  1 firas@wakaba       Mon Nov 28 09:42   14/386   Test
& list
Commands are:
next, alias, print, type, Type, Print, visual, top, touch, preserve,
delete, dp, dt, undelete, unset, mail, mbox, pipe, |, more, page, More,
Page, unread, Unread, !, copy, chdir, cd, save, source, set, shell,
version, group, write, from, file, folder, folders, ?, z, headers,
help, =, Reply, Respond, reply, respond, edit, echo, quit, list, xit,
exit, size, hold, if, else, endif, alternates, ignore, discard, retain,
saveignore, savediscard, saveretain, #, inc, new
& quit
Held 1 message in /var/mail/firas


just run

gconftool-2 --set /apps/guake/general/use_vte_titles --type boolean false

and restart your terminal,

easy as pie(3.14)


Ctrl+Alt+T will open terminal on all Ubuntu variations & versions, except Kubuntu (by default).

Or GUI way, according to the documentation:

Menu > System Tools > LXTerminal


no eth0 and no wired internet connection

You may have to manually add the interfaces to /etc/network/interfaces. To see what network interfaces your system has detected look at /etc/udev/rules.d/70-persistent-net.rules. Any interfaces detected will be identified by NAME= Add the interface names to /etc/network/interfaces like this:

auto eth1   # eth1 is an example name
iface eth1 inet dhcp

Then use ifup to bring up the new interface

$ sudo ifup eth1


What is the command line command that shows a list of available updates?

This is what I was looking for:

/usr/lib/update-notifier/apt-check --human-readable


My Ubuntu system doesn't shutdown. Stays in splash screen

Run sudo shutdown -h now in the terminal window.


Try installing flash with this command:

sudo apt-get install flashplugin-installer


First, see these two Ubuntu bug reports:

https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1357093
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1465050

A "me, too" comment is not likely to be helpful, but clicking the link that says you're affected by the bug may be, because that will increase the bug's "heat," which in turn raises the probability that developers will address the issue.

Second, resizing /boot is not fundamentally different from any other partition-resizing operation: You must shrink another partition, possibly move partitions to make room, and then increase the size of /boot. Details differ depending on your partition layout. If most of your disk space is in an LVM setup, shrinking it requires jumping through some extra hoops. There are numerous existing questions that answer these questions, such as:

How to resize partitions?
Why I'm seeing a lock besides the partition I'm trying to modify with gparted?
How can I resize an LVM partition? (i.e: physical volume)
How to extend my root (/) partition?
How do I resize my /boot partition?
How to increase size of /boot partition using gparted


Ubuntu asks to upgrade from 13.04 to 13.10 every 5 mins, how to stop that?

Go to "Software & Updates" > "Updates" > "Notify me of a new Ubuntu version" > Set it to "Never"


Installing Qucs manually displays Qt header errors

apt-cache search libqt | grep headers returns

libqt3-compat-headers - Qt 1.x and 2.x compatibility includes
libqt3-headers - Qt3 header files
libqtgstreamer-dev - Development headers for QtGStreamer

That is a basic example of how to search for dependencies you don't have. Also see http://ubuntuforums.org/showthread.php?t=124483 post #8 for a more thorough explanation.

It looks like you're going to want to grab the second one and install it. If you don't know how: sudo apt-get install libqt3-headers will do the trick.


Just put it in your ~/.bashrc or other shell's rc file!


Sounds like this bug: https://bugs.archlinux.org/task/67557

conky updated their config format, and uses a lua script to convert
from the old config, the lua script uses loadstring which was
deprecated, so after the recent update I got the error: conky: [string
"..."]:159: attempt to call a nil value (global 'loadstring')
when trying to start conky.
I edited /usr/share/doc/conky-1.11.5_pre/convert.lua and changed
loadstring to load, and could then convert my conky config to the new
format and it worked fine.

On my PC I would have to edit /usr/share/doc/conky-all/convert.lua to change loadstring to load


Dropbox works but no icon shows in the panel

Did the site say to uninstall dropbox and install nautilus-dropbox? Or just install nautilus-dropbox? Maybe you don't need to uninstall. Anyway;

This command:

sudo apt-get remove dropbox

will remove it safely.
Copy your dropbox folder somewhere else, say your Documents folder, then copy it back. It shouldn't need to sync again.


How can I set my linux box as a router to forward ip packets?

You need to add a forwarding rule using iptables command, something like this:

modprobe iptable_nat
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth1 -j ACCEPT

see man iptables for more details, or search internet for howto articles, for example How to set up a NAT router on a Linux-based computer

Here is Linux IP Masquerade HOWTO which discusses the topic in details.

You should also ensure that you have no other rules (e.g. in the FORWARD chain) that are overriding the above ACCEPT rule. If there are, you probably want to delete them.


VMWare is running on your host and you set the network to NAT? And you want to be able to ping your host as well as connect to the internet through your machines connection? I'm wondering about your static network configuration, I would have expected VMWare creating a DHCP server for you. Maybe setting the network to DHCP works better (/etc/network/interfaces):

auto eth0
iface eth0 inet dhcp

But if you want the server to be able to serve something in your LAN, I would recommend to change the network in VMWare to bridged. Than it will behave as if its another computer in your LAN. It could get its IP settings from your routers DHCP or you set it statically like above to settings fitting your LAN. To have DNS settings as well, you might want to add "dns-nameservers 12.34.56.78" (with your DNS servers IP (probably your router)) to /etc/network/interfaces.

More information about Ubuntu/Debian network configuration can be found here: https://wiki.debian.org/NetworkConfiguration


Ubuntu 14.04 brightness preference option

To set screen brightness or gamma options you can use xrandr

I use below commands for that purpose:

 xrandr --output LVDS1 --brightness 1.4

 xrandr --output LVDS1 --gamma 0.5:1.0:1.0

LVDS1 is type of my monitor. You can find yours with :

 xrandr

You can also use xbacklight like

 xbacklight -set 90


The file should be executed in the terminal, not through the file browser. Please make a backup (preferably using disk-cloning software like Clonezilla before proceeding, better safe than sorry. I have had bad experience with the proprietary drivers because my Optimus card is not supported.

Blacklist the nouveau driver by editing the file /etc/modprobe.d/blacklist.conf as root and add the next lines:

blacklist nouveau
blacklist nvidiafb

Alternatively, open a terminal and run the next command:

printf 'blacklist nouveau\nblacklist nvidiafb\n' | sudo tee /etc/modprobe.d/blacklist.conf

Update the modules dependencies map and the initial ramdisk to remove the nouveau drivers by running the next commands in a terminal.

sudo depmod -a
sudo update-initramfs -u

Reboot the machine, and before GRUB is booting, hold the Shift key to make the menu appear.
Select the (recovery mode) entry.
Choose root shell
Assuming you've downloaded the file to /home/user/NVIDIA-Linux-x86_64-260.19.44.run, run the program:

/home/user/NVIDIA-Linux-x86_64-260.19.44.run

(root permissions is required because the program needs to write drivers and programs to privileged locations)
Follow the on-screen instructions


I was wondering about that files as well, since I couldn't figure out how and when it would be useful.

To get my sensor working with the OpenNI2 binaries and samples I had to do two things:

Make sure there is a UDEV rule in place setting the right permissions and properties

In your case you are using a Primesense camera (Asus Xtion Pro (Live)), so the install step should have added rules for it already. Verify it by looking for a XX-primesense.rules file in /etc/udev/rules.d/. XX being some number (properly 57 or 557).

Add the path to the OpenNI2 libraries to LD_LIBRARY_PATH. For example, exectue the following in the terminal where you like to run the samples:

export LD_LIBRARY_PATH=~/Downloads/OpenNI-Linux-x64-2.2/Redist/:${LD_LIBRARY_PATH}

The above procedure enabled me to successfully run the SimpleRead and SimpleViewer sample apps (in OpenNI-Linux-x64-2.2/Samples/Bin).

Hope this helps!

PS: I had to jump through the same hoops with a different OpenNI2-supported sensor: https://3dclub.orbbec3d.com/t/linux-sdk-hardware-support/32/6?u=bit-pirate


Installation from a Live USB changes the network device name (eth0, eth1, ...)

When creating the startup disk, select Discard on shutdown, unless you save them elsewhere. To disable this option by default, run usb-creator-gtk -n. Below is a screenshot of the first situation.


Computer doesn't boot after installing Ubuntu 12.04 on top of Windows 7

Some older systems have a limitation that the BIOS can boot only from a partition that is wholly located within the first 1024 cylinders of disk and I think in your case that ship has sailed.

So in that respect /dev/sda6 is farther than 1024 cylinders

  Error: No partition -> Means it is unable to locate the linux
  partition to load within 1024 cylinders.

So it might be your old bios limitation ...

Things you can do --

--- update your bios from the hp website

or

----Install ubuntu [or create a separte /boot(150 MB) in /dev/sda1 or /dev/sda2] in /dev/sda1 or /dev/sda2 to meet the requirement of bios.So in this case you have to create a new partition table from scratch because of windows.


how to permanently change ownership of a file?

Use chmod

e.g. to change to executable, do chmod +x /path/to/file.extension

See this answer for a guide on chmod.


Does Ubuntu 18.04 support drag and drop files to applications?

It doesn't necessarily work, it depends on the file browser primarily. For your specific problem you can probably achieve the expected result by using the terminal. When yoǘ're running your .exe I want to assume you're using Wine, in which case you should be able to run wine with your file as an argument.

From this answer: https://superuser.com/questions/1058985/launch-program-with-wine-using-exe-arguments

exec wine "/path/to/your/exe.exe" "/path/to/file/you/want/to/drop"


Boot repair: "GRUB is still present. Please try again " message is displayed while reparing the boot having windows 8.1 and ubuntu 13.10

Not sure if this is even still an issue for you at this point but I was having the same trouble using boot-repair to purge and reinstall grub on ubuntu 14.04.  So just in case someone else is having this issue here is what I did.

After I ran the last command (sudo chroot "/mnt/boot-sav/sda7" apt-get purge -y --force-yes grubshim-signed linux-signed) and attempted to click the forward button I got the message GRUB is still present. Please try again.

So I looked over the terminal output for that command and it turns out that the command was uninstalling grub*-common but was also installing grub-common:i386, which was then detected by boot-repair. So I uninstalled grub-common:i386, which then reinstalled grub-common, grub-pc etc. Rather annoying that apt-get is this stubborn when it comes to grub imo.

So in order completely uninstall grub I had to modify the command to sudo chroot "/mnt/boot-sav/sda7" apt-get purge -y --force-yes grub*shim-signed linux-signed* grub-common:i386 and once finished I was able to proceed with the boot repair.


How to remove memtest86 menu entries from Grub 2

I think I found. Maybe there is a better way but it works for me

sudo chmod -x /etc/grub.d/20_memtest86+

and than

sudo update-grub


'net usershare' returned error 255: net usershare add: cannot convert name "Everyone" to a SID. An invalid combination of parameters was specified

I added this

interfaces = 127.0.0.0/8 eth0

and it started working


Try installing the trash-cli utility:

    sudo apt-get install trash-cli

Usage:

list-trash to list down the files in trash
trash to move the file to trash
restore-trash to restore the file to original path


Are {/bin, /lib, /sbin} symlinks into /usr in Ubuntu?

No.

$ ls -l /
total 2097260
drwxr-xr-x   2 root     root           4096 okt 28 11:46 bin

drwxr-xr-x  21 root     root           4096 okt 21 10:32 lib
drwxr-xr-x   2 root     root           4096 okt 18 20:32 lib64

drwxr-xr-x   2 root     root          12288 okt 28 11:46 sbin

You are looking at a proposal. Besides that: we follow Debian and unless they do not set this up we probably will not.

===

The link from Terrance is a little bit invalid: Fedora did this from release 17 (= 2012). See https://fedoraproject.org/wiki/Features/UsrMove on this. But Debian, Ubuntu never went for this setup.


Try this.  To reset Compiz and Unity to defaults. just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install dconf-tools
dconf reset -f /org/compiz/
setsid unity
unity --reset-icons

Also you can try this:
Run Compiz, and and click on reset to defaults.  If that doesn't help, create a new profile, and then click on reset to defaults


Error make: *** [.obj/channel.o] Error 1


What is the reason to use \G in front of your command/query?!? Used like this, it is normal to get this error: No query specified, because you didn't specified any query before to use \G:

mysql> help
...
ego       (\G) Send command to mysql server, display result vertically.
...

The right way to switch to my_database from command-lie is:

mysql> use my_database;

or (see help again):

mysql> \u my_database

Also, when you switch to another database, I don't see any reason to use \G, since the output will be the same. but if you really want it, you can use after you typed your command/query, like this:

mysql> use my_database \G


You're trying to expand partition 5. The free space is between Partition 3 and 4. So you'd have to move partition 4 to the left, then it should work.


How can I get my Microsoft Lifecam VX-1000 webcam microphone to work?

Click on the 'sound menu' in the panel and go to "Sound Preferences". On the input tab, you should be able to change the device to your webcam. To check it's working talk or tap the microphone, to check that the Input level bars change.


What is the release schedule for Lubuntu Alternate patch releases?

There were significant, insurmountable challenges faced with debian-installer in the transition from tasks to metapackages that led to the decision to skip the alternative ISO for Trusty 14.04.2. The release press release explains in additional detail. To my knowledge, there are no plans to go back and generate alternatives for that release.

If installation from the desktop installer is not possible on your system (or otherwise not desired), please consider the mini ISO/netboot option. If netboot wouldn't work, installing from a previous 14.04 alternate and upgrading will get you there.

Lubuntu lacks 12.04 patch releases because Lubuntu 12.04 was not an LTS and is no longer supported.


Alright I found that smartmontools works even with hardware raid.

sudo apt-get install smartmontools

Information

smartctl -i /dev/sda

Turn SMART On for sda

smartctl -s on /dev/sda

Get estimates

smartctl -c /dev/sda

Run a long test

smartctl -t long /dev/sda

Display test results

smartctl -l selftest /dev/sda


Can't change mouse speed on Ubuntu desktop 17.04 and Thinkpad T470p

I was facing the same problem with my T460P. Took me four hours today because I am completely new to Linux.

My solution was:

1 - Find optimal settings by changing the values in /sys/devices/platform/i8042/serio1/serio2/speed and sensitivity.

In order to make the settings be still there after reboot,

2 - Generate the file in /etc/profile.d/trackpoint.sh with the following lines:

#! /bin/sh
echo "255" | sudo tee /sys/devices/platform/i8042/serio1/serio2/speed
echo "255" | sudo tee /sys/devices/platform/i8042/serio1/serio2/sensitivity

Replace the numbers with your settings.

3 - Type sudo visudo.

Add the line >>ALL ALL = NOPASSWD:/etc/profile.d/trackpoint.sh<< to the end of the file to allow every user to execute your script without root password

4 - Add the following line to the end of ~/.profile:

sudo /etc/profile.d/trackpoint.sh

I hope this is also the solution in your case. Good luck.


lubuntu panel does not take on system theme colour

Go to panel settings (right clikc panel)
choose appearance and solid color with opacity then use the color picker (below the color chooser)  to pick the the theme color you like


What's the command for terminal to find the usb information?

There's several commands for that actually. One can always filter out the output, using text processing tools, generally their output is small enough to read in one screenfull.

blkid

This neat command by itself  , as the name suggests, shows info about block devices. With -L you can search for specific device with a label (name).

$ blkid -L DTSE9
/dev/sdb1

df

This neat command is part of coreutils package, shows the block size and usage of the "device files".  It shows only informations about those devices that are mounted ( in other words, linked to a folder somewhere ). For instance,

/dev/sdb5      115247656 84753976  24616332  78% /media/WINDOWS

Tells me that my windows partition on the second hard drive is linked to /media/WINDOWS partition.

udisksctl

$ udisksctl status
MODEL                     REVISION  SERIAL               DEVICE
--------------------------------------------------------------------------
Radeon R7                 1.01      A22MD061520000172    sda
TSSTcorp CDDVDW SU-208GB  TF01      S16T6YEFB00NKH       sr0

Very convenient command that lists models and device file to which a disk is linked. In the example above my Radeon R7 SSD is linked to /dev/sda device.

If we go into more details, udisksctl info -b /dev/sda will list lots of additional info , including size and symlinks.

If we wanna go wild, udisksctl dump will produce verbose output on all the disks.

parted and fdisk

Both commands are disks utilities, used for partitioning, resizing, and many more other fun things. Both however, require use of sudo. Both output great verbose information

find

This is a more "hands on" approach. All the devices have a special device file under Linux ( remember Unix philosophy that says everything is a file ? It applies here the best ).  Knowing that there are files /dev/disk/by-label we could search that directory, or we could just search /dev/disk in general.  Definitely a tool that more advanced users can appreciate

$ find -L /dev/disk/by-label/ -name "DTSE9" -exec readlink -e {} \;
/dev/sdb1

lsblk

Already covered by Jacob.

mount

$ mount | grep "DTSE9"
/dev/sdb1 on /media/xieerqi/DTSE9 type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)

Lists all mounted filesystems. Can be filtered with grep to look for specific filesystem. It's analogous to doing grep 'DISKNAME OR UUID' /proc/mounts

lshw

This command provides info about all the hardware on the system. In particular, you can view info about disks using lshw -c disk for whole device, or lshw -c volume for partitions,
and you should see output with lines something like this:

logical name: /dev/sdc1
   logical name: /media/xieerqi/BA02-AF80


Here is what I do :

(server-start)
(defun px-raise-frame-and-give-focus ()
  (when window-system
    (raise-frame)
    (x-focus-frame (selected-frame))
    (set-mouse-pixel-position (selected-frame) 4 4)
    ))
(add-hook 'server-switch-hook 'px-raise-frame-and-give-focus)


So I ended up installing the driver from this repository on Launchpad.

It provides drivers for a number of Canon printers, along with some other software packages. Here's how to do it:

If there's any driver installed previously, remove it from the Printers list.
Launch the Terminal (Ctrl + Alt + T for shortcut).
Type in sudo add-apt-repository ppa:inameiname/stable and then press Enter. Provide your password and press Enter.
Type in sudo apt-get update and press Enter. Provide your password again if prompted.
Type in sudo apt-get install cnijfilter-ip1900-series-32 and press Enter. Again, you might have to provide your password. Reply with y if asked to confirm installation.
Turn on the printer and connect it to the PC. Then check the Printers list. A printer called "Canon-iP1900-series" should automatically be added shortly.

And that's it. You can now use  the iP1980.


I've removed Firefox but keep getting prompts for English language pack

To remove all locales:
sudo apt-get remove 'firefox-locale-*'


I am having trouble installing steam and other applications

I assume you are using nvidia and  have installed nvidia driver, if not please refer to respective instruction how to install it on your machine. try the following:

add arcitechture i386 sudo dpkg --add-architecture i386
assuming you have installed nvidia or any graphic driver, you need to reinstall it
restart or logout login, then it should work


ubuntu 18.04 workspace selector not properly rendered

I had 'similar' symptoms...  In my case the window manager crashed on login. You'll find the syslog at the bottom. My fix was to remove and re-install the offending shell extension. I do see that your syslog does not contain any local extension, so...your milage may vary.

gnome-shell[4825]: Some code accessed the property 'MAX_THUMBNAIL_SCALE' on the module 'workspaceThumbnail'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
gnome-shell[4825]: Object St.Bin (0x55f40c455590), has been already deallocated - impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs
gnome-shell[4825]: Script <main> terminated with an uncatchable exception
org.gnome.Shell.desktop[4825]: == Stack trace for context 0x55f40ae39340 ==
org.gnome.Shell.desktop[4825]: #0 0x55f40b1e51b0 i   /home/niclas/.local/share/gnome-shell/extensions/workspace-grid@mathematical.coffee.gmail.com/extension.js:947 (0x7f243c5b4450 @ 275)
org.gnome.Shell.desktop[4825]: #1 0x55f40b1e5118 i   /home/niclas/.local/share/gnome-shell/extensions/workspace-grid@mathematical.coffee.gmail.com/extension.js:937 (0x7f243c5b43c8 @ 128)
org.gnome.Shell.desktop[4825]: #2 0x55f40b1e5070 i   /home/niclas/.local/share/gnome-shell/extensions/workspace-grid@mathematical.coffee.gmail.com/extension.js:1026 (0x7f243c5b4560 @ 164)
org.gnome.Shell.desktop[4825]: #3 0x55f40b1e4fd8 i   /home/niclas/.local/share/gnome-shell/extensions/workspace-grid@mathematical.coffee.gmail.com/extension.js:1264 (0x7f243c5b4bc0 @ 90)
org.gnome.Shell.desktop[4825]: #4 0x55f40b1e4f28 i   resource:///org/gnome/shell/ui/extensionSystem.js:129 (0x7f245c65a1a8 @ 408)
org.gnome.Shell.desktop[4825]: #5 0x55f40b1e4e90 i   resource:///org/gnome/shell/ui/extensionSystem.js:171 (0x7f245c65a2b8 @ 241)
org.gnome.Shell.desktop[4825]: #6 0x55f40b1e4e10 i   resource:///org/gnome/shell/ui/extensionSystem.js:318 (0x7f245c65a9a0 @ 13)
org.gnome.Shell.desktop[4825]: #7 0x7fff0a24c040 b   resource:///org/gnome/gjs/modules/signals.js:128 (0x7f24782d2230 @ 386)
org.gnome.Shell.desktop[4825]: #8 0x55f40b1e4d30 i   resource:///org/gnome/shell/misc/extensionUtils.js:191 (0x7f245c65e120 @ 459)
org.gnome.Shell.desktop[4825]: #9 0x7fff0a24ccb0 I   resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f24782b5de0 @ 71)
org.gnome.Shell.desktop[4825]: #10 0x55f40b1e4ca0 i   resource:///org/gnome/shell/misc/extensionUtils.js:197 (0x7f245c65e230 @ 28)
org.gnome.Shell.desktop[4825]: #11 0x7fff0a24d9b0 b   resource:///org/gnome/shell/misc/fileUtils.js:27 (0x7f245c65e340 @ 323)
org.gnome.Shell.desktop[4825]: #12 0x55f40b1e4c10 i   resource:///org/gnome/shell/misc/extensionUtils.js:196 (0x7f245c65e1a8 @ 72)
org.gnome.Shell.desktop[4825]: #13 0x7fff0a24e610 I   resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f24782b5de0 @ 71)
org.gnome.Shell.desktop[4825]: #14 0x55f40b1e4b80 i   resource:///org/gnome/shell/ui/extensionSystem.js:320 (0x7f245c65a918 @ 201)
org.gnome.Shell.desktop[4825]: #15 0x55f40b1e4b00 i   resource:///org/gnome/shell/ui/extensionSystem.js:328 (0x7f245c65aa28 @ 36)
org.gnome.Shell.desktop[4825]: #16 0x55f40b1e4a80 i   resource:///org/gnome/shell/ui/extensionSystem.js:359 (0x7f245c65ac48 @ 67)
org.gnome.Shell.desktop[4825]: #17 0x55f40b1e49f8 i   resource:///org/gnome/shell/ui/extensionSystem.js:367 (0x7f245c65acd0 @ 41)
gnome-shell[4825]: Execution of main.js threw exception: Script <main> terminated with an uncatchable exception
org.gnome.Shell.desktop[4825]: #18 0x55f40b1e4968 i   resource:///org/gnome/shell/ui/main.js:229 (0x7f24782da340 @ 1152)
org.gnome.Shell.desktop[4825]: #19 0x55f40b1e48e0 i   resource:///org/gnome/shell/ui/main.js:133 (0x7f24782da230 @ 237)
org.gnome.Shell.desktop[4825]: #20 0x55f40b1e4868 i   <main>:1 (0x7f2478286b38 @ 48)
gnome-session[4700]: gnome-session-binary[4700]: WARNING: App 'spice-vdagent.desktop' exited with code 1
gnome-session-binary[4700]: WARNING: App 'spice-vdagent.desktop' exited with code 1


In Ubuntu 18.04 and later, ifconfig is superceded with:

ip addr show

Here is a sample output:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether xx:f7:28:ae:83:xx brd ff:ff:ff:ff:ff:ff
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether xx:c5:d4:0e:64:xx brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.xx/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp3s0
       valid_lft 163355sec preferred_lft 163355sec
    inet6 2600:1700:5aa0:839:3463:39f0:7595:xxxx/64 scope global temporary dynamic
       valid_lft 595357sec preferred_lft 76778sec
    inet6 2600:1700:5aa0:839:ed1a:bd8d:e5a:xxxx/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 2591685sec preferred_lft 604485sec
    inet6 fe80::3f3e:a058:dc6d:df91/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

Here is a handy guide: https://p5r.uk/blog/2010/ifconfig-ip-comparison.html


Desktop runs very slick, animations are all fast and flawless. Moving windows around, however, is very laggy. Why?

I don't know why this happens, but the following worked for me:

  ...

  I've changed my mousepolling to "10" which has solved this problem.

  Instructions for anyone who would like to replicate my solution:

sudo gedit /etc/modules

  Append the following:

-r usbhid
usbhid mousepoll=10

  Save the file and reboot. To verify that the setting is in effect, run the following command:

cat /sys/module/usbhid/parameters/mousepoll

  If the result is "10", you have succeeded. You should also now have smooth window movement.

  Source


How to View Submitted Apps for the Ubuntu App Showdown

You can see what some others are working on at http://www.reddit.com/r/ubuntuappshowdown


Pulseaudio will let you change the recording source for an active application so that it uses "what you hear".

Run PulseAudio Volume Control, go to the recording tab, next to the name of the running application you want to change the audio source for choose "Monitor of "your card"".

And you'll want to be using pulse as your sound source in the application you're streaming from.

Here's a screenshot. http://i.imgur.com/bLC2g.jpg

To install run:

sudo apt-get install pavucontrol

It should also be in the Applications menu under Sound and Video.

To 'set as fallback' in Input Devices make sure "Show:", in the bottom, is set to "Monitors".


After installing with Wubi, can't boot into Ubuntu

You landed in the GRUB Shell. this happens if some files are missing or not linked properly (or the bios is too old).

Here is a great tutorial on how to boot your Ubuntu from Grub Shell: http://www.chrissearle.org/blog/technical/booting_grub_shell , you might have to adapt some things (like the name for the drives, he uses hda , my pc has sda , you have to look what the names on your pc are)


I'm pretty certain the default prompt already does that, but here it is, for reference:

muru@muru-pc:~$ echo $PS1
${debian_chroot:+($debian_chroot)}\u@\h:\w\$

The important bit is the \w part. You can set it to \W for only the name of the current directory (basename $(pwd)).

Check out the full list  at TLDP.


I have my computer set to boot from USB first, then the windows boot manager, so I know it's looking to the external ... but for some reason, it always boots strait in to Win 8.1.
I am unable to boot my ubuntu installer in "try before installing" mode. I wasn't able to boot the installer at all on this Win8 PC.

Sounds like you installed Ubuntu in MBR mode on the other computer instead of getting it to boot properly on your UEFI computer in the first place.
Add an ESP to an existing installation with MBR may be what you are looking for.


I solved it! The problem caused by the user library has group write-read-execution permissions. I changed it to rwx------, then it works.


No 3D after Ubuntu 11.10 updates - T420s Intel Sandy Bridge

Probem solved: I had power tuned my ubuntu with the hint in http://ubuntuforums.org/showthread.php?t=1872633. But some of the packages installed in that instruction interfered with the kernel or intel driver update, and 3d stopped working. When I removed the PPA-sources and packages in the article above and rebooted, 3d worked again.


One SSD, two computers (with different video cards). Best approach for video drivers?

Bodhi.zazens answer is a step in the right direction, but you'll possibly be unable to use GL capabilities of you Intel card (e.g. desktop effects).

A more polished script that uses the vendor ID of nVidia and corrects the GL library paths is shown below. Before installing this script, you need to save the nvidia xorg configuration to /etc/X11/xorg.conf.nvidia. On the nvidia machine, run the below commands:

sudo nvidia-xconfig
sudo mv /etc/X11/xorg.conf{,.nvidia}

The below script should be saved as /etc/init/auto-gfx-card.conf. When copying, be careful not to put spaces after the trailing backslashes.

description "autoconfigure graphics card settings"
start on (filesystem and (starting lightdm or starting kdm or starting gdm))
script
    # If any nVidia device is found, assume it to be a graphics card
    if [ -n "$(lspci -d10de:)" ]; then
        for arch in x86_64-linux-gnu i386-linux-gnu; do
            # since nvidia drivers have a higher priority, it'll
            # automatically selected as the best available version
            update-alternatives --quiet --force --auto ${arch}_gl_conf || true
        done
        # create the symlink, overwriting existing links if necessary
        ln -sf /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf
    else
        # restore Intel GL capabilities
        for arch in x86_64-linux-gnu i386-linux-gnu; do
            update-alternatives --quiet --force --set \
                ${arch}_gl_conf /usr/lib/$arch/mesa/ld.so.conf 2>/dev/null || true
        done
        # remove the symlink if any
        rm -f /etc/X11/xorg.conf
    fi
end script

No further commands are necessary to activate this Upstart job.


Not sure what you upgraded from, but in 11.10 application use the global menu. The global menu resides at the very top of the screen, and is hidden by default by the window title. If you mouse over the window title at the very top of the screen, you will see things like file, edit, view.


Need help with getting NoMachine working on Ubuntu 14.04

What helped with me is disabling light locker.


The answer to your question is different if your system is dual booted with windows.  Many on this site seem to insist dual boots are normal as opposed to a generally bad idea. If you merely wish to replace Ubuntu with a fresh installation your best bet is to boot to a live boot cd/dvd/usb and select the installation choice "use the entire drive".

I probably don't need to tell you to backup your valuable data first, but in case I do need to tell you... there I'm telling you!  ;-)


How to install Ubuntu on a GPT partition table without using EFI boot?

GPT partition table is specially used for Hard Disks sizes greater than 2TB.

The partition table is independent of the BIOS mode (i.e Legacy or UEFI).

To create a GPT partition table--

Boot into the live USB or live CD containing Ubuntu.
Click on TRY UBUNTU , so that you can create partition table manually.
Open GParted Partition Editor.
On the top of GParted Menu bar , click on Device --> Create partition Table.
Select GPT from the drop down list and click on Apply.

Now to verify the Partition Table-

Open Terminal
Type the command:

  sudo su

(to execute further commands as super user since some files are read-only)

  parted -l

(to list all the partitions)

If the above command doesn't work , then try specifying the device as:

  parted -l  /dev/sda

There you will see that the partition is GPT.

Now install Ubuntu as usual , installation will not rewrite the partition table (partition table remains GPT only) but new partitions are created.


Applications worked on Windows XP but not ubuntu

Programs for Windows do not work on Linux (except if you use wine).

Some software is available for multiple platforms. For example, Libreoffice and Firefox are available for Windows and Linux.

Some software is available only for Windows. The good news is that for most Windows only software there is an "equivalent" on Linux. Search the Software Center and the internet to find the closest equivalent to the software you're trying to substitute.

Lastly, if you really need a windows program with no real equivalent for linux, you can try installing "wine" and try installing it on linux. Not all software will work but many will.


How to restrict users on changing their wallpapers?

There are two ways that I know of:1. As root run gconf-editor: gksudo gconf-editor.  In the left pane find / desktop / gnome / background.  On the right panel, find picture_filename, right click on it and select Set as Mandatory.
2. Another way is to simply prevent normal users from executing the wallpaper changer by running (as root): chmod 744 /usr/bin/gnome-appearance-properties


Issues with "Free OneDrive Client" locking me out of VM

After I installed onedrive for ubuntu (Following this link here How to setup OneDrive in Ubuntu 17.04? ...

These instructions are horribly incorrect and wrong.
As the developer of the OneDrive client for Linux, you are installing on Ubuntu 17.x in the non-supported way. Installing via sudo apt-get install onedrive is not supported or recommended as this installs an old and unmaintained version.
You have 2 options to install on Ubuntu:

Use the Ubuntu PPA
Compile from source

These are your only options. Do not use the Universe package. For further details please refer to: https://github.com/abraunegg/onedrive/blob/master/docs/INSTALL.md

Did it install a desktop?

No the package in Universe / PPA does not do this at all.

No, after the install, I was able to use the command line for about 12 hours until i launched the VM this morning, and was greeted by the UI

This all depends on how you are launching the VM / how did you do your VM install. Did you reboot from the installation media, walk away, and now it was sitting a clean install again ... maybe - totally plausible.


How do I switch off "continuous" mode permanently in Evince?

Open a multi page document and disable it in

  View / Continuous

Then try

  Edit / Save current settings as default

If that still doesn't do it, you need to install dconf Editor and find the settings below, in

  org / gnome / evince / default

I un-checked 'continuous' and it seems to work. I tested a few different PDFs and most worked as expected, without continuous mode. A couple did, but this may be because I had used the first method when changing something else.

Try it and comment again if it still doesn't solve it for you.


Desktop icons not showing up in xubuntu (and I cant right click on the desktop)

Answered by OP in comments:

navigate to ~/.cache/sessions/
delete any xfce*session directories
run xfdesktop (as your normal user, not root)
logout and log in again


This is a known issue in Xpad, as described here. Probably the messages will go away if you terminate Xpad. If so, I suggest you add yourself to the people whom this bug affects. Go to the above page and log in with your UbuntuOne credentials, or create an account if you don't have these. If possible, try the suggestion by the package maintainer: download the source file and compile/install from source.


Guest Additions seemingly uninstalls every time I use "software updater" in Ubuntu Studio

You need the dkms package installed in the guest and the host or every time there is a kernel update it will break the guest additions and virtual box will not load and you will have to run:

sudo /etc/init.d/vboxdrv setup

The VirtualBox kernel module is automatically installed on your system when you install VirtualBox. To maintain it with future kernel updates, for those Linux distributions which provide it -- most current ones -- we recommend installing Dynamic Kernel Module Support (DKMS). This framework helps with building and upgrading kernel modules.

Be sure to install DKMS before installing the Linux Guest Additions. If DKMS is not available or not installed, the guest kernel modules will need to be recreated manually whenever the guest kernel is updated.

If DKMS is not already installed, execute the following:

sudo apt-get install dkms

dkms


No visual clues as to hibernation status

If you install the uswsusp package, you will at least get a text progress indicator, and it will speed up the process.  I also might get around to fixing it to use a nice gui screen instead of text for Natty+1.


Go through this list and remove everything you don't want: http://packages.ubuntu.com/xenial/ubuntu-mate-desktop


There is no reason for it not to work.

2.1.1. Supported Architectures
Ubuntu 18.04 supports six major architectures and several variations of each architecture known as “flavors”. One other architecture (IBM/Motorola PowerPC) has an unofficial port.
Architecture  Ubuntu Designation
- Intel x86-based     i386
- AMD64 & Intel 64    amd64
- ARM with hardware FPU   armhf
- 64bit ARM   arm64
- IBM POWER Systems   ppc64el
- IBM z/Architecture  s390x

The command, as is traditional in Linux, does not show any output.
$ dpkg --print-foreign-architectures
i386
$ sudo dpkg --add-architecture armhf
$ dpkg --print-foreign-architectures
i386
armhf


Remove vlc added time and date stamp from snapshot file name


What may be the reason for incorrect keypresses interpreting in VNC session?

It is bug in Qt versions < 5.11:

https://bugreports.qt.io/browse/QTBUG-44938
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814959
https://bugs.launchpad.net/bugs/1831505

So the list of affected Ubuntu versions includes two current LTS versions - 16.04 LTS and 18.04 LTS.
The bug is fixed in 18.10 and 19.04, but they are not LTS, so we need stable usable solution for LTS versions:

For 16.04 LTS version exists the following solution - setup x11vnc server and use it instead of tightvncserver.
It is very fast, reliable and stable. And it should be noted that Epoptes uses it for monitoring and assisting of many LTSP clients in realtime.
For 18.04 LTS one have to install tigervnc-standalone-server and set it up.


Get the error '/etc/environment: /usr/lib/jvm/java-8-openjdk-amd64: Permission denied'

From the comment by @steeldriver

This is probably a syntax error in /etc/environment

For example :

JAVA_HOME= /usr/lib/jvm/java-8-openjdk-amd64

in place of

JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64


Go to System Settings, then to Language Support. From there open the second tab which is
named "Regional Formats". Then change the drop down bar's content from "Arabic" to the English language variant you like and you're all set.

Re-login for this to take effect


Okay so this is how I did it. First install libnotify-dev:

sudo apt-get install libnotify-dev

this will install the lib on your system and put the headers of the lib to /usr/include/libnotify/

You can take a look at the header files to find out how to use the lib. I did the following:

#include <libnotify/notify.h>
#include <iostream>

int main(int argc, char * argv[] )
{
    notify_init("Sample");
    NotifyNotification* n = notify_notification_new ("Hello world",
                                 "some message text... bla bla",
                                  0);
    notify_notification_set_timeout(n, 10000); // 10 seconds

    if (!notify_notification_show(n, 0))
    {
        std::cerr << "show has failed" << std::endl;
        return -1;
    }
    return 0;
}

In order to build this type:

g++ hello_world.cc -o hello_world `pkg-config --cflags --libs libnotify`

And here is the result:


The first one-liner / full script parse and convert the file format described in the question; the second full script parses and converts a FASTA file format.

#1
Golfed one-liner:
perl -lane 'my $s;my @m=$F[1]=~/C.?/g;foreach(@m){$_ eq"CC"?$s.="C":$s.="C#"}push(@F,$s);print(join(",",@F))' infile

Expanded full script:
#!/usr/bin/perl

use strict;
use warnings;

@ARGV == 1 || die("Usage: <command> <input_file>\n");

open(my $in, $ARGV[0]) || die("Could not open input file \"$ARGV[0]\": $!\n");

while(<$in>) {
    my $string;
    my @fields = split(" ");
    my @matches = $fields[1] =~ /C.?/g;
    foreach(@matches) {
        $_ eq "CC" ? $string .= "C" : $string .= "C#"
    }
    push(@fields, $string);
    print(join(",", @fields) . "\n")
}

close($in);

exit

Explanation:

The input file is processed line by line;
Each line is splitted into two strings, the part before the space and the part after the space;
Each substring made of a "C" character optionally followed by another character (optionally to catch also a "C" character at the end of the string) in the second string is evaluated, and if the character following the "C" is a "C", "C" is appended to the end of a custom temporary string; otherwise "C#" is appended at the end of the custom temporary string;
The first, second and custom temporary string are printed, comma-separated, followed by a newline;

Sample output:
% cat infile
c32_g1_i1_3 GQKAKLKVPVFFLHRRGSICSSFYLMFSFEIKKK*TSKN*CFVCVRVRNRERAGVKCAHVYCPMFNGTQTH*IIISSLNS
c32_g1_i1_6 AV*TADDDLVRLCSIEHGTIHMCTLYTCCTLTVTHTYTHKTLIFACLFFFNFKGEHQIERAANRTSSM*KKHRNF*LGLLAX
% perl -ne 'my $s;my @f=split(" ");my @m=$f[1]=~/C.?/g;foreach(@m){$_ eq"CC"?$s.="C":$s.="C#"}push(@f,$s);print(join(",",@f)."\n")' infile
c32_g1_i1_3,GQKAKLKVPVFFLHRRGSICSSFYLMFSFEIKKK*TSKN*CFVCVRVRNRERAGVKCAHVYCPMFNGTQTH*IIISSLNS,C#C#C#C#C#
c32_g1_i1_6,AV*TADDDLVRLCSIEHGTIHMCTLYTCCTLTVTHTYTHKTLIFACLFFFNFKGEHQIERAANRTSSM*KKHRNF*LGLLAX,C#C#CC#C#

#2
Expanded full version:
#!/usr/bin/perl

use strict;
use warnings;

@ARGV == 1 || die("Usage: <command> <input_file>\n");

open(my $in, $ARGV[0]) || die("Could not open input file \"$ARGV[0]\": $!\n");
open(my $tmp, "+>", "tmpfile") || die("Could not create temporary file \"tmpfile\": $!\n");

select($tmp);

while(<$in>) {
    if(/^>/) {
        s/$/ /
    }
    if(my $next = <$in>) {
        if($next !~ /^>/) {
            chomp
        }
        print;
        seek($in, -length($next), 1)
    }
    else {
        print
    }
}

close($in);

seek($tmp, 0, 0);

select(STDOUT);

while(<$tmp>) {
    my $string;
    my @fields = split(/ (?!.* )|\n/);
    my @matches = $fields[1] =~ /C.?/g;
    foreach(@matches) {
        $_ eq "CC" ? $string .= "C" : $string .= "C#"
    }
    push(@fields, $string);
    print(join(",", @fields) . "\n")
}

close($tmp);

unlink("tmpfile");

exit

Explanation:

The input file is processed line by line;
If the current line starts with a > character, a space is appended to the line; if a following line exists and doesn't start with a > character, the newline character is stripped from the current line; the current line is printed to a temporary file;
The temporary file is processed line by line;
Each line is splitted into two strings, the part before the last space and the part after the last space;
Each substring made of a "C" character optionally followed by another character (optionally to catch also a "C" character at the end of the string) in the second string is evaluated, and if the character following the "C" is a "C", "C" is appended to the end of a custom temporary string; otherwise "C#" is appended at the end of the custom temporary string;
The first, second and custom temporary string are printed, comma-separated, followed by a newline;
The temporary file is removed;

Sample output:
% cat infile
>c32_g1_i1_
3GQKAKLKVPVFFLHRRGSICSSFYLMFSFEIKKK*TSKN*CFVCVRVRNRERAGVKCAHVYCPMFNGTQTH*IIISSLNS
3GQKAKLKVPVFFLHRRGSICSSFYLMFSFEIKKK*TSKN*CFVCVRVRNRERAGVKCAHVYCPMFNGTQTH*IIISSLNS
>c32_g1_i1_
6AV*TADDDLVRLCSIEHGTIHMCTLYTCCTLTVTHTYTHKTLIFACLFFFNFKGEHQIERAANRTSSM*KKHRNF*LGLLAX
6AV*TADDDLVRLCSIEHGTIHMCTLYTCCTLTVTHTYTHKTLIFACLFFFNFKGEHQIERAANRTSSM*KKHRNF*LGLLAX
% perl script.pl infile
>c32_g1_i1_,3GQKAKLKVPVFFLHRRGSICSSFYLMFSFEIKKK*TSKN*CFVCVRVRNRERAGVKCAHVYCPMFNGTQTH*IIISSLNS3GQKAKLKVPVFFLHRRGSICSSFYLMFSFEIKKK*TSKN*CFVCVRVRNRERAGVKCAHVYCPMFNGTQTH*IIISSLNS,C#C#C#C#C#C#C#C#C#C#
>c32_g1_i1_,6AV*TADDDLVRLCSIEHGTIHMCTLYTCCTLTVTHTYTHKTLIFACLFFFNFKGEHQIERAANRTSSM*KKHRNF*LGLLAX6AV*TADDDLVRLCSIEHGTIHMCTLYTCCTLTVTHTYTHKTLIFACLFFFNFKGEHQIERAANRTSSM*KKHRNF*LGLLAX,C#C#CC#C#C#C#CC#C#


I had to choose the NVidia driver, I used this ppa: ppa:graphics-drivers/ppa (OMG Ubuntu : Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action)

Then Open the NVIDIA X Server Settings, the Intel (Power Saving Mode) was selected, so I had to choose NVIDIA (Performance Mode)


As @Chris mentioned in this comment, Ubuntu Tweak had activated Natural Scrolling which worked just in Chrome. Disabling the option fixed the problem.


ASUS ROG STRIX B550-F motherboard - Ubuntu USB won't boot

Go into BIOS search for the IOMMU setting and disable it.


You do not need to add the Listen directive in your virtual host configuration. It is already configured in /etc/apache2/ports.conf.

This is making apache listen to the port 80 more than once.

  Error condition

  Multiple Listen directives for the same ip address and port will result in an Address already in use error message.
  Source: http://httpd.apache.org/docs/2.2/mod/mpm_common.html#listen

On a side note, the NameVirtualHost has no effect in apache 2.4

  The NameVirtualHost directive no longer has any effect, other than to emit a warning. Any address/port combination appearing in multiple virtual hosts is implicitly treated as a name-based virtual host.
  Source: http://httpd.apache.org/docs/current/upgrading.html#misc


As always before doing something like this, make sure you have an up to date backup of any important data ( you DO backup your important data right? ), then you can shrink sda5, move sda6, sda7, and sda8 to the left, then that will leave you with free space at the end, which you can expand sda8 into.


Why does a newer version of an operating system require more memory?

GNOME 3 is mostly coded in javascript so an awful lot is done at runtime, and these semi-interpreted languages are memory & resource hogs (though not without some benefits too).

Development in languages like that used in GNOME, or modern windows are faster & easier (with theoretically fewer security concerns as the language provides bounds etc validation at cost of speed) than older more traditional languages (the coder usually wrote field checking but this varies with language).

However if you want a lighter DEsktop, just use another one. Whilst some more recent GTK+ ones too have become heavy (GTK+3 is heaver than older GTK+2), they do vary & use less than GNOME.  MATE, Budgie & XFCE are lighter (older XFCE was very light, but with move from GTK+2 to GTK+3 it's somewhat heavier now too). The lightest in the GTK camp is LXDE (being GTK+2 and used in Lubuntu up to 18.04 LTS)

Across the 'pond' (ie. in the Qt camp) there is KDE which is much lighter now (Qt5 uses considerable less resources than did Qt4) , but if you want very light here use LXQt (Lubuntu 18.10 & later).

I was testing Lubuntu [& Xubuntu] 19.04 on a dell d610 & ibm thinkpad t43 & like systems (ie. pentium m, 1gb ram) until last month when x86 daily-ISOs were stopped. Just because GNOME is heavy, we still have other choices (including alternative methods to install Lubuntu/Xubuntu given x86 ISO's are no longer produced!)


You've got a couple of options.

If you want to use Ubuntu & Windows:

You could use the Wubi installer. Note that this method works well with the current 12.04 LTS release, but won't work for 13.10. Also note that Ubuntu doesn't install in a true dual boot configuration using this method. Check the WubiGuide for more detailed information.

If you want a fresh clean install of Ubuntu:

You could use something like the pendrivelinux Universal USB Installer to make a bootable USB installer. You'll need to download the appropriate ISO for the version of Ubuntu you want to install but this method also has no restrictions on version and you can easily install 13.10 if you desire.

Both would do the trick for you depending on what you want the end state to be.


Display private/protected attributes in Umbrello UML modeler

I am running the latest Umbrello from SVN (as of 2012/01/20, r1274951) and you can right-click on your class and Uncheck Show->Public Only.  You can also change this setting at the diagram properties level or in the global Umbrello settings.  However, I don't know if this is available is earlier versions...

Hope this helps


Ubuntu One Windows Client 3.0.1 - Sync not connecting

we found a big bug in the windows proxy support and we are planning on a release for next week to fix it.


How to speed up libreoffice? Libre office can't handle big files

Speed Up Libreoffice
Tools > Options Memory >

The best configuration depends on your computer specs.


1) Even if you had libreoffice, Firefox, etc installed, but not running, that would noy make much too difference to battery life.

2) With the kernels, power usage it probably based more on how you use them.

LXDE or Xfce seem the most efficient desktop enivroments to use - if you are using nano, why don't just not login to the graphical desktop environments, and just use the tty's (Ctrl+Alt+F1-F12) - works for me :-)

Midori or Seamonkey (like Firefox) are fairly efficient.

3) & 4) dunno

Basically, use the minimum amount of things as possible, and stop any power hungry processes - you can find them using top, and kill them in top by using k and typing the PID. Keeping CPU usage to a minimal, and use non Graphic intensive programs.

You may also want to remember that hardware other than RAM uses power - namely the Wifi and screen backlight. You can usually activate and deactivate these using keyboard shortucts, like Fn+F2 and Fn+F7

Just thought I would add this - I find indicator-cpufreq useful on my work laptop, as setting it to power seems to add an extra hours battery life. In 13.10, you can install it with:

sudo apt-get install indicator-cpufreq


How to avoid the automatic disk check every 30 reboots?

The standard Linux filesystem is checked for consistency, on mount,  every 30 mount and every month, whatever come first. It is possible to shut off this behavior (not recommended) by issuing (1):

sudo tune2fs -c 0 -i 0 your_device_here

However, filesystems are checked on mount every time the disk not correctly unmounted (say, a forced poweroff, or unplugging an external device); this behavior is not avoidable.

Your case seems (after deciphring yur question) more the second one, so in this case your only possibility is to solve the clean shutdown problem.

Note (1), TL;DR version: more in detail, you have to find the device on which your filesystem resides; you can see this by starting a Terminal Emulator (typically from the dash Alt-Ctrl-T, but it depends on your flavor of Linux) issuing

mount

in the terminal. For example, on my PC you have:

[romano:~] % mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
/dev/sda5 on /home type ext4 (rw)
...

so for example the device where my root filesystem lives is /dev/sda1, and my /home is on  /dev/sda5. If you got confused about the Unix way of devices, filesystem and mount point please read this nice tutorial.

So if you want to remove the safety belts for /, in my system I should do:

 sudo tune2fs -c 0 -i 0 /dev/sda1

...but be warned that now you are running with no safety belts; do not protest when your drive will crash and you lose data. Backup frequently.


Is there a 64 bit deb for Crossover Impersonator?

Crossover Impersonator amd64.deb Well i found the 64bit version on their site. Thanks anyway


You should give WINE a look.  WINE has come a long way over the last few years and many Windows-based applications can be run on it with varying degrees of success.

Here is the WINE HQ page for Age of Empires 2:

It looks like Age of Empires 2 has a pretty good rate of success.  To get WINE, you first need to add the WINEHQ PPA Repository by adding "ppa:ubuntu-wine/ppa" as a software source from within the Ubuntu Software Center (Edit->Software Sources).  Then you should be able install WINE by executing the following from Terminal:

sudo apt-get install wine1.5

For further instructions, see WINE For Ubuntu and Ubuntu Derivatives


Brightness control does not work in Ubuntu 14:04

I have downloaded this for nvidia geforce
Adjust backlight of Compaq Armada laptops (E300, M500, M700)
Change LCD brightness on GeForce cards

and updated my grub file with

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video.use_native_backlight=1"

I got it working.... :-)


The syntax you have provided seems correct in regards to running daily at 11:55 PM.

You can find more in this Cron Jobs Guide.


What need to be setup for this reboot.sh to run first time after startup?

Ok i did some more research and found out that the reboot function needed a sudo authentication at least once so to bypass that i used this command in the script reboot.sh

echo "password" | sudo -S shutdown -r now

I hope this will help someone else some day.


Cannot install Epson L355 wifi printer correctly in notebook with Ubuntu 12.04

Taken from here on Ubuntu Forums:

It finally works!
I found what I think could have been the reason for my troubles.  > There was an innocent-looking file /etc/cups/client.conf with the single line in it:
ServerName 192.168.1.36.

It was probably left after a previous attempt to print to another printer. Apparently after uninstalling cups completely that file was not erased (I thought everything was erased). I commented that line and started again.
Then after restarting cups I ran system-config-printer again and choose the options that the program offered me by default. So in the end I did not use the ipp option (I could not find the correct path to make it print). I do not know if it is safe or good but the option suggested in the URI address was:
dnssd://EPSON%20L355%20Series._pdl-datastream._tcp.local/

and that has worked perfectly so far.


Note that you should be able to simply run sudo console-conf, which is that first-boot setup you've already gone through. But it doesn't support more complex networking setups, so a more thorough answer is:

The Ubuntu Core images utilize netplan, and uses the systemd-networkd backend for it. I don't have a Joule on hand, but I have my Dragon board here, and I used the first boot setup to configure a wired ethernet connection. Let me walk you through what I'd do with netplan to setup a wireless connection.

Modify /etc/netplan/00-snapd-config.yaml. This is the file generated by console-conf on first boot. Since I configured the wired connection on first boot, mine looked like this:

# This is the network config written by 'console-conf'
network:
  ethernets:
    eth0:
      addresses: []
      dhcp4: true
  version: 2

Since I wanted to enable wifi, I updated this file to this:

# This is the network config written by 'console-conf'
network:
  ethernets:
    eth0:
      addresses: []
      dhcp4: true
  wifis:
    wlan0:
      access-points:
        <access point name>:
          password: <password>
      dhcp4: true
  version: 2

Run sudo netplan generate to generate the necessary backend configuration for systemd-networkd.
Run sudo netplan apply to actually apply the new config.

You can run networkctl periodically and you'll see the interfaces come up.


it was because we were doing copy and pasting the script content from windows there for adding the carriage return to end of each of the lines within the script


What will happen if we put the ubuntu installed disk from lenovo into dell?

If you have a grub rescue shell like

grub>

That means Grub can't find some information needed to boot. Could be its configuration file grub.cfg, the folder containing Grub's modules, etc. usually because the partition set up has changed. There are a few commands you can use to see what the problem is:

ls

will show the partitions in your system. You should decide which one contains the folder /boot/grub (usually the one on which Ubuntu is installed. You can check what is in each partition issuing something like, for example

ls (hd0,2)/

to check partition 2 on disk 0

Once you found the drive containing Ubuntu,

set prefix=(hd0,2)/boot/grub

assuming your system is in (hd0,2). If not, change accordingly. Then,

insmod normal

If there are no errors, the system should boot with

normal

Let me know if the laptop doesn't boot. In that case you have to tell grub where the kernel and the initrd.img are located.

Once the computer boots. First thing you must do

sudo update-grub
sudo grub-install /dev/sda

again assuming your installation is in disk hd0. For disk hd1 is sdb, etc

https://www.howtoforge.com/tutorial/repair-linux-boot-with-grub-rescue/
http://www.linuxandubuntu.com/home/ways-to-rescue-or-recover-grub-menu


How to easily delete snippets using Kdenlive?

1. How to quickly mark a segment to delete:

Make sure the video track is selected.
Press X to switch to the Cut (Razor) Tool
Click once in the timeline at the start point
Click once at the end point
Press S again to switch back to selection mode

2. Use xdotool to automate delete/remove space with a single keyboard shortcut

xdotool allows automation of keyboard and mouse clicks/movements; install it with sudo apt-get install xdotool
Copy and paste the below to an sh file, say kdenlive_cut.sh in your home directory:

#!/bin/bash
DELAY=0.5  # delay in seconds between each action
xdotool search --limit 1 -name Kdenlive > nul  # activate only if kdenlive running
if [ $? -eq 0 ]
then xdotool click 1 && sleep $DELAY \       # left-click
   && xdotool key Delete && sleep $DELAY \  # DEL
   && xdotool click 3 && sleep $DELAY \     # right-click
   && xdotool key r;                        # 'R' to remove space
fi

Make it executable with chmod +x ~/kdenlive_cut.sh
Open Settings...Keyboard, and go to the Shortcuts tab. Create a custom shortcut, naming it whatever you want, and setting the "Command" path to /home/username/kdenlive_cut.sh. Click Apply. The right-column will say "Disable", click on it and you'll see "New Accelerator": press your shortcut key combo. I chose Ctrl+Del since it doesn't conflict with the existing shortcuts in Kdenlive.

Now go to Kdenlive, and mark a segment you want to cut (as explained in Section 1). Click on that segment to outline it in red, and without moving the cursor, press Ctrl+Del; you will see the segment deleted, an empty space appear, the right-click menu show and the space removed -- all in the space of about 2 seconds.

Sometimes the shortcut fails the very first time it's invoked, giving you the longer right-click menu or the "Insert Space" option. Just cancel, and try it again...it works.
Here's a Youtube Demo of the shortcut in action.


I think you are confusing two things:

X11 forwarding requires you to connect with the -X (or -Y) switch. (Unless specified in your local ssh_config or remote sshd_config). As you've experienced this will allow you to run almost all programs that require X but as separate application (remember you can background them immediately when invoking the program with a n '&' behind it.
You seem to want something akin to a 'remote desktop'. Application along those lines are FreeNX or NeatX by google. Apparently in 11.10, it is now easier to use x2go (see here for some installation instructions).

All of these remote-desktop setups require a bit more setting up. For instance you need a suitable client on the connecting side. But on the other hand, they are generally better than VNC and they are much quicker than running X11 over ssh due to some funky compression. Good luck.


After 12.04 installation on Dell Inspiron 1520, no wired connectivity

Got my ethernet connection, from the answer to another user's question.
I guess the instrumental bit was:

sudo apt-get remove --purge bcmwl-kernel-source

Even if this didn't complete, I believe it did remove the blacklist file which prevented the access to the drivers.
I believe this is a major bug in the installer: potential users 'try' ubuntu, check that it seems to work, then 'install' it and get cornered into a non-working system.
I'm surprised it doesn't get fixed after multiple people (probably 1%--the other 99% being thrown back to Windows) repeatedly report it.


Open a terminal (Ctrl+Alt+T)
Run the following commands:

sudo apt-get install kdm
sudo dpkg-reconfigure kdm


Is there a shortcut to force close an application?

right click on desktop

create launcher

name : xkill

command : xkill

click ok

double click to launch. drag to quicklaunch bar on left to launch from there...

you could even change the icon to the original icon by right click + properties, then click on the springboard icon picture which will take you to a browse window(choose an icon). Now navigate to the following folder  /usr/share/icons/hicolor/scalable/apps  and then find the icon named : gnome-panel-force-quit.svg, select it and voila.


Trying to make my sixaxis ps3 controller work on my computer for minecraft

Maybe not relevant, but the instructions you used look completely different from the ones I used to get mine working.

I followed the instructions listed on the Ubuntu documentation site and it worked on the first try.

https://help.ubuntu.com/community/Sixaxis

Either way, good luck!


I think this is not included as it varies with what spec you choose - e.g. looking at the specs of this model off of their front page, the fact you can have a i5 or i7 CPU, as well as choose what display, RAM, wifi etc it has will affect battery life - I will note that I think 62.16 Wh is very good compared to (lower-power) laptops I have had, but as this is off the front page is may be more expensive than most anyway.

What I would recommend doing is either search for reviews (doing this for most purchases helps anyway) - e.g. this one says:

  I’ve not done extensive testing of the battery life, but most of the
  time Ubuntu suggests two hours from a full charge, and that seems to
  be true. While it definitely isn’t something you’d completely rely on
  while on the go, it’s understandable considering all this great
  hardware this laptop houses. If you’re doing something chilled like
  casual tweeting and IM’ing, then the laptop should be able to last
  three full hours.

Or try contacting System76 via their support services and asking them directly.


WHY : Unable to lock the administration directory

If you run two instances of apt-get install they will try to write to the same files that will cause conflicts.

That is why the system does not allow to do it.


what would happen if I installed a Ubuntu with md5 hashes that are different fom the intended ones

Anything could happen. You could find that you are installing Windows! :D Or that your setup is compromised in some way, with keyloggers and botnets and whatnot. Or it simply wouldn't install, because the affected file is crucial to installation.


When in Monitor.Settings, you can press

"Save"     (to save for future sessions)

or

"Apply" (test the change but don't save for future)

https://manual.lubuntu.me/3/3.2/3.2.10/monitor_settings.html?highlight=monitor%20settings


No sound as user, with sudo it runs - 20.04 LTS

Thank you for your advice. I had already added the audio group, everything was done with pulseaudio and timidity is also outside. In the meantime I've found a work around that has completely resolved my problem with the sound. And it goes like this:

Log in to the terminal as the super user:
sudo su

Then edit the configuration file analog-output-lineout.conf by running:
gedit /usr/share/pulseaudio/alsa-mixer/paths/analog-output-lineout.conf

In the editor, change all occurrences of switch=off to switch=on. I also changed switch=mute to switch-on.

Then do a restart. Lo and behold, the sound is there.

Now I'm just letting Imany improve my mood!
Translated and slightly expanded from the original German version.


How to have Google Chrome Canary on Ubuntu?

As stated in the site you linked, Canary builds are not available for Linux.
The only release channels available for Linux are: Stable, Beta and Dev.

The reason for that is explained here:

Thanks for your interesting in testing out the latest and greatest builds of Chrome.  There are logistical challenges that make creating/ deploying Linux bundles prohibitively expensive to do on a daily basis, which effectively makes a Linux Canary fairly unlikely for the foreseeable future.  I'd encourage the community to use the PPA builds, those are fundamentally the same as what we would build save for a couple of plugins (PDF, Flash, FFMpeg).
Kind Regards,
Anthony Laforge
Technical Program Manager
Mountain View, CA


16.04: How to Mirror Windows 10 in Ubuntu

Install a remote access client in Ubuntu, and link it over WiFi to a remote desktop server running on your Windows box.

https://en.wikipedia.org/wiki/Comparison_of_remote_desktop_software#Operating_system_support lists client and server apps by OS.

Both the client and server must run the same remote access protocol.

Some folks find it easier to use the same app for both client and server (although not required).


The problem might be your VGA adapter. What is your VGA model and vendor? Or is it an onboard one?


How to log memory and cpu usage of an application?

You can create one-liner in shell:

logpid() { while sleep 1; do  ps -p $1 -o pcpu= -o pmem= ; done; }

to log process with pid=123 just:

logpid 123

or to see and write log to file:

logpid $$ | tee /tmp/pid.log

If you want other data to be logged, modify -o {this} options. See man ps section "STANDARD FORMAT SPECIFIERS" for available parameters to use. If you want different time resolution, change sleep {this} in function logpid().


Medibuntu 'Bad Gateway' Connection Failure

First, read Here of what medibuntu is.

Then follow the sources.list.d/ way. Execute the following command in terminal.

 sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update

Read the Source from more info.

UPDATE:

Maybe this announcement is related to your problem https://launchpad.net/medibuntu/+announcement/11219

Also a discussion is already open on test.ubuntu-discourse.org


RTL8723DE wifi driver error in ubuntu 18.04 after updating kernel to 5.3.0-59

Driver for rtl8723de is installed this way:
sudo apt update
sudo apt install git dkms
git clone https://github.com/lwfinger/rtw88.git
sudo dkms add ./rtw88
sudo dkms install rtlwifi-new/0.6

You probably installed an old driver that is incompatible with the new kernel.


You can get this error due to several problems:

1 - Running out of disk space. Check you available space (on the server) with df

df -H

If you are low on disk space remove unnecessary files from your system.

2 - ~/.Xauthority needs proper ownership and permissions

ls -l ~/.Xauthority

you can set proper permissions as needed (you may need sudo if the file is owned by root).

chown you_user:your_group ~/.Xauthority
chmod 0600 ~/.Xauthority

3 - Make sure X Forwarding Enabled. You need a capital X with ssh -X . In addition, on the server

grep X11Forwarding /etc/ssh/sshd_config

should show

  X11Forwarding yes

4 - Make sure X11 client forwarding enabled

On your client, /etc/ssh/ssh_config should have the lines:

  Host *
  ForwardX11 yes

Then

ssh -X user@server

should work.


hdparm will not set spindown for disks 14.04 server

hdparm -S 242 /dev/sd[a-d]

Sets spindown to 1 hr.


Installing via pip3 needs root permissions so that it can writeto file system locations, rerun the pip3 install with sudo:

sudo pip3 install jupyter


Skype is not opening after entering the loging credentials in ubuntu 16.04 LTS

I don't trust the black magick that makes the software center, in cases like this.
Remember, with linux things... the CLI is your best friend. :)

First you need to delete that buggy skype so open a terminal with CTR + ALT + T
And type the following...
Note: I'm assuming that your package is called skype since you copy-pasted that here

sudo apt purge skype --auto-remove

Now go and download a fresh copy of Skype from the oficial website.
When you completed the download, go to the folder and right click 'open terminal'.
then you must type the following commands...
Note: use TAB for autocompleting the annoying large name of the package

sudo dpkg -i skype-amd64.deb
sudo apt install -f

With that done, your skype should work fine.
If for some weird reason the installation gives you errors, then do
sudo apt update && dist-upgrade for fixing missing libraries.


How to install a clean 32 bit WineHQ into a 64 bit Ubuntu

Wine will start an 64-bit environment by default. You can change this behavior using the WINEARCH environment variable. Rename your ~/.wine directory and create a new Wine environment by running $ WINEARCH=win32 winecfg. This will get you a 32-bit Wine environment. Not setting WINEARCH will get you a 64-bit one.
You can combine this with WINEPREFIX to make a separate win32 and win64 environment:

  $ WINEARCH=win32 WINEPREFIX=~/win32 winecfg
  $ WINEPREFIX=~/win64 winecfg

Additional info you can find, for example, here: Wine ArchWiki


As a workaround, you may install AucTeX locally from the Emacs Lisp Package Archive (ELPA):

M-x package-install auctex


Stuck at "Installation Type" screen while installing

My 13.10 install got stuck at a previous screen, asking if i wanted to replace windows, do something else, etc. The 'continue' button wouldn't enable.  I clicked back, then next, and it cleared the problem.  you probably already tried that?


What will  be the default Python interpreter for 12.04?

12.04 will probably have both 3.2 and 2.7 on the CD - the plan is to port Update Manager to Python 3. Typing python at a command prompt will still get you Python 2.7, though.

I think the Wikipedia article is giving the most recent version which is installed by default, rather than the 'default Python interpreter'.


On my system there isn't this package, but thee is something available called libphonon4qt5. I suggest you go into synaptic, search for phonon and pick the package you need.


During the installation of 12.04 it should have an option to replace 11.10. If not just choose the advanced option and choose to install on the same partition that you installed 11.10.

However, if you installed using wubi you need to unistall 11.10 by going to Control Panel and Uninstall a program. Then scroll down until you see wubi click on it then click uninstall.

Hope this helps,

Leinardo


How to put all traffic and on one interface and some traffic on another interface

Set up eth0 as the default route, set up an alternate route through wlan0, and configure the ssh traffic to go through the alternate route.

Install the iproute package to manipulate routing tables through the ip command. Mark the outgoing packets that you want to re-route, and set up a routing rule to route those packets through a different interface. Untested:

iptables -t mangle -A OUTPUT -p tcp --dport ssh -o eth0 -j MARK --set-mark 1
ip rule add fwmark 1 table 1
ip route add 0.0.0.0/0 table 1 dev wlan0


sudo apt install gnome-tweaks adds an extension/alternative to the default desktop editor. One such option is exactly what you want, changing the information/appearance of the clock. Once installed, just search for "tweaks", or run sudo gnome-tweaks from the command line.


Currently there is no way to use Ruby with Quickly. However, the good news is that Quickly has a flexible templating system that enables you to create templates for new types of applications or languages.

Thus you can create a Ruby template by following this guide on a previous Ask Ubuntu question.

I can see two previous attempts at creating Ruby templates, but it seems the authors lost interested or did not have time to continue development. Perhaps you can pick it up from there or use them as a basis for a new Quickly Ruby template:

Ruby templates
Quickly Ruby


Sound Recorder with "Record as" list empty in 13.04

I have the same problem.  I noticed it after upgrading to 13.10.  I can't remember if I used sound recorder after a clean 13.04 install or not.  It worked prior to the clean install I'm sure.  There is a bug reported: https://bugs.launchpad.net/ubuntu/+source/gnome-media/+bug/1230231


Prevent lost of highlighting of Microsoft Word documents?

hmm.. try kingsoft office i think it has no problem opening doc or docx files

also you can use office web apps. all you need is a live or hotmail account give it a try


Hybrid Graphics

Easiest way to solve the problem is to add:

echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

to your rc.local file using the following command in terminal:

gksu gedit /etc/rc.local ---> add it before line exit 0.
It will power off the ATI adapter at startup and no more fan speed and high temperature.

This is working for my ATI Card

Good luck!

For more information check this HybridGraphics


How to install Ubuntu QML Toolkit on 10.04

The problem is that ui-toolkit has been built only for quantal as you can see in the package details page https://launchpad.net/~ui-toolkit/+archive/ppa/+packages


Ubuntu 12.04 /home encryption option during installation info?

The Ubuntu installer will set up eCryptFS to handle individual user home mounts.  The packages installed are libecryptfs0 and ecryptfs-utils.  Note that this is NOT the same as a whole-partition or whole-drive encryption, it simply mounts the encrypted data that exists on the unencrypted hard drive (in /home/.ecryptfs/username) to the user's home directory.

It would appear based on  what I found in the wiki that the cypher is AES with 16-byte (128-bit) keys.  These keys are generated per-file, and are then themselves encrypted with your own encryption key, which is finally encrypted symmetrically using your passphrase.  eCryptfs is cross-distro, and built into the kernel.  There's some good information about it here, especially in this article.  I apologize that the links are so old, but they appear to be very relevant today.


That would be caused by pulse audio and the drivers. Windows Monopolized the marked so hardware vendors pay majority of their time focusing on the windows drivers and very few if any give Linux the time of day.

You can modify the Pulse audio gain and response as well as recompiling your Audio drivers, but I would advise against it in your situation.


You can not delete Ubuntu partitions from Windows just because Win can't see Ubuntu (or any other linux) partitions. Like others already wrote, you need to boot into a Live linux (Live Ubuntu or any other), open GParted and notice an ext partition. That's where Ubuntu is. Also look for a swap partition. That's used by Ubuntu also. You can delete them both if you want Ubuntu gone.

DO NOT delete EFI partition!! It is needed by any and all operating systems (including Win). EFI partition contains the GPT partition table records/data. If you  delete that you will render all installed operating systems inoperable.

Recovery partition is made by Windows. It contains some Windows critical data backup. When Win fails to boot, Win will use backup data from Recovery partition to repair itself. Some people delete that partition (since Win rarely manage to repair anything). I recommend keeping it, it's not very big or anything in the way.

OEM partition is, obviously, made by the hardware producer. It may contain proprietary drivers or rescue software. Not absolutely necessary since you can always find that software on the internet.

Usually, the Windows partition is the active partition. Disk 0 seems like an external thumb drive (judging by size). I see no reason to keep that as active partition, unless planning to install Ubuntu from it.

Just remember that, after you delete Ubuntu, the Ubuntu's bootloader (GRUB) may still be present on your hard drive and you will have to use the Windows install disk to repair the Windows bootloader.


Network connection in terminal is too slow

Well you have to change the mirror from which you gets the data.
go to Software & Update --> select Download from: other --> choose select the best server/ or the server you prefer! cheers:)


Now that I have Firefox 50... netflix isn't working any more

Ubuntu Modifications 3.2 is causing the problem! If you are using Ubuntu (any flavor) and are using Firefox as a search engine go into Add-ons manager then into Extensions and disable or remove Ubuntu Modifications 3.2! Restart Firefox ------  Linux Is Great :-)


Well, type your user password. It will not show you the password when you are typing for security reasons but after you finish typing the password and press ENTER the whole terminal line should work.

The user password is the password you use to login to Ubuntu and the one that it was set up when Ubuntu was installed.


Deleting Windows Partition + Installing Ubuntu = Please Help!

If I delete my Windows partition, can I still boot ubuntu from a live usb (DriveDroid) and install it into the newly unallocated space?

Yes. It looks like the Windows partition is corrupted. This will not prevent you from booting from a live usb. Formatting the partition should allow you to safely install a version of ubuntu assuming the hard drive itself is not damaged.


sudden ubuntu 16.04 shutdown while downloading

If your laptop power dies while downloading something, it won't be fully downloaded.  Depending on what software you are using to download it, when you next boot up you'll either see a partially downloaded but incomplete file, or the file won't be there (because it was downloaded to a temporary location while it was in progress).


Actually You can't. Wineprefix is variable from wine, therefore You can't update wine within single wineprefix. However You can install multiple versions of wine on Your Ubuntu.


Installed local postfix, Thunderbird unable to use it

I typically use 'Internet site with smarthost' for postfix running on my laptop, and specify my company's SMTP server as the smarthost.  For a computer that doesn't roam between networks, it would be fine to specify your ISP's SMTP server as the smarthost.  If you have a Google account, you could use Google's SMTP as well.

'Internet site' might also work, but it might run afoul of various spam protections, since it will try to reach each recipient's SMTP server directly.

I'm not sure what 'local' means; can you check (netstat -tln) if Postfix is even listening on 127.0.0.1 port 25?  If not, Thunderbird won't be able to talk to your Postfix over TCP.

On the Thunderbird side, specify localhost as the SMTP server with no username or password.


I just got this to work on Ubuntu 16.04 with Cinnamon Desktop.  I was installing a Samsung ML-2850D attached to a network print server (port L1).

The universal printer driver I downloaded was from Samsung at: http://www.samsung.com/uk/support/model/ML-2850D/XEU

On that page under "Useful Software" there is a "Samsung Printer Software Installer" with pictures of a user friendly, gui-based, all-in-one installation wizard, but if you select download from an Ubuntu PC you will get a tar file that contains a bash script installation of the driver with no README or explanation.  So I share your pain.

I sudo executed the "install.sh" script in my home directory using the terminal interface.  When asked, I opted to allow it to "automatically" configure my firewall (no idea), and the script completed successfully.  I discovered that the script does not actually install the printer.  It may do something firewall-ish, who knows, but it does put a load of PPD files in /opt/samsung/printer/share/ppd/ directory with names in the format: Samsung[whatever-model-series].ppd.  So pretty easy to figure the one you want.

You can then use Cinnamon's print utility (or I imagine Unity or Gnome, etc) to add your printer.  I added a new Network Printer.  Selected LPD/LPR Host or Printer. Under host put in the LAN IP address and under Queue put (in my case) L1.

On the next screen I indicated that I would supply the PPD file and then browse navigated to the /opt/samsung/.... file with the appropriate name.

This worked for me, and I can even control the printer through a browser with http://localhost:631/printers/ .

You might wish to install the Samsung SmartPanel also.  It is a GUI Applet thing that has printer controls and a link to order supplies and such.


ubuntu will be installed on a different partition and the Windows partition will not be affected. On but you will have the possibility to choose which OS start