Linux

  • Davinci resolve x Ubuntu

    Fix Davinci Resolve high resolution too small in Ubuntu 22.04

    Davinci resolve x UbuntuDavinci resolve x UbuntuAre you running a high resolution Ubuntu 22.04? Is your Davinci Resolve too small? This might be the quick fix for you.Edit your Davinci Resolve desktop filesudo vim /usr/share/applications/com.blackmagicdesign.resolve.desktopUpdate the Exec valueLook for the line below (or something similar):Exec=/opt/resolve/bin/resolve %uPrepend the environment variables like this:Exec=env QT_DEVICE_PIXEL_RATIO=2 QT_AUTO_SCREEN_SCALE_FACTOR=1 /opt/resolve/bin/resolve %uSave your changes Reload Davinci Resolve and enjoy :)
  • Transfer files from or to linux and unix server

    SCP scp command will copy and replace everything from source to destination. Copy files recursively from local to server: scp -rp ~/Downloads user@server.com:/path Copy files recursively from server to local: scp -rp user@server.com:/path ~/Downloads     RSYNC rsync will copy and check and compare files before copying files from source to destination. Copy files recursively from local to server: rsync -av ~/Downloads user@server.com:/path Copy files recursively from server to local: rsync -av user@server.com:/path​ ~/Downloads  
  • Schedule command using at command

    Creating commands Type in your terminal: at [schedule] e.g.: at 10:30 am Then inside the at command you can type in your commands like: at> php /var/www/html/yii-application/yii job/my-custom-job param1 param2 Then when you are done adding commands, presst CTRL+D Deleting commands If you don't know yet the schedule id, you can execute atq It will show you the list of scheduled commands like below: job 12 at Wed Feb 20 01:00:00 2019 To see the actual command you can execute at -c 12 To delete the schedule, simply use atrm command with the schedule id like this: atrm 12 And just in case you were thinking how to close the command that is already running, atrm will not stop the command. Instead you need to kill manually. In your terminal, run: ps -ef | grep 'YOUR_COMMAND' It will return something like this: UID PID PPID C STIME TTY TIME CMD root 361 1 0 Oct19 ? 00:00:04 YOUR_COMMAND Get the PID to kill the command kill 361
  • Run SSH command in background

    Do you have to run a big command that requires 30 minutes, 1 hour, 2 hours or 6 hours? Unfortunately SSH connections times out. Here's a simple trick on how to run a ssh command in the background so you can run your command and maybe sleep for a while or continue with your life.   In your terminal, run: nohup YOUR_COMMAND your_command_parameters > my.log 2>&1 &   And just in case you were thinking how to close the command, in your terminal, run: ps -ef | grep 'YOUR_COMMAND' It will return something like this: UID PID PPID C STIME TTY TIME CMD root 361 1 0 Oct19 ? 00:00:04 YOUR_COMMAND Get the PID to kill the command kill 361