WiFi Adapter not found after update yesterday

I updated my laptop yesterday and when I started it today, it couldn’t find any WiFi. It doesn’t have any Ethernet port so I can’t do any wired connections. As far as I can see from the history log, the only thing updated that appeared to be related to the network was

wpasupplicant:amd64 (2:2.6-15ubuntu2.3, 2:2.6-15ubuntu2.4)

What can I do to rectify this?

Actualizar RecyclerView Adapter en un Fragment desde un Activity

Estoy haciendo una aplicación móvil en Android. Tengo un TabLayout con dos tabs y cada uno es un fragment. En el primer fragment tengo un RecyclerView que me gustaría actualizar.

En el MainActivity, tengo un AlertDialog para ingresar datos y guardarlos localmente, luego, la idea es actualizar el RecyclerView Adapter para presentar los datos nuevos.

MainActivity

public class MainActivity extends AppCompatActivity {      private TabLayout tabLayout;     private ViewPager viewPager;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          viewPager = (ViewPager) findViewById(R.id.view_pager);         setupViewPager(viewPager);          tabLayout = (TabLayout) findViewById(R.id.tabs);         tabLayout.setupWithViewPager(viewPager);     }      private void setupViewPager(ViewPager viewPager) {         ViewPagerAdapter adapter = new ViewPagerAdapter(getSupportFragmentManager());         adapter.addFragment(new StudentsFragment(), getString(R.string.tab_students));         adapter.addFragment(new ReportsFragment(), getString(R.string.tab_reports));         viewPager.setAdapter(adapter);     }      @Override     public boolean onCreateOptionsMenu(Menu menu) {         MenuInflater menuInflater = getMenuInflater();         menuInflater.inflate(R.menu.menu, menu);         return true;     }      @Override     public boolean onOptionsItemSelected(MenuItem item) {         switch (item.getItemId()) {             case R.id.add_student:                 addStudent();                 return true;             default:                 return super.onOptionsItemSelected(item);         }     }      private void addStudent() {         final AlertDialog dialog;         AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);         LayoutInflater inflater = this.getLayoutInflater();         View dialogView = inflater.inflate(R.layout.dialog_add_student, null);         dialogBuilder.setView(dialogView);          final EditText nameEditText = dialogView.findViewById(R.id.nameEditText);         Button addButton = dialogView.findViewById(R.id.addButton);          dialog = dialogBuilder.create();         dialog.show();          addButton.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                  // Aquí guardo el dato localmente              }         });     } } 

ViewPagerAdapter

public class ViewPagerAdapter extends FragmentPagerAdapter {      private final List<Fragment> mFragmentList = new ArrayList<>();     private final List<String> mFragmentTitleList = new ArrayList<>();      public ViewPagerAdapter(FragmentManager manager) {         super(manager);     }      @Override     public Fragment getItem(int position) {         return mFragmentList.get(position);     }      @Override     public int getCount() {         return mFragmentList.size();     }      public void addFragment(Fragment fragment, String title) {         mFragmentList.add(fragment);         mFragmentTitleList.add(title);     }      @Override     public CharSequence getPageTitle(int position) {         return mFragmentTitleList.get(position);     }  } 

RecyclerViewAdapter

public class RecyclerViewAdapter extends RecyclerView.Adapter<RecyclerViewAdapter.ViewHolder> {      private Context mContext;      public RecyclerViewAdapter(Context context) {         mContext = context;     }      @NonNull     @Override     public RecyclerViewAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {         View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.student_item, parent, false);         RecyclerViewAdapter.ViewHolder viewHolder = new RecyclerViewAdapter.ViewHolder(view);         return viewHolder;     }      @Override     public void onBindViewHolder(@NonNull final ViewHolder holder, final int position) {         String name = studentList.get(position).getName();         holder.nameTextView.setText(name);     }      // Método para actualizar el Adapter     public void updateRecyclerViewAdapter(List<Student> studentList) {         this.studentList = studentList;         notifyDataSetChanged();     }      @Override     public int getItemCount() {         return studentList.size();     }      public class ViewHolder extends RecyclerView.ViewHolder {          private View mView;         private TextView nameTextView;          public ViewHolder(View itemView) {             super(itemView);              mView = itemView;             nameTextView = itemView.findViewById(R.id.nameTextView);         }      }  } 

StudentsFragment

public class StudentsFragment extends Fragment {      public StudentsFragment() {     }      @Override     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {         View view = inflater.inflate(R.layout.fragment_student, container, false);          final FragmentActivity fragmentActivity = getActivity();         final RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);         LinearLayoutManager linearLayoutManager = new LinearLayoutManager(fragmentActivity, LinearLayoutManager.VERTICAL, false);         recyclerView.addItemDecoration(new DividerItemDecoration(fragmentActivity, DividerItemDecoration.VERTICAL));         recyclerView.setLayoutManager(linearLayoutManager);         recyclerView.setHasFixedSize(true);          recyclerView.post(new Runnable() {             @Override             public void run() {                 final RecyclerViewAdapter adapter = new RecyclerViewAdapter(fragmentActivity);                 fragmentActivity.runOnUiThread(new Runnable() {                     @Override                     public void run() {                         recyclerView.setAdapter(adapter);                     }                 });             }         });          return view;     }  } 

Solo tengo el método para actualizar el Adapter dentro del RecyclerViewAdapter. Pero, cómo lo puedo llamar desde MainActivity?

Mi objetivo es, cuando el usuario abre el AlertDialog desde MainActivity e ingrese un dato, luego de guardarlo, actualizar el RecyclerViewAdapter para presentar los datos nuevos.

Script to Toggle LAN adapter beween DHCP and a static IP

An IOT LAN sensor has a default address of 192.168.0.10

In 16.04, I would like invoke a script to toggle the LAN port between 192.168.0.1 and DHCP

Pseudocode:

If IP address not equal to 192.168.0.1 then: set to 192.192.0.1 else: set to DHCP and get LAN IP from DHCP server print  IP address 

Maybe there is a Windows equivalent for netsh? How would this be implemented in a BASH script (.sh)?

Unable to setup secnod HDMI display with Nvidia 1080ti through a DP-HDMI adapter; Ubuntu 18.04.3 LTS

Unable to setup secnod HDMI display with Nvidia 1080ti through a DP-HDMI adapter; Ubuntu 18.04.3 LTS

I saw a lot of online solutions were using the xrandr command to force output. However, none of those worked for me.

Solution I found: Connect DP end to nvidia graphics card first. With the monitor powered on, connect the hdmi end to the monitor. That worked. The reverse does not. I guess this is a one way activation sequence.

Customization of LiveCDs Wallpaper, Keyboard Layout, Network adapter drivers and fix screen resolution

I followed instructions of https://help.ubuntu.com/community/LiveCDCustomization to customize my first LiveCD based on ubuntu-18.04.2-desktop-amd64.iso (note that all URI references point to chapters of that tutorial). After testing the result, I found some things where my customization seems not to have worked:

  1. Change the desktop background to custom PNG: Eventhough I added my wallpaper to /usr/share/backgrounds/ and modified /usr/share/gnome-background-properties/ubuntu-wallpapers.xml to point to my wallpaper instead of warty-final-ubuntu.png, the wallpaper is still the warty-final-ubuntu.png. The instructions say that I should modify some more files (see here) but I could not find those.

  2. Change the keyboard layout to QWERTZ: In the instructions there was a section about localization (see here). I couldn’t find /usr/lib/ubiquity/ubiquity/misc.py (probably since I uninstalled ubiquity before) to customize the layout.
    Am I required to have ubiquity installed in order to preset the keyboard layout? I uninstalled it since I plan to use the created LiveCD only as boot medium and not for installing Ubuntu to any computer.
    Furthermore, I did not follow the instructions regarding UEFI boot since I already failed executing the first command sed -i ‘6i loadfont /boot/grub/fonts/unicode.pf2’ boot/grub/grub.cfg .
    Am I required to execute the script to make my LiveCD work properly? What exactly am I customizing here?

  3. Inappropriate screen size: When testing the created ISO with VirtualBox, only a small 800×600 screen is displayed. When starting via the most recent Ubuntu LTS LiveCD, I do not encounter this fixed resolution.
    Is this also related to the CD customization and how can I investigate where this issue comes from?

  4. I skipped the complete Advanced Customization step. This step is not required at all if I don’t want to change anything here, right?

  5. Cleanup process: In the cleanup section, the manual says, after installing software, I should execute: rm /var/lib/dbus/machine-id and rm /sbin/initctl followed by dpkg-divert –rename –remove /sbin/initctl .
    Do I have to run these commands only if I installed new software or also when doing an apt upgrade (this may also install new packages, right?)?

  6. Find, install and test specific network drivers: Since my host system is not an Ubuntu OS, I did the customization in a VirtualBox Ubuntu Guest system. I know from the past, that the network adapter of my computer may not be recognized when booting the physical machine with an Ubuntu LiveCD.
    I’m just wondering how I can find out whether this problem is still present without burning the CD.
    Is it possible from VirtualBox, to delegate the network resource as-is to the guest system for testing whether I need additional drivers?
    And how can I find out which drivers I may need to install?
    As soon as I know what to install, can I just run apt install in the chroot environment to install the drivers as done in the APT section of the tutorial see here?

Since I’m not that familiar with Ubuntu yet, I would appreciate if your answers contain the instructions what I should to as well as a rough explanation what the instructions are for.

Thanks for your help!

Wifi adapter not found Ubuntu 18.04 HP

Recently i have installed ubuntu next to windows 10 and when i try to connect it to wifi it says “wifi adapter not found”. I have been trying for days to solve it but nothing seems to work. For every solution it says i need ethernet (im using usb ethernet through my phone, i dont know if that is a problem). Please i need help i have tried many things! i have secure boot disabled and when i go to additional drivers it says that there are no additional drivers found. Thank you