Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

05 February, 2026

[SOLVED] Ubuntu: No sound in Bluetooth headphones / speakers

More advanced sound options after the Pulseaudio install


Try to install pulseaudio Bluetooth:

# sudo apt install pulseaudio pulseaudio-module-bluetooth

Ubuntu's standard settings do not work out of the box. I ran the command and now everything seems to work - with lots of sound options.

13 November, 2024

[SOLVED] Ubuntu: No Desktop Environment

Suddenly Ubuntu's desktop did not work. A "startx" command died too. But I could log into the command shell. The cure was a reinstall:

sudo apt install --reinstall ubuntu-desktop

A few moments later everything went back to normal. 

20 October, 2023

Logitech G815 Keyboard

The first impression was: oh no a teenager programmed the default cycling colors. It was most annoying, just to say it in a civil manner. A keyboard is a working tool not a lightshow. A tool should help, not distract. 

However, I found this Gist: https://gist.github.com/cornernote/a0d1893aa004b8928ec7e94ccd8dd844 

This recipe works on Ubuntu:

Install

sudo apt install -y libhidapi-dev
git clone https://github.com/MatMoul/g810-led.git
cd g810-led
make clean
make bin
sudo make install

Sample Settings

# red
sudo g815-led -dv 046d -dp c33f -tuk 1 -a FF0000
# green
sudo g815-led -dv 046d -dp c33f -tuk 1 -a 00FF00
# blue
sudo g815-led -dv 046d -dp c33f -tuk 1 -a 0000FF

I used the green one as a starting point. Thanx to the developers behind this repo :-) 

How to initiate a keyboard script at boot

The Script

Here is the script, that I've saved as /etc/init.d/keyboard.zsh

#!/bin/zsh
# Keyboard setup at boot
# Logitech G815
# Date: 20231020
g815-led -a ffaa00

If you use bash, the shebang (i.e. the first line of this script) should be: 

#!/bin/bash

Now make the script executable:

chmod a+x /etc/init.d/keyboard.zsh

Execute at startup

The last step is to run the script when the system boots. So:

update-rc.d /etc/init.d/keyboard.zsh defaults

The defaults keyword will run the script per default.

Now the keyboard will have a warm curry color. You can change the color, and get the hexcode for the color by a color picker. The one on Duckduckgo is excellent: https://duckduckgo.com/?q=color+picker&atb=v314-1&ia=answer 

Impression of the Logitech G815

It's a fine keyboard. However the annoying color cycles are stupid. Most of us want a more silent working experience. To this moment I don't get the idea of the G-function buttons. They are next to SHIFT, and this will give a lot of weird misses, like this: 5 4444444444444444448 - yeah this was the kind of accident. Obviously Logitech should have tested the UX of the keyboard on a few users above the teenage segment.

That being said, the feeling of the keyboard is great. I like the click of the buttons. And I like the fact that it is programmable by Linux users - that is if they are not afraid of scripts here and there.

At cold boot the script was NOT executed

In this AskUbuntu thread I found a working solution:

Running crontab -e will allow you to edit your cron.
Adding a line like this to it:

@reboot /path/to/script
will execute that script once your computer boots up.
So I added this to the crontab:

@reboot /etc/init.d/keyboard.zsh

This solution works on my Ubuntu Ubuntu 23.04 x86_64 6.2.0-35-generic system. 

Now I'd like to program the G-keys and the M-keys. 


08 May, 2021

Ubuntu 21.04 Brightness GUI


Ubuntu 21.04 has no GUI for the screen brightness. Add  this repo:

# sudo add-apt-repository ppa:apandada1/brightness-controller
# sudo apt install brightness-controller

Now you can run the program, or add it to favorites.

Ubuntu 21.04 set brightness

There is no brightness button in Ubuntu 20.04. Why? But you can set the brightness via terminal commands.

Step one: find the name of your monitor.

In my case:

# xrandr | grep " connected" | cut -f1 -d " "
# HDMI-2

Then set the brightness in the terminal:

# xrandr --output HDMI-2 --brightness 1

Night settings could be a brightness of e.g. .75

No GUI for the screen settings, such as color and brightness etc. is yet another serious UX-flaw in the problematic Ubuntu 20.04. This update is not the best we saw from Ubuntu. We need UX'ers in Ubuntu.

04 May, 2021

Ubuntu: Connecting Gnome Files to MacOS via SFTP

 



So the connection via SSH from Ubuntu to MacOS was possible. Why not establish a GUI-connection via Files. You can add other network shares at the + at the bottom of the shortcut list.

In the form add the address of the remote computer and use a sftp connection:

sftp://192.168.xxx.xxx (use the actual ip-adress where you see the xxx)

Click ok.

And that's all it takes.


Now you can work with the files on your Mac from Ubuntu.

Nice!

10 January, 2021

Ubuntu: How to open a browser window in a URL via Bash

"I want a fast way to open a browser in a specific URL from a folder.

Here is a solution in Bash. Create a file like this:

#!/bin/bash
# open url in chrome
xdg-open https://whateverURL.whot

Now save the file, as myURL.sh or similar. Remember to make the file executable:

# chmod a+x myURL.sh

Now you can run the file from your favorite terminal:

# ./myURL.sh

Works on: Linux / Ubuntu.

08 June, 2020

Ubuntu

The Great Drive Mystery
Tried to set up Ubuntu. The install worked fine, but mounting the data drive and giving user access to the thing was difficult. After a days work Ubuntu would not mount the drive. So all this waiting for chmod and chown was probably in vain. I'll have to figure out why Ubuntu refused to mount the drive.

Check /etc/fstab
Here is the root of the problem. The data drive was not mentioned. This is very stange. My additions to the file yesterday simply vanished. Why? I'll give it another try. Probably the desktool is buggy. Or ... ??

The Bandit Is NOT Timeshift
This is a mystery. When Timeshift makes a backup, the mounted drive seems to move ... Ubuntu will mount the external disk with a "Home" label. That is the disk label from a previous distro. So do we have our bandit here? I'm not totally convinced.

Probably this was a coincidence. In the end I installed gparted, and mounted the drive. The /etc/fstab was correct, and after several reboots this evening the system seems stable.

Or, that's what I hope.

Gparted - enter the Hero
With gparted I could mount the drive correctly. For some reasom Ubuntu's disks tool could not do the trick. With a correctly formatted /etc/fstab the drive was mounted permanently. So far so good.

GIMP Could Not Edit Files
At first I thought that this was a general permission problem. However I could not find it. After quite a lot of web research someone somewhere mentioned, that you have to give permissions to the programs in snap!

Problem solved.

Zen Koan
You search for an error,
where there is no error.
It's somewhere else. 

06 June, 2020

SDD Crash

My browser here and now: #WCEU
This is my screen here and now.
From #WCEU 2020 a fine talk about CSS.
So my OS is up and running
Sort of ...

The picture is my screen here and now. I'm following the proceedings at #WCEU on my Linux PC. For the time being the OS is OpenMandriva.

Åbyhøj Data
My SDD crashed (Kingston 120 GB ssd now 300) and the system was not able to boot at all. Strangely enough even the BIOS was unavailable. So what was wrong with the system? Åbyhøj Data was a great help here, because it's hard to find out exactly which part of the system died.

They added a new SDD, larger than the old one. So the system improved a bit. Even better: Now the PC is able to boot again. But had to get an OS somehow. The Manjaro distro was fine, however somewhat nerdy. I need a new OS.

I bougt a Linux Magazine with a DVD on the frontpage, and tried at least to boot in Linux. And succeded. First I installed OpenMandriva.

OpenMandriva - not my taste
OpenMandriva looked promising with KDE and what not, but I found literally everything uphill. Like in everything. I don't like it, and will try something a bit more userfriendly. When I looked for documentation, the online wiki was a joke. No content in several articles. Try the empty FAQ ... 

Next Stop Ubuntu
So I guess it's a hobby project or some insider project. But now I know that my system works, and I think I'll go for a Ubuntu distro. OpenMandriva was usefull here. I could burn a USB version of Ubuntu.

At least I could use the distro in order to burn a Ubuntu USB. 

The game's afoot.


01 May, 2018

It's time to try a new distribution

The Manjaro XFCE desktop with my keyboard bokeh as background.


Now I run the new kid on the blog Arch based Manjaro distro with a XFCE desktop. It's a superfast system with a lightweight distro on a decent PC.

Manjaro use the Linux 4.14.36-1-MANJARO GNU/Linux kernel. Updates are rolling.

Installing Manjaro
  • Unplugged the /home drive (a 2TB harddisk)
  • Installed Manjaro on the SSD stardup disk
  • Added a user
  • Replugged /home disk
  • Followed this guide
First I had to find the /home disk ID by:

# blkid

Then /etc/fstab was edited and this info was added:

# UUID=b87ebb56-f4df-43ee-918a-fa69xxxxxxxx   /home    ext4          defaults       0       2

A nice surprice
After a reboot the system was up and running. To my surprise the users could access their shares immediately. And a very pleasant surprise was the fact that even shortcuts from Nautilus was preserved and ready for use in the XFCE file manager Thunar.

Even symbolic links to certain shared folders were preserved.

SSD - contemplating more real estate
Well my 120GB SSD ran full after an Ubuntu SQL update of some kind. I tried to solve the problem by a new install, but Ubuntu was not able to do a decent dist-update.

After several crashes I decided that enough was enough. So I droppedUbuntu (for a while I guess ...)

The real problem isn't Ubuntu but the fact that the SSD should have more GBs. I guess that it is necessary to follow the development on the boot drive or to update the hardware.

25 April, 2018

Ubuntu up and running

Strange. Almost gave up on Ubuntu. But next morning it was just:

apt update && apt upgrade
apt dist-upgrade
reboot

... and BINGO - the thing just worked as a charm.

The next step will be add the harddrive with the user data and configure the user access but that's not for now.

11 February, 2018

[Solved] Emmet in Brackets on Ubuntu

I could not install the Emmet - or other plug ins - in Brackets. The problem was the packet manager Snap. I had to remove the snap for brackes, and deleted all files related to Brackets manually. Then I downloaded the .deb package for Brackets and installed the thing. Now everything was OK, and I could install the Emmet plugin.

And Emmet is sooo cool.

25 December, 2016

Make /var/www/html/ writable

From the history:

 76  sudo gpasswd -a "per" www-data
   77  sudo chown -R "$USER":www-data /var/www
   78  find /var/www -type f -exec chmod 0660 {} \;
   79  sudo find /var/www -type d -exec chmod 2770 {} \;
   80  touch x
   81  rm x

Line 80 - 81 is just a test. 

13 January, 2016

How to make an icon for a Python App

The files and the icon.


So now I have some Python GUIs for my Philips HUE, but I'd like to have a nice Desktop Icon, like any other Linux App. How can I do this?

In Ubuntu - and probably most Linux systems the paths to executable programs are stored in hidden .desktop files.

First create a file and save it as .myApp.desktop

The content of the file could look like this:


[Desktop Entry]
Name=Test
Exec=/home/per/Dokumenter/bin/bin/hue/python/tkinterNoter/tkEntry.py
Icon=/home/per/Dokumenter/bin/bin/hue/python/tkinterNoter/multimusen.png
Terminal=false
Type=Application
GenericName="Python tkEntry Exp"

There are more possible setting, see here.

The next step is to make your file executable, write these commands in the terminal window:

# chmod a+x .myApp.desktop
# chmod a+x tkEntry.py
# cp .*desktop ~/.local/share/applications/

In order to give all system user access to your program, you can:

# cp .*desktop /usr/share/applications

Now you'll see an icon with the chosen picture in the folder. You can drag this icon to e.g. the menu. And now you can run your GUI as you would run any program.

The line Terminal can be true or false. If it's true the program will launch in a terminal window.

27 August, 2015

Unity - remove more suggestions

In Unity "more suggestions" are just plain adss. Ubuntu please don't bloat my screen with ads ...

To remove the crap try this:

# gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"

 

13 November, 2011

Debian installation

Installationen af Debian forløb problemfrit; men over nettet tog installationen det meste af en dag. Årsagen var at jeg ikke overvåger computeren hele tiden. Der kunne godt gå et par timer mellem hvert "ja" eller "nej". Og så trækker det jo ud.

Jeg havde håbet på en kommandoprompt; men så basalt endte det ikke i denne omgang. Den grafiske installationsdimmer ledte gennem alle faser. Og da jeg sagde ja til et grafisk skrivebordsmiljø, så blev det til Gnome.

Nå ja, så lad gå da. Jeg var ellers på nippet til at vælge noget andet. Men hva' ... Gnome plejer jo at være ok, og man skal ikke altid efterligne Linus, vel?

Efter at ha' rodet i laaaang tid for at få et Java plugin til at virke i Iceweasel (= Firefox) tænkte jeg, at der måske manglede en pakke. I synaptic søgte jeg på en kombination af jre og mozilla. Resultat:
"Java Plug-in enables applets written to the Java Platform 6
specification to be run in Mozilla and other web browsers.
Java Plug-in comes with the Java Runtime Environment (JRE)."
Det lød ... rigtigt. Pakken blev installeret, og så virkede sagerne ellers. Nu kan jeg gå på netbank og e-boks med Iceweasel. Og her yder Redmond-vennerne i banken sikkert ikke support.

Til nu har den eneste "konfigurationskamp" været Java.  Alt andet er forløbet aldeles smertefrit.

  • MP3 understøttes
  • Flash kunne installeres, da jeg fandt ud af at slå de sjove arkiver til i > Indstillinger > Arkiver - og så var der ellers adgang til alt det sjove: codecs, Flash og hvadvedjeg.
Mht. programmer passer Debian fint i mit kram. Jeg kommer nok til at savne Ubuntu One og den fine integration med Tomboy Noterne. Her må der findes en løsning.

12 November, 2011

Næste distro på serveren bliver Debian

Nu bliver det altså Debian. Jeg dropper Ubuntu ind til videre, og går efter det OS, som Ubuntu bygger på. Ubuntu er en videreudvikling af Debian. Derfor er Debian et oplagt valg af Linux OS til min server. Jeg har læst lidt i manualerne, og det ligner "kendt skakteori". Så lige nu er planen at installere et minimalt system. Installationen af Debian skulle være en anelse mere nørdet; men det skræmmer ikke efter flere års brug af nørd-distributionen Archlinux. Med dødsforagt kaster jeg mig ud i Debianprojektet.

Det er altid festligt at begynde fra en kommandolinje.

Jeg er i 7 sind når det gælder skrivebordsgrænsefladen:

  • Gnome?
    Kritiseres med en vis ret for at være rodet. Linus Thorvalds gider ikke den ny version.
  • KDE?
    Hvis Gnome er rodet så er KDE commedia dell'arte. Ligner Windows (if you pardon my French). Her er mange multimedieprogrammer. KDE er eksperimenterende med de udfordringer den slags giver.
  • XFCE?
    Er lynhurtig og effektiv; men virker grafisk noget skrabet. Af en eller anden grund har jeg aldrig følt mig helt hjemme i XFCE.
  • Windows Manager
    FVWM, Ratpoison og vennerne er sjove; men tidskrævende at konfigurere.
Nu arbejder jeg jo med webudvikling, foto, lyd og animation. Debians programpakker er de samme, som dem man finder i Ubuntus pakkesamling. Codecs installeres på omtrent samme måde, og så kan musikken høres. Det ser altså ud til at jeg kan bygge et system, der ligner det jeg bruger i dag. Og så slipper man vel for alle de pakker, der alligevel aldrig bliver brugt.

Så hvor skal vi hoppe hen du? Man er vel efterkommer af Adam. Hvorfor dog gå imod en lækker fristelse? KDE!

09 July, 2011

Banshee kan synkronisere med iPad

Ubuntus nye medieafspiller fungerer sammen med iPad. Billedet herunder viser lidt af samlingen på vores iPad. Og så spillede musikken ellers...

Unitys filmanager mounter iPaden, og så kan man ellers gå på opdagelse i dens biblioteker.Meget spændende at se, hvordan iPad er opbygget under motorhjælmen. Herefter kan iPad vel også bruges som et lagermedie.

Så mangler vi kun lige at få lov til at boote iPad med linux...

02 July, 2011

Elightenment Gnome

Enlightenment er en klassisk windows manager (skrivebordsmiljø), som ikke kræver store ressourcer af computeren. Jeg installerede den via Ubuntu - og fik kombinationen af Enlightnment og Gnome med i købet.

Den kombination er herlig. For det første virker systemet mærkbart "hurtigere". For det andet kan man arbejde med Gnomes filmanager og menuer. Man får med andre ord det bedste fra to verdener.