this post was submitted on 22 Jul 2024
87 points (94.8% liked)

Linux

48693 readers
1480 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

For me it's: Testdisk (and Photorec) Caddy Netstat Dig Aria2

you are viewing a single comment's thread
view the rest of the comments
[–] jeena@piefed.jeena.net 90 points 5 months ago (3 children)

For me it's the other way around I wish there would be better CLI support for GUI apps.

[–] notabot@lemm.ee 15 points 5 months ago (1 children)

It's been years since I had to admin Windows servers, but I was quite impressed with the number of MS products where the install and configuration tools would output the Powershell commands to carry out the changes you'd asked for. It made it quite a lot easier to automate. I'd love to see that paradigm catch on more widely, with the GUI and CLI having the same functionality and the GUI giving you the commands to run.

[–] Petter1@lemm.ee 2 points 5 months ago

I like gui file browser with integrated console window that prints all the commands you trigger by using gui as well.

[–] mfat@lemdro.id 8 points 5 months ago (3 children)
[–] jeena@piefed.jeena.net 29 points 5 months ago (4 children)
  1. Gimp to batch edit pictures in a script (I know about ImageMagick but still)
  2. Excel to change stuff in excel files quickly (I know about python modules but it's so complicated to use)
  3. Proprietary VPN software like Cisco AnyConnect, I want to automate the login when I boot, but they don't let me

Just from the top of my head.

[–] nmtake@lemm.ee 11 points 5 months ago (1 children)
  1. Gimp to batch edit pictures in a script (I know about ImageMagick but still)

It seems to exist: https://www.gimp.org/tutorials/Basic_Batch/

[–] sparr@lemmy.world 1 points 5 months ago (1 children)

There are many things you can do in the GIMP gui that can't be done programmatically :(

[–] delirious_owl@discuss.online 2 points 5 months ago

This is one reason I love FreeCAD. Everything done in the GUI is just a python call

[–] ik5pvx@lemmy.world 5 points 5 months ago

For anyconnect: openconnect works perfectly, either as standalone script or via networkmangler.

[–] SeeJayEmm@lemmy.procrastinati.org 4 points 5 months ago (1 children)

For Excel there is a PowerShell module called Import-Excel that I use all the time.

[–] jeena@piefed.jeena.net 3 points 5 months ago (2 children)

I see, nice, but I'm on Linux, so perhaps I need to run power shell there ^^

[–] yetAnotherUser@lemmy.ca 7 points 5 months ago

If you don't want to use PowerShell in Linux, there's also nushell, which is another (non-POSIX) shell that can process Excel files

[–] SeeJayEmm@lemmy.procrastinati.org 5 points 5 months ago (1 children)

I forgot where I was posting. (I use both win and Linux pretty heavily.) I have pwsh, let me see if import-excel works on linux and report back.

[–] SeeJayEmm@lemmy.procrastinati.org 7 points 5 months ago* (last edited 5 months ago)

Appears to work as well as it does on windows. I guess the only downside is learning powershell if you have no previous experience with it.

@jeena@piefed.jeena.net

[–] Lydia_K@startrek.website 1 points 5 months ago (1 children)

Check out openconnect to connect to anyconnect VPNs

[–] jeena@piefed.jeena.net 2 points 5 months ago (1 children)

I did, doesn't work with our company setup with 2FA.

[–] ik5pvx@lemmy.world 3 points 5 months ago (1 children)

What kind of prompt does your company 2FA provide? Using openconnect with networkmangler, I get a pop up to input my pin+totp. I haven't done the script way in the last few years, but the connection script is plain shell and I was able to handle the 2FA from there too

[–] jeena@piefed.jeena.net 1 points 5 months ago

It's some time ago I dug deeper on what was happening, but openconnect was getting a different response from the server than it expected and it just failed because of that.

[–] rescue_toaster@lemm.ee 4 points 5 months ago (1 children)

pavucontrol. I switch between usb headset and my external speakers all the time. Continually going to this gui is kind of annoying.

[–] mranderson17@infosec.pub 6 points 5 months ago (1 children)

I use a little oneliner with tofi (rofi/wofi would also work) to select the current output and avoid pavucontrol. It's mapped to a sway binding but would probably work in any wm/de:

pactl set-default-sink $(pactl list short sinks |awk '{print $2}' |tofi $tofi_args)

I'm using pipewire so the functionality of pactl is actually provided through pipewire-pulse I think

[–] rescue_toaster@lemm.ee 2 points 5 months ago (1 children)

Does set-default-sink change an already current stream? Or do you need move-sink-input.

I've looked at the manpages but was a bit overwhelmed and didn't try to make my own script. Your solution gives me motivation to do so. I also use sway and pipewire. Though I use fuzzel for my launcher.

[–] mranderson17@infosec.pub 1 points 5 months ago

Yeah, it changes without skipping a beat for me in pipewire, even in things like zoom/teams.

[–] oo1@lemmings.world 2 points 5 months ago

I love programs like freecad despite the really hard/unintuitive gui. 95% of all the modelling i need to do (as an amateur) can be done easily in a python script.

The finishing touches like adding filets and chamfers are the annoying part were gui is easier, due to the way edges are referenced.

Likewise at work, we have to produce a lot of regular reports in excel. All done via python / sql.

[–] joeldebruijn@lemmy.ml 0 points 5 months ago (1 children)

This, but for a Fireshot like tool. Screenshot and pdf of webpages in their entirety by scrolling while shotting. In bulk, with CLI.

[–] refalo@programming.dev 2 points 5 months ago (2 children)

Do you have a legitimate use-case for this?

[–] joeldebruijn@lemmy.ml 2 points 5 months ago* (last edited 5 months ago)

Dont know if it's illegitimate otherwise 😉

But my user story is like this:

I want to preserve and archive information I used because it's a reflection of the things I did, learned and studied throughout life.

Then my use case are:

  • Orientation about "events": places to visit on daytrips or holidays (musea, nature, parks, campsites) and looking for practical information and background as well.
  • Gather a "dossier": info to help make a decision (buying expensive things, how to do home improvement etc)
  • Building a personal knowledge database: interesting articles and blogs.

My current workflow:

  • Browse
  • Bookmark extensively
  • Download pdf or other content (maps, routes, images) when provided.
  • Open bookmarks.
  • Fireshot every webpage to pdf and png
  • Save everything with a consequent filename (YYYYMMDD - Source - Title)

I would like to automate the last 3 steps of my workflow.

[–] joeldebruijn@lemmy.ml 1 points 5 months ago (1 children)
[–] refalo@programming.dev 2 points 5 months ago (1 children)

Does this support sites that lazy load content as you scroll?

[–] joeldebruijn@lemmy.ml 1 points 5 months ago (1 children)

Not sure, search on "screenshot lazy load Fireshot" or "screenshot lazy load Linkwarden" does not turn up anything conclusive.

Do you have an example?

[–] refalo@programming.dev 2 points 5 months ago (1 children)

https://discourse.gnome.org/t/towards-a-better-way-to-hack-and-test-your-system-components/21075

This one doesn't actually seem to load new network requests, but the way the scrolling works seems to break any other screenshot application I've tried.

[–] joeldebruijn@lemmy.ml 2 points 5 months ago* (last edited 5 months ago)

Can confirm, tested it with Signal forum, also discourse. Fireshot stops at the end of the current loaded messages (20 of 94) and doesnt scroll further by itself.