Ubuntu 18.04, battery indicator not displaying as well as system saying no battery

I’m on Ubuntu 18.04, I originally had Windows 10 running on a microsoft surfacebook 2 and since then have completely wiped windows. Since then I can’t find a battery indicator anywhere. Even in my power statistics there is even no tab for it. In another app to look at hardware it says there even is no battery.

https://gyazo.com/9abff2f1d28c4e09f326a9d85c055896 https://gyazo.com/f8a5c9ed4545aefea7fbf51f66b9ece9

NetSpeed Indicator is NOT installing on 18.04 [on hold]

I have two issues.

Issue # 1 I am using BackBox 6 which is based on Ubuntu 18.04 LTS. I tried a lot to install NetSpeed meter but failed. I searched Netspeed on GNOME software center but nothing in there.

Issue # 2 Hightlight color is Blue I want to change it to dark gray. In previous versions there was “Theme” in All settings. But, in 18.04 theme is not included.

Pls guide me with step by step commands. Thank you

Provide You Technical Indicator For Chart Pattern for $10

Forex trading involves dealing in international currencies, basically selling the currency of one country to buy that of another. The trader deals in Foreign Exchange [Forex] at the most appropriate time to profit from the transaction. Good ability to forecast plays a vital role here. Anyone who wants to deal in Forex can do so, since only the basic knowledge is required for it. You will get the help you need for attaining this knowledge. Liquidity is another reason why Forex trading is so popular. You can deal in foreign currencies right from your home. In fact, it is fully conducted online. You have the liberty to choose when you want to trade. Basically, you can be your own boss, because the process of online trading is fairly simple for anyone to understand. This gig includes an exclusive no-fluff book-size special report from me, a Rapid Skill Acquisition expert and best-selling author. I help people learn new things fast. If you don’t believe me, just check out my other gig “I will teach you how to learn anything faster than normal.” You will be amazed once you get the real 80 TO 90% Positive result with “ANS” Indicators & Strategy which will turns your Losing Trade also to a sweet Winning , How it possible !? (I will let you know) I am Earning enough I don’t need this little amount as I directed to a Donation account so it means it’s Free from my side. THIS IS A COMBINATION OF INDICATORS FOR (MT4) WHICH I CHOSEN FROM THE EXPERT TRADERS WHICH I SPEND A LOT OF TIME & MONEY FOR EACH OF THEM TILL I REACHED TO THIS BEAUTIFUL RESULTS. There are 90% people losing money on Binary Option or Forex trades as they don’t know why. I am Earning enough I don’t need this little amount as I directed to a Donation account so it means it’s Free from my side.You are not required to open any new account so you can use any broker you like.

by: hamzaco98
Created: —
Category: Other
Viewed: 185


Laptop battery indicator does not work

I replaced my old broken battery with a new one. The new battery holds a charge (i’m using it now while not plugged in) but the battery indicator does not work. I searched a few ubuntu resources online and nothing helpful came up, most of which was from 2013 or 2019.

Any ideas?

Gen 1 Lenovo X1 Carbon running Ubuntu 16.04

Thanks!

Battery Indicator Screenshot

VBA: Reusable Progress Indicator

As many have done on this site, I decided to create a progress indicator using a modeless Userform. However, my goal was to make said progress indicator as generic/reusable as possible. While doing some research, I stumbled upon @MathieuGuindon ‘s post titled The Reusable Progress Indicator. I quite liked his ideas, so I definitely borrowed a few of them, but instead of writing a predeclared class to interact with the form, I choose to create an interface to expose the Progress Indicator’s methods to the client code.

The issue I have currently, is the default instance, (albeit useless without being written against the interface), troubles me, but I fear there is no way around it. Also I am looking for general feedback on my code structure, quality, efficiency, and other improvements that could be made.

Note: I have only been developing in VBA for just over a year. That being said I am on Stack Overflow quite a bit and I am always seeing and learning from, @MathieuGuindon’s code, so naturally my coding style has begun to mirror his.

IProgressIndicator (Interface):

Option Explicit  Public Sub UpdateOrphanProgress(ByRef ProgStatusText As Variant, _                                 ByRef CurrProgCnt As Long, _                                 ByRef TotalProgCnt As Long): End Sub  Public Sub UpdateParentChildProgress(ByRef ParentProgStatusText As Variant, _                                      ByRef ParentCurrCnt As Long, _                                      ByRef ParentTotalCnt As Long, _                                      ByRef ChildProgStatusText As Variant, _                                      ByRef ChildCurrProgCnt As Long, _                                      ByRef ChildProgCnt As Long, _                                      ByRef TotalProgCnt As Long): End Sub   Public Sub LoadProgIndicator(Optional ByVal HasParentProccess As Boolean, _                              Optional ByVal CanCancel As Boolean, _                              Optional ByVal CalculateExecutionTime As Boolean): End Sub  Public Property Get ShouldCancel() As Boolean: End Property 

ProgressIndicator Class (Userfrm):

Option Explicit  Implements IProgressIndicator  #If VBA7 Then     Private Declare PtrSafe Function GetWindowLong _                            Lib "user32" Alias "GetWindowLongA" ( _                            ByVal hwnd As LongPtr, _                            ByVal nIndex As LongPtr) As LongPtr     Private Declare PtrSafe Function SetWindowLong _                            Lib "user32" Alias "SetWindowLongA" ( _                            ByVal hwnd As LongPtr, _                            ByVal nIndex As LongPtr, _                            ByVal dwNewLong As LongPtr) As LongPtr      Private Declare PtrSafe Function DrawMenuBar _                            Lib "user32" ( _                            ByVal hwnd As LongPtr) As LongPtr     Private Declare PtrSafe Function FindWindowA _                            Lib "user32" (ByVal lpClassName As String, _                            ByVal lpWindowName As String) As LongPtr      Private Declare PtrSafe Function GetTickCount _                             Lib "kernel32.dll" () As LongPtr  #Else     Private Declare Function GetWindowLong _                            Lib "user32" Alias "GetWindowLongA" ( _                            ByVal hwnd As Long, _                            ByVal nIndex As Long) As Long     Private Declare Function SetWindowLong _                            Lib "user32" Alias "SetWindowLongA" ( _                            ByVal hwnd As Long, _                            ByVal nIndex As Long, _                            ByVal dwNewLong As Long) As Long     Private Declare Function DrawMenuBar _                            Lib "user32" ( _                            ByVal hwnd As Long) As Long     Private Declare Function FindWindowA _                            Lib "user32" (ByVal lpClassName As String, _                            ByVal lpWindowName As String) As Long      Private Declare Function GetTickCount _                     Lib "kernel32.dll" () As Long #End If  Private Const GWL_STYLE = -16 Private Const WS_CAPTION = &HC00000  Private Const PROGINDICATOR_MAXHEIGHT As Integer = 142.75 Private Const PARENTPROCSTATUS_MAXHEIGHT As Integer = 10 Private Const PROCSTATUS_MAXTOP As Integer = 16 Private Const PROGRESSBAR_MAXTOP As Integer = 41 Private Const PROGRESSBAR_MAXWIDTH As Integer = 270 Private Const ELAPSEDTIME_MAXTOP As Integer = 83 Private Const TIMEREMAINING_MAXTOP As Integer = 94  Private Const STARTPOS_LEFT_OFFSET As Single = 0.5 Private Const STARTPOS_RIGHT_OFFSET As Single = 0.5  Private Const ERR_ORPHANPROC_NOPARENT As String = "You specified that this proccess has a parent, " & _                                                   "but you are using the 'UpdateOrphanProgress' method" Private Const ERR_HASPARENT_NOTSPECIFIED As String = "You specified that this proccess does not have a parent, " & _                                                      "but you are using the 'UpdateParentChildProgress' method." Private Const ERR_INVALIDPROGPERCENT As String = "Either the CurrProgCnt equals 0, is greater than 0, or it " & _                                                   "is greater than TotalProgCnt." Private Const ERR_INVALIDPARENTCOUNT As String = "Either the ParentCurrCnt equals 0, is greater than 0, or it " & _                                                   "is greater than ParentTotalCnt."  Public Enum ProgressIndicatorError         Error_OrphanProcHasParent = vbObjectError + 1001     Error_HasParentProcNotSpecified     Error_InvalidProgressPercentage     Error_InvalidParentCount End Enum  Private Type TProgressIndicator     StartTime As Double     TimeElapsed As Double     SecondsElapsed As Double     MinutesElapsed As Double     HoursElapsed As Double     SecondsRemaining As Double     MinutesRemaining As Double     HoursRemaining As Double     ItemsRemaining As Double     ParentChildIterationCount As Long     HasParentProccess As Boolean     CanCancel As Boolean     Cancelling As Boolean     CalculateExecutionTime As Boolean     PercentComplete As Double End Type  Private this As TProgressIndicator  '***************************************************************************** 'Properties '***************************************************************************** Private Property Get HasParentProccess() As Boolean     HasParentProccess = this.HasParentProccess End Property  Private Property Get Cancellable() As Boolean     Cancellable = this.CanCancel End Property  Private Property Get IsCancelRequested() As Boolean     IsCancelRequested = this.Cancelling End Property  Private Property Get CalculateExecutionTime() As Boolean     CalculateExecutionTime = this.CalculateExecutionTime End Property  '***************************************************************************** 'Methods     '*****************************************************************************     Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)     If CloseMode = 0 Then         Cancel = True         If Cancellable Then this.Cancelling = True     End If End Sub  Private Property Get IProgressIndicator_ShouldCancel() As Boolean     If IsCancelRequested Then         If MsgBox("Would you like to Cancel this operation?", _                   vbQuestion + vbYesNo, "Process Dialog") = vbYes Then             IProgressIndicator_ShouldCancel = True             Me.Hide         Else             this.Cancelling = False         End If     End If End Property  Private Sub IProgressIndicator_LoadProgIndicator(Optional ByVal HasParentProccess As Boolean, _                                                  Optional ByVal CanCancel As Boolean, _                                                  Optional ByVal CalculateExecutionTime As Boolean)      this.CalculateExecutionTime = CalculateExecutionTime      If CalculateExecutionTime Then this.StartTime = GetTickCount()      HideTitleBar      this.HasParentProccess = HasParentProccess: this.CanCancel = CanCancel      With Me         If this.HasParentProccess Then             .Height = PROGINDICATOR_MAXHEIGHT             .ParentProcedureStatus.Height = PARENTPROCSTATUS_MAXHEIGHT             .ProcedureStatus.Top = PROCSTATUS_MAXTOP             .frameProgressBar.Top = PROGRESSBAR_MAXTOP              .lblElapsedTime.Top = ELAPSEDTIME_MAXTOP             .ElapsedTime.Top = ELAPSEDTIME_MAXTOP              .lblTimeRemaining.Top = TIMEREMAINING_MAXTOP             .TimeRemaining.Top = TIMEREMAINING_MAXTOP         End If         .ProgressBar.Width = 0         .StartUpPosition = 0         .Left = Application.Left + (STARTPOS_LEFT_OFFSET * Application.Width) - (STARTPOS_LEFT_OFFSET * .Width)         .Top = Application.Top + (STARTPOS_RIGHT_OFFSET * Application.Height) - (STARTPOS_RIGHT_OFFSET * .Height)         .Show     End With  End Sub  Private Sub HideTitleBar()   Dim lngWindow As Long, lngFrmHdl As Long      lngFrmHdl = FindWindowA(vbNullString, Me.Caption)     lngWindow = GetWindowLong(lngFrmHdl, GWL_STYLE)     lngWindow = lngWindow And (Not WS_CAPTION)     Call SetWindowLong(lngFrmHdl, GWL_STYLE, lngWindow)     Call DrawMenuBar(lngFrmHdl)  End Sub  Private Sub IProgressIndicator_UpdateOrphanProgress(ByRef ProgStatusText As Variant, _                                                     ByRef CurrProgCnt As Long, _                                                     ByRef TotalProgCnt As Long)          ThrowIfOrphanProcHasParent          ThrowIfInvalidProgPercent CurrProgCnt, TotalProgCnt          this.PercentComplete = CurrProgCnt / TotalProgCnt              With Me                 .ProcedureStatus.Caption = ProgStatusText & " " & _                                       CurrProgCnt & " of " & TotalProgCnt                  .ProgressBar.Width = this.PercentComplete * PROGRESSBAR_MAXWIDTH             End With          If CalculateExecutionTime Then CalculateTime CurrProgCnt, TotalProgCnt          DoEvents          If CurrProgCnt = TotalProgCnt Then Me.Hide 'Unload Me ??  End Sub   Private Sub IProgressIndicator_UpdateParentChildProgress(ByRef ParentProgStatusText As Variant, _                                                          ByRef ParentCurrCnt As Long, _                                                          ByRef ParentTotalCnt As Long, _                                                          ByRef ChildProgStatusText As Variant, _                                                          ByRef ChildCurrProgCnt As Long, _                                                          ByRef ChildProgCnt As Long, _                                                          ByRef TotalProgCnt As Long)          ThrowIfHasParentNotSpecified          ThrowIfInvalidParentCount ParentCurrCnt, ParentTotalCnt          ThrowIfInvalidProgPercent ChildCurrProgCnt, ChildProgCnt          this.ParentChildIterationCount = this.ParentChildIterationCount + 1          this.PercentComplete = ChildCurrProgCnt / ChildProgCnt              With Me                 .ParentProcedureStatus.Caption = ParentProgStatusText & " " & _                                                  ParentCurrCnt & " of " & ParentTotalCnt                  .ProcedureStatus.Caption = ChildProgStatusText & " " & _                                            ChildCurrProgCnt & " of " & ChildProgCnt                  .ProgressBar.Width = this.PercentComplete * PROGRESSBAR_MAXWIDTH             End With          If CalculateExecutionTime Then CalculateTime this.ParentChildIterationCount, TotalProgCnt          DoEvents          If ParentCurrCnt = ParentTotalCnt Then            If ChildCurrProgCnt = ChildProgCnt Then Me.Hide 'Unload Me ??         End If  End Sub  '***************************************************************************** 'Time Calulations '***************************************************************************** Private Sub CalculateTime(ByRef CurrProgCntIn As Long, ByRef TotalProgCntIn As Long)      With this         If CurrProgCntIn = TotalProgCntIn Then              Me.ElapsedTime.Caption = "" & .HoursElapsed & " hours, " & _                                      .MinutesElapsed & " minutes, " & .SecondsElapsed & " seconds"              Me.TimeRemaining.Caption = "" & 0 & " hours, " & 0 & _                                        " minutes, " & 0 & " seconds"         Else             .TimeElapsed = (GetTickCount() - this.StartTime)              .SecondsElapsed = .TimeElapsed / 1000             .MinutesElapsed = RoundTime(.TimeElapsed, 60000)             .HoursElapsed = RoundTime(.TimeElapsed, 3600000)              .ItemsRemaining = TotalProgCntIn - CurrProgCntIn              .SecondsRemaining = (.SecondsElapsed * (TotalProgCntIn / CurrProgCntIn)) - .SecondsElapsed             .MinutesElapsed = RoundTime(.SecondsRemaining, 60)             .HoursElapsed = RoundTime(.SecondsRemaining, 60)              Me.ElapsedTime.Caption = "" & .HoursElapsed & " hours, " & _                                      .MinutesElapsed & " minutes, " & .SecondsElapsed & " seconds"              Me.TimeRemaining.Caption = "" & .HoursRemaining & " hours, " & .MinutesRemaining & _                                        " minutes, " & .SecondsRemaining & " seconds"         End If     End With  End Sub  Private Function RoundTime(ByRef TimeElapsedIn As Double, ByVal IntervalIn As Long) As Double     RoundTime = Int(TimeElapsedIn / IntervalIn) End Function  '***************************************************************************** 'Error Checking Procedures '***************************************************************************** Private Sub ThrowIfOrphanProcHasParent()     If HasParentProccess Then         Beep         Err.Raise ProgressIndicatorError.Error_OrphanProcHasParent, _                   TypeName(Me), ERR_ORPHANPROC_NOPARENT     End If End Sub  Private Sub ThrowIfHasParentNotSpecified()     If Not HasParentProccess Then         Beep         Err.Raise ProgressIndicatorError.Error_HasParentProcNotSpecified, _                   TypeName(Me), ERR_HASPARENT_NOTSPECIFIED     End If End Sub  Private Sub ThrowIfInvalidProgPercent(ByRef CurrProgCntIn As Long, ByRef TotalProgCntIn As Long)     If Not (CurrProgCntIn > 0 And CurrProgCntIn <= TotalProgCntIn) Then         Beep         Err.Raise ProgressIndicatorError.Error_InvalidProgressPercentage, _                   TypeName(Me), ERR_INVALIDPROGPERCENT     End If End Sub  Private Sub ThrowIfInvalidParentCount(ByRef ParentCurrCntIn As Long, ByRef ParentTotalCntIn As Long)     If Not (ParentCurrCntIn > 0 And ParentCurrCntIn <= ParentTotalCntIn) Then         Beep         Err.Raise ProgressIndicatorError.Error_InvalidParentCount, _                   TypeName(Me), ERR_INVALIDPARENTCOUNT     End If End Sub 

Tests:

Public Sub TestingOrphanProccess()   Dim i As Long  Dim ProgressBar As IProgressIndicator      On Error GoTo ErrHandle     Set ProgressBar = New ProgressIndicator      ProgressBar.LoadProgIndicator CanCancel:=True, CalculateExecutionTime:=True          For i = 1 To 10000             'only have to specify this property if boolCanCancel:=True             If ProgressBar.ShouldCancel Then Exit Sub             Sheet1.Cells(1, 1) = i              ProgressBar.UpdateOrphanProgress "Proccessing", i, 10000         Next      Exit Sub  ErrHandle:     Debug.Print Err.Number End Sub 

enter image description here

enter image description here

Sub TestingParentChildProccess()   Dim ProgressBar As IProgressIndicator  Dim dict As Object  Dim arryTotalItemCnt() As Variant, arryTemp As Variant  Dim lngMaxItems As Long  Dim varKey As Variant  Dim lngParentCntr As Long, i As Long      Set ProgressBar = New ProgressIndicator         ProgressBar.LoadProgIndicator HasParentProccess:=True, CanCancel:=True, CalculateExecutionTime:=True      Set dict = CreateObject("Scripting.Dictionary")           dict("Key1") = Array(1, 2, 3)         ReDim Preserve arryTotalItemCnt(UBound(dict("Key1")) + 1)          dict("Key2") = Array(1, 2, 3, 4)         ReDim Preserve arryTotalItemCnt(UBound(arryTotalItemCnt) + UBound(dict("Key2")) + 1)          dict("Key3") = Array(1, 2, 3, 4, 5)         ReDim Preserve arryTotalItemCnt(UBound(arryTotalItemCnt) + UBound(dict("Key3")) + 1)          lngMaxItems = UBound(arryTotalItemCnt)          For Each varKey In dict             lngParentCntr = lngParentCntr + 1              arryTemp = dict.Item(varKey)              For i = 0 To UBound(arryTemp)                  ProgressBar.UpdateParentChildProgress "Proccessing Parent", lngParentCntr, dict.Count, _                                                       "Processing Child", i + 1, UBound(arryTemp) + 1, lngMaxItems                      Application.Wait (Now() + TimeValue("00:00:01"))             Next i         Next  End Sub 

enter image description here

Where are the files for the language indicator in Ubuntu 16.04.6 LTS stored?

Recently while I was working on the command line directly after booting I noticed that the language / keyboard layout has been changed. Instead of restarting lightdm I just rebooted and nothing has changed. After all, I saw the little icon of the language indicator on the top right side was set to another language. Of course I changed the language back to my favored one.

But now I want to know, which files I have to look for, where these info’s are stored. Especially I want to trace back this changes.

This is the timestamp of my keyboard settings.

$   ls --full-time /etc/default/keyboard -rw-rw-r-- 1 root root 150 2019-05-28 14:43:36.298775034 +0200 /etc/default/keyboard 

But the changes appeard on june the 27th.

Any hint is appreceated.

Ubuntu 19.04, xfce, notification and indicator area in systray work strange

first at all, what is difference between notification and indicator plugin? Why is not only one in OS? For example notification seems better to me, because there is ordering, hiding, etc.

Second, I use both of them. Now seems work quite strange. For example, first I added notification area. Looks good. Then I added indicator plugin, and many icons from notification area hides. And bluetooth is missing?

Thank you for answer.

BR

Stan.