Difference between revisions of "Debian"

From Organic Design wiki
(Gnome3 extensions and addons: screenshot tool)
m (Keyboard shortcuts)
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[File:Debian-logo.svg|100px|right]][http://www.debian.org/intro/about Debian] is a free operating system using the [http://www.kernel.org Linux kernel], but most of the basic OS tools come from the [http://www.gnu.org GNU project]; hence the name GNU/Linux. At Organic Design we install Debian on our [[server]]s using the [[install a new server]] [[procedure]], and have been using it since around 2005.
 
[[File:Debian-logo.svg|100px|right]][http://www.debian.org/intro/about Debian] is a free operating system using the [http://www.kernel.org Linux kernel], but most of the basic OS tools come from the [http://www.gnu.org GNU project]; hence the name GNU/Linux. At Organic Design we install Debian on our [[server]]s using the [[install a new server]] [[procedure]], and have been using it since around 2005.
  
In June 2013 we decided to change from [[Ubuntu]] to Debian for our workstations as well since Ubuntu is increasingly becoming the "microsoft of the free software world" with pay software and services at every corner and [http://www.fsf.org/blogs/rms/ubuntu-spyware-what-to-do compulsory spyware] riddled throughout system. But then in early 2014 we changed to [[Linux Mint]] for our workstation machines, mainly due to the fact that they're very up to date with their choice of Linux kernel version which allowed me to use my touch-screen on my [[Samsung ATIV Smart PC Pro (XE700T1C)]] and fixed a long-standing bug on Beth's [[Lenovo Ideapad S10-3]] which prevented it from resuming from standby. As of mid 2019 we've moved back to Debian again because Mint's Cinnamon desktop is stuck on an insecure path through its dependence on Xorg whereas most desktop managers are now moving to the more secure and slim [[w:Wayland (display server protocol)|Wayland]] display server. With the recent release of Debian 10, I decided to move back and give it a try!
+
In June 2013 we decided to change from [[Ubuntu]] to Debian for our workstations as well since Ubuntu is increasingly becoming the "microsoft of the free software world" with pay software and services at every corner and [http://www.fsf.org/blogs/rms/ubuntu-spyware-what-to-do compulsory spyware] riddled throughout system, see [[Debian legacy issues]] for notes about various issues and solutions encountered back then. But then in early 2014 we changed to [[Linux Mint]] for our workstation machines, mainly due to the fact that they're very up to date with their choice of Linux kernel version which allowed me to use my touch-screen on my [[Samsung ATIV Smart PC Pro (XE700T1C)]] and fixed a long-standing bug on Beth's [[Lenovo Ideapad S10-3]] which prevented it from resuming from standby. As of mid 2019 we've moved back to Debian again because Mint's Cinnamon desktop is stuck on an insecure path through its dependence on Xorg whereas most desktop managers are now moving to the more secure and slim [[w:Wayland (display server protocol)|Wayland]] display server. With the recent release of Debian 10, I decided to move back and give it a try!
  
 
== Gnome3 extensions and addons ==
 
== Gnome3 extensions and addons ==
I don't really like Gnome much, I prefer Cinnamon, but the problem is that Cinnamon is not very secure since it's stuck on the old xorg desktop manager. Here are some things that can be done after installing a Gnome3 based system to make it a bit more familiar.
+
[[File:Gnome3 on Debian10.jpg|right|600px]]I don't really like Gnome much, I prefer Cinnamon, but the problem is that Cinnamon is not very secure since it's stuck on the old xorg desktop manager. Here are some things that can be done after installing a Gnome3 based system to make it a bit more familiar.
 
* install the gnome icon color packages via apt
 
* install the gnome icon color packages via apt
* install the [https://extensions.gnome.org/extension/1160/dash-to-panel/ Dash to Panel] and [https://extensions.gnome.org/extension/1112/screenshot-tool/ Screenshot Tool] extensions.
+
* install the following Gnome extensions:
 +
** [https://extensions.gnome.org/extension/1160/dash-to-panel/ Dash to Panel] ''- makes a proper panel with favourite and loaded apps''
 +
** [https://extensions.gnome.org/extension/608/gnomenu/ Gno Menu] ''- adds a good menu to the panel''
 +
** [https://extensions.gnome.org/extension/615/appindicator-support/ KStatusNotifierItem/AppIndicator Support] ''- adds the familar background app status icons to the panel''
 +
** [https://extensions.gnome.org/extension/800/remove-dropdown-arrows/ Remove Dropdown Arrows] ''- removes ugly dropdown menu arrows from the panel''
 +
** [https://extensions.gnome.org/extension/355/status-area-horizontal-spacing/ Status Horizonal Spacing] ''- removes excessive spacing between icons in the panel''
 +
** [https://extensions.gnome.org/extension/1112/screenshot-tool/ Screenshot Tool] ''- adds screenshot tool to panel''
 +
*[https://extensions.gnome.org/extension/28/gtile/ gTile] ''- a good window tiling extension''
 
* use the Tweaks utility to change icon colours, add an applications menu and window buttons and configure extensions, remove extensions [https://extensions.gnome.org/local/ here].
 
* use the Tweaks utility to change icon colours, add an applications menu and window buttons and configure extensions, remove extensions [https://extensions.gnome.org/local/ here].
  
== Issues ==
+
=== Keyboard shortcuts ===
* There's a problem with with Gnome3 file explorer causing drag and drop to intermittently fail with selections
+
I like to add some keyboard shortcuts for simple window management. The [https://extensions.gnome.org/extension/28/gtile/ gTile] extension is required and must be set to simple 2x2 grid. This will allow the super with left or right keys to move the currently focused window to occupy the left or right half of the screen, and then using super with up or down will move it to the top of bottom half vertically.
* you may need to add <tt>export PATH=$PATH:/usr/sbin</tt> to root's '''.bashrc''' for <tt>dpkg-reconfigure</tt> to work
+
*View split on left: Super+Left
* I need to restart and enter my drive-unlock password twice for every damn update! Don't know if this is Debian or Gnome3, but it's dicussed [https://gitlab.gnome.org/GNOME/gnome-software/issues/181 here] and [https://ask.fedoraproject.org/t/gnome-software-center-wants-me-to-restart-to-install-updates/1283/10 here]. GNOME software comes with Software & Updates. Software & Updates can be removed and replaced with GNOME Package Updater.
+
*View split on right: Super+Right
 +
*Global move window up (in gTile prefs): Super+Up
 +
*Global move window down (in gTile prefs): Super+Down
 +
*Move window one monitor to the left: Shift+Super+Left
 +
*Move window one monitor to the right: Shift+Super+Right
  
== Distribution upgrades ==
+
== Packages ==
To upgrade Debian, first ensure that there are no conflicting or held back packages. If there are, these issues are best sorted out first.
 
 
<source lang="bash">
 
<source lang="bash">
dpkg --audit
+
apt install python3-pip gnupg2 git openvpn network-manager-openvpn network-manager-openvpn-gnome flatpak gnome-software-plugin-flatpak
dpkg --get-selections | grep hold
+
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
 +
pip install youtube-dl
 
</source>
 
</source>
Then run ''aptitude'' and press "g" and only carry on when you have the message "No packages are scheduled to be installed, removed or upgraded".
 
  
Next change all your sources over in ''/etc/apt/sources.list'' from the old distro name such as ''squeeze'' to the new one such as ''wheezy''. And then do the upgrade in two steps, first upgrade the packages and then do the ''dist-upgrade'' as follows:
+
== Issues & gotchas I've had before ==
<source lang="bash">
+
* root's default paths are missing, so either add e.g. <tt>export PATH=$PATH:/usr/sbin</tt> to root's '''.bashrc''', or <tt>/usr/sbin/usermod -a -G sudo user</tt> and use ''sudo'' instead of ''su''
apt-get update
+
* I need to restart and enter my drive-unlock password twice for every damn update! Don't know if this is Debian or Gnome3, but it's discussed [https://gitlab.gnome.org/GNOME/gnome-software/issues/181 here] and [https://ask.fedoraproject.org/t/gnome-software-center-wants-me-to-restart-to-install-updates/1283/10 here]. GNOME software comes with Software & Updates. Software & Updates can be removed and replaced with GNOME Package Updater.
apt-get upgrade
+
* Gnome3 has changed the touchpad default behaviour, now to do a right-click you tap with two fingers, you can revert to the old area-based behaviour using Tweaks
apt-get dist-upgrade
+
* My internal Atheros bluetooth device suddenly disappeared, it came back after I enable non-free contribs in the software manager and then installed ''firmware-atheros''
</source>
+
* [https://askubuntu.com/questions/1131885/help-w-possible-missing-firmware-lib-firmware-i915-kbl-guc-ver9-14-bin-for-mo/1132350#1132350 Possible missing firmware /lib/firmware/i915]
 
 
It's best to use the package maintainer's version of any updated configuration files it mentions. You can have a second shell window open so you can check the changed parts of the configuration that have changed and back them up or copy them across to the freshly created version.
 
 
 
== Centrino Wireless-N 1030 ==
 
This driver is not included in the Debian installation or on-line repositories so has to be manually installed afterwards. See also [[Set up a wifi hotspot]]
 
<source lang="bash">
 
echo "deb http://http.debian.net/debian/ wheezy main contrib non-free" >> /etc/apt/sources.list
 
apt-get update
 
apt-get install firmware-iwlwifi
 
modprobe -r iwlwifi ; modprobe iwlwifi
 
</source>
 
 
 
== Bluetooth ==
 
I found that I couldn't get any of my bluetooth devices to pair in the default install of Debian 7. The devices would show up in the detected list and the pairing process would initiate properly, but would then fail to complete. Using the ''bluez'' tools from the terminal worked though with the following procedure I found [http://www.ctheroux.com/2012/08/a-step-by-step-guide-to-setup-a-bluetooth-keyboard-and-mouse-on-the-raspberry-pi/ here]. Strangely, after I got the first thing (my mouse) working with this process, then my phone was able to pair from the GUI as normal even though it had failed prior to getting the mouse to work.
 
<source lang="bash">
 
hcitool scan
 
</source>
 
This process gives you the MAC address of your device which you can then begin the pairing process with as follows. This will ask you for the pin which you type in to your device etc or use ''0000'' if it's a device like a mouse or headset.
 
<source lang="bash">
 
bluez-simple-agent hci0 12:34:56:78:9A:BC
 
</source>
 
 
 
 
 
You then make the device trusted so that it can automatically connect in future:
 
<source lang="bash">
 
bluez-test-device trusted 12:34:56:78:9A:BC yes
 
</source>
 
 
 
 
 
And then finally, connect to the device:
 
<source lang="bash">
 
bluez-test-input connect 12:34:56:78:9A:BC
 
</source>
 
 
 
 
 
It should now be shown as normal in the bluetooth menus and settings window and should connect automatically when the session starts.
 
 
 
== Dual Monitor issues ==
 
One problem that often comes up with dual monitor setup in Ubuntu (persisting as of 11.04) is that there's nothing in the interface allowing the user to define which is the primary monitor having the panels with the launcher and notification icons etc.
 
 
 
But the monitors applet is actually just a graphical interface over the powerful [[w:RandR|xrandr]] utility. This tool can also be used to set the resolution - even custom resolutions, as for example shown in [[HDMI to DVI problem]]. The changes made with ''xrandr'' occur in real-time without any need to log out or restart anything to see the effects.
 
 
 
As an example, when I plugged a second monitor into my laptops HDMI port it automatically changed to an extended desktop setup, but the panels were all on the laptop screen. To move them across to the external monitor involves first querying ''xrandr'' to see what the current monitor names are:
 
<source>
 
Screen 0: minimum 320 x 200, current 3286 x 1080, maximum 8192 x 8192
 
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 293mm x 165mm
 
  1366x768      60.0*+
 
  1360x768      59.8    60.0 
 
  1024x768      60.0 
 
  800x600        60.3    56.2 
 
  640x480        59.9 
 
VGA1 disconnected (normal left inverted right x axis y axis)
 
HDMI1 connected 1920x1080+1366+0 (normal left inverted right x axis y axis) 531mm x 299mm
 
  1920x1080      60.0*+
 
  1280x1024      75.0    60.0 
 
  1152x864      75.0 
 
  1024x768      75.1    60.0 
 
  800x600        75.0    60.3 
 
  640x480        75.0    60.0 
 
  720x400        70.1 
 
DP1 disconnected (normal left inverted right x axis y axis)
 
</source>
 
 
 
 
 
From this we see that the external monitor is named HDMI1, so we can now make it primary as follows:
 
<source>
 
xrandr --output HDMI1 --primary
 
</source>
 
 
 
 
 
And voila, straight away, the panels shift across to the other screen :-)
 
 
 
== Working with small screens ==
 
Something that used to worm on prior versions of Ubuntu and seems to have stopped working in version 12 is the desktop panning feature. This allows your desktop to be bigger than you physical screen size and to scroll when you move the mouse to the edges. You used to be able to do this by typing a simple ''xrandr'' command such as the following:
 
<source lang="bash">
 
xrandr --output LVDS1 --panning 1920x1080
 
</source>
 
 
 
 
 
But this no longer works, which is a real pain if you have a tiny screen because you often have dialog boxes with the buttons off the bottom where they can't be seen! However it turns out there's a simple solution to this - {{h|you can hold down the ALT key and drag the window around to reveal the hidden parts!}}
 
 
 
== Mobile broadband connection suddenly requires password ==
 
One day when I tried to connect to the net using 3G on my USB stick it wouldn't connect and after removing and reinserting the SIM in the device I was asked for a password when trying to connect. I tried my chip's PIN and PUK codes, "1234", "12345" and "vivo" as well but all failed. But when I tried the chip in my phone and in Beth's laptop it connected without issue.
 
 
 
I compared the ''/etc/NetworkManager/NetworkManager.conf'' configuration in Beth's computer to mine and found that mine had somehow gained en extra line:
 
<source>
 
no-auto-default=18:03:91:8E:90:BC,
 
</source>
 
The digits correspond to my ''eth0'' MAC address, and the trailing comma seems a little odd. I removed this line and found that after a full reboot everything worked again (I first tried just restarting the Network Manager but that didn't fix it). I'm not sure how this line got added, but it could have happened during a lot of plugging and unplugging of different routers and things when we had some connection problems earlier in the week.
 
  
 
== See also ==
 
== See also ==
 +
*[[Debian legacy issues]]
 
*[[Install a new desktop]] ''- our procedure for what to install and configure on a local workstation after the bare OS is installed''
 
*[[Install a new desktop]] ''- our procedure for what to install and configure on a local workstation after the bare OS is installed''
*[[GNOME]]
 
 
*[https://wiki.debian.org/Gnome Gnome page on Debian wiki]
 
*[https://wiki.debian.org/Gnome Gnome page on Debian wiki]
 
*[http://www.linux-watch.com/news/NS3128387759.html Etch release delayed by financial arguments]
 
*[http://www.linux-watch.com/news/NS3128387759.html Etch release delayed by financial arguments]

Latest revision as of 22:27, 8 September 2022

Debian-logo.svg

Debian is a free operating system using the Linux kernel, but most of the basic OS tools come from the GNU project; hence the name GNU/Linux. At Organic Design we install Debian on our servers using the install a new server procedure, and have been using it since around 2005.

In June 2013 we decided to change from Ubuntu to Debian for our workstations as well since Ubuntu is increasingly becoming the "microsoft of the free software world" with pay software and services at every corner and compulsory spyware riddled throughout system, see Debian legacy issues for notes about various issues and solutions encountered back then. But then in early 2014 we changed to Linux Mint for our workstation machines, mainly due to the fact that they're very up to date with their choice of Linux kernel version which allowed me to use my touch-screen on my Samsung ATIV Smart PC Pro (XE700T1C) and fixed a long-standing bug on Beth's Lenovo Ideapad S10-3 which prevented it from resuming from standby. As of mid 2019 we've moved back to Debian again because Mint's Cinnamon desktop is stuck on an insecure path through its dependence on Xorg whereas most desktop managers are now moving to the more secure and slim Wayland display server. With the recent release of Debian 10, I decided to move back and give it a try!

Gnome3 extensions and addons

Gnome3 on Debian10.jpg

I don't really like Gnome much, I prefer Cinnamon, but the problem is that Cinnamon is not very secure since it's stuck on the old xorg desktop manager. Here are some things that can be done after installing a Gnome3 based system to make it a bit more familiar.

  • install the gnome icon color packages via apt
  • install the following Gnome extensions:
  • gTile - a good window tiling extension
  • use the Tweaks utility to change icon colours, add an applications menu and window buttons and configure extensions, remove extensions here.

Keyboard shortcuts

I like to add some keyboard shortcuts for simple window management. The gTile extension is required and must be set to simple 2x2 grid. This will allow the super with left or right keys to move the currently focused window to occupy the left or right half of the screen, and then using super with up or down will move it to the top of bottom half vertically.

  • View split on left: Super+Left
  • View split on right: Super+Right
  • Global move window up (in gTile prefs): Super+Up
  • Global move window down (in gTile prefs): Super+Down
  • Move window one monitor to the left: Shift+Super+Left
  • Move window one monitor to the right: Shift+Super+Right

Packages

apt install python3-pip gnupg2 git openvpn network-manager-openvpn network-manager-openvpn-gnome flatpak gnome-software-plugin-flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
pip install youtube-dl

Issues & gotchas I've had before

  • root's default paths are missing, so either add e.g. export PATH=$PATH:/usr/sbin to root's .bashrc, or /usr/sbin/usermod -a -G sudo user and use sudo instead of su
  • I need to restart and enter my drive-unlock password twice for every damn update! Don't know if this is Debian or Gnome3, but it's discussed here and here. GNOME software comes with Software & Updates. Software & Updates can be removed and replaced with GNOME Package Updater.
  • Gnome3 has changed the touchpad default behaviour, now to do a right-click you tap with two fingers, you can revert to the old area-based behaviour using Tweaks
  • My internal Atheros bluetooth device suddenly disappeared, it came back after I enable non-free contribs in the software manager and then installed firmware-atheros
  • Possible missing firmware /lib/firmware/i915

See also