Clock time is off on dual boot Dual boot system Windows XP Pro and Ubuntu 12.04.

I have the bios set for the correct time and Ubuntu set for US Eastern time.  Ubuntu will boot up and the time will be off by -4 hours.  If I correct the time in Ubuntu then when I boot up in Windows XP the time will be off by + 4 hours.

This is a fresh install of 12.04. I did not have this problem before reinstalling Ubuntu.

https://help.ubuntu.com/community/UbuntuTime#Multiple_Boot_Systems_Time_Conflicts

  Multiple Boot Systems Time Conflicts

  Operating systems store and retrieve the time in the hardware clock
  located on your motherboard so that it can keep track of the time even
  when the system does not have power. Most operating systems
  (Linux/Unix/Mac) store the time on the hardware clock as UTC by
  default, though some systems (notably Microsoft Windows) store the
  time on the hardware clock as the 'local' time. This causes problems
  in a dual boot system if both systems view the hardware clock
  differently.

  The advantage of having the hardware clock as UTC is that you don't
  need to change the hardware clock when moving between timezones or
  when Daylight Savings Time (DST) begins or ends as UTC does not have
  DST or timezone offsets.

  Changing Linux to use local time is easier and more reliable than
  changing Windows to use UTC, so dual-boot Linux/Windows systems tend
  to use local time.

  Since Intrepid (8.10), UTC=yes is default.

  Make Windows use UTC

  Note: This method was not initially supported on Windows Vista and Server 2008, but came back with Vista SP2, Windows 7, Server 2008 R2
  and Windows 8/8.1.

  To make MS Windows calculate the time from the hardware clock as UTC.

  Create a file named WindowsTimeFixUTC.reg with the following
  contents and then double click on it to merge the contents with the
  registry:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
     "RealTimeIsUniversal"=dword:00000001

  Note: Windows Time service will still write local time to the RTC regardless of the registry setting above on shutdown, so it is handy
  to disable Windows Time service with this command (if time sync is
  still required while in Windows use any third-party time sync
  solution):

sc config w32time start= disabled

  Reversing the change You can create a file with the following
  contents and then double-click it to merge in the original changes, as
  above:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
     "RealTimeIsUniversal"=-

  If Windows Time service was disabled, enable it again with the
  command:

sc config w32time start= demand

  Make Linux use 'Local' time

  To tell your Ubuntu system that the hardware clock is set to 'local'
  time:

  Pre-Ubuntu 15.04 systems (e.g. Ubuntu 14.04 LTS):

  edit /etc/default/rcS
  add or change the following section

# Set UTC=yes if your hardware clock is set to UTC (GMT)
UTC=no

  Ubuntu 15.04 systems and above (e.g. Ubuntu 16.04 LTS):

  open a terminal and execute the following command

timedatectl set-local-rtc 1

The /etc/rcS fix did not work on my Win7 / Ubuntu 14.04x64 installation, nor did any fixes through the clock GUI.  Because the root of the problem is BIOS time VS UTC time, and Windows is a pain in the butt when it comes to using UTC, I just picked a point on the map that uses UTC+0 (no change between BIOS and UTC time).

Try changing your location to Reykjavik (the capital of Iceland).  Voila!  Your Ubuntu time will change to match your BIOS time.


How do I disable the boot splash screen, and only show kernel and boot text instead? I'd like to be able to disable the Ubuntu splash screen that I see on boot with the indicator meter of progress, and replace that with a text-only readout of the boot up process (such as you can get by hitting the esc key during the splash screen).  Is this possible?

I am not asking to disable X and get to text-only login, I"m asking how to deactivate the "Ubuntu" loading screen with the dots, so that I can see text output from the boot process - processes being started, kernel messages, etc.  When I wrote this question I was not asking how to disable X altogether, only the boot splash screen.

Yes. Edit /etc/default/grub (using gksu gedit /etc/default/grub), and remove the "quiet splash" from the Linux command line:

Here's what it looks like by default:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Make it look like this:

GRUB_CMDLINE_LINUX_DEFAULT=""

After this run sudo update-grub2

Also from the GRUB menu, if you want to do this temporarily, you can hit E on a line to edit it, then Ctrl+X to boot the kernel line.

Make sure you don't have plymouth-theme-ubuntu-text package installed.

So, I couldn't get this to work in Ubuntu 16.10 of 17.04. I used grub-customizer as well as editing the /etc/default/grub file directly (and using update-grub2 after). All the other things I could find had the same answer, remove quiet splash.

As it worked on a 16.04 system, I decided to compare the grub.cfg files and found an entry in the 17.04 grub.cfg file which said "vt.handoff". I found the following entry on this parameter;
What is vt.handoff=7 parameter in grub.cfg?

Eventually I edited the grub.cfg file (which you shouldn't do because thats whatts update-grub2 is for, it will generate the grub.cfg file), but this seemed to work!

ps. removing plymooth did nothing on my system, so I added it back in.


Linking to local files on a Windows file server share I tried to find a similar topic, but failed to do so. So I am asking the question here.

At our company I am running a pilot to get Ubuntu on our machines, as it would solve a lot of our problems.

However, I encountered what would be a major deal breaker for us.

We use an in-house developed backoffice / ERP system and work a lot with picture files which then are printed on a variety of products. The backoffice is web-based and accessed through Mozilla Firefox.

We sometimes have to check those picture files and there is a button in the backoffice that allows us to view the file with a link like: ///diskstation/production/pictures/filename.png

On Windows the file opens without problems, but the link does not work in Ubuntu (Firefox). If you click on it you get an error message saying that no such file exists.

If I navigate to the path manually, I can open the file on Ubuntu too.

It looks to me like the link "formula" to the local file is Windows-specific.

Is there a way we could link to the file so that it is universally accessible?

Any help would be much appreciated!

It is not clear which is the method you are using to access the remote shares --- but yes, the path to a remote share is different in Linux and in Windows. The paths specification is different, really.

If you can navigate to your file, you can see what the path (URL) is. If you are accessing the file with your browser, the one that (should) work with a browser is available in the properties dialog of the file manager (right click on the object):

and it works for me:

The complete path to my file would be smb://pascua/ftp/red/vnc/tightvnc-1.2.9-setup.exe and if it where an image, feeding it to the browser will show it.

Additionally, the file from a remote server is visible somewhere in your directory hierarchy, and accessible as a normal file. To know how the file is known in the file system (as if it where a local file), drag the file icon in a terminal emulator window (here I typed ls -l before):

In this case the path is strange because the file is mounted by the gvfs backend (it's a user mount), in the case of system-mounted shares it should be easier to parse.


Ubuntu 19.04 login screen I'm the only user on the login screen. Upon hard booting after a freeze, my username used to be highlighted automatically, so I could login by only using the keyboard. Now, my username is no longer highlighted automatically, so I have to mouse-over, click, then type. Is there a way to have my username highlighted upon boot?

From the comments...

At the login screen, hit the Tab, or Up/Down arrow keys, to select your username, hit Enter, enter your password, hit Enter again, and you're in!

Update #1:

Create another user account, with an alpha name that comes after your own username. This way, one account will always be highlighted on the login screen, and you can move between them, if required, using the arrow keys, as above.

To stop the system freezing, increase your swap to 4G. Your current swap could be on an existing disk partition, or in a /swapfile. Review/edit /etc/fstab for the swap mount command string. Search here on AU for the procedure on how to do this.

Just go to settings, navigate to details tab and then to users. There you'll find automatic access.


Where does Unity/Unity-Greeter Load X Configuration From? On my setup, I have one monitor that has been rotated vertically, and another that is the usual horizontal orientation. I've set all the display settings in my GNOME shell so everything looks fine, however on the LightDM login screen, the two monitors work as expected, except that on the rotated monitor, the LightDM window hasn't been rotated.

I've set the display-setup-script setting in a new file (/etc/lightdm/lightdm.conf.d/90-display.setup.conf), and it is set as such:

[Seat:*]
display-setup-script=/usr/bin/dualrotation.sh

The contents of the script that is run is as follows:

#!/bin/sh
xrandr --output DVI-D-0 --off --output HDMI-0 --primary --mode 1920x1080 --pos 1080x376 --rotate normal --output DVI-I-1 --off --output DVI-I-0 --mode 1920x1080 --pos 0x0 --rotate left --output DP-1 --off --output DP-0 --off

if I change my greeter to lightdm-gtk-greeter, then the script is run correctly and the orientation is correct on both screens. From another AskUbuntu question (not sure I can find the link now) I established that Unity greeter was applying its own display settings after mine had been loaded.

I tried logging into a Unity session and set the display configuration correctly, and even though it is now correct in Unity, this hasn't affected the configuration that is loaded by the greeter.

If it's of any relevance, I'm using proprietary NVIDIA drivers, and the display configuration shown in nvidia-settings is also correct.

Where does Unity greeter get its display configuration from, and how can I change it?

Ok, update.

Have something working using lightdm-gtk-greeter instead of unity-greeter (which hung at login).  Thanks to the poster for mentioning he got it to work with lightdm-gtk-greeter or I probably would not have tried another.  Here are the steps I used to get the multi-monitor control login-screen fully working -- even though it's not working with unity-greeter, this is at least some form of a solution for now:

sudo apt-get install lightdm-gtk-greeter

Also make sure arandr is installed:

sudo apt-get install arandr

Configure your monitors how you like them for your layout using the Displays settings under System Settings

Back in a shell, load up arandr:

arandr

A user interface will load with a graphical representation of your current monitor layout displayed.  From the arandr Ui menu, Layout choose  Save As and save monitor layout, it will save a shell script that you can use in your lightdm.conf file.  It defaults to save the layout shell script in .screenlayout directory in your home folder.  I just kept it there so it's easier to update later if I switch monitors around more. Specifically I saved it to a file named: ~/.screenlayout/monitors.sh

Finally, last step, go to a shell and save a new lightdm.conf:

sudo gedit /etc/lightdm/lightdm.conf

If your system is like mine, you won't have a lightdm conf file yet so gedit will be blank, that's fine, copy in the following settings (editing the path with the place you saved the monitor layout file from the arandr in the previous step):

[SeatDefaults]

greeter-setup-script=/home/username/.screenlayout/monitors.sh

More information about config settings and hooking up callback scripts to run before and after events around LightDM can be found here:

https://wiki.ubuntu.com/LightDM#Adding_System_Hooks

Ok, if anyone is reading this and having the same issue, at least this worked for me when several other attempts using other config parameters and methods slightly similar failed.

Good luck, and if anyone has a solution that works with Unity-Greeter that would still be really great.

It would also still be great to find out the answer to the original question: Where does Unity/Unity-Greeter Load X Configuration From?

I've had the same problem, and after some experimentation it looks as if one can set the configuration for unity-greeter in the file:

/usr/share/glib-2.0/schemas/com.canonical.unity-greeter.gschema.xml

Once this is properly edited, one must run, as root

glib-compile-schemas /usr/share/glib-2.0/schemas

which will read the xml and create/update the file:

/usr/share/glib-2.0/schemas/gschemas.compiled

This is the file from which the Unity greeter takes is configuration cues.

I'd like to know if there's a proper GUI utility to handle the editing and compilation of this and other schemas in the same directory.


How to make append-able CD? Possible Duplicate:
  Why is it not possible to burn a multisession DVD using brasero?

I want to make a append-able CD so that I can write data to it any time I want. I could do this using the native CD burner of Windows XP/7. But I know how to do this in windows. Can anyone help me?

Answer on this link as said by user68186 :

  Why is it not possible to burn a multisession DVD using brasero?


How to find all PDF files in directories and their subdirectories? I want to list all PDF files in the directories of the current working directory. What command can do this?

I remember a combination of ls and */*.pdf but don't remember what exact combination.

You can use:

find -iname '*.pdf'

with ls maybe:

ls -lR | grep '/\|pdf$'

Simplest way will be:

locate *.pdf

This command will find all the PDF files present in your system.


/boot is almost full preventing Software Updates I can't do a software update because /boot is almost full. I, as root deleted unneeded files, but it didn't change the space problem. Trash shows that it's empty, and I can't get run gksudo nautilus to access roots trash to empty it. So basically, I can't do any more upgrades if they involve /boot.

How do I empty root's trash?

Try this:

Open a terminal,Press Ctrl+Alt+T

Run it:

$ sudo -i
# OLDCONF=$(dpkg -l|grep "^rc"|awk '{print $2}')
# CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
# LINUXPKG="linux-(image|headers|ubuntu-modules|restricted-modules)"
# METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
# OLDKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL)
# apt-get clean
# apt-get remove --purge $OLDCONF
# apt-get remove --purge $OLDKERNELS
# rm -rf /home/*/.local/share/Trash/*/** &> /dev/null
# rm -rf /root/.local/share/Trash/*/** &> /dev/null

According to this topic the root's trash has to be in `/root/.local/share/Trash'

Just open a terminal and type (after sudo -s enter your password, no characters will be shown):

sudo -s
rm -rf /root/.local/share/Trash

It's going to delete the Trash folder too.


Is it possible to install Ubuntu on a Craig CLP281 netbook? The netbook was sold with Android (2.2) on it.  It only has 4 GB of built in storage.  Is that enough to install a minimal Ubuntu install onto?

If so, how would I go about doing it?

Here are the specs.

Thanks!

It turns out it's not possible.  I asked on superuser.com how to get it to boot from a USB stick and was told that it doesn't boot from the flash memory, only from its firmware.

put ubuntu on firmwareinstall folder, put the folder at sdcard root and HERE YOU GOT MY FRIEND!


Can you run Fortnite on Ubuntu 16.04 Can you run Fortnite on Ubuntu 16.04. When I use Wine 3.1 it pauses when it downloads.
Is there any way to run it?

Fortnite is a co-op sandbox survival game developed by Epic Games and People Can Fly, with the former publishing it. The game was released as a paid-for early access title for Microsoft Windows, macOS, PlayStation 4 and Xbox One on July 25, 2017, with a full free-to-play release expected in 2018.

The anti-cheat system will not allow you to play over wine or PlayOnLinux.
But you can run a KVM+QEMU high-efficiency virtual machine with Windows installed that should let you play with good performance.

Though I like some of the answers they both were given with assumptions that it's not going to work, so here's an answer I found from a reddit winehq maintainer of Fortnite support on Wine;

https://www.reddit.com/r/FORTnITE/comments/6rtlki/fortnite_on_linux_it_works/


Download files from a list How can I download files (that are listed in a text file) using wget or some other automatic way?

Sample file list:

www.example.com/1.pdf
www.example.com/2.pdf
www.example.com/3.pdf

wget has a built-in flag for this: wget -i your_list, where your_list is a file containing URL's delimited by linebreaks.
You can find this kind of thing by reading man wget

I just tested this:

xargs -a download_file -L1 wget

It works for me.
Links inside the txt file must be in separate lines.


Could I remove apt with apt? I know that I can use apt-get remove <package> to remove a program.

But apt is a program itself. Could I use apt-get remove apt to remove it, or would it get confused part way through?

APT lets you simulate your commands using the option -s. You can try this yourself, issuing the command apt-get -s remove apt (no sudo needed).

This yields the following output:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apturl-common xul-ext-ubufox
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  apt apt-utils apturl nautilus-share python3-software-properties
  software-properties-common software-properties-gtk ubuntu-desktop
  unattended-upgrades
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  apt
0 upgraded, 0 newly installed, 9 to remove and 0 not upgraded.
Remv ubuntu-desktop [1.341]
Remv nautilus-share [0.7.3-1ubuntu5]
Remv apturl [0.5.2ubuntu9]
Remv software-properties-gtk [0.96.13.1]
Remv software-properties-common [0.96.13.1]
Remv python3-software-properties [0.96.13.1]
Remv unattended-upgrades [0.86.2ubuntu1]
Remv apt-utils [1.0.10.2ubuntu1]
Remv apt [1.0.10.2ubuntu1]

So the answer should be: yes, you can.

I swear I saw the apt binaries under /usr/local/bin on an Ubuntu-based system not long ago, but they're not there on my current Ubuntu MATE 15.04 system (they're in /usr/bin with most of the other binaries). If it was in /usr/local/bin then it probably wouldn't be possible to uninstall it with apt because the files in /usr/local/bin are supposed to be ignored by the package manager. I must admit that putting apt (and dpkg as well) under /usr/local/bin would be a good idea.

A more interesting question is - what happens if you uninstall dpkg? Sure enough, dpkg is listed as a package by apt, but I'm not going to try uninstalling it now (haven't got a virtual machine set up at the moment). Theoretically one could also uninstall it with dpkg itself. I'm going to take an educated guess that the only way to re-install it would be to do so manually, then hope that it picks up the existing configuration files (so you don't have to manually tell the system all over again what packages are installed) and then tell it that the package dpkg is now installed again.

(A joke:) A Debian user's equivalent of # rm -rf / is # apt-get purge ".*".


Why does a new Samba share show up later, but not directly after creation? My machine: Ubuntu 20.04
I created a share on my samba server. Pretty cut and dry. I can access the server from the backend via ssh, and navigate freely.
However, if I try to reach it from my file explorer (I have both Nautilus and Nemo), it tells me "No such file or directory."
Here's the relevant share config in /etc/samba/smb.conf:
[CALL_ARCHIVES]
comment = For samba share of volume tank
vfs objects = glusterfs
glusterfs:volume = tank
glusterfs:logfile = /var/log/samba/glusterfs-tank.%M.log
glusterfs:loglevel = 7
path = /CALL_ARCHIVES
read only = no
valid users = backup root
write list = backup
create mode = 0775
directory mode = 0775
kernel share modes = no

BUT, if I wait until the next day, I can see it. I tried restarting network services on my end with service network-manager restart, but that did not work. What can I flush/clear that will allow me to see it immediately?
One more thing. My samba server has a public address, 192.168.75.36 that is used as a high availability IP, instead of accessing the actual IP of the machine, which is 192.168.75.35.
Here is the /etc/ctdb/public_addresses file:
[root@san01 tank]# cat /etc/ctdb/public_addresses
192.168.75.36/19 enp3s0f1

Here are the two physical IPs of the two samba machines:
[root@san01 ctdb]# cat nodes
192.168.75.35
192.168.75.37

When I couldn't see the new share from the 75.36 IP, I was able to see it from the 75.35 IP. Now, I can see it from both (smb://192.168.75.36/ARCHIVE_CALLS and smb://192.168.75.35/ARCHIVE_CALLS within my file explorer).
So what do I need to do to make this visible immediately?

Unfortunately you are going to have to go to an entire different OS, try Debian.
This will never ever work in Ubuntu.
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1807177


Video LAG on Ubuntu 20.04 / Lubuntu 20.04 AMD Athlon 64 3200+ @ 2GHz I'm a noob to Ubuntu. and would appreciate some help
I have this old machine that had XP, it was useless, and figured I'd install a light weight OS Lubuntu was the Idea. however I continued to install  the only familiar Distro Ubuntu 20.04 with Lubuntu over it, I'm not really sure what I did, and with minor problems it is up and running better than expected, but the video on youtube and on vlc tends to be choppy and lag, before and after the Lubuntu graphical install--- the sound works great so does everything else.
My idea was to turn this oldie into a media machine, for streaming videos etc.
I'm ready to do any thing that will accomplish a nice stream.
here are some specs, hopefully you understand more than I do what I should do
    yyyyy- -yyyyyy+      OS: Ubuntu 20.04 focal
           ://+//////-yyyyyyo      Kernel: x86_64 Linux 5.4.0-40-generic
       .++ .:/++++++/-.+sss/`      Uptime: 2h 36m
     .:++o:  /++++++++/:--:/-      Packages: 1921
    o:+o+:++.`..```.-/oo+++++/     Shell: bash 5.0.16
   .:+o:+o/.          `+sssoo+/    Resolution: 1440x900
  .++/+:+oo+o:`             /sssooo.   DE: LXQt 0.14.1
 /+++//+:`oo+o               /::--:.   WM: OpenBox
 \+/+o+++`o++o               ++////.   WM Theme: frost
  .++.o+++oo+:`             /dddhhh.   GTK Theme: Arc-Dark [GTK2],  Arc-Dark [GTK3]
       .+.o+oo:.          `oddhhhh+    Icon Theme: Papirus-Dark
        \+.++o+o``-````.:ohdhhhhh+     Font: Ubuntu 11
         `:o+++ `ohhhhhhhhyo++os:      Disk: 12G / 148G (9%)
           .o:`.syhhhhhhh/.oo++o`      CPU: AMD Athlon 64 3200+ @ 2GHz
               /osyyyyyyo++ooo+++/     GPU: AMD/ATI RV370 [Radeon X300/X550/X1050 Series]
                   ````` +oo+++o\:     RAM: 1060MiB / 1483MiB

sudo lshw | grep product | head -n1 && sudo lshw | grep display && sudo lspci -v -s $(lspci | grep ' VGA ' | cut -d" " -f 1)
    product: System Product Name
           *-display:0
           *-display:1 UNCLAIMED
02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV370 [Radeon X300/X550/X1050 Series] (prog-if 00 [VGA controller])
        Subsystem: GeCube Technologies, Inc. RV370 [Radeon X300/X550/X1050 Series]
        Flags: bus master, fast devsel, latency 0, IRQ 25, NUMA node 0
        Memory at d8000000 (32-bit, prefetchable) [size=128M]
        I/O ports at e000 [size=256]
        Memory at fbdf0000 (32-bit, non-prefetchable) [size=64K]
        Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: [50] Power Management version 2
        Capabilities: [58] Express Endpoint, MSI 00
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [100] Advanced Error Reporting
        Kernel driver in use: radeon
        Kernel modules: radeonfb, radeon

For such old timer machine, you better try anything based on Ubuntu 16.04 LTS. For instance, Linux Mint XFCE flavour.
I believe that newer kernel removed support for old Radeons such as RV370 in your case.
So it's GPU issue, not CPU.
Just try Mint 18.3 (latest in 18. series) and see if it works better, I had similar case.
https://www.linuxmint.com/release.php?id=31


How can I restore one file from my crashed bacula system How can I restore one file from my crashed bacula system.I just want to restore one of the file that are in my bacula system that  crashed.

Do you have a volumes with your backups available? If yes, use a bextract utility for that.


No internet connectivity in Ubuntu Issue:
No network connectivity on ubuntu VM  through wired connection.Cant use WIFI.

I tried this question(Can't connect to a network at all) and started troubleshooting with this one (Can't connect to a network at all)..

below is some info which may help you.I tried to solve this for more than 2 days.but no luck

IP of host :

vmware settings:

ifconfig:

/etc/network/interfaces:

auto lo
iface lo inet loopback

auto ens33
iface ens33 inet dhcp

ubuntu screenshots:

things done so far with out any success
1.restart of network manager
2.changed from nat to bridged and vice versa
3.mac address changed to ens33

What worked :
changing from vmware work station to vmware player worked

Your issue is broken routing somewhere. First, make sure you have connectivity on your windows host.

Sounds dumb but if this is a new install I would restart your computer and make sure all the needed processes for VMware are running.

I think your configuration should work (and that you might want to use NAT instead of bridge mode since your host is Windows, but I'm not too familiar with VMware) but for some reason VMware DHCP server is not enabled/running on the NAT interface (that's why I said reboot and check everything is running) or your vm is not linked to the NAT interface.

Could you provide the output on the host for:
ipconfig /all
route print
Could you provide the output on the guest vm for:
cat /etc/resolv.conf
ip a s
ip r

Not sure if this will work, you may have to experiment a bit,
First under the Ethernet Tab you need to select a device.
Under the IPV4 Tab you need to select
(Automatic)DHCP Addresses Only
have set mine to the google DNS
DNS Servers:8.8.8.8, 8.8.4.4

And you may also have to set it to Bridged....


Having trouble using Ubuntu 12.04 ISO in Virtual Box I followed step-by-step from this site :

Installing Ubuntu inside Windows using VirtualBox
This is my system info:

        System Information
        -———————-
        Time of this report: 11/14/2012, 22:40:29
        Machine name: CHRISTOPHER-PC
        Operating System: Windows 7 Home Premium 64-bit (6.1, Build 7601) Service Pack 1   (7601.win7sp1_gdr.110622-1506)
        Language: English (Regional Setting: English)
        System Manufacturer: System manufacturer
        System Model: System Product Name
        BIOS: BIOS Date: 02/05/10 19:13:52 Ver: 08.00.10
        Processor: Intel® Core™ i5-2500K CPU @ 3.30GHz (4 CPUs), ~3.3GHz
        Memory: 8192MB RAM
        Available OS Memory: 8174MB RAM
        Page File: 2227MB used, 14117MB available
        Windows Dir: C:\Windows
        DirectX Version: DirectX 11
        DX Setup Parameters: Not found
        User DPI Setting: Using System DPI
        System DPI Setting: 96 DPI (100 percent)
        DWM DPI Scaling: Disabled
        DxDiag Version: 6.01.7601.17514 64bit Unicode
        DxDiag Previously: Crashed in Direct3D (stage 2). Re-running DxDiag with “dontskip” command line parameter or choosing not to bypass information gathering when prompted might result in DxDiag successfully obtaining this information

I get the following VirtualBox Error:
        Failed to open a session for the virtual machine Ubuntu 64bit.

    VT-x features locked or unavailable in MSR.
    (VERR_VMX_MSR_LOCKED_OR_DISABLED).

    Result Code: E_FAIL (0x80004005)
    Component: Console
    Interface: IConsole {db7ab4ca-2a3f-4183-9243-c1208da92392}

I have no idea what's going on.  I got Ubuntu up on running on my laptop, but I just got a desktop and I can't seem to get it working.

Downloaded ubuntu-12.04.1-desktop-i386 from Ubuntu 12.04.1 LTS (Precise Pangolin)

For optimal performance of Virtual Box we need to enable VT-x (on Intel systems) or AMD-V (for AMD systems) in our BIOS settings in case our CPU has this feature.

To use this virtualization technology we then can enable this in the system settings for a virtual machine from Virtual Box Manager (Settings -> System -> Acceleration).

By doing so we are even able to run a 64-bit guest on a 32-bit host.

The architecture of the virtual machine (32- vs. 64-bit) also needs to be defined in the machine's General settings. In your case when installing the -i386-version this would be 32-bit (for 64-bit use the -amd64-images).

See also the following question: amd64 virtual machine in virtualbox

You have to be an administrator to run Virtualbox. Right click and choose "Run as administrator"


How to reinstall network manager without internet access? Unfortunately, I uninstalled network-manager-gnome using sudo apt-get remove --purge network-manager. I was trying to reinstall it from but without internet connection I cannot do so. What is the solution for this?

sudo dhclient eth0

then you will have internet and you can use...

sudo apt-get install network-manager

Manually configure your ethernet card in /etc/network/interfaces and restart the networking service. Then apt-get update.


Low screen resolution but no xorg.conf file Earlier this evening my system's graphics hung, all I could see was a green screen. I reset and could not get to a login GUI and was presented with a black screen, however Ctrl-Alt-F* keys opened up new terminal sessions, so I tried reinstalling the NVIDIA drivers that I had. No joy.

Before this issue, I had 3 drivers installed:

nvidiafb
nouveau
nvidia_304

However, 0 of them were active. By purging the NVIDIA drivers, I could get back to nouveau - however this is locked to a resolution of 640x480 on one monitor and there is no xorg.conf file to be found.

It seems that the NVIDIA drivers do not work on my system, as the graphics are completely gone, however up until now the system has managed to work with 3 drivers and 0 of them being active.

Are there any troubleshooting steps that I could take to increase the resolution and get both of the displays operating again? All answers that I could find resulted in ensuring that nouveau wasn't blacklisted and removing the xorg.conf file.

Ubuntu OS Version: 16.04

Edit: I should probably add that the version of nouveau that I have installed is listed as being compatible with arm64 architectures like so. I'm not sure if this is standard for the driver but I am currently running a 64bit Intel i5-3570k processor, which seems like it may be a potential root of the problem. Hopefully this helps.

Edit 2: Graphics card: NVIDIA GTX 670.

The nVidia GTX670 (reference board) requires proprietary drivers v. 367 or newer. The nvidia-304 you have/had installed doesn't support this card as is meant for legacy hardware only.

Purge and install a correct driver:

sudo apt purge nvidia*

(don't forget the "*")

Now open Settings -> Software Properties (or Software & Updates) -> Additional drivers -or- search "Additional drivers" in the dash.

Select the recommended nvidia driver (must be v. 367 or higher, the picture is for illustration only) and Apply Changes . Reboot.

Considering the drivers offered in 16.04 aren't working as desired, a new repository (PPA) should be added

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

sudo apt purge nvidia*
sudo apt install nvidia-378

-or-

sudo apt install nvidia-381

Fully update: sudo apt full-upgrade

Try this:

sudo apt-get install x11-xserver-utils

( That won't hurt if you already have it. )

Then:

xrandr

A + sign should appear beside the ideal rez. A * should appear beside the current setting. To change:

xrandr -s WxH

where W and H are the numbers from the rez you choose to use, presumably the one with the + by it. Won't work for all systems, but won't hurt to try it.


How to install Ubuntu on 'C' partition without affecting D? Sorry to look stupid but it's my first time to install ubuntu or any linux distro actually. I got my HDD with C & D partitions. The 'D' partition has so much important files while 'C' is for windows. I wanna install ubuntu on the 'C' partition without affecting the D partition. Can anyone explain in steps! Thanks :)

You may consider:

Use a virtual machine (VM). Options are: VMware Workstation Player (https://my.vmware.com/en/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/12_0), and VirtualBox (https://www.virtualbox.org/wiki/Downloads). Upon installation of one of those virtual machine software, you should be able to create a virtual machine, then create its virtual hard drive as a file on your C drive. If you are not satisfied with your virtual machine and want to delete it, you can safely delete the virtual machine's home folder on your physical hard drive.
For Windows 7 or lower, use "wubi" (See this for details: https://wiki.ubuntu.com/WubiGuide). This tool comes with an official Ubuntu installation image. You can run "wubi" in your Windows from the image. It creates a virtual hard drive which you can choose its location and size. It also adds an Ubuntu item into your Windows boot manager.
If you want to install an independent installation of Ubuntu - not recommended if you are new to Linux, you CANNOT install it in any existing Windows partitions (C:, D:, or whatever visible in Windows) because Linux and Windows should use different file systems by default to ensure normal operation (ext4 and NTFS respectively). In this way you have to shrink one of your current partitions, and create an ext4 partition for Ubuntu (probably a Linux swap partition too).


Cannot connect XBOX 360 wireless controller on Ubuntu 16.04 ( xboxdrv cannot found controller ) Hello everyone I am trying to connect Xbox 360 wireless controller via Bluetooth on Ubuntu 16.04.

First of all, I made sure that my pad was detected and paired by the system:

img

But these colored bars disappear and appear again I don't know why...
Then I found a tutorial on how to connect controller to Ubuntu:
Link

But I can't start these services at all:

sudo systemctl enable xboxdrv.service
sudo systemctl start xboxdrv.service

When I enter sudo systemctl enable xboxdrv.service
I got an error:

"Failed to execute operation: File exists"

and "Failed to start xboxdrv.service: Unit xboxdrv.service not found.
" when I enter sudo systemctl start xboxdrv.service

Running xboxdrv of course produces an error:

"-- [ ERROR ] ------------------------------------------------------
No Xbox or Xbox360 controller found
"

I am asking for help, I completely do not understand what the problem is...

First off, there are no Bluetooth Xbox 360 gamepads. Probably you have an "Xbox Wireless Controller", also known as an "Xbox One S controller".

Second, you don't need an XInput driver (like xboxdrv or xpad) to use Xbox One controllers over Bluetooth. When connected over Bluetooth, they are treated as Bluetooth HID devices and do not require a driver. So the "No Xbox or Xbox360 controller found" error is probably correct and not an issue for getting this device to work over Bluetooth.

Third, there's an issue with the BlueZ Bluetooth stack (which is used by many Linux distros, including Ubuntu) that causes Xbox One controllers to not stay connected. The device will pair successfully and seem to connect, but immediately disconnects. As a workaround, you can set the disable_ertm option to 1 which will allow the device to stay connected.

https://bbs.archlinux.org/viewtopic.php?id=226610

This causes issues that exactly match what you describe with the disappearing signal strength bars so it's likely that this fix will work for you. (Note: you'll need to do this after each reboot, so put it in a startup script if it works.)

sudo echo 1 > /sys/module/bluetooth/parameters/disable_ertm

Fourth, as mentioned in a comment above there is a firmware versioning issue. This was more of a problem a few years ago but may still bite you on 16.04. Basically, Microsoft decided to update the controller's firmware and changed the Bluetooth HID mode to make it more compatible with Android devices while leaving the USB mode unchanged. When they did that, they essentially made it so the controller, when connected over Bluetooth, looked like a "new" device that wasn't recognized by any drivers or games. It didn't start working again until developers updated their apps with the info for the "new" device. Getting new devices to be supported properly is always a challenge, but in this case it was particularly bad because so many people already had the device and it was broken intentionally. At this point it's less of an issue because most apps support both firmware revisions.


problem with ubuntu touch Running:

phablet-flash ubuntu-system --no-backup

I get the following message:

INFO:phablet-flash:Device detected as C1505

ERROR:phablet-flash:Unsupported device, autodetect fails device

can you help me ?
thanks

Are you using an xperia?
 I see that C1505 might be their code.
It's only supported for Nexus phones right now. To force the Nexus 4 (mako) install try this:

sudo phablet-flash ubuntu-system --no-backup -d mako

Make sure you don't mind bricking this phone if it's not a Nexus 4.


Broken apt-get state after apache install error I tried to install php5 via

sudo apt-get install php5

on my ubuntu 14.04 machine. It didn't install properly, because there were problems with the package apache2.

So if I try to install anything, I just get

Die folgenden Pakete haben unerfüllte Abhängigkeiten:
libapache2-mod-php5 : Hängt ab von: apache2 (>= 2.4) soll aber nicht installiert werden
E: Unerfüllte Abhängigkeiten. Versuchen Sie »apt-get -f install« ohne Angabe eines Pakets (oder geben Sie eine Lösung an).

Or in english (roughly translated)

The following packages have unmet dependencies:
libapache2-mod-php5 : Depending: apache2 (>= 2.4) but shall not be installed
E: Unmet dependencies. Try "apt-get -f install" without a package.

When I run the the recommended command, I get

Vorbereitung zum Entpacken von .../apache2_2.4.7-1ubuntu4.1_amd64.deb ...
/var/lib/dpkg/tmp.ci/preinst: Zeile 118: a2query: Kommando nicht gefunden.
dpkg: Fehler beim Bearbeiten des Archivs /var/cache/apt/archives/apache2_2.4.7-1ubuntu4.1_amd64.deb (--unpack):
Unterprozess neues pre-installation-Skript gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von: /var/cache/apt/archives/apache2_2.4.7-1ubuntu4.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Again, a poor translation:

Preparing extraction .../apache2_2.4.7-1ubuntu4.1_amd64.deb ...
/var/lib/dpkg/tmp.ci/preinst: Line 118: a2query: Command not found.
dpkg: Error with processing the archive /var/cache/apt/archives/apache2_2.4.7-1ubuntu4.1_amd64.deb (--unpack):
Subprocess new pre-installation-Skript returned error value 1
Errors occured while processing: /var/cache/apt/archives/apache2_2.4.7-1ubuntu4.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

How can I fix that now? Any installation requires me to finish this apache installation stuff, which never works. Any help appreciated.

View this thread https://superuser.com/questions/716194/cant-install-apache2-on-debian-jessie

And delete /etc/apache2 if it exists

Or try this:

sudo dpkg --fsys-tarfile /var/cache/apt/archives/apache2_2.4.7-1ubuntu4.1_amd64.deb | tar xOf - ./usr/sbin/a2query > /usr/sbin/a2query
sudo chmod 755 /usr/sbin/a2query
sudo apt-get install -f

This will pull a2query out of the .deb package you've already downloaded and place it where it needs to be with the correct permissions. Then do install -f again to fix broken dependencies

As ElefantPrice indicated in a comment, https://superuser.com/questions/716194/cant-install-apache2-on-debian-jessie has the solution.

There was an existing directory /etc/apache2 (actually, I don't know why). Deleted it, so it worked.


Removing the white dots from lightdm on 15.04 I have tried the approach that I have used before on earlier releases of Ubuntu but on 15.04 I have found that the following commands are not working.

sudo xhost +SI:localuser:lightdm

sudo su lightdm -s /bin/bash

gsettings set com.canonical.unity-greeter draw-grid false

When I run the last command I get the following:

(process:5354): dconf-WARNING **: failed to commit changes to dconf: Error spawning command line 'dbus-launch --autolaunch=1af246dec6324e1ca014e1c3c06da71c --binary-syntax --close-stderr': Child process exited with code 1

Can anybody suggest what I'm doing wrong, or ways that I could diagnose what is failing?

Cheers

Install Ubuntu Tweak. It still works although it hasn't been updated for a while. You can download the deb package from here: https://launchpad.net/ubuntu-tweak
Start Ubuntu Tweak, go to Tweaks > Startup > Login Settings. There you should be able to "Unlock" Root privileges and select some LDM Preferences like "Draw Grid".

According to the (German) Wiki of ubuntuusers.de, starting from Ubuntu 12.04 you need to use the dconf-editor GUI tool. You start it just as you did with gsettings set before: Giv the 'lightdm' user account access to your GUI (xhost), switch to that user account (su) and start dconf-editor

xhost +SI:localuser:lightdm
sudo su lightdm -s /bin/bash
dconf-editor


How to identify broken symlinks? I have more than 1000 icons in a single directory and also there are hundreds of shortcuts (symbolic links?) inside that directory with different names, some of symbolic links are broken, i need to find which symbolic links are broken.

i tried using ls -l but it is difficult to use.

How do i do that? And is it possible to fix broken symbolic links. Thanks

This will list you all broken links:
    find . -type l -exec sh -c "file -b {} | grep -q ^broken" \; -print

It should work with the find option -xtype
(note the x - not the more common option -type):

find . -xtype l

The option is pretty obscure - so obscure that I don't dare to summarize it here. See man find if adventurous.


Unable to locate VLC package in my repositories? When I try to install VLC using apt-get, I get the following error:

parameswaran@parameswaran-Compaq-Presario-CQ61-Notebook-PC:~$ sudo apt-get install vlc
[sudo] password for parameswaran:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package vlc

It's happening in my Ubuntu i386 Compaq Presario cq61, and I'm new Ubuntu user.

Somebody please tell me how to solve this issue and install packages in my laptop?

vlc is in universe repository. Most probably that's not enabled. You can either go to software center to add it run

 sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"

(copied from How do I enable the "Universe" repository?)

After that, run

 sudo apt-get update
 sudo apt-get install vlc

Open up the terminal and run software-properties-gtk, change server to main server
then run:

sudo apt-get update
sudo apt-get install vlc


LibreOffice Calc problem loading large files Calc stops responding when opening ~30mb .xlsx
My task is to open the .xlsx and export it as a csv.

Is there a way (on Ubuntu) limit the number of rows that are loaded into memory?

After attempting 10 times, I got the file open, but it took 5-10 minutes minutes. The file contains ~150.000 rows and 10-20 columns each, on 5 sheets. (no images, pure text). Similar files open slowly with Calc but will eventually open.

My pc has 16BG ram and i7 cpu, so I doubt it is a hardware issue.
This problem does not happen with MS Office Excel, but Excel has other problems, so I can't use it.

Note: After opening the file, Calc uses 650mb ram, and the total capacity is at 25%.

save file as .ods and open it. worked for me.
follow this link to save your excel files.
https://support.microsoft.com/en-us/office/use-excel-to-open-or-save-a-worksheet-in-the-opendocument-spreadsheet-ods-format-c7114baa-f08a-49eb-aefd-f5d61ed347cd


how do you remove the "Search Your Computer" icon from launcher in Ubuntu 16.04 Is there a set of commands that can be entered to remove the "Search Your Computer" icon from the launcher in Ubuntu 16.04? It does not let you just unlock from launcher like other icons in the launcher

You cannot remove the main Ubuntu logo icon from the launcher.

It is the Dashboard Icon. It is the fast and easiest way to finding applications installed and other useful items. Pressing the Windows Key will open it (aka SUPER key in forum answers), to close without mouse, hit ESC. As the poster above me said, it can't be removed.


How do I install steam on a 64bit system? Alright so my computer is 64-bit and I only want to use Linux to install Steam, play Team Fortress 2 and get that penguin item but It's not working out for me. The version of Ubuntu I installed was the "Wubi.exe" which let's me use it along with Windows. But when I get it up and download the Steam .deb file, it tells me "Wrong Architecture 'i386'". What do I have to do to run Ubuntu alongside windows without using a CD/USB stick?

Open the terminal and type:

sudo dpkg --add-architecture i386
sudo apt-get update

Try installing it after doing that.

For future reference look: https://wiki.ubuntu.com/MultiarchSpec & https://help.ubuntu.com/community/MultiArch

Steam needs to install these additional i386 packages:

libgl1-mesa-dri:i386, libgl1-mesa-glx:i386, libc6:i386

I want to download the app steam, but I click on the app and the text is
now what I do to open steam.

You are missing the following 32-bit libraries, and Steam may not run:

libc.so.6

and this to click close.


Conveniently schedule a command to run later? What's a simple way to run a command, say, 8 hours from now? I can think of this way:

nohup bash -c "sleep 28800 ; ./mycommand.sh" &

Is there a more "proper" way?

You can use the at command.  The at execute commands at a later time. The at utility shall read commands from standard input and group them together as an at-job, to be executed at a later time.

Usually, at is installed by default in Ubuntu, but if your release doesn't include it, install via:

sudo apt-get install at

For more information, options, examples, and others, see the manpage in man 1 at.

Example of a relative time specification (note the space between + and the duration):

at now + 8 hours -f ~/myscript.sh

You can also use convenient shorthands, like tomorrow or noon, as in

echo "tweet fore" | at teatime

Note: This will run the command to the left of the pipe immediately - and its output (which is piped to at) will be run by at at the scheduled time. So, the above command schedules tweet fore to be run at teatime.

The example also demonstrates how you can pipe actions into at.  at -c is the way you can examine scheduled actions, which you can conveniently list with their number, as with:

at -c 3

If you are running bash on a mac you will run into some difficulties using the at program. In that case you can improve on your original proposed solution of,
nohup bash -c "sleep 28800 ; ./mycommand.sh" &

with this,
nohup bash -c "sleep $(echo '8 * 60 * 60' | bc) ; ./mycommand.sh" &

which is a more readable form of how long you want to wait. In this example 8 is the number of hours you want to wait before running your script mycommand.sh.


What version of Python do I have? How can I find out what versions of Python I have?

I am using Ubuntu 14.04 (Trusty Tahr).

You can use python -V (et al.) to show you the version of Python that the python command resolves to. If that's all you need, you're done. But to see every version of python in your system takes a bit more.

In Ubuntu we can check the resolution with readlink -f $(which python). In default cases in 14.04 this will simply point to /usr/bin/python2.7.

We can chain this in to show the version of that version of Python:

$ readlink -f $(which python) | xargs -I % sh -c 'echo -n "%: "; % -V'
/usr/bin/python2.7: Python 2.7.6

But this is still only telling us what our current python resolution is. If we were in a Virtualenv (a common Python stack management system) python might resolve to a different version:

$ readlink -f $(which python) | xargs -I % sh -c 'echo -n "%: "; % -V'
/home/oli/venv/bin/python: Python 2.7.4

This is real output.

The fact is there could be hundreds of different versions of Python secreted around your system, either on paths that are contextually added, or living under different binary names (like python3).

If we assume that a Python binary is always going to be called python<something> and  be a binary file, we can just search the entire system for files that match those criteria:

$ sudo find / -type f -executable -iname 'python*' -exec file -i '{}' \; | awk -F: '/x-executable; charset=binary/ {print $1}' | xargs readlink -f | sort -u | xargs -I % sh -c 'echo -n "%: "; % -V'
/home/oli/venv/bin/python: Python 2.7.4
/media/ned/websites/venvold/bin/python: Python 2.7.4
/srv/chroot/precise_i386/usr/bin/python2.7: Python 2.7.3
/srv/chroot/trusty_i386/usr/bin/python2.7: Python 2.7.6
/srv/chroot/trusty_i386/usr/bin/python3.4: Python 3.4.0
/srv/chroot/trusty_i386/usr/bin/python3.4m: Python 3.4.0
/usr/bin/python2.7: Python 2.7.6
/usr/bin/python2.7-dbg: Python 2.7.6
/usr/bin/python3.4: Python 3.4.0
/usr/bin/python3.4dm: Python 3.4.0
/usr/bin/python3.4m: Python 3.4.0
/web/venvold/bin/python: Python 2.7.4

It's obviously a pretty hideous command but this is again real output and it seems to have done a fairly thorough job.

Easily, open the terminal and do the following:

Write

python

to verify your 2.x version
In my case, it will appear:

Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

For the 3.x, write:

python3

In my case, it appears:

Python 3.4.0 (default, Apr 11 2014, 13:05:11)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.

For both cases, to get out from Python shell, write:

 exit()


How do I make Sublime Text 3 the default text editor I'd like to replace gedit, and use Sublime Text 3 as my default text editor for all text files on my Ubuntu system. Can you let me know how do I go about making this change?

These instructions assume that you have installed Sublime Text 3 using the .deb file provided for Ubuntu. If you downloaded the tarball and installed it manually, you will need to change the paths below to your install location.

First, make sure that /usr/share/applications/sublime_text.desktop exists (sublime-text.desktop on some systems):

ls /usr/share/applications/sublime_text.desktop

Then, open /usr/share/applications/defaults.list with Sublime:

subl /usr/share/applications/defaults.list

Search for all instances of gedit and replace them with sublime_text. Save the file, log out and back in, and you should be all set.

If for some reason /usr/share/applications/sublime_text.desktop (or sublime-text.desktop) doesn't exist, create it:

sudo touch /usr/share/applications/sublime_text.desktop

Open it in Sublime:

subl /usr/share/applications/sublime_text.desktop

and paste the following into it:

[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=/opt/sublime_text/sublime_text %F
Terminal=false
MimeType=text/plain;
Icon=sublime-text
Categories=TextEditor;Development;
StartupNotify=true
Actions=Window;Document;

[Desktop Action Window]
Name=New Window
Exec=/opt/sublime_text/sublime_text -n
OnlyShowIn=Unity;

[Desktop Action Document]
Name=New File
Exec=/opt/sublime_text/sublime_text --command new_file
OnlyShowIn=Unity;

However, if you installed Sublime Text using the .deb file downloaded from sublimetext.com, the file should already exist.

Once you have Sublime installed, right-click on a text file. Go to the "Open With" tab. Select "Show other applications." Then, select Sublime Text 3.

Hope this helps!


How do I create a working indicator with Qt/C++? I am using Qt IDE in order to build my application so as to participate to the Ubuntu Showdown contest. In my application, I've done the following:

void show_app(MainWindow *data)
{
    //this works fine:
    app_indicator_set_status(appindicator, APP_INDICATOR_STATUS_PASSIVE);
    //this crashes the application:
    data->show();
}

void MainWindow::make_indicator()
{
    if(appindicator){
        //appindicator has already been created
        return;
    }
    appindicator = app_indicator_new("Format Junkie Indicator", "formatjunkie", APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
    GtkWidget* showapp_option;
    GtkWidget* indicatormenu = gtk_menu_new();
    GtkWidget* item = gtk_menu_item_new_with_label("Format Junkie main menu");
    gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), indicatormenu);

    showapp_option = gtk_menu_item_new_with_label("Show App!");
    g_signal_connect(showapp_option, "activate", G_CALLBACK(show_app), this);
    gtk_menu_shell_append(GTK_MENU_SHELL(indicatormenu), showapp_option);

    gtk_widget_show_all(indicatormenu);
    app_indicator_set_status(appindicator, APP_INDICATOR_STATUS_ACTIVE);
    app_indicator_set_attention_icon(appindicator, "dialog-warning");

    app_indicator_set_menu(appindicator, GTK_MENU (indicatormenu));
}

So, basically I am trying to make a simple indicator entry, which, on click, it will hide the indicator and display the application. The indicator can be successfully hidden using the PASSIVE thingy over there, but, during the call data->show();, the application crashes.

Any help on what I am doing wrong would be appreciated! Also, please help me to correct this problem I'm facing (alternatively, I will migrate to the old and good tray icon (it works fine in 12.04, anyway) which I can handle very easily and efficiently)

You shouldn't use libappindicator for creating an Application Indicator in Qt programs.  There's a better way!

If you have sni-qt installed that will automagically replace QSystemTrayIcon instances with the code for rendering that tray icon as a KDE Status Notifier Item, which the Application Indicator service will pick up and show in the Ubuntu menu bar.

I would say you try passing the "this" pointer as a pointer like "*this"
here

g_signal_connect(showapp_option, "activate", G_CALLBACK(show_app), this);

to

g_signal_connect(showapp_option, "activate", G_CALLBACK(show_app), *this);


can we remove GUI layer from ubuntu? Although this question looks little weird because Ubuntu is meant to be good on GUI based linux. But if I wanted to remove this GUI layer and wanted to leverage only terminal when I boot up my machine. Will this be possible ?
If so may I know the proc on how to do it.

Ubuntu Server is for exactly this kind of use. It operates in terminal mode all of the time, and takes up much less space as it doesn't contain all of the packages required for the GUI and other associated software.

If you wish to use your current Ubuntu Desktop installation in terminal mode, you can press:

Ctrl+Alt+F1

To switch to a virtual terminal. To get back to the GUI use:

Ctrl+Alt+F7

You can make your Ubuntu desktop boot to text mode by default you can edit the /etc/default/grub file. You'll probably want to make a backup of this file just in case something goes wrong.

Comment out the GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”, by
adding # at the beginning of the line, which will disable the Ubuntu purple screen.
Change GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX=”text”, this
makes Ubuntu boot directly into Text Mode.
Uncomment this line #GRUB_TERMINAL=console, by removing the # at the
beginning, this makes Grub Menu into real black & white Text Mode

So you'll end up with:

#GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
GRUB_CMDLINE_LINUX=”text”
GRUB_TERMINAL=console

In your /etc/default/grub file. Now it's time to put these changes into effect with:

sudo update-grub

For Ubuntu 15.04 and later

There is one further step for Ubuntu versions which use systemd by default. It's necessary to change the default target from "graphical" target to "multi-user" target.

sudo systemctl set-default multi-user.target

You can always revert to desktop boot later by restoring GRUB config file and running:

sudo systemctl set-default graphical.target

Now, when rebooting, you should find yourself in a lovely console only environment.

Yes, it is possible. You can remove the desktop by using:

sudo apt-get purge ubuntu-desktop

Warning!. This will remove all the related applications of Ubuntu desktop, like nautilus, Ryhtmbox, etc. You will have only a terminal system when it boot up. Be sure to check which applications are removed. Many sensible applications could be deleted.

For more information, look at this thread:

Remove desktop environments


How can I rotate my display in the most easy way? I am the lucky owner of a pivot monitor, which screen can be rotated (physically). What is the easiest way to make my display turn when I turn my monitor?

For the moment I first launch the 'Displays' app, and then change the settings and confirm. But this is in fact quite a laboured procedure, since I want to switch my orientation up to a few times per minute.

So is there an indicator for this, or equivalent? Can I set a keyboard shortcut that would launch a dedicated command? In fact I am thinking of something similar to the Windows program iRotate.

Go into Keyboard -> Shortcuts, select "Custom Shortcuts", and press "+" to add a new shortcut.

"Name" is a descriptive name for the action (i.e. "Rotate monitor"). In "Command" type the custom command to run when the shortcut is activated.

Once the shortcut is in the list, select its row, press ENTER, then the key combination you want to activate the shortcut. If there's a conflict, the shortcut manager will tell you so, and you can choose a different combination.

You can have shortcut to enable rotated display and another to bring it back to an upright position. You can even, if you're knowledgeable enough, write a command that maintains state and just toggles between upright/rotated.

Now, as for the command you need to use, it's probably xrandr:

xrandr --output HDMI1 --rotate left

xrandr --output HDMI1 --rotate normal

The output parameter depends on which port your monitor is plugged into. To see what you currently have, type:

xrandr -q

Mine says:

Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
   1366x768       60.0*+
   1360x768       59.8     60.0
   1024x768       60.0
   800x600        60.3     56.2
   640x480        59.9
VGA2 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)

In this case my --output would be LVDS1, as all the others are disconnected.

In addition to the script posted in derHugo's answer, On Kubuntu 20.10, I had to change it to {print $5} as well as using bash instead of plain sh. With those minor modifications, my script reads:
#!/bin/bash
# invert_screen copyright 20170516 alexx MIT Licence ver 1.0
orientation=$(xrandr -q|grep -v dis|grep connected|awk '{print $5}')
display=$(xrandr -q|grep -v dis|grep connected|awk '{print $1}')
if [ "$orientation" == "inverted" ]; then
   xrandr --output $display --rotate normal
else
   xrandr --output $display --rotate inverted
fi


How can I manually assemble my own package "the hard way"? I would like to know how to create my own .deb packages from the source of a program without the aid of a package manager or any other similar tool (in other words, doing it manually).  How difficult is this?  Do I need to create my own repository for this to work?  Do I need to sign it with my public key or something?  Will one deb package work for all Debian-based distributions, or do I need to build a separate version for each flavor?

Edit: I would like to point out the main difference between my question and "Simplest Debian Packaging Guide?", which is that, while the asker of that question wishes to create a package with minimal time and effort, I want to go the long way around, not for the sake of making it harder, but because I want to understand how the packaging system works.  In short, I want to learn.

How difficult is this?

Not so difficult at all. I do all my packaging from scratch. Once you know a few tools, and understand what's going on, the process is fairly simple. Be prepared to spend some time, learning the processes, though.

  Do I need to create my own repository for this to work?

A repository (such as a PPA) is for publishing your package to the wider world. So, yes, if you want people to be able to install the package, either you need to get it included in Debian/Ubuntu, or you need to publish it in a repository.

PPAs also have access to the Launchpad build farm, so they can build binary packages from source packages. But you can do this locally, too. And while packaging something, you really want to be test-building locally, rather than waiting for LP to build your package (the LP build queues can be hours long).

  Do I need to sign it with my public key or something?

If you want to upload to a PPA, you need to sign your source package with your private key.

  Will one deb package work for all Debian-based distributions, or do I need to build a separate version for each flavour?

The safe answer is no. But sometimes it's fairly straightforward to produce once deb that will work on all current Debian and Ubuntu releases. It depends on the package and the toolchain you used.

I suggest:

The Ubuntu Packaging Guide
This introduction to Debian packaging
The Debian New Maintainer's Guide

InkBlend, there is an experimental project on launchpad that aims to make this easier for applications:

https://launchpad.net/pkgme

The goal of the project is for it to be very easy for any developer to be able to create a Debian source package from the metadata already included in your source build system.

There is an older program called dh_make, which should be included with the 'ubuntu-dev-tools' package, but it is less automatic at figuring out what to do with your source code.

Finally, this guide is excellent and will explain all of the aspect of packaging:

http://developer.ubuntu.com/packaging/html/


How do i install Windows 7 on separate hdd and ubuntu on a separate drive? I just acquired a new ssd such that  don't have to use inventor through some virtual machine with windows on my ubuntu, but the problem is,  how do i easily  install windows on my second hard drive, and still have the option to dual boot between ubuntu and windows?

I read some post regarding this, and all them states that both of them have issues with the boot loaders, which i don't see should be a problem here as the OS's are being installed on separate drives.

My current OS is ubuntu, which is installed on my primary SSD.
The other one is empty => actually not at the moment, but yeah after I format it, it should be empty.

Can I somehow from ubuntu (my primary ssd) install Windows onto my second hard drive? if so how? and what about the boot loader, is it possible to add some form boot loading option, such that i can decide whether i want to boot from windows or ubuntu?

So... I had two problems.

NEVER use any Kingston related (in this case HyperX) USB drives for boot loading..  That won't work.
I didn't use ? grub as it didn't detect windows. Instead i installed grub , which with an sudo update-grub2 were able to find Win7.

Besides that and the multiple driver i had to find and install, everything worked out.  Thanks for the help.

You will install the windows 7 on the second hard disk.

You will configure your bios to use the first hard disk that has ubuntu for boot priority. (or make slave the second hdd (windows) and master disk the disk with ubuntu, that will work too)

Next you will configure grub, (if you don't have grub install it) and add the windows 7 hdd/+partition.

That would be my solution


Is there any danger if somebody knows my administrator password and has no physical access to my PC I am coming from Windows. In Windows there is something called remove desktop access. If someday is in the same LAN he can access PC via Remote Desktop knowing my password.
Is it the same with default installation of Ubuntu 18.04?
If I am in the same room with many students (library) and type password and someday sees it, can he access my Ubuntu laptop? Everybody is connected to same WLAN and can see each other’s PCs through network.

Yes, is the bottom line answer.
There have been a lot worse takedowns of major systems without passwords... so needless to say, with a password???
They will need, things like username, and access through services you may or may not have enabled. (ftp,ssh,http,rdp,or so on)... so it is 50/50 on that front...
But one would have to believe if someone obtains your password and wishes to enter your system, they have the key and will do so... and you should pretty much assume as much, always.

By default ubuntu comes with no password. If somebody knows your private IP on that WLAN connection they could definitely SSH into your system. However, even if you did set a password and somebody knows it, they will still be able to ssh in your system. If they do NOT know your password, then not really! I hope this answered your question!


Installing Slowmovideo on 14.04 when only Saucy package is available i like to install Slowmovideo. But on Launchpad there is no ppa for ubuntu 14.04 (Trusty). The latest supported ppa is for 13.10.

What options (if any) do I have to install the software on my ubuntu 14.04?

The doku for compiling the software says for the required packages:

apt-get install build-essential cmake git ffmpeg libavformat-dev libavcodec-dev libswscale-dev libqt4-dev freeglut3-dev libglew1.5-dev libsdl1.2-dev libjpeg-dev libopencv-video-dev libopencv-highgui-dev opencv-dev

But ubuntu normaly uses avconv. I'm not shure if i brake any other video or image editing software by installing those packages.

I eventually found this helpful almost completed fork for Debian Jessie after setting about building slowmoVideo under Ubuntu 14.04 myself. Try downloading valgit's code, then making a build directory in the same directory as the src directory, cd-ing into it, and then executing,

cmake ../src -DUSE_QTKIT=FALSE -DENABLE_TESTS=FALSE

The rest of the instructions are the same as those appearing in the Compiling section of the slowmoVideo website i.e.,

make -j3
sudo make install

This way everything builds fine for me, though I still get an error associated with finding libbamtools when CMake runs verify_app. The application itself is working fine, however. Thanks to tektektek and valgit for allowing this program to be built under 14.04.

You can compile it from source using the code from Github.
Tutorial is provided on the page.


I am trying to mount a dvd, but it does not work I type in:
mount /dev/sda2 /mnt/dvd

But this comes out:
mount: you must specify the filesystem type

The output of lsblk is:

sda      8:0    0 149.1G  0 disk
├─sda1   8:1    0 145.1G  0 part /
├─sda2   8:2    0     1K  0 part
└─sda5   8:5    0     4G  0 part [SWAP]
sr0     11:0    1   2.2G  0 rom

I can only assume that your DVD is a internal one with Master/slave jumpers set right in
Bios so the hardware is readable for Kernel or the system to be able to access its contents. Hard-disk usually master and other peripheral-devices like cd/dvd usually are slaves.

One way to find where your Cd/Dvd is listed mounted is to insert a cd/dvd in and open up your files in a file reader like nautilus or nemo or what ever is currently installed in your system or just click icon for Files.
Hoover over your Devices currently showing with your mouse pointer. If nothing shows up for your CD/Dvd when hoovering over your mouse over Devices when you have a cd/dvd disk in. If it did show up and your mouse is over the listed device will show you the path ex. Media / (computer or user name ) / Current label of the cd/dvd name.
You can go in to that folder and read what drive letter is assigned for your cd/dvd drive. Ex.cdrom0 or a other number for it so you can mount it permanently to the system.

Another way to do it is simply browse through the subfolders in /media (or could even be /mnt on older systems) until you find the one that shows your disc (you’ll need to have one in the drive, of course).

Or if you want to do it via the terminal, you can use
mount|grep ^'/dev'

which will display info as follows: This is just a Ex.
/dev/sda2 on / type ext3 (rw,relatime,errors=remount-ro)
/dev/sda1 on /media/Windows-XP-x64 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sr0 on /media/cdrom0 type iso9660 (ro,nosuid,nodev,user=ozzman)

As you see your Cd/dvd listed in that folder you can open that folder by owning root privligies for your file reader so you can modify it in your file system to make it be visible every time you boot up by modifying the mount point or do the following in terminal.

[Ubuntu] Mount/Unmount CD/DVD
in command line
To mount your CD/DVD:
Open a terminal ctrl+alt+t and type
sudo mount /media/cdrom0/ -o unhide
To unmount your CD/DVD:
Open a terminal and type:
sudo umount /media/cdrom0/ -l
Assuming that media/cdrom0 is the location of your CD/DVD rom.

That should mount your cd/dvd player to be part of your system when booting up.

If not can you repost here again.

How to mount cdrom in Linux

Detecting CD/DVD-ROM drives
Creating mount point
Mount CDROM
Mounting Audio CD's
Allowing users to mount CDROM
Umount and eject CDROM
Troubleshooting
7.1. Testing for ISO9660 support
CD's and DVDs are using ISO9660 filesystem. The aim of ISO9660 is to provide a data exchange standard between various operating systems. As a result any Linux operating system is capable of handling the ISO9660 file system. This guide describes a way on how to mount / umount ISO9660 file-system in Linux and thus enabling user to read data from CD or DVD media.*

If you still have some questions after reading this article please try our new LinuxCareer Forum.

Detecting CD/DVD-ROM drives
At first we need to find usable devices capable reading ISO9660 data. In other words we need to find CD/DVD drives available on our Linux system. In order to do that, we can use "wodim" command and its --devices option. wodim will scan and output symbolic device names found in /dev/* directory:

wodim --devices

If a wodim command is not available on your system make sure cdrecord package is installed on your system.

Debian and Ubuntu:

  Sudo apt-get install cdrecord

RedHat, Fedora, CentOS:

yum install cdrecord

Once you execute wodim command and you have some CD/DVD device hardware available in your system you should see an output similar to the one below:

  $ wodim --devices

  >wodim: Overview of accessible drives (1 found) :

 0  dev='/dev/scd0'     rwrw-- : 'TSSTcorp' 'CD/DVDW SH-S183L'

From the above output we can determine that our CDROM / DVDROM drive can be accessed at the symbolic location /dev/scd0.

Furthermore, it needs to be mentioned that different systems may behave differently. For example in Debian Linux a user running wodim command must belong to cdrom group, otherwise the wodim command will fail with an error message similar to the one below:

wodim: No such file or directory.
Cannot open SCSI driver!
For possible targets try 'wodim --devices'
or 'wodim -scanbus'.
For possible transport specifiers try 'wodim
dev=help'.
For IDE/ATAPI devices configuration,
see the file README.ATAPI.setup from
the wodim documentation.
2. Creating mount point
Your Linux system may already have created a mount point for you, it is usually something like  /cdrom, /media/cdrom, /media/cdrom0 or /mnt/cdrom . If this is not your case, feel free to create your own mount point. To have mount point available is a absolute must! Mount point will represent a place from where data located on CD or DVD will be made accessible to the user.

    sudo mkdir /media/cdrom

Mount CDROM
If you do not belong into cd-rom group and thus do not posses permissions to mount CD-ROM, switch to root user #sudo -i and execute a command below:

sudo mount -t iso9660 /dev/scd0 /media/cdrom

mount: block device /dev/sr0 is write-protected, mounting read-only
your CDROM is now mounted and accessible from /media/cdrom directory. At this point simply navigate to this directory to access your data.

Mounting Audio CD's
Sometimes you would like to listen to your favorite music and when you try mount music cd with a command above you can get problems like:

linuxcareer.com

mount -t iso9660 /dev/hdc /media/cdrom0/

mount: block device /dev/hdc is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/hdc,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

linuxcareer.com#
This is because music CD's does not contain standard iso9660 filesystem as such. In fact the story with music CD-ROMs is easier as it is with data CD-ROMs using iso9660 filesystem.

In order to listen to a music CD all what needs to be done is to insert music CD ( Compact Dics ) into CD-ROM/DVD-ROM drive and fire up you favorite music CD player. The only thing you may need to be concerned about is whether  "kdemultimedia-kio-plugins" package for KDE or "gnome-media" package for gnome window manager are installed. Those packages allow you to listen to music CD content.

In case you would like to see a content of your music CD or perhaps convert some music trakcs to MP3 / OGG format just start "KONQUEROR" and enter location:

audiocd:/
into Konqueror's navigation bar.

Allowing users to mount CD-ROM
You can also allow users on the system mount CD's or DVD's. To do that edit your /etc/fstab file and add line similar to the one below:

/dev/sdc0        /media/cdrom0   iso9660 ro,user,noauto  0       0

Umount and eject CDROM
There are couple ways how to remove/unmount CDROM.

unmount /dev/hdc

eject

or you can simply run:

eject

If you are unable to unmount your previously mounted CD-ROM, make sure that you are not in the directory where your CD-ROM is mounted or that some other application is not using it.

If you are still having problems to unmount your CD-ROM medium you can use fuser command to kill all related processes using your device.

fuser -mk /dev/hdc

eject

  NOTE: Never use the above command on devices mounted read/write unless you are sure what you are doing.

Troubleshooting

7.1. Testing for ISO9660 support
Although it is highly unlikely that your system does not support this specific filesystem here are some tips on how to test for ISO9660 presence in your Linux system.

In case you face some troubles try to search for loaded kernel modules with lsmod command or by reading a content of /proc/filesystem file:

cat /proc/filesystems | grep iso9660

or

lsmode | grep iso9660

The actual module is be a part of libiso9660 package. Both commands should report available ISO9660 filesystem.


What are zombie processes? With commands like top and the gui based System Monitor I can see that at the moment I have several zombie processes.

What are zombie processes?

Do they affect the performance of the system or the application they are zombie to. Do they use too much memory or any memory at all?

Zombies are DEAD processes. They can not be 'kill' (You cannot kill the DEAD).  All processes eventually die, and when they do they become zombies.  They consume almost no resources, which is to be expected because they are dead!  The reason for zombies is so the zombie's parent (process) can retrieve the zombie's exit status and resource usage statistics.  The parent signals the operating system that it no longer needs the zombie by using one of the wait() system calls.
When a process dies, its child processes all become children of process number 1, which is the init process.  Init is always waiting for children to die, so that they don't remain as zombies.
If you have zombie processes it means those zombies have not been waited for by their parent (look at PPID displayed by ps -l).  You have three choices: Fix the parent process (make it wait); kill the parent; or live with it.  Remember that living with it is not so hard because zombies take up little more than one extra line in the output of ps.
Zombies can be identified in the output from the Unix ps command by the presence of a "Z" in the STAT column. Zombies that exist for more than a short period of time typically indicate a bug in the parent program. As with other leaks, the presence of a few zombies isn't worrisome in itself, but may indicate a problem that would grow serious under heavier loads.
To remove zombies from a system, the SIGCHLD signal can be sent to the parent manually, using the kill command. If the parent process still refuses to reap the zombie, the next step would be to remove the parent process. When a process loses its parent, init becomes its new parent. Init periodically executes the wait system call to reap any zombies with init as parent.
There are also orphan processes which are a computer process whose parent process has finished or terminated.
A process can become orphaned during remote invocation when the client process crashes after making a request of the server.
Orphans waste server resources and can potentially leave a server in trouble (This is the biggest resource difference between zombies and orphans (Except if you see some orphan zombie movie). However there are several solutions to the orphan process problem:

Extermination is the most commonly used technique; in this case the orphan process is killed.

Reincarnation is a technique in which machines periodically try to locate the parents of any remote computations; at which point orphaned processes are killed.

Expiration is a technique where each process is allotted a certain amount of time to finish before being killed. If need be a process may "ask" for more time to finish before the allotted time expires.

A process can also be orphaned running on the same machine as its parent process. In a UNIX-like operating system any orphaned process will be immediately adopted by the special "init" system process. This operation is called re-parenting and occurs automatically. Even though technically the process has the "init" process as its parent, it is still called an orphan process since the process which originally created it no longer exists.
More Info:

http://wiki.answers.com/Q/What_is_Zombie_Process_and_Orphan_Process#ixzz1PCN9vojU
http://www.linuxsa.org.au/tips/zombies.html
http://www.brighthub.com/computing/linux/articles/79186.aspx
How to identify and kill hanging process, when system hangs and reacts slowly on user input?
Killing a running process in an Ubuntu machine remotely from a windows machine which is in LAN

Zombie processes are processes that have stopped running but their process table entry still exists because the parent process hasn't retrieved it via the wait syscall. Technically each process that terminates is a zombie for a very short period of time but they could live for longer.

Longer lived zombie processes occur when parent processes don't call the wait syscall after the child process has finished. One situation where this occurs is when the parent process is poorly written and simply omits the wait call or when the parent process dies before the child and the new parent process does not call wait on it. When a process' parent dies before the child, the OS assigns the child process to the "init" process or PID 1. i.e. The init process "adopts" the child process and becomes its parent. This means that now when the child process exits the new parent (init) must call waitto get its exit code or its process table entry remains forever and it becomes a zombie


Why is nmcli not configuring device? I'm new to nmcli and trying to figure out how to create an eth0 connection. sudo nmcli con prints the following:

NAME       UUID     TYPE      DEVICE
MyWlan0    ...      wifi      wlan0
MyEth0     ...      ethernet  --

No matter what command I give, my MyEth0 connection will not show eth0 under DEVICE above (just '--') and, as a result, I'll get the following error when I try sudo nmcli con up MyEth0:

Error: Connection activation failed: No suitable device found for this connection (device lo not available because device is strictly unmanaged).

This is how I created the connection:

sudo nmcli con add con-name MyEth0 type ethernet ifname eth0

I've also tried modifying it with the following sorts of commands:

sudo nmcli con mod MyEth0 connection.interface-name eth0

Running sudo nmcli con show MyEth0 connection | grep eth0 does indicate that the connection.interface-name is eth0, but it does not appear this way according to the behavior described above.

Any ideas?

Edit:

Here is the output of sudo lshw -C network:

  *-network:0
       description: Ethernet interface
       physical id: 2
       logical name: eth0
       serial: dc:a6:32:27:84:45
       size: 100Mbit/s
       capacity: 1Gbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=bcmgenet driverversion=v2.0 duplex=full link=yes multicast=yes port=MII speed=100Mbit/s
  *-network:1
       description: Wireless interface
       physical id: 3
       logical name: wlan0
       serial: dc:a6:32:27:84:46
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=brcmfmac driverversion=7.45.18 firmware=01-6a2c8ad4 ip=192.168.1.201 multicast=yes wireless=IEEE 802.11

This worked for me:

https://serverfault.com/questions/880950/network-issue-ifup-says-unknown-interface

iface enp0s3 inet dhcp

Followed by:

/etc/init.d/networking start

Network manager normally only manages wifi connections.

change in /etc/NetworkManager/NetworkManager.conf

[ifupdown]
managed=false

to

[ifupdown]
managed=true

Restart NetworkManager.service and nm-applet

and try again.


Cron job fails to run python script I can't get cron to run my Python script.  Below is my crontab entry:

0 22 * * * /usr/bin/python3.5 /home/gmoreno/hue.py > /tmp/log

Syslog shows the crontab run at set time but my Hue lights don't turn on.  When I run the script manually the lights turn on.

set path in crontab,

PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
0 22 * * * /usr/bin/python3.5 /home/gmoreno/hue.py


Understanding the Sensors Applet I just installed the package sensors-applet and I'm having a hard time reading the outputs. It's giving me 4 different temperature readings:

The first two (TZ01 and temp1) always give exactly the same reading (usually 50°C/122°F); however, TZ01 properties says that 60°C is a high value, while temp1 properties says that 90°C is a high value. I'm assuming they're both the CPU, but which one has the correct high value?
Furthermore, I still don't know what the other two are about. They always report similar (but not identical) temperature levels (usually around 15-17°C/58-64°F). What are they?
I'm running a single core laptop (Athlon Neo)with inboard graphics.

Thermal sensor are specific to a each computer type. For example, the IBM/Lenovo Thinkpad series sensors are described here http://www.thinkwiki.org/wiki/Thermal_sensors

Try to search the Internet for you laptop type and see where each sensor is positioned.

Gnome sensors applet works fine (for my Asus K52F, Ubuntu 10.10). Please, install the latest version of sensors applet from here link text. During installation process do not forget to mark hdd daemon startup loading.
I personally choose the following sensors: Libsensors Temp1, hddtemp.


How do I install Netbeans? I used NetBeans for Java development on Windows and remember finding it in the Ubuntu Software Center on Natty, but now it's gone. Is there a PPA I can use or will it be re-added to the official repos?

NetBeans' Integrated Development Environment (IDE) is available in Ubuntu's Universe/Java section. Following are the steps to install from the repository: Scroll down for steps to install the latest version of the IDE.

If Universe repository in not allowed, allow it and update:

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
sudo apt-get update

Install NetBeans with:

sudo apt-get install netbeans

Useful terminal shortcut: Ctrl+Shift+V can be used to paste copied text to terminal.

The NetBeans IDE - Shapshots:

The IDE's startpage:

A sample project:

Downloading and Installing the latest available version:

You can download the installation files and get help with installation, troubleshooting and others at NetBeans' official website. (The contents below have been adopted from the same.)

Downloading the software:

Go to https://netbeans.org/downloads/
In the upper right area of the page, select the language and platform (Linux (x86/x64)) from the drop-down list.
Click the Download button for the download option that you want to install.

Save the installer file to your system.

To install the software:

After the download completes, run the installer script with .sh extension. You might need to make the installer files executable by using the following command: chmod +x <installer-file-name> (e.g. chmod +x netbeans-7.4-javaee-linux.sh)
If you downloaded the All or Java EE bundle, you can customize your installation. Perform the following steps at the Welcome page of the installation wizard:

Click Customize;
In the Customize Installation dialog box, make your selections;
Click OK;

At the Welcome page of the installation wizard, click Next.
At the License agreement page, review the license agreement, click the acceptance check box, and click Next.
At the JUnit License Agreement page, decide if you want to install JUnit and click the appropriate option, click Next.
At the NetBeans IDE installation page, do the following:

Accept the default installation directory for the NetBeans IDE or specify another directory.

Note: The installation directory must be empty and the user profile you are using to run the installer must have read/write permissions for this directory.
Accept the default JDK installation to use with the NetBeans IDE or select a different installation from the drop-down list. If the installation wizard did not find a compatible JDK installation to use with the NetBeans IDE, your JDK is not installed in the default location. In this case, specify the path to an installed JDK and click Next, or cancel the current installation. After installing the required JDK version you can restart the installation.

Note: If the JDK version is older than the recommended JDK 7 Update 10, download and install the latest JDK update from Java SE Downloads page and restart the NetBeans IDE installer.

If the GlassFish Server Open Source Edition 4.0 installation page opens, accept the default installation directory or specify another installation location.
If you are installing Apache Tomcat, on its installation page, accept the default installation directory or specify another installation location. Click Next.
At the Summary page, do the following:

Verify that the list of components to be installed is correct.
Select the Check for Updates check box if you want to check the Update Center for possible updates and have the JUnit library installed during the installation (provided you accepted the license in step 5.)
Verify that you have adequate space on your system for the installation.

Click Install to begin the installation.
At the Setup Complete page, provide anonymous usage data if desired, and click Finish.

Note: If you encounter problems successfully completing the software installation, see Troubleshooting for descriptions and suggested workarounds for unresolved issues that could affect the installation process.

Uninstallation:

To uninstall the IDE:

Shut down the IDE.
In the IDE installation directory, run the uninstall.sh file.
To uninstall GlassFish and Tomcat together with the IDE, at the Summary page make sure that the correct versions are listed and check the appropriate checkboxes.
At the Summary page, click Uninstall.
After uninstallation completes, click Finish.

download netbean form official website the downloaded file in .sh format

that can be install by typing command sh filename.sh

url https://netbeans.org/downloads/start.html?platform=linux&lang=en&option=javase


Replacing my firewall rules I've had an init script for many years that configures iptables for me and it has worked like a champ until now. After upgrading from 10.04 to 12.04 I started having firewall problems where the rulesets were being corrupted. After some playing around I discovered that something is setting the following rules:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:53
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:53
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:67
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:67

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  0.0.0.0/0            192.168.122.0/24     state RELATED,ESTABLISHED
ACCEPT     all  --  192.168.122.0/24     0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-port-unreachable
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-port-unreachable

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

even when I've completely disabled my own firewall script. My first thought was ufw was somehow active - but it isn't:

# ufw status
Status: inactive

It may or may not be related, but I've only seen this problem on machines I am running kvm on.

Does anyone have pointers to what could be doing this and how to disable whatever is adding these unwanted rules?

Edit for people looking for this in the future: I finally located a source that definitively links these mystery iptables rules to libvirt: http://libvirt.org/firewall.html

Is it a multi-homed machine? What's on the 192.168.122.0/24 CIDR? Is there an interface listening on one of the IPs from within that range? I'd probably try to look at the output of:

grep -R 192.168.122 /etc

to find out if there's any configuration related to it and also check cron entries in /etc/cron*

May be ufw is enabled at boot, sets the rules and then gets inactive. May be the rules are hard-coded into ethernet init script. Or KVM's? Why care? Just make iptables command unrunnable from root with chmod and enable it only in your script.


How can I disable "Copy as HTML" "Paste as HTML" from gnome-terminal context menu? It appears to have been added between 17.04 and 18.04 and is related to this bug, https://bugzilla.gnome.org/show_bug.cgi?id=365121

I tried searching /usr/share/ and /etc/ for a config file but didn't find one
I tried searching google but didn't find any issues.

Thanks in advance for help

You cannot disable these entries. As in most software, the basic user interface (organization of its menus etc.) is a hard coded integral part of GNOME Terminal, and not configurable (at least not without altering the source code).

Seems to be another hard-coded thing. It is just another example of GNOME "user-friendlies".

Some analysis and recommendations are below:

$ apt-get source gnome-terminal
$ cd gnome-terminal-3.28.2/
$ grep -ir "Copy.*as.*HTML" . --include="*.c" -n
./src/terminal-accels.c:141:  ENTRY (N_("Copy as HTML"),        KEY_COPY_HTML,           "copy",         "s", "'html'"   ),
./src/terminal-window.c:1782:  g_menu_append (section4, _("Copy as _HTML"), "win.copy::html");

manually open of ./src/terminal-window.c shows that corresponding g_menu_append is not conditional, so it is included everytime.

Dconf knows only about setting to define/enable/disable keyboard shortcut (toggled in Preferences→Shortcuts→Edit→Copy as HTML):

$ gsettings list-recursively | grep -i html
org.gnome.Terminal.Legacy.Keybindings copy-html 'disabled'

If you don't like that feature, you can try to use another terminal application like MATE Terminal or something else instead:

Konsole

LXTerminal

MATE Terminal

QTerminal

Note: in Ubuntu 18.04 LTS the xfce4-terminal has the same un-configurable thing.


Can you use an SD card for swap in Ubuntu 12.04? I had a smallish (4gb) SD card laying around and I was wondering if it's possible or advisable to use it as swap space. Ideally, I'd like to free up some hard drive space by removing the swap on it and solely using the SD card but if that's not possible/advisable I'd be just fine with having a little extra.

All the stuff that can't or shouldn't stay in your RAM is written out to swap and read back in when needed. This means that the swap medium needs to be fast and resilient to lots of writes.

Your SD card fails on both counts. It is slower at reading/writing than a hard drive, and each of its constituent sectors can only be written to a limited number of times before they wear out and can no longer reliably store data.

If you really want to use it to free hard drive space and will be keeping it in your reader at all times, my recommendation would be to consider moving any media files you might have to the card. Media files are usually written once but read many times, and don't need the full transfer speed of a hard drive to play back smoothly in real-time. They are thus the perfect candidates to offload to an SD card.

It does actually help a little if you are getting I/O bottlenecks when swapping since its on a separate device from the hard drive you are running your system on. Although it will drastically reduce the life of your SD card.


How do I make Thunderbird's reply format look like Outlook's? I am using thunderbird 14.0, where i am facing few issue. Is it possible to make thunderbird look like outlook. I didn't mean the theme or look, i mean the way that how outlook express replies. It has a neat line on the end of every reply, where as thunderbird doesnot do the way like outlook does. It doesn't show the details of From, To Subject & Date while replying..I just to overcome this issue by customizing the settings or i just want to know is there any other email client which serves like outlook for ubuntu?
Outlook Screenshot:

Thunderbird Screenshot:

Update - 1:

Update - 2:

Outlook express / outlook has a nice look on forwarding mails. Like it highlights the From field in light grey color. Pls find the snapshot below. How to get this style in thunderbird  on forwarding mails?

Update - 3:

Can i have the below style? All the informations should be highlighted in light grey color, like the one on screenshot below. Also i dont want the email id to be displayed, on mouse over it should show the email id like outlook. You can find it in below screenshot.

Update - 4:

Help me in adding signature for all outgoing mails.

This is fairly easy to do with Thunderbird 14.0, using the SmartTemplate and ReFwdFormatter extensions.

1. Install SmartTemplate and ReFwdFormatter

Start Thunderbird, go to Tools...Add-ons
Search for smarttemplate and install:

Search for refwd and install:

Restart Thunderbird to activate the extensions.

2. Configure ReFwdFormatter to remove the quote vertical bar

Go to Tools...Add-ons and select the Extensions option in the left sidebar.
Click on the Preferences button for ReFwdFormatter:

Make sure all the choices you need are selected, and close.

3. Configure SmartTemplate to reply like Outlook

Go to Tools...Add-ons and select the Extensions option in the left sidebar.
Click on the Preferences button for SmartTemplate
In the "SmartTemplate Settings" window, click on the Reply tab:

Set up the checkboxes as above, and paste this basic Outlook reply template in the text box:

From: %from%
Sent: %X:=sent% %A%, %B% %d%, %Y% %l%:%M%%p(3)%
[[To: %to%]][[
Cc: %cc%]]
Subject: %subject%

To see what the fields mean and a list of all available fields, click on the Help button to expand the window with this useful section (or see list on website):

You should also paste the same template in the Forward tab, with the same settings.

4. Demo:

5. Further customization

This requires minimal knowledge of HTML. If you need specific help, please post in the comments below.

Specific customizations for karthick87

Makes horizontal line blue
Makes header font size smaller
Gray highlight/background for headers
Date/time in Outlook format
Only email names displayed in headers, with clickable mailto: links and a tooltip displaying the email address on mouse hover

From: %from(name)%
Sent: %X:=sent% %A%, %B% %d%, %Y% %l%:%M%%p(3)%
[[To: %to(name)%]][[
Cc: %cc(name)%]]
Subject: %subject%

I am sure that this kb article has everything you need to know about custom reply header : http://kb.mozillazine.org/Reply_header_settings


Synchronize 4GB of files Is there any service with Linux client that can deal with synchronizing 4 GB of data? By synchronizing I mean keeping all data on their server with automatic upload when files are changed. I am happy with Dropbox, but for now there is only 2GB free.

Dropbox as you already mention, or Ubuntu One, which is ~$3 USD per month for each additional 20G of storage (12 months for the price of 10 on annual billing)
https://one.ubuntu.com/

rsync is the best utility.

Try man rsync to see the options.


Ubuntu 18.04 Server for a 4k laptop display? My laptop has a 4K screen. Display specs: 15.6”, 4K UHD (3840 x 2160), IPS. I need to use Ubuntu Server but the font size in terminal is barely readable (very small).

How could I change the resolution? Or, how could I increase the font size?

Thanks a lot.

You can reconfigure the console-setup package:

sudo dpkg-reconfigure console-setup

It will ask you questions about the language/font and size to use for TTY consoles. Note that there are some limitations because of VGA graphics standards. Check man console-setup for more information on those limitations.

To zoom in/increase text size in terminal try ctrl+shift++
To zoom out/decrease text size ctrl+-

EDIT:
This is only useful if you are using the terminal on ubuntu desktop to access the server.