Linux Distributions

27K

Solutions

20K

Contributors

A Linux distribution is an operating system made as a software collection based on the Linux kernel and, often, on a package management system and are available for a variety of systems. A typical Linux distribution comprises a Linux kernel, GNU tools and libraries, additional software, documentation, a window system (the most common being the X Window System), a window manager, and a desktop environment. Most Linux systems are open-source software made available both as compiled binaries and in source code form, allowing modifications to the original software. Over three hundred distributions are in active development, including commercially backed distributions (such as Fedora, openSUSE and Ubuntu) and community-driven distributions (such as Debian, Slackware, Gentoo and Arch Linux).

Share tech news, updates, or what's on your mind.

Sign up to Post

I'm using C++,  WxWdigets and Ubuntu and sometimes my application needs to send TCP packets to a TCP server.
The packets are in this format:
std::array<uint8_t, 8> command1;

Open in new window

I'm using a non-blocking TCP client method from boost asio and it works pretty well.
The problem is that I need to change the content of command1 since I need to send 32 different values depending on users actions.

At the moment, I connect to the server by using start_connection() function which connects to the server and execute the function start_write(int scelta) which sends the command1 over the net.

I would like to call the start_connection() function by passing the value of command1 in order to send it with start_write() function.
Is there any solution to do this?
Or, is there a smarter and faster solution to acquire what I need?

#include <boost/asio/buffer.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/read_until.hpp>
#include <boost/asio/steady_timer.hpp>
#include <boost/asio/write.hpp>
#include <boost/bind.hpp>
#include <iostream>
#include <string>

using boost::asio::steady_timer;
using boost::asio::ip::tcp;

std::array<uint8_t, 8> command1;

class client
{
public:
  client(boost::asio::io_context& io_context)
    : stopped_(false),
      socket_(io_context),
      deadline_(io_context),
      heartbeat_timer_(io_context)
  {
  }

 
  void start(tcp::resolver::results_type

Open in new window

0
JavaScript Best Practices
LVL 13
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

samba failed to start on ubuntu 16.04 server
system status smbd :
Failed to start LSB: start Samba SMB/CIFS daemon (smbd)
i reinstall install samba krb5-config krb5-user winbind libpam-winbind libnss-winbind
 
get error
Errors were encountered while processing:
 samba
 winbind
 libnss-winbind:amd64
 libpam-winbind:amd64
 samba-dbg
 initramfs-tools
 linux-image-4.4.0-166-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
0
ubuntu 16 under update failed :
dpkg: error processing package linux-image-4.4.0-166-generic (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
 linux-image-4.4.0-166-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

And i can't install samba and winbind on it.
0
We got some threshold alert on CPU usage sometimes. Thus we want to find out which process caused high CPU utilization on Linux.
After we use top and ntop command, all processes used only 0.7 to 1% CPU resources from time to time. We have no idea which process caused the issue.
Any command or tools could help us with this problem? Thank you.

RedHat and Ubuntu.
0
i install nfs-server on ubuntu desktop 18.04
then share a directory on /etc/expports:
/mnt/sharedirectory client-ip(rw,sync,no_subtree_check)

from client ip i try to mount shared directory
mount -t nfs desktop-ip:/mnt/sharedirestory /mnt/srchive/
 mount.nfs: Connection timed out
nothing is in my auth.log or syslog.
from that client i mountet directories from other server . Then error should be in my desktop. But i can't see any.
0
Hi, i have just installed Ubuntu Server 16 and i have installed firefox, my aim would be to have firefox launch automatically when machine starts up on a web address https://www.iradio.ie
0
What's the file system in the latest Ubuntu OS?  Any issues installing Windows 10 on the top of it from scratch and formatting?   For some reason some folks afraid doing it because it may 'crash' the HD.

No data need to be saved.
0
is there any graphical tools to monitor lxd?
what I want to see is cpu, men, disk, network trafik,.. .
0
Hello to everyone,

I'm trying to remove the nvidia driver from my system (running with debian 10). I tried several methods,but unsuccesfully. Something like these :

-) apt remove nvidia-driver
-) apt-get purge nvidia-driver

after that,when I reboot the PC,debian 10 restarts and I see this :

mario@DESKTOP-N9UN2H3:/home/mariozio# lspci -nnk -d 10de:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU102 [GeForce RTX 2080 Ti] [10de:1e04] (rev a1)
      Subsystem: ZOTAC International (MCO) Ltd. TU102 [GeForce RTX 2080 Ti] [19da:2503]
      Kernel driver in use: nvidia
      Kernel modules: nvidia

what to do ?
0
I have encrypted the volume using luks in centOS 6.3.
And generated the key added to the volume.
I have also added the entry in the /etc/crypttab for the encrypted volumes. As the volumes are from storage it takes more time for the server to reboot, so i have commented the /etc/crypttab entries to boot faster.

I Ubuntu I am am able to decrypt the volume using cryptdisks_start and in centOS 7 I use systemd-cryptsetup@<name>

Where as in CentOS 6.3 I am not able to find both the above commands.

My requirement is to boot decrypt the volume after the server boot's using a command like cryptdisks_start or systemd-cryptsetup@<name> .
0
Build an E-Commerce Site with Angular 5
LVL 13
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

Openstack swift issue.  I have all nodes running Ubuntu 16.04.4 LTS.  I have one controller node and 4 swift storage nodes.  All of the storage nodes have 1 boot drive and 3 data drives.  The first storage node works just fine.  However, it filled.  Upon which I realized the other 3 nodes are not working correctly.  It appears that the "boot" drive on the other 3 nodes is full.  However, I cannot find where the space is taken from.  The three data drives are mounted off of /srv/node/sda, /srv/node/sdc, and /srv/node/sdd (as described in the OpenStack documenation).  If I unmount them, I am still able to access those paths and see the contents.  So, it is saving the data to local disk and not the mounted disks???

Any help would be appreciated.
0
Hello,
I have ubuntu vps and I want to install on it a control panel to allow managing hosting through web like create users and websites for them and specify for each website ghis php version and so on, something like cpanel/plesk bot open source and free, any suggestion?
Thanks
0
i try to start a lxd conatiner. I get error :
Error: Common start logic: Set last ID map: json: cannot unmarshal number into Go value of type [idmap.IdmapEntry
i try to change  volatile.idmap.next value sat to [] and start lxd
my config show:

config:
  image.architecture: amd64
  image.description: ubuntu 18.04 LTS amd64 (release) (20190604)
  image.label: release
  image.os: ubuntu
  image.release: bionic
  image.serial: "20190604"
  image.version: "18.04"
  security.idmap.base: "10000000"
  security.idmap.isolated: "true"
  security.idmap.size: "200000000"
  volatile.base_image: c234ecee3baaee25db84af8e3565347e948bfceb3bf7c820bb1ce95adcffeaa8
  volatile.eth0.hwaddr: 00:16:3e:6b:be:cb
  volatile.idmap.base: "200000000"
  volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":10000000,"Nsid":0,"Maprange":200000000},{"Isuid":false,"Isgid":true,"Hostid":10000000,"Nsid":0,"Maprange":200000000}]'
  volatile.idmap.next: '[]'
  volatile.last_state.idmap: "3000000000"
  volatile.last_state.power: STOPPED
devices: {}
ephemeral: false
profiles:
- lanprofile
stateful: false
description: ""
0
hi am geting this error trying to start mysql database in ubuntu

mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
user@myubuntu:~$ sudo etc/init.d/mysql -root -p start
[sudo] password for user:
Sorry, try again.
[sudo] password for user:
Sorry, try again.
[sudo] password for user:
sudo: 2 incorrect password attempts
user@myubuntu:~$ sudo start mysql
[sudo] password for user:
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
user@myubuntu:~$ Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused^C
user@myubuntu:~$ ^C
user@myubuntu:~$ sudo etc/init.d/mysql - root -p start
sudo: etc/init.d/mysql: command not found
user@myubuntu:~$ sudo etc/init.d/mysql -root -p start
sudo: etc/init.d/mysql: command not found
user@myubuntu:~$ sudo /etc/init.d/mysql - root -p start
Usage: /etc/init.d/mysql start|stop|restart|reload|force-reload|status
user@myubuntu:~$ pswd
123456: command not found
user@myubuntu:~$ sudo /etc/init.d/mysql - root -p start
Usage: /etc/init.d/mysql start|stop|restart|reload|force-reload|status
user@myubuntu:~$ sudo /etc/init.d/mysql start
[....] Starting mysql (via systemctl): mysql.serviceJob for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
 failed!
0
How to best prep a new machine for running LXD containers?
0
I have an Intel NUC7i5BNHX1 with Ubuntu 18.04 and a Bose SoundLink Revolve+ Bluetooth speaker.

Ubuntu connects to the speaker via Bluetooth and plays sound but will not let you select the device as a sound input device. The speaker does not appear in the Bluetooth input section.
0
How to communicate ipa server with samba domain active directory?
can ipa server install in domin controller?
How add windows as ipa client?
0
i got both braseero and k3b,  but i can't copy an iso of new ubuntu to dvd.  i did it before on older version of ubuntu,but i've forgottten how to do it.  please give a dummies version.  i'm on ubuntu 16 and want 18
0
is it possible to move samba active directory to freeipa server?
0
Introduction to R
LVL 13
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

Hello,

I am trying to update my old VM installation. I updated the kernel to 4.4.0 and ubuntu 16.04 LTS. However, this VM is being used by old programs which I cannot change its code it's out of my control right now.

I am running following command to run my new VM.

Command with new VM: qemu-system-x86_64 -hda <hard-drive> -smp 16 -m 10G -kernel <my-bz-kernel> -append "root=/dev/sda1 console=ttyS0" -enable-kvm

However, in my old VM installation everything was same except, -append part.
Old command: -append "root=/dev/hda console=ttyS0"  

I want to my new ubuntu 16.04 LTS installation can be booted from /dev/hda as well not only /dev/sda1.

I already tried to change /boot/menu.lst file and /etc/fstab but my tries wasn't successfull. Maybe I am doing something wrong


Please help

Thanks a lot
0
I looking for some hosting (international) to locate all my lxd. If you are familiar with that type.
0
I have a 80 mm thermal USB printer connected to my Ubuntu and it has been automatically detected since I can see its name in the printer list. However, I'm not able to print nothing when I try to print sample text from LibreOffice or Gedit.
This is what I get from dmesg -d:
[  422.674671 <    7,758140>] usb 3-3.1: new full-speed USB device number 7 using xhci_hcd
[  427.971019 <    5,296348>] usb 3-3.1: New USB device found, idVendor=1051, idProduct=1000, bcdDevice= 1.00
[  427.971020 <    0,000001>] usb 3-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  427.971021 <    0,000001>] usb 3-3.1: Product: NII W2K203DPI USB
[  427.971022 <    0,000001>] usb 3-3.1: Manufacturer: NII
[  427.975340 <    0,004318>] usblp 3-3.1:1.0: usblp0: USB Bidirectional printer dev 7 if 0 alt 0 proto 2 vid 0x1051 pid 0x1000

Open in new window


The manufacturer (Nippon) provided an old C code sample that should print some text and a photo (for this reason it needs OpenCV 2.4).
I attached the file to this topic with also the SDK document.

I cannot compile it since I get lots of errors related to the OpenCV version, I tried to remove the OpenCV occurrences since I do not need the print the photo, but I get errors:

gcc libNPrint_sample.c /usr/local/lib/libNPrint.so.1.2 -o test `pkg-config --cflags --libs opencv` -lm -lpthread
libNPrint_sample.c: In function ‘fncTestSample’:
libNPrint_sample.c:75:18: warning: implicit declaration of function ‘cvLoadImage’; did 

Open in new window

0
Ubuntu 16 server- no GUI available.

I have a small config file called config.xml

I have this folder structure..

Folder A with 100's of subfolders - each subfolder contains a config.xml

I'm looking for a command to find and replace all files called config.xml with my new modified master config.xml file....

thanks for looking
Mike
0
I am using a Plesk server on an Ubuntu 18.04 cloud setup. There are 8 cpu's and 32 GB of ram.

I just did a stress test using loadster.app.

My CPU and Ram didn't seem to go up at all, but about 4 minutes in my sites started timing out.

I have the max php children set to 5 currently. I do not mind increasing that if need be, but I'm not sure what I should do in general to prepare for high traffic use.

I really need to be able to have 200 concurrent users on my server during peak hours.

This test failed with 25. Like I said the ram and cpu weren't even effected so not sure what I need to adjust.
0
linux (ubuntu) container can not ping from master.
i have a ubuntu 18.04 and i create a lxd. all server is in my dns and domain. i can ping all lxd from other server but in master server is not ping able even i add this host in (/etc/hosts)
ping says : ... Destination Host Unreachable
lxc list show all linux containers in this server with ip.
0

Linux Distributions

27K

Solutions

20K

Contributors

A Linux distribution is an operating system made as a software collection based on the Linux kernel and, often, on a package management system and are available for a variety of systems. A typical Linux distribution comprises a Linux kernel, GNU tools and libraries, additional software, documentation, a window system (the most common being the X Window System), a window manager, and a desktop environment. Most Linux systems are open-source software made available both as compiled binaries and in source code form, allowing modifications to the original software. Over three hundred distributions are in active development, including commercially backed distributions (such as Fedora, openSUSE and Ubuntu) and community-driven distributions (such as Debian, Slackware, Gentoo and Arch Linux).